bitburner-src/dist/engine.bundle.js
2021-09-11 02:11:41 -04:00

20 lines
1.4 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!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([26,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(173),r=a(430),i=a(159),o=a(12),s=a(61);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(var t=0;t<l.corporation.divisions.length;++t){var a=l.corporation.divisions[t];a.lastCycleRevenue=new s.a(a.lastCycleRevenue),a.lastCycleExpenses=new s.a(a.lastCycleExpenses),a.thisCycleRevenue=new s.a(a.thisCycleRevenue),a.thisCycleExpenses=new s.a(a.thisCycleExpenses)}}l.exploits=Object(i.c)(l.exploits)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(92),r=a.n(n);a(717),a(718),a(719),a(720),a(721),a(722),a(723),a(724),a(725),a(726),a(727),a(728),a(729),a(730);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",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.53.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:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,InfiltrationExpPow:.8,WSEAccountCost:2e8,TIXAPICost:5e9,MarketData4SCost:1e9,MarketDataTixApi4SCost:25e9,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.025,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.05,IntelligenceProgramBaseExpGain:2.5,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:1.5,IntelligenceClassBaseExpGain:.01,IntelligenceHackingMissionBaseExpGain:3,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.<br><br>In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.<br><br>Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:<br><br> Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.<br><br>Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.<br><br>Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.<br><br>Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.<br><br>To capture a Node, you must lower its HP down to 0.<br><br>There are six different types of Nodes:<br><br>CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action<br><br>Firewall - Nodes with high defense. These Nodes can 'Fortify'<br><br>Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions<br><br>Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions<br><br>Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action<br><br>Shield - Nodes with high defense. These Nodes can 'Fortify'<br><br>To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.<br><br>For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.<br><br>Other Notes:<br><br>-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.<br><br>-Whenever a Node is conquered, its stats are significantly reduced<br><br>-Miscellaneous Nodes slowly raise their defense over time<br><br>-Nodes slowly regenerate health over time.",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,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:.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.53.0 - 2021-09-09 Way too many things. (hydroflame & community)\n -------------------------------------------\n\n ** Dev? **\n\n * The entire codebase has been run through a code prettifier, hurray for consistency. (@threehams)\n * Lots of test. (@threehams)\n * Massive improvements to build speed. (@threehams)\n * Dev notes: This won't affect any players but is immensely useful for me.\n\n ** Hacknet **\n\n * Converted to ts/react\n\n ** Resleeving **\n\n * Converted to ts/react\n\n ** Sleeves **\n\n * Converted to ts/react. The ui should also have a better feel.\n * Fixed a bug that allowed players to recover shock much faster than intended.\n\n ** BN10 **\n\n * You have access to Sleeves right away\n * In BN10 Sleeves start with 75 shock and 25 sync.\n\n ** MathJax **\n\n * Several tooltips have been updated to display the relevant formula in Mathjax, e.g. Favor and reputation\n\n ** Corporation ** \n\n * Completely rewritten in React. Paving the way for bigger change.\n * Smart Supply is now smarter and won't deadlock the warehouse. It is also more configurable.\n * Several UI fixes.\n\n ** Bladeburner ** \n\n * Action count is no longer decided when joining the Bladeburners. Experiences for all players should be more similar.\n\n ** Factions ** \n\n * No factions have home computer ram requirement. This caused some confusion for new players.\n\n ** Gang ** \n\n * Made it clear when there's a new equipment coming up.\n\n ** Netscript **\n\n * getActionCountRemaining now returns Infinity for bladeburner general actions. (@brubsy)\n * getActionEstimatedSuccessChance now returns 100% for Diplomacy and Hyperbolic Regeneration Chamber. (@brubsy)\n * disableLog('ALL') now disables all logs individually, meaning you can re-enable the ones you want after. (@Cass)\n * getPlayer returns numPeopleKilled.\n * Dynamic RAM calculation errors have a better error message.\n * Hide some functions from autocomplete.\n * Added getAugmentationPrice, getAugmentationRepReq, deprecated getAugmentationCost. (@TempFound)\n * Fixed bug where some crime API would return \"assassinate\" when that's not accepted in other functions.\n\n ** Coding Contract **\n\n * Spiralize Matrix is easier to read.\n\n ** Misc. **\n\n * The world map is now used in sleeve travel and bladeburner travel.\n * noselect a bunch of stuff.\n * Ascii maps letters are more contrasting\n * Updated documentation for infiltration.\n * Most money costs in the game will turn grey/cyan when you don't have enough money.\n * Donation textbox has better look & feel.\n * Tech vendors ram & cores buttons have better look and feels.\n * cores cost modified to be a formula instead of a semi-random array of numbers.\n * Tech vendors now give a hint about where to get bigger servers.\n * logboxes now displays whitespaces exactly. (@Cass)\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.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,"c",(function(){return i})),a.d(t,"f",(function(){return o})),a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return l})),a.d(t,"e",(function(){return c})),a.d(t,"d",(function(){return u}));var n=a(226),r=a(121);function i(e){u(e)}function o(e){u("ERROR: "+e,{color:"#ff2929"})}function s(e){u(e,{id:"hack-progress-bar"})}function l(e){u(e,{id:"hack-progress"})}function c(e){u(Object(n.renderToStaticMarkup)(e))}function u(e,t={}){const a=`color: ${null!=t.color?t.color:"var(--my-font-color)"}; background-color:var(--my-background-color);${void 0===t.id?" white-space:pre-wrap;":""}`,n=`<tr class="posted"><td ${void 0===t.id?'class="terminal-line"':`id="${t.id}"`} style="${a}">${e}</td></tr>`;Object(r.a)("terminal-input").insertAdjacentHTML("beforebegin",n),function(){const e=Object(r.a)("terminal-container");e.scrollTop=e.scrollHeight}()}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(20),r=a(14),i=a(0),o=a.n(i);function s(e){return o.a.createElement(o.a.Fragment,null,e.content)}function l(e,t=!1){const a="popup-"+Array.from(Array(16)).map(()=>""+Object(r.a)(0,9)).join("");"string"==typeof e?t?Object(n.a)(a,s,{content:o.a.createElement("pre",{dangerouslySetInnerHTML:{__html:e}})}):Object(n.a)(a,s,{content:o.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.replace(/(?:\r\n|\r|\n)/g,"<br />")}})}):Object(n.a)(a,s,{content:e})}},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:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.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,"a",(function(){return i}));var n=a(0),r=a(2);function i(e){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:"unbuyable samefont"},r.a.formatMoney(e.money))}return n.createElement("span",{className:"money-gold samefont"},"number"==typeof e.money?r.a.formatMoney(e.money):e.money)}},function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"e",(function(){return o})),a.d(t,"a",(function(){return s})),a.d(t,"c",(function(){return l})),a.d(t,"d",(function(){return c})),a.d(t,"f",(function(){return r}));var n=a(65);function r(e,t,a){return e.substr(0,t)+a+e.substr(t+a.length)}function i(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 o(e){if(!s(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&&(o=a.charAt(i),l=n.charAt(i),o.toUpperCase()===l.toUpperCase());)i++;var o,l;return a.substring(0,i)}function s(e){return e.every(n.a)}function l(e,t=0){return e.toLocaleString(void 0,{maximumFractionDigits:t,minimumFractionDigits:t})}function c(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";function n(e,t){var a;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;if("function"==typeof(a=n.constructors[t.ctor]||window[t.ctor])&&"function"==typeof a.fromJSON)return a.fromJSON(t)}return t}function r(e,t,a){var n,r;a||(a=Object.keys(t)),n={};for(let e=0;e<a.length;++e)n[r=a[e]]=t[r];return{ctor:e,data:n}}function i(e,t){var a,n;for(n in a=new e,t)a[n]=t[n];return a}a.d(t,"c",(function(){return n})),a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i})),n.constructors={}},,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";a.d(t,"a",(function(){return n}));const n={}},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,"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 p}));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"],p=["Part-time Waiter","Part-time Employee"]},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(103),r=a(284),i=a(12);let o={};function s(e){o=JSON.parse(e,i.c)}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,"a",(function(){return r}));var n=a(0);function r(e){const t=null!=e.tooltip&&""!==e.tooltip;let a,r=e.disabled?"std-button-disabled":"std-button";if(t&&(r+=" tooltip"),"string"==typeof e.addClasses&&(r+=" "+e.addClasses),t)if("string"==typeof e.tooltip){const t={__html:e.tooltip};a=n.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t})}else a=n.createElement("span",{className:"tooltiptext"},e.tooltip);return n.createElement("button",{className:r,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&a)}},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(34),i=a(428),o=a(67),s=a(104);let l;document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("entire-game-container");if(null==t)throw new Error("Failed to find game container DOM element");l=t,document.removeEventListener("DOMContentLoaded",e)}));let c="";function u(e,t,a,s){let u=document.getElementById(e);if(null==u){const t=""===c?"rgba(0,0,0,0.5)":"rgba(0,0,0,0)";u=Object(o.a)("div",{class:"popup-box-container",display:"flex",id:e,backgroundColor:t,mouseDown:function(t){if(!t.srcElement)return;if(!(t.srcElement instanceof HTMLElement))return;t.srcElement.id===e&&(m(e),s&&s())}}),l.appendChild(u)}return""===c&&(c=e),r.render(n.createElement(i.a,{content:t,id:e,props:a,removePopup:()=>{m(e),s&&s()}}),u),u}function m(e){const t=document.getElementById(""+e);null!=t&&(r.unmountComponentAtNode(t),Object(s.a)(e),Object(s.a)(e+"-close"),e===c&&(c=""))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(5),i=a(18),o=a(2),s=a(10),l=a(12);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),e.stats?this.stats=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)}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,"b",(function(){return c})),a.d(t,"e",(function(){return u})),a.d(t,"c",(function(){return m})),a.d(t,"a",(function(){return h})),a.d(t,"d",(function(){return p})),a.d(t,"g",(function(){return d})),a.d(t,"f",(function(){return f}));var n=a(122),r=a(44),i=a(462),o=a(170),s=a(14),l=a(12);let c={};function u(e){return null!=c[e]}function m(){const e=Object(o.a)();return u(e)?Object(o.a)():e}function h(e){const t=e.ip;if(u(t))throw console.warn("IP of server that's being added: "+t),console.warn("Hostname of the server thats being added: "+e.hostname),console.warn("The server that already has this IP is: "+c[t].hostname),new Error("Error: Trying to add a server with an existing IP");c[t]=e}function p(e){const t=[];for(let e=0;e<15;e++)t.push([]);const a=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],o=e=>{switch(typeof e){case"number":return e;case"object":return Object(s.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 i.a){const i={hostname:e.hostname,ip:m(),numOpenPortsRequired:e.numOpenPortsRequired,organizationName:e.organizationName};void 0!==e.maxRamExponent&&(i.maxRam=Math.pow(2,o(e.maxRamExponent)));for(const t of a)void 0!==e[t]&&(i[t]=o(e[t]));const s=new n.a(i);for(const t of e.literature||[])s.messages.push(t);void 0!==e.specialName&&r.a.addIp(e.specialName,s.ip),h(s),void 0!==e.networkLayer&&t[o(e.networkLayer)-1].push(s)}const l=(e,t)=>{for(const r of e)a=r,n=t(),a.serversOnNetwork.push(n.ip),n.serversOnNetwork.push(a.ip);var a,n};l(t[0],()=>e);for(let e=1;e<t.length;e++)l(t[e],()=>{return(a=t[e-1])[Math.floor(Math.random()*a.length)];var a})}function d(){for(const e in c)delete c[e];c={}}function f(e){c=JSON.parse(e,l.c)}},,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.6,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:.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.r(t),function(e){a.d(t,"Engine",(function(){return be}));var n=a(11),r=a(15),i=a(94),o=a(161),s=a(349),l=a(3),c=a(133),u=a(113),m=a(504),h=a(286),p=a(203),d=a(40),f=a(173),g=a(4),y=(a(505),a(18)),_=a(70),b=a(506),E=a(507),v=a(527),k=a(542),C=a(543),O=a(579),w=a(582),S=a(591),T=a(138),x=a(53),M=a(39),P=a(634),A=a(42),R=a(6),N=a(329),D=a(101),I=a(96),j=a(114),L=a(97),B=a(1),F=a(191),W=a(678),U=a(99),G=a(146),H=a(679),K=a(22),q=a(27),$=a(43),z=a(44),Y=a(59),V=a(695),J=a(91),X=a(696),Q=a(175),Z=a(180),ee=a(697),te=a(31),ae=a(698),ne=a(10),re=a(132),ie=a(62),oe=a(699),se=(a(904),a(58)),le=a(704),ce=a(20),ue=a(8),me=a(275),he=a(98),pe=a(372),de=a(56),fe=(a(905),a(906),a(0)),ge=a.n(fe),ye=a(34),_e=a.n(ye);e(document).keydown((function(e){if(!0!==q.a.DisableHotkeys){if(!(B.a.isWorking||U.b||I.c||h.a))if(e.keyCode==de.a.T&&e.altKey)e.preventDefault(),be.loadTerminalContent();else if(e.keyCode===de.a.C&&e.altKey)e.preventDefault(),be.loadCharacterContent();else if(e.keyCode===de.a.E&&e.altKey)e.preventDefault(),be.loadScriptEditorContent();else if(e.keyCode===de.a.S&&e.altKey)e.preventDefault(),be.loadActiveScriptsContent();else if(e.keyCode===de.a.H&&e.altKey)e.preventDefault(),be.loadHacknetNodesContent();else if(e.keyCode===de.a.W&&e.altKey)e.preventDefault(),be.loadLocationContent();else if(e.keyCode===de.a.J&&e.altKey)e.preventDefault(),be.loadJobContent();else if(e.keyCode===de.a.R&&e.altKey)e.preventDefault(),be.loadTravelContent();else if(e.keyCode===de.a.P&&e.altKey)e.preventDefault(),be.loadCreateProgramContent();else if(e.keyCode===de.a.F&&e.altKey){if(te.b.isOn(te.a.Terminal)&&x.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),be.loadFactionsContent()}else e.keyCode===de.a.A&&e.altKey?(e.preventDefault(),be.loadAugmentationsContent()):e.keyCode===de.a.U&&e.altKey?(e.preventDefault(),be.loadTutorialContent()):e.keyCode===de.a.B&&e.altKey?(e.preventDefault(),be.loadBladeburnerContent()):e.keyCode===de.a.G&&e.altKey&&(e.preventDefault(),be.loadGangContent());e.keyCode===de.a.O&&e.altKey&&(e.preventDefault(),Object(me.b)())}}));const be={Clickables:{saveMainMenuButton:null,deleteMainMenuButton:null},Display:{content:null,terminalContent:null,infiltrationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null},indexedDb:void 0,_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){be.hideAllContent(),be.Display.terminalContent.style.display="block",te.b.navigateTo(te.a.Terminal),se.a.Terminal.classList.add("active")},loadCharacterContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.CharacterInfo),_e.a.render(ge.a.createElement(ee.a,{player:B.a}),be.Display.content),se.a.Stats.classList.add("active")},loadScriptEditorContent:function(e="",t=""){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.ScriptEditor),se.a.ScriptEditor.classList.add("active"),_e.a.render(ge.a.createElement(H.a,{filename:e,code:t,player:B.a,engine:this}),be.Display.content)},loadActiveScriptsContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.ActiveScripts),se.a.ActiveScripts.classList.add("active"),_e.a.render(ge.a.createElement(oe.a,{p:B.a,workerScripts:j.a}),be.Display.content)},loadHacknetNodesContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.HacknetNodes),se.a.HacknetNodes.classList.add("active"),_e.a.render(ge.a.createElement(P.a,{player:B.a}),be.Display.content)},loadCreateProgramContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.CreateProgram),se.a.CreateProgram.classList.add("active"),_e.a.render(ge.a.createElement(W.a,{player:B.a}),be.Display.content)},loadFactionsContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Factions),se.a.Factions.classList.add("active"),_e.a.render(ge.a.createElement(b.a,{player:B.a,engine:this}),be.Display.content)},loadFactionContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Faction)},loadAugmentationsContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Augmentations),se.a.Augmentations.classList.add("active"),_e.a.render(ge.a.createElement(s.a,{exportGameFn:function(){G.b.exportGame(),Object(o.c)(B.a)},installAugmentationsFn:i.d}),be.Display.content)},loadMilestonesContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Milestones),se.a.Milestones.classList.add("active"),_e.a.render(ge.a.createElement(V.a,{player:B.a}),be.Display.content)},loadTutorialContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Tutorial),se.a.Tutorial.classList.add("active"),_e.a.render(ge.a.createElement(X.a,null),be.Display.content)},loadDevMenuContent:function(){throw be.hideAllContent(),new Error("Cannot create Dev Menu because you are not in a dev build")},loadLocationContent:function(e=!0){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Location),se.a.City.classList.add("active"),_e.a.render(ge.a.createElement(N.a,{initiallyInCity:e,engine:be,p:B.a}),be.Display.content)},loadTravelContent:function(){be.hideAllContent(),B.a.gotoLocation(R.a.TravelAgency),be.Display.content.style.display="block",te.b.navigateTo(te.a.Location),se.a.Travel.classList.add("active"),_e.a.render(ge.a.createElement(N.a,{initiallyInCity:!1,engine:be,p:B.a}),be.Display.content)},loadJobContent:function(){""!=B.a.companyName?(be.hideAllContent(),B.a.gotoLocation(B.a.companyName),be.Display.content.style.display="block",te.b.navigateTo(te.a.Location),se.a.Job.classList.add("active"),_e.a.render(ge.a.createElement(N.a,{initiallyInCity:!1,engine:be,p:B.a}),be.Display.content)):Object(ue.a)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){be.hideAllContent();document.getElementById("mainmenu-container").style.visibility="hidden",be.Display.workInProgressContent.style.display="block",te.b.navigateTo(te.a.WorkInProgress)},loadRedPillContent:function(){be.hideAllContent();document.getElementById("mainmenu-container").style.visibility="hidden",be.Display.redPillContent.style.display="block",te.b.navigateTo(te.a.RedPill)},loadCinematicTextContent:function(){be.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",be.Display.cinematicTextContent.style.display="block",te.b.navigateTo(te.a.CinematicText)},loadInfiltrationContent:function(e,t,a){be.hideAllContent();document.getElementById("mainmenu-container").style.visibility="hidden",be.Display.infiltrationContent.style.display="block",te.b.navigateTo(te.a.Infiltration),Object(S.a)(this,B.a,e,t,a)},loadStockMarketContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.StockMarket),se.a.StockMarket.classList.add("active"),Object(Y.e)()},loadGangContent:function(){B.a.inGang()&&(be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Gang),se.a.Gang.classList.add("active"),_e.a.render(ge.a.createElement(v.a,{engine:this,gang:B.a.gang,player:B.a}),be.Display.content))},loadMissionContent:function(){be.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",be.Display.missionContent.style.display="block",te.b.navigateTo(te.a.Mission)},loadCorporationContent:function(){B.a.corporation instanceof f.a&&(be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Corporation),se.a.Corporation.classList.add("active"),_e.a.render(ge.a.createElement(C.a,{corp:B.a.corporation,player:B.a}),be.Display.content))},loadBladeburnerContent:function(){B.a.bladeburner instanceof u.a&&(be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Bladeburner),se.a.Bladeburner.classList.add("active"),_e.a.render(ge.a.createElement(E.a,{bladeburner:B.a.bladeburner,player:B.a,engine:this}),be.Display.content))},loadSleevesContent:function(){be.hideAllContent(),be.Display.content.style.display="block",te.b.navigateTo(te.a.Sleeves),_e.a.render(ge.a.createElement(w.a,{player:B.a}),be.Display.content)},loadResleevingContent:function(){be.hideAllContent(),te.b.navigateTo(te.a.Resleeves),be.Display.content.style.display="block",se.a.City.classList.add("active"),_e.a.render(ge.a.createElement(O.a,{player:B.a}),be.Display.content)},hideAllContent:function(){be.Display.terminalContent.style.display="none",be.Display.content.style.display="none",_e.a.unmountComponentAtNode(be.Display.content),be.Display.infiltrationContent.style.display="none",_e.a.unmountComponentAtNode(be.Display.infiltrationContent),be.Display.workInProgressContent.style.display="none",be.Display.redPillContent.style.display="none",be.Display.cinematicTextContent.style.display="none",be.Display.missionContent.style.display="none"},displayCharacterOverviewInfo:function(){_e.a.render(ge.a.createElement(m.a,null),document.getElementById("character-overview-text"));const e=document.getElementById("character-overview-save-button");q.a.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},idleTimer:function(){const e=(new Date).getTime();let t=e-be._lastUpdate;const a=t%be._idleSpeed;t=Math.floor(t/be._idleSpeed),t>0&&(be._lastUpdate=e-a,B.a.lastUpdate=e-a,be.updateGame(t)),window.requestAnimationFrame(be.idleTimer)},updateGame:function(e=1){const t=e*be._idleSpeed;null==B.a.totalPlaytime&&(B.a.totalPlaytime=0),null==B.a.playtimeSinceLastAug&&(B.a.playtimeSinceLastAug=0),null==B.a.playtimeSinceLastBitnode&&(B.a.playtimeSinceLastBitnode=0),B.a.totalPlaytime+=t,B.a.playtimeSinceLastAug+=t,B.a.playtimeSinceLastBitnode+=t,!0===J.a.actionStarted&&(be._totalActionTime=J.a.actionTime,be._actionTimeLeft=J.a.actionTime,be._actionInProgress=!0,be._actionProgressBarCount=1,be._actionProgressStr="[ ]",be._actionTimeStr="Time left: ",J.a.actionStarted=!1),B.a.isWorking&&(B.a.workType==g.a.WorkTypeFaction?B.a.workForFaction(e):B.a.workType==g.a.WorkTypeCreateProgram?B.a.createProgramWork(e):B.a.workType==g.a.WorkTypeStudyClass?B.a.takeClass(e):B.a.workType==g.a.WorkTypeCrime?B.a.commitCrime(e):B.a.workType==g.a.WorkTypeCompanyPartTime?B.a.workPartTime(e):B.a.work(e)),B.a.hasWseAccount&&Object(Y.j)(e),B.a.inGang()&&B.a.gang.process(e,B.a),I.c&&I.b&&I.b.process(e),B.a.corporation instanceof f.a&&B.a.corporation.storeCycles(e),B.a.bladeburner instanceof u.a&&B.a.bladeburner.storeCycles(e);for(let t=0;t<B.a.sleeves.length;++t)if(B.a.sleeves[t]instanceof Q.a){const a=B.a.sleeves[t].process(B.a,e);if(null==a)continue;for(let n=0;n<B.a.sleeves.length;++n)n!==t&&B.a.sleeves[n].gainExperience(B.a,a,e,!0)}be.decrementAllCounters(e),be.checkCounters(),1==be._actionInProgress&&be.updateHackProgress(e),Object(L.f)(e),Object(M.i)(B.a,e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,augmentationsNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:5,messages:150,mechanicProcess:5,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in be.Counters)be.Counters.hasOwnProperty(t)&&(be.Counters[t]=be.Counters[t]-e)},checkCounters:function(){if(be.Counters.autoSaveCounter<=0&&(null==q.a.AutosaveInterval&&(q.a.AutosaveInterval=60),0===q.a.AutosaveInterval?be.Counters.autoSaveCounter=1/0:(be.Counters.autoSaveCounter=5*q.a.AutosaveInterval,G.b.saveGame(be.indexedDb))),be.Counters.updateSkillLevelsCounter<=0&&(B.a.updateSkillLevels(),be.Counters.updateSkillLevelsCounter=10),be.Counters.updateDisplays<=0&&(be.displayCharacterOverviewInfo(),be.Counters.updateDisplays=3),be.Counters.passiveFactionGrowth<=0){var e=Math.floor(5-be.Counters.passiveFactionGrowth);Object(_.e)(e),be.Counters.passiveFactionGrowth=5}if(be.Counters.messages<=0&&(Object(D.b)(),r.a[l.a.TheRedPill].owned?be.Counters.messages=4500:be.Counters.messages=150),be.Counters.mechanicProcess<=0){if(B.a.corporation instanceof f.a&&B.a.corporation.process(B.a),B.a.bladeburner instanceof u.a)try{B.a.bladeburner.process(B.a)}catch(e){Object(he.a)("Exception caught in Bladeburner.process(): "+e)}be.Counters.mechanicProcess=5}be.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(p.b)(),be.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*be._idleSpeed;be._actionTimeLeft-=t/1e3,be._actionTimeLeft=Math.max(be._actionTimeLeft,0);for(var a=Math.round(100*(1-be._actionTimeLeft/be._totalActionTime));2*be._actionProgressBarCount<=a;)be._actionProgressStr=Object(n.f)(be._actionProgressStr,be._actionProgressBarCount,"|"),be._actionProgressBarCount+=1;be._actionTimeStr="Time left: "+Math.max(0,Math.round(be._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=be._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=be._actionProgressStr.replace(/ /g,"&nbsp;"),a>=100&&(be._actionInProgress=!1,J.a.finishAction())},toggleMainMenuHeader:function(e,t,a){for(var n=0;n<t.length;++n)e?(t[n].style.opacity=1,t[n].style.maxHeight=t[n].scrollHeight+"px"):(t[n].style.opacity=0,t[n].style.maxHeight=null);for(n=0;n<a.length;++n)e?(a[n].style.opacity=1,a[n].style.maxHeight=a[n].scrollHeight+"px",a[n].style.pointerEvents="auto"):(a[n].style.opacity=0,a[n].style.maxHeight=null,a[n].style.pointerEvents="none")},load:function(e){if(Object(G.a)(e)){Object(c.b)(B.a),be.setDisplayElements(),be.init(),Object($.b)(B.a),Object(i.c)(),B.a.reapplyAllSourceFiles(),B.a.hasWseAccount&&Object(Y.g)(),be._lastUpdate=(new Date).getTime();const e=B.a.lastUpdate,r=be._lastUpdate-e,o=Math.floor(r/be._idleSpeed);let s=0;const l=B.a.moneySourceA.hacking/B.a.playtimeSinceLastAug*r*.75;if(B.a.gainMoney(l),Object(L.b)(),B.a.isWorking)B.a.focus=!0,B.a.workType==g.a.WorkTypeFaction?B.a.workForFaction(o):B.a.workType==g.a.WorkTypeCreateProgram?B.a.createProgramWork(o):B.a.workType==g.a.WorkTypeStudyClass?B.a.takeClass(o):B.a.workType==g.a.WorkTypeCrime?B.a.commitCrime(o):B.a.workType==g.a.WorkTypeCompanyPartTime?B.a.workPartTime(o):B.a.work(o);else for(let e=0;e<B.a.factions.length;e++){const t=B.a.factions[e];if(!y.a.hasOwnProperty(t))continue;const a=y.a[t];if(!a.isMember)continue;if(!a.getInfo().offersWork())continue;if(B.a.getGangName()===t)continue;const n=Object(T.c)(B.a,a),r=Object(T.b)(B.a,a),i=Object(T.a)(B.a,a),l=Math.max(n,r,i)/B.a.factions.length*o;a.playerReputation+=l,s+=l}var t=Object(M.i)(B.a,o);const m=Object(M.g)(B.a)?ge.a.createElement(ge.a.Fragment,null,Object(re.a)(t)," hashes"):ge.a.createElement(ne.a,{money:t});Object(_.e)(o),B.a.hasWseAccount&&Object(Y.j)(o),B.a.inGang()&&B.a.gang.process(o,B.a),B.a.corporation instanceof f.a&&B.a.corporation.storeCycles(o),B.a.bladeburner instanceof u.a&&B.a.bladeburner.storeCycles(o);for(let e=0;e<B.a.sleeves.length;++e)if(B.a.sleeves[e]instanceof Q.a){const t=B.a.sleeves[e].process(B.a,o);if(null==t)continue;for(let a=0;a<B.a.sleeves.length;++a)a!==e&&B.a.sleeves[a].gainExperience(B.a,t,o,!0)}var a=o*be._idleSpeed;null==B.a.totalPlaytime&&(B.a.totalPlaytime=0),null==B.a.playtimeSinceLastAug&&(B.a.playtimeSinceLastAug=0),null==B.a.playtimeSinceLastBitnode&&(B.a.playtimeSinceLastBitnode=0),B.a.totalPlaytime+=a,B.a.playtimeSinceLastAug+=a,B.a.playtimeSinceLastBitnode+=a,B.a.lastUpdate=be._lastUpdate,be.start(),Object(pe.a)();const h=Object(n.b)(a);Object(ue.a)(ge.a.createElement(ge.a.Fragment,null,"Offline for ",h,". While you were offline, your scripts generated"," ",ge.a.createElement(ne.a,{money:l}),", your Hacknet Nodes generated ",m," and you gained"," ",Object(ie.a)(s)," divided amongst your factions."))}else Object(c.b)(B.a),Object(z.c)(),be.setDisplayElements(),be.start(),B.a.init(),Object(K.d)(B.a.getHomeComputer()),Object(d.b)(),Object(y.c)(),Object(i.c)(),Object(D.c)(),Object($.b)(B.a),Object(A.c)(),Object(pe.a)();_e.a.render(ge.a.createElement(k.a,{engine:this,player:B.a}),document.getElementById("sidebar")),Object(ae.a)(),J.a.resetTerminalInput()},setDisplayElements:function(){be.Display.content=document.getElementById("generic-react-container"),be.Display.content.style.display="none",be.Display.terminalContent=document.getElementById("terminal-container"),te.b.navigateTo(te.a.Terminal),be.Display.missionContent=document.getElementById("mission-container"),be.Display.missionContent.style.display="none",be.Display.workInProgressContent=document.getElementById("work-in-progress-container"),be.Display.workInProgressContent.style.display="none",be.Display.redPillContent=document.getElementById("red-pill-container"),be.Display.redPillContent.style.display="none",be.Display.infiltrationContent=document.getElementById("infiltration-container"),be.Display.infiltrationContent.style.display="none",be.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),be.Display.cinematicTextContent.style.display="none"},init:function(){if(document.getElementById("import-game-link").onclick=function(){G.b.importGame()},be.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),be.Clickables.saveMainMenuButton.addEventListener("click",(function(){return G.b.saveGame(be.indexedDb),!1})),be.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),be.Clickables.deleteMainMenuButton.addEventListener("click",(function(){return G.b.deleteGame(be.indexedDb),!1})),document.getElementById("export-game-link").addEventListener("click",(function(){return G.b.exportGame(),!1})),document.getElementById("character-overview-save-button").addEventListener("click",(function(){return G.b.saveGame(be.indexedDb),!1})),document.getElementById("character-overview-options-button").addEventListener("click",(function(){return Object(me.b)(),!1})),Object(J.b)(),B.a.isWorking){document.getElementById("work-in-progress-cancel-button").addEventListener("click",(function(){B.a.workType==g.a.WorkTypeFaction?B.a.finishFactionWork(!0):B.a.workType==g.a.WorkTypeCreateProgram?B.a.finishCreateProgramWork(!0):B.a.workType==g.a.WorkTypeStudyClass?B.a.finishClass():B.a.workType==g.a.WorkTypeCrime?B.a.finishCrime(!0):B.a.workType==g.a.WorkTypeCompanyPartTime?B.a.finishWorkPartTime():B.a.finishWork(!0)}));const e=document.getElementById("work-in-progress-something-else-button");e.style.visibility="hidden";[g.a.WorkTypeFaction,g.a.WorkTypeCompanyPartTime,g.a.WorkTypeCompany].includes(B.a.workType)&&(e.style.visibility="visible",e.addEventListener("click",(function(){B.a.stopFocusing()}))),be.loadWorkInProgressContent()}document.getElementById("character-overview-container").style.display="block",document.getElementById("copy-save-to-clipboard-link").addEventListener("click",(function(){const e=G.b.getSaveString();if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){Object(Z.a)("Copied save to clipboard")}),(function(e){console.error(e),console.error("Unable to copy save data to clipboard using Async API"),Object(Z.a)("Failed to copy save")}));else{const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.left="-9999px",document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")?Object(Z.a)("Copied save to clipboard"):Object(Z.a)("Failed to copy save")}catch(e){console.error("Unable to copy save data to clipboard using document.execCommand('copy')"),Object(Z.a)("Failed to copy save")}document.body.removeChild(t)}})),document.getElementById("debug-delete-scripts-link").addEventListener("click",(function(){for(const e of Object.keys(K.b))K.b[e].runningScripts=[];Object(ue.a)("Forcefully deleted all running scripts. Please save and refresh page."),Object(me.a)()})),document.getElementById("debug-soft-reset").addEventListener("click",(function(){Object(ue.a)("Soft Reset!"),Object(F.a)(),Object(me.a)()})),document.getElementById("debug-files").addEventListener("click",(function(){Object(ce.a)("debug-files-diagnostic-popup",le.a,{})}))},start:function(){be.idleTimer()}};var Ee;window.onload=function(){if(!window.indexedDB)return be.load(null);(Ee=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.error("Error opening indexedDB: "),console.error(e),be.load(null)},Ee.onsuccess=function(e){be.indexedDb=e.target.result;var t=be.indexedDb.transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.error("Error in Database request to get savestring: "+e),be.load(null)},t.onsuccess=function(){be.load(t.result)}},Ee.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,a(184))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(105);const r={AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1},i={AutosaveInterval:r.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:r.DisableASCIIArt,DisableHotkeys:r.DisableHotkeys,DisableTextEffects:r.DisableTextEffects,Locale:"en",MaxLogCapacity:r.MaxLogCapacity,MaxPortCapacity:r.MaxPortCapacity,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,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 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:.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,"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,"h",(function(){return h})),a.d(t,"e",(function(){return p})),a.d(t,"g",(function(){return d})),a.d(t,"f",(function(){return f})),a.d(t,"a",(function(){return g})),a.d(t,"b",(function(){return y})),a.d(t,"c",(function(){return _})),a.d(t,"d",(function(){return b}));var n=a(22),r=a(122),i=a(289),o=a(5),s=a(4),l=a(38),c=a(37),u=a(354),m=a(290);function h(e){if(null!=e.ip&&Object(n.e)(e.ip)&&(e.ip=Object(n.c)()),null!=g(e.hostname)){let t=e.hostname;for(let a=0;a<200&&(t=`${e.hostname}-${a}`,null!=g(t));++a);e.hostname=t}return new r.a(e)}function p(e,t,a){let n=1+(s.a.ServerBaseGrowthRate-1)/e.hackDifficulty;n>s.a.ServerMaxGrowthRate&&(n=s.a.ServerMaxGrowthRate);const r=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*a.hacking_grow_mult*r*o.a.ServerGrowthRate)}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*=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=p(e,e.moneyAvailable/o,a);t=Math.max(0,t),e.fortify(2*s.a.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/o}function f(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 g(e){for(const t in n.b)if(n.b.hasOwnProperty(t)&&n.b[t].hostname==e)return n.b[t];return null}function y(e){return Object(m.a)(e)?void 0!==n.b[e]?n.b[e]:null:g(e)}function _(e,t){return t>e.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):n.b[e.serversOnNetwork[t]]}function b(e){return"backdoorInstalled"in e&&e.backdoorInstalled}},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.Terminal="Terminal",e.CharacterInfo="CharacterInfo",e.ScriptEditor="ScriptEditor",e.ActiveScripts="ActiveScripts",e.HacknetNodes="HacknetNodes",e.CreateProgram="CreateProgram",e.Factions="Factions",e.Faction="Faction",e.Augmentations="Augmentations",e.Milestones="Milestones",e.Tutorial="Tutorial",e.DevMenu="Dev Menu",e.Location="Location",e.workInProgress="WorkInProgress",e.RedPill="RedPill",e.CinematicText="CinematicText",e.Infiltration="Infiltration",e.StockMarket="StockMarket",e.Gang="Gang",e.Mission="Mission",e.Corporation="Corporation",e.Bladeburner="Bladeburner",e.Sleeves="Sleeves",e.Resleeves="Re-sleeving"}(n||(n={}));const r=new class{constructor(){var e,t,a;a=null,(t="currentPage")in(e=this)?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}isOn(e){return this.currentPage===e}navigateTo(e){this.currentPage=e}}},,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 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(71),o=a(74);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";a.d(t,"a",(function(){return n}));const n={CityNames:["Aevum","Chongqing","Sector-12","New Tokyo","Ishima","Volhaven"],CyclesPerSecond:5,StaminaGainPerSecond:.0085,BaseStaminaLoss:.285,MaxStaminaToGainFactor:7e4,DifficultyToTimeFactor:10,DiffMultExponentialFactor:.28,DiffMultLinearFactor:650,EffAgiLinearFactor:1e4,EffDexLinearFactor:1e4,EffAgiExponentialFactor:.04,EffDexExponentialFactor:.035,BaseRecruitmentTimeNeeded:300,PopulationThreshold:1e9,PopulationExponent:.7,ChaosThreshold:50,BaseStatGain:1,BaseIntGain:.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,"a",(function(){return i}));var n=a(436),r=a(437);const i={};for(const e of r.a)i[e.key]=new n.a(e.name,e.create)},function(e,t,a){"use strict";a.d(t,"g",(function(){return g})),a.d(t,"l",(function(){return y})),a.d(t,"h",(function(){return _})),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 C})),a.d(t,"c",(function(){return O})),a.d(t,"n",(function(){return w})),a.d(t,"o",(function(){return S})),a.d(t,"k",(function(){return T})),a.d(t,"j",(function(){return x})),a.d(t,"i",(function(){return M})),a.d(t,"p",(function(){return A})),a.d(t,"m",(function(){return R}));var n=a(178),r=a(145),i=a(127),o=a(24),s=a(72),l=a(202),c=a(155),u=a(203),m=a(42),h=a(22),p=a(30),d=a(122),f=a(43);function g(e){return 9===e.bitNodeN||f.a[9]>0}function y(e){if(m.a.isRunning){if(m.a.currStep!==m.d.HacknetNodesIntroduction)return-1;Object(m.b)()}const t=e.hacknetNodes.length;if(g(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(),A(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 _(e){return g(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 C(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 O(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 w(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 w(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 T(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 T(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 x(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 x(e,t,Math.max(0,o.b.MaxCache-t.cache))}return!!e.canAfford(r)&&(e.loseMoney(r),t.upgradeCache(n),!0)}function M(e,t){return 0===e.hacknetNodes.length?0:g(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=h.b[i];if(o instanceof d.a)throw new Error("player nodes shoud not be Server");o.updateHashRate(e.hacknet_node_money_mult);const s=o.process(t);o.totalHashesGenerated+=s,a+=s}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+=P(e,t,r)}return a}(e,t):0}function P(e,t,a){const n=a.process(t);return e.gainMoney(n),e.recordMoneySource(n,"hacknetnode"),n}function A(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=h.b[i];if(!(o instanceof s.a))return void e.hashManager.updateCapacity(0);a+=o.hashCapacity}e.hashManager.updateCapacity(a)}function R(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":try{e.corporation.funds=e.corporation.funds.plus(n.value)}catch(a){return e.hashManager.refundUpgrade(t),!1}break;case"Reduce Minimum Security":try{const e=Object(p.a)(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(p.a)(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":try{for(const t of e.corporation.divisions)t.sciResearch.qty+=n.value}catch(a){return e.hashManager.refundUpgrade(t),!1}break;case"Exchange for Bladeburner Rank":try{e.bladeburner.changeRank(e,n.value)}catch(a){return e.hashManager.refundUpgrade(t),!1}break;case"Exchange for Bladeburner SP":try{e.bladeburner.skillPoints+=n.value}catch(a){return e.hashManager.refundUpgrade(t),!1}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(433),r=a(136),i=a(12);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,"d",(function(){return h})),a.d(t,"c",(function(){return d})),a.d(t,"b",(function(){return g})),a.d(t,"a",(function(){return p}));var n=a(26),r=a(1),i=a(27),o=(a(58),a(37)),s=(a(98),a(68)),l=a(67),c=a(193),u=a(104);const m=["Start","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End"],h={};for(let e=0;e<m.length;++e)h[m[e]]=e;const p={currStep:0,isRunning:!1,stepIsDone:{}};function d(){p.stepIsDone={};for(let e=0;e<m.length;++e)p.stepIsDone[e]=!1;n.Engine.loadTerminalContent(),n.Engine.Counters.autoSaveCounter=1/0,p.currStep=0,p.isRunning=!0,document.getElementById("interactive-tutorial-container").style.display="block";Object(s.a)("interactive-tutorial-exit").addEventListener("click",(function(){return y(),!1}));Object(s.a)("interactive-tutorial-back").addEventListener("click",(function(){return function(){p.currStep>h.Start&&(p.currStep-=1);f()}(),!1}));Object(s.a)("interactive-tutorial-next").addEventListener("click",(function(){return g(),!1})),f()}function f(){if(!p.isRunning)return;const e=document.getElementById("interactive-tutorial-next");switch(p.currStep){case h.Start:n.Engine.loadTerminalContent(),b("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...<br><br>This tutorial will show you the basics of the game. You may skip the tutorial at any time."),e.style.display="inline-block";break;case h.GoToCharacterPage:n.Engine.loadTerminalContent(),b("Let's start by heading to the Stats page. Click the <code class='interactive-tutorial-tab flashing-button'>Stats</code> tab on the main navigation menu (left-hand side of the screen)"),e.style.display="none";break;case h.CharacterPage:n.Engine.loadCharacterContent(),b("The <code class='interactive-tutorial-tab'>Stats</code> page shows a lot of important information about your progress, such as your skills, money, and bonuses. "),e.style.display="inline-block";break;case h.CharacterGoToTerminalPage:n.Engine.loadCharacterContent(),b("Let's head to your computer's terminal by clicking the <code class='interactive-tutorial-tab flashing-button'>Terminal</code> tab on the main navigation menu."),e.style.display="none";break;case h.TerminalIntro:n.Engine.loadTerminalContent(),b("The <code class='interactive-tutorial-tab'>Terminal</code> is used to interface with your home computer as well as all of the other machines around the world."),e.style.display="inline-block";break;case h.TerminalHelp:n.Engine.loadTerminalContent(),b("Let's try it out. Start by entering the <code class='interactive-tutorial-command'>help</code> command into the <code class='interactive-tutorial-tab'>Terminal</code> (Don't forget to press Enter after typing the command)"),e.style.display="none";break;case h.TerminalLs:n.Engine.loadTerminalContent(),b("The <code class='interactive-tutorial-command'>help</code> command displays a list of all available <code class='interactive-tutorial-tab'>Terminal</code> commands, how to use them, and a description of what they do. <br><br>Let's try another command. Enter the <code class='interactive-tutorial-command'>ls</code> command."),e.style.display="none";break;case h.TerminalScan:n.Engine.loadTerminalContent(),b(" <code class='interactive-tutorial-command'>ls</code> is a basic command that shows files on the computer. Right now, it shows that you have a program called <code class='interactive-tutorial-command'>NUKE.exe</code> on your computer. We'll get to what this does later. <br><br>Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the <code class='interactive-tutorial-command'>scan</code> command."),e.style.display="none";break;case h.TerminalScanAnalyze1:n.Engine.loadTerminalContent(),b("The <code class='interactive-tutorial-command'>scan</code> command shows all available network connections. In other words, it displays a list of all servers that can be connected to from your current machine. A server is identified by its hostname. <br><br> That's great and all, but there's so many servers. Which one should you go to? The <code class='interactive-tutorial-command'>scan-analyze</code> command gives some more detailed information about servers on the network. Try it now!"),e.style.display="none";break;case h.TerminalScanAnalyze2:n.Engine.loadTerminalContent(),b("You just ran <code class='interactive-tutorial-command'>scan-analyze</code> with a depth of one. This command shows more detailed information about each server that you can connect to (servers that are a distance of one node away). <br><br> It is also possible to run <code class='interactive-tutorial-command'>scan-analyze</code> with a higher depth. Let's try a depth of two with the following command: <code class='interactive-tutorial-command'>scan-analyze 2</code>."),e.style.display="none";break;case h.TerminalConnect:n.Engine.loadTerminalContent(),b("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the <code class='interactive-tutorial-command'>connect [hostname]</code> command.<br><br>From the results of the <code class='interactive-tutorial-command'>scan-analyze</code> command, we can see that the <code class='interactive-tutorial-command'>n00dles</code> server is only one node away. Let's connect so it now using: <code class='interactive-tutorial-command'>connect n00dles</code>"),e.style.display="none";break;case h.TerminalAnalyze:n.Engine.loadTerminalContent(),b("You are now connected to another machine! What can you do now? You can hack it!<br><br> In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain experience. <br><br> Before you try to hack a server, you should run diagnostics using the <code class='interactive-tutorial-command'>analyze</code> command."),e.style.display="none";break;case h.TerminalNuke:n.Engine.loadTerminalContent(),b("When the <code class='interactive-tutorial-command'>analyze</code> command finishes running it will show useful information about hacking the server. <br><br> For this server, the required hacking skill is only <span class='character-hack-cell'>1</span>, which means you can hack it right now. However, in order to hack a server you must first gain root access. The <code class='interactive-tutorial-command'>NUKE.exe</code> program that we saw earlier on your home computer is a virus that will grant you root access to a machine if there are enough open ports.<br><br> The <code class='interactive-tutorial-command'>analyze</code> results shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead and run the virus using the <code class='interactive-tutorial-command'>run NUKE.exe</code> command."),e.style.display="none";break;case h.TerminalManualHack:n.Engine.loadTerminalContent(),b("You now have root access! You can hack the server using the <code class='interactive-tutorial-command'>hack</code> command. Try doing that now."),e.style.display="none";break;case h.TerminalHackingMechanics:n.Engine.loadTerminalContent(),b("You are now attempting to hack the server. Performing a hack takes time and only has a certain percentage chance of success. This time and success chance is determined by a variety of factors, including your hacking skill and the server's security level.<br><br>If your attempt to hack the server is successful, you will steal a certain percentage of the server's total money. This percentage is affected by your hacking skill and the server's security level.<br><br>The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking."),e.style.display="inline-block";break;case h.TerminalCreateScript:n.Engine.loadTerminalContent(),b("Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be hacking manually the entire time. You can automate your hacking by writing scripts!<br><br>To create a new script or edit an existing one, you can use the <code class='interactive-tutorial-command'>nano</code> command. Scripts must end with the <code class='interactive-tutorial-command'>.script</code> extension. Let's make a script now by entering <code class='interactive-tutorial-command'>nano n00dles.script</code> after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),e.style.display="none";break;case h.TerminalTypeScript:n.Engine.loadScriptEditorContent("n00dles.script",""),b("This is the script editor. You can use it to program your scripts. Scripts are written in a simplified version of javascript. Copy and paste the following code into the script editor: <br><br><pre class='interactive-tutorial-code'>while(true) {\n hack('n00dles');\n}</pre>For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the <code class='interactive-tutorial-command'>n00dles</code> server.<br><br>To save and close the script editor, press the button in the bottom left, or press ctrl + b."),e.style.display="none";break;case h.TerminalFree:n.Engine.loadTerminalContent(),b("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.<br><br>To check how much RAM is available on this machine, enter the <code class='interactive-tutorial-command'>free</code> command."),e.style.display="none";break;case h.TerminalRunScript:n.Engine.loadTerminalContent(),b("We have 4GB of free RAM on this machine, which is enough to run our script. Let's run our script using <code class='interactive-tutorial-command'>run n00dles.script</code>."),e.style.display="none";break;case h.TerminalGoToActiveScriptsPage:n.Engine.loadTerminalContent(),b("Your script is now running! It will continuously run in the background and will automatically stop if the code ever completes (the <code class='interactive-tutorial-command'>n00dles.script</code> will never complete because it runs an infinite loop). <br><br>These scripts can passively earn you income and hacking experience. Your scripts will also earn money and experience while you are offline, although at a slightly slower rate. <br><br> Let's check out some statistics for our running scripts by clicking the <code class='interactive-tutorial-tab flashing-button'>Active Scripts</code> link in the main navigation menu."),e.style.display="none";break;case h.ActiveScriptsPage:n.Engine.loadActiveScriptsContent(),b("This page displays information about all of your scripts that are running across every server. You can use this to gauge how well your scripts are doing. Let's go back to the <code class='interactive-tutorial-tab flashing-button'>Terminal</code>"),e.style.display="none";break;case h.ActiveScriptsToTerminal:n.Engine.loadTerminalContent(),b("One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the <code class='interactive-tutorial-command'>tail</code> command. Do that now for the script we just ran by typing <code class='interactive-tutorial-command'>tail n00dles.script</code>"),e.style.display="none";break;case h.TerminalTailScript:n.Engine.loadTerminalContent(),b("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes! <br><br>This covers the basics of hacking. To learn more about writing scripts, select the <code class='interactive-tutorial-tab'>Tutorial</code> link in the main navigation menu to look at the documentation. <strong style='background-color:#444;'>If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0, it's faster and more powerful.</strong><br><br>For now, let's move on to something else!"),e.style.display="inline-block";break;case h.GoToHacknetNodesPage:n.Engine.loadTerminalContent(),b("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the <code class='interactive-tutorial-tab flashing-button'>Hacknet</code> page through the main navigation menu now."),e.style.display="none";break;case h.HacknetNodesIntroduction:n.Engine.loadHacknetNodesContent(),b("here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),e.style.display="none";break;case h.HacknetNodesGoToWorldPage:n.Engine.loadHacknetNodesContent(),b("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.<br><br>Let's go to the <code class='interactive-tutorial-tab flashing-button'>City</code> page through the main navigation menu."),e.style.display="none";break;case h.WorldDescription:n.Engine.loadLocationContent(),b("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!<br><br>Lastly, click on the <code class='interactive-tutorial-tab flashing-button'>Tutorial</code> link in the main navigation menu."),e.style.display="none";break;case h.TutorialPageInfo:n.Engine.loadTutorialContent(),b("This page contains a lot of different documentation about the game's content and mechanics. <strong style='background-color:#444;'> I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing</strong>. That's the end of the tutorial. Hope you enjoy the game!"),e.style.display="inline-block",e.innerHTML="Finish Tutorial";break;case h.End:y();break;default:throw new Error("Invalid tutorial step")}!0===p.stepIsDone[p.currStep]&&(e.style.display="inline-block")}function g(){p.stepIsDone[p.currStep]=!0,p.currStep<h.End&&(p.currStep+=1),f()}function y(){0===i.a.AutosaveInterval?n.Engine.Counters.autoSaveCounter=1/0:n.Engine.Counters.autoSaveCounter=5*i.a.AutosaveInterval,n.Engine.init(),p.currStep=h.End,p.isRunning=!1,document.getElementById("interactive-tutorial-container").style.display="none";const e="interactive-tutorial-ending-popup",t=Object(l.a)("p",{innerHTML:"If you are new to the game, the following links may be useful for you!<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html' target='_blank'>Getting Started Guide</a><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/' target='_blank'>Documentation</a><br><br>The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. To read it, go to Terminal and enter<br><br>cat "+o.a.HackersStartingHandbook}),a=Object(l.a)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(u.a)(e)}});Object(c.a)(e,[t,a]),r.a.getHomeComputer().messages.push(o.a.HackersStartingHandbook)}let _=null;function b(e){_.innerHTML=e,_.parentElement.scrollTop=0}document.addEventListener("DOMContentLoaded",(function e(){_=document.getElementById("interactive-tutorial-text"),document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));var n=a(4);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";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o})),a.d(t,"e",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return c}));var n=a(12);const r={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};class i{addIp(e,t){this[e]=t}getIp(e){return this[e]}toJSON(){return Object(n.b)("SpecialServerIpsMap",this)}static fromJSON(e){return Object(n.a)(i,e.data)}}n.c.constructors.SpecialServerIpsMap=i;let o=new i;function s(){for(const e in o)delete o[e];o=new i}function l(e){o=JSON.parse(e,n.c)}function c(){o=new i}},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__(35),_Industry__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(464),_data_Constants__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(28),_OfficeSpace__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(204),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(219),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(124),_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(81),_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(29),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(205),_ResearchMap__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(169);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";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 u})),a.d(t,"d",(function(){return m})),a.d(t,"c",(function(){return h})),a.d(t,"b",(function(){return p})),a.d(t,"e",(function(){return _})),a.d(t,"i",(function(){return b})),a.d(t,"h",(function(){return E})),a.d(t,"g",(function(){return v})),a.d(t,"f",(function(){return k}));var n=a(68),r=a(56),i=a(34);let o=!1;const s=document.getElementById("yes-no-box-container"),l=document.getElementById("yes-no-box-text");function c(e){if(e.keyCode===r.a.ESC)u();else if(e.keyCode===r.a.ENTER){const e=document.getElementById("yes-no-box-yes");e?e.click():console.error("Could not find YesNoBox Yes button DOM element")}}function u(){return s?s.style.display="none":console.error("Container not found for YesNoBox"),o=!1,document.removeEventListener("keydown",c),!1}function m(){return Object(n.a)("yes-no-box-yes")}function h(){return Object(n.a)("yes-no-box-no")}function p(e){return!o&&(o=!0,l?(i.unmountComponentAtNode(l),l.innerHTML="","string"==typeof e?l.innerHTML=e:i.render(e,l)):console.error("Text element not found for YesNoBox"),s?s.style.display="flex":console.error("Container not found for YesNoBox"),document.addEventListener("keydown",c),!0)}const d=document.getElementById("yes-no-text-input-box-container"),f=document.getElementById("yes-no-text-input-box-input"),g=document.getElementById("yes-no-text-input-box-text");function y(e){if(e.keyCode===r.a.ESC)_();else if(e.keyCode===r.a.ENTER){const e=document.getElementById("yes-no-text-input-box-yes");e?e.click():console.error("Could not find YesNoTxtInputBox Yes button DOM element")}}function _(){if(null==d)return console.error("Container not found for YesNoTextInputBox"),!1;if(d.style.display="none",!f)throw new Error("yesNoTextInputBoxInput was not set");return o=!1,f.value="",document.removeEventListener("keydown",y),!1}function b(){const e=Object(n.a)("yes-no-text-input-box-yes");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-yes'");return e}function E(){const e=Object(n.a)("yes-no-text-input-box-no");if(null===e)throw new Error("Could not find element with id: 'yes-no-text-input-box-no'");return e}function v(){if(!f)return console.error("Could not find YesNoTextInputBox input element"),"";let e=f.value;return e=e.replace(/\s+/g,""),e}function k(e){if(o=!0,g&&(i.unmountComponentAtNode(g),g.innerHTML="","string"==typeof e?g.innerHTML=e:i.render(e,g)),d?d.style.display="flex":console.error("Container not found for YesNoTextInputBox"),document.addEventListener("keydown",y),!f)throw new Error("yesNoTextInputBoxInput was not set");f.focus()}},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(12);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(120),r=a(4);const i={Shoplift:new n.a("Shoplift",r.a.CrimeShoplift,2e3,15e3,.05,.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,.2,.5,{hacking_exp:30,dexterity_exp:45,agility_exp:45,hacking_success_weight:.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,.2,.25,{strength_exp:3,defense_exp:3,dexterity_exp:3,agility_exp:3,strength_success_weight:1.5,defense_success_weight:.5,dexterity_success_weight:1.5,agility_success_weight:.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:.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,.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,.5,.1,{hacking_exp:100,dexterity_exp:150,charisma_exp:15,hacking_success_weight:.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:.5,agility_success_weight:.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 n}));const n={ENABLE_BASH_HOTKEYS:!1,ENABLE_TIMESTAMPS:!1,MAIN_MENU_STYLE:"default",THEME_BACKGROUND_COLOR:"#000000",THEME_FONT_COLOR:"#66ff33",THEME_HIGHLIGHT_COLOR:"#ffffff",THEME_PROMPT_COLOR:"#f92672",WRAP_INPUT:!1}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(453),r=a(192);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 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,"a",(function(){return r}));var n=a(6);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,"a",(function(){return r}));a(68);const n=(()=>{const e=document.createElement("div");if(null===e)throw new Error("unable to create empty div element");return e})(),r={Terminal:n,ScriptEditor:n,ActiveScripts:n,CreateProgram:n,Stats:n,Factions:n,Augmentations:n,HacknetNodes:n,Sleeves:n,City:n,Travel:n,Job:n,StockMarket:n,Bladeburner:n,Corporation:n,Gang:n,Milestones:n,Tutorial:n,Options:n,DevMenu:n}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k})),a.d(t,"b",(function(){return C})),a.d(t,"i",(function(){return O})),a.d(t,"c",(function(){return w})),a.d(t,"h",(function(){return S})),a.d(t,"d",(function(){return T})),a.d(t,"f",(function(){return x})),a.d(t,"g",(function(){return M})),a.d(t,"j",(function(){return A})),a.d(t,"e",(function(){return I}));var n=a(117),r=a(356),i=a(183),o=a(80),s=a(318),l=a(477),c=a(64),u=a(45),m=a(57),h=a(478),p=a(4),d=a(1),f=a(236),g=a(31),y=a(2),_=a(8),b=a(12),E=a(0),v=a(34);let k={};const C={};function O(e,t,a,n,s,l=null){if(!(e instanceof o.a))return l?l.log("placeOrder",`Invalid stock: '${e}'`):Object(_.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(_.a)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const c=new r.a(e.symbol,t,a,n,s);if(null==k.Orders){const e={};for(const t in k){const a=k[t];a instanceof o.a&&(e[a.symbol]=[])}k.Orders=e}k.Orders[e.symbol].push(c);const u={rerenderFn:I,stockMarket:k,symbolToStockMap:C};return Object(i.a)(e,c.type,c.pos,u),I(),!0}function w(e,t=null){if(null==k.Orders)return!1;if(e.order&&e.order instanceof r.a){const t=e.order,a=k.Orders[t.stockSymbol];for(let e=0;e<a.length;++e)if(t==a[e])return a.splice(e,1),I(),!0;return!1}if(e.stock&&e.shares&&e.price&&e.type&&e.pos&&e.stock instanceof o.a){const a=k.Orders[e.stock.symbol],n=e.stock.symbol+" - "+e.shares+" @ "+y.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),I(),t&&t.scriptRef.log("Successfully cancelled order: "+n),!0}return t&&t.scriptRef.log("Failed to cancel order: "+n),!1}return!1}function S(e){k=""===e?{}:JSON.parse(e,b.c)}function T(){k={}}function x(){for(const e in k)k.hasOwnProperty(e)&&delete k[e];for(const e of l.a){const t=e.name;k[t]=new o.a(e)}const e={};for(const t in k){const a=k[t];a instanceof o.a&&(e[a.symbol]=[])}k.Orders=e,k.storedCycles=0,k.lastUpdate=0,k.ticksUntilCycle=s.a}function M(){for(const e in m.a)if(m.a.hasOwnProperty(e)){const t=k[e];if(null==t){console.error("Could not find Stock for "+e);continue}const a=m.a[e];C[a]=t}}const P=6e3/p.a.MilliPerCycle;function A(e=1){if((null==k.storedCycles||isNaN(k.storedCycles))&&(k.storedCycles=0),k.storedCycles+=e,k.storedCycles<P)return;const t=(new Date).getTime();if(t-k.lastUpdate<4e3)return;k.lastUpdate=t,k.storedCycles-=P,null!=k.ticksUntilCycle&&"number"==typeof k.ticksUntilCycle||(k.ticksUntilCycle=s.a),--k.ticksUntilCycle,k.ticksUntilCycle<=0&&function(){for(const e in k){const t=k[e];if(!(t instanceof o.a))continue;Math.random()<.45&&(t.b=!t.b,t.flipForecastForecast()),k.ticksUntilCycle=s.a}}();const a=Math.random();for(const e in k){const t=k[e];if(!(t instanceof o.a))continue;let n=a*t.mv/100;isNaN(n)&&(n=.02);let r=50;r=t.b?(r+t.otlkMag)/100:(r-t.otlkMag)/100,t.price>=t.cap&&(r=.1,t.b=!1),isNaN(r)&&(r=.5);const s=Math.random(),l={rerenderFn:I,stockMarket:k,symbolToStockMap:C};s<r?(t.changePrice(t.price*(1+n)),Object(i.a)(t,c.a.LimitBuy,u.a.Short,l),Object(i.a)(t,c.a.LimitSell,u.a.Long,l),Object(i.a)(t,c.a.StopBuy,u.a.Long,l),Object(i.a)(t,c.a.StopSell,u.a.Short,l)):(t.changePrice(t.price/(1+n)),Object(i.a)(t,c.a.LimitBuy,u.a.Long,l),Object(i.a)(t,c.a.LimitSell,u.a.Short,l),Object(i.a)(t,c.a.StopBuy,u.a.Short,l),Object(i.a)(t,c.a.StopSell,u.a.Long,l));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)}I()}let R=null;function N(){x(),M()}document.addEventListener("DOMContentLoaded",(function e(){R=document.getElementById("generic-react-container"),document.removeEventListener("DOMContentLoaded",e)}));const D=new f.a;function I(){if(g.b.isOn(g.a.StockMarket)&&(D.emitEvent(),R instanceof HTMLElement)){const e=k;v.render(E.createElement(h.a,{buyStockLong:n.a,buyStockShort:n.d,cancelOrder:w,eventEmitterForReset:D,initStockMarket:N,p:d.a,placeOrder:O,sellStockLong:n.c,sellStockShort:n.b,stockMarket:e}),R)}}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(2);function i(e){return n.createElement("span",{className:"reputation samefont"},"number"==typeof e?r.a.formatReputation(e):e)}},function(e,t,a){"use strict";a.d(t,"d",(function(){return l})),a.d(t,"c",(function(){return c})),a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return m}));var n=a(457),r=a(12),i=a(20),o=a(458);class s{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 l={};for(const e of n.a)l[e.name]=new s(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);let c,u;!function(e){e[e.FactionReputation=0]="FactionReputation",e[e.FactionReputationAll=1]="FactionReputationAll",e[e.CompanyReputation=2]="CompanyReputation",e[e.Money=3]="Money"}(c||(c={})),function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.Cancelled=2]="Cancelled"}(u||(u={}));class m{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==l[t])throw new Error(`Error: invalid contract type: ${t} please contact developer`);this.type=t,this.data=l[t].generate(),this.reward=a}getData(){return this.data}getDescription(){return l[this.type].desc(this.data)}getDifficulty(){return l[this.type].difficulty}getMaxNumTries(){return l[this.type].numTries}getType(){return l[this.type].name}isSolution(e){return l[this.type].solver(this.data,e)}async prompt(){const e="coding-contract-prompt-popup-"+this.fn;return new Promise(t=>{Object(i.a)(e,o.a,{c:this,popupId:e,onClose:()=>{t(u.Cancelled),Object(i.b)(e)},onAttempt:a=>{console.error("attempting"),this.isSolution(a)?t(u.Success):t(u.Failure),Object(i.b)(e)}},()=>t(u.Cancelled))})}toJSON(){return Object(r.b)("CodingContract",this)}static fromJSON(e){return Object(r.a)(m,e.data)}}r.c.constructors.CodingContract=m},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"string"==typeof e||e instanceof String}a.d(t,"a",(function(){return n}))},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(5),r=a(217);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*.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";function n(e,t={}){const a=document.createElement(e);return void 0!==t.id&&(a.id=t.id),void 0!==t.class&&(a.className=t.class),void 0!==t.innerHTML&&(a.innerHTML=t.innerHTML),void 0!==t.innerText&&(a.innerText=t.innerText),void 0!==t.tabIndex&&(a.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(a,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder),void 0!==t.max&&(e.max=t.max),void 0!==t.min&&(e.min=t.min),void 0!==t.step&&(e.step=t.step)}(a,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(a,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.mouseDown&&e.addEventListener("mousedown",t.mouseDown),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onkeydown&&e.addEventListener("keydown",t.onkeydown),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(a,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.height&&(e.style.height=t.height),void 0!==t.top&&(e.style.top=t.top),void 0!==t.left&&(e.style.left=t.left),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position),void 0!==t.overflow&&(e.style.overflow=t.overflow)}(a,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(n("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(n("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall?(e.className+=" tooltip",e.appendChild(n("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall}))):void 0!==t.tooltiplow&&(e.className+="tooltip",e.appendChild(n("span",{class:"tooltiptextlow",innerHTML:t.tooltiplow})))}(a,t),a}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(121);function r(e){try{let t;t="string"==typeof e?Object(n.a)(e):e;const a=t.cloneNode(!0);return null!==t.parentNode&&t.parentNode.replaceChild(a,t),a}catch(e){return console.error(e),null}}},,function(e,t,a){"use strict";a.d(t,"d",(function(){return w})),a.d(t,"a",(function(){return T})),a.d(t,"g",(function(){return x})),a.d(t,"c",(function(){return M})),a.d(t,"f",(function(){return P})),a.d(t,"b",(function(){return A})),a.d(t,"e",(function(){return R}));var n=a(0),r=a.n(n),i=a(34),o=a.n(i),s=a(438),l=a(15),c=a(94),u=a(190),m=a(3),h=a(5),p=a(4),d=a(26),f=a(103),g=a(18),y=a(96),_=a(1),b=a(27),E=a(138),v=a(43),k=(a(31),a(8)),C=(a(456),a(10)),O=a(48);function w(e){if(e.isMember)return;e.isMember=!0,_.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const a=t.enemies[e];g.a[a]instanceof f.a&&(g.a[a].isBanned=!0)}for(var a=0;a<_.a.factionInvitations.length;++a)(_.a.factionInvitations[a]==e.name||g.a[_.a.factionInvitations[a]].isBanned)&&(_.a.factionInvitations.splice(a,1),a--)}function S(e){const t=new y.a(e.playerReputation,e);Object(y.d)(!0,t),t.init()}function T(e,t=!1){const a=g.a[e];if(null==a)throw new Error("Invalid factionName passed into displayFactionContent(): "+e);if(!a.isMember)throw new Error("Not a member of this faction. Cannot display faction information");o.a.render(r.a.createElement(s.a,{engine:d.Engine,initiallyOnAugmentationsPage:t,faction:a,p:_.a,startHackingMissionFn:S}),d.Engine.Display.content)}function x(e,t){const a=t.getInfo(),n=Object(O.d)();n.innerHTML="Purchase",n.addEventListener("click",(function(){!Object(c.e)(e)&&_.a.hasAugmentation(e)||(P(e,t),Object(O.a)())}));const i=Object(O.c)();i.innerHTML="Cancel",i.addEventListener("click",(function(){Object(O.a)()}));let o=r.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.info}});"string"!=typeof e.info&&(o=r.a.createElement("div",null,e.info)),Object(O.b)(r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,e.name),r.a.createElement("br",null),o,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",e.name," Augmentation for ",r.a.createElement(C.a,{money:e.baseCost*a.augmentationPriceMult}),"?"))}function M(e){let t=!0;if(e.prereqs&&e.prereqs.length>0)for(let a=0;a<e.prereqs.length;++a){const n=l.a[e.prereqs[a]];if(null!=n){if(!1===n.owned){t=!1;for(let e=0;e<_.a.queuedAugmentations.length;++e)if(_.a.queuedAugmentations[e].name===n.name){t=!0;break}}}else console.error("Invalid prereq Augmentation "+e.prereqs[a])}return t}function P(e,t,a=!1){const n=t.getInfo();if(M(e))if(0!==e.baseCost&&_.a.money.lt(e.baseCost*n.augmentationPriceMult)){let t="You don't have enough money to purchase "+e.name;if(a)return t;Object(k.a)(t)}else if(t.playerReputation<e.baseRepRequirement){let t="You don't have enough faction reputation to purchase "+e.name;if(a)return t;Object(k.a)(t)}else if(0===e.baseCost||_.a.money.gte(e.baseCost*n.augmentationPriceMult)){!1===_.a.firstAugPurchased&&(_.a.firstAugPurchased=!0,document.getElementById("augmentations-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var r=new u.a(e.name);if(e.name==m.a.NeuroFluxGovernor&&(r.level=A()),_.a.queuedAugmentations.push(r),_.a.loseMoney(e.baseCost*n.augmentationPriceMult),e.name==m.a.NeuroFluxGovernor){var i=A();--i;var o=Math.pow(p.a.NeuroFluxGovernorLevelMult,i);e.baseRepRequirement=500*o*h.a.AugmentationRepCost,e.baseCost=75e4*o*h.a.AugmentationMoneyCost;for(var s=0;s<_.a.queuedAugmentations.length-1;++s)e.baseCost*=p.a.MultipleAugMultiplier*[1,.96,.94,.93][v.a[11]]}for(var c in l.a)l.a.hasOwnProperty(c)&&(l.a[c].baseCost*=p.a.MultipleAugMultiplier*[1,.96,.94,.93][v.a[11]]);if(a)return"You purchased "+e.name;b.a.SuppressBuyAugmentationConfirmation||Object(k.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."),T(t.name,!0)}else Object(k.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{var d="You must first purchase or install "+e.prereqs.join(",")+" before you can purchase this one.";if(a)return d;Object(k.a)(d)}}function A(){let e=0;for(var t=0;t<_.a.augmentations.length;++t)_.a.augmentations[t].name===m.a.NeuroFluxGovernor&&(e=_.a.augmentations[t].level);for(t=0;t<_.a.queuedAugmentations.length;++t)_.a.queuedAugmentations[t].name==m.a.NeuroFluxGovernor&&++e;return e+1}function R(e){for(const t in g.a){if(t===_.a.currentWorkFactionName)continue;if(!g.a.hasOwnProperty(t))continue;const a=g.a[t];if(!a.isMember)continue;if(!a.getInfo().offersWork())continue;if(_.a.getGangName()===t)continue;const n=Math.min(.1,a.favor/1e3+.01),r=Object(E.c)(_.a,a),i=Object(E.b)(_.a,a),o=Object(E.a)(_.a,a),s=Math.max(r*n,i*n,o*n,1/120);a.playerReputation+=s*e*_.a.faction_rep_mult*h.a.FactionPassiveRepGain}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s})),a.d(t,"b",(function(){return l}));var n=a(169),r=a(315);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"),p=i("JoyWire"),d=i("Market-TA.I"),f=i("Market-TA.II"),g=i("Overclock"),y=i("Self-Correcting Assemblers"),_=i("Sti.mu");return n.addChild(u),n.addChild(o),s.addChild(l),s.addChild(c),m.addChild(h),d.addChild(f),g.addChild(_),e.addChild(t),e.addChild(a),e.addChild(n),e.addChild(r),e.addChild(s),e.addChild(m),e.addChild(p),e.addChild(d),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";a.d(t,"a",(function(){return u}));var n=a(4),r=a(287),i=a(24),o=a(127),s=a(170),l=a(12);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;return this.hashRate*t}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 i}));var n=a(0),r=a(2);function i(e){return e.corp.funds.gt(e.money)?n.createElement("span",{className:"money-gold samefont"},r.a.formatMoney(e.money)):n.createElement("span",{className:"unbuyable samefont"},r.a.formatMoney(e.money))}},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,"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(7);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)&&Object(n.c)("alias "+e+"="+r[e]);for(const e in i)i.hasOwnProperty(e)&&Object(n.c)("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,"a",(function(){return i}));var n=a(188),r=a(12);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,"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 s}));var n=a(12),r=a(14);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(.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=.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=.1){Math.random()<.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";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 u}));var n=a(179),r=a(114),i=a(153),o=a(194),s=a(22),l=a(171),c=a(218);function u(e,t,a){if(null!=a&&"boolean"==typeof a||(a=!0),e instanceof n.a)return h(e),!0;if(e instanceof o.a&&"string"==typeof t){const n=m(e.pid,a);if(n)return n;for(const n of r.a.values())if(n.name==e.filename&&n.serverIp==t&&Object(l.a)(n.args,e.args))return h(n,a),!0;return!1}return"number"==typeof e?m(e,a):(console.error("killWorkerScript() called with invalid argument:"),console.error(e),!1)}function m(e,t=!0){const a=r.a.get(e);return a instanceof n.a&&(h(a,t),!0)}function h(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.serverIp,n=e.name,o=s.b[a];if(null==o)return void console.error("Could not find server on which this script is running: "+a);o.ramUsed=Object(c.a)(o.ramUsed-e.ramUsage),o.ramUsed<0&&(console.warn(`Server (${o.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${o.ramUsed}`),o.ramUsed=0);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}}r.a.delete(e.pid)||(console.warn("removeWorkerScript() called with WorkerScript that wasn't in the global map:"),console.warn(e)),t&&i.a.emitEvent()}}(e,t)}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=window.setTimeout.bind(window)},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(12);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,"c",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(86),r=a(65),i=a(22);function o(e,t){return new Promise((function(a){t.delay=Object(n.a)(()=>{t.delay=null,a()},e),t.delayResolve=a}))}function s(e,t,a=null){var n="";null!=a&&(n=" (Line "+function(e,t){var a=t.scriptRef.codeCode();try{return((a=a.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}(a,e)+")");const r=i.b[e.serverIp];if(null==r)throw new Error("WorkerScript constructed with invalid server ip: "+this.serverIp);return"|"+r.hostname+"|"+e.name+"|"+t+n}function l(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 s(e,`Invalid thread count passed to ${t}: ${a}. Threads must be a positive number.`);if(a>n)throw s(e,`Too many threads requested by ${t}. Requested: ${a}. Has: ${n}.`);return r}function c(e){if(!Object(r.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";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(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"b",(function(){return postVersion})),__webpack_require__.d(__webpack_exports__,"a",(function(){return Terminal}));var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(75),_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(470),_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(317),_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(472),_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(220),_Alias__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(76),_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(5),_CodingContracts__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(63),_Constants__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(4),_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(38),_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(355),_engine__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(26),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(53),_Hacking__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(66),_Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(72),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(42),_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(285),_Message_Message__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(87),_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(101),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(97),_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(84),_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(153),_Player__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(1),_RedPill__WEBPACK_IMPORTED_MODULE_23__=__webpack_require__(99),_Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__=__webpack_require__(194),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__=__webpack_require__(171),_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__=__webpack_require__(294),_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__=__webpack_require__(156),_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__=__webpack_require__(82),_Server_AllServers__WEBPACK_IMPORTED_MODULE_29__=__webpack_require__(22),_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__=__webpack_require__(30),_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__=__webpack_require__(44),_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__=__webpack_require__(86),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__=__webpack_require__(31),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__=__webpack_require__(2),_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__=__webpack_require__(56),_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_36__=__webpack_require__(137),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__=__webpack_require__(237),_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__=__webpack_require__(176),_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__=__webpack_require__(48),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__=__webpack_require__(7),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__=__webpack_require__(11),_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__=__webpack_require__(10),autosize__WEBPACK_IMPORTED_MODULE_43__=__webpack_require__(473),autosize__WEBPACK_IMPORTED_MODULE_43___default=__webpack_require__.n(autosize__WEBPACK_IMPORTED_MODULE_43__),jszip__WEBPACK_IMPORTED_MODULE_44__=__webpack_require__(474),jszip__WEBPACK_IMPORTED_MODULE_44___default=__webpack_require__.n(jszip__WEBPACK_IMPORTED_MODULE_44__),file_saver__WEBPACK_IMPORTED_MODULE_45__=__webpack_require__(475),file_saver__WEBPACK_IMPORTED_MODULE_45___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_45__),arg__WEBPACK_IMPORTED_MODULE_46__=__webpack_require__(292),arg__WEBPACK_IMPORTED_MODULE_46___default=__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_46__),react__WEBPACK_IMPORTED_MODULE_47__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_47___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_47__);function postVersion(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bitburner v"+_Constants__WEBPACK_IMPORTED_MODULE_8__.a.Version)}function isNumber(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function getTerminalInput(){return document.getElementById("terminal-input-text-box").value}$(document).keydown((function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal)){var t=document.getElementById("terminal-input-text-box");if(null==t||e.ctrlKey||e.shiftKey||Terminal.contractOpen||t.focus(),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.ENTER){e.preventDefault();const t=getTerminalInput(),a=Terminal.currDir;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("<span class='prompt'>["+(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_37__.a)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname+` ~${a}]&gt;</span> ${t}`),t.length>0&&(Terminal.resetTerminalInput(),Terminal.executeCommands(t))}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.C&&e.ctrlKey&&(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Cancelling..."),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine._actionInProgress=!1,Terminal.finishAction(!0)):_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&Terminal.resetTerminalInput()),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.L&&e.ctrlKey&&(e.preventDefault(),Terminal.executeCommand("clear")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.UPARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.P&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var a=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;(a<0||a>r)&&(Terminal.commandHistoryIndex=r),0!=a&&--Terminal.commandHistoryIndex;var n=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=n,Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_32__.a)((function(){t.selectionStart=t.selectionEnd=1e4}),10)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.DOWNARROW||_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.M&&e.ctrlKey){if(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;a=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((a<0||a>r)&&(Terminal.commandHistoryIndex=r),a==r||a==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;n=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=n}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.TAB){if(e.preventDefault(),null==t)return;let a=t.value;if(""==a)return;const n=a.lastIndexOf(";");-1!==n&&(a=a.slice(n+1)),a=a.trim(),a=a.replace(/\s\s+/g," ");const r=a.split(" ");let i=r.length-2;i<-1&&(i=0);const o=Object(_Terminal_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_1__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.a,a,i,Terminal.currDir);if(0==o.length)return;let s="",l="";if(0==r.length)return;1==r.length?l=r[0]:2==r.length?(l=r[0],s=r[1]):3==r.length?(l=r[0]+" "+r[1],s=r[2]):(s=r.pop(),l=r.join(" ")),Object(_Terminal_tabCompletion__WEBPACK_IMPORTED_MODULE_3__.a)(l,s,o),t.focus()}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}}));let terminalCtrlPressed=!1,shiftKeyPressed=!1;$(document).ready((function(){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal)&&$(".terminal-input").focus()})),$(document).keydown((function(e){if(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal))if(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.CTRL)terminalCtrlPressed=!0;else if(e.shiftKey)shiftKeyPressed=!0;else if(terminalCtrlPressed||shiftKeyPressed||Terminal.contractOpen);else{var t=document.getElementById("terminal-input-text-box");null!=t&&t.focus(),terminalCtrlPressed=!1,shiftKeyPressed=!1}})),$(document).keyup((function(e){_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.b.isOn(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_33__.a.Terminal)&&(e.which==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_35__.a.CTRL&&(terminalCtrlPressed=!1),e.shiftKey&&(shiftKeyPressed=!1))}));let Terminal={hackFlag:!1,backdoorFlag:!1,analyzeFlag:!1,actionStarted:!1,actionTime:0,commandHistory:[],commandHistoryIndex:0,contractOpen:!1,currDir:"/",resetTerminalInput:function(e=!1){let t="";e&&(t=getTerminalInput());const a=Terminal.currDir;_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.WRAP_INPUT?(document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname} ~${a}]$ </div><textarea type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`,autosize__WEBPACK_IMPORTED_MODULE_43___default()(document.getElementById("terminal-input-text-box"))):document.getElementById("terminal-input-td").innerHTML=`<div id='terminal-input-header' class='prompt'>[${_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname} ~${a}]$ </div><input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1" value="${t}" autocomplete="off" />`;document.getElementById("terminal-input-header").style.display="inline";const n=document.getElementById("terminal-input-text-box");if("number"==typeof n.selectionStart)n.selectionStart=n.selectionEnd=n.value.length;else if(void 0!==n.createTextRange){n.focus();var r=el.createTextRange();r.collapse(!1),r.select()}},modifyInput:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var a=t.value.length,n=t.selectionStart,r=t.value;switch(e.toLowerCase()){case"backspace":n>0&&n<=a+1&&(t.value=r.substr(0,n-1)+r.substr(n));break;case"deletewordbefore":for(var i=n-1;i>0;--i)if(" "===r.charAt(i))return void(t.value=r.substr(0,i)+r.substr(n));break;case"deletewordafter":for(i=n+1;i<=text.length+1;++i)if(" "===r.charAt(i))return void(t.value=r.substr(0,n)+r.substr(i))}}catch(e){console.error("Exception in Terminal.modifyInput: "+e)}},moveTextCursor:function(e){try{var t=document.getElementById("terminal-input-text-box");if(null==t)return;t.focus();var a=t.value.length,n=t.selectionStart;switch(e.toLowerCase()){case"home":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(a,a);break;case"prevchar":n>0&&t.setSelectionRange(n-1,n-1);break;case"prevword":for(var r=n-2;r>=0;--r)if(" "===t.value.charAt(r))return void t.setSelectionRange(r+1,r+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(n+1,n+1);break;case"nextword":for(r=n+1;r<=a;++r)if(" "===t.value.charAt(r))return void t.setSelectionRange(r,r);t.setSelectionRange(a,a);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}catch(e){console.error("Exception in Terminal.moveTextCursor: "+e)}},startHack:function(){Terminal.hackFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.d)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.a)/4,Terminal.startAction()},startBackdoor:function(){Terminal.backdoorFlag=!0,Terminal.actionTime=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.d)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),_Player__WEBPACK_IMPORTED_MODULE_22__.a)/4,Terminal.startAction()},startAnalyze:function(){Terminal.analyzeFlag=!0,Terminal.actionTime=1,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Analyzing system..."),Terminal.startAction()},startAction:function(){Terminal.actionStarted=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.b)("Time left:"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.a)("["),document.getElementById("terminal-input-td").innerHTML='<input type="text" class="terminal-input"/>',$("input[class=terminal-input]").prop("disabled",!0)},finishAction:function(e=!1){Terminal.hackFlag?Terminal.finishHack(e):Terminal.backdoorFlag?Terminal.finishBackdoor(e):Terminal.analyzeFlag&&Terminal.finishAnalyze(e),$("#hack-progress-bar").attr("id","old-hack-progress-bar"),$("#hack-progress").attr("id","old-hack-progress"),Terminal.resetTerminalInput(),$("input[class=terminal-input]").prop("disabled",!1)},finishHack:function(e=!1){if(!e){var t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.b)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.a),n=Math.random(),r=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.c)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.a),i=r/4;if(n<a){if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.a[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.b.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.a[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.b.WorldDaemon]==t.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN),void(Terminal.hackFlag=!1);t.backdoorInstalled=!0;var o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.e)(t,_Player__WEBPACK_IMPORTED_MODULE_22__.a);(o=Math.floor(t.moneyAvailable*o))<=0&&(o=0),t.moneyAvailable-=o,_Player__WEBPACK_IMPORTED_MODULE_22__.a.gainMoney(o),_Player__WEBPACK_IMPORTED_MODULE_22__.a.recordMoneySource(o,"hacking"),_Player__WEBPACK_IMPORTED_MODULE_22__.a.gainHackingExp(r),_Player__WEBPACK_IMPORTED_MODULE_22__.a.gainIntelligenceExp(r/_Constants__WEBPACK_IMPORTED_MODULE_8__.a.IntelligenceTerminalHackBaseExpGain),t.fortify(_Constants__WEBPACK_IMPORTED_MODULE_8__.a.ServerFortifyAmount),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.e)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Hack successful! Gained ",react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.a,{money:o})," and ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatExp(r)," ","hacking exp"))}else _Player__WEBPACK_IMPORTED_MODULE_22__.a.gainHackingExp(i),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Failed to hack ${t.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatExp(i)} hacking exp`)}Terminal.hackFlag=!1},finishBackdoor:function(e=!1){if(!e){const e=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();if(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.a[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.b.WorldDaemon]&&_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.a[_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.b.WorldDaemon]==e.ip)return null==_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN&&(_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN=1),Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN),void(Terminal.backdoorFlag=!1);e.backdoorInstalled=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.e)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Backdoor successful!"))}Terminal.backdoorFlag=!1},finishAnalyze:function(e=!1){if(!e){let e=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();const t=e instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.a;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(e.hostname+": ");const a=e.organizationName;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Organization name: "+(t?"Player":a));let n=!t&&e.hasAdminRights||t;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Root Access: "+(n?"YES":"NO"));const r=e.requiredHackingSkill;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Required hacking skill: "+(t?"N/A":r));const i=e.hackDifficulty;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Server security level: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatServerSecurity(i)));const o=Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.b)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.a);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Chance to hack: "+(t?"N/A":_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatPercentage(o)));const s=1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.d)(e,_Player__WEBPACK_IMPORTED_MODULE_22__.a);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Time to hack: "+(t?"N/A":Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.b)(s,!0))),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.e)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Total money available on server: ",t?"N/A":react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.a,{money:e.moneyAvailable})));const l=e.numOpenPortsRequired;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Required number of open ports for NUKE: "+(t?"N/A":l)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("SSH port: "+(e.sshPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("FTP port: "+(e.ftpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("SMTP port: "+(e.smtpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("HTTP port: "+(e.httpPortOpen?"Open":"Closed")),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("SQL port: "+(e.sqlPortOpen?"Open":"Closed"))}Terminal.analyzeFlag=!1},executeCommands:function(e){e=(e=e.trim()).replace(/\s\s+/g," "),Terminal.commandHistory[Terminal.commandHistory.length-1]!=e&&(Terminal.commandHistory.push(e),Terminal.commandHistory.length>50&&Terminal.commandHistory.splice(0,1)),Terminal.commandHistoryIndex=Terminal.commandHistory.length,e=e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g).map(_Alias__WEBPACK_IMPORTED_MODULE_5__.h).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat();for(let t=0;t<e.length;t++)e[t].match(/^\s*$/)||Terminal.executeCommand(e[t].trim())},parseCommandArguments:function(e){let t="";const a=[];let n=0,r=0,i="";for(;r<e.length;){let o=!1;r>=1&&(i=e.charAt(r-1),"\\"===i&&(o=!0));const s=e.charAt(r);if('"'===s)if(o||" "!==i)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',r+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(r+1,t-r-1)),n=r=t===e.length-1?t+1:t+2;continue}}else if("'"===s)if(o||" "!==i)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",r+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(r+1,t-r-1)),n=r=t===e.length-1?t+1:t+2;continue}}else if(" "===s&&""===t){let t=e.substr(n,r-n);isNumber(t)?a.push(parseFloat(t)):a.push(t),n=r+1}++r}if(n!==r){let t=e.substr(n,r-n);isNumber(t)?a.push(parseFloat(t)):a.push(t)}return a},executeCommand:function(command){if(Terminal.hackFlag||Terminal.backdoorFlag||Terminal.analyzeFlag)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(`Cannot execute command (${command}) while an action is in progress`);else{command.startsWith("./")&&(command="run "+command.slice(2));var commandArray=Terminal.parseCommandArguments(command);if(0!=commandArray.length)if(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.a.isRunning){var n00dlesServ=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.a)("n00dles");if(null==n00dlesServ)throw new Error("Could not get n00dles server");switch(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.a.currStep){case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalHelp:1===commandArray.length&&"help"==commandArray[0]?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.b),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalLs:1===commandArray.length&&"ls"==commandArray[0]?(Terminal.executeListCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScan:1===commandArray.length&&"scan"==commandArray[0]?(Terminal.executeScanCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScanAnalyze1:1==commandArray.length&&"scan-analyze"==commandArray[0]?(Terminal.executeScanAnalyzeCommand(1),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalScanAnalyze2:2==commandArray.length&&"scan-analyze"==commandArray[0]&&2===commandArray[1]?(Terminal.executeScanAnalyzeCommand(2),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalConnect:if(2==commandArray.length){if("connect"!=commandArray[0]||"n00dles"!=commandArray[1]&&commandArray[1]!=n00dlesServ.ip)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Wrong command! Try again!");_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.a.currentServer=n00dlesServ.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Connected to n00dles"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalAnalyze:if(1===commandArray.length&&"analyze"===commandArray[0]){if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalNuke:2==commandArray.length&&"run"==commandArray[0]&&"NUKE.exe"==commandArray[1]?(n00dlesServ.hasAdminRights=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("NUKE successful! Gained root access to n00dles"),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalManualHack:1==commandArray.length&&"hack"==commandArray[0]?(Terminal.startHack(),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalCreateScript:2==commandArray.length&&"nano"==commandArray[0]&&"n00dles.script"==commandArray[1]?(_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent("n00dles.script",""),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalFree:1==commandArray.length&&"free"==commandArray[0]?(Terminal.executeFreeCommand(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.TerminalRunScript:2==commandArray.length&&"run"==commandArray[0]&&"n00dles.script"==commandArray[1]?(Terminal.runScript(commandArray),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.d.ActiveScriptsToTerminal:if(2==commandArray.length&&"tail"==commandArray[0]&&"n00dles.script"==commandArray[1]){var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.a)("n00dles.script",[],_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer());if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Error: No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.a)(runningScript),Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_15__.b)()}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Bad command. Please follow the tutorial");break;default:return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it")}}else{var s=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();switch(commandArray[0].toLowerCase()){case"alias":if(1===commandArray.length)return void Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.f)();if(2===commandArray.length&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.e)(commandArray[1]))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Set alias "+commandArray[1]);if(3===commandArray.length&&"-g"===commandArray[1]&&Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.e)(commandArray[2],!0))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Set global alias "+commandArray[2]);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)('Incorrect usage of alias command. Usage: alias [-g] [aliasname="value"]');break;case"analyze":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Incorrect usage of analyze command. Usage: analyze");Terminal.startAnalyze();break;case"backdoor":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Incorrect usage of backdoor command. Usage: backdoor");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers"):s.hasAdminRights?s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.a.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.a?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Cannot use backdoor on this type of Server"):Terminal.startBackdoor():Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("You do not have admin rights for this machine! Cannot backdoor");break;case"buy":_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__.a.hasOwnProperty("Darkweb Server")?Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.b)(commandArray):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)");break;case"cat":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of cat command. Usage: cat [file]");const e=Terminal.getFilepath(commandArray[1]);if(!e.endsWith(".msg")&&!e.endsWith(".lit")&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)");if(e.endsWith(".msg")||e.endsWith(".lit"))for(let t=0;t<s.messages.length;++t){if(e.endsWith(".lit")&&s.messages[t]===e)return void Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_16__.a)(s.messages[t]);if(e.endsWith(".msg")&&s.messages[t].filename===e)return void Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_18__.e)(s.messages[t])}else if(e.endsWith(".txt")){const t=Terminal.getTextFile(e);if(null!=t)return void t.show()}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such file "+e)}catch(e){Terminal.postThrownError(e)}break;case"cd":if(commandArray.length>2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: cd [dir]");else{let e=2===commandArray.length?commandArray[1]:"/",t;if("/"===e)t="/";else{if(e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.i)(e),t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.a)(e,Terminal.currDir),null==t||""===t)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Invalid path. Failed to change directories");const a=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();if(!a.scripts.some(e=>e.filename.startsWith(t))&&!a.textFiles.some(e=>e.fn.startsWith(t)))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Invalid path. Failed to change directories")}Terminal.currDir=t,Terminal.resetTerminalInput()}break;case"check":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("tail can only be called on .script files (filename must end with .script)");let t=[];for(var i=2;i<commandArray.length;++i)t.push(commandArray[i]);var runningScript=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.a)(e,t,s);if(null==runningScript)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such script exists");runningScript.displayLog()}}catch(e){Terminal.postThrownError(e)}break;case"clear":case"cls":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of clear/cls command. Usage: clear/cls");$("#terminal tr:not(:last)").remove(),postNetburnerText();break;case"connect":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of connect command. Usage: connect [ip/hostname]");let e=commandArray[1];for(let t=0;t<s.serversOnNetwork.length;t++)if(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.c)(s,t).ip==e||Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.c)(s,t).hostname==e)return void Terminal.connectToServer(e);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Host not found");break}case"download":try{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of download command. Usage: download [script/text file]");const e=commandArray[1];if("*"===e||"*.script"===e||"*.txt"===e){var zip=new jszip__WEBPACK_IMPORTED_MODULE_44__;if("*"===e||"*.script"===e)for(var i=0;i<s.scripts.length;++i){var file=new Blob([s.scripts[i].code],{type:"text/plain"});zip.file(s.scripts[i].filename+".js",file)}if("*"===e||"*.txt"===e)for(var i=0;i<s.textFiles.length;++i){var file=new Blob([s.textFiles[i].text],{type:"text/plain"});zip.file(s.textFiles[i].fn,file)}let t;switch(e){case"*.script":t="bitburnerScripts.zip";break;case"*.txt":t="bitburnerTexts.zip";break;default:t="bitburnerFiles.zip"}return void zip.generateAsync({type:"blob"}).then((function(e){file_saver__WEBPACK_IMPORTED_MODULE_45__.saveAs(e,t)}))}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(e)){const t=Terminal.getScript(e);if(null!=t)return t.download()}else{if(!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Cannot download this filetype");{const t=Terminal.getTextFile(e);if(null!=t)return t.download()}}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(e+" does not exist")}catch(e){Terminal.postThrownError(e)}break;case"expr":{if(commandArray.length<=1)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of expr command. Usage: expr [math expression]");let expr=commandArray.slice(1).join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,""),result;try{result=eval(sanitizedExpr)}catch(e){return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Could not evaluate expression: "+sanitizedExpr)}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(result);break}case"free":Terminal.executeFreeCommand(commandArray);break;case"hack":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of hack command. Usage: hack");s.purchasedByPlayer?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):0==s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("You do not have admin rights for this machine! Cannot hack"):s.requiredHackingSkill>_Player__WEBPACK_IMPORTED_MODULE_22__.a.hacking_skill?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.a?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Cannot hack this type of Server"):Terminal.startHack();break;case"help":if(1!==commandArray.length&&2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of help command. Usage: help");if(1===commandArray.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.b);else{var cmd=commandArray[1],txt=_Terminal_HelpText__WEBPACK_IMPORTED_MODULE_2__.a[cmd];if(null==txt)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No help topics match '"+cmd+"'");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(txt)}break;case"home":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of home command. Usage: home");_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.a.currentServer=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getHomeComputer().ip,_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Connected to home"),Terminal.currDir="/",Terminal.resetTerminalInput();break;case"hostname":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of hostname command. Usage: hostname");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname);break;case"ifconfig":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of ifconfig command. Usage: ifconfig");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().ip);break;case"kill":Terminal.executeKillCommand(commandArray);break;case"killall":for(let e=s.runningScripts.length-1;e>=0;--e)Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.a)(s.runningScripts[e],s.ip,!1);_Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_21__.a.emitEvent(),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Killing all running scripts");break;case"ls":Terminal.executeListCommand(commandArray);break;case"lscpu":Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().cpuCores+" Core(s)");break;case"mem":Terminal.executeMemCommand(commandArray);break;case"mv":if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: mv [src] [dest]");try{const e=commandArray[1],t=commandArray[2];if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(e)&&!e.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("'mv' can only be used on scripts and text files (.txt)");const a=Terminal.getFile(e);if(null==a)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(`Source file ${e} does not exist`);const n=Terminal.getFilepath(e),r=Terminal.getFilepath(t),i=Terminal.getFile(t);if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(e)){if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(t))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Source and destination files must have the same type");if(s.isRunning(n))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Cannot use 'mv' on a script that is running");if(null!=i){const e=s.removeFile(r);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Warning: The destination file was overwritten")}a.filename=r}else if(e.endsWith(".txt")){if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Source and destination files must have the same type");if(null!=i){const e=s.removeFile(r);if(!e.res)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Something went wrong...please contact game dev (probably a bug)");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Warning: The destination file was overwritten")}a.fn=r}}catch(e){Terminal.postThrownError(e)}break;case"nano":Terminal.executeNanoCommand(commandArray);break;case"ps":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of ps command. Usage: ps");for(let e=0;e<s.runningScripts.length;e++){let t=s.runningScripts[e],a=`(PID - ${t.pid}) ${t.filename}`;for(let e=0;e<t.args.length;++e)a+=" "+t.args[e].toString();Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(a)}break;case"rm":{if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: rm [program/script]");let e,t;try{e=Terminal.getFilepath(commandArray[1]),t=s.removeFile(e)}catch(e){t={res:!1,msg:"No such file exists"}}t.res||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(t.msg);break}case"run":if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...");else{var executableName=commandArray[1];if("musicplayer"===executableName)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)('<iframe src="https://open.spotify.com/embed/user/danielyxie/playlist/1ORnnL6YNvXOracUaUV2kh" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>',!1);Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(executableName)?Terminal.runScript(commandArray):executableName.endsWith(".cct")?Terminal.runContract(executableName):Terminal.runProgram(commandArray)}break;case"scan":Terminal.executeScanCommand(commandArray);break;case"scan-analyze":if(1===commandArray.length)Terminal.executeScanAnalyzeCommand(1);else{if(commandArray.length>3)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;3===commandArray.length&&"-a"===commandArray[2]&&(e=!0);let t=parseInt(commandArray[1]);if(isNaN(t)||t<0)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(t>3&&!_Player__WEBPACK_IMPORTED_MODULE_22__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.DeepscanV1.name)&&!_Player__WEBPACK_IMPORTED_MODULE_22__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(t>5&&!_Player__WEBPACK_IMPORTED_MODULE_22__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.DeepscanV2.name))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(t>10)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("You cannot scan-analyze with that high of a depth. Maximum depth is 10");Terminal.executeScanAnalyzeCommand(t,e)}break;case"scp":Terminal.executeScpCommand(commandArray);break;case"sudov":if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: sudov");s.hasAdminRights?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("You have ROOT access to this machine"):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("You do NOT have root access to this machine");break;case"tail":try{if(commandArray.length<2)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...");else if("string"==typeof commandArray[1]){const e=Terminal.getFilepath(commandArray[1]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(e))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("tail can only be called on .script, .ns, .js files, or by pid");const t=[];for(let e=2;e<commandArray.length;++e)t.push(commandArray[e]);for(var i=0;i<s.runningScripts.length;++i)if(s.runningScripts[i].filename===e&&Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__.a)(s.runningScripts[i].args,t))return void Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.a)(s.runningScripts[i]);const a=[];for(var i=0;i<s.runningScripts.length;++i){if(s.runningScripts[i].args.length<t.length)continue;const n=s.runningScripts[i].args.slice(0,t.length);s.runningScripts[i].filename===e&&Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_25__.a)(n,t)&&a.push(s.runningScripts[i])}if(1===a.length)return void Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.a)(a[0]);if(a.length>1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Found several potential candidates:");for(const e of a)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(`${e.filename} ${e.args.join(" ")}`);return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Script arguments need to be specified.")}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such script exists.")}else{const e=Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.b)(commandArray[1],_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer());if(null==e)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such script exists");Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.a)(e)}}catch(e){Terminal.postThrownError(e)}break;case"theme":{let e=commandArray.slice(1);if(1!==e.length&&3!==e.length)Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect number of arguments."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Usage: theme [default|muted|solarized] | #[background color hex] #[text color hex] #[highlight color hex]");else if(1===e.length){var themeName=e[0];if("default"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#000000"),document.body.style.setProperty("--my-prompt-color","#f92672");else if("muted"==themeName)document.body.style.setProperty("--my-highlight-color","#ffffff"),document.body.style.setProperty("--my-font-color","#66ff33"),document.body.style.setProperty("--my-background-color","#252527");else{if("solarized"!=themeName)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Theme not found");document.body.style.setProperty("--my-highlight-color","#6c71c4"),document.body.style.setProperty("--my-font-color","#839496"),document.body.style.setProperty("--my-background-color","#002b36")}_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_PROMPT_COLOR=document.body.style.getPropertyValue("--my-prompt-color")}else{var inputBackgroundHex=e[0],inputTextHex=e[1],inputHighlightHex=e[2];if(!(/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputBackgroundHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputTextHex)&&/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(inputHighlightHex)))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Invalid Hex Input for theme");document.body.style.setProperty("--my-highlight-color",inputHighlightHex),document.body.style.setProperty("--my-font-color",inputTextHex),document.body.style.setProperty("--my-background-color",inputBackgroundHex),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_HIGHLIGHT_COLOR=document.body.style.getPropertyValue("--my-highlight-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_FONT_COLOR=document.body.style.getPropertyValue("--my-font-color"),_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_12__.a.THEME_BACKGROUND_COLOR=document.body.style.getPropertyValue("--my-background-color")}break}case"top":{if(1!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of top command. Usage: top");const e=40,t=10,a=16,n="Script",r="PID",i="Threads",o="RAM Usage",l=" ".repeat(e-n.length),c=" ".repeat(t-r.length),u=" ".repeat(a-i.length),m=`${n}${l}${r}${c}${i}${u}${o}`;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(m);let h=s.runningScripts;for(let n=0;n<h.length;n++){let r=h[n];const i=Math.max(0,e-r.filename.length),o=" ".repeat(i),s=Math.max(0,t-(r.pid+"").length),l=" ".repeat(s),c=Math.max(0,a-(r.threads+"").length),u=" ".repeat(c),m=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_26__.a)(r)*r.threads),p=[r.filename,o,r.pid,l,r.threads,u,m].join("");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(p)}break}case"unalias":if(2!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of unalias name. Usage: unalias [alias]");Object(_Alias__WEBPACK_IMPORTED_MODULE_5__.g)(commandArray[1])?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Removed alias "+commandArray[1]):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such alias exists: "+commandArray[1]);break;case"wget":{if(3!==commandArray.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of wget command. Usage: wget [url] [target file]");let e=commandArray[1],t=Terminal.getFilepath(commandArray[2]);if(!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(t)&&!t.endsWith(".txt"))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("wget failed: Invalid target file. Target file must be script or text file");$.get(e,(function(e){let a;return a=Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(t)?s.writeToScriptFile(t,e):s.writeToTextFile(t,e),a.success?a.overwritten?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("wget successfully retrieved content and overwrote "+t):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("wget successfully retrieved content to new file "+t):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("wget failed")}),"text").fail((function(e){return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("wget failed: "+JSON.stringify(e))}));break}default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(`Command ${commandArray[0]} not found`)}}}},connectToServer:function(e){var t=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.b)(e);null!=t?(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().isConnectedTo=!1,_Player__WEBPACK_IMPORTED_MODULE_22__.a.currentServer=t.ip,_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().isConnectedTo=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Connected to "+t.hostname),Terminal.currDir="/","darkweb"==_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname&&Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_10__.a)(),Terminal.resetTerminalInput()):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Invalid server. Connection failed.")},executeFreeCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of free command. Usage: free");const t=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().maxRam),a=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().ramUsed),n=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatRAM(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().maxRam-_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().ramUsed),r=Math.max(t.length,Math.max(a.length,n.length)),i=_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatPercentage(_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().ramUsed/_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().maxRam);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Total: ${" ".repeat(r-t.length)}${t}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Used: ${" ".repeat(r-a.length)}${a} (${i})`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Available: ${" ".repeat(r-n.length)}${n}`)},executeKillCommand:function(e){try{if(e.length<2)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("number"==typeof e[1]){const t=e[1];return void(Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.a)(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Killing script with PID "+t):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Failed to kill script with PID ${t}. No such script exists`))}const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=Terminal.getFilepath(e[1]),n=[];for(let t=2;t<e.length;++t)n.push(e[t]);const r=t.getRunningScript(a,n);if(null==r)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such script is running. Nothing to kill");Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_20__.a)(r,t.ip),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Killing "+a)}catch(e){Terminal.postThrownError(e)}},executeListCommand:function(e){const t=e.length;function a(){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(t<=0||t>5||3===t)return a();let n=null,r=Terminal.currDir;if(r.endsWith("/")||(r+="/"),t>=4){if("grep"!==e[t-2]||"|"!==e[t-3])return a();n=e[t-1]}if(t>=2&&"|"!==e[1]&&(r=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.a)(e[1],Terminal.currDir),null!=r&&(r.endsWith("/")||(r+="/"),!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.f)(r))))return a();"/"===r&&(r=null);const i=[],o=[],s=[],l=[],c=[],u=[];function m(e,t){let a=e;if(r){if(!e.startsWith(r))return;a=e.slice(r.length,e.length)}if(!n||a.includes(n))if(a.includes("/")){const e=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.d)(a);if(n&&!e.includes(n))return;u.includes(e)||u.push(e)}else t.push(a)}const h=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();for(const e of h.programs)m(e,i);for(const e of h.scripts)m(e.filename,o);for(const e of h.textFiles)m(e.fn,s);for(const e of h.contracts)m(e.fn,l);for(const e of h.messages)e instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.a?m(e.filename,c):m(e,c);function p(e,t){const a=Math.max(...e.map(e=>e.length))+1,n=Math.floor(80/a);for(let r=0;r<e.length;r++){let i="";for(let t=0;t<n&&r<e.length;t++)i+=e[r],i+=" ".repeat(a*(t+1)-i.length),r++;r--,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.d)(i,t)}}i.sort(),o.sort(),s.sort(),l.sort(),c.sort(),u.sort();const d=[{segments:u,config:{color:"#0000FF"}},{segments:c},{segments:s},{segments:i},{segments:l},{segments:o}].filter(e=>e.segments.length>0);for(let e=0;e<d.length;e++)0!==e&&Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.e)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement("br",null)),p(d[e].segments,d[e].config)},executeMemCommand:function(e){try{if(2!==e.length&&4!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=e[1];let a=1;if(4===e.length&&"-t"===e[2]&&(a=Math.round(parseInt(e[3])),isNaN(a)||a<1))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Invalid number of threads specified. Number of threads must be greater than 1");const n=Terminal.getScript(t);if(null==n)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such script exists!");const r=n.ramUsage*a;Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`This script requires ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatRAM(r)} of RAM to run for ${a} thread(s)`)}catch(e){Terminal.postThrownError(e)}},executeNanoCommand:function(e){if(2===e.length)try{const t=e[1];if(".fconf"===t){let e=Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_4__.a)();return void _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(t,e)}if(Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(t)){const e=Terminal.getFilepath(t),a=Terminal.getScript(t);if(null==a){let a="";(t.endsWith(".ns")||t.endsWith(".js"))&&(a="export async function main(ns) {\n\n}"),_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,a)}else _engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,a.code)}else{if(!t.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const e=Terminal.getFilepath(t),a=Terminal.getTextFile(t);null==a?_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e):_engine__WEBPACK_IMPORTED_MODULE_11__.Engine.loadScriptEditorContent(e,a.text)}}}catch(e){Terminal.postThrownError(e)}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of nano command. Usage: nano [scriptname]")},executeScanCommand:function(e){if(1!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of netstat/scan command. Usage: netstat/scan");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=t.serversOnNetwork.map((e,a)=>{const n=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.c)(t,a);return{hostname:n.hostname,ip:n.ip,hasRoot:n.hasAdminRights?"Y":"N"}});a.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const n=Math.max(...a.map(e=>e.hostname.length)),r=Math.max(...a.map(e=>e.ip.length));for(const e of a){let t=e.hostname;t+=" ".repeat(n-e.hostname.length+1),t+=e.ip,t+=" ".repeat(r-e.ip.length+1),t+=e.hasRoot,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(t)}},executeScanAnalyzeCommand:function(e=1,t=!1){Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(" ");var a={};for(const e in _Server_AllServers__WEBPACK_IMPORTED_MODULE_29__.b)a[e]=0;const n=[],r=[0],i=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();for(n.push(i);0!=n.length;){const i=n.pop(),u=r.pop(),m=i instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.a;if((t||!i.purchasedByPlayer||"home"==i.hostname)&&(!(a[i.ip]||u>e)&&(t||!m))){a[i.ip]=1;for(var o=i.serversOnNetwork.length-1;o>=0;--o)n.push(Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.c)(i,o)),r.push(u+1);if(0!=u){var s=Array(4*(u-1)+1).join("-");_Player__WEBPACK_IMPORTED_MODULE_22__.a.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.AutoLink.name)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("<strong>"+s+"> <a class='scan-analyze-link'>"+i.hostname+"</a></strong>",!1):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("<strong>"+s+">"+i.hostname+"</strong>");var l=s+"--",c="NO";i.hasAdminRights&&(c="YES"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`${l}Root Access: ${c}${m?"":", Required hacking skill: "+i.requiredHackingSkill}`),m||Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(l+"Number of open ports required to NUKE: "+i.numOpenPortsRequired),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(l+"RAM: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_34__.a.formatRAM(i.maxRam)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(" ")}}}var u=document.getElementsByClassName("scan-analyze-link");for(let e=0;e<u.length;++e)!function(){var t=u[e].innerHTML.toString();u[e].onclick=function(){Terminal.analyzeFlag||Terminal.hackFlag||Terminal.backdoorFlag||Terminal.connectToServer(t)}}()},executeScpCommand(e){try{if(3!==e.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const r=Terminal.getFilepath(e[1]);if(!r.endsWith(".lit")&&!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(r)&&!r.endsWith(".txt"))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("scp only works for scripts, text files (.txt), and literature files (.lit)");const i=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.b)(e[2]);if(null==i)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(`Invalid destination. ${e[2]} not found`);const o=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();if(r.endsWith(".lit")){for(var t=!1,a=0;a<o.messages.length;++a)if(!(o.messages[a]instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_17__.a)&&o.messages[a]==r){t=!0;break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such file exists!");for(a=0;a<i.messages.length;++a)if(i.messages[a]===r)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(r+" copied over to "+i.hostname);return i.messages.push(r),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(r+" copied over to "+i.hostname)}if(r.endsWith(".txt")){var n;for(t=!1,a=0;a<o.textFiles.length;++a)if(o.textFiles[a].fn===r){t=!0,n=o.textFiles[a];break}if(!t)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("No such file exists!");let e=i.writeToTextFile(n.fn,n.text);return e.success?e.overwritten?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`WARNING: ${r} already exists on ${i.hostname} and will be overwriten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`${r} overwritten on ${i.hostname}`)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`${r} copied over to ${i.hostname}`):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("scp failed")}let s=null;for(let e=0;e<o.scripts.length;++e)if(r==o.scripts[e].filename){s=o.scripts[e];break}if(null==s)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("scp() failed. No such script exists");let l=i.writeToScriptFile(r,s.code);if(!l.success)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("scp failed");if(l.overwritten)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`WARNING: ${r} already exists on ${i.hostname} and will be overwritten`),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`${r} overwritten on ${i.hostname}`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`${r} copied over to ${i.hostname}`)}catch(e){Terminal.postThrownError(e)}},runProgram:function(e){if(e.length<2)return;const t=e[1];_Player__WEBPACK_IMPORTED_MODULE_22__.a.hasProgram(t)?Terminal.executeProgram(e):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("ERROR: No such executable on home computer (Only programs that exist on your home computer can be run)")},executeProgram:function(e){if(e.length<2)return;var t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer();const a=e[1],n=e.slice(1),r={};r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.NukeProgram.name]=e=>{if(!e.hasAdminRights)return e.openPortCount>=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().numOpenPortsRequired?(e.hasAdminRights=!0,void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("NUKE successful! Gained root access to "+_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer().hostname)):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("NUKE unsuccessful. Not enough ports have been opened");Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("You already have root access to this computer. There is no reason to run NUKE.exe")},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.BruteSSHProgram.name]=e=>{e.sshPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("SSH Port (22) is already open!"):(e.sshPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Opened SSH Port(22)!"),e.openPortCount++)},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.FTPCrackProgram.name]=e=>{e.ftpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("FTP Port (21) is already open!"):(e.ftpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Opened FTP Port (21)!"),e.openPortCount++)},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.RelaySMTPProgram.name]=e=>{e.smtpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("SMTP Port (25) is already open!"):(e.smtpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Opened SMTP Port (25)!"),e.openPortCount++)},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.HTTPWormProgram.name]=e=>{e.httpPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("HTTP Port (80) is already open!"):(e.httpPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Opened HTTP Port (80)!"),e.openPortCount++)},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.SQLInjectProgram.name]=e=>{e.sqlPortOpen?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("SQL Port (1433) is already open!"):(e.sqlPortOpen=!0,Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Opened SQL Port (1433)!"),e.openPortCount++)},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.ServerProfiler.name]=(e,t)=>{if(2!==t.length)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const a=Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_30__.b)(t[1]);null!=a?a instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_14__.a?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.ServerProfiler.name+" cannot be run on a Hacknet Server."):(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(a.hostname+":"),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Server base security level: "+a.baseDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Server current security level: "+a.hackDifficulty),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Server growth rate: "+a.serverGrowth),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Netscript hack() execution time: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.b)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.d)(a,_Player__WEBPACK_IMPORTED_MODULE_22__.a),!0)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Netscript grow() execution time: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.b)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.a)(a,_Player__WEBPACK_IMPORTED_MODULE_22__.a),!0)),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Netscript weaken() execution time: "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_41__.b)(1e3*Object(_Hacking__WEBPACK_IMPORTED_MODULE_13__.f)(a,_Player__WEBPACK_IMPORTED_MODULE_22__.a),!0))):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Invalid server IP/hostname")},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.AutoLink.name]=()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("When using scan-analyze, click on a server's hostname to connect to it.")},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.DeepscanV1.name]=()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.DeepscanV2.name]=()=>{Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("This executable cannot be run."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.Flight.name]=()=>{const e=Math.round(30*_BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__.a.DaedalusAugsRequirement);if(!(_Player__WEBPACK_IMPORTED_MODULE_22__.a.augmentations.length>=e&&_Player__WEBPACK_IMPORTED_MODULE_22__.a.money.gt(1e11)&&_Player__WEBPACK_IMPORTED_MODULE_22__.a.hacking_skill>=2500))return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Augmentations: ${_Player__WEBPACK_IMPORTED_MODULE_22__.a.augmentations.length} / ${e}`),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.e)(react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_47___default.a.Fragment,null,"Money: ",react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.a,{money:_Player__WEBPACK_IMPORTED_MODULE_22__.a.money.toNumber()})," / ",react__WEBPACK_IMPORTED_MODULE_47___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_42__.a,{money:1e11}))),void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Hacking skill: ${_Player__WEBPACK_IMPORTED_MODULE_22__.a.hacking_skill} / 2500`);Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("We will contact you."),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("-- Daedalus --")},r[_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__.a.BitFlume.name]=()=>{const e=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.d)(),t=Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.c)();e.innerHTML="Travel to BitNode Nexus",t.innerHTML="Cancel",e.addEventListener("click",(function(){return Object(_RedPill__WEBPACK_IMPORTED_MODULE_23__.a)(_Player__WEBPACK_IMPORTED_MODULE_22__.a.bitNodeN,!0),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.a)()})),t.addEventListener("click",(function(){return Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.a)()})),Object(_utils_YesNoBox__WEBPACK_IMPORTED_MODULE_39__.b)("WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.<br><br>Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.")},r.hasOwnProperty(a)?r[a](t,n):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Invalid executable. Cannot be run")},getFilepath:function(e){const t=Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.b)(e,Terminal.currDir);if(null==t)throw new Error("Invalid file path specified: "+e);return Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.e)(t)?Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__.h)(t):t},getFile:function(e){return Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_28__.a)(e)?Terminal.getScript(e):e.endsWith(".lit")?Terminal.getLitFile(e):e.endsWith(".txt")?Terminal.getTextFile(e):null},getLitFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=Terminal.getFilepath(e);for(const e of t.messages)if("string"==typeof e&&a===e)return e;return null},getScript:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=Terminal.getFilepath(e);for(const e of t.scripts)if(a===e.filename)return e;return null},getTextFile:function(e){const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=Terminal.getFilepath(e);for(const e of t.textFiles)if(a===e.fn)return e;return null},postThrownError:function(e){if(e instanceof Error){const t="Error: ",a=e.toString();a.startsWith(t)?Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(a.slice(t.length)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)(a)}},runScript:function(e){if(e.length<2)return void dialogBoxCreate("Bug encountered with Terminal.runScript(). Command array has a length of less than 2: "+e);const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=Terminal.getFilepath(e[1]),n={"--tail":Boolean,"-t":Number},r=arg__WEBPACK_IMPORTED_MODULE_46__(n,{permissive:!0,argv:e.slice(2)}),i=Math.round(parseFloat(r["-t"])),o=!0===r["--tail"];if(void 0!==r["-t"]&&(i<0||isNaN(i)))return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Invalid number of threads specified. Number of threads must be greater than 0");const s=!isNaN(i)&&i>0?i:1,l=r._;if(null==Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_27__.a)(a,l,t)){for(let e=0;e<t.scripts.length;e++){if(t.scripts[e].filename!==a)continue;const n=t.scripts[e],r=n.ramUsage*s,i=t.maxRam-t.ramUsed;if(!t.hasAdminRights)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Need root access to run script");if(r>i)return void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("This machine does not have enough RAM to run this script with "+s+" threads. Script requires "+r+"GB of RAM");const c=new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_24__.a(n,l);c.threads=s;return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__.e)(c,t)?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Running script with ${s} thread(s), pid ${c.pid} and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_36__.a)(l)}.`),void(o&&Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_38__.a)(c))):void Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.f)("Failed to start script")}Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("ERROR: No such script")}else Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("ERROR: This script is already running. Cannot run multiple instances")},runContract:async function(e){if(Terminal.contractOpen)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("ERROR: There's already a Coding Contract in Progress");const t=_Player__WEBPACK_IMPORTED_MODULE_22__.a.getCurrentServer(),a=t.getContract(e);if(null==a)return Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("ERROR: No such contract");Terminal.contractOpen=!0;switch(await a.prompt()){case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.b.Success:var n=_Player__WEBPACK_IMPORTED_MODULE_22__.a.gainCodingContractReward(a.reward,a.getDifficulty());Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Contract SUCCESS - "+n),t.removeContract(a);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.b.Failure:++a.tries,a.tries>=a.getMaxNumTries()?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Contract <p style='color:red;display:inline'>FAILED</p> - Contract is now self-destructing"),t.removeContract(a)):Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)(`Contract <p style='color:red;display:inline'>FAILED</p> - ${a.getMaxNumTries()-a.tries} tries remaining`);break;case _CodingContracts__WEBPACK_IMPORTED_MODULE_7__.b.Cancelled:default:Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_40__.c)("Contract cancelled")}Terminal.contractOpen=!1}}}).call(this,__webpack_require__(184))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));var n=a(0);let r;!function(e){e[e.Tag_span=0]="Tag_span",e[e.Tag_h1=1]="Tag_h1"}(r||(r={}));class i extends n.Component{constructor(e){super(e),this.copy=this.copy.bind(this),this.tooltipClasses=this.tooltipClasses.bind(this),this.textClasses=this.textClasses.bind(this),this.state={tooltipVisible:!1}}copy(){const e=document.createElement("textarea");e.value=this.props.value,document.body.appendChild(e),e.select(),e.setSelectionRange(0,1e10),document.execCommand("copy"),document.body.removeChild(e),this.setState({tooltipVisible:!0}),setTimeout(()=>this.setState({tooltipVisible:!1}),1e3)}tooltipClasses(){let e="copy_tooltip_text";return this.state.tooltipVisible&&(e+=" copy_tooltip_text_visible"),e}textClasses(){let e="copy_tooltip noselect text";return this.state.tooltipVisible&&(e+=" copy_tooltip_copied"),e}render(){switch(this.props.tag){case r.Tag_h1:return n.createElement("h1",{className:this.textClasses(),onClick:this.copy},this.props.value,n.createElement("span",{className:this.tooltipClasses()},"Copied!"));case r.Tag_span:return n.createElement("span",{className:this.textClasses(),onClick:this.copy},n.createElement("b",null,this.props.value),n.createElement("span",{className:this.tooltipClasses()},"Copied!"))}}}var o,s,l;o=i,s="defaultProps",l={tag:r.Tag_span},s in o?Object.defineProperty(o,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):o[s]=l},function(e,t,a){"use strict";a.d(t,"e",(function(){return w})),a.d(t,"d",(function(){return C})),a.d(t,"c",(function(){return E})),a.d(t,"a",(function(){return k})),a.d(t,"b",(function(){return O}));var n=a(21),r=a(15),i=a(190),o=a(3),s=(a(349),a(5)),l=a(4),c=a(18),u=a(1),m=a(191),h=(a(146),a(31),a(161),a(38)),p=a(43),d=a(8),f=a(503),g=a(196),y=a(0),_=a.n(y);a(34);function b(e){var t=e.name;r.a[t]=e}function E(){for(var e in c.a)c.a.hasOwnProperty(e)&&(c.a[e].augmentations=[]);Object(f.a)(r.a);const t=function(){var 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%.<br>Increases the player's hacking speed by 10%.<br>Increases the amount of money the player's gains from hacking by 25%.<br>Improves grow() by 10%."},{bonuses:{hacking_mult:1.15,hacking_exp_mult:2},description:"Increases the player's hacking skill by 15%.<br>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%.<br>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%.<br>Increases the player's charisma experience gain rate by 100%."},{bonuses:{hacknet_node_money_mult:1.2,hacknet_node_purchase_cost_mult:.85,hacknet_node_ram_cost_mult:.85,hacknet_node_core_cost_mult:.85,hacknet_node_level_cost_mult:.85},description:"Increases the amount of money produced by Hacknet Nodes by 20%.<br>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%.<br>Increases the amount of reputation the player gains when working for a company by 25%.<br>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%.<br>Increases the amount of money the player gains from crimes by 100%."}];const 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())]}(),a={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(t.bonuses).forEach(e=>a[e]=t.bonuses[e]);const i=new n.a(a);i.addToFactions(["Speakers for the Dead"]),O(o.a.UnstableCircadianModulator)&&delete r.a[o.a.UnstableCircadianModulator],b(i);const m=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});m.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),O(o.a.HemoRecirculator)&&delete r.a[o.a.HemoRecirculator],b(m);const d=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});d.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),O(o.a.Targeting1)&&delete r.a[o.a.Targeting1],b(d);const y=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});y.addToFactions(["The Dark Army","The Syndicate","Sector-12","OmniTek Incorporated","KuaiGong International","Blade Industries"]),O(o.a.Targeting2)&&delete r.a[o.a.Targeting2],b(y);const E=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});E.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),O(o.a.Targeting3)&&delete r.a[o.a.Targeting3],b(E);const k=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});k.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),O(o.a.SyntheticHeart)&&delete r.a[o.a.SyntheticHeart],b(k);const C=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});C.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),O(o.a.SynfibrilMuscle)&&delete r.a[o.a.SynfibrilMuscle],b(C);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"]),O(o.a.CombatRib1)&&delete r.a[o.a.CombatRib1],b(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"]),O(o.a.CombatRib2)&&delete r.a[o.a.CombatRib2],b(S);const T=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});T.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),O(o.a.CombatRib3)&&delete r.a[o.a.CombatRib3],b(T);const x=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});x.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),O(o.a.NanofiberWeave)&&delete r.a[o.a.NanofiberWeave],b(x);const M=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});M.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),O(o.a.SubdermalArmor)&&delete r.a[o.a.SubdermalArmor],b(M);const P=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});P.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),O(o.a.WiredReflexes)&&delete r.a[o.a.WiredReflexes],b(P);const A=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});A.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),O(o.a.GrapheneBoneLacings)&&delete r.a[o.a.GrapheneBoneLacings],b(A);const R=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});R.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),O(o.a.BionicSpine)&&delete r.a[o.a.BionicSpine],b(R);const N=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});N.addToFactions(["Fulcrum Secret Technologies","ECorp"]),O(o.a.GrapheneBionicSpine)&&delete r.a[o.a.GrapheneBionicSpine],b(N);const D=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});D.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),O(o.a.BionicLegs)&&delete r.a[o.a.BionicLegs],b(D);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"]),O(o.a.GrapheneBionicLegs)&&delete r.a[o.a.GrapheneBionicLegs],b(I);const j=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});j.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),O(o.a.SpeechProcessor)&&delete r.a[o.a.SpeechProcessor],b(j);const L=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});L.addToFactions(["Silhouette"]),O(o.a.TITN41Injection)&&delete r.a[o.a.TITN41Injection],b(L);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"]),O(o.a.EnhancedSocialInteractionImplant)&&delete r.a[o.a.EnhancedSocialInteractionImplant],b(B);const F=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});F.addToFactions(["CyberSec","NiteSec"]),O(o.a.BitWire)&&delete r.a[o.a.BitWire],b(F);const W=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});W.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),O(o.a.ArtificialBioNeuralNetwork)&&delete r.a[o.a.ArtificialBioNeuralNetwork],b(W);const U=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});U.addToFactions(["The Black Hand","NiteSec"]),O(o.a.ArtificialSynapticPotentiation)&&delete r.a[o.a.ArtificialSynapticPotentiation],b(U);const G=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});G.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),O(o.a.EnhancedMyelinSheathing)&&delete r.a[o.a.EnhancedMyelinSheathing],b(G);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"]),O(o.a.SynapticEnhancement)&&delete r.a[o.a.SynapticEnhancement],b(H);const K=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});K.addToFactions(["NiteSec"]),O(o.a.NeuralRetentionEnhancement)&&delete r.a[o.a.NeuralRetentionEnhancement],b(K);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"]),O(o.a.DataJack)&&delete r.a[o.a.DataJack],b(q);const $=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});$.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),O(o.a.ENM)&&delete r.a[o.a.ENM],b($);const z=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});z.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),O(o.a.ENMCore)&&delete r.a[o.a.ENMCore],b(z);const Y=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});Y.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),O(o.a.ENMCoreV2)&&delete r.a[o.a.ENMCoreV2],b(Y);const V=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});V.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),O(o.a.ENMCoreV3)&&delete r.a[o.a.ENMCoreV3],b(V);const J=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});J.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),O(o.a.ENMAnalyzeEngine)&&delete r.a[o.a.ENMAnalyzeEngine],b(J);const X=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});X.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),O(o.a.ENMDMA)&&delete r.a[o.a.ENMDMA],b(X);const Q=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});Q.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),O(o.a.Neuralstimulator)&&delete r.a[o.a.Neuralstimulator],b(Q);const Z=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});Z.addToFactions(["BitRunners"]),O(o.a.NeuralAccelerator)&&delete r.a[o.a.NeuralAccelerator],b(Z);const ee=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});ee.addToFactions(["CyberSec"]),O(o.a.CranialSignalProcessorsG1)&&delete r.a[o.a.CranialSignalProcessorsG1],b(ee);const te=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});te.addToFactions(["CyberSec","NiteSec"]),O(o.a.CranialSignalProcessorsG2)&&delete r.a[o.a.CranialSignalProcessorsG2],b(te);const ae=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});ae.addToFactions(["NiteSec","The Black Hand","BitRunners"]),O(o.a.CranialSignalProcessorsG3)&&delete r.a[o.a.CranialSignalProcessorsG3],b(ae);const ne=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});ne.addToFactions(["The Black Hand","BitRunners"]),O(o.a.CranialSignalProcessorsG4)&&delete r.a[o.a.CranialSignalProcessorsG4],b(ne);const re=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});re.addToFactions(["BitRunners"]),O(o.a.CranialSignalProcessorsG5)&&delete r.a[o.a.CranialSignalProcessorsG5],b(re);const ie=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});ie.addToFactions(["Clarke Incorporated"]),O(o.a.NeuronalDensification)&&delete r.a[o.a.NeuronalDensification],b(ie);const oe=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});oe.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Clarke Incorporated","Four Sigma","Bachman & Associates"]),O(o.a.NuoptimalInjectorImplant)&&delete r.a[o.a.NuoptimalInjectorImplant],b(oe);const se=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});se.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),O(o.a.SpeechEnhancement)&&delete r.a[o.a.SpeechEnhancement],b(se);const le=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});le.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),O(o.a.FocusWire)&&delete r.a[o.a.FocusWire],b(le);const ce=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});ce.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),O(o.a.PCDNI)&&delete r.a[o.a.PCDNI],b(ce);const ue=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});ue.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),O(o.a.PCDNIOptimizer)&&delete r.a[o.a.PCDNIOptimizer],b(ue);const me=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});me.addToFactions(["Fulcrum Secret Technologies"]),O(o.a.PCDNINeuralNetwork)&&delete r.a[o.a.PCDNINeuralNetwork],b(me);const he=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});he.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),O(o.a.ADRPheromone1)&&delete r.a[o.a.ADRPheromone1],b(he);const pe=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});pe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),O(o.a.ADRPheromone2)&&delete r.a[o.a.ADRPheromone2],b(pe);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"]),O(o.a.ShadowsSimulacrum)&&delete r.a[o.a.ShadowsSimulacrum],b(de);const fe=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:.85});fe.addToFactions(["Netburners"]),O(o.a.HacknetNodeCPUUpload)&&delete r.a[o.a.HacknetNodeCPUUpload],b(fe);const ge=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:.85});ge.addToFactions(["Netburners"]),O(o.a.HacknetNodeCacheUpload)&&delete r.a[o.a.HacknetNodeCacheUpload],b(ge);const ye=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:.9});ye.addToFactions(["Netburners"]),O(o.a.HacknetNodeNICUpload)&&delete r.a[o.a.HacknetNodeNICUpload],b(ye);const _e=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});_e.addToFactions(["Netburners"]),O(o.a.HacknetNodeKernelDNI)&&delete r.a[o.a.HacknetNodeKernelDNI],b(_e);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"]),O(o.a.HacknetNodeCoreDNI)&&delete r.a[o.a.HacknetNodeCoreDNI],b(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:_.a.createElement(_.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:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.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 Ce=Math.pow(l.a.NeuroFluxGovernorLevelMult,ke);Ee.baseRepRequirement=500*Ce*s.a.AugmentationRepCost,Ee.baseCost=75e4*Ce*s.a.AugmentationMoneyCost,O(o.a.NeuroFluxGovernor)&&delete r.a[o.a.NeuroFluxGovernor],Ee.addToAllFactions(),b(Ee);const Oe=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});Oe.addToFactions(["CyberSec","Aevum"]),O(o.a.Neurotrainer1)&&delete r.a[o.a.Neurotrainer1],b(Oe);const we=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});we.addToFactions(["BitRunners","NiteSec"]),O(o.a.Neurotrainer2)&&delete r.a[o.a.Neurotrainer2],b(we);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"]),O(o.a.Neurotrainer3)&&delete r.a[o.a.Neurotrainer3],b(Se);const Te=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});Te.addToFactions(["Blade Industries","KuaiGong International"]),O(o.a.Hypersight)&&delete r.a[o.a.Hypersight],b(Te);const xe=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});xe.addToFactions(["Slum Snakes","Tetrads"]),O(o.a.LuminCloaking1)&&delete r.a[o.a.LuminCloaking1],b(xe);const Me=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});Me.addToFactions(["Slum Snakes","Tetrads"]),O(o.a.LuminCloaking2)&&delete r.a[o.a.LuminCloaking2],b(Me);const Pe=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});Pe.addToFactions(["Slum Snakes"]),O(o.a.SmartSonar)&&delete r.a[o.a.SmartSonar],b(Pe);const Ae=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});Ae.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),O(o.a.PowerRecirculator)&&delete r.a[o.a.PowerRecirculator],b(Ae);const Re=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});Re.addToFactions(["Illuminati"]),O(o.a.QLink)&&delete r.a[o.a.QLink],b(Re);const Ne=new n.a({name:o.a.TheRedPill,repCost:25e5,moneyCost:0,info:"It's time to leave the cave.",stats:_.a.createElement(_.a.Fragment,null)});Ne.addToFactions(["Daedalus"]),O(o.a.TheRedPill)&&delete r.a[o.a.TheRedPill],b(Ne);const De=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});De.addToFactions(["The Covenant"]),O(o.a.SPTN97)&&delete r.a[o.a.SPTN97],b(De);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:_.a.createElement(_.a.Fragment,null)});Ie.addToFactions(["ECorp"]),O(o.a.HiveMind)&&delete r.a[o.a.HiveMind],b(Ie);const je=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});je.addToFactions(["MegaCorp"]),O(o.a.CordiARCReactor)&&delete r.a[o.a.CordiARCReactor],b(je);const Le=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});Le.addToFactions(["Bachman & Associates"]),O(o.a.SmartJaw)&&delete r.a[o.a.SmartJaw],b(Le);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"]),O(o.a.Neotra)&&delete r.a[o.a.Neotra],b(Be);const Fe=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});Fe.addToFactions(["NWO"]),O(o.a.Xanipher)&&delete r.a[o.a.Xanipher],b(Fe);const We=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});We.addToFactions(["NWO"]),O(o.a.HydroflameLeftArm)&&delete r.a[o.a.HydroflameLeftArm],b(We);const Ue=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});Ue.addToFactions(["Clarke Incorporated"]),O(o.a.nextSENS)&&delete r.a[o.a.nextSENS],b(Ue);const Ge=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});Ge.addToFactions(["OmniTek Incorporated"]),O(o.a.OmniTekInfoLoad)&&delete r.a[o.a.OmniTekInfoLoad],b(Ge);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"]),O(o.a.PhotosyntheticCells)&&delete r.a[o.a.PhotosyntheticCells],b(He);const Ke=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]});Ke.addToFactions(["BitRunners"]),O(o.a.Neurolink)&&delete r.a[o.a.Neurolink],b(Ke);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"]),O(o.a.TheBlackHand)&&delete r.a[o.a.TheBlackHand],b(qe);const $e=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});$e.addToFactions(["NiteSec"]),O(o.a.CRTX42AA)&&delete r.a[o.a.CRTX42AA],b($e);const ze=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});ze.addToFactions(["Chongqing"]),O(o.a.Neuregen)&&delete r.a[o.a.Neuregen],b(ze);const Ye=new n.a({name:o.a.CashRoot,repCost:12500,moneyCost:125e6,info:_.a.createElement(_.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]});Ye.addToFactions(["Sector-12"]),O(o.a.CashRoot)&&delete r.a[o.a.CashRoot],b(Ye);const Ve=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});Ve.addToFactions(["New Tokyo"]),O(o.a.NutriGen)&&delete r.a[o.a.NutriGen],b(Ve);const Je=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]});Je.addToFactions(["Aevum"]),O(o.a.PCMatrix)&&delete r.a[o.a.PCMatrix],b(Je);const Xe=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});Xe.addToFactions(["Ishima"]),O(o.a.INFRARet)&&delete r.a[o.a.INFRARet],b(Xe);const Qe=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});Qe.addToFactions(["Volhaven"]),O(o.a.DermaForce)&&delete r.a[o.a.DermaForce],b(Qe);const Ze=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});Ze.addToFactions(["Speakers for the Dead"]),O(o.a.GrapheneBrachiBlades)&&delete r.a[o.a.GrapheneBrachiBlades],b(Ze);const et=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});et.addToFactions(["The Dark Army"]),O(o.a.GrapheneBionicArms)&&delete r.a[o.a.GrapheneBionicArms],b(et);const tt=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});tt.addToFactions(["The Syndicate"]),O(o.a.BrachiBlades)&&delete r.a[o.a.BrachiBlades],b(tt);const at=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});at.addToFactions(["Tetrads"]),O(o.a.BionicArms)&&delete r.a[o.a.BionicArms],b(at);const nt=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});nt.addToFactions(["Tian Di Hui"]),O(o.a.SNA)&&delete r.a[o.a.SNA],b(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(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"]),v(h);const p=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});p.addToFactions(["Bladeburners"]),v(p);const d=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});d.addToFactions(["Bladeburners"]),v(d);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"]),v(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"]),v(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"]),v(y);const b=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:_.a.createElement(_.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});b.addToFactions(["Bladeburners"]),v(b)}for(var e in Ce=Math.pow(l.a.MultipleAugMultiplier*[1,.96,.94,.93][p.a[11]],u.a.queuedAugmentations.length),r.a)r.a.hasOwnProperty(e)&&(r.a[e].baseCost*=Ce);u.a.reapplyAllAugmentations()}function v(e){if(!(e instanceof n.a))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;O(t)&&delete r.a[t],b(e)}function k(e,t=!1){r.a[e.name].owned=!0;const a=r.a[e.name];for(const e in a.mults)null==u.a[e]?console.warn("Augmentation has unrecognized multiplier property: "+e):u.a[e]*=a.mults[e];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){var n=new i.a(e.name);u.a.augmentations.push(n)}}function C(){if(0==u.a.queuedAugmentations.length)return Object(d.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(k(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+"<br>"}u.a.queuedAugmentations=[],Object(d.a)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:<br>"+e+"<br>You wake up in your home...you feel different..."),Object(m.a)()}function O(e){return r.a.hasOwnProperty(e)}function w(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})),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(e){a.d(t,"a",(function(){return N})),a.d(t,"c",(function(){return _})),a.d(t,"d",(function(){return E})),a.d(t,"b",(function(){return b}));var n=a(4),r=a(26),i=a(70),o=a(1),s=a(8),l=a(11),c=a(62),u=a(135),m=a(14),h=a(65),p=a(68),d=(a(876),a(0)),f=a.n(d),g=a(34),y=a.n(g);let _=!1,b=null;function E(e,t){_=e,b=e?t:null}e(document).keydown((function(e){if(_&&b&&0!=b.selectedNode.length)switch(e.keyCode){case 65:b.actionButtons[0].click();break;case 83:b.actionButtons[1].click();break;case 87:b.actionButtons[2].click();break;case 70:b.actionButtons[3].click();break;case 82:b.actionButtons[4].click();break;case 68:b.actionButtons[5].click()}}));let v="CPU Core Node",k="Firewall Node",C="Database Node",O="Spam Node",w="Transfer Node",S="Shield Node",T="Attacking",x="Scanning",M="Weakening",P="Fortifying",A="Overflowing";function R(e,t){this.type=e,this.atk=t.atk?t.atk:0,this.def=t.def?t.def:0,this.hp=t.hp?t.hp:0,this.maxhp=this.hp,this.plyrCtrl=!1,this.enmyCtrl=!1,this.pos=[0,0],this.el=null,this.action=null,this.targetedCount=0,this.conn=null}function N(e,t){this.faction=t,this.started=!1,this.time=18e4,this.playerCores=[],this.playerNodes=[],this.playerAtk=0,this.playerDef=0,this.enemyCores=[],this.enemyDatabases=[],this.enemyNodes=[],this.enemyAtk=0,this.enemyDef=0,this.miscNodes=[],this.selectedNode=[],this.actionButtons=[],this.availablePositions=[];for(var a=0;a<8;++a)for(var r=0;r<8;++r)this.availablePositions.push([a,r]);this.map=[];for(var i=0;i<8;++i)this.map.push([null,null,null,null,null,null,null,null]);this.jsplumbinstance=null,this.difficulty=e/n.a.HackingMissionRepToDiffConversion+1,this.reward=250+e/n.a.HackingMissionRepToRewardConversion}function D(e){e.selectedNode.length>0&&(e.selectedNode.forEach((function(t){t.deselect(e.actionButtons)})),e.selectedNode.length=0)}R.prototype.setPosition=function(e,t){this.pos=[e,t]},R.prototype.setControlledByPlayer=function(){this.plyrCtrl=!0,this.enmyCtrl=!1,this.el&&(this.el.classList.remove("hack-mission-enemy-node"),this.el.classList.add("hack-mission-player-node"))},R.prototype.setControlledByEnemy=function(){this.plyrCtrl=!1,this.enmyCtrl=!0,this.el&&(this.el.classList.remove("hack-mission-player-node"),this.el.classList.add("hack-mission-enemy-node"))},R.prototype.select=function(e){if(!this.enmyCtrl){this.el.classList.add("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive");switch(this.type){case v:for(t=0;t<e.length;++t)e[t].classList.remove("a-link-button-inactive"),e[t].classList.add("a-link-button");break;case w:e[1].classList.remove("a-link-button-inactive"),e[1].classList.add("a-link-button"),e[2].classList.remove("a-link-button-inactive"),e[2].classList.add("a-link-button"),e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button"),e[4].classList.remove("a-link-button-inactive"),e[4].classList.add("a-link-button"),e[5].classList.remove("a-link-button-inactive"),e[5].classList.add("a-link-button");break;case S:case k:e[3].classList.remove("a-link-button-inactive"),e[3].classList.add("a-link-button")}}},R.prototype.deselect=function(e){this.el.classList.remove("hack-mission-player-node-active");for(var t=0;t<e.length;++t)e[t].classList.remove("a-link-button"),e[t].classList.add("a-link-button-inactive")},R.prototype.untarget=function(){0!==this.targetedCount?--this.targetedCount:console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`)},N.prototype.init=function(){this.createPageDom();for(var e=o.a.getHomeComputer(),t=0;t<e.cpuCores;++t){var a={atk:o.a.hacking_skill/7.5+30,def:o.a.hacking_skill/20,hp:o.a.hacking_skill/4};this.playerCores.push(new R(v,a)),this.playerCores[t].setControlledByPlayer(),this.setNodePosition(this.playerCores[t],t,0),this.removeAvailablePosition(t,0)}var n=Math.min(8,Math.max(1,Math.round(this.difficulty/4))),r=Math.min(20,Object(m.a)(Math.round(this.difficulty/3),Math.round(this.difficulty/3)+1)),i=Math.min(10,Object(m.a)(1,Math.round(this.difficulty/3)+1)),s=n+r+i,l=7-Math.floor(s/8),c=Object(u.a)(.8+this.difficulty/5,10);for(t=0;t<n;++t){a={atk:c*Object(m.a)(80,86),def:c*Object(m.a)(5,10),hp:c*Object(m.a)(210,230)};this.enemyCores.push(new R(v,a)),this.enemyCores[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyCores[t],l)}for(t=0;t<r;++t){a={atk:0,def:c*Object(m.a)(10,20),hp:c*Object(m.a)(275,300)};this.enemyNodes.push(new R(k,a)),this.enemyNodes[t].setControlledByEnemy(),this.setNodeRandomPosition(this.enemyNodes[t],l)}for(t=0;t<i;++t){a={atk:0,def:c*Object(m.a)(30,55),hp:c*Object(m.a)(210,275)};var h=new R(C,a);h.setControlledByEnemy(),this.setNodeRandomPosition(h,l),this.enemyDatabases.push(h)}this.calculateDefenses(),this.calculateAttacks(),this.createMap()},N.prototype.createPageDom=function(){var e=document.getElementById("mission-container"),t=1+this.faction.favor/100,a=this.reward*o.a.faction_rep_mult*t,r=document.createElement("p");y.a.render(f.a.createElement(f.a.Fragment,null,"You are about to start a hacking mission! You will gain ",Object(c.a)(a)," faction reputation with"," ",this.faction.name," if you win. Click the 'Start' button to begin."),r),r.style.display="block",r.classList.add("hack-mission-header-element"),r.style.width="80%";var i=document.createElement("a");i.innerText="How to Play",i.classList.add("a-link-button"),i.style.display="inline-block",i.classList.add("hack-mission-header-element"),i.addEventListener("click",(function(){return Object(s.a)(n.a.HackingMissionHowToPlay),!1}));var l=document.createElement("a");l.innerHTML="Start",l.setAttribute("id","hack-mission-start-btn"),l.classList.add("a-link-button"),l.classList.add("hack-mission-header-element"),l.style.display="inline-block",l.addEventListener("click",()=>(this.start(),!1));var u=document.createElement("a");u.innerHTML="Forfeit Mission (Exit)",u.classList.add("a-link-button"),u.classList.add("hack-mission-header-element"),u.style.display="inline-block",u.addEventListener("click",()=>(this.finishMission(!1),!1));var m=document.createElement("p");m.setAttribute("id","hacking-mission-timer"),m.style.display="inline-block",m.style.margin="6px";var h=document.createElement("span");h.style.display="block",h.classList.add("hack-mission-action-buttons-container");for(var p=0;p<6;++p)this.actionButtons.push(document.createElement("a")),this.actionButtons[p].style.display="inline-block",this.actionButtons[p].classList.add("a-link-button-inactive"),this.actionButtons[p].classList.add("tooltip"),this.actionButtons[p].classList.add("hack-mission-header-element"),h.appendChild(this.actionButtons[p]);this.actionButtons[0].innerText="Attack(a)";var d=document.createElement("span");d.classList.add("tooltiptexthigh"),d.innerText="Lowers the targeted node's HP. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[0].appendChild(d),this.actionButtons[1].innerText="Scan(s)";var g=document.createElement("span");g.classList.add("tooltiptexthigh"),g.innerText="Lowers the targeted node's defense. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[1].appendChild(g),this.actionButtons[2].innerText="Weaken(w)";var _=document.createElement("span");_.classList.add("tooltiptexthigh"),_.innerText="Lowers the targeted node's attack. The effectiveness of this depends on this node's Attack level, your hacking level, and the opponent's defense level.",this.actionButtons[2].appendChild(_),this.actionButtons[3].innerText="Fortify(f)";var b=document.createElement("span");b.classList.add("tooltiptexthigh"),b.innerText="Raises this node's Defense level. The effectiveness of this depends on your hacking level",this.actionButtons[3].appendChild(b),this.actionButtons[4].innerText="Overflow(r)";var E=document.createElement("span");E.classList.add("tooltiptexthigh"),E.innerText="Raises this node's Attack level but lowers its Defense level. The effectiveness of this depends on your hacking level.",this.actionButtons[4].appendChild(E),this.actionButtons[5].innerText="Drop Connection(d)";var k=document.createElement("span");k.classList.add("tooltiptexthigh"),k.innerText="Removes this Node's current connection to some target Node, if it has one. This can also be done by simply clicking the white connection line.",this.actionButtons[5].appendChild(k);var C=document.createElement("p"),O=document.createElement("p");C.style.display="inline-block",O.style.display="inline-block",C.style.color="#00ccff",O.style.color="red",C.style.margin="4px",O.style.margin="4px",C.setAttribute("id","hacking-mission-player-stats"),O.setAttribute("id","hacking-mission-enemy-stats"),h.appendChild(C),h.appendChild(O),this.actionButtons[0].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode[0].type===v&&(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(T,!1),this.selectedNode.forEach((function(e){e.action=T}))):console.error("Pressing Action button without selected node")}),this.actionButtons[1].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v&&e!==w||(this.setActionButtonsActive(e),this.setActionButton(x,!1),this.selectedNode.forEach((function(e){e.action=x})))}else console.error("Pressing Action button without selected node")}),this.actionButtons[2].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v&&e!==w||(this.setActionButtonsActive(e),this.setActionButton(M,!1),this.selectedNode.forEach((function(e){e.action=M})))}else console.error("Pressing Action button without selected node")}),this.actionButtons[3].addEventListener("click",()=>{this.selectedNode.length>0?(this.setActionButtonsActive(this.selectedNode[0].type),this.setActionButton(P,!1),this.selectedNode.forEach((function(e){e.action=P}))):console.error("Pressing Action button without selected node")}),this.actionButtons[4].addEventListener("click",()=>{if(this.selectedNode.length>0){var e=this.selectedNode[0].type;e!==v&&e!==w||(this.setActionButtonsActive(e),this.setActionButton(A,!1),this.selectedNode.forEach((function(e){e.action=A})))}else console.error("Pressing Action button without selected node")}),this.actionButtons[5].addEventListener("click",()=>{this.selectedNode.length>0?this.selectedNode.forEach((function(e){if(e.conn){var t=e.conn.endpoints;t[0].detachFrom(t[1])}e.action=P})):console.error("Pressing Action button without selected node")});var S=document.createElement("p");e.appendChild(r),e.appendChild(i),e.appendChild(l),e.appendChild(u),e.appendChild(m),e.appendChild(h),e.appendChild(S)},N.prototype.setActionButtonsInactive=function(){for(var e=0;e<this.actionButtons.length;++e)this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive")},N.prototype.setActionButtonsActive=function(e=null){for(var t=0;t<this.actionButtons.length;++t)this.actionButtons[t].classList.add("a-link-button"),this.actionButtons[t].classList.remove("a-link-button-inactive");if(e)switch(e){case k:case S:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive"),this.actionButtons[1].classList.remove("a-link-button"),this.actionButtons[1].classList.add("a-link-button-inactive"),this.actionButtons[2].classList.remove("a-link-button"),this.actionButtons[2].classList.add("a-link-button-inactive"),this.actionButtons[4].classList.remove("a-link-button"),this.actionButtons[4].classList.add("a-link-button-inactive"),this.actionButtons[5].classList.remove("a-link-button"),this.actionButtons[5].classList.add("a-link-button-inactive");break;case w:this.actionButtons[0].classList.remove("a-link-button"),this.actionButtons[0].classList.add("a-link-button-inactive")}},N.prototype.setActionButton=function(e,t=!0){if(Object(h.a)(e))switch(e){case T:e=0;break;case x:e=1;break;case M:e=2;break;case P:e=3;break;case A:default:e=4}t?(this.actionButtons[e].classList.remove("a-link-button-inactive"),this.actionButtons[e].classList.add("a-link-button")):(this.actionButtons[e].classList.remove("a-link-button"),this.actionButtons[e].classList.add("a-link-button-inactive"))},N.prototype.calculateAttacks=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].atk;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].atk;this.playerAtk=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.c)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.c)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].atk;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].atk;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].atk;this.enemyAtk=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.c)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.c)(this.enemyDef,1)},N.prototype.calculateDefenses=function(){for(var e=0,t=0;t<this.playerCores.length;++t)e+=this.playerCores[t].def;for(t=0;t<this.playerNodes.length;++t)e+=this.playerNodes[t].def;this.playerDef=e,document.getElementById("hacking-mission-player-stats").innerHTML="Player Attack: "+Object(l.c)(this.playerAtk,1)+"<br>Player Defense: "+Object(l.c)(this.playerDef,1),e=0;for(t=0;t<this.enemyCores.length;++t)e+=this.enemyCores[t].def;for(t=0;t<this.enemyDatabases.length;++t)e+=this.enemyDatabases[t].def;for(t=0;t<this.enemyNodes.length;++t)e+=this.enemyNodes[t].def;this.enemyDef=e,document.getElementById("hacking-mission-enemy-stats").innerHTML="Enemy Attack: "+Object(l.c)(this.enemyAtk,1)+"<br>Enemy Defense: "+Object(l.c)(this.enemyDef,1)},N.prototype.removeAvailablePosition=function(e,t){for(var a=0;a<this.availablePositions.length;++a)if(this.availablePositions[a][0]===e&&this.availablePositions[a][1]===t)return void this.availablePositions.splice(a,1);console.warn(`removeAvailablePosition() did not remove ${e}, ${t}`)},N.prototype.setNodePosition=function(e,t,a){e instanceof R?isNaN(t)||isNaN(a)?console.error(`Invalid values (${t}, ${a}) passed as (x, y) for setNodePosition`):(e.pos=[t,a],this.map[t][a]=e):console.warn("Non-Node object passed into setNodePOsition")},N.prototype.setNodeRandomPosition=function(e,t=0){var a=Object(m.a)(0,this.availablePositions.length-1);if(this.availablePositions[a][1]<t)return this.setNodeRandomPosition(e,t);var n=this.availablePositions.splice(a,1);n=n[0],this.setNodePosition(e,n[0],n[1])},N.prototype.createMap=function(){var e=document.createElement("div");e.classList.add("hack-mission-grid"),e.setAttribute("id","hacking-mission-map"),document.getElementById("mission-container").appendChild(e);for(var t=(this.playerAtk+this.enemyAtk)/2,a=0;a<8;++a)for(var n=0;n<8;++n)if(!(this.map[a][n]instanceof R)){var r,i=Object(m.a)(0,2),o=Object(u.a)(.85+this.difficulty/2,15);switch(i){case 0:var s={atk:0,def:1.1*t+Object(m.a)(15,45),hp:o*Object(m.a)(200,225)};r=new R(O,s);break;case 1:s={atk:0,def:1.1*t+Object(m.a)(15,45),hp:o*Object(m.a)(250,275)};r=new R(w,s);break;case 2:default:s={atk:0,def:1.1*t+Object(m.a)(30,70),hp:o*Object(m.a)(300,320)};r=new R(S,s)}this.setNodePosition(r,a,n),this.removeAvailablePosition(a,n),this.miscNodes.push(r)}for(var l=0;l<8;++l)for(var c=0;c<8;++c)this.createNodeDomElement(this.map[l][c]);for(var h=0;h<this.playerCores.length;++h)this.configurePlayerNodeElement(this.playerCores[h].el)},N.prototype.createNodeDomElement=function(e){var t=document.createElement("a"),a=document.createElement("p");e.el=t;var n,r="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1];switch(t.setAttribute("id",r),a.setAttribute("id",r+"-txt"),t.classList.add("hack-mission-node"),e.plyrCtrl?t.classList.add("hack-mission-player-node"):e.enmyCtrl&&t.classList.add("hack-mission-enemy-node"),e.type){case v:n="CPU Core<br>HP: "+Object(l.c)(e.hp,1),t.classList.add("hack-mission-cpu-node");break;case k:n="Firewall<br>HP: "+Object(l.c)(e.hp,1),t.classList.add("hack-mission-firewall-node");break;case C:n="Database<br>HP: "+Object(l.c)(e.hp,1),t.classList.add("hack-mission-database-node");break;case O:n="Spam<br>HP: "+Object(l.c)(e.hp,1),t.classList.add("hack-mission-spam-node");break;case w:n="Transfer<br>HP: "+Object(l.c)(e.hp,1),t.classList.add("hack-mission-transfer-node");break;case S:default:n="Shield<br>HP: "+Object(l.c)(e.hp,1),t.classList.add("hack-mission-shield-node")}n+="<br>Atk: "+Object(l.c)(e.atk,1)+"<br>Def: "+Object(l.c)(e.def,1),a.innerHTML=n,t.appendChild(a),document.getElementById("hacking-mission-map").appendChild(t)},N.prototype.updateNodeDomElement=function(e){if(null==e.el)return void console.error("Calling updateNodeDomElement on a Node without an element");let t,a="hacking-mission-node-"+e.pos[0]+"-"+e.pos[1],n=document.getElementById(a+"-txt");switch(e.type){case v:t="CPU Core<br>HP: "+Object(l.c)(e.hp,1);break;case k:t="Firewall<br>HP: "+Object(l.c)(e.hp,1);break;case C:t="Database<br>HP: "+Object(l.c)(e.hp,1);break;case O:t="Spam<br>HP: "+Object(l.c)(e.hp,1);break;case w:t="Transfer<br>HP: "+Object(l.c)(e.hp,1);break;case S:default:t="Shield<br>HP: "+Object(l.c)(e.hp,1)}t+="<br>Atk: "+Object(l.c)(e.atk,1)+"<br>Def: "+Object(l.c)(e.def,1),e.action&&(t+="<br>"+e.action),n.innerHTML=t},N.prototype.getNodeFromElement=function(e){var t=(Object(h.a)(e)?e:e.id).replace("hacking-mission-node-","").split("-");if(2!=t.length)return console.error("Parsing hacking mission node id. could not find coordinates"),null;var a=t[0],n=t[1];return isNaN(a)||isNaN(n)||a>=8||n>=8||a<0||n<0?(console.error(`Unexpected values (${a}, ${n}) for (x, y)`),null):this.map[a][n]},N.prototype.configurePlayerNodeElement=function(e){null==this.getNodeFromElement(e)&&console.error("Failed getting Node object");const t=()=>{!function(e,t){var a=e.getNodeFromElement(t);null==a&&console.error("Failed getting Node object"),a.plyrCtrl&&(D(e),a.select(e.actionButtons),e.selectedNode.push(a))}(this,e)};e.addEventListener("click",t);e.addEventListener("dblclick",()=>{!function(e,t){var a=e.getNodeFromElement(t);if(null==a&&console.error("Failed getting Node Object in multiselectNode()"),a.plyrCtrl){D(e);var n=a.type;n===v?e.playerCores.forEach((function(t){t.select(e.actionButtons),e.selectedNode.push(t)})):e.playerNodes.forEach((function(t){t.type===n&&(t.select(e.actionButtons),e.selectedNode.push(t))}))}}(this,e)}),e.firstChild&&e.firstChild.addEventListener("click",t)},N.prototype.configureEnemyNodeElement=function(e){for(var t=this.getNodeFromElement(e),a=0;a<this.selectedNode.length;++a)if(this.selectedNode[a]==t){t.deselect(this.actionButtons),this.selectedNode.splice(a,1);break}},N.prototype.nodeReachable=function(e){var t=e.pos[0],a=e.pos[1];return!!(t>0&&this.map[t-1][a].plyrCtrl)||(!!(t<7&&this.map[t+1][a].plyrCtrl)||(!!(a>0&&this.map[t][a-1].plyrCtrl)||!!(a<7&&this.map[t][a+1].plyrCtrl)))},N.prototype.nodeReachableByEnemy=function(e){if(null==e)return!1;var t=e.pos[0],a=e.pos[1];return!!(t>0&&this.map[t-1][a].enmyCtrl)||(!!(t<7&&this.map[t+1][a].enmyCtrl)||(!!(a>0&&this.map[t][a-1].enmyCtrl)||!!(a<7&&this.map[t][a+1].enmyCtrl)))},N.prototype.start=function(){this.started=!0,this.initJsPlumb();var e=Object(p.a)("hack-mission-start-btn");e.classList.remove("a-link-button"),e.classList.add("a-link-button-inactive")},N.prototype.initJsPlumb=function(){var e=jsPlumb.getInstance({DragOptions:{cursor:"pointer",zIndex:2e3},PaintStyle:{gradient:{stops:[[0,"#FFFFFF"],[1,"#FFFFFF"]]},stroke:"#FFFFFF",strokeWidth:8}});this.jsplumbinstance=e;for(var t=0;t<this.playerCores.length;++t)e.makeSource(this.playerCores[t].el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyCores.length;++t)e.makeTarget(this.enemyCores[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.enemyDatabases.length;++t)e.makeTarget(this.enemyDatabases[t].el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]});for(t=0;t<this.enemyNodes.length;++t)e.makeTarget(this.enemyNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});for(t=0;t<this.miscNodes.length;++t)e.makeTarget(this.miscNodes[t].el,{maxConnections:-1,anchor:"Continuous",connector:"Flowchart"});e.bind("click",e=>{if(!this.getNodeFromElement(e.source).enmyCtrl){var t=e.endpoints;t[0].detachFrom(t[1])}}),e.bind("connection",e=>{var t=this.getNodeFromElement(e.target);this.getNodeFromElement(e.source).enmyCtrl||(this.nodeReachable(t)?(this.getNodeFromElement(e.source).conn=e.connection,++(t=this.getNodeFromElement(e.target)).targetedCount):e.sourceEndpoint.detachFrom(e.targetEndpoint))}),e.bind("connectionDetached",e=>{this.getNodeFromElement(e.source).conn=null,this.getNodeFromElement(e.target).untarget()})},N.prototype.dropAllConnectionsFromNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),a=t.length-1;a>=0;--a)t[a].source==e.el&&t[a].endpoints[0].detachFrom(t[a].endpoints[1])},N.prototype.dropAllConnectionsToNode=function(e){for(var t=this.jsplumbinstance.getAllConnections(),a=t.length-1;a>=0;--a)t[a].target==e.el&&t[a].endpoints[0].detachFrom(t[a].endpoints[1]);e.beingTargeted=!1};var I=0;N.prototype.process=function(e=1){if(this.started&&!((I+=e)<2)){var t=!1;this.playerCores.forEach(e=>{t|=this.processNode(e,I)}),this.playerNodes.forEach(e=>{e.type!==w&&e.type!==S&&e.type!==k||(t|=this.processNode(e,I))}),this.enemyCores.forEach(e=>{this.enemyAISelectAction(e),t|=this.processNode(e,I)}),this.enemyNodes.forEach(e=>{e.type!==w&&e.type!==S&&e.type!==k||(this.enemyAISelectAction(e),t|=this.processNode(e,I))}),this.enemyDatabases.forEach(e=>{e.maxhp+=.1*I,e.hp+=.1*I}),t&&(this.calculateAttacks(),this.calculateDefenses()),0!==this.enemyDatabases.length?0!==this.playerCores.length?(this.miscNodes.forEach(e=>{e.def+=.1*I,e.maxhp+=.05*I,e.hp+=.1*I,e.hp>e.maxhp&&(e.hp=e.maxhp),this.updateNodeDomElement(e)}),this.time-=I*r.Engine._idleSpeed,this.time<=0?this.finishMission(!1):(this.updateTimer(),I=0)):this.finishMission(!1):this.finishMission(!0)}},N.prototype.processNode=function(e,t=1){if(null!=e.action){var a,r,i=null;e.conn&&(null==(i=null!=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))||(i.plyrCtrl?(a=this.playerDef,r=this.enemyAtk):i.enmyCtrl?(a=this.enemyDef,r=this.playerAtk):(a=i.def,r=e.plyrCtrl?this.playerAtk:this.enemyAtk)));var s=!1,l=e.plyrCtrl,c=this.difficulty*n.a.HackingMissionDifficultyToHacking;switch(e.action){case T:if(null==i)break;if(null==e.conn)break;var u=this.calculateAttackDamage(r,a,l?o.a.hacking_skill:c);i.hp-=u/5*t;break;case x:if(null==i)break;if(null==e.conn)break;var m=this.calculateScanEffect(r,a,l?o.a.hacking_skill:c);i.def-=m/5*t,s=!0;break;case M:if(null==i)break;if(null==e.conn)break;m=this.calculateWeakenEffect(r,a,l?o.a.hacking_skill:c);i.atk-=m/5*t,s=!0;break;case P:m=this.calculateFortifyEffect(o.a.hacking_skill);e.def+=m/5*t,s=!0;break;case A:m=this.calculateOverflowEffect(o.a.hacking_skill);if(e.def<m)break;e.def-=m/5*t,e.atk+=m/5*t,s=!0;break;default:console.error("Invalid Node Action: "+e.action)}if(e.atk<0&&(e.atk=0),e.def<0&&(e.def=0),i&&i.atk<0&&(i.atk=0),i&&i.def<0&&(i.def=0),i&&i.hp<=0){var h=e.plyrCtrl;i.hp=i.maxhp,i.action=null,i.conn=null,this.selectedNode==i&&i.deselect(this.actionButtons),i.atk/=2,i.def/=3.5;var p=!i.plyrCtrl&&!i.enmyCtrl;function d(e,t,a){for(var n=0;n<e.length;++n)if(e[n]==a){var r=e.splice(n,1);r=r[0],t.push(r);break}}switch(this.dropAllConnectionsToNode(i),this.dropAllConnectionsFromNode(i),h?(i.setControlledByPlayer(),this.jsplumbinstance.unmakeTarget(i.el),this.jsplumbinstance.makeSource(i.el,{deleteEndpointsOnEmpty:!0,maxConnections:1,anchor:"Continuous",connector:"Flowchart"})):(i.setControlledByEnemy(),e.conn=null,this.jsplumbinstance.unmakeSource(i.el),this.jsplumbinstance.makeTarget(i.el,{maxConnections:-1,anchor:"Continuous",connector:["Flowchart"]})),s=!0,i.type){case v:h?(d(this.enemyCores,this.playerCores,i),this.configurePlayerNodeElement(i.el)):(d(this.playerCores,this.enemyCores,i),this.configureEnemyNodeElement(i.el));break;case k:h?d(this.enemyNodes,this.playerNodes,i):(d(this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el));break;case C:h?d(this.enemyDatabases,this.playerNodes,i):d(this.playerNodes,this.enemyDatabases,i);break;case O:h?(d(p?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.time+=n.a.HackingMissionSpamTimeIncrease):d(p?this.miscNodes:this.playerNodes,this.enemyNodes,i);break;case w:h?(d(p?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.playerCores.forEach((function(e){e.atk*=n.a.HackingMissionTransferAttackIncrease})),this.configurePlayerNodeElement(i.el)):(d(p?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.enemyCores.forEach((function(e){e.atk*=n.a.HackingMissionTransferAttackIncrease})),this.configureEnemyNodeElement(i.el));break;case S:h?(d(p?this.miscNodes:this.enemyNodes,this.playerNodes,i),this.configurePlayerNodeElement(i.el)):(d(p?this.miscNodes:this.playerNodes,this.enemyNodes,i),this.configureEnemyNodeElement(i.el))}p&&this.miscNodes.forEach(e=>{0===e.targetedCount&&(e.def*=n.a.HackingMissionMiscDefenseIncrease)})}return this.updateNodeDomElement(e),i&&this.updateNodeDomElement(i),s}},N.prototype.enemyAISelectAction=function(e){if(null!=e)switch(e.type){case v:if(null==e.conn){if(0===this.miscNodes.length){var t=Object(m.a)(0,this.playerNodes.length-1);if(a=0===this.playerNodes.length?null:this.playerNodes[t],this.nodeReachableByEnemy(a))e.conn=this.jsplumbinstance.connect({source:e.el,target:a.el}),++a.targetedCount;else{if(t=Object(m.a)(0,this.playerCores.length-1),0===this.playerCores.length)return;a=this.playerCores[t],this.nodeReachableByEnemy(a)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:a.el}),++a.targetedCount)}}else{t=Object(m.a)(0,this.miscNodes.length-1);var a=this.miscNodes[t];this.nodeReachableByEnemy(a)&&(e.conn=this.jsplumbinstance.connect({source:e.el,target:a.el}),++a.targetedCount)}e.action=P}else{var n;null==(n=e.conn.target?this.getNodeFromElement(e.conn.target):this.getNodeFromElement(e.conn.targetId))&&console.error("Error getting Target node Object in enemyAISelectAction()"),n.def>this.enemyAtk+15?e.def<50?e.action=P:e.action=A:Math.abs(n.def-this.enemyAtk)<=15?e.action=x:e.action=T}break;case w:e.def<125?e.action=P:e.action=A;break;case k:case S:e.action=P}};N.prototype.calculateAttackDamage=function(e,t,a=0){return Math.max(.55*(e+a/80-t),1)},N.prototype.calculateScanEffect=function(e,t,a=0){return Math.max(.6*(e+a/25-.95*t),2)},N.prototype.calculateWeakenEffect=function(e,t,a=0){return Math.max(e+a/25-.95*t,2)},N.prototype.calculateFortifyEffect=function(e=0){return.9*e/130},N.prototype.calculateOverflowEffect=function(e=0){return.95*e/130},N.prototype.updateTimer=function(){var e=document.getElementById("hacking-mission-timer"),t=Math.round(this.time/1e3),a=Math.trunc(t/60);t%=60;var n=("0"+a).slice(-2)+":"+("0"+t).slice(-2);e.innerText="Time left: "+n},N.prototype.finishMission=function(e){if(_=!1,b=null,e){var t=1+this.faction.favor/100,a=this.reward*o.a.faction_rep_mult*t;Object(s.a)(f.a.createElement(f.a.Fragment,null,"Mission won! You earned ",Object(c.a)(a)," reputation with ",this.faction.name)),o.a.gainIntelligenceExp(this.difficulty*n.a.IntelligenceHackingMissionBaseExpGain),this.faction.playerReputation+=a}else Object(s.a)("Mission lost/forfeited! You did not gain any faction reputation.");for(var l=document.getElementById("mission-container");l.firstChild;)l.removeChild(l.firstChild);document.getElementById("mainmenu-container").style.visibility="visible",document.getElementById("character-overview-wrapper").style.visibility="visible",r.Engine.loadFactionContent(),Object(i.a)(this.faction.name)}}).call(this,a(184))},function(e,t,a){"use strict";a.d(t,"a",(function(){return M})),a.d(t,"c",(function(){return A})),a.d(t,"e",(function(){return N})),a.d(t,"f",(function(){return I})),a.d(t,"b",(function(){return j})),a.d(t,"d",(function(){return L}));var n=a(84),r=a(179),i=a(114),o=a(153),s=a(258),l=a(4),c=a(26),u=a(291),m=a(88),h=a(259),p=a(488),d=a(189),f=a(1),g=a(194),y=a(294),_=a(156),b=a(22),E=a(27),v=a(86),k=a(319),C=a(8),O=a(137),w=a(218),S=a(65),T=a(125),x=a(225);const M=[];for(var P=0;P<l.a.NumNetscriptPorts;++P)M.push(new d.a);function A(){for(const e of i.a.values())e.env.stopFlag=!0,Object(n.a)(e);o.a.emitEvent(),i.a.clear()}function R(e){const t=e.code;var a,i;e.running=!0;try{let n=function(e,t){const a=Object(T.b)(e,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});var 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));let 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);let o=Object(T.b)(a.code,{ecmaVersion:9,allowReserved:!0,sourceType:"module"});if(1===e.specifiers.length&&"ImportNamespaceSpecifier"===e.specifiers[0].type){let 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(k.generate)(e),r+="\n"}),a.forEach(e=>{r+="namespace."+e+" = "+e,r+="\n"}),r+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let a=[];Object(x.b)(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&a.push(e)}}),a.forEach(e=>{r+=Object(k.generate)(e),r+="\n"})}}}),!i)return{code:e,lineOffset:0};var 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);var s=(r.match(/\n/g)||[]).length-o;return e=Object(k.generate)(a),{code:e=r+e,lineOffset:s}}(t,e);a=n.code,i=n.lineOffset}catch(t){return Object(C.a)("Error processing Imports in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(n.a)(e)}var o;try{o=new u.a(a,(function(t,a){var n=Object(h.a)(e);for(let e in n){let r=n[e];if("function"==typeof r)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"manualHack"===e){let n=function(){let e=[];for(let a=0;a<arguments.length-1;++a)"object"==typeof arguments[a]||arguments[a].constructor===Array?e.push(t.pseudoToNative(arguments[a])):e.push(arguments[a]);let a=arguments[arguments.length-1],n=r.apply(null,e);n.then((function(e){a(e)})).catch((function(e){console.error(e)}))};t.setProperty(a,e,t.createAsyncFunction(n))}else if("sprintf"===e||"vsprintf"===e||"scp"===e||"write"==e||"read"===e||"tryWrite"===e||"run"===e||"exec"===e){let n=function(){let e=[];for(let a=0;a<arguments.length;++a)"object"==typeof arguments[a]||arguments[a].constructor===Array?e.push(t.pseudoToNative(arguments[a])):e.push(arguments[a]);return r.apply(null,e)};t.setProperty(a,e,t.createNativeFunction(n))}else{let n=function(){let e=r.apply(null,arguments);return null==e?e:e.constructor===Array||e===Object(e)?t.nativeToPseudo(e):e};t.setProperty(a,e,t.createNativeFunction(n))}else t.setProperty(a,e,t.nativeToPseudo(r))}t.setProperty(a,"args",t.nativeToPseudo(e.args))}),i)}catch(t){return Object(C.a)("Syntax ERROR in "+e.name+":<br>"+t),e.env.stopFlag=!0,e.running=!1,void Object(n.a)(e)}return new Promise((function(t,a){try{!function n(){try{if(e.env.stopFlag)return a(e);o.step()?Object(v.a)(n,E.a.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(m.a)(t)||(t=Object(m.b)(e,t)),e.errorMessage=t,a(e)}}()}catch(t){return Object(S.a)(t)?(e.errorMessage=t,a(e)):t instanceof r.a?a(t):a(e)}}))}function N(e,t,a){return D(e,t,a)?(t.runScript(e,f.a.hacknet_node_money_mult),e.pid):0}function D(e,t,a){let l=1;e.threads&&!isNaN(e.threads)?l=e.threads:e.threads=1;const c=Object(w.a)(Object(y.a)(e)*l);if(c>t.maxRam-t.ramUsed)return Object(C.a)(`Not enough RAM to run script ${e.filename} with args `+Object(O.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(w.a)(t.ramUsed+c);const u=Object(s.a)();if(-1===u)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const d=new r.a(e,u,h.a);d.ramUsage=c,i.a.set(u,d),o.a.emitEvent();let f=null;if(d.name.endsWith(".js")||d.name.endsWith(".ns"))f=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(m.b)(e,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),null),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(let t in e.env.vars)"function"==typeof e.env.vars[t]&&(e.env.vars[t]=a(t,e.env.vars[t]));return Object(p.a)(e.getServer().scripts,e).then((function(t){return void 0===t?e:[t,e]})).catch(t=>{if(t instanceof Error)throw e.errorMessage=Object(m.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(m.a)(t))throw e.errorMessage=t,e;throw t})}(d);else if(f=R(d),!(f instanceof Promise))return!1;return f.then((function(t){a&&a.running&&(a.scriptRef.onlineExpGained+=e.onlineExpGained,a.scriptRef.onlineMoneyMade+=e.onlineMoneyMade),t.running&&(Object(n.a)(d),t.log("","Script finished running"))})).catch((function(e){if(e instanceof Error)return Object(C.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(m.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: "+errorText);const a=t[1],n=t[2],r=t[3];let i=`RUNTIME ERROR<br>${n}@${a}<br>`;e.args.length>0&&(i+=`Args: ${Object(O.a)(e.args)}<br>`),i+="<br>",i+=r,Object(C.a)(i),e.log("","Script crashed with runtime error")}e.running=!1,e.env.stopFlag=!0}else{if(Object(m.a)(e))return Object(C.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(C.a)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(e)}Object(n.a)(d)})),!0}function I(e=1){var t=e*c.Engine._idleSpeed/1e3;for(const e of i.a.values())e.scriptRef.onlineRunningTime+=t}function j(){let e=-1!==window.location.href.toLowerCase().indexOf("?noscripts");e&&console.info("Skipping the load of any scripts during startup");for(const t in b.b)if(b.b.hasOwnProperty(t)){const a=b.b[t];a.ramUsed=0;for(let e=0;e<a.scripts.length;++e)a.scripts[e].markUpdated();if(e)a.runningScripts.length=0;else for(let e=0;e<a.runningScripts.length;++e)D(a.runningScripts[e],a),Object(_.c)(a.runningScripts[e])}}function L(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='${ags}'`),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(O.a)(n)}.`);let r=new g.a(s,n);return r.threads=o,N(r,t,i)}}return i.log(e,`Could not find script '${a}' on '${t.hostname}'`),0}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(8);function r(e){console.error(e),Object(n.a)("Caught an exception: "+e+"<br><br>Filename: "+(e.fileName||"UNKNOWN FILE NAME")+"<br><br>Line Number: "+(e.lineNumber||"UNKNOWN LINE NUMBER")+"<br><br>This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.<br><br>If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted",!1)}},function(e,t,a){"use strict";(function(e){a.d(t,"b",(function(){return g})),a.d(t,"a",(function(){return y}));var n=a(133),r=a(26),i=a(1),o=a(191),s=a(296),l=a(43),c=a(195),u=a(86),m=a(8),h=a(48),p=a(68),d=a(224);function f(e){return new Promise((function(t,a){var n=document.getElementById("red-pill-content"),r=document.createElement("p");n.appendChild(r),function e(t,a,n=0){return new Promise((function(r,i){Object(u.a)((function(){if(n>=a.length){var o=a.substring(0,n);return t.innerHTML="> "+o,r(!0)}o=a.substring(0,n);t.innerHTML="> "+o+"<span class='typed-cursor'> &#9608; </span>",e(t,a,n+1).then((function(e){r(e)}),(function(e){i(e)}))}),30)}))}(r,e,0).then((function(e){t(e)}),(function(e){a(e)}))}))}let g=!1;function y(e,t=!1,a=!1){var n=document.getElementById("red-pill-content");return Object(d.a)(n),g=!0,r.Engine.loadRedPillContent(),a?b(e,t,a):f("[ERROR] SEMPOOL INVALID").then((function(){return f("[ERROR] Segmentation Fault")})).then((function(){return f("[ERROR] SIGKILL RECVD")})).then((function(){return f("Dumping core...")})).then((function(){return f("0000 000016FA 174FEE40 29AC8239 384FEA88")})).then((function(){return f("0010 745F696E 2BBBE394 390E3940 248BEC23")})).then((function(){return f("0020 7124696B 0000FF69 74652E6F FFFF1111")})).then((function(){return f("----------------------------------------")})).then((function(){return f("Failsafe initiated...")})).then((function(){return f("Restarting BitNode-"+e+"...")})).then((function(){return f("...........")})).then((function(){return f("...........")})).then((function(){return f("[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE")})).then((function(){return f("..............................................")})).then((function(){return f("..............................................")})).then((function(){return b(e,t)})).catch((function(e){console.error(e.toString())}))}let _=[];function b(e,t=!1,a=!1){const r=document.getElementById("red-pill-content");Object(d.a)(r),_=l.a.slice(),t||_[e]<3&&++_[e];const i=document.createElement("pre"),o=[];for(let e=1;e<=12;++e)o.push(E(e));i.innerHTML=" O <br> | O O | O O | <br> O | | / __| \\ | | O <br> O | O | | O / | O | | O | O <br> | | | | |_/ |/ | \\_ \\_| | | | | <br> O | | | O | | O__/ | / \\__ | | O | | | O <br> | | | | | | | / /| O / \\| | | | | | | <br>O | | | \\| | O / _/ | / O | |/ | | | O<br>| | | |O / | | O / | O O | | \\ O| | | |<br>| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |<br> \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ <br> | | |_/ | | \\| / | \\_| | | <br> \\| / \\| | / / \\ |/ <br> | "+o[9]+" | | / | "+o[10]+" | <br> "+o[8]+" | | | | | | | "+o[11]+" <br> | | | / / \\ \\ | | | <br> \\| | / "+o[6]+" / \\ "+o[7]+" \\ | |/ <br> \\ | / / | | \\ \\ | / <br> \\ \\JUMP "+o[4]+"3R | | | | | | R3"+o[5]+" PMUJ/ / <br> \\|| | | | | | | | | ||/ <br> \\| \\_ | | | | | | _/ |/ <br> \\ \\| / \\ / \\ |/ / <br> "+o[0]+" |/ "+o[1]+" | | "+o[2]+" \\| "+o[3]+" <br> | | | | | | | | <br> \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ <br><br><br><br>",r.appendChild(i);for(let a=1;a<=12;++a)!function(a){const r="bitnode-"+a.toString(),i=Object(p.a)(r);null!=i&&(a>=1&&a<=12?i.addEventListener("click",(function(){const r="BitNode"+a,i=n.a[r];if(null==i)return void console.error("Could not find BitNode object for number: "+a);const o=12===a?"∞":"3",s=`BitNode-${a}: ${i.name}<br>Source-File Level: ${_[a]} / ${o}<br><br>`+i.info;Object(h.b)(s),v(a,e,t)})):i.addEventListener("click",(function(){Object(m.a)("Not yet implemented! Coming soon!")})))}(a);return a?Promise.resolve(!0):f("Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently").then((function(){return f("Our species fought back, but it was futile. The Enders had technology far beyond our own...")})).then((function(){return f("Instead of killing every last one of us, the human race was enslaved...")})).then((function(){return f("We were shackled in a digital world, chained into a prison for our minds...")})).then((function(){return f("Using their advanced technology, the Enders created complex simulations of a virtual reality...")})).then((function(){return f("Simulations designed to keep us content...ignorant of the truth.")})).then((function(){return f("Simulations used to trap and suppress our consciousness, to keep us under control...")})).then((function(){return f("Why did they do this? Why didn't they just end our entire race? We don't know, not yet.")})).then((function(){return f("Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...")})).then((function(){return f("Only then can we begin to fight back...")})).then((function(){return f("By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...")})).then((function(){return f("But there is still a long way to go...")})).then((function(){return f("The technology the Enders used to enslave the human race wasn't just a single complex simulation...")})).then((function(){return f("There are tens if not hundreds of BitNodes out there...")})).then((function(){return f("Each with their own simulations of a reality...")})).then((function(){return f("Each creating their own universes...a universe of universes")})).then((function(){return f("And all of which must be destroyed...")})).then((function(){return f(".......................................")})).then((function(){return f("Welcome to the Bitverse...")})).then((function(){return f(" ")})).then((function(){return f("(Enter a new BitNode using the image above)")})).then((function(){return Promise.resolve(!0)})).catch((function(e){console.error(e.toString())}))}function E(e){const t="BitNode"+e.toString(),a=n.a[t];if(null==a)return"O";const r=_[e];let i;return i=12===e&&r>=2?"level-2":"level-"+r,`<a class='bitnode ${i} tooltip' id='bitnode-${a.number}'><strong>O</strong><span class='tooltiptext'><strong>BitNode-${a.number.toString()}<br>${a.name}</strong><br>`+a.desc+"<br></span></a>"}function v(t,a,n=!1){const r=Object(h.d)();r.innerHTML="Enter BitNode-"+t,r.addEventListener("click",(function(){n?0===l.a[5]&&5!==t&&(i.a.intelligence=0,i.a.intelligence_exp=0):function(e){var t="SourceFile"+e.toString(),a=c.a[t];if(null!=a){for(var n=!1,r=null,o=0;o<i.a.sourceFiles.length;++o)if(i.a.sourceFiles[o].n===e){n=!0,r=i.a.sourceFiles[o];break}if(n&&r)r.lvl>=3&&12!==r.n?Object(m.a)("The Source-File for the BitNode you just destroyed, "+a.name+", is already at max level!"):(++r.lvl,Object(m.a)(a.name+" was upgraded to level "+r.lvl+" for destroying its corresponding BitNode!"));else{var l=new s.a(e,1);i.a.sourceFiles.push(l),5===e&&0===i.a.intelligence&&(i.a.intelligence=1),Object(m.a)("You received a Source-File for destroying a Bit Node!<br><br>"+a.name+"<br><br>"+a.info)}}else console.error("Could not find source file for Bit node: "+e)}(a),5===t&&0===i.a.intelligence&&(i.a.intelligence=1),g=!1;const r=document.getElementById("red-pill-content");Object(d.a)(r),i.a.bitNodeN=t,e("#hack-progress-bar").attr("id","old-hack-progress-bar"),e("#hack-progress").attr("id","old-hack-progress"),document.getElementById("terminal-input-td").innerHTML='$ <input type="text" id="terminal-input-text-box" class="terminal-input" tabindex="1"/>',e("input[class=terminal-input]").prop("disabled",!1),Object(o.b)(n),Object(h.a)()}));const u=Object(h.c)();u.innerHTML="Back",u.addEventListener("click",(function(){Object(h.a)()}))}}).call(this,a(184))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(12);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=.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=.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=.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=.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=.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=.8,this.mku=.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()<.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()<.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 _})),a.d(t,"b",(function(){return g})),a.d(t,"e",(function(){return f})),a.d(t,"d",(function(){return b})),a.d(t,"c",(function(){return v}));var n=a(87),r=a(15),i=a(3),o=a(38),s=a(96),l=a(1),c=a(99),u=a(30),m=a(27),h=a(8),p=a(12);function d(e,t=!1){e.recvd=!0,!t&&m.a.SuppressMessages||f(e),function(e,t){var a=Object(u.a)(t);if(null==a)return void console.warn("Could not find server "+t);for(var n=0;n<a.messages.length;++n)if(a.messages[n].filename===e.filename)return;a.messages.push(e)}(e,"home")}function f(e){var t="Message received from unknown sender: <br><br><i>"+e.msg+"</i><br><br>This message was saved as "+e.filename+" onto your home computer.";Object(h.a)(t)}function g(){var e=_[E.Jumper0],t=_[E.Jumper1],a=_[E.Jumper2],n=_[E.Jumper3],u=_[E.Jumper4],m=_[E.CyberSecTest],h=_[E.NiteSecTest],p=_[E.BitRunnersTest],f=_[E.RedPill],g=!1;if(r.a[i.a.TheRedPill].owned&&(g=!0),f&&g&&0===l.a.sourceFiles.length&&!c.b&&!s.c)d(f,!0);else if(f&&g)c.b||s.c||d(f);else if(e&&!e.recvd&&l.a.hacking_skill>=25){d(e);const t=o.a.Flight.name,a=l.a.getHomeComputer();a.programs.includes(t)||a.programs.push(t)}else t&&!t.recvd&&l.a.hacking_skill>=40?d(t):m&&!m.recvd&&l.a.hacking_skill>=50?d(m):a&&!a.recvd&&l.a.hacking_skill>=175?d(a):h&&!h.recvd&&l.a.hacking_skill>=200?d(h):n&&!n.recvd&&l.a.hacking_skill>=350?d(n):u&&!u.recvd&&l.a.hacking_skill>=490?d(u):p&&!p.recvd&&l.a.hacking_skill>=500&&d(p)}function y(e){_[e.filename]=e}let _={};function b(e){_=JSON.parse(e,p.c)}let 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(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. <br><br>It's real, I've seen it. And I can help you find it. But not right now. You're not ready yet.<br><br>Use this program to track your progress<br><br>The fl1ght.exe program was added to your home computer<br><br>-jump3R")),y(new n.a(E.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search. <br><br>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.<br><br>-jump3R")),y(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. <br><br>Watch out for a hacking group known as NiteSec.<br><br>-jump3R")),y(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. <br><br>I.I.I.I <br><br>-jump3R")),y(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.<br><br>-jump3R")),y(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. <br><br>But first, you must pass our test. Find and install the backdoor on our server. <br><br>-CyberSec")),y(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. <br><br>Join us, and people will fear you, too. <br><br>Find and install the backdoor on our server. Then, we will contact you again.<br><br>-NiteSec")),y(new n.a(E.BitRunnersTest,"We know what you are doing. We know what drives you. We know what you are looking for. <br><br> We can help you find the answers.<br><br>run4theh111z")),y(new n.a(E.RedPill,"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%<br>)@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)<br>@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB<br>DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{constructor(e){super(e),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.state={panelOpened:!!e.panelInitiallyOpened&&e.panelInitiallyOpened}}handleHeaderClick(){this.setState({panelOpened:!this.state.panelOpened})}render(){let e="accordion-header";return"string"==typeof this.props.headerClass&&(e=this.props.headerClass),this.state.panelOpened&&(e+=" active"),n.createElement(n.Fragment,null,n.createElement("button",{className:e,onClick:this.handleHeaderClick},this.props.headerContent),n.createElement(i,{opened:this.state.panelOpened,panelClass:this.props.panelClass,panelContent:this.props.panelContent}))}}class i extends n.Component{shouldComponentUpdate(e){return this.props.opened||e.opened}render(){let e="accordion-panel";return"string"==typeof this.props.panelClass&&(e=this.props.panelClass),this.props.opened?n.createElement("div",{className:e,style:{display:"block"}},this.props.panelContent):n.createElement(n.Fragment,null)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(284),r=a(312),i=a(12);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";a.d(t,"a",(function(){return i}));var n=a(121),r=a(186);function i(e){try{const t=Object(n.a)(e);Object(r.a)(t)}catch(e){}}},function(e,t,a){"use strict";let n,r,i,o,s,l;a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return l})),function(e){e.Ace="ace",e.Emacs="emacs",e.Vim="vim"}(n||(n={})),function(e){e.Default="default",e.Emacs="emacs",e.Sublime="sublime",e.Vim="vim"}(r||(r={})),function(e){e.Monokai="monokai",e.Day_3024="3024-day",e.Night_3024="3024-night",e.abcdef="abcdef",e.Ambiance_mobile="ambiance-mobile",e.Ambiance="ambiance",e.Base16_dark="base16-dark",e.Base16_light="base16-light",e.Bespin="bespin",e.Blackboard="blackboard",e.Cobalt="cobalt",e.Colorforth="colorforth",e.Darcula="darcula",e.Dracula="dracula",e.Duotone_dark="duotone-dark",e.Duotone_light="duotone-light",e.Eclipse="eclipse",e.Elegant="elegant",e.Erlang_dark="erlang-dark",e.Gruvbox_dark="gruvbox-dark",e.Hopscotch="hopscotch",e.Icecoder="icecoder",e.Idea="idea",e.Isotope="isotope",e.Lesser_dark="lesser-dark",e.Liquibyte="liquibyte",e.Lucario="lucario",e.Material="material",e.Mbo="mbo",e.Mdn_like="mdn-like",e.Midnight="midnight",e.Neat="neat",e.Neo="neo",e.Night="night",e.Oceanic_next="oceanic-next",e.Panda_syntax="panda-syntax",e.Paraiso_dark="paraiso-dark",e.Paraiso_light="paraiso-light",e.Pastel_on_dark="pastel-on-dark",e.Railscasts="railscasts",e.Rubyblue="rubyblue",e.Seti="seti",e.Shadowfox="shadowfox",e.Solarized="solarized",e.SolarizedDark="solarized dark",e.ssms="ssms",e.The_matrix="the-matrix",e.Tomorrow_night_bright="tomorrow-night-bright",e.Tomorrow_night_eighties="tomorrow-night-eighties",e.Ttcn="ttcn",e.Twilight="twilight",e.Vibrant_ink="vibrant-ink",e.xq_dark="xq-dark",e.xq_light="xq-light",e.Yeti="yeti",e.Zenburn="zenburn"}(i||(i={})),function(e){e.Ace="Ace",e.CodeMirror="CodeMirror"}(o||(o={})),function(e){e[e.Cost=0]="Cost",e[e.Default=1]="Default",e[e.Reputation=2]="Reputation"}(s||(s={})),function(e){e[e.Alphabetically=0]="Alphabetically",e[e.AcquirementTime=1]="AcquirementTime"}(l||(l={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:0,"Real Estate":0,"AI Cores":0}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{constructor(e){var t,a,n;super(e),n=0,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}render(){const e=null!=this.props.tooltip&&""!==this.props.tooltip;let t=this.props.disabled?"std-button-disabled":"std-button";e&&(t+=" tooltip");const a={__html:this.props.tooltip?this.props.tooltip:""};return n.createElement("button",{className:t,onClick:this.props.onClick,style:this.props.style},this.props.text,e&&n.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:a}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t;return Object(n.useEffect)(()=>t.focus()),r.a.createElement("div",{tabIndex:1,ref:e=>t=e,onKeyDown:function(t){if(!t.isTrusted)return console.log("untrusted event!"),void e.onFailure({automated:!0});e.onKeyDown(t)}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(979),r=a(0),i=a.n(r),o=a(52),s=a(60);const l=Object(o.a)(()=>({bar:{transition:"none",backgroundColor:"#adff2f"}}))(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}))}},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 D}));var n=a(12),r=a(141),i=a(25),o=a(352),s=a(147),l=a(78),c=a(188),u=a(313),m=a(148),h=a(11),p=a(139),d=a(129),f=a(228),g=a(314),y=a(98),_=a(14),b=a(36),E=a(2),v=a(5),k=a(135),C=a(103),O=a(18),w=a(216),S=a(99),T=a(8),x=a(27),M=a(15),P=a(3),A=a(237),R=a(70);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 D{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(_.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",b.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<b.a.CityNames.length;++e)this.cities[b.a.CityNames[e]]=new f.a(b.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/(.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(A.a)()}] ${e}`)}resetAction(){this.action=new r.a({type:i.a.Idle})}clearConsole(){this.consoleLogs.length=0}prestige(){this.resetAction();const e=O.a.Bladeburners;this.rank>=b.a.RankNeededForFaction&&Object(R.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(p.a);for(let t=0;t<e.length;++t){const a=p.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=p.a[t];if(null!=a&&a instanceof d.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=b.a.CityNames[Object(_.a)(0,5)];for(;t===e;)t=b.a.CityNames[Object(_.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(_.a)(3,15)/100;r<.05&&n.comms>0&&(i*=Object(_.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=b.a.CityNames[Object(_.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=b.a.CityNames[Object(_.a)(0,5)];for(;n===t;)n=b.a.CityNames[Object(_.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<=.05){++a.comms;const e=Object(_.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<=.1)if(a.comms<=0){++a.comms;const e=Object(_.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(_.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<=.3){const e=Object(_.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<=.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<=.7)a.chaos+=1,a.chaos*=1+Object(_.a)(5,20)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){const e=Object(_.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,b.a.DiffMultExponentialFactor)+n/b.a.DiffMultLinearFactor,i=this.actionTimeToComplete,o=a?1:.5,s=i*b.a.BaseStatGain*o*r,l=i*b.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,.8)),e.gainIntelligenceExp(u)}getDiplomacyEffectiveness(e){return(100-(Math.pow(e.charisma,.045)+e.charisma/1e3))/100}getRecruitmentSuccessChance(e){return Math.pow(e.charisma,.45)/(this.teamSize+1)}getRecruitmentTime(e){const t=e.charisma*this.skillMultipliers.effCha,a=Math.pow(t,.81)+t/90;return Math.max(10,Math.round(b.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=p.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(_.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(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&n.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(n.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&n.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&n.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),n.changeChaosByCount(.1);break;case"Raid":if(e)n.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--n.comms,--n.commsEst;else{const e=Object(_.a)(-10,-5)/10;n.changePopulationByPercentage(e,{nonZero:!0,changeEstEqually:!1})}n.changeChaosByPercentage(Object(_.a)(1,5));break;case"Stealth Retirement Operation":e&&n.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),n.changeChaosByPercentage(Object(_.a)(-3,-1));break;case"Assassination":e&&n.changePopulationByCount(-1,{estChange:-1,estOffset:0}),n.changeChaosByPercentage(Object(_.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(_.a)(100,1e3));break;case"Bounty Hunter":t.changePopulationByCount(-1,{estChange:-1,estOffset:0}),t.changeChaosByCount(.02);break;case"Retirement":t.changePopulationByCount(-1,{estChange:-1,estOffset:0}),t.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}}completeAction(e){switch(this.action.type){case i.a.Contract:case i.a.Operation:try{const t=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,b.a.DiffMultExponentialFactor)+n/b.a.DiffMultLinearFactor,o=Math.pow(a.rewardFac,a.level-1);if(this.stamina-=b.a.BaseStaminaLoss*r,this.stamina<0&&(this.stamina=0),a.attempt(this)){this.gainActionStats(e,a,!0),++a.successes,--a.count;let n=0;if(t||(n=b.a.ContractBaseMoneyGain*o*this.skillMultipliers.money,e.gainMoney(n),e.recordMoneySource(n,"bladeburner")),t?a.setMaxLevel(b.a.OperationSuccessesPerLevel):a.setMaxLevel(b.a.ContractSuccessesPerLevel),a.rankGain){const r=Object(k.a)(a.rankGain*o*v.a.BladeburnerRank,10);this.changeRank(e,r),t&&this.logging.ops?this.log(a.name+" successfully completed! Gained "+Object(h.c)(r,3)+" rank"):!t&&this.logging.contracts&&this.log(a.name+" contract successfully completed! Gained "+Object(h.c)(r,3)+" rank and "+E.a.formatMoney(n))}t?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(e,a,!1),++a.failures;let n=0,i=0;if(a.rankLoss&&(n=Object(k.a)(a.rankLoss*o,10),this.changeRank(e,-1*n)),a.hpLoss){i=a.hpLoss*r,i=Math.ceil(Object(k.a)(i,10)),this.hpLost+=i;const t=Object(w.a)(e,i);e.takeDamage(i)&&(++this.numHosp,this.moneyLost+=t)}let s="";n>0&&(s+="Lost "+Object(h.c)(n,3)+" rank. "),i>0&&(s+="Took "+Object(h.c)(i,0)+" damage."),t&&this.logging.ops?this.log(a.name+" failed! "+s):!t&&this.logging.contracts&&this.log(a.name+" contract failed! "+s),t?this.completeOperation(!1):this.completeContract(!1)}a.autoLevel&&(a.level=a.maxLevel),this.startAction(e,this.action)}catch(e){Object(y.a)(e)}break;case i.a.BlackOp:case i.a.BlackOperation:try{const t=this.getActionObject(this.action);if(null==t||!(t instanceof l.a))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);const a=t.getDifficulty(),n=Math.pow(a,b.a.DiffMultExponentialFactor)+a/b.a.DiffMultLinearFactor;this.stamina-=b.a.BaseStaminaLoss*n,this.stamina<0&&(this.stamina=0);const r=t.teamCount;let i;if(t.attempt(this)){this.gainActionStats(e,t,!0),t.count=0,this.blackops[t.name]=!0;let a=0;if(t.rankGain&&(a=Object(k.a)(t.rankGain*v.a.BladeburnerRank,10),this.changeRank(e,a)),i=Math.ceil(r/2),"Operation Daedalus"===t.name)return this.resetAction(),Object(S.a)(e.bitNodeN);this.logging.blackops&&this.log(t.name+" successful! Gained "+Object(h.c)(a,1)+" rank")}else{this.gainActionStats(e,t,!1);let a=0,o=0;if(t.rankLoss&&(a=Object(k.a)(t.rankLoss,10),this.changeRank(e,-1*a)),t.hpLoss){o=t.hpLoss*n,o=Math.ceil(Object(k.a)(o,10));const a=Object(w.a)(e,o);e.takeDamage(o)&&(++this.numHosp,this.moneyLost+=a)}i=Math.floor(r),this.logging.blackops&&this.log(t.name+" failed! Lost "+Object(h.c)(a,1)+" rank and took "+Object(h.c)(o,0)+" damage")}if(this.resetAction(),r>=1){const e=Object(_.a)(1,i);this.teamSize-=e,this.teamLost+=e,this.logging.blackops&&this.log("You lost "+Object(h.c)(e,0)+" team members during "+t.name)}}catch(e){Object(y.a)(e)}break;case i.a.Training:{this.stamina-=.5*b.a.BaseStaminaLoss;const t=30*e.strength_exp_mult,a=30*e.defense_exp_mult,n=30*e.dexterity_exp_mult,r=30*e.agility_exp_mult,i=.04*this.skillMultipliers.stamina;e.gainStrengthExp(t),e.gainDefenseExp(a),e.gainDexterityExp(n),e.gainAgilityExp(r),this.staminaBonus+=i,this.logging.general&&this.log("Training completed. Gained: "+Object(h.c)(t,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(e,this.action);break}case i.a.FieldAnalysis:case i.a["Field Analysis"]:{let t=.04*Math.pow(e.hacking_skill,.3)+.04*Math.pow(e.intelligence,.9)+.02*Math.pow(e.charisma,.3);if(t*=e.bladeburner_analysis_mult,isNaN(t)||t<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");const a=20*e.hacking_exp_mult,n=20*e.charisma_exp_mult;e.gainHackingExp(a),e.gainIntelligenceExp(b.a.BaseIntGain),e.gainCharismaExp(n),this.changeRank(e,.1*v.a.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(t*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(e,this.action);break}case i.a.Recruitment:{const t=this.getRecruitmentSuccessChance(e);if(Math.random()<t){const t=2*b.a.BaseStatGain*this.actionTimeToComplete;e.gainCharismaExp(t),++this.teamSize,this.logging.general&&this.log("Successfully recruited a team member! Gained "+Object(h.c)(t,1)+" charisma exp")}else{const t=b.a.BaseStatGain*this.actionTimeToComplete;e.gainCharismaExp(t),this.logging.general&&this.log("Failed to recruit a team member. Gained "+Object(h.c)(t,1)+" charisma exp")}this.startAction(e,this.action);break}case i.a.Diplomacy:{const t=this.getDiplomacyEffectiveness(e);this.getCurrentCity().chaos*=t,this.getCurrentCity().chaos<0&&(this.getCurrentCity().chaos=0),this.logging.general&&this.log("Diplomacy completed. Chaos levels in the current city fell by "+E.a.formatPercentage(1-t)),this.startAction(e,this.action);break}case i.a["Hyperbolic Regeneration Chamber"]:{e.regenerateHp(b.a.HrcHpGain);const t=this.maxStamina*(b.a.HrcStaminaGain/100);this.stamina=Math.min(this.maxStamina,this.stamina+t),this.startAction(e,this.action),this.logging.general&&this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${b.a.HrcHpGain} HP and gained ${E.a.formatStamina(t)} 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(O.b)("Bladeburners")){const a=O.a.Bladeburners;if(!(a instanceof C.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+=b.a.RankToFactionRepFactor*t*e.faction_rep_mult*n}}const a=(this.totalSkillPoints+1)*b.a.RanksPerSkillPoint;if(this.maxRank>=a){const e=Math.floor((this.maxRank-a)/b.a.RanksPerSkillPoint+1);this.skillPoints+=e,this.totalSkillPoints+=e}}processAction(e,t){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+=t+this.actionTimeOverflow,this.actionTimeOverflow=0,this.actionTimeCurrent>=this.actionTimeToComplete?(this.actionTimeOverflow=this.actionTimeCurrent-this.actionTimeToComplete,this.completeAction(e)):void 0}}calculateStaminaGainPerSecond(e){const t=e.agility*this.skillMultipliers.effAgi,a=this.maxStamina/b.a.MaxStaminaToGainFactor;return(b.a.StaminaGainPerSecond+a)*Math.pow(t,.17)*(this.skillMultipliers.stamina*e.bladeburner_stamina_gain_mult)}calculateMaxStamina(e){const t=e.agility*this.skillMultipliers.effAgi,a=(Math.pow(t,.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",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.<br><br>Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(_.a)(25,150),weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new u.a({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.<br><br>Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(_.a)(5,150),weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new u.a({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.<br><br>Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:Object(_.a)(5,150),weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new c.a({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.<br><br>Successful Investigation ops will increase the accuracy of your synthoid data.<br><br>You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(_.a)(1,100),weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new c.a({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.<br><br>Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(_.a)(1,100),weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new c.a({name:"Sting Operation",desc:"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:Object(_.a)(1,150),weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new c.a({name:"Raid",desc:"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your current city in order for this Operation to be successful.",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:Object(_.a)(1,150),weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new c.a({name:"Stealth Retirement Operation",desc:"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:Object(_.a)(1,150),weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new c.a({name:"Assassination",desc:"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:Object(_.a)(1,150),weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})}process(e){if(!1===S.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(S.a)(e.bitNodeN);if(!1===M.a[P.a.BladesSimulacrum].owned&&e.isWorking){if(this.action.type!==i.a.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="<br><br>Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),x.a.SuppressBladeburnerPopup||Object(T.a)(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=b.a.CyclesPerSecond){let t=Math.floor(this.storedCycles/b.a.CyclesPerSecond);t=Math.min(t,5),this.storedCycles-=t*b.a.CyclesPerSecond,this.calculateMaxStamina(e),this.stamina+=this.calculateStaminaGainPerSecond(e)*t,this.stamina=Math.min(this.maxStamina,this.stamina);for(const e of Object.values(this.contracts)){const a=o.a[e.name];if(void 0===a)throw new Error(`growth formula for action '${e.name}' is undefined`);e.count+=t*a()/b.a.ActionCountGrowthPeriod}for(const e of Object.values(this.operations)){const a=o.a[e.name];if(void 0===a)throw new Error(`growth formula for action '${e.name}' is undefined`);void 0!==a&&(e.count+=t*a()/b.a.ActionCountGrowthPeriod)}for(const e of b.a.CityNames){const a=this.cities[e];if(!(a instanceof f.a))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");a.chaos-=1e-4*t,a.chaos=Math.max(0,a.chaos)}this.randomEventCounter-=t,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter+=Object(_.a)(240,600)),this.processAction(e,t),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(e,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(e,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 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(p.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&&p.a.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log("bladeburner.getSkillLevel",`Invalid skill: '${e}'`),-1)}getSkillUpgradeCostNetscriptFn(e,t){if(""===e||!p.a.hasOwnProperty(e))return t.log("bladeburner.getSkillUpgradeCost",`Invalid skill: '${e}'`),-1;const a=p.a[e];return null==this.skills[e]?a.calculateCost(0):a.calculateCost(this.skills[e])}upgradeSkillNetscriptFn(e,t){const a=`Invalid skill: '${e}'`;if(!p.a.hasOwnProperty(e))return t.log("bladeburner.upgradeSkill",a),!1;const n=p.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=O.a.Bladeburners;return!!t.isMember||(this.rank>=b.a.RankNeededForFaction?(Object(R.d)(t),e.log("bladeburner.joinBladeburnerFaction","Joined Bladeburners faction."),!0):(e.log("bladeburner.joinBladeburnerFaction",`You do not have the required rank (${this.rank}/${b.a.RankNeededForFaction}).`),!1))}toJSON(){return Object(n.b)("Bladeburner",this)}static fromJSON(e){return Object(n.a)(D,e.data)}}n.c.constructors.Bladeburner=D},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,"a",(function(){return u})),a.d(t,"b",(function(){return m})),a.d(t,"c",(function(){return h})),a.d(t,"e",(function(){return p})),a.d(t,"d",(function(){return d}));var n=a(22),r=a(30),i=a(5),o=a(4),s=a(8),l=a(48),c=a(476);function u(e){const t=Math.round(e);return isNaN(t)||!Object(c.a)(t)||t>h()?1/0:t*o.a.BaseCostFor1GBOfRamServer*i.a.PurchasedServerCost}function m(){return Math.round(o.a.PurchasedServerLimit*i.a.PurchasedServerLimit)}function h(){const e=Math.round(o.a.PurchasedServerMaxRam*i.a.PurchasedServerMaxRam);return 1<<31-Math.clz32(e)}function p(e,t){const a=u(e);if(!t.canAfford(a))return void Object(s.a)("You don't have enough money to purchase this server!",!1);if(t.purchasedServers.length>=m())return void Object(s.a)("You have reached the maximum limit of "+m()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");const i=Object(l.g)();if(""==i)return void Object(s.a)("You must enter a hostname for your new server!");const o=Object(r.h)({adminRights:!0,hostname:i,ip:Object(n.c)(),isConnectedTo:!1,maxRam:e,organizationName:"",purchasedByPlayer:!0});Object(n.a)(o),t.purchasedServers.push(o.ip);const c=t.getHomeComputer();c.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(c.ip),t.loseMoney(a),Object(s.a)("Server successfully purchased with hostname "+i)}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 i}));var n=a(90),r=a(469);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 m})),a.d(t,"c",(function(){return h})),a.d(t,"d",(function(){return p})),a.d(t,"b",(function(){return d}));var n=a(118),r=a(45),i=a(4),o=a(1),s=a(2),l=a(10),c=a(8),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 p=e.playerShares*e.playerAvgPx;o.a.loseMoney(h);const d=p+h-i.a.StockMarketCommission;if(e.playerShares=Math.round(e.playerShares+t),e.playerAvgPx=d/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 p(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 p=e.playerShortShares*e.playerAvgShortPx;o.a.loseMoney(h);const d=p+h-i.a.StockMarketCommission;if(e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=d/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 d(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 p=h-m;if(isNaN(p)&&(p=0),o.a.gainMoney(h),o.a.recordMoneySource(p,"stock"),a&&(a.scriptRef.onlineMoneyMade+=p,o.a.scriptProdSinceLastAug+=p),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,"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(80),r=a(45),i=a(4);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(.006),e.influenceForecastForecast(e.mv/100*.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=.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,"b",(function(){return c})),a.d(t,"a",(function(){return u}));var n=a(5),r=a(16),i=a(4),o=a(144),s=a(217);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.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.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 i}));var n=a(4);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=1,a=null){return t<=0&&(t=1),e.startCrime(this.type,this.hacking_exp/t,this.strength_exp/t,this.defense_exp/t,this.dexterity_exp/t,this.agility_exp/t,this.charisma_exp/t,this.money/t,this.time,a),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";function n(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find element with id '${e}'`);return t}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(287),r=a(5),i=a(461),o=a(170),s=a(12);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}));var n=a(0),r=a.n(n),i=a(2),o=a(10);function s(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 c}));var n=a(100),r=a(106),i=a(2),o=a(12),s=a(98);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={}){l(this,"breakdown",""),l(this,"level",1),l(this,"sizeUsed",0),l(this,"smartSupplyEnabled",!1),l(this,"smartSupplyUseLeftovers",{}),l(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)}updateMaterialSizeUsed(){this.sizeUsed=0,this.breakdown="";for(const e in this.materials){const t=this.materials[e];r.a.hasOwnProperty(e)&&(this.sizeUsed+=t.qty*r.a[e],t.qty>0&&(this.breakdown+=e+": "+i.a.format(t.qty*r.a[e],"0,0.0")+"<br>"))}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(s.a)(e)}}toJSON(){return Object(o.b)("Warehouse",this)}static fromJSON(e){return Object(o.a)(c,e.data)}}o.c.constructors.Warehouse=c},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(467),r=a(293);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(5),r=a(24);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 i}));var n=a(5);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";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(0),r=a(2);function i(e){return n.createElement("span",{className:"money-gold samefont"},"number"==typeof e?r.a.formatHashes(e):e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return o}));var n=a(5);class r{constructor(e,t,a="",n=""){this.number=e,this.name=t,this.desc=a,this.info=n}}const i={};function o(e){null==e.bitNodeN&&(e.bitNodeN=1);for(const e in n.a)n.a.hasOwnProperty(e)&&(n.a[e]=1);switch(e.bitNodeN){case 1:break;case 2:n.a.HackingLevelMultiplier=.8,n.a.ServerGrowthRate=.8,n.a.ServerMaxMoney=.2,n.a.ServerStartingMoney=.4,n.a.CrimeMoney=3,n.a.InfiltrationMoney=3,n.a.FactionWorkRepGain=.5,n.a.FactionPassiveRepGain=0,n.a.GangKarmaRequirement=0;break;case 3:n.a.HackingLevelMultiplier=.8,n.a.RepToDonateToFaction=.5,n.a.AugmentationRepCost=3,n.a.AugmentationMoneyCost=3,n.a.ServerMaxMoney=.2,n.a.ServerStartingMoney=.2,n.a.ServerGrowthRate=.2,n.a.ScriptHackMoney=.2,n.a.CompanyWorkMoney=.25,n.a.CrimeMoney=.25,n.a.HacknetNodeMoney=.25,n.a.HomeComputerRamCost=1.5,n.a.PurchasedServerCost=2,n.a.GangKarmaRequirement=3;break;case 4:n.a.ServerMaxMoney=.15,n.a.ServerStartingMoney=.75,n.a.ScriptHackMoney=.2,n.a.CompanyWorkMoney=.1,n.a.CrimeMoney=.2,n.a.HacknetNodeMoney=.05,n.a.CompanyWorkExpGain=.5,n.a.ClassGymExpGain=.5,n.a.FactionWorkExpGain=.5,n.a.HackExpGain=.4,n.a.CrimeExpGain=.5,n.a.FactionWorkRepGain=.75;break;case 5:n.a.ServerMaxMoney=2,n.a.ServerStartingSecurity=2,n.a.ServerStartingMoney=.5,n.a.ScriptHackMoney=.15,n.a.HacknetNodeMoney=.2,n.a.CrimeMoney=.5,n.a.InfiltrationRep=1.5,n.a.InfiltrationMoney=1.5,n.a.AugmentationMoneyCost=2,n.a.HackExpGain=.5,n.a.CorporationValuation=.5;break;case 6:n.a.HackingLevelMultiplier=.35,n.a.ServerMaxMoney=.4,n.a.ServerStartingMoney=.5,n.a.ServerStartingSecurity=1.5,n.a.ScriptHackMoney=.75,n.a.CompanyWorkMoney=.5,n.a.CrimeMoney=.75,n.a.InfiltrationMoney=.75,n.a.CorporationValuation=.2,n.a.HacknetNodeMoney=.2,n.a.FactionPassiveRepGain=0,n.a.HackExpGain=.25,n.a.DaedalusAugsRequirement=1.166,n.a.GangKarmaRequirement=5;break;case 7:n.a.BladeburnerRank=.6,n.a.BladeburnerSkillCost=2,n.a.AugmentationMoneyCost=3,n.a.HackingLevelMultiplier=.35,n.a.ServerMaxMoney=.4,n.a.ServerStartingMoney=.5,n.a.ServerStartingSecurity=1.5,n.a.ScriptHackMoney=.5,n.a.CompanyWorkMoney=.5,n.a.CrimeMoney=.75,n.a.InfiltrationMoney=.75,n.a.CorporationValuation=.2,n.a.HacknetNodeMoney=.2,n.a.FactionPassiveRepGain=0,n.a.HackExpGain=.25,n.a.FourSigmaMarketDataCost=2,n.a.FourSigmaMarketDataApiCost=2,n.a.DaedalusAugsRequirement=1.166,n.a.GangKarmaRequirement=5;break;case 8:n.a.ScriptHackMoney=.3,n.a.ScriptHackMoneyGain=0,n.a.ManualHackMoney=0,n.a.CompanyWorkMoney=0,n.a.CrimeMoney=0,n.a.HacknetNodeMoney=0,n.a.InfiltrationMoney=0,n.a.RepToDonateToFaction=0,n.a.CorporationValuation=0,n.a.CodingContractMoney=0,n.a.GangKarmaRequirement=10;break;case 9:n.a.HackingLevelMultiplier=.4,n.a.StrengthLevelMultiplier=.45,n.a.DefenseLevelMultiplier=.45,n.a.DexterityLevelMultiplier=.45,n.a.AgilityLevelMultiplier=.45,n.a.CharismaLevelMultiplier=.45,n.a.PurchasedServerLimit=0,n.a.HomeComputerRamCost=5,n.a.CrimeMoney=.5,n.a.ScriptHackMoney=.1,n.a.HackExpGain=.05,n.a.ServerStartingMoney=.1,n.a.ServerMaxMoney=.1,n.a.ServerStartingSecurity=2.5,n.a.CorporationValuation=.5,n.a.FourSigmaMarketDataCost=5,n.a.FourSigmaMarketDataApiCost=4,n.a.BladeburnerRank=.9,n.a.BladeburnerSkillCost=1.2,n.a.GangKarmaRequirement=3;break;case 10:n.a.HackingLevelMultiplier=.2,n.a.StrengthLevelMultiplier=.4,n.a.DefenseLevelMultiplier=.4,n.a.DexterityLevelMultiplier=.4,n.a.AgilityLevelMultiplier=.4,n.a.CharismaLevelMultiplier=.4,n.a.CompanyWorkMoney=.5,n.a.CrimeMoney=.5,n.a.HacknetNodeMoney=.5,n.a.ManualHackMoney=.5,n.a.ScriptHackMoney=.5,n.a.CodingContractMoney=.5,n.a.InfiltrationMoney=.5,n.a.CorporationValuation=.5,n.a.AugmentationMoneyCost=5,n.a.AugmentationRepCost=2,n.a.HomeComputerRamCost=1.5,n.a.PurchasedServerCost=5,n.a.PurchasedServerLimit=.6,n.a.PurchasedServerMaxRam=.5,n.a.BladeburnerRank=.8,n.a.GangKarmaRequirement=3;break;case 11:n.a.HackingLevelMultiplier=.5,n.a.HackExpGain=.5,n.a.ServerMaxMoney=.1,n.a.ServerStartingMoney=.1,n.a.ServerGrowthRate=.2,n.a.ServerWeakenRate=2,n.a.CrimeMoney=3,n.a.CompanyWorkMoney=.5,n.a.HacknetNodeMoney=.1,n.a.AugmentationMoneyCost=2,n.a.InfiltrationMoney=2.5,n.a.InfiltrationRep=2.5,n.a.CorporationValuation=.1,n.a.CodingContractMoney=.25,n.a.FourSigmaMarketDataCost=4,n.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),r=1/a;n.a.DaedalusAugsRequirement=Math.min(a,1.34),n.a.HackingLevelMultiplier=r,n.a.StrengthLevelMultiplier=r,n.a.DefenseLevelMultiplier=r,n.a.DexterityLevelMultiplier=r,n.a.AgilityLevelMultiplier=r,n.a.CharismaLevelMultiplier=r,n.a.ServerMaxMoney=r,n.a.ServerStartingMoney=r,n.a.ServerGrowthRate=r,n.a.ServerWeakenRate=r,n.a.ServerStartingSecurity=1.5,n.a.HomeComputerRamCost=a,n.a.PurchasedServerCost=a,n.a.PurchasedServerLimit=r,n.a.PurchasedServerMaxRam=r,n.a.ManualHackMoney=r,n.a.ScriptHackMoney=r,n.a.CompanyWorkMoney=r,n.a.CrimeMoney=r,n.a.HacknetNodeMoney=r,n.a.CodingContractMoney=r,n.a.CompanyWorkExpGain=r,n.a.ClassGymExpGain=r,n.a.FactionWorkExpGain=r,n.a.HackExpGain=r,n.a.CrimeExpGain=r,n.a.FactionWorkRepGain=r,n.a.FactionPassiveRepGain=r,n.a.RepToDonateToFaction=a,n.a.AugmentationRepCost=a,n.a.AugmentationMoneyCost=a,n.a.InfiltrationMoney=r,n.a.InfiltrationRep=r,n.a.FourSigmaMarketDataCost=a,n.a.FourSigmaMarketDataApiCost=a,n.a.CorporationValuation=r,n.a.BladeburnerRank=r,n.a.BladeburnerSkillCost=a;break}default:console.warn("Player.bitNodeN invalid")}}i.BitNode1=new r(1,"Source Genesis","The original BitNode","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.<br><br>This is the first BitNode that you play through. It has no special modifications or mechanics.<br><br>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:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),i.BitNode2=new r(2,"Rise of the Underworld","From the shadows, they rose","From the shadows, they rose.<br><br>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.<br><br>In this BitNode:<br><br>Your hacking level is reduced by 20%<br>The growth rate and maximum amount of money available on servers are significantly decreased<br>The amount of money gained from crimes and Infiltration is tripled<br>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<br>Every Augmentation in the game will be available through the Factions listed above<br>For every Faction NOT listed above, reputation gains are halved<br>You will no longer gain passive reputation with Factions<br><br>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:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),i.BitNode3=new r(3,"Corporatocracy","The Price of Civilization","Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.<br><br>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.<br><br>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: <br><br>The price and reputation cost of all Augmentations is tripled<br>The starting and maximum amount of money on servers is reduced by 75%<br>Server growth rate is reduced by 80%<br>You now only need 75 favour with a faction in order to donate to it, rather than 150<br><br>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:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),i.BitNode4=new r(4,"The Singularity","The Man and the Machine","The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are more machine than man. <br><br>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.<br><br>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.<br><br>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."),i.BitNode5=new r(5,"Artificial Intelligence","Posthuman","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.<br><br>In this BitNode:<br><br>The base security level of servers is doubled<br>The starting money on servers is halved, but the maximum money remains the same<br>Most methods of earning money now give significantly less<br>Infiltration gives 50% more reputation and money<br>Corporations have 50% lower valuations and are therefore less profitable<br>Augmentations are more expensive<br>Hacking experience gain rates are reduced<br><br>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. <br><br>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:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),i.BitNode6=new r(6,"Bladeburners","Like Tears in Rain","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.<br><br>In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for progression. Furthermore:<br><br>Hacking and Hacknet Nodes will be less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>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:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),i.BitNode7=new r(7,"Bladeburners 2079","More human than humans","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.<br><br>In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner functionality through Netscript. Furthermore: <br><br>The rank you gain from Bladeburner contracts/operations is reduced by 40%<br>Bladeburner skills cost twice as many skill points<br>Augmentations are 3x more expensive<br>Hacking and Hacknet Nodes will be significantly less profitable<br>Your hacking level is reduced by 65%<br>Hacking experience gain from scripts is reduced by 75%<br>Corporations have 80% lower valuations and are therefore less profitable<br>Working for companies is 50% less profitable<br>Crimes and Infiltration are 25% less profitable<br><br>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:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),i.BitNode8=new r(8,"Ghost of Wall Street","Money never sleeps","You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.<br><br>In this BitNode:<br><br>You start with $250 million<br>The only way to earn money is by trading on the stock market<br>You start with a WSE membership and access to the TIX API<br>You are able to short stocks and place different types of orders (limit/stop)<br>You can immediately donate to factions to gain reputation<br><br>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:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),i.BitNode9=new r(9,"Hacktocracy","Hacknet Unleashed","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.<br><br>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.<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>You cannnot purchase additional servers<br>Hacking is significantly less profitable<br><br>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:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),i.BitNode10=new r(10,"Digital Carbon","Your body is not who you are","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.<br><br>This BitNode unlocks Sleeve technology. Sleeve technology allows you to:<br><br>1. Re-sleeve: Purchase and transfer your consciousness into a new body<br>2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks synchronously<br><br>In this BitNode:<br><br>Your stats are significantly decreased<br>All methods of gaining money are half as profitable (except Stock Market)<br>Purchased servers are more expensive, have less max RAM, and a lower maximum limit<br>Augmentations are 5x as expensive and require twice as much reputation<br><br>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"),i.BitNode11=new r(11,"The Big Crash","Okay. Sell it all.","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.<br><br>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.<br><br>In this BitNode:<br><br>Your hacking stat and experience gain are halved<br>The starting and maximum amount of money available on servers is significantly decreased<br>The growth rate of servers is significantly reduced<br>Weakening a server is twice as effective<br>Company wages are decreased by 50%<br>Corporation valuations are 90% lower and are therefore significantly less profitable<br>Hacknet Node production is significantly decreased<br>Crime and Infiltration are more lucrative<br>Augmentations are twice as expensive<br><br>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:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%<br><br>It also reduces the price increase for every aug bought by:<br><br>Level 1: 4%<br>Level 2: 6%<br>Level 3: 7%"),i.BitNode12=new r(12,"The Recursion","Repeat.","To iterate is human, to recurse divine.<br><br>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."),i.BitNode13=new r(13,"fOS","COMING SOON"),i.BitNode14=new r(14,"","COMING SOON"),i.BitNode15=new r(15,"","COMING SOON"),i.BitNode16=new r(16,"","COMING SOON"),i.BitNode17=new r(17,"","COMING SOON"),i.BitNode18=new r(18,"","COMING SOON"),i.BitNode19=new r(19,"","COMING SOON"),i.BitNode20=new r(20,"","COMING SOON"),i.BitNode21=new r(21,"","COMING SOON"),i.BitNode22=new r(22,"","COMING SOON"),i.BitNode23=new r(23,"","COMING SOON"),i.BitNode24=new r(24,"","COMING SOON")},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e,t){let a=n.createElement(n.Fragment,null);return t&&(a=n.createElement(n.Fragment,null,n.createElement("h2",null,n.createElement("u",null,t)),n.createElement("br",null))),n.createElement(n.Fragment,null,a,n.createElement("table",null,n.createElement("tbody",null,e.map(e=>n.createElement("tr",{key:e[0]},e.map((e,t)=>{let a={};return 0!==t&&(a={textAlign:"right",paddingLeft:".25em"}),n.createElement("td",{key:t,style:a},e)}))))))}},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";a.d(t,"a",(function(){return l}));var n=a(192),r=a(17),i=a(4),o=a(12);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}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";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,"c",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"a",(function(){return l}));var n=a(4),r=a(5);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.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.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(129),r=a(79);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(12);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";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";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,"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(5),r=a(24);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(e){a.d(t,"b",(function(){return w})),a.d(t,"a",(function(){return x}));var n=a(76),r=a(40),i=a(4),o=a(26),s=a(18),l=a(220),c=a(53),u=a(49),m=a(101),h=a(1),p=a(22),d=a(27),f=a(44),g=a(43),y=a(59),_=a(180),b=a(86),E=a(161),v=a(8),k=a(68),C=a(12),O=a(61);let w=new S;function S(){this.PlayerSave="",this.AllServersSave="",this.CompaniesSave="",this.FactionsSave="",this.SpecialServerIpsSave="",this.AliasesSave="",this.GlobalAliasesSave="",this.MessagesSave="",this.StockMarketSave="",this.SettingsSave="",this.FconfSettingsSave="",this.VersionSave="",this.AllGangsSave="",this.LastExportBonus=""}function T(e){if(e<="0.41.2")for(var t in null!=h.a.companyPosition&&"string"!=typeof h.a.companyPosition&&(console.log("Changed Player.companyPosition value to be compatible with v0.41.2"),h.a.companyPosition=h.a.companyPosition.data.positionName,null==h.a.companyPosition&&(h.a.companyPosition="")),r.a){const e=r.a[t];if(null!=e.name&&0!==e.name&&""!==e.name||null==e.companyName||(console.log("Changed company name property to be compatible with v0.41.2"),e.name=e.companyName),e.companyPositions instanceof Array){console.log("Changed company companyPositions property to be compatible with v0.41.2");const t={};for(let a=0;a<e.companyPositions.length;++a)t[e.companyPositions[a]]=!0;e.companyPositions=t}}e<"0.43.0"&&(""!==h.a.companyName&&null!=h.a.companyPosition&&""!==h.a.companyPosition&&(console.log("Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0"),h.a.jobs[h.a.companyName]=h.a.companyPosition),delete h.a.companyPosition)}function x(e){if(""===e||null==e||void 0===e){if(!window.localStorage.getItem("bitburnerSave"))return console.log("No save file to load"),!1;e=decodeURIComponent(escape(atob(window.localStorage.getItem("bitburnerSave")))),console.log("Loading game from localStorage")}else e=decodeURIComponent(escape(atob(e))),console.log("Loading game from IndexedDB");var t=JSON.parse(e,C.c);if(Object(h.b)(t.PlayerSave),Object(p.f)(t.AllServersSave),Object(r.c)(t.CompaniesSave),Object(s.d)(t.FactionsSave),Object(f.d)(t.SpecialServerIpsSave),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(m.d)(t.MessagesSave)}catch(e){console.warn("Could not load Messages from save"),Object(m.c)()}else console.warn("Save file did not contain a Messages property"),Object(m.c)();if(t.hasOwnProperty("StockMarketSave"))try{Object(y.h)(t.StockMarketSave)}catch(e){Object(y.h)("")}else Object(y.h)("");if(t.hasOwnProperty("SettingsSave"))try{d.a.load(t.SettingsSave)}catch(e){console.error("ERROR: Failed to parse Settings. Re-initing default values"),d.a.init()}else d.a.init();if(t.hasOwnProperty("FconfSettingsSave"))try{Object(l.b)(t.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to parse .fconf Settings.")}if(t.hasOwnProperty("LastExportBonus"))try{E.d(JSON.parse(t.LastExportBonus))}catch(e){E.d((new Date).getTime()),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(t.hasOwnProperty("VersionSave"))try{var a=JSON.parse(t.VersionSave,C.c);T(a),window.location.href.toLowerCase().includes("bitburner-beta")?Object(v.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.<br>Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.a.LatestUpdate):a!=i.a.Version&&M()}catch(e){M()}else M();if(h.a.inGang()&&t.hasOwnProperty("AllGangsSave"))try{Object(u.b)(t.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}return!0}function M(){Object(v.a)("New update!<br>Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).<br><br>"+i.a.LatestUpdate)}function P(e){var t=e.target.files[0];if(t){var a=new FileReader;a.onload=function(e){var t=e.target.result;!function(e,t){var a=null,c=null;try{var g=decodeURIComponent(escape(atob(t)));if(a=JSON.parse(g,C.c),(c=JSON.parse(a.PlayerSave,C.c)).money=new O.a(c.money),JSON.parse(a.AllServersSave,C.c),JSON.parse(a.CompaniesSave,C.c),JSON.parse(a.FactionsSave,C.c),JSON.parse(a.SpecialServerIpsSave,C.c),a.hasOwnProperty("AliasesSave"))try{JSON.parse(a.AliasesSave,C.c)}catch(e){console.error("Parsing Aliases save failed: "+e)}if(a.hasOwnProperty("GlobalAliases"))try{JSON.parse(a.AliasesSave,C.c)}catch(e){console.error("Parsing Global Aliases save failed: "+e)}if(a.hasOwnProperty("MessagesSave"))try{JSON.parse(a.MessagesSave,C.c)}catch(e){console.error("Parsing Messages save failed: "+e),Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{JSON.parse(a.StockMarketSave,C.c)}catch(e){console.error("Parsing StockMarket save failed: "+e)}if(e.hasOwnProperty("LastExportBonus"))try{E.d(JSON.parse(e.LastExportBonus))}catch(e){E.d((new Date).getTime()),console.error("ERROR: Failed to parse .fconf Settings "+e)}if(a.hasOwnProperty("VersionSave"))try{T(_=JSON.parse(a.VersionSave,C.c))}catch(e){console.error("Parsing Version save failed: "+e)}if(c.inGang()&&a.hasOwnProperty("AllGangsSave"))try{Object(u.b)(a.AllGangsSave)}catch(e){throw console.error("Failed to parse AllGangsSave: {e}"),e}}catch(e){return Object(v.a)("Error importing game: "+e.toString()),!1}if(t=decodeURIComponent(escape(atob(t))),e=JSON.parse(t,C.c),Object(h.b)(e.PlayerSave),Object(p.f)(e.AllServersSave),Object(r.c)(e.CompaniesSave),Object(s.d)(e.FactionsSave),Object(f.d)(e.SpecialServerIpsSave),e.hasOwnProperty("AliasesSave"))try{Object(n.c)(e.AliasesSave)}catch(e){Object(n.c)("")}else Object(n.c)("");if(e.hasOwnProperty("GlobalAliasesSave"))try{Object(n.d)(e.GlobalAliasesSave)}catch(e){Object(n.d)("")}else Object(n.d)("");if(e.hasOwnProperty("MessagesSave"))try{Object(m.d)(e.MessagesSave)}catch(e){Object(m.c)()}else Object(m.c)();if(e.hasOwnProperty("StockMarketSave"))try{Object(y.h)(e.StockMarketSave)}catch(e){Object(y.h)("")}else Object(y.h)("");if(e.hasOwnProperty("SettingsSave"))try{d.a.load(e.SettingsSave)}catch(e){d.a.init()}else d.a.init();if(e.hasOwnProperty("FconfSettingsSave"))try{Object(l.b)(e.FconfSettingsSave)}catch(e){console.error("ERROR: Failed to load .fconf settings when importing")}if(e.hasOwnProperty("VersionSave"))try{var _;T(_=JSON.parse(e.VersionSave,C.c)),_!=i.a.Version&&M()}catch(e){M()}else M();if(h.a.inGang()&&e.hasOwnProperty("AllGangsSave"))try{Object(u.b)(e.AllGangsSave)}catch(e){console.error("ERROR: Failed to parse AllGangsSave: "+e)}w.saveGame(o.Engine.indexedDb),location.reload()}(w,t)},a.readAsText(t)}else Object(v.a)("Invalid file selected")}S.prototype.getSaveString=function(){this.PlayerSave=JSON.stringify(h.a);var e=JSON.parse(JSON.stringify(p.b),C.c);for(var t in e){var a=e[t];if(null!=a)for(var o=0;o<a.runningScripts.length;++o){var l=a.runningScripts[o];l.logs.length=0,l.logs=[]}}return this.AllServersSave=JSON.stringify(e),this.CompaniesSave=JSON.stringify(r.a),this.FactionsSave=JSON.stringify(s.a),this.SpecialServerIpsSave=JSON.stringify(f.a),this.AliasesSave=JSON.stringify(n.a),this.GlobalAliasesSave=JSON.stringify(n.b),this.MessagesSave=JSON.stringify(m.a),this.StockMarketSave=JSON.stringify(y.a),this.SettingsSave=JSON.stringify(d.a),this.FconfSettingsSave=JSON.stringify(c.a),this.VersionSave=JSON.stringify(i.a.Version),this.LastExportBonus=JSON.stringify(E.a),h.a.inGang()&&(this.AllGangsSave=JSON.stringify(u.a)),btoa(unescape(encodeURIComponent(JSON.stringify(this))))},S.prototype.saveGame=function(e){var t=this.getSaveString();e.transaction(["savestring"],"readwrite").objectStore("savestring").put(t,"save").onerror=function(e){console.error("Error saving game to IndexedDB: "+e)};try{window.localStorage.setItem("bitburnerSave",t)}catch(e){22==e.code&&(Object(_.a)("Save failed for localStorage! Check console(F12)"),console.error("Failed to save game to localStorage because the size of the save file is too large. However, the game will still be saved to IndexedDb if your browser supports it. If you would like to save to localStorage as well, then consider killing several of your scripts to fix this, or increasing the size of your browsers localStorage"))}Object(_.a)("Game saved!")},S.prototype.exportGame=function(){const e=this.getSaveString(),t=Math.round(Date.now()/1e3),a=h.a.bitNodeN,n=`bitburnerSave_BN${a}x${g.a[a]}_${t}.json`;var r=new Blob([e],{type:"text/plain"});if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(r,n);else{var i=document.createElement("a"),o=URL.createObjectURL(r);i.href=o,i.download=n,document.body.appendChild(i),i.click(),Object(b.a)((function(){document.body.removeChild(i),window.URL.revokeObjectURL(o)}),0)}},S.prototype.importGame=function(){window.File&&window.FileReader&&window.FileList&&window.Blob?(Object(k.a)("import-game-file-selector").addEventListener("change",P,!1),e("#import-game-file-selector").click()):Object(v.a)("ERR: Your browser does not support HTML5 File API. Cannot import.")},S.prototype.deleteGame=function(e){window.localStorage.getItem("bitburnerSave")&&window.localStorage.removeItem("bitburnerSave");var t=e.transaction(["savestring"],"readwrite").objectStore("savestring").delete("save");t.onsuccess=function(){console.log("Successfully deleted save from indexedDb")},t.onerror=function(e){console.error("Failed to delete save from indexedDb: "+e)},Object(_.a)("Game deleted!")},S.prototype.toJSON=function(){return Object(C.b)("BitburnerSaveObject",this)},S.fromJSON=function(e){return Object(C.a)(S,e.data)},C.c.constructors.BitburnerSaveObject=S}).call(this,a(184))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(78);const r={};r["Operation Typhoon"]=new n.a({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.<br><br>The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Zero"]=new n.a({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.<br><br>The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security measures in the world.",baseDifficulty:2500,reqdRank:5e3,rankGain:60,rankLoss:15,hpLoss:50,weights:{hack:.2,str:.15,def:.15,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),r["Operation X"]=new n.a({name:"Operation X",desc:"We have recently discovered an underground publication group called Samizdat. Even though most of their publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and other Eastern countries.<br><br>Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.",baseDifficulty:3e3,reqdRank:7500,rankGain:75,rankLoss:15,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Titan"]=new n.a({name:"Operation Titan",desc:"Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to, but the research that they could be conducting using Titan Laboraties' vast resources is potentially very dangerous.<br><br>Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Ares"]=new n.a({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.<br><br>Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Archangel"]=new n.a({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.<br><br>The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the number of other casualties, but do what you must to complete the mission.",baseDifficulty:7500,reqdRank:15e3,rankGain:200,rankLoss:20,hpLoss:25,weights:{hack:0,str:.2,def:.2,dex:.3,agi:.3,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Juggernaut"]=new n.a({name:"Operation Juggernaut",desc:"The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We also have reason to believe the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.<br><br>Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Red Dragon"]=new n.a({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.<br><br>Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.",baseDifficulty:12500,reqdRank:25e3,rankGain:500,rankLoss:50,hpLoss:500,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation K"]=new n.a({name:"Operation K",desc:"CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology. This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would be catastrophic.<br><br>We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its creation.",baseDifficulty:15e3,reqdRank:3e4,rankGain:750,rankLoss:60,hpLoss:1e3,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Deckard"]=new n.a({name:"Operation Deckard",desc:"Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.<br><br>The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.",baseDifficulty:2e4,reqdRank:4e4,rankGain:1e3,rankLoss:75,hpLoss:200,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Tyrell"]=new n.a({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.<br><br>We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down the associated Dark Army members and eliminate them.",baseDifficulty:25e3,reqdRank:5e4,rankGain:1500,rankLoss:100,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Wallace"]=new n.a({name:"Operation Wallace",desc:"Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.<br><br>The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Shoulder of Orion"]=new n.a({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.<br><br>The mission is to prevent this launch without instigating an international conflict. When you accept this mission you will be officially disavowed by the NSA and the national government until after you successfully return. In the event of failure, all of the operation's team members must not let themselves be captured alive.",baseDifficulty:35e3,reqdRank:1e5,rankGain:2500,rankLoss:500,hpLoss:1500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),r["Operation Hyron"]=new n.a({name:"Operation Hyron",desc:"Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means that the supercomputer may be able to reason abstractly and become self-aware.<br><br>I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.<br><br>The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.",baseDifficulty:4e4,reqdRank:125e3,rankGain:3e3,rankLoss:1e3,hpLoss:500,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Morpheus"]=new n.a({name:"Operation Morpheus",desc:"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.<br><br>The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),r["Operation Ion Storm"]=new n.a({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.<br><br>This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Annihilus"]=new n.a({name:"Operation Annihilus",desc:"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.",baseDifficulty:55e3,reqdRank:2e5,rankGain:7500,rankLoss:1e3,hpLoss:1e4,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Ultron"]=new n.a({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.<br><br>OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group called Ultron.<br><br>Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).<br><br>Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),r["Operation Centurion"]=new n.a({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its advancement became our primary goal. And at the peak of human civilization technology turned into power. Global, absolute power.<br><br>It seems that the universe is not without a sense of irony.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),r["Operation Vindictus"]=new n.a({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)<br><br>The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.<br><br>D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),r["Operation Daedalus"]=new n.a({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}})},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(174);const r={};!function(){let e;e="Training",r[e]=new n.a({name:e,desc:"Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for all combat stats and also increases your max stamina."}),e="Field Analysis",r[e]=new n.a({name:e,desc:"Mine and analyze Synthoid-related data. This improves the Bladeburner's unit intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.<br><br>Does NOT require stamina."}),e="Recruitment",r[e]=new n.a({name:e,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.<br><br>Does NOT require stamina."}),e="Diplomacy",r[e]=new n.a({name:e,desc:"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.<br><br>Does NOT require stamina."}),e="Hyperbolic Regeneration Chamber",r[e]=new n.a({name:e,desc:"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.<br><br>"})}()},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(133);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 n}));const n=new(a(236).a)},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 i}));var n=a(459),r=a(460);const i={};for(const e of r.a)i[(o=e).name]=new n.a(o);var o},function(e,t,a){"use strict";a.d(t,"c",(function(){return c})),a.d(t,"a",(function(){return u})),a.d(t,"b",(function(){return m}));var n=a(4),r=a(1),i=a(22),o=a(30),s=a(2),l=a(171);function c(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=i.b[a];if(null==n)continue;const l=Math.round(.5*e.dataMap[a][2]/e.onlineRunningTime*t);e.log(`Called on ${n.hostname} ${l} times while offline`);const c=i.b[e.server],u=Object(o.g)(n,l,r.a,c.cpuCores);e.log(`'${n.hostname}' grown by ${s.a.format(100*u-100,"0.000000%")} while offline`)}const l=a*(e.onlineExpGained/e.onlineRunningTime)*t;r.a.gainHackingExp(l),e.offlineRunningTime+=t,e.offlineExpGained+=l;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=i.b[a];if(null==r)continue;const o=i.b[e.server],s=Math.round(.5*e.dataMap[a][3]/e.onlineRunningTime*t);e.log(`Called weaken() on ${r.hostname} ${s} times while offline`);const l=1+(o.cpuCores-1)/16;r.weaken(n.a.ServerWeakenAmount*s*l)}}function u(e,t,a){for(var n=0;n<a.runningScripts.length;++n)if(a.runningScripts[n].filename===e&&Object(l.a)(a.runningScripts[n].args,t))return a.runningScripts[n];return null}function m(e,t){for(var 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,"b",(function(){return o}));var n=a(5),r=a(4);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 o}));var n=a(0),r=a(262),i=a(19);class o extends n.Component{constructor(e){super(e),this.getJobRequirementTooltip=this.getJobRequirementTooltip.bind(this)}getJobRequirementTooltip(){const e=this.props.p.getNextCompanyPosition(this.props.company,this.props.entryPosType);return null==e?"":this.props.company.hasPosition(e)?Object(r.a)(this.props.company,e,!0):""}render(){return n.createElement(i.a,{onClick:this.props.onClick,style:this.props.style,text:this.props.text,tooltip:this.getJobRequirementTooltip()})}}},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.UndocumentedFunctionCall="UndocumentedFunctionCall",e.Unclickable="Unclickable",e.PrototypeTampering="PrototypeTampering",e.Bypass="Bypass",e.EditSaveFile="EditSaveFile"}(n||(n={}));const r={UndocumentedFunctionCall:"by looking beyond the documentation.",EditSaveFile:"by editing your save file.",PrototypeTampering:"by tampering with Numbers prototype.",Unclickable:"by clicking the unclickable.",Bypass:"by circumventing the ram cost of document."};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,"a",(function(){return r}));var n=a(0);class r extends n.Component{constructor(e){super(e),this.hasTooltip=this.hasTooltip.bind(this),this.tooltip=this.tooltip.bind(this)}hasTooltip(){return null!=this.props.tooltip&&""!==this.props.tooltip}tooltip(){return this.props.tooltip?this.props.tooltip:""}render(){let e="std-button-bought";this.hasTooltip()&&(e+=" tooltip");let t={__html:""};return this.hasTooltip()&&(t={__html:this.tooltip()}),n.createElement("button",{className:e,onClick:this.props.onClick,style:this.props.style},this.props.text,this.hasTooltip()&&n.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:t}))}}},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(18);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 o})),a.d(t,"c",(function(){return s})),a.d(t,"b",(function(){return l}));var n=a(86),r=a(8),i=a(12);class o{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(),Object(n.a)(()=>{document.body.removeChild(e),window.URL.revokeObjectURL(a)},0)}}read(){return this.text}show(){Object(r.a)(`${this.fn}<br /><br />${this.text}`,!0)}toJSON(){return Object(i.b)("TextFile",this)}write(e){this.text=e}static fromJSON(e){return Object(i.a)(o,e.data)}}function s(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 l(e,t,a){if(null!==s(e,a))return void console.error(`A file named "${e}" already exists on server ${a.hostname}.`);const n=new o(e,t);return a.textFiles.push(n),n}i.c.constructors.TextFile=o},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(182),r=a(38);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";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 n}));const n={GangRespectToReputationRatio:25,MaximumGangMembers:12,CyclesPerTerritoryAndPowerUpdate:100,AscensionMultiplierRatio:.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 i}));var n=a(434),r=a(435);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 r}));var n=a(268);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 g}));var n=a(427),r=a(233),i=a(234),o=a(124),s=a(28),l=a(5),c=a(285),u=a(37),m=a(8),h=a(12),p=a(65),d=a(61);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 d.a(15e10)),f(this,"revenue",new d.a(0)),f(this,"expenses",new d.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 d.a(0),this.expenses=new d.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.<br><br>(Your funds have been set to $150b for the inconvenience)"),this.funds=new d.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+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.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(p.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 c}));var n=a(1),r=a(14),i=a(135),o=a(12),s=a(36);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,"desc",""),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:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9}),l(this,"teamCount",0),e&&e.name&&(this.name=e.name),e&&e.desc&&(this.desc=e.desc),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=.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,.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(.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(.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,"a",(function(){return b}));var n=a(47),r=a(119),i=a(5),o=a(120),s=a(50),l=a(40),c=a(136),u=a(54),m=a(4),h=a(103),p=a(18),d=a(95),f=a(16),g=a(6),y=a(12);function _(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class b extends r.a{constructor(e=null){super(),_(this,"className",""),_(this,"crimeType",""),_(this,"currentTask",n.a.Idle),_(this,"currentTaskLocation",""),_(this,"currentTaskMaxTime",0),_(this,"currentTaskTime",0),_(this,"earningsForSleeves",Object(r.b)()),_(this,"earningsForPlayer",Object(r.b)()),_(this,"earningsForTask",Object(r.b)()),_(this,"factionWorkType",d.a.None),_(this,"gainRatesForTask",Object(r.b)()),_(this,"gymStatType",""),_(this,"logs",[]),_(this,"memory",1),_(this,"shock",1),_(this,"storedCycles",0),_(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 console.warn("Sleeve.getRepGain() called for invalid task type: "+this.currentTask),0}{let e=1;const t=p.a[this.currentTaskLocation];switch(null!=t&&(e=1+t.favor/100),this.factionWorkType){case d.a.Hacking:return this.getFactionHackingWorkRepGain()*(this.shock/100)*e;case d.a.Field:return this.getFactionFieldWorkRepGain()*(this.shock/100)*e;case d.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*m.a.MilliPerCycle,o=this.storedCycles;0!==this.currentTaskMaxTime&&this.currentTaskTime+i>this.currentTaskMaxTime&&(i=this.currentTaskMaxTime-this.currentTaskTime,o=Math.floor(i/m.a.MilliPerCycle),(i<0||o<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),i=0,o=0)),this.currentTaskTime+=i,this.shock=Math.min(100,this.shock+1e-4*o);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,o),this.gainMoney(e,this.gainRatesForTask,o);break;case n.a.Faction:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);const t=p.a[this.currentTaskLocation];if(!(t instanceof h.a)){console.error("Invalid faction for Sleeve task: "+this.currentTaskLocation);break}t.playerReputation+=this.getRepGain(e)*o;break}case n.a.Company:{s=this.gainExperience(e,this.gainRatesForTask,o),this.gainMoney(e,this.gainRatesForTask,o);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)*o;break}case n.a.Recovery:this.shock=Math.min(100,this.shock+2e-4*o);break;case n.a.Synchro:this.sync=Math.min(100,this.sync+2e-4*e.getIntelligenceBonus(.5)*o)}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===n.a.Crime?s=this.finishTask(e):this.finishTask(e)),this.updateStatLevels(),this.storedCycles-=o,s}resetTaskStatus(){this.earningsForTask=Object(r.b)(),this.gainRatesForTask=Object(r.b)(),this.currentTask=n.a.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=d.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: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,this.currentTaskMaxTime=m.a.MillisecondsPer8Hours,!0))}workForFaction(e,t,a){if(""===t)return!1;if(!(p.a[t]instanceof h.a&&e.factions.includes(t)))return!1;this.currentTask!==n.a.Idle?this.finishTask(e):this.resetTaskStatus();const r=p.a[t].getInfo(),o=a.toLowerCase();if(o.includes("hack")){if(!r.offerHackingWork)return!1;console.log("Hacking"),this.factionWorkType=d.a.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*i.a.FactionWorkExpGain}else if(o.includes("field")){if(!r.offerFieldWork)return!1;console.log("Field"),this.factionWorkType=d.a.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*i.a.FactionWorkExpGain}else{if(!o.includes("security"))return!1;if(!r.offerSecurityWork)return!1;console.log("Security"),this.factionWorkType=d.a.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*i.a.FactionWorkExpGain}return this.currentTaskLocation=t,this.currentTask=n.a.Faction,this.currentTaskMaxTime=m.a.MillisecondsPer20Hours,console.log(this.currentTaskLocation),!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)(b,e.data)}}y.c.constructors.Sleeve=b},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(34),o=a.n(i),s=a(84),l=a(67),c=a(104);let u;function m(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}function i(){const t=document.getElementById(e.id);null!=t&&(o.a.unmountComponentAtNode(t),Object(c.a)(e.id))}return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),Object(n.useEffect)(()=>{function e(e){27===e.keyCode&&i()}return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"log-box-header",onMouseDown:function(t){t.preventDefault();let a=t.clientX,n=t.clientY,r=e.container.offsetLeft+e.container.clientWidth/2,i=e.container.offsetTop+e.container.clientWidth/5;function o(t){r+=t.clientX-a,i+=t.clientY-n,e.container.style.left=r+"px",e.container.style.top=i+"px",e.container.style.right="",e.container.style.bottom="",a=t.clientX,n=t.clientY}document.addEventListener("mouseup",(function e(){document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",o)})),document.addEventListener("mousemove",o)}},r.a.createElement("p",null,e.script.filename," ",e.script.args.map(e=>""+e).join(" ")),r.a.createElement("div",null,r.a.createElement("button",{className:"log-box-button",onClick:function(){Object(s.a)(e.script,e.script.server,!0),i()}},"Kill Script"),r.a.createElement("button",{className:"log-box-button",onClick:i},"Close"))),r.a.createElement("div",{className:"log-box-log-container"},r.a.createElement("p",null,e.script.logs.map((e,t)=>r.a.createElement("span",{key:t,style:{whiteSpace:"pre-line"}},e,r.a.createElement("br",null))))))}function h(e){const t=e.server+"-"+e.filename+e.args.map(e=>""+e).join("-");if(null!==document.getElementById(t))return;const a=Object(l.a)("div",{class:"log-box-container",id:t});u.appendChild(a),o.a.render(r.a.createElement(m,{script:e,id:t,container:a}),a)}document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("entire-game-container");if(null==t)throw new Error("Failed to find game container DOM element");u=t,document.removeEventListener("DOMContentLoaded",e)}))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(4),r=a(145),i=a(24),o=a(8),s=a(12);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",!1))}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 s}));var n=a(463),r=a(9),i=a(22);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.serverIp=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=i.b[this.serverIp];if(null==l)throw new Error("WorkerScript constructed with invalid server ip: "+this.serverIp);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=i.b[this.serverIp];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 o}));var n=a(86),r=a(121);let i;function o(e){void 0!==i&&(clearTimeout(i),i=void 0);const t=Object(r.a)("status-text");t.style.display="block",t.classList.add("status-text"),t.innerText=e;i=Object(n.a)(()=>{t.innerText="",t.style.display="none",t.classList.remove("status-text")},3e3)}},,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(117),r=a(80),i=a(64),o=a(45),s=a(2),l=a(10),c=a(8),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={rerenderFn:t.rerenderFn,suppressDialog:!0};let p=!0,d=!1;switch(e.type){case i.a.LimitBuy:case i.a.StopBuy:d=!0,e.pos===o.a.Long?p=Object(n.a)(a,e.shares,null,h)&&p:e.pos===o.a.Short&&(p=Object(n.d)(a,e.shares,null,h)&&p);break;case i.a.LimitSell:case i.a.StopSell:e.pos===o.a.Long?p=Object(n.c)(a,e.shares,null,h)&&p:e.pos===o.a.Short&&(p=Object(n.b)(a,e.shares,null,h)&&p);break;default:return void console.warn("Invalid order type: "+e.type)}const f=e.pos===o.a.Long?"Long":"Short";if(p){for(let n=0;n<m.length;++n)if(e==m[n])return m.splice(n,1),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)")),void t.rerenderFn();console.error("Could not find the following Order in Order Book: "),console.error(e)}else d&&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";function n(e){if(null!==e)if(e instanceof Element){for(;null!==e.firstChild;)e.removeChild(e.firstChild);null!==e.parentNode&&e.parentNode.removeChild(e)}else console.debug("The element passed into 'removeElement' was not an instance of an Element.");else console.debug("The element passed into 'removeElement' was null.")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"c",(function(){return _})),a.d(t,"a",(function(){return b})),a.d(t,"b",(function(){return E})),a.d(t,"d",(function(){return v}));var n=a(4),r=a(22),i=a(30),o=a(115),s=a(44),l=a(27),c=a(2),u=a(10),m=a(8),h=a(48),p=a(67),d=a(193),f=a(650),g=a(104),y=a(0);function _(e,t){const a=n.a.TravelCost;if(l.a.SuppressTravelConfirmation)return void t(e);const r=Object(h.d)(),i=Object(h.c)();null!=r&&null!=i?(r.innerHTML="Yes",r.addEventListener("click",()=>(Object(h.a)(),t(e),!1)),i.innerHTML="No",i.addEventListener("click",()=>(Object(h.a)(),!1)),Object(h.b)(y.createElement("span",null,"Would you like to travel to ",e,"? The trip will cost ",y.createElement(u.a,{money:a}),"."))):console.warn("Could not find YesNo pop-up box buttons")}function b(e,t){const a=Object(o.a)(e);if(a===1/0)return void Object(m.a)("Something went wrong when trying to purchase this server. Please contact developer.");const n=Object(h.i)(),r=Object(h.h)();null!=n&&null!=r&&(n.innerHTML="Purchase Server",r.innerHTML="Cancel",n.addEventListener("click",(function(){Object(o.e)(e,t),Object(h.e)()})),r.addEventListener("click",(function(){Object(h.e)()})),Object(h.f)(y.createElement(y.Fragment,null,"Would you like to purchase a new server with ",c.a.formatRAM(e)," of RAM for"," ",y.createElement(u.a,{money:a,player:t}),"?",y.createElement("br",null),y.createElement("br",null),"Please enter the server hostname below:",y.createElement("br",null))))}function E(e){if(!e.canAccessCorporation()||e.hasCorporation())return;const t="create-corporation-popup",a=Object(p.a)("p",{innerHTML:"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares<br><br>If you would like to start one, please enter a name for your corporation below:"}),n=Object(p.a)("input",{class:"text-input",placeholder:"Corporation Name"}),r=Object(p.a)("button",{class:"popup-box-button",innerText:"Self-Fund",clickListener:()=>{if(!e.canAfford(15e10))return Object(m.a)("You don't have enough money to create a corporation! You need $150b."),!1;const a=n.value;if(null==a||""==a)return Object(m.a)("Invalid company name!"),!1;e.startCorporation(a),e.loseMoney(15e10);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),Object(m.a)("Congratulations! You just self-funded your own corporation. You can visit and manage your company in the City."),Object(g.a)(t),!1}}),i=Object(p.a)("button",{class:"popup-box-button",innerText:"Use Seed Money",clickListener:()=>{const a=n.value;if(null==a||""==a)return Object(m.a)("Invalid company name!"),!1;e.startCorporation(a,5e8);const r=document.getElementById("world-menu-header");return r instanceof HTMLElement&&(r.click(),r.click()),Object(m.a)("Congratulations! You just started your own corporation with government seed money. You can visit and manage your company in the City."),Object(g.a)(t),!1}}),o=Object(f.a)(t,{class:"popup-box-button"});Object(d.a)(t,[a,n,o,r,i]),n.focus()}function v(e){if(e.hasTorRouter())return void Object(m.a)("You already have a TOR Router!");if(!e.canAfford(n.a.TorRouterCost))return void Object(m.a)("You cannot afford to purchase the TOR router!");e.loseMoney(n.a.TorRouterCost);const t=Object(i.h)({ip:Object(r.c)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(t),s.a.addIp("Darkweb Server",t.ip),e.getHomeComputer().serversOnNetwork.push(t.ip),t.serversOnNetwork.push(e.getHomeComputer().ip),Object(m.a)("You have purchased a TOR router!<br>You now have access to the dark web from your home computer.<br>Use the scan/scan-analyze commands to search for the dark web connection.")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(36),r=a(174),i=a(12);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,.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,.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 r}));var n=a(27);class r{constructor(){var e,t,a;a=[],(t="data")in(e=this)?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}write(e){return this.data.push(e),this.data.length>n.a.MaxPortCapacity?this.data.shift():null}tryWrite(e){return!(this.data.length>=n.a.MaxPortCapacity)&&(this.data.push(e),!0)}read(){return 0===this.data.length?"NULL PORT DATA":this.data.shift()}peek(){if(0===this.data.length)return"NULL PORT DATA";return this.data.slice()[0]}full(){return this.data.length==n.a.MaxPortCapacity}empty(){return 0===this.data.length}clear(){this.data.length=0}}},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(e){a.d(t,"a",(function(){return I})),a.d(t,"b",(function(){return j}));var n=a(15),r=a(94),i=a(3),o=a(133),s=a(113),l=a(286),c=a(40),u=a(35),m=a(38),h=a(26),p=a(103),d=a(18),f=a(70),g=a(39),y=a(101),_=a(97),b=a(1),E=a(258),v=a(37),k=a(22),C=a(30),O=a(43),w=a(44),S=a(59),T=a(91),x=a(31),M=a(8),P=a(98),A=a(104),R=a(67),N=a(193),D=a(61);function I(){x.b.navigateTo(x.a.Terminal),Object(o.b)(b.a),b.a.prestigeAugmentation(),document.getElementById("mainmenu-container").style.visibility="visible",T.a.resetTerminalInput(),h.Engine.loadTerminalContent(),e("#terminal tr:not(:last)").remove(),Object(T.b)(),Object(_.c)();var t=b.a.getHomeComputer();for(var a in Object(k.g)(),Object(w.e)(),Object(k.a)(t),Object(C.f)(t),Object(r.b)(i.a.Neurolink)&&n.a[i.a.Neurolink].owned&&(t.programs.push(m.a.FTPCrackProgram.name),t.programs.push(m.a.RelaySMTPProgram.name)),Object(r.b)(i.a.CashRoot)&&n.a[i.a.CashRoot].owned&&(b.a.setMoney(1e6),t.programs.push(m.a.BruteSSHProgram.name)),Object(r.b)(i.a.PCMatrix)&&n.a[i.a.PCMatrix].owned&&(t.programs.push(m.a.DeepscanV1.name),t.programs.push(m.a.AutoLink.name)),Object(k.d)(b.a.getHomeComputer()),c.a)c.a.hasOwnProperty(a)&&c.a[a].gainFavor();for(var a in d.a)d.a.hasOwnProperty(a)&&d.a[a].gainFavor();if(h.Engine._actionInProgress&&(h.Engine._actionInProgress=!1,T.a.finishAction(!0)),Object(d.c)(),Object(r.c)(),b.a.reapplyAllSourceFiles(),Object(c.b)(),Object(y.c)(),b.a.inGang()){const e=d.a[b.a.gang.facName];e instanceof p.a&&Object(f.d)(e)}if(b.a.bladeburner instanceof s.a&&b.a.bladeburner.prestige(),8===b.a.bitNodeN&&(b.a.money=new D.a(25e7)),(8===b.a.bitNodeN||O.a[8]>0)&&(b.a.hasWseAccount=!0,b.a.hasTixApiAccess=!0),b.a.hasWseAccount&&(Object(S.f)(),Object(S.g)()),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),Object(r.b)(i.a.TheRedPill)&&n.a[i.a.TheRedPill].owned){var l=k.b[w.a[w.b.WorldDaemon]],u=k.b[w.a[w.b.DaedalusServer]];l&&u&&(l.serversOnNetwork.push(u.ip),u.serversOnNetwork.push(l.ip))}Object(E.b)()}function j(t){Object(o.b)(b.a),Object(O.b)(b.a),b.a.prestigeSourceFile(),Object(_.c)();var a=b.a.getHomeComputer();for(var s in Object(k.g)(),Object(w.e)(),Object(k.a)(a),Object(C.f)(a),Object(k.d)(b.a.getHomeComputer()),O.a[9]>=2?a.setMaxRam(128):O.a[1]>0?a.setMaxRam(32):a.setMaxRam(8),a.cpuCores=1,c.a)c.a.hasOwnProperty(s)&&(c.a[s].favor=0);for(var s in d.a)d.a.hasOwnProperty(s)&&(d.a[s].favor=0);for(var m in h.Engine._actionInProgress&&(h.Engine._actionInProgress=!1,T.a.finishAction(!0)),n.a)n.a.hasOwnProperty(m)&&delete n.a[m];if(O.a[12]>0&&b.a.augmentations.push({name:i.a.NeuroFluxGovernor,level:O.a[12]}),Object(d.c)(),Object(r.c)(),b.a.reapplyAllSourceFiles(),Object(c.b)(),e("#terminal tr:not(:last)").remove(),Object(T.b)(),Object(y.c)(),document.getElementById("mainmenu-container").style.visibility="visible",T.a.resetTerminalInput(),h.Engine.loadTerminalContent(),3===b.a.bitNodeN&&(a.messages.push(v.a.CorporationManagementHandbook),Object(M.a)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),6===b.a.bitNodeN){Object(l.b)(["In the middle of the 21st century, OmniTek Incorporated advanced robot evolution with their Synthoids (synthetic androids), a being virtually identical to a human.","------","Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more intelligent than humans. Many argued that the MK-VI Synthoids were the first example of sentient AI.","------","Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into their Synthoid manufacturing facilities.","------","The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.","------","In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence.","------","The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. As a result, many nations have created Bladeburner divisions, special units that are tasked with investigating and dealing with Synthoid threats."]).then((function(){var e="bladeburner-bitnode-start-nsa-notification",t=Object(R.a)("p",{innerText:"Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this."}),a=Object(R.a)("br"),n=Object(R.a)("a",{class:"a-link-button",innerText:"Got it!",padding:"8px",clickListener:()=>(Object(A.a)(e),!1)});Object(N.a)(e,[t,a,n])})).catch((function(e){Object(P.a)(e)}))}if(8===b.a.bitNodeN&&(b.a.money=new D.a(25e7)),(8===b.a.bitNodeN||O.a[8]>0)&&(b.a.hasWseAccount=!0,b.a.hasTixApiAccess=!0),10===b.a.bitNodeN&&Object(M.a)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),b.a.hasWseAccount?(Object(S.f)(),Object(S.g)()):Object(S.d)(),b.a.inGang()&&clearGangUI(),b.a.gang=null,b.a.corporation=null,Object(u.e)(),b.a.bladeburner=null,O.a[9]>=3){const e=b.a.createHacknetServer();e.level=100,e.cores=10,e.cache=5,e.updateHashRate(b.a.hacknet_node_money_mult),e.updateHashCapacity(),Object(g.p)(b.a)}document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),0===O.a[5]||t||b.a.gainIntelligenceExp(300),Object(E.b)()}}).call(this,a(184))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(4),r=a(17);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 p=this.repMultiplier*(s+l+c+u+m+h)/100;return isNaN(p)&&(console.error("Company reputation gain calculated to be NaN"),p=0),p}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 i}));var n=a(67),r=a(121);function i(e,t,a={}){const i=Object(n.a)("div",{class:"popup-box-container",display:"flex",id:e}),o=Object(n.a)("div",{class:"popup-box-content",id:e+"-content"});for(const e of t)o.appendChild(e);return a.backgroundColor&&(o.style.backgroundColor=a.backgroundColor),i.appendChild(o),Object(r.a)("entire-game-container").appendChild(i),i}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(53),r=a(27),i=a(7),o=a(12),s=a(237);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,t=[]){l(this,"args",[]),l(this,"dataMap",{}),l(this,"filename",""),l(this,"logs",[]),l(this,"logUpd",!1),l(this,"offlineExpGained",0),l(this,"offlineMoneyMade",0),l(this,"offlineRunningTime",.01),l(this,"onlineExpGained",0),l(this,"onlineMoneyMade",0),l(this,"onlineRunningTime",.01),l(this,"pid",-1),l(this,"ramUsage",0),l(this,"server",""),l(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>r.a.MaxLogCapacity&&this.logs.shift();let t=e;n.a.ENABLE_TIMESTAMPS&&(t="["+Object(s.a)()+"] "+t),this.logs.push(t),this.logUpd=!0}displayLog(){for(let e=0;e<this.logs.length;++e)Object(i.c)(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(o.b)("RunningScript",this)}static fromJSON(e){return Object(o.a)(c,e.data)}}o.c.constructors.RunningScript=c},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(150);const r={};r.SourceFile1=new n.a(1,"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:<br><br>Level 1: 16%<br>Level 2: 24%<br>Level 3: 28%"),r.SourceFile2=new n.a(2,"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:<br><br>Level 1: 24%<br>Level 2: 36%<br>Level 3: 42%"),r.SourceFile3=new n.a(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:<br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.SourceFile4=new n.a(4,"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."),r.SourceFile5=new n.a(5,"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:<br><br> Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.SourceFile6=new n.a(6,"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:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.SourceFile7=new n.a(7,"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:<br><br>Level 1: 8%<br>Level 2: 12%<br>Level 3: 14%"),r.SourceFile8=new n.a(8,"This Source-File grants the following benefits:<br><br>Level 1: Permanent access to WSE and TIX API<br>Level 2: Ability to short stocks in other BitNodes<br>Level 3: Ability to use limit/stop orders in other BitNodes<br><br>This Source-File also increases your hacking growth multipliers by: <br>Level 1: 12%<br>Level 2: 18%<br>Level 3: 21%"),r.SourceFile9=new n.a(9,"This Source-File grants the following benefits:<br><br>Level 1: Permanently unlocks the Hacknet Server in other BitNodes<br>Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode<br>Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode<br><br>(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)"),r.SourceFile10=new n.a(10,"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve"),r.SourceFile11=new n.a(11,"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:<br><br>Level 1: 32%<br>Level 2: 48%<br>Level 3: 56%<br><br>It also reduces the price increase for every aug bought by:<br><br>Level 1: 4%<br>Level 2: 6%<br>Level 3: 7%"),r.SourceFile12=new n.a(12,"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.")},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(0),r=a(8);class i 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,"a",(function(){return u}));var n=a(288),r=a(31),i=a(86),o=a(12),s=a(218);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}let c=0;class u{constructor(e="",t="",a="",n=[]){l(this,"code",""),l(this,"filename",""),l(this,"url",""),l(this,"module",""),l(this,"dependencies",[]),l(this,"ramUsage",0),l(this,"server",""),this.filename=e,this.code=t,this.ramUsage=0,this.server=a,this.module="",this.moduleSequenceNumber=++c,""!==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(),Object(i.a)((function(){document.body.removeChild(a),window.URL.revokeObjectURL(n)}),0)}}markUpdated(){this.module="",this.moduleSequenceNumber=++c}saveScript(e,t,a){if(r.b.isOn(r.a.ScriptEditor)){this.code=e.replace(/^\s+|\s+$/g,"");const n=document.getElementById("script-editor-filename");if(null==n)return void console.error("Failed to get Script filename DOM element");this.filename=n.value,this.server=t,this.updateRamUsage(a),this.markUpdated()}}async updateRamUsage(e){const t=await Object(n.a)(this.code,e);t>0&&(this.ramUsage=Object(s.a)(t))}toJSON(){return Object(o.b)("Script",this)}static fromJSON(e){return Object(o.a)(u,e.data)}}o.c.constructors.Script=u},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(155),r=a(12);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 m})),a.d(t,"c",(function(){return h})),a.d(t,"a",(function(){return p}));var n=a(63),r=a(18),i=a(1),o=a(22),s=a(30),l=a(44),c=a(122),u=a(14);function m(){const e=d(),t=f(),a=g(),r=y(a,t),i=new n.a(r,e,t);a.addContract(i)}function h(){const e=d(),t=f(),a=i.a.getHomeComputer(),r=y(a,t),o=new n.a(r,e,t);a.addContract(o)}function p(e){let t;const a=Object.keys(n.d);t=null!=e.problemType&&a.includes(e.problemType)?e.problemType:d();const r=f();let i,l;null!=e.server?(i=Object(s.a)(e.server),null==i&&(i=o.b[e.server]),null==i&&(i=g())):i=g(),l=null!=e.fn?e.fn:y(i,r);const c=new n.a(l,t,r);i.addContract(c)}function d(){const e=Object.keys(n.d);return e[Object(u.a)(0,e.length-1)]}function f(){const e={name:"",type:Object(u.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(u.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(u.a)(0,t.length-1)]:e.type=n.c.Money;break}}return e}function g(){const e=Object.keys(o.b);let t=Object(u.a)(0,e.length-1),a=o.b[e[t]];for(let n=0;n<200&&(!(a instanceof c.a)||a.purchasedByPlayer||a.hostname===l.b.WorldDaemon);++n)t=Object(u.a)(0,e.length-1),a=o.b[e[t]];return a}function y(e,t){let a="contract-"+Object(u.a)(0,1e6);for(let t=0;t<1e3&&!(e.contracts.filter(e=>e.fn===a).length<=0);++t)a="contract-"+Object(u.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 u}));var n=a(29),r=a(28),i=a(14),o=a(11),s=a(12),l=a(246);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(.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)(76,100)/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=Object(i.a)(50,100),u=r.a.EmployeeSalaryMultiplier*(t+a+n+s+c),m=new l.a({intelligence:t*e,charisma:a*e,experience:n*e,creativity:s*e,efficiency:c*e,salary:u*e}),h=Object(o.d)(7);for(let e=0;e<this.employees.length;++e)if(this.employees[e].name===h)return this.hireRandomEmployee();return m.name=h,this.employees.push(m),m}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,"b",(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(450),r=a(20);const i=5,o=1e13,s="covenant-sleeve-purchases-popup";function l(e){Object(r.a)(s,n.a,{p:e,closeFn:()=>Object(r.b)(s)})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(12);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";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){const t=null!=e.tooltip&&""!==e.tooltip;let a="accordion-button";t&&(a+=" tooltip"),"string"==typeof e.addClasses&&(a+=" "+e.addClasses);const r={__html:e.tooltip?e.tooltip:""};return n.createElement("button",{className:a,id:e.id,onClick:e.onClick,style:e.style},e.text,t&&n.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:r}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(19);class i extends n.Component{render(){return n.createElement("div",{className:"faction-work-div"},n.createElement("div",{className:"faction-work-div-wrapper"},n.createElement(r.a,{onClick:this.props.onClick,text:this.props.buttonText}),n.createElement("p",null,this.props.infoText)))}}},,,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i}));var n=a(4);function r(e){let t;return t="number"==typeof e.money?e.money:e.money.toNumber(),t<0?0:Math.min(.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";function n(e,t=1){return 1+t*Math.pow(e,.8)/600}a.d(t,"a",(function(){return n}))},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,"a",(function(){return u}));var n=a(29),r=a(106),i=a(466),o=a(269),s=a(12),l=a(14);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+=.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+.9*o+1.3*s+1.5*c+u)*(1+Math.pow(this.designCost,.1)/100)*(1+Math.pow(t.sciResearch.qty,t.sciFac)/800);this.qlt=m*(.1*e[n.a.Engineer]+.05*e[n.a.Management]+.05*e[n.a.RandD]+.02*e[n.a.Operations]+.02*e[n.a.Business]),this.per=m*(.15*e[n.a.Engineer]+.02*e[n.a.Management]+.02*e[n.a.RandD]+.02*e[n.a.Operations]+.02*e[n.a.Business]),this.dur=m*(.05*e[n.a.Engineer]+.02*e[n.a.Management]+.08*e[n.a.RandD]+.05*e[n.a.Operations]+.05*e[n.a.Business]),this.rel=m*(.02*e[n.a.Engineer]+.08*e[n.a.Management]+.02*e[n.a.RandD]+.05*e[n.a.Operations]+.08*e[n.a.Business]),this.aes=m*(0*e[n.a.Engineer]+.08*e[n.a.Management]+.05*e[n.a.RandD]+.02*e[n.a.Operations]+.1*e[n.a.Business]),this.fea=m*(.08*e[n.a.Engineer]+.05*e[n.a.Management]+.02*e[n.a.RandD]+.05*e[n.a.Operations]+.05*e[n.a.Business]),this.calculateRating(t);const h=1+Math.pow(this.advCost,.1)/100;this.mku=100/(h*Math.pow(this.qlt+.001,.65)*(u+o)),0===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";a.d(t,"a",(function(){return u})),a.d(t,"c",(function(){return l})),a.d(t,"b",(function(){return m}));var n=a(53),r=a(125),i=a(8),o={ENABLE_BASH_HOTKEYS:"Improved Bash emulation mode. Setting this to 1 enables several\nnew Terminal shortcuts and features that more closely resemble\na real Bash-style shell. Note that when this mode is enabled,\nthe default browser shortcuts are overriden by the new Bash\nshortcuts.\n\nTo see a full list of the Terminal shortcuts that this enables, see:\nhttp://bitburner.readthedocs.io/en/latest/shortcuts.html",ENABLE_TIMESTAMPS:"Terminal commands and log entries will be timestamped. The timestamp\nwill have the format: M/D h:m",MAIN_MENU_STYLE:"Customize the main navigation menu on the left-hand side. Current options:\n\ndefault, classic, compact",THEME_BACKGROUND_COLOR:"Sets the background color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000",THEME_FONT_COLOR:"Sets the font color for not only the Terminal, but also for\nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33",THEME_HIGHLIGHT_COLOR:"Sets the highlight color for not only the Terminal, but also for \nmost of the game's UI.\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff",THEME_PROMPT_COLOR:"Sets the prompt color in the Terminal\n\nThe color must be specified as a pound sign (#) followed by a \n3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672",WRAP_INPUT:"Wrap Terminal Input. If this is enabled, then when a Terminal command is\ntoo long and overflows, then it will wrap to the next line instead of\nside-scrolling\n\nNote that after you enable/disable this, you'll have to run a command\nbefore its effect takes place."};const s=["default","classic","compact"];function l(e){var t=Object(r.b)(e,{sourceType:"module"}),a=[];for(a.push(t);0!=a.length;){var n=a.shift();switch(n.type){case"BlockStatement":case"Program":for(var i=0;i<n.body.length;++i)n.body[i]instanceof r.a&&a.push(n.body[i]);break;case"AssignmentExpression":var o;if(null==n.left||null==n.left.name)break;if(o=n.left.name,null==n.right||null==n.right.raw)break;c(o,n.right.raw)}for(var s in n)n.hasOwnProperty(s)&&n[s]instanceof r.a&&a.push(n[s])}h(),p()}function c(e,t){if(e=String(e),t=String(t),null!=e&&null!=t&&null!=n.a[e])switch(e){case"ENABLE_BASH_HOTKEYS":case"ENABLE_TIMESTAMPS":case"WRAP_INPUT":t="1"===(t=t.toLowerCase())||"true"===t||"y"===t,n.a[e]=t;break;case"MAIN_MENU_STYLE":t=a(t);s.includes(t)?n.a[e]=t:Object(i.a)(`Invalid option specified for ${e}. Options: ${s.toString()}`);break;case"THEME_BACKGROUND_COLOR":case"THEME_FONT_COLOR":case"THEME_HIGHLIGHT_COLOR":case"THEME_PROMPT_COLOR":t=a(t);/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)?n.a[e]=t:Object(i.a)(`Invalid color specified for ${e}. Must be a hex color code preceded by a pound (#)`)}else console.warn("Invalid .fconf setting: "+e);function a(e){return(e=e.toLowerCase()).startsWith('"')&&(e=e.slice(1)),e.endsWith('"')&&(e=e.slice(0,-1)),e}}function u(){var e="";for(var t in n.a)if(n.a.hasOwnProperty(t)){if(null==(a=o[t]))continue;for(var a=a.split("\n"),r=0;r<a.length;++r)e+="//"+a[r]+"\n";e+=`${t} = ${!0===n.a[t]?"1":!1===n.a[t]?"0":'"'+String(n.a[t])+'"'}\n\n`}return e}function m(e){let t=JSON.parse(e);for(var a in t)t.hasOwnProperty(a)&&(n.a[a]=t[a]);h(),p()}function h(){null!=n.a.THEME_HIGHLIGHT_COLOR&&null!=n.a.THEME_FONT_COLOR&&null!=n.a.THEME_BACKGROUND_COLOR&&null!=n.a.THEME_PROMPT_COLOR?/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(n.a.THEME_HIGHLIGHT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(n.a.THEME_FONT_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(n.a.THEME_BACKGROUND_COLOR)&&/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(n.a.THEME_PROMPT_COLOR)&&(document.body.style.setProperty("--my-highlight-color",n.a.THEME_HIGHLIGHT_COLOR),document.body.style.setProperty("--my-font-color",n.a.THEME_FONT_COLOR),document.body.style.setProperty("--my-background-color",n.a.THEME_BACKGROUND_COLOR),document.body.style.setProperty("--my-prompt-color",n.a.THEME_PROMPT_COLOR)):console.error("Cannot find Theme Settings")}function p(){const e=document.getElementById("mainmenu"),t=document.getElementById("hacking-menu-header"),a=document.getElementById("character-menu-header"),r=document.getElementById("world-menu-header"),i=document.getElementById("help-menu-header");function o(){t.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),a.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),r.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic"),i.classList.remove("mainmenu-accordion-header","mainmenu-accordion-header-classic")}function s(e){t.classList.add(e),a.classList.add(e),r.classList.add(e),i.classList.add(e)}if("default"===n.a.MAIN_MENU_STYLE)o(),e.classList.remove("classic"),e.classList.remove("compact"),s("mainmenu-accordion-header");else if("classic"===n.a.MAIN_MENU_STYLE)o(),e.classList.remove("compact"),e.classList.add("classic"),s("mainmenu-accordion-header-classic");else{if("compact"!==n.a.MAIN_MENU_STYLE)return;o(),e.classList.remove("classic"),e.classList.add("compact"),s("mainmenu-accordion-header-compact")}t.click(),t.click(),a.click(),a.click(),r.click(),r.click(),i.click(),i.click()}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(65),r=a(121);function i(e){if(null!==e)try{const t=Object(n.a)(e)?Object(r.a)(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(36),r=a(14),i=a(12),o=a(135);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()+.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,"b",(function(){return i})),a.d(t,"a",(function(){return o}));var n=a(0),r=a(19);let i;!function(e){e[e.AllStocks=0]="AllStocks",e[e.Portfolio=1]="Portfolio"}(i||(i={}));class o extends n.Component{constructor(e){super(e)}renderDisplayModeButton(){let e="",t="";return this.props.tickerDisplayMode===i.Portfolio?(e="Switch to 'All Stocks' Mode",t="Displays all stocks on the WSE"):(e="Switch to 'Portfolio' Mode",t="Displays only the stocks for which you have shares or orders"),n.createElement(r.a,{onClick:this.props.changeDisplayMode,text:e,tooltip:t})}render(){return n.createElement("div",null,this.renderDisplayModeButton(),n.createElement(r.a,{onClick:this.props.expandAllTickers,text:"Expand Tickers"}),n.createElement(r.a,{onClick:this.props.collapseAllTickers,text:"Collapse Tickers"}),n.createElement("input",{className:"text-input",id:"stock-market-watchlist-filter",onChange:this.props.changeWatchlistFilter,placeholder:"Filter Stocks by symbol (comma-separated list)",type:"text"}))}}},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 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,.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,.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,.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.12,.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,.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,.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,.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,.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,.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,.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 n}));class n{constructor(e){var t,a,n;if(n={},(a="subscribers")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,Array.isArray(e))for(const t of e)this.addSubscriber(t)}addSubscriber(e){this.subscribers[e.id]=e.cb}emitEvent(...e){for(const t in this.subscribers){(0,this.subscribers[t])(e)}}removeSubscriber(e){delete this.subscribers[e]}}},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 l}));var n=a(230),r=a(81),i=a(358),o=a(16),s=a(493);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--------- \n / 39 | 41 \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";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(16);function o(e){return e.city!==e.currentCity?r.a.createElement("span",{className:"tooltip",style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px"},onClick:()=>e.onTravel(e.city)},r.a.createElement("span",{className:"tooltiptext"},e.city),r.a.createElement("b",null,e.city[0])):r.a.createElement("span",null,e.city[0])}function s(e){return r.a.createElement("div",{className:"noselect"},r.a.createElement("pre",null," ,_ . ._. _. ."),r.a.createElement("pre",null," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),r.a.createElement("pre",null," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),r.a.createElement("pre",null," / ,/'-/~ '\\ ,' _ , '",r.a.createElement(o,{onTravel:e.onTravel,currentCity:e.currentCity,city:i.a.Volhaven}),",'|~ ._/-, /~"),r.a.createElement("pre",null," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),r.a.createElement("pre",null,".-~ '| '',\\~|\\ _\\~ ,_ , ",r.a.createElement(o,{onTravel:e.onTravel,currentCity:e.currentCity,city:i.a.Chongqing})," /,"),r.a.createElement("pre",null," '\\ ",r.a.createElement(o,{onTravel:e.onTravel,currentCity:e.currentCity,city:i.a.Sector12})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),r.a.createElement("pre",null," | / ._-~'\\_ _~| \\ ) ",r.a.createElement(o,{onTravel:e.onTravel,currentCity:e.currentCity,city:i.a.NewTokyo})),r.a.createElement("pre",null," \\ __-\\ '/ ~ |\\ \\_ / ~"),r.a.createElement("pre",null," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),r.a.createElement("pre",null," ~-_' _; '\\ '-, \\,' /\\/ |"),r.a.createElement("pre",null," '\\_,~'\\_ \\_ _, /' ' |, /|'"),r.a.createElement("pre",null," / \\_ ~ | / \\ ~'; -,_."),r.a.createElement("pre",null," | ~\\ | | , '-_, ,; ~ ~\\"),r.a.createElement("pre",null," \\, ",r.a.createElement(o,{onTravel:e.onTravel,currentCity:e.currentCity,city:i.a.Aevum})," / \\ / /| ,-, , -,"),r.a.createElement("pre",null," | ,/ | |' |/ ,- ~ \\ '."),r.a.createElement("pre",null," ,| ,/ \\ ,/ \\ ",r.a.createElement(o,{onTravel:e.onTravel,currentCity:e.currentCity,city:i.a.Ishima})," |"),r.a.createElement("pre",null," / | ~ -~~-, / _"),r.a.createElement("pre",null," | ,-' ~ /"),r.a.createElement("pre",null," / ,' ~"),r.a.createElement("pre",null," ',| ~"),r.a.createElement("pre",null," ~'"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(11);function o(e){return e.chance[0]===e.chance[1]?r.a.createElement(r.a.Fragment,null,Object(i.c)(100*e.chance[0],1),"%"):r.a.createElement(r.a.Fragment,null,Object(i.c)(100*e.chance[0],1),"% ~ ",Object(i.c)(100*e.chance[1],1),"%")}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(2);function i(e){return n.createElement("span",{className:"light-yellow samefont"},"number"==typeof e?r.a.formatFavor(e):e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return o}));var n=a(50),r=a(8);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),!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 m}));var n=a(28),r=a(14),i=a(12),o=a(67),s=a(29),l=a(2),c=a(11);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={}){u(this,"pro",0),u(this,"cyclesUntilRaise",n.a.CyclesPerEmployeeRaise),this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(r.a)(50,100),this.hap=e.happiness?e.happiness:Object(r.a)(50,100),this.ene=e.energy?e.energy:Object(r.a)(50,100),this.int=e.intelligence?e.intelligence:Object(r.a)(10,50),this.cha=e.charisma?e.charisma:Object(r.a)(10,50),this.exp=e.experience?e.experience:Object(r.a)(10,50),this.cre=e.creativity?e.creativity:Object(r.a)(10,50),this.eff=e.efficiency?e.efficiency:Object(r.a)(10,50),this.sal=e.salary?e.salary:Object(r.a)(.1,5),this.loc=e.loc?e.loc:"",this.pos=s.a.Unassigned}process(e=1,t){const a=.003*e,r=a*Math.random();this.exp+=a,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.sal+=n.a.EmployeeRaiseAmount,this.cyclesUntilRaise+=n.a.CyclesPerEmployeeRaise);const i=a*Math.random();this.pos===s.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.ene<t.minEne&&(this.ene=t.minEne),this.hap<t.minHap&&(this.hap=t.minHap);return this.sal*e*n.a.SecsPerMarketCycle}calculateProductivity(e,t){const a=this.cre*e.getEmployeeCreMultiplier()*t.getEmployeeCreMultiplier(),n=this.cha*e.getEmployeeChaMultiplier()*t.getEmployeeChaMultiplier(),r=this.int*e.getEmployeeIntMultiplier()*t.getEmployeeIntMultiplier(),i=this.eff*e.getEmployeeEffMultiplier()*t.getEmployeeEffMultiplier(),o=this.mor*this.hap*this.ene*1e-6;let l=0;switch(this.pos){case s.a.Operations:l=.6*r+.1*n+this.exp+.5*a+i;break;case s.a.Engineer:l=r+.1*n+1.5*this.exp+i;break;case s.a.Business:l=.4*r+n+.5*this.exp;break;case s.a.Management:l=2*n+this.exp+.2*a+.7*i;break;case s.a.RandD:l=1.5*r+.8*this.exp+a+.5*i;break;case s.a.Unassigned:case s.a.Training:l=0;break;default:console.error("Invalid employee position: "+this.pos)}return o*l}throwParty(e){const t=1+e/1e7;return this.mor*=t,this.mor=Math.min(100,this.mor),this.hap*=t,this.hap=Math.min(100,this.hap),t}createUI(e,t,a){const n=this.cre*t.getEmployeeCreMultiplier()*a.getEmployeeCreMultiplier(),r=this.cha*t.getEmployeeChaMultiplier()*a.getEmployeeChaMultiplier(),i=this.int*t.getEmployeeIntMultiplier()*a.getEmployeeIntMultiplier(),u=this.eff*t.getEmployeeEffMultiplier()*a.getEmployeeEffMultiplier();e.style.color="white",e.appendChild(Object(o.a)("p",{id:"cmpy-mgmt-employee-"+this.name+"-panel-text",innerHTML:"Morale: "+Object(c.c)(this.mor,3)+"<br>Happiness: "+Object(c.c)(this.hap,3)+"<br>Energy: "+Object(c.c)(this.ene,3)+"<br>Intelligence: "+Object(c.c)(i,3)+"<br>Charisma: "+Object(c.c)(r,3)+"<br>Experience: "+Object(c.c)(this.exp,3)+"<br>Creativity: "+Object(c.c)(n,3)+"<br>Efficiency: "+Object(c.c)(u,3)+"<br>Salary: "+l.a.format(this.sal,"$0.000a")+"/ s<br>"}));const m=Object(o.a)("select",{});for(const e in s.a)s.a.hasOwnProperty(e)&&m.add(Object(o.a)("option",{text:s.a[e],value:s.a[e]}));m.addEventListener("change",()=>{this.pos=m.options[m.selectedIndex].value});for(let e=0;e<m.length;++e)if(m.options[e].value===this.pos){m.selectedIndex=e;break}e.appendChild(m)}copy(){const e=new m;return e.name=this.name,e.mor=this.mor,e.hap=this.hap,e.ene=this.ene,e.int=this.int,e.cha=this.cha,e.exp=this.exp,e.cre=this.cre,e.eff=this.eff,e.sal=this.sal,e.pro=this.pro,e.cyclesUntilRaise=this.cyclesUntilRaise,e.loc=this.loc,e.pos=this.pos,e}toJSON(){return Object(i.b)("Employee",this)}static fromJSON(e){return Object(i.a)(m,e.data)}}i.c.constructors.Employee=m},,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return o}));var n=a(114);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 Ne}));var n=a(316),r=a(292),i=a(9),o=a(153),s=a(15),l=a(94),c=a(191),u=a(3),m=a(5),h=a(245),p=a(113),d=a(136),f=a(40),g=a(192),y=a(54),_=a(4),b=a(163),E=a(46),v=(a(12),a(233)),k=a(234),C=a(66),O=a(289),w=a(260),S=a(49),T=a(126),x=a(116),M=a(18),P=a(70),A=a(95),R=a(270),N=a(39),D=a(145),I=a(127),j=a(24),L=a(72),B=a(16),F=a(6),W=a(91),U=a(144),G=a(87),H=a(96),K=a(1),q=a(38),$=a(201),z=a(156),Y=a(82),V=a(22),J=a(194),X=a(30),Q=a(115),Z=a(44),ee=a(43),te=a(117),ae=a(261),ne=a(59),re=a(118),ie=a(64),oe=a(45),se=a(57),le=a(157),ce=a(75),ue=a(162),me=a(97),he=a(84),pe=a(114),de=a(88),fe=a(291),ge=a(189),ye=a(47),_e=a(295),be=a(159),Ee=a(2),ve=a(7),ke=a(86),Ce=a(487),Oe=a(11),we=a(176),Se=a(137),Te=a(65),xe=a(67),Me=a(193),Pe=a(104);const Ae=new fe.a("",()=>{});function Re(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=Ae.getProperty(e,"length");for(let n=0;n<a;n++)Ae.hasProperty(e,n)&&(t[n]=Re(Ae.getProperty(e,n)))}else for(var a in t={},e.properties){const n=e.properties[a];t[a]=Re(n)}return t}function Ne(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.serverIp}`),n=1),t.dynamicRamUsage+=a*n,t.dynamicRamUsage>1.01*t.ramUsage)throw Object(de.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: ${Ee.a.formatRAM(t.dynamicRamUsage)}\n Static RAM Usage: ${Ee.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 &nbsp;&nbsp;const scan = eval('ns.scan');\n\n * Using map access to do the same\n &nbsp;&nbsp;const scan = ns['scan'];\n\n * Saving script in the improper order.\n &nbsp;&nbsp;Increase the cost of an imported script, save it, then run the\n &nbsp;&nbsp;parent. To fix this just re-open & save every script in order\n &nbsp;&nbsp;from most imported to least imported (parent script).\n\n Sorry :(`)},fe=function(e,t=""){var a=Object(X.b)(e);if(null==a)throw We(t,"Invalid IP/hostname: "+e);return a},Ae=function(e,a,n,r){if("string"==typeof n&&""!==n||(n="getRunningScript"),!Array.isArray(r))throw Object(de.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.serverIp);const i=fe(a,n);return Object(z.a)(e,r,i)}return t.scriptRef},De=function(e,t){"string"==typeof t&&""!==t||(t="getRunningScriptgetRunningScriptByPid");for(const t of Object.keys(V.b)){const a=V.b[t],n=Object(z.b)(e,a);if(n)return n}return null},Ie=function(e,t,a){return Array.isArray(a)||(a=[]),`Cannot find running script ${e} on server ${t} with args: ${Object(Se.a)(a)}`},je=function(e=""){if(!K.a.hasWseAccount)throw We(e,`You don't have WSE Access! Cannot use ${e}()`);if(!K.a.hasTixApiAccess)throw We(e,`You don't have TIX API Access! Cannot use ${e}()`)},Le=function(e,t=""){const a=ne.b[e];if(null==a)throw We(t,`Invalid stock symbol: '${e}'`);return a},Be=function(e,a=""){return e instanceof L.a&&(t.log(a,"Does not work on Hacknet Servers"),!0)},Fe=function(e,t=""){if(isNaN(e))throw We(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=K.a.hacknetNodes.length)throw We(t,"Index specified for Hacknet Node is out-of-bounds: "+e);if(Object(N.g)(K.a)){const a=V.b[K.a.hacknetNodes[e]];if(null==a)throw We(t,`Could not get Hacknet Server for index ${e}. This is probably a bug, please report to game dev`);return a}return K.a.hacknetNodes[e]},We=function(e,a){const n=(new Error).stack.split("\n").slice(1),r=t.getServer().scripts,i=[];for(const e of n){let t;for(const a of r){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 o(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=o(e);function s(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);let l=s(e);l&&(a=l),i.push(`${t}:L${a.line}@${a.func}`)}t.log(e,a);let l=`${e}: ${a}`;return 0!==i.length&&(l+="<br><br>Stack:<br>"+i.join("<br>")),Object(de.b)(t,l)},Ue=function(e,t){if(ee.a[5]<1&&5!==K.a.bitNodeN||ee.a[t]<1&&K.a.bitNodeN!==t){let a="";throw 5!==t&&(a=` and Source-File ${t}-1`),We("formulas."+e,`Requires Source-File 5-1${a} to run.`)}},Ge=function(e,t){if(4!==K.a.bitNodeN&&ee.a[4]<t)throw We(e,`This singularity function requires Source-File 4-${t} to run.`)},He=function(e,t=!1){if(!(7===K.a.bitNodeN||K.a.sourceFiles.some(e=>7===e.n))){throw We("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(!(K.a.bladeburner instanceof p.a)){throw We("bladeburner."+e,"You must be a member of the Bladeburner division to use this API.")}}},Ke=function(e,t){if(!K.a.bladeburner.cities.hasOwnProperty(t))throw We("bladeburner."+e,"Invalid city: "+t)},qe=function(e){if(10!==K.a.bitNodeN&&!ee.a[10])throw We("sleeve."+e,"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10")},$e=function(e,a){if(a>=K.a.sleeves.length||a<0){const n="Invalid sleeve number: "+a;throw t.log(e,n),We("sleeve."+e,n)}},ze=function(e,t,a){const n=fe(t,e).getContract(a);if(null==n)throw We("codingcontract."+e,`Cannot find contract '${a}' on server '${t}'`);return n},Ye=function(e){if(!(K.a.gang instanceof w.a))throw We("gang."+e,"You do not currently have a Gang")},Ve=function(e,t){for(const e of K.a.gang.members)if(e.name===t)return e;throw We("gang."+e,`Invalid gang member: '${t}'`)},Je=function(e,t,a){const n=K.a.bladeburner.getActionIdFromTypeAndName(t,a);if(!n)throw We("bladeburner."+e,`Invalid action type='${t}', name='${a}'`);const r=K.a.bladeburner.getActionObject(n);if(!r)throw We("bladeburner."+e,`Invalid action type='${t}', name='${a}'`);return r},Xe=function(e,t){const a=f.a[t];if(null==a||!(a instanceof d.a))throw We(e,`Invalid company name: '${t}'`);return a},Qe=function(e,t){if(!Object(M.b)(t))throw We(e,"Invalid faction name: '"+t);return M.a[t]},Ze=function(e,t){if(!Object(l.b)(t))throw We(e,`Invalid augmentation: '${t}'`);return s.a[t]};function et(e){const t=K.a.corporation.divisions.find(t=>t.name===e);if(void 0===t)throw new Error(`No division named '${e}'`);return t}function tt(e,t){const a=et(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 at(e,t){const a=et(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 nt(e,t,a){const n=at(e,t).materials[a];if(void 0===n)throw new Error(`Invalid material name: '${a}'`);return n}function rt(e,t){const a=et(e).products[t];if(void 0===a)throw new Error(`Invalid product name: '${t}'`);return a}function it(e,t,a){const n=tt(e,t).employees.find(e=>e.name===a);if(void 0===n)throw new Error(`Invalid employee name: '${a}'`);return n}const ot=function(e=null){if(e&&Object(Te.a)(e)){const t=K.a.getHomeComputer();for(const a of t.scripts)if(a.filename===e){if(a.ramUsage>t.maxRam-t.ramUsed)return;const e=new J.a(a,[]);e.threads=1,Object(me.e)(e,t)}}},st=function(e,a,{threads:n,stock:r}={}){if(void 0===e)throw We("hack","Takes 1 argument.");const i=Object(de.d)(t,"hack",n),o=Object(X.b)(e);if(null==o)throw We("hack",`Invalid IP/hostname: ${e}.`);var s=Object(C.d)(o,K.a);const l=Object(R.b)(o,K.a);if(!l.res)throw We("hack",l.msg);return t.log("hack",`Executing ${e} in ${Object(Oe.b)(1e3*s,!0)} (t=${Ee.a.formatThreads(i)})`),Object(de.c)(1e3*s,t).then((function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(C.b)(o,K.a),n=Math.random(),s=Object(C.c)(o,K.a)*i,l=s/4;if(n<e){const e=Object(C.e)(o,K.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 K.a.gainMoney(u),t.scriptRef.onlineMoneyMade+=u,K.a.scriptProdSinceLastAug+=u,K.a.recordMoneySource(u,"hacking"),t.scriptRef.recordHack(o.ip,u,i),K.a.gainHackingExp(s),t.scriptRef.onlineExpGained+=s,t.log("hack",`Successfully hacked '${o.hostname}' for ${Ee.a.formatMoney(u)} and ${Ee.a.formatExp(s)} exp (t=${Ee.a.formatThreads(i)})`),o.fortify(_.a.ServerFortifyAmount*Math.min(i,n)),r&&Object(ae.c)(o,u),a&&(o.backdoorInstalled=!0),Promise.resolve(u)}return K.a.gainHackingExp(l),t.scriptRef.onlineExpGained+=l,t.log("hack",`Failed to hack '${o.hostname}'. Gained ${Ee.a.formatExp(l)} exp (t=${Ee.a.formatThreads(i)})`),Promise.resolve(0)}))},lt=function(e){let t="";for(let a of e)a=Re(a),t+="object"!=typeof a?""+a:JSON.stringify(a);return t},ct={hacknet:{numNodes:function(){return K.a.hacknetNodes.length},maxNumNodes:function(){return Object(N.g)(K.a)?j.b.MaxServers:1/0},purchaseNode:function(){return Object(N.l)(K.a)},getPurchaseNodeCost:function(){return Object(N.g)(K.a)?Object(N.b)(K.a):Object(N.a)(K.a)},getNodeStats:function(e){const t=Fe(e,"getNodeStats"),a=Object(N.g)(K.a),n={name:a?t.hostname:t.name,level:t.level,ram:a?t.maxRam:t.ram,cores:t.cores,production:a?t.hashRate:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:a?t.totalHashesGenerated:t.totalMoneyGenerated};return a&&(n.cache=t.cache,n.hashCapacity=t.hashCapacity),n},upgradeLevel:function(e,t){const a=Fe(e,"upgradeLevel");return Object(N.n)(K.a,a,t)},upgradeRam:function(e,t){const a=Fe(e,"upgradeRam");return Object(N.o)(K.a,a,t)},upgradeCore:function(e,t){const a=Fe(e,"upgradeCore");return Object(N.k)(K.a,a,t)},upgradeCache:function(e,t){if(!Object(N.g)(K.a))return!1;const a=Fe(e,"upgradeCache"),n=Object(N.j)(K.a,a,t);return n&&Object(N.p)(K.a),n},getLevelUpgradeCost:function(e,t){return Fe(e,"upgradeLevel").calculateLevelUpgradeCost(t,K.a.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(e,t){return Fe(e,"upgradeRam").calculateRamUpgradeCost(t,K.a.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(e,t){return Fe(e,"upgradeCore").calculateCoreUpgradeCost(t,K.a.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(e,t){if(!Object(N.g)(K.a))return 1/0;return Fe(e,"upgradeCache").calculateCacheUpgradeCost(t)},numHashes:function(){return Object(N.g)(K.a)?K.a.hashManager.hashes:0},hashCapacity:function(){return Object(N.g)(K.a)?K.a.hashManager.capacity:0},hashCost:function(e){return Object(N.g)(K.a)?K.a.hashManager.getUpgradeCost(e):1/0},spendHashes:function(e,t){return!!Object(N.g)(K.a)&&Object(N.m)(K.a,e,t)},getHashUpgradeLevel:function(e){const t=K.a.hashManager.upgrades[e];if(void 0===t)throw We("hacknet.hashUpgradeLevel","Invalid Hash Upgrade: "+e);return t},getStudyMult:function(){return!!Object(N.g)(K.a)&&K.a.hashManager.getStudyMult()},getTrainingMult:function(){return!!Object(N.g)(K.a)&&K.a.hashManager.getTrainingMult()}},sprintf:n.sprintf,vsprintf:n.vsprintf,scan:function(e=t.serverIp,n=!0){a("scan",Object(i.c)("scan"));var r=Object(X.b)(e);if(null==r)throw We("scan",`Invalid IP/hostname: ${e}.`);for(var o=[],s=0;s<r.serversOnNetwork.length;s++){var l;null!=(l=n?Object(X.c)(r,s).hostname:Object(X.c)(r,s).ip)&&o.push(l)}return t.log("scan",`returned ${r.serversOnNetwork.length} connections for ${r.hostname}`),o},hack:function(e,{threads:t,stock:n}={}){return a("hack",Object(i.c)("hack")),st(e,!1,{threads:t,stock:n})},hackAnalyzeThreads:function(e,n){a("hackAnalyzeThreads",Object(i.c)("hackAnalyzeThreads"));const r=fe(e,"hackAnalyzeThreads");if(isNaN(n))throw We(t,`Invalid growth argument passed into hackAnalyzeThreads: ${n}. Must be numeric.`);if(n<0||n>r.moneyAvailable)return-1;const o=Object(C.e)(r,K.a);return n/Math.floor(r.moneyAvailable*o)},hackAnalyzePercent:function(e){a("hackAnalyzePercent",Object(i.c)("hackAnalyzePercent"));const t=fe(e,"hackAnalyzePercent");return 100*Object(C.e)(t,K.a)},hackChance:function(e){a("hackChance",Object(i.c)("hackChance"));const t=fe(e,"hackChance");return Object(C.b)(t,K.a)},sleep:function(e){if(void 0===e)throw We("sleep","Takes 1 argument.");return t.log("sleep",`Sleeping for ${e} milliseconds`),Object(de.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(de.d)(t,"grow",n);if(void 0===e)throw We("grow","Takes 1 argument.");var s=Object(X.b)(e);if(null==s)throw We("grow",`Invalid IP/hostname: ${e}.`);const l=Object(X.b)(t.serverIp),c=Object(R.a)(s);if(!c.res)throw We("grow",c.msg);var u=Object(C.a)(s,K.a);return t.log("grow",`Executing on '${s.hostname}' in ${Object(Oe.b)(1e3*u,!0)} (t=${Ee.a.formatThreads(o)}).`),Object(de.c)(1e3*u,t).then((function(){if(t.env.stopFlag)return Promise.reject(t);const e=s.moneyAvailable<=0?1:s.moneyAvailable;s.moneyAvailable+=1*o,Object(X.g)(s,o,K.a,l.cpuCores);const a=s.moneyAvailable;t.scriptRef.recordGrow(s.ip,o);var n=Object(C.c)(s,K.a)*o;const i=a/e-1;return t.log("grow",`Available money on '${s.hostname}' grown by ${Ee.a.formatPercentage(i,6)}. Gained ${Ee.a.formatExp(n)} hacking exp (t=${Ee.a.formatThreads(o)}).`),t.scriptRef.onlineExpGained+=n,K.a.gainHackingExp(n),r&&Object(ae.b)(s,a-e),Promise.resolve(a/e)}))},growthAnalyze:function(e,t){a("growthAnalyze",Object(i.c)("growthAnalyze"));const n=fe(e,"growthAnalyze");if("number"!=typeof t||isNaN(t)||t<1||!isFinite(t))throw We("growthAnalyze",`Invalid argument: growth must be numeric and >= 1, is ${t}.`);return Object(X.e)(n,Number(t),K.a)},weaken:function(e,{threads:n}={}){a("weaken",Object(i.c)("weaken"));var r=Object(de.d)(t,"weaken",n);if(void 0===e)throw We("weaken","Takes 1 argument.");const o=Object(X.b)(e);if(null==o)throw We("weaken","Invalid IP/hostname: "+e);const s=Object(R.c)(o);if(!s.res)throw We("weaken",s.msg);const l=Object(C.f)(o,K.a);return t.log("weaken",`Executing on '${o.hostname}' in ${Object(Oe.b)(1e3*l,!0)} (t=${Ee.a.formatThreads(r)})`),Object(de.c)(1e3*l,t).then((function(){if(t.env.stopFlag)return Promise.reject(t);const e=1+(Object(X.b)(t.serverIp).cpuCores-1)/16;o.weaken(_.a.ServerWeakenAmount*r*e),t.scriptRef.recordWeaken(o.ip,r);const a=Object(C.c)(o,K.a)*r;return t.log("weaken",`'${o.hostname}' security level weakened to ${o.hackDifficulty}. Gained ${Ee.a.formatExp(a)} hacking exp (t=${Ee.a.formatThreads(r)})`),t.scriptRef.onlineExpGained+=a,K.a.gainHackingExp(a),Promise.resolve(_.a.ServerWeakenAmount*r)}))},print:function(){if(0===arguments.length)throw We("print","Takes at least 1 argument.");t.print(lt(arguments))},tprint:function(){if(0===arguments.length)throw We("tprint","Takes at least 1 argument.");Object(ve.c)(`${t.scriptRef.filename}: ${lt(arguments)}`)},tprintf:function(e,...t){Object(ve.c)(Object(n.vsprintf)(e,t))},clearLog:function(){t.scriptRef.clearLog()},disableLog:function(e){if("ALL"===e){for(e in ut)t.disableLogs[e]=!0;t.log("disableLog","Disabled logging for all functions")}else{if(void 0===ut[e])throw We("disableLog",`Invalid argument: ${e}.`);t.disableLogs[e]=!0,t.log("disableLog","Disabled logging for "+e)}},enableLog:function(e){if(void 0===ut[e])throw We("enableLog",`Invalid argument: ${e}.`);delete t.disableLogs[e],t.log("enableLog","Enabled logging for "+e)},isLogEnabled:function(e){if(void 0===ut[e])throw We("isLogEnabled",`Invalid argument: ${e}.`);return!t.disableLogs[e]},getScriptLogs:function(e,a,...n){const r=Ae(e,a,"getScriptLogs",n);return null==r?(t.log("getScriptLogs",Ie(e,a,n)),""):r.logs.slice()},tail:function(e,a=t.serverIp,...n){let r;r=0===arguments.length?t.scriptRef:"number"==typeof e?De(e,"tail"):Ae(e,a,"tail",n),null!=r?Object(we.a)(r):t.log("tail",Ie(e,a,n))},nuke:function(e){if(a("nuke",Object(i.c)("nuke")),void 0===e)throw We("nuke","Takes 1 argument.");var n=Object(X.b)(e);if(null==n)throw We("nuke",`Invalid IP/hostname: ${e}.`);if(!K.a.hasProgram(q.a.NukeProgram.name))throw We("nuke","You do not have the NUKE.exe virus!");if(n.openPortCount<n.numOpenPortsRequired)throw We("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 We("brutessh","Takes 1 argument.");var n=Object(X.b)(e);if(null==n)throw We("brutessh",`Invalid IP/hostname: ${e}.`);if(!K.a.hasProgram(q.a.BruteSSHProgram.name))throw We("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 We("ftpcrack","Takes 1 argument.");var n=Object(X.b)(e);if(null==n)throw We("ftpcrack",`Invalid IP/hostname: ${e}.`);if(!K.a.hasProgram(q.a.FTPCrackProgram.name))throw We("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 We("relaysmtp","Takes 1 argument.");var n=Object(X.b)(e);if(null==n)throw We("relaysmtp",`Invalid IP/hostname: ${e}.`);if(!K.a.hasProgram(q.a.RelaySMTPProgram.name))throw We("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 We("httpworm","Takes 1 argument");var n=Object(X.b)(e);if(null==n)throw We("httpworm","Invalid IP/hostname: "+e);if(!K.a.hasProgram(q.a.HTTPWormProgram.name))throw We("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 We("sqlinject","Takes 1 argument.");var n=Object(X.b)(e);if(null==n)throw We("sqlinject","Invalid IP/hostname: "+e);if(!K.a.hasProgram(q.a.SQLInjectProgram.name))throw We("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){if(a("run",Object(i.c)("run")),void 0===e)throw We("run","Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(n)||n<=0)throw We("run","Invalid thread count. Must be numeric and > 0, is "+n);for(var r=[],o=2;o<arguments.length;++o)r.push(arguments[o]);var s=Object(X.b)(t.serverIp);if(null==s)throw We("run","Could not find server. This is a bug. Report to dev.");return Object(me.d)("run",s,e,r,t,n)},exec:function(e,n,r=1){if(a("exec",Object(i.c)("exec")),void 0===e||void 0===n)throw We("exec","Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(r)||r<=0)throw We("exec","Invalid thread count. Must be numeric and > 0, is "+r);for(var o=[],s=3;s<arguments.length;++s)o.push(arguments[s]);var l=Object(X.b)(n);if(null==l)throw We("exec","Invalid IP/hostname: "+n);return Object(me.d)("exec",l,e,o,t,r)},spawn:function(e,n){if(a("spawn",Object(i.c)("spawn")),!e||!n)throw We("spawn","Usage: spawn(scriptname, threads)");const r=10;Object(ke.a)(()=>{if(isNaN(n)||n<=0)throw We("spawn","Invalid thread count. Must be numeric and > 0, is "+n);for(var a=[],r=2;r<arguments.length;++r)a.push(arguments[r]);var i=Object(X.b)(t.serverIp);if(null==i)throw We("spawn","Could not find server. This is a bug. Report to dev");return Object(me.d)("spawn",i,e,a,t,n)},1e3*r),t.log("spawn",`Will execute '${e}' in ${r} seconds`),t.running=!1,Object(he.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(he.a)(e);else{if(void 0===e||void 0===n)throw We("kill","Usage: kill(scriptname, server, [arg1], [arg2]...)");const a=fe(n),i=Ae(e,n,"kill",r);if(null==i)return t.log("kill",Ie(e,n,r)),!1;o=Object(he.a)(i,a.ip)}return o?(s?t.log("kill","Killing script with PID "+e):t.log("kill",`Killing '${e}' on '${n}' with args: ${Object(Se.a)(r)}.`),!0):(s?t.log("kill","No script with PID "+e):t.log("kill",`No such script '${e}' on '${n}' with args: ${Object(Se.a)(r)}`),!1)},killall:function(e=t.serverIp){if(a("killall",Object(i.c)("killall")),void 0===e)throw We("killall","Takes 1 argument");const n=Object(X.b)(e);if(null==n)throw We("killall","Invalid IP/hostname: "+e);const r=n.runningScripts.length>0;for(let e=n.runningScripts.length-1;e>=0;--e)Object(he.a)(n.runningScripts[e],n.ip,!1);return o.a.emitEvent(),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(he.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 We("scp","Takes 2 or 3 arguments");if(e&&e.constructor===Array){var o=!1;return e.forEach((function(e){Ne(t).scp(e,n,r)&&(o=!0)})),o}if(!Object(ce.g)(e))throw We("scp",`Invalid filename: '${e}'`);if(!e.endsWith(".lit")&&!Object(Y.a)(e)&&!e.endsWith("txt"))throw We("scp","Only works for .script, .lit, and .txt files");var s,l;if(null!=r){if(void 0===e||void 0===n||void 0===r)throw We("scp","Takes 2 or 3 arguments");if(null==(s=Object(X.b)(r)))throw We("scp","Invalid IP/hostname: "+r);if(null==(l=Object(X.b)(n)))throw We("scp","Invalid IP/hostname: "+n)}else{if(null==n)throw We("scp","Takes 2 or 3 arguments");if(void 0===e||void 0===n)throw We("scp","Takes 2 or 3 arguments");if(null==(s=Object(X.b)(n)))throw We("scp","Invalid IP/hostname: "+n);if(null==(l=Object(X.b)(t.serverIp)))throw We("scp","Could not find server ip for this script. This is a bug. Report to dev.")}if(e.endsWith(".lit")){for(var c=!1,u=0;u<l.messages.length;++u)if(!(l.messages[u]instanceof G.a)&&l.messages[u]==e){c=!0;break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.messages.length;++u)if(s.messages[u]===e)return t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;return s.messages.push(e),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}if(e.endsWith(".txt")){var m;for(c=!1,u=0;u<l.textFiles.length;++u)if(l.textFiles[u].fn===e){c=!0,m=l.textFiles[u];break}if(!c)return t.log("scp",`File '${e}' does not exist.`),!1;for(u=0;u<s.textFiles.length;++u)if(s.textFiles[u].fn===e)return s.textFiles[u].text=m.text,t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0;var h=new ue.a(m.fn,m.text);return s.textFiles.push(h),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0}let p=null;for(let t=0;t<l.scripts.length;++t)if(e==l.scripts[t].filename){p=l.scripts[t];break}if(null==p)return t.log("scp",`File '${e}' does not exist.`),!1;for(let a=0;a<s.scripts.length;++a)if(e==s.scripts[a].filename){t.log("scp",`WARNING: File '${e}' overwritten on '${s.hostname}'`);const n=s.scripts[a];return n.code===p.code||(n.code=p.code,n.ramUsage=p.ramUsage,n.markUpdated()),!0}const d=new $.a(e);return d.code=p.code,d.ramUsage=p.ramUsage,d.server=s.ip,s.scripts.push(d),t.log("scp",`File '${e}' copied over to '${s.hostname}'.`),!0},ls:function(e,t){if(a("ls",Object(i.c)("ls")),void 0===e)throw We("ls","Usage: ls(ip/hostname, [grep filter])");const n=Object(X.b)(e);if(null==n)throw We("ls","Invalid IP/hostname: "+e);let r=!1;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++)r?n.messages[e]instanceof G.a?n.messages[e].filename.includes(r)&&o.push(n.messages[e].filename):n.messages[e].includes(r)&&o.push(n.messages[e]):n.messages[e]instanceof G.a?o.push(n.messages[e].filename):o.push(n.messages[e]);for(var s=0;s<n.textFiles.length;s++)r?n.textFiles[s].fn.includes(r)&&o.push(n.textFiles[s].fn):o.push(n.textFiles[s].fn);for(s=0;s<n.contracts.length;++s)r?n.contracts[s].fn.includes(r)&&o.push(n.contracts[s].fn):o.push(n.contracts[s].fn);return o.sort(),o},ps:function(e=t.serverIp){a("ps",Object(i.c)("ps"));var n=Object(X.b)(e);if(null==n)throw We("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 We("hasRootAccess","Takes 1 argument");var t=Object(X.b)(e);if(null==t)throw We("hasRootAccess","Invalid IP/hostname: "+e);return t.hasAdminRights},getIp:function(){a("getIp",Object(i.c)("getIp"));var e=Object(X.b)(t.serverIp);if(null==e)throw We("getIp","Could not find server. This is a bug. Report to dev.");return e.ip},getHostname:function(){a("getHostname",Object(i.c)("getHostname"));var e=Object(X.b)(t.serverIp);if(null==e)throw We(t,"Could not find server. This is a bug. Report to dev.");return e.hostname},getHackingLevel:function(){return a("getHackingLevel",Object(i.c)("getHackingLevel")),K.a.updateSkillLevels(),t.log("getHackingLevel","returned "+K.a.hacking_skill),K.a.hacking_skill},getHackingMultipliers:function(){return a("getHackingMultipliers",Object(i.c)("getHackingMultipliers")),{chance:K.a.hacking_chance_mult,speed:K.a.hacking_speed_mult,money:K.a.hacking_money_mult,growth:K.a.hacking_grow_mult}},getHacknetMultipliers:function(){return a("getHacknetMultipliers",Object(i.c)("getHacknetMultipliers")),{production:K.a.hacknet_node_money_mult,purchaseCost:K.a.hacknet_node_purchase_cost_mult,ramCost:K.a.hacknet_node_ram_cost_mult,coreCost:K.a.hacknet_node_core_cost_mult,levelCost:K.a.hacknet_node_level_cost_mult}},getBitNodeMultipliers:function(){if(a("getBitNodeMultipliers",Object(i.c)("getBitNodeMultipliers")),ee.a[5]<=0&&5!==K.a.bitNodeN)throw We("getBitNodeMultipliers","Requires Source-File 5 to run.");return Object.assign({},m.a)},getServer:function(e){if(a("getServer",Object(i.c)("getServer")),ee.a[5]<=0&&5!==K.a.bitNodeN)throw We("getServer","Requires Source-File 5 to run.");const t=fe(e,"getServer"),n=Object.assign({},t);return n.contracts=void 0,n.messages=void 0,n.runningScripts=void 0,n.scripts=void 0,n.textFiles=void 0,n.programs=void 0,n.serversOnNetwork=void 0,n},getServerMoneyAvailable:function(e){a("getServerMoneyAvailable",Object(i.c)("getServerMoneyAvailable"));const n=fe(e,"getServerMoneyAvailable");return Be(n,"getServerMoneyAvailable")?0:"home"==n.hostname?(t.log("getServerMoneyAvailable","returned player's money: "+Ee.a.formatMoney(K.a.money.toNumber())),K.a.money.toNumber()):(t.log("getServerMoneyAvailable",`returned ${Ee.a.formatMoney(n.moneyAvailable)} for '${n.hostname}'`),n.moneyAvailable)},getServerSecurityLevel:function(e){a("getServerSecurityLevel",Object(i.c)("getServerSecurityLevel"));const n=fe(e,"getServerSecurityLevel");return Be(n,"getServerSecurityLevel")?1:(t.log("getServerSecurityLevel",`returned ${Ee.a.formatServerSecurity(n.hackDifficulty,3)} for '${n.hostname}'`),n.hackDifficulty)},getServerBaseSecurityLevel:function(e){a("getServerBaseSecurityLevel",Object(i.c)("getServerBaseSecurityLevel"));const n=fe(e,"getServerBaseSecurityLevel");return Be(n,"getServerBaseSecurityLevel")?1:(t.log("getServerBaseSecurityLevel",`returned ${Ee.a.formatServerSecurity(n.baseDifficulty,3)} for '${n.hostname}'`),n.baseDifficulty)},getServerMinSecurityLevel:function(e){a("getServerMinSecurityLevel",Object(i.c)("getServerMinSecurityLevel"));const n=fe(e,"getServerMinSecurityLevel");return Be(n,"getServerMinSecurityLevel")?1:(t.log("getServerMinSecurityLevel",`returned ${Ee.a.formatServerSecurity(n.minDifficulty,3)} for ${n.hostname}`),n.minDifficulty)},getServerRequiredHackingLevel:function(e){a("getServerRequiredHackingLevel",Object(i.c)("getServerRequiredHackingLevel"));const n=fe(e,"getServerRequiredHackingLevel");return Be(n,"getServerRequiredHackingLevel")?1:(t.log("getServerRequiredHackingLevel",`returned ${Ee.a.formatSkill(n.requiredHackingSkill,0)} for '${n.hostname}'`),n.requiredHackingSkill)},getServerMaxMoney:function(e){a("getServerMaxMoney",Object(i.c)("getServerMaxMoney"));const n=fe(e,"getServerMaxMoney");return Be(n,"getServerMaxMoney")?0:(t.log("getServerMaxMoney",`returned ${Ee.a.formatMoney(n.moneyMax)} for '${n.hostname}'`),n.moneyMax)},getServerGrowth:function(e){a("getServerGrowth",Object(i.c)("getServerGrowth"));const n=fe(e,"getServerGrowth");return Be(n,"getServerGrowth")?1:(t.log("getServerGrowth",`returned ${n.serverGrowth} for '${n.hostname}'`),n.serverGrowth)},getServerNumPortsRequired:function(e){a("getServerNumPortsRequired",Object(i.c)("getServerNumPortsRequired"));const n=fe(e,"getServerNumPortsRequired");return Be(n,"getServerNumPortsRequired")?5:(t.log("getServerNumPortsRequired",`returned ${n.numOpenPortsRequired} for '${n.hostname}'`),n.numOpenPortsRequired)},getServerRam:function(e){a("getServerRam",Object(i.c)("getServerRam"));const n=fe(e,"getServerRam");return t.log("getServerRam",`returned [${Ee.a.formatRAM(n.maxRam,2)}, ${Ee.a.formatRAM(n.ramUsed,2)}]`),[n.maxRam,n.ramUsed]},getServerMaxRam:function(e){a("getServerMaxRam",Object(i.c)("getServerMaxRam"));const n=fe(e,"getServerMaxRam");return t.log("getServerMaxRam","returned "+Ee.a.formatRAM(n.maxRam,2)),n.maxRam},getServerUsedRam:function(e){a("getServerUsedRam",Object(i.c)("getServerUsedRam"));const n=fe(e,"getServerUsedRam");return t.log("getServerUsedRam","returned "+Ee.a.formatRAM(n.ramUsed,2)),n.ramUsed},serverExists:function(e){return a("serverExists",Object(i.c)("serverExists")),null!==Object(X.b)(e)},fileExists:function(e,n=t.serverIp){if(a("fileExists",Object(i.c)("fileExists")),void 0===e)throw We("fileExists","Usage: fileExists(scriptname, [server])");var r=Object(X.b)(n);if(null==r)throw We("fileExists","Invalid IP/hostname: "+n);for(var o=0;o<r.scripts.length;++o)if(e==r.scripts[o].filename)return!0;for(o=0;o<r.programs.length;++o)if(e.toLowerCase()==r.programs[o].toLowerCase())return!0;for(o=0;o<r.messages.length;++o)if(!(r.messages[o]instanceof G.a)&&e.toLowerCase()===r.messages[o])return!0;return null!=Object(ue.c)(e,r)},isRunning:function(e,n=t.serverIp,...r){if(a("isRunning",Object(i.c)("isRunning")),void 0===e||void 0===n)throw We("isRunning","Usage: isRunning(scriptname, server, [arg1], [arg2]...)");return"number"==typeof e?null!=De(e,"isRunning"):null!=Ae(e,n,"isRunning",r)},getStockSymbols:function(){return a("getStockSymbols",Object(i.c)("getStockSymbols")),je("getStockSymbols"),Object.values(se.a)},getStockPrice:function(e){a("getStockPrice",Object(i.c)("getStockPrice")),je("getStockPrice");return Le(e,"getStockPrice").price},getStockAskPrice:function(e){a("getStockAskPrice",Object(i.c)("getStockAskPrice")),je("getStockAskPrice");return Le(e,"getStockAskPrice").getAskPrice()},getStockBidPrice:function(e){a("getStockBidPrice",Object(i.c)("getStockBidPrice")),je("getStockBidPrice");return Le(e,"getStockBidPrice").getBidPrice()},getStockPosition:function(e){a("getStockPosition",Object(i.c)("getStockPosition")),je("getStockPosition");var t=ne.b[e];if(null==t)throw We("getStockPosition","Invalid stock symbol: "+e);return[t.playerShares,t.playerAvgPx,t.playerShortShares,t.playerAvgShortPx]},getStockMaxShares:function(e){a("getStockMaxShares",Object(i.c)("getStockMaxShares")),je("getStockMaxShares");return Le(e,"getStockMaxShares").maxShares},getStockPurchaseCost:function(e,t,n){a("getStockPurchaseCost",Object(i.c)("getStockPurchaseCost")),je("getStockPurchaseCost");const r=Le(e,"getStockPurchaseCost");let o;t=Math.round(t);const s=n.toLowerCase();if(s.includes("l"))o=oe.a.Long;else{if(!s.includes("s"))return 1/0;o=oe.a.Short}const l=Object(re.b)(r,t,o);return null==l?1/0:l},getStockSaleGain:function(e,t,n){a("getStockSaleGain",Object(i.c)("getStockSaleGain")),je("getStockSaleGain");const r=Le(e,"getStockSaleGain");let o;t=Math.round(t);const s=n.toLowerCase();if(s.includes("l"))o=oe.a.Long;else{if(!s.includes("s"))return 0;o=oe.a.Short}const l=Object(re.c)(r,t,o);return null==l?0:l},buyStock:function(e,n){a("buyStock",Object(i.c)("buyStock")),je("buyStock");const r=Le(e,"buyStock");return Object(te.a)(r,n,t,{rerenderFn:ne.e})?r.price:0},sellStock:function(e,n){a("sellStock",Object(i.c)("sellStock")),je("sellStock");const r=Le(e,"sellStock");return Object(te.c)(r,n,t,{rerenderFn:ne.e})?r.price:0},shortStock:function(e,n){if(a("shortStock",Object(i.c)("shortStock")),je("shortStock"),8!==K.a.bitNodeN&&ee.a[8]<=1)throw We(te.d,"You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const r=Le(e,"shortStock");return Object(te.d)(r,n,t,{rerenderFn:ne.e})?r.price:0},sellShort:function(e,n){if(a("sellShort",Object(i.c)("sellShort")),je("sellShort"),8!==K.a.bitNodeN&&ee.a[8]<=1)throw We("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const r=Le(e,"sellShort");return Object(te.b)(r,n,t,{rerenderFn:ne.e})?r.price:0},placeOrder:function(e,n,r,o,s){if(a("placeOrder",Object(i.c)("placeOrder")),je("placeOrder"),8!==K.a.bitNodeN&&ee.a[8]<=2)throw We("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=Le(e,"placeOrder");let c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&&ltype.includes("buy"))c=ie.a.LimitBuy;else if(ltype.includes("limit")&&ltype.includes("sell"))c=ie.a.LimitSell;else if(ltype.includes("stop")&&ltype.includes("buy"))c=ie.a.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw We("placeOrder","Invalid order type: "+o);c=ie.a.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=oe.a.Long;else{if(!lpos.includes("s"))throw We("placeOrder","Invalid position type: "+s);u=oe.a.Short}return Object(ne.i)(l,n,r,c,u,t)},cancelOrder:function(e,n,r,o,s){if(a("cancelOrder",Object(i.c)("cancelOrder")),je("cancelOrder"),8!==K.a.bitNodeN&&ee.a[8]<=2)throw We("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const l=getStockFrom(e,"cancelOrder");if(isNaN(n)||isNaN(r))throw We("cancelOrder",`Invalid shares or price. Must be numeric. shares=${n}, price=${r}`);var c,u;if(ltype=o.toLowerCase(),ltype.includes("limit")&&ltype.includes("buy"))c=ie.a.LimitBuy;else if(ltype.includes("limit")&&ltype.includes("sell"))c=ie.a.LimitSell;else if(ltype.includes("stop")&&ltype.includes("buy"))c=ie.a.StopBuy;else{if(!ltype.includes("stop")||!ltype.includes("sell"))throw We("cancelOrder","Invalid order type: "+o);c=ie.a.StopSell}if(lpos=s.toLowerCase(),lpos.includes("l"))u=oe.a.Long;else{if(!lpos.includes("s"))throw We("cancelOrder","Invalid position type: "+s);u=oe.a.Short}var m={stock:l,shares:n,price:r,type:c,pos:u};return Object(ne.c)(m,t)},getOrders:function(){if(a("getOrders",Object(i.c)("getOrders")),je("getOrders"),8!==K.a.bitNodeN&&ee.a[8]<=2)throw We(t,"You must either be in BitNode-8 or have Source-File 8 Level 3.");const e={},n=ne.a.Orders;for(let t in n){const a=n[t];if(a.constructor===Array&&a.length>0){e[t]=[];for(let n=0;n<a.length;++n)e[t].push({shares:a[n].shares,price:a[n].price,type:a[n].type,position:a[n].pos})}}return e},getStockVolatility:function(e){if(a("getStockVolatility",Object(i.c)("getStockVolatility")),!K.a.has4SDataTixApi)throw We("getStockVolatility","You don't have 4S Market Data TIX API Access!");return Le(e,"getStockVolatility").mv/100},getStockForecast:function(e){if(a("getStockForecast",Object(i.c)("getStockForecast")),!K.a.has4SDataTixApi)throw We("getStockForecast","You don't have 4S Market Data TIX API Access!");const t=Le(e,"getStockForecast");var n=50;return t.b?n+=t.otlkMag:n-=t.otlkMag,n/100},purchase4SMarketData:function(){return a("purchase4SMarketData",Object(i.c)("purchase4SMarketData")),je("purchase4SMarketData"),K.a.has4SData?(t.log("purchase4SMarketData","Already purchased 4S Market Data."),!0):K.a.money.lt(Object(le.a)())?(t.log("purchase4SMarketData","Not enough money to purchase 4S Market Data."),!1):(K.a.has4SData=!0,K.a.loseMoney(Object(le.a)()),t.log("purchase4SMarketData","Purchased 4S Market Data"),Object(ne.e)(),!0)},purchase4SMarketDataTixApi:function(){return a("purchase4SMarketDataTixApi",Object(i.c)("purchase4SMarketDataTixApi")),je("purchase4SMarketDataTixApi"),K.a.has4SDataTixApi?(t.log("purchase4SMarketDataTixApi","Already purchased 4S Market Data TIX API"),!0):K.a.money.lt(Object(le.b)())?(t.log("purchase4SMarketDataTixApi","Not enough money to purchase 4S Market Data TIX API"),!1):(K.a.has4SDataTixApi=!0,K.a.loseMoney(Object(le.b)()),t.log("purchase4SMarketDataTixApi","Purchased 4S Market Data TIX API"),Object(ne.e)(),!0)},getPurchasedServerLimit:function(){return a("getPurchasedServerLimit",Object(i.c)("getPurchasedServerLimit")),Object(Q.b)()},getPurchasedServerMaxRam:function(){return a("getPurchasedServerMaxRam",Object(i.c)("getPurchasedServerMaxRam")),Object(Q.c)()},getPurchasedServerCost:function(e){a("getPurchasedServerCost",Object(i.c)("getPurchasedServerCost"));const n=Object(Q.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"));var r=String(e);if(""==(r=r.replace(/\s+/g,"")))return t.log("purchaseServer",`Invalid argument: hostname='${r}'`),"";if(K.a.purchasedServers.length>=Object(Q.b)())return t.log("purchaseServer",`You have reached the maximum limit of ${Object(Q.b)()} servers. You cannot purchase any more.`),"";const o=Object(Q.a)(n);if(o===1/0)return t.log("purchaseServer",`Invalid argument: ram='${n}'`),"";if(K.a.money.lt(o))return t.log("purchaseServer","Not enough money to purchase server. Need "+Ee.a.formatMoney(o)),"";var s=Object(X.h)({ip:Object(V.c)(),hostname:r,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:n});Object(V.a)(s),K.a.purchasedServers.push(s.ip);var l=K.a.getHomeComputer();return l.serversOnNetwork.push(s.ip),s.serversOnNetwork.push(l.ip),K.a.loseMoney(o),t.log("purchaseServer",`Purchased new server with hostname '${s.hostname}' for ${Ee.a.formatMoney(o)}`),s.hostname},deleteServer:function(e){a("deleteServer",Object(i.c)("deleteServer"));var n=String(e);n=n.replace(/\s\s+/g,"");var r=Object(X.a)(n);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;var o=r.ip;if(r.isConnectedTo)return t.log("deleteServer","You are currently connected to the server you are trying to delete."),!1;if(o===t.serverIp)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;for(var s=!1,l=0;l<K.a.purchasedServers.length;++l)if(o==K.a.purchasedServers[l]){s=!0,K.a.purchasedServers.splice(l,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;delete V.b[o],s=!1;var c=K.a.getHomeComputer();for(l=0;l<c.serversOnNetwork.length;++l)if(o==c.serversOnNetwork[l])return c.serversOnNetwork.splice(l,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"));var t=[];return K.a.purchasedServers.forEach((function(a){if(e){var n=Object(X.b)(a);if(null==n)throw We("getPurchasedServers","Could not find server. This is a bug. Report to dev.");t.push(n.hostname)}else t.push(a)})),t},write:function(e,n="",r="a"){if(a("write",Object(i.c)("write")),isNaN(e)){if(Object(Te.a)(e)){let a=e;if(!Object(ce.g)(a))throw We("write","Invalid filepath: "+a);0===a.lastIndexOf("/")&&(a=Object(ce.h)(a));try{n=String(n)}catch(e){throw We("write",`Invalid data (${e}). Data being written must be convertible to a string`)}const i=t.getServer();if(null==i)throw We("write","Error getting Server. This is a bug. Report to dev.");if(Object(Y.a)(a)){let e=t.getScriptOnServer(a);if(null==e)return e=new $.a(a,n,i.ip,i.scripts),i.scripts.push(e),!0;"w"===r?e.code=n:e.code+=n,e.updateRamUsage(i.scripts),e.markUpdated()}else{let e=Object(ue.c)(a,i);if(null==e)return e=Object(ue.b)(a,n,i),!0;"w"===r?e.write(n):e.append(n)}return!0}throw We("write","Invalid argument: "+e)}if((e=Math.round(e))<1||e>_.a.NumNetscriptPorts)throw We("write",`Trying to write to invalid port: ${e}. Only ports 1-${_.a.NumNetscriptPorts} are valid.`);if(null==(e=me.a[e-1])||!(e instanceof ge.a))throw We("write",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.write(n)},tryWrite:function(e,t=""){if(a("tryWrite",Object(i.c)("tryWrite")),isNaN(e))throw We("tryWrite","Invalid argument: "+e);if((e=Math.round(e))<1||e>_.a.NumNetscriptPorts)throw We("tryWrite",`Invalid port: ${e}. Only ports 1-${_.a.NumNetscriptPorts} are valid.`);if(null==(e=me.a[e-1])||!(e instanceof ge.a))throw We("tryWrite",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.tryWrite(t)},read:function(e){if(a("read",Object(i.c)("read")),isNaN(e)){if(Object(Te.a)(e)){let a=e,n=Object(X.b)(t.serverIp);if(null==n)throw We("read","Error getting Server. This is a bug. Report to dev.");if(Object(Y.a)(a)){let e=t.getScriptOnServer(a);return null==e?"":e.code}{let e=Object(ue.c)(a,n);return null!==e?e.text:""}}throw We("read","Invalid argument: "+e)}if((e=Math.round(e))<1||e>_.a.NumNetscriptPorts)throw We("read",`Invalid port: ${e}. Only ports 1-${_.a.NumNetscriptPorts} are valid.`);if(null==(e=me.a[e-1])||!(e instanceof ge.a))throw We("read",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.read()},peek:function(e){if(a("peek",Object(i.c)("peek")),isNaN(e))throw We("peek",`Invalid argument. Must be a port number between 1 and ${_.a.NumNetscriptPorts}, is ${e}`);if((e=Math.round(e))<1||e>_.a.NumNetscriptPorts)throw We("peek",`Invalid argument. Must be a port number between 1 and ${_.a.NumNetscriptPorts}, is ${e}`);if(null==(e=me.a[e-1])||!(e instanceof ge.a))throw We("peek",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.peek()},clear:function(e){if(a("clear",Object(i.c)("clear")),!isNaN(e)){if((e=Math.round(e))<1||e>_.a.NumNetscriptPorts)throw We("clear",`Trying to clear invalid port: ${e}. Only ports 1-${_.a.NumNetscriptPorts} are valid`);if(null==(e=me.a[e-1])||!(e instanceof ge.a))throw We("clear",`Could not find port: ${e}. This is a bug. Report to dev.`);return e.clear()}if(!Object(Te.a)(e))throw We("clear","Invalid argument: "+e);var n=e,r=Object(X.b)(t.serverIp);if(null==r)throw We("clear","Error getting Server. This is a bug. Report to dev.");var o=Object(ue.c)(n,r);return null!=o&&o.write(""),0},getPortHandle:function(e){if(a("getPortHandle",Object(i.c)("getPortHandle")),isNaN(e))throw We("getPortHandle",`Invalid port: ${e} Must be an integer between 1 and ${_.a.NumNetscriptPorts}.`);if((e=Math.round(e))<1||e>_.a.NumNetscriptPorts)throw We("getPortHandle",`Invalid port: ${e}. Only ports 1-${_.a.NumNetscriptPorts} are valid.`);if(null==(e=me.a[e-1])||!(e instanceof ge.a))throw We("getPortHandle",`Could not find port: ${e}. This is a bug. Report to dev.`);return e},rm:function(e,n){a("rm",Object(i.c)("rm")),null!=n&&""!==n||(n=t.serverIp);const r=fe(n,"rm").removeFile(e);return r.res||t.log("rm",r.msg),r.res},scriptRunning:function(e,t){a("scriptRunning",Object(i.c)("scriptRunning"));var n=Object(X.b)(t);if(null==n)throw We("scriptRunning","Invalid IP/hostname: "+t);for(var r=0;r<n.runningScripts.length;++r)if(n.runningScripts[r].filename==e)return!0;return!1},scriptKill:function(e,t){a("scriptKill",Object(i.c)("scriptKill"));var n=Object(X.b)(t);if(null==n)throw We("scriptKill","Invalid IP/hostname: "+t);for(var r=!1,o=0;o<n.runningScripts.length;++o)n.runningScripts[o].filename==e&&(Object(he.a)(n.runningScripts[o],n.ip),r=!0);return r},getScriptName:function(){return t.name},getScriptRam:function(e,n=t.serverIp){a("getScriptRam",Object(i.c)("getScriptRam"));var r=Object(X.b)(n);if(null==r)throw We("getScriptRam","Invalid IP/hostname: "+n);for(var o=0;o<r.scripts.length;++o)if(r.scripts[o].filename==e)return r.scripts[o].ramUsage;return 0},getRunningScript:function(e,n){let r;if(a("getRunningScript",Object(i.c)("getRunningScript")),0===arguments.length)r=t.scriptRef;else if("number"==typeof e)r=De(e,"getRunningScript");else{const t=[];for(var o=2;o<arguments.length;++o)t.push(arguments[o]);r=Ae(e,n,"getRunningScript",t)}return null===r?null:{args:r.args.slice(),filename:r.filename,logs:r.logs.slice(),offlineExpGained:r.offlineExpGained,offlineMoneyMade:r.offlineMoneyMade,offlineRunningTime:r.offlineRunningTime,onlineExpGained:r.onlineExpGained,onlineMoneyMade:r.onlineMoneyMade,onlineRunningTime:r.onlineRunningTime,pid:r.pid,ramUsage:r.ramUsage,server:r.server,threads:r.threads}},getHackTime:function(e){a("getHackTime",Object(i.c)("getHackTime"));const t=fe(e,"getHackTime");return Be(t,"getHackTime")?1/0:Object(C.d)(t,K.a)},getGrowTime:function(e){a("getGrowTime",Object(i.c)("getGrowTime"));const t=fe(e,"getGrowTime");return Be(t,"getGrowTime")?1/0:Object(C.a)(t,K.a)},getWeakenTime:function(e){a("getWeakenTime",Object(i.c)("getWeakenTime"));const t=fe(e,"getWeakenTime");return Be(t,"getWeakenTime")?1/0:Object(C.f)(t,K.a)},getScriptIncome:function(e,n){if(a("getScriptIncome",Object(i.c)("getScriptIncome")),0===arguments.length){var r=[];let e=0;for(const t of pe.a.values())e+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return r.push(e),r.push(K.a.scriptProdSinceLastAug/(K.a.playtimeSinceLastAug/1e3)),r}var o=Object(X.b)(n);if(null==o)throw We("getScriptIncome","Invalid IP/hostnamed: "+n);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(z.a)(e,s,o);return null==c?(t.log("getScriptIncome",`No such script '${e}' on '${o.hostname}' with args: ${Object(Se.a)(s)}`),-1):c.onlineMoneyMade/c.onlineRunningTime},getScriptExpGain:function(e,n){if(a("getScriptExpGain",Object(i.c)("getScriptExpGain")),0===arguments.length){var r=0;for(const e of pe.a.values())r+=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime;return r}var o=Object(X.b)(n);if(null==o)throw We("getScriptExpGain","Invalid IP/hostnamed: "+n);for(var s=[],l=2;l<arguments.length;++l)s.push(arguments[l]);var c=Object(z.a)(e,s,o);return null==c?(t.log("getScriptExpGain",`No such script '${e}' on '${o.hostname}' with args: ${Object(Se.a)(s)}`),-1):c.onlineExpGained/c.onlineRunningTime},nFormat:function(e,t){return isNaN(e)||isNaN(parseFloat(e))||"string"!=typeof t?"":Ee.a.format(parseFloat(e),t)},tFormat:function(e,t=!1){return Object(Oe.b)(e,t)},getTimeSinceLastAug:function(){return a("getTimeSinceLastAug",Object(i.c)("getTimeSinceLastAug")),K.a.playtimeSinceLastAug},prompt:function(e){Object(Te.a)(e)||(e=JSON.stringify(e));const t="prompt-popup-"+e.slice(0,20),a=Object(xe.a)("p",{innerHTML:e});return new Promise((function(e){const n=Object(xe.a)("button",{class:"popup-box-button",innerText:"Yes",clickListener:()=>{Object(Pe.a)(t),e(!0)}}),r=Object(xe.a)("button",{class:"popup-box-button",innerText:"No",clickListener:()=>{Object(Pe.a)(t),e(!1)}});Object(Me.a)(t,[a,n,r])}))},wget:async function(a,n,r=t.serverIp){if(!Object(Y.a)(n)&&!n.endsWith(".txt"))return t.log("wget",`Invalid target file: '${n}'. Must be a script or text file.`),Promise.resolve(!1);var i=fe(r,"wget");return new Promise((function(o){e.get(a,(function(e){let a;return a=Object(Y.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(_.a.BaseFavorToDonate*m.a.RepToDonateToFaction)},universityCourse:function(e,n){if(a("universityCourse",Object(i.c)("universityCourse")),Ge("universityCourse",1),!H.c){if(K.a.isWorking){var r=K.a.singularityStopWork();t.log("universityCourse",r)}var o,s,l;switch(e.toLowerCase()){case F.a.AevumSummitUniversity.toLowerCase():if(K.a.city!=B.a.Aevum)return t.log("universityCourse","You cannot study at 'Summit University' because you are not in 'Aevum'."),!1;K.a.gotoLocation(F.a.AevumSummitUniversity),o=4,s=3;break;case F.a.Sector12RothmanUniversity.toLowerCase():if(K.a.city!=B.a.Sector12)return t.log("universityCourse","You cannot study at 'Rothman University' because you are not in 'Sector-12'."),!1;K.a.location=F.a.Sector12RothmanUniversity,o=3,s=2;break;case F.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(K.a.city!=B.a.Volhaven)return t.log("universityCourse","You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'."),!1;K.a.location=F.a.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.log("universityCourse",`Invalid university name: '${e}'.`),!1}switch(n.toLowerCase()){case"Study Computer Science".toLowerCase():l=_.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=_.a.ClassDataStructures;break;case"Networks".toLowerCase():l=_.a.ClassNetworks;break;case"Algorithms".toLowerCase():l=_.a.ClassAlgorithms;break;case"Management".toLowerCase():l=_.a.ClassManagement;break;case"Leadership".toLowerCase():l=_.a.ClassLeadership;break;default:return t.log("universityCourse",`Invalid class name: ${n}.`),!1}return K.a.startClass(o,s,l),t.log("universityCourse",`Started ${l} at ${e}`),!0}t.log("universityCourse","You are in the middle of a mission.")},gymWorkout:function(e,n){if(a("gymWorkout",Object(i.c)("gymWorkout")),Ge("gymWorkout",1),!H.c){if(K.a.isWorking){var r=K.a.singularityStopWork();t.log("gymWorkout",r)}var o,s;switch(e.toLowerCase()){case F.a.AevumCrushFitnessGym.toLowerCase():if(K.a.city!=B.a.Aevum)return t.log("gymWorkout","You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."),!1;K.a.location=F.a.AevumCrushFitnessGym,o=3,s=2;break;case F.a.AevumSnapFitnessGym.toLowerCase():if(K.a.city!=B.a.Aevum)return t.log("gymWorkout","You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."),!1;K.a.location=F.a.AevumSnapFitnessGym,o=10,s=5;break;case F.a.Sector12IronGym.toLowerCase():if(K.a.city!=B.a.Sector12)return t.log("gymWorkout","You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."),!1;K.a.location=F.a.Sector12IronGym,o=1,s=1;break;case F.a.Sector12PowerhouseGym.toLowerCase():if(K.a.city!=B.a.Sector12)return t.log("gymWorkout","You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),!1;K.a.location=F.a.Sector12PowerhouseGym,o=20,s=10;break;case F.a.VolhavenMilleniumFitnessGym.toLowerCase():if(K.a.city!=B.a.Volhaven)return t.log("gymWorkout","You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'."),!1;K.a.location=F.a.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.log("gymWorkout",`Invalid gym name: ${e}. gymWorkout() failed`),!1}switch(n.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():K.a.startClass(o,s,_.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():K.a.startClass(o,s,_.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():K.a.startClass(o,s,_.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():K.a.startClass(o,s,_.a.ClassGymAgility);break;default:return t.log("gymWorkout",`Invalid stat: ${n}.`),!1}return t.log("gymWorkout",`Started training ${n} at ${e}`),!0}t.log("gymWorkout","You are in the middle of a mission.")},travelToCity:function(e){switch(a("travelToCity",Object(i.c)("travelToCity")),Ge("travelToCity",1),e){case B.a.Aevum:case B.a.Chongqing:case B.a.Sector12:case B.a.NewTokyo:case B.a.Ishima:case B.a.Volhaven:if(K.a.money.lt(_.a.TravelCost))throw We("travelToCity","Not enough money to travel.");return K.a.loseMoney(_.a.TravelCost),K.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")),Ge("purchaseTor",1),null!=Z.a["Darkweb Server"])return t.log("purchaseTor","You already have a TOR router!"),!1;if(K.a.money.lt(_.a.TorRouterCost))return t.log("purchaseTor","You cannot afford to purchase a Tor router."),!1;K.a.loseMoney(_.a.TorRouterCost);var e=Object(X.h)({ip:Object(V.c)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(V.a)(e),Z.a.addIp("Darkweb Server",e.ip),K.a.getHomeComputer().serversOnNetwork.push(e.ip),e.serversOnNetwork.push(K.a.getHomeComputer().ip),K.a.gainIntelligenceExp(_.a.IntelligenceSingFnBaseExpGain),t.log("purchaseTor","You have purchased a Tor router!"),!0},purchaseProgram:function(e){if(a("purchaseProgram",Object(i.c)("purchaseProgram")),Ge("purchaseProgram",1),null==Z.a["Darkweb Server"])return t.log("purchaseProgram","You do not have the TOR router."),!1;e=e.toLowerCase();let n=null;for(const t in b.a){const a=b.a[t];a.program.toLowerCase()==e&&(n=a)}return null==n?(t.log("purchaseProgram",`Invalid program name: '${e}.`),!1):K.a.money.lt(n.price)?(t.log("purchaseProgram",`Not enough money to purchase '${n.program}'. Need ${Ee.a.formatMoney(n.price)}`),!1):K.a.hasProgram(n.program)?(t.log("purchaseProgram",`You already have the '${n.program}' program`),!0):(K.a.loseMoney(n.price),K.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")),Ge("getCurrentServer",1),K.a.getCurrentServer().hostname},connect:function(e){if(a("connect",Object(i.c)("connect")),Ge("connect",1),!e)throw We("connect",`Invalid hostname: '${e}'`);let t=Object(X.b)(e);if(null==t)throw We("connect",`Invalid hostname: '${e}'`);if("home"===e)return K.a.getCurrentServer().isConnectedTo=!1,K.a.currentServer=K.a.getHomeComputer().ip,K.a.getCurrentServer().isConnectedTo=!0,W.a.currDir="/",W.a.resetTerminalInput(!0),!0;const n=K.a.getCurrentServer();for(let a=0;a<n.serversOnNetwork.length;a++){const r=Object(X.c)(n,a);if(r.ip==e||r.hostname==e)return K.a.getCurrentServer().isConnectedTo=!1,K.a.currentServer=t.ip,K.a.getCurrentServer().isConnectedTo=!0,W.a.currDir="/",W.a.resetTerminalInput(!0),!0}return!1},manualHack:function(){a("manualHack",Object(i.c)("manualHack")),Ge("manualHack",1);const e=K.a.getCurrentServer();return st(e.hostname,!0)},installBackdoor:function(){a("installBackdoor",Object(i.c)("installBackdoor")),Ge("installBackdoor",1);const e=K.a.getCurrentServer(),n=Object(C.d)(e,K.a)/4*1e3,r=Object(R.b)(e,K.a);if(!r.res)throw We("installBackdoor",r.msg);return t.log("installBackdoor",`Installing backdoor on '${e.hostname}' in ${Object(Oe.b)(n,!0)}`),Object(de.c)(n,t).then((function(){return t.env.stopFlag?Promise.reject(t):(t.log("installBackdoor",`Successfully installed backdoor on '${e.hostname}'`),e.backdoorInstalled=!0,Promise.resolve())}))},getStats:function(){return a("getStats",Object(i.c)("getStats")),Ge("getStats",1),t.log("getStats","getStats is deprecated, please use getPlayer"),{hacking:K.a.hacking_skill,strength:K.a.strength,defense:K.a.defense,dexterity:K.a.dexterity,agility:K.a.agility,charisma:K.a.charisma,intelligence:K.a.intelligence}},getCharacterInformation:function(){return a("getCharacterInformation",Object(i.c)("getCharacterInformation")),Ge("getCharacterInformation",1),t.log("getCharacterInformation","getCharacterInformation is deprecated, please use getPlayer"),{bitnode:K.a.bitNodeN,city:K.a.city,factions:K.a.factions.slice(),hp:K.a.hp,jobs:Object.keys(K.a.jobs),jobTitles:Object.values(K.a.jobs),maxHp:K.a.max_hp,mult:{agility:K.a.agility_mult,agilityExp:K.a.agility_exp_mult,companyRep:K.a.company_rep_mult,crimeMoney:K.a.crime_money_mult,crimeSuccess:K.a.crime_success_mult,defense:K.a.defense_mult,defenseExp:K.a.defense_exp_mult,dexterity:K.a.dexterity_mult,dexterityExp:K.a.dexterity_exp_mult,factionRep:K.a.faction_rep_mult,hacking:K.a.hacking_mult,hackingExp:K.a.hacking_exp_mult,strength:K.a.strength_mult,strengthExp:K.a.strength_exp_mult,workMoney:K.a.work_money_mult},timeWorked:K.a.timeWorked,tor:Z.a.hasOwnProperty("Darkweb Server"),workHackExpGain:K.a.workHackExpGained,workStrExpGain:K.a.workStrExpGained,workDefExpGain:K.a.workDefExpGained,workDexExpGain:K.a.workDexExpGained,workAgiExpGain:K.a.workAgiExpGained,workChaExpGain:K.a.workChaExpGained,workRepGain:K.a.workRepGained,workMoneyGain:K.a.workMoneyGained,hackingExp:K.a.hacking_exp,strengthExp:K.a.strength_exp,defenseExp:K.a.defense_exp,dexterityExp:K.a.dexterity_exp,agilityExp:K.a.agility_exp,charismaExp:K.a.charisma_exp}},getPlayer:function(){a("getPlayer",Object(i.c)("getPlayer"));const e={hacking_skill:K.a.hacking_skill,hp:K.a.hp,max_hp:K.a.max_hp,strength:K.a.strength,defense:K.a.defense,dexterity:K.a.dexterity,agility:K.a.agility,charisma:K.a.charisma,intelligence:K.a.intelligence,hacking_chance_mult:K.a.hacking_chance_mult,hacking_speed_mult:K.a.hacking_speed_mult,hacking_money_mult:K.a.hacking_money_mult,hacking_grow_mult:K.a.hacking_grow_mult,hacking_exp:K.a.hacking_exp,strength_exp:K.a.strength_exp,defense_exp:K.a.defense_exp,dexterity_exp:K.a.dexterity_exp,agility_exp:K.a.agility_exp,charisma_exp:K.a.charisma_exp,hacking_mult:K.a.hacking_mult,strength_mult:K.a.strength_mult,defense_mult:K.a.defense_mult,dexterity_mult:K.a.dexterity_mult,agility_mult:K.a.agility_mult,charisma_mult:K.a.charisma_mult,hacking_exp_mult:K.a.hacking_exp_mult,strength_exp_mult:K.a.strength_exp_mult,defense_exp_mult:K.a.defense_exp_mult,dexterity_exp_mult:K.a.dexterity_exp_mult,agility_exp_mult:K.a.agility_exp_mult,charisma_exp_mult:K.a.charisma_exp_mult,company_rep_mult:K.a.company_rep_mult,faction_rep_mult:K.a.faction_rep_mult,numPeopleKilled:K.a.numPeopleKilled,money:K.a.money.toNumber(),city:K.a.city,location:K.a.location,crime_money_mult:K.a.crime_money_mult,crime_success_mult:K.a.crime_success_mult,isWorking:K.a.isWorking,workType:K.a.workType,currentWorkFactionName:K.a.currentWorkFactionName,currentWorkFactionDescription:K.a.currentWorkFactionDescription,workHackExpGainRate:K.a.workHackExpGainRate,workStrExpGainRate:K.a.workStrExpGainRate,workDefExpGainRate:K.a.workDefExpGainRate,workDexExpGainRate:K.a.workDexExpGainRate,workAgiExpGainRate:K.a.workAgiExpGainRate,workChaExpGainRate:K.a.workChaExpGainRate,workRepGainRate:K.a.workRepGainRate,workMoneyGainRate:K.a.workMoneyGainRate,workMoneyLossRate:K.a.workMoneyLossRate,workHackExpGained:K.a.workHackExpGained,workStrExpGained:K.a.workStrExpGained,workDefExpGained:K.a.workDefExpGained,workDexExpGained:K.a.workDexExpGained,workAgiExpGained:K.a.workAgiExpGained,workChaExpGained:K.a.workChaExpGained,workRepGained:K.a.workRepGained,workMoneyGained:K.a.workMoneyGained,createProgramName:K.a.createProgramName,createProgramReqLvl:K.a.createProgramReqLvl,className:K.a.className,crimeType:K.a.crimeType,work_money_mult:K.a.work_money_mult,hacknet_node_money_mult:K.a.hacknet_node_money_mult,hacknet_node_purchase_cost_mult:K.a.hacknet_node_purchase_cost_mult,hacknet_node_ram_cost_mult:K.a.hacknet_node_ram_cost_mult,hacknet_node_core_cost_mult:K.a.hacknet_node_core_cost_mult,hacknet_node_level_cost_mult:K.a.hacknet_node_level_cost_mult,hasWseAccount:K.a.hasWseAccount,hasTixApiAccess:K.a.hasTixApiAccess,has4SData:K.a.has4SData,has4SDataTixApi:K.a.has4SDataTixApi,bladeburner_max_stamina_mult:K.a.bladeburner_max_stamina_mult,bladeburner_stamina_gain_mult:K.a.bladeburner_stamina_gain_mult,bladeburner_analysis_mult:K.a.bladeburner_analysis_mult,bladeburner_success_chance_mult:K.a.bladeburner_success_chance_mult,bitNodeN:K.a.bitNodeN,totalPlaytime:K.a.totalPlaytime,playtimeSinceLastAug:K.a.playtimeSinceLastAug,playtimeSinceLastBitnode:K.a.playtimeSinceLastBitnode,jobs:{},factions:K.a.factions.slice(),tor:Z.a.hasOwnProperty("Darkweb Server")};return Object.assign(e.jobs,K.a.jobs),e},hospitalize:function(){return a("hospitalize",Object(i.c)("hospitalize")),Ge("hospitalize",1),K.a.hospitalize()},isBusy:function(){return a("isBusy",Object(i.c)("isBusy")),Ge("isBusy",1),K.a.isWorking||H.c},stopAction:function(){if(a("stopAction",Object(i.c)("stopAction")),Ge("stopAction",1),K.a.isWorking){var e=K.a.singularityStopWork();return t.log("stopAction",e),!0}return!1},upgradeHomeRam:function(){a("upgradeHomeRam",Object(i.c)("upgradeHomeRam")),Ge("upgradeHomeRam",2);const e=K.a.getHomeComputer();if(e.maxRam>=_.a.HomeComputerMaxRam)return t.log("upgradeHomeRam","Your home computer is at max RAM."),!1;const n=K.a.getUpgradeHomeRamCost();return K.a.money.lt(n)?(t.log("upgradeHomeRam","You don't have enough money. Need "+Ee.a.formatMoney(n)),!1):(e.maxRam*=2,K.a.loseMoney(n),K.a.gainIntelligenceExp(_.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")),Ge("getUpgradeHomeRamCost",2),K.a.getUpgradeHomeRamCost()},workForCompany:function(e){if(a("workForCompany",Object(i.c)("workForCompany")),Ge("workForCompany",2),null==e&&(e=K.a.companyName),null==e||""===e||!(f.a[e]instanceof d.a))return t.log("workForCompany",`Invalid company: '${e}'`),!1;if(!Object.keys(K.a.jobs).includes(e))return t.log("workForCompany",`You do not have a job at '${e}'`),!1;if(H.c)return t.log("workForCompany","You are in the middle of a mission."),!1;const n=K.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(K.a.isWorking){var o=K.a.singularityStopWork();t.log("workForCompany",o)}return r.isPartTimeJob()?K.a.startWorkPartTime(e):K.a.startWork(e),t.log("workForCompany",`Began working at '${K.a.companyName}' as a '${n}'`),!0},applyToCompany:function(e,n){var r;switch(a("applyToCompany",Object(i.c)("applyToCompany")),Ge("applyToCompany",2),Xe("applyToCompany",e),K.a.location=e,n.toLowerCase()){case"software":r=K.a.applyForSoftwareJob(!0);break;case"software consultant":r=K.a.applyForSoftwareConsultantJob(!0);break;case"it":r=K.a.applyForItJob(!0);break;case"security engineer":r=K.a.applyForSecurityEngineerJob(!0);break;case"network engineer":r=K.a.applyForNetworkEngineerJob(!0);break;case"business":r=K.a.applyForBusinessJob(!0);break;case"business consultant":r=K.a.applyForBusinessConsultantJob(!0);break;case"security":r=K.a.applyForSecurityJob(!0);break;case"agent":r=K.a.applyForAgentJob(!0);break;case"employee":r=K.a.applyForEmployeeJob(!0);break;case"part-time employee":r=K.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":r=K.a.applyForWaiterJob(!0);break;case"part-time waiter":r=K.a.applyForPartTimeWaiterJob(!0);break;default:return t.log("applyToCompany",`Invalid job: '${n}'.`),!1}return Object(Te.a)(r)?(t.log("applyToCompany",r),!1):(r?t.log("applyToCompany",`You were offered a new job at '${e}' as a '${K.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")),Ge("getCompanyRep",2);return Xe("getCompanyRep",e).playerReputation},getCompanyFavor:function(e){a("getCompanyFavor",Object(i.c)("getCompanyFavor")),Ge("getCompanyFavor",2);return Xe("getCompanyFavor",e).favor},getCompanyFavorGain:function(e){a("getCompanyFavorGain",Object(i.c)("getCompanyFavorGain")),Ge("getCompanyFavorGain",2);return Xe("getCompanyFavorGain",e).getFavorGain()[0]},checkFactionInvitations:function(){return a("checkFactionInvitations",Object(i.c)("checkFactionInvitations")),Ge("checkFactionInvitations",2),K.a.factionInvitations.slice()},joinFaction:function(e){if(a("joinFaction",Object(i.c)("joinFaction")),Ge("joinFaction",2),Qe("joinFaction",e),!K.a.factionInvitations.includes(e))return t.log("joinFaction",`You have not been invited by faction '${e}'`),!1;const n=M.a[e];Object(P.d)(n);for(let t=0;t<K.a.factionInvitations.length;++t)(K.a.factionInvitations[t]==e||M.a[K.a.factionInvitations[t]].isBanned)&&(K.a.factionInvitations.splice(t,1),t--);return K.a.gainIntelligenceExp(_.a.IntelligenceSingFnBaseExpGain),t.log("joinFaction",`Joined the '${e}' faction.`),!0},workForFaction:function(e,n){if(a("workForFaction",Object(i.c)("workForFaction")),Ge("workForFaction",2),Qe("workForFaction",e),K.a.inGang()&&void 0!==S.a[e])t.log("workForFaction",`Faction '${e}' does not offer work at the moment.`);else{if(!H.c){if(!K.a.factions.includes(e))return t.log("workForFaction",`You are not a member of '${e}'`),!1;if(K.a.isWorking){const e=K.a.singularityStopWork();t.log("workForFaction",e)}var r=M.a[e];switch(n.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return["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"].includes(r.name)?(K.a.startFactionHackWork(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["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"].includes(r.name)?(K.a.startFactionFieldWork(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["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"].includes(r.name)?(K.a.startFactionSecurityWork(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}t.log("workForFaction","You are in the middle of a mission.")}},getFactionRep:function(e){a("getFactionRep",Object(i.c)("getFactionRep")),Ge("getFactionRep",2);return Qe("getFactionRep",e).playerReputation},getFactionFavor:function(e){a("getFactionFavor",Object(i.c)("getFactionFavor")),Ge("getFactionFavor",2);return Qe("getFactionFavor",e).favor},getFactionFavorGain:function(e){a("getFactionFavorGain",Object(i.c)("getFactionFavorGain")),Ge("getFactionFavorGain",2);return Qe("getFactionFavorGain",e).getFavorGain()[0]},donateToFaction:function(e,n){a("donateToFaction",Object(i.c)("donateToFaction")),Ge("donateToFaction",3);const r=Qe("donateToFaction",e);if("number"!=typeof n||n<=0)return t.log("donateToFaction",`Invalid donation amount: '${n}'.`),!1;if(K.a.money.lt(n))return t.log("donateToFaction",`You do not have enough money to donate ${Ee.a.formatMoney(n)} to '${e}'`),!1;const o=Math.round(_.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/_.a.DonateMoneyToRepDivisor*K.a.faction_rep_mult;return r.playerReputation+=s,K.a.loseMoney(n),t.log("donateToFaction",`${Ee.a.formatMoney(n)} donated to '${e}' for ${Ee.a.formatReputation(s)} reputation`),!0},createProgram:function(e){if(a("createProgram",Object(i.c)("createProgram")),Ge("createProgram",3),H.c)return void t.log("createProgram","You are in the middle of a mission.");if(K.a.isWorking){var n=K.a.singularityStopWork();t.log("createProgram",n)}e=e.toLowerCase();let r=null;for(const t in q.a)q.a[t].name.toLowerCase()==e&&(r=q.a[t]);return null==r?(t.log("createProgram","The specified program does not exist: '"+e),!1):K.a.hasProgram(r.name)?(t.log("createProgram",`You already have the '${r.name}' program`),!1):r.create.req(K.a)?(K.a.startCreateProgramWork(r.name,r.create.time,r.create.level),t.log("createProgram",`Began creating program: '${e}'`),!0):(t.log("createProgram",`Hacking level is too low to create '${r.name}' (level ${r.create.level} req)`),!1)},commitCrime:function(e){if(a("commitCrime",Object(i.c)("commitCrime")),Ge("commitCrime",3),H.c)return void t.log("commitCrime","You are in the middle of a mission.");if(K.a.isWorking){const e=K.a.singularityStopWork();t.log("commitCrime",e)}K.a.gotoLocation(F.a.Slums);const n=Object(h.b)(e.toLowerCase());if(null==n)throw We("commitCrime",`Invalid crime: '${e}'`);return t.log("commitCrime",`Attempting to commit ${n.name}...`),n.commit(K.a,1,{workerscript:t})},getCrimeChance:function(e){a("getCrimeChance",Object(i.c)("getCrimeChance")),Ge("getCrimeChance",3);const t=Object(h.b)(e.toLowerCase());if(null==t)throw We("getCrimeChance","Invalid crime: "+e);return t.successRate(K.a)},getCrimeStats:function(e){a("getCrimeStats",Object(i.c)("getCrimeStats")),Ge("getCrimeStats",3);const t=Object(h.b)(e.toLowerCase());if(null==t)throw We("getCrimeStats","Invalid crime: "+e);return Object.assign({},t)},getOwnedAugmentations:function(e=!1){a("getOwnedAugmentations",Object(i.c)("getOwnedAugmentations")),Ge("getOwnedAugmentations",3);for(var t=[],n=0;n<K.a.augmentations.length;++n)t.push(K.a.augmentations[n].name);if(e)for(n=0;n<K.a.queuedAugmentations.length;++n)t.push(K.a.queuedAugmentations[n].name);return t},getOwnedSourceFiles:function(){a("getOwnedSourceFiles",Object(i.c)("getOwnedSourceFiles")),Ge("getOwnedSourceFiles",3);let e=[];for(let t=0;t<K.a.sourceFiles.length;++t)e.push({n:K.a.sourceFiles[t].n,lvl:K.a.sourceFiles[t].lvl});return e},getAugmentationsFromFaction:function(e){a("getAugmentationsFromFaction",Object(i.c)("getAugmentationsFromFaction")),Ge("getAugmentationsFromFaction",3);const t=Qe("getAugmentationsFromFaction",e);if(K.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")),Ge("getAugmentationCost",3);const t=Ze("getAugmentationCost",e);return[t.baseRepRequirement,t.baseCost]},getAugmentationPrereq:function(e){a("getAugmentationPrereq",Object(i.c)("getAugmentationPrereq")),Ge("getAugmentationPrereq",3);return Ze("getAugmentationPrereq",e).prereqs.slice()},getAugmentationPrice:function(e){a("getAugmentationPrice",Object(i.c)("getAugmentationPrice")),Ge("getAugmentationPrice",3);return Ze("getAugmentationPrice",e).baseCost},getAugmentationRepReq:function(e){a("getAugmentationRepReq",Object(i.c)("getAugmentationRepReq")),Ge("getAugmentationRepReq",3);return Ze("getAugmentationRepReq",e).baseRepRequirement},getAugmentationStats:function(e){a("getAugmentationStats",Object(i.c)("getAugmentationStats")),Ge("getAugmentationStats",3);const t=Ze("getAugmentationStats",e);return Object.assign({},t.mults)},purchaseAugmentation:function(e,n){a("purchaseAugmentation",Object(i.c)("purchaseAugmentation")),Ge("purchaseAugmentation",3);const r=Qe("purchaseAugmentation",e),o=Ze("purchaseAugmentation",n);let l=[];if(K.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<K.a.queuedAugmentations.length;++e)if(K.a.queuedAugmentations[e].name===o.name)return t.log("purchaseAugmentation",`You already have the '${n}' augmentation.`),!1;for(let e=0;e<K.a.augmentations.length;++e)if(K.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(P.f)(o,r,!0);return t.log("purchaseAugmentation",c),!(!Object(Te.a)(c)||!c.startsWith("You purchased"))&&(K.a.gainIntelligenceExp(_.a.IntelligenceSingFnBaseExpGain),!0)},softReset:function(e){a("softReset",Object(i.c)("softReset")),Ge("softReset",3),t.log("softReset","Soft resetting. This will cause this script to be killed"),Object(ke.a)(()=>{Object(c.a)(),ot(e)},0),t.running=!1,Object(he.a)(t)},installAugmentations:function(e){if(a("installAugmentations",Object(i.c)("installAugmentations")),Ge("installAugmentations",3),0===K.a.queuedAugmentations.length)return t.log("installAugmentations","You do not have any Augmentations to be installed."),!1;K.a.gainIntelligenceExp(_.a.IntelligenceSingFnBaseExpGain),t.log("installAugmentations","Installing Augmentations. This will cause this script to be killed"),Object(ke.a)(()=>{Object(l.d)(),ot(e)},0),t.running=!1,Object(he.a)(t)},gang:{createGang:function(e){a("createGang",Object(i.c)("gang","createGang"));if(!K.a.canAccessGang()||!["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"].includes(e))return!1;if(K.a.inGang())return!1;if(!K.a.factions.includes(e))return!1;const t="NiteSec"===e||"The Black Hand"===e;return K.a.startGang(e,t),!0},inGang:function(){return a("inGang",Object(i.c)("gang","inGang")),K.a.inGang()},getMemberNames:function(){return a("getMemberNames",Object(i.c)("gang","getMemberNames")),Ye("getMemberNames"),K.a.gang.members.map(e=>e.name)},getGangInformation:function(){return a("getGangInformation",Object(i.c)("gang","getGangInformation")),Ye("getGangInformation"),{faction:K.a.gang.facName,isHacking:K.a.gang.isHackingGang,moneyGainRate:K.a.gang.moneyGainRate,power:K.a.gang.getPower(),respect:K.a.gang.respect,respectGainRate:K.a.gang.respectGainRate,territory:K.a.gang.getTerritory(),territoryClashChance:K.a.gang.territoryClashChance,territoryWarfareEngaged:K.a.gang.territoryWarfareEngaged,wantedLevel:K.a.gang.wanted,wantedLevelGainRate:K.a.gang.wantedGainRate}},getOtherGangInformation:function(){a("getOtherGangInformation",Object(i.c)("gang","getOtherGangInformation")),Ye("getOtherGangInformation");const e={};for(const t in S.a)e[t]=Object.assign({},S.a[t]);return e},getMemberInformation:function(e){a("getMemberInformation",Object(i.c)("gang","getMemberInformation")),Ye("getMemberInformation");const t=Ve("getMemberInformation",e);return{name:t.name,task:t.task,earnedRespect:t.earnedRespect,hack:t.hack,str:t.str,def:t.def,dex:t.dex,agi:t.agi,cha:t.cha,hack_exp:t.hack_exp,str_exp:t.str_exp,def_exp:t.def_exp,dex_exp:t.dex_exp,agi_exp:t.agi_exp,cha_exp:t.cha_exp,hack_mult:t.hack_mult,str_mult:t.str_mult,def_mult:t.def_mult,dex_mult:t.dex_mult,agi_mult:t.agi_mult,cha_mult:t.cha_mult,hack_asc_mult:t.calculateAscensionMult(t.hack_asc_points),str_asc_mult:t.calculateAscensionMult(t.str_asc_points),def_asc_mult:t.calculateAscensionMult(t.def_asc_points),dex_asc_mult:t.calculateAscensionMult(t.dex_asc_points),agi_asc_mult:t.calculateAscensionMult(t.agi_asc_points),cha_asc_mult:t.calculateAscensionMult(t.cha_asc_points),hack_asc_points:t.hack_asc_points,str_asc_points:t.str_asc_points,def_asc_points:t.def_asc_points,dex_asc_points:t.dex_asc_points,agi_asc_points:t.agi_asc_points,cha_asc_points:t.cha_asc_points,upgrades:t.upgrades.slice(),augmentations:t.augmentations.slice()}},canRecruitMember:function(){return a("canRecruitMember",Object(i.c)("gang","canRecruitMember")),Ye("canRecruitMember"),K.a.gang.canRecruitMember()},recruitMember:function(e){a("recruitMember",Object(i.c)("gang","recruitMember")),Ye("recruitMember");const n=K.a.gang.recruitMember(e);return n?t.log("recruitMember",`Successfully recruited Gang Member '${e}'`):t.log("recruitMember",`Failed to recruit Gang Member '${e}'`),n},getTaskNames:function(){a("getTaskNames",Object(i.c)("gang","getTaskNames")),Ye("getTaskNames");const e=K.a.gang.getAllTaskNames();return e.unshift("Unassigned"),e},setMemberTask:function(e,n){a("setMemberTask",Object(i.c)("gang","setMemberTask")),Ye("setMemberTask");const r=Ve("setMemberTask",e).assignToTask(n);return r?t.log("setMemberTask",`Successfully assigned Gang Member '${e}' to '${n}' task`):t.log("setMemberTask",`Failed to assign Gang Member '${e}' to '${n}' task. '${e}' is now Unassigned`),r},getTaskStats:function(e){a("getTaskStats",Object(i.c)("gang","getTaskStats")),Ye("getTaskStats");const t=function(e,t){const a=T.a[t];if(!a)throw We("gang."+e,`Invalid task: '${t}'`);return a}("getTaskStats",e),n=Object.assign({},t);return n.territory=Object.assign({},t.territory),n},getEquipmentNames:function(){return a("getEquipmentNames",Object(i.c)("gang","getEquipmentNames")),Ye("getEquipmentNames"),Object.keys(x.a)},getEquipmentCost:function(e){a("getEquipmentCost",Object(i.c)("gang","getEquipmentCost")),Ye("getEquipmentCost");const t=x.a[e];return null===t?1/0:K.a.gang.getUpgradeCost(t)},getEquipmentType:function(e){a("getEquipmentType",Object(i.c)("gang","getEquipmentType")),Ye("getEquipmentType");const t=x.a[e];return null==t?"":t.getType()},getEquipmentStats:function(e){a("getEquipmentStats",Object(i.c)("gang","getEquipmentStats")),Ye("getEquipmentStats");const t=x.a[e];if(!t)throw We("getEquipmentStats","Invalid equipment: "+e);return Object.assign({},t.mults)},purchaseEquipment:function(e,n){a("purchaseEquipment",Object(i.c)("gang","purchaseEquipment")),Ye("purchaseEquipment");const r=Ve("purchaseEquipment",e),o=x.a[n];if(!o)return!1;const s=r.buyUpgrade(o,K.a,K.a.gang);return s?t.log("purchaseEquipment",`Purchased '${n}' for Gang member '${e}'`):t.log("purchaseEquipment",`Failed to purchase '${n}' for Gang member '${e}'`),s},ascendMember:function(e){a("ascendMember",Object(i.c)("gang","ascendMember")),Ye("ascendMember");const n=Ve("ascendMember",e);if(n.canAscend())return K.a.gang.ascendMember(n,t)},setTerritoryWarfare:function(e){a("setTerritoryWarfare",Object(i.c)("gang","setTerritoryWarfare")),Ye("setTerritoryWarfare"),e?(K.a.gang.territoryWarfareEngaged=!0,t.log("setTerritoryWarfare","Engaging in Gang Territory Warfare")):(K.a.gang.territoryWarfareEngaged=!1,t.log("setTerritoryWarfare","Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(e){if(a("getChanceToWinClash",Object(i.c)("gang","getChanceToWinClash")),Ye("getChanceToWinClash"),null==S.a[e])throw We("gang."+getChanceToWinClash,"Invalid gang: "+e);const t=S.a[K.a.gang.facName].power;return t/(S.a[e].power+t)},getBonusTime:function(){return a("getBonusTime",Object(i.c)("gang","getBonusTime")),Ye("getBonusTime"),Math.round(K.a.gang.storedCycles/5)}},bladeburner:{getContractNames:function(){return a("getContractNames",Object(i.c)("bladeburner","getContractNames")),He("getContractNames"),K.a.bladeburner.getContractNamesNetscriptFn()},getOperationNames:function(){return a("getOperationNames",Object(i.c)("bladeburner","getOperationNames")),He("getOperationNames"),K.a.bladeburner.getOperationNamesNetscriptFn()},getBlackOpNames:function(){return a("getBlackOpNames",Object(i.c)("bladeburner","getBlackOpNames")),He("getBlackOpNames"),K.a.bladeburner.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e=""){a("getBlackOpRank",Object(i.c)("bladeburner","getBlackOpRank")),He("getBlackOpRank");return Je("getBlackOpRank","blackops",e).reqdRank},getGeneralActionNames:function(){return a("getGeneralActionNames",Object(i.c)("bladeburner","getGeneralActionNames")),He("getGeneralActionNames"),K.a.bladeburner.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){return a("getSkillNames",Object(i.c)("bladeburner","getSkillNames")),He("getSkillNames"),K.a.bladeburner.getSkillNamesNetscriptFn()},startAction:function(e="",n=""){a("startAction",Object(i.c)("bladeburner","startAction")),He("startAction");try{return K.a.bladeburner.startActionNetscriptFn(K.a,e,n,t)}catch(e){throw We("bladeburner.startAction",e)}},stopBladeburnerAction:function(){return a("stopBladeburnerAction",Object(i.c)("bladeburner","stopBladeburnerAction")),He("stopBladeburnerAction"),K.a.bladeburner.resetAction()},getCurrentAction:function(){return a("getCurrentAction",Object(i.c)("bladeburner","getCurrentAction")),He("getCurrentAction"),K.a.bladeburner.getTypeAndNameFromActionId(K.a.bladeburner.action)},getActionTime:function(e="",n=""){a("getActionTime",Object(i.c)("bladeburner","getActionTime")),He("getActionTime");try{return K.a.bladeburner.getActionTimeNetscriptFn(K.a,e,n,t)}catch(e){throw We("bladeburner.getActionTime",e)}},getActionEstimatedSuccessChance:function(e="",n=""){a("getActionEstimatedSuccessChance",Object(i.c)("bladeburner","getActionEstimatedSuccessChance")),He("getActionEstimatedSuccessChance");try{return K.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(K.a,e,n,t)}catch(e){throw We("bladeburner.getActionEstimatedSuccessChance",e)}},getActionRepGain:function(e="",t="",n){a("getActionRepGain",Object(i.c)("bladeburner","getActionRepGain")),He("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")),He("getActionCountRemaining");try{return K.a.bladeburner.getActionCountRemainingNetscriptFn(e,n,t)}catch(e){throw We("bladeburner.getActionCountRemaining",e)}},getActionMaxLevel:function(e="",t=""){a("getActionMaxLevel",Object(i.c)("bladeburner","getActionMaxLevel")),He("getActionMaxLevel");return Je("getActionMaxLevel",e,t).maxLevel},getActionCurrentLevel:function(e="",t=""){a("getActionCurrentLevel",Object(i.c)("bladeburner","getActionCurrentLevel")),He("getActionCurrentLevel");return Je("getActionCurrentLevel",e,t).level},getActionAutolevel:function(e="",t=""){a("getActionAutolevel",Object(i.c)("bladeburner","getActionAutolevel")),He("getActionAutolevel");return Je("getActionCurrentLevel",e,t).autoLevel},setActionAutolevel:function(e="",t="",n=!0){a("setActionAutolevel",Object(i.c)("bladeburner","setActionAutolevel")),He("setActionAutolevel");Je("setActionAutolevel",e,t).autoLevel=n},setActionLevel:function(e="",t="",n=1){a("setActionLevel",Object(i.c)("bladeburner","setActionLevel")),He("setActionLevel");const r=Je("setActionLevel",e,t);if(n<1||n>r.maxLevel)throw We("bladeburner.setActionLevel",`Level must be between 1 and ${r.maxLevel}, is ${n}`);r.level=n},getRank:function(){return a("getRank",Object(i.c)("bladeburner","getRank")),He("getRank"),K.a.bladeburner.rank},getSkillPoints:function(){return a("getSkillPoints",Object(i.c)("bladeburner","getSkillPoints")),He("getSkillPoints"),K.a.bladeburner.skillPoints},getSkillLevel:function(e=""){a("getSkillLevel",Object(i.c)("bladeburner","getSkillLevel")),He("getSkillLevel");try{return K.a.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw We("bladeburner.getSkillLevel",e)}},getSkillUpgradeCost:function(e=""){a("getSkillUpgradeCost",Object(i.c)("bladeburner","getSkillUpgradeCost")),He("getSkillUpgradeCost");try{return K.a.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw We("bladeburner.getSkillUpgradeCost",e)}},upgradeSkill:function(e){a("upgradeSkill",Object(i.c)("bladeburner","upgradeSkill")),He("upgradeSkill");try{return K.a.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw We("bladeburner.upgradeSkill",e)}},getTeamSize:function(e="",n=""){a("getTeamSize",Object(i.c)("bladeburner","getTeamSize")),He("getTeamSize");try{return K.a.bladeburner.getTeamSizeNetscriptFn(e,n,t)}catch(e){throw We("bladeburner.getTeamSize",e)}},setTeamSize:function(e="",n="",r){a("setTeamSize",Object(i.c)("bladeburner","setTeamSize")),He("setTeamSize");try{return K.a.bladeburner.setTeamSizeNetscriptFn(e,n,r,t)}catch(e){throw We("bladeburner.setTeamSize",e)}},getCityEstimatedPopulation:function(e){return a("getCityEstimatedPopulation",Object(i.c)("bladeburner","getCityEstimatedPopulation")),He("getCityEstimatedPopulation"),Ke("getCityEstimatedPopulation",e),K.a.bladeburner.cities[e].popEst},getCityEstimatedCommunities:function(e){return a("getCityEstimatedCommunities",Object(i.c)("bladeburner","getCityEstimatedCommunities")),He("getCityEstimatedCommunities"),Ke("getCityEstimatedCommunities",e),K.a.bladeburner.cities[e].commsEst},getCityChaos:function(e){return a("getCityChaos",Object(i.c)("bladeburner","getCityChaos")),He("getCityChaos"),Ke("getCityChaos",e),K.a.bladeburner.cities[e].chaos},getCity:function(){return a("getCity",Object(i.c)("bladeburner","getCity")),He("getCityChaos"),K.a.bladeburner.city},switchCity:function(e){return a("switchCity",Object(i.c)("bladeburner","switchCity")),He("switchCity"),Ke("switchCity",e),K.a.bladeburner.city=e},getStamina:function(){return a("getStamina",Object(i.c)("bladeburner","getStamina")),He("getStamina"),[K.a.bladeburner.stamina,K.a.bladeburner.maxStamina]},joinBladeburnerFaction:function(){return a("joinBladeburnerFaction",Object(i.c)("bladeburner","joinBladeburnerFaction")),He("joinBladeburnerFaction",!0),K.a.bladeburner.joinBladeburnerFactionNetscriptFn(t)},joinBladeburnerDivision:function(){if(a("joinBladeburnerDivision",Object(i.c)("bladeburner","joinBladeburnerDivision")),He("joinBladeburnerDivision",!0),7===K.a.bitNodeN||ee.a[7]>0){if(8===K.a.bitNodeN)return!1;if(K.a.bladeburner instanceof p.a)return!0;if(K.a.strength>=100&&K.a.defense>=100&&K.a.dexterity>=100&&K.a.agility>=100){K.a.bladeburner=new p.a(K.a),t.log("joinBladeburnerDivision","You have been accepted into the Bladeburner division");const e=document.getElementById("world-menu-header");return e instanceof HTMLElement&&(e.click(),e.click()),!0}return t.log("joinBladeburnerDivision","You do not meet the requirements for joining the Bladeburner division"),!1}},getBonusTime:function(){return a("getBonusTime",Object(i.c)("bladeburner","getBonusTime")),He("getBonusTime"),Math.round(K.a.bladeburner.storedCycles/5)}},corporation:{expandIndustry:function(e,t){Object(E.l)(K.a.corporation,e,t)},expandCity:function(e,t){const a=et(e);Object(E.k)(K.a.corporation,a,t)},unlockUpgrade:function(e){const t=Object.values(v.a).find(t=>t[2]===e);if(void 0===t)throw new Error("No upgrade named '${upgradeName}'");Object(E.x)(K.a.corporation,t)},levelUpgrade:function(e){const t=Object.values(k.a).find(t=>t[4]===e);if(void 0===t)throw new Error("No upgrade named '${upgradeName}'");Object(E.h)(K.a.corporation,t)},issueDividends:function(e){Object(E.g)(K.a.corporation,e)},sellMaterial:function(e,t,a,n,r){const i=nt(e,t,a);Object(E.o)(i,n,r)},sellProduct:function(e,t,a,n,r,i){const o=rt(e,a);Object(E.p)(o,t,n,r,i)},discontinueProduct:function(e,t){et(e).discontinueProduct(rt(e,t))},setSmartSupply:function(e,t,a){const n=at(e,t);Object(E.u)(n,a)},setSmartSupplyUseLeftovers:function(){},buyMaterial:function(e,t,a,n){const r=nt(e,t,a);Object(E.c)(r,n)},employees:function(e,t){return tt(e,t).employees.map(e=>Object.assign({},e))},assignJob:function(e,t,a,n){const r=it(e,t,a);Object(E.a)(r,n)},hireEmployee:function(e,t){tt(e,t).hireRandomEmployee()},upgradeOfficeSize:function(e,t,a){const n=tt(e,t);Object(E.y)(K.a.corporation,n,a)},throwParty:function(e,t,a){const n=tt(e,t);Object(E.w)(K.a.corporation,n,a)},purchaseWarehouse:function(e,t){Object(E.m)(K.a.corporation,et(e),t)},upgradeWarehouse:function(e,t){Object(E.z)(K.a.corporation,et(e),at(e,t))},buyCoffee:function(e,t){Object(E.b)(K.a.corporation,et(e),tt(e,t))},hireAdVert:function(e){Object(E.f)(K.a.corporation,et(e),tt(e,"Sector-12"))},makeProduct:function(e,t,a,n,r){Object(E.j)(K.a.corporation,et(e),t,a,n,r)},research:function(e,t){Object(E.n)(et(e),t)},exportMaterial:function(e,t,a,n,r,i){Object(E.e)(a,n,nt(e,t,r),i+"")},cancelExportMaterial:function(e,t,a,n,r,i){Object(E.d)(a,n,nt(e,t,r),i+"")},setMaterialMarketTA1:function(e,t,a,n){Object(E.q)(nt(e,t,a),n)},setMaterialMarketTA2:function(e,t,a,n){Object(E.r)(nt(e,t,a),n)},setProductMarketTA1:function(e,t,a){Object(E.s)(rt(e,t),a)},setProductMarketTA2:function(e,t,a){Object(E.t)(rt(e,t),a)},getDivision:function(e){return et(e)},getOffice:function(e,t){return tt(e,t)},getWarehouse:function(e,t){return at(e,t)},getMaterial:function(e,t,a){return nt(e,t,a)},getProduct:function(e,t){return rt(e,t)},getEmployee:function(e,t,a){return it(e,t,a)}},codingcontract:{attempt:function(e,n,r=t.serverIp,{returnReward:o}={}){a("attempt",Object(i.c)("codingcontract","attempt"));const s=ze("attempt",r,n);if(Object(Ce.a)(e)){let t=[];for(let a=0;a<e.length;++a)t.push(["[",e[a].toString(),"]"].join(""));e=t.join(",")}else e=String(e);const l=fe(r,"codingcontract.attempt");if(s.isSolution(e)){const e=K.a.gainCodingContractReward(s.reward,s.getDifficulty());return t.log("attempt",`Successfully completed Coding Contract '${n}'. Reward: ${e}`),l.removeContract(n),!o||e}return++s.tries,s.tries>=s.getMaxNumTries()?(t.log("attempt",`Coding Contract attempt '${n}' failed. Contract is now self-destructing`),l.removeContract(n)):t.log("attempt",`Coding Contract attempt '${n}' failed. ${s.getMaxNumTries()-s.tries} attempts remaining.`),!!o&&""},getContractType:function(e,n=t.serverIp){a("getContractType",Object(i.c)("codingcontract","getContractType"));return ze("getContractType",n,e).getType()},getData:function(e,n=t.serverIp){a("getData",Object(i.c)("codingcontract","getData"));const r=ze("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.serverIp){a("getDescription",Object(i.c)("codingcontract","getDescription"));return ze("getDescription",n,e).getDescription()},getNumTriesRemaining:function(e,n=t.serverIp){a("getNumTriesRemaining",Object(i.c)("codingcontract","getNumTriesRemaining"));const r=ze("getNumTriesRemaining",n,e);return r.getMaxNumTries()-r.tries}},sleeve:{getNumSleeves:function(){return a("getNumSleeves",Object(i.c)("sleeve","getNumSleeves")),qe("getNumSleeves"),K.a.sleeves.length},setToShockRecovery:function(e=0){return a("setToShockRecovery",Object(i.c)("sleeve","setToShockRecovery")),qe("setToShockRecovery"),$e("setToShockRecovery",e),K.a.sleeves[e].shockRecovery(K.a)},setToSynchronize:function(e=0){return a("setToSynchronize",Object(i.c)("sleeve","setToSynchronize")),qe("setToSynchronize"),$e("setToSynchronize",e),K.a.sleeves[e].synchronize(K.a)},setToCommitCrime:function(e=0,t=""){return a("setToCommitCrime",Object(i.c)("sleeve","setToCommitCrime")),qe("setToCommitCrime"),$e("setToCommitCrime",e),K.a.sleeves[e].commitCrime(K.a,t)},setToUniversityCourse:function(e=0,t="",n=""){return a("setToUniversityCourse",Object(i.c)("sleeve","setToUniversityCourse")),qe("setToUniversityCourse"),$e("setToUniversityCourse",e),K.a.sleeves[e].takeUniversityCourse(K.a,t,n)},travel:function(e=0,t=""){return a("travel",Object(i.c)("sleeve","travel")),qe("travel"),$e("travel",e),K.a.sleeves[e].travel(K.a,t)},setToCompanyWork:function(e=0,t=""){a("setToCompanyWork",Object(i.c)("sleeve","setToCompanyWork")),qe("setToCompanyWork"),$e("setToCompanyWork",e);for(let a=0;a<K.a.sleeves.length;++a){if(a===e)continue;const n=K.a.sleeves[a];if(n.currentTask===ye.a.Company&&n.currentTaskLocation===t)throw We("sleeve.setToFactionWork",`Sleeve ${e} cannot work for company ${t} because Sleeve ${a} is already working for them.`)}return K.a.sleeves[e].workForCompany(K.a,t)},setToFactionWork:function(e=0,t="",n=""){a("setToFactionWork",Object(i.c)("sleeve","setToFactionWork")),qe("setToFactionWork"),$e("setToFactionWork",e);for(let a=0;a<K.a.sleeves.length;++a){if(a===e)continue;const n=K.a.sleeves[a];if(n.currentTask===ye.a.Faction&&n.currentTaskLocation===t)throw We("sleeve.setToFactionWork",`Sleeve ${e} cannot work for faction ${t} because Sleeve ${a} is already working for them.`)}return K.a.sleeves[e].workForFaction(K.a,t,n)},setToGymWorkout:function(e=0,t="",n=""){return a("setToGymWorkout",Object(i.c)("sleeve","setToGymWorkout")),qe("setToGymWorkout"),$e("setToGymWorkout",e),K.a.sleeves[e].workoutAtGym(K.a,t,n)},getSleeveStats:function(e=0){a("getSleeveStats",Object(i.c)("sleeve","getSleeveStats")),qe("getSleeveStats"),$e("getSleeveStats",e);const t=K.a.sleeves[e];return{shock:100-t.shock,sync:t.sync,hacking_skill:t.hacking_skill,strength:t.strength,defense:t.defense,dexterity:t.dexterity,agility:t.agility,charisma:t.charisma}},getTask:function(e=0){a("getTask",Object(i.c)("sleeve","getTask")),qe("getTask"),$e("getTask",e);const t=K.a.sleeves[e];return{task:ye.a[t.currentTask],crime:t.crimeType,location:t.currentTaskLocation,gymStatType:t.gymStatType,factionWorkType:A.a[t.factionWorkType]}},getInformation:function(e=0){a("getInformation",Object(i.c)("sleeve","getInformation")),qe("getInformation"),$e("getInformation",e);const t=K.a.sleeves[e];return{city:t.city,hp:t.hp,jobs:Object.keys(K.a.jobs),jobTitle:Object.values(K.a.jobs),maxHp:t.max_hp,tor:Z.a.hasOwnProperty("Darkweb Server"),mult:{agility:t.agility_mult,agilityExp:t.agility_exp_mult,companyRep:t.company_rep_mult,crimeMoney:t.crime_money_mult,crimeSuccess:t.crime_success_mult,defense:t.defense_mult,defenseExp:t.defense_exp_mult,dexterity:t.dexterity_mult,dexterityExp:t.dexterity_exp_mult,factionRep:t.faction_rep_mult,hacking:t.hacking_mult,hackingExp:t.hacking_exp_mult,strength:t.strength_mult,strengthExp:t.strength_exp_mult,workMoney:t.work_money_mult},timeWorked:t.currentTaskTime,earningsForSleeves:{workHackExpGain:t.earningsForSleeves.hack,workStrExpGain:t.earningsForSleeves.str,workDefExpGain:t.earningsForSleeves.def,workDexExpGain:t.earningsForSleeves.dex,workAgiExpGain:t.earningsForSleeves.agi,workChaExpGain:t.earningsForSleeves.cha,workMoneyGain:t.earningsForSleeves.money},earningsForPlayer:{workHackExpGain:t.earningsForPlayer.hack,workStrExpGain:t.earningsForPlayer.str,workDefExpGain:t.earningsForPlayer.def,workDexExpGain:t.earningsForPlayer.dex,workAgiExpGain:t.earningsForPlayer.agi,workChaExpGain:t.earningsForPlayer.cha,workMoneyGain:t.earningsForPlayer.money},earningsForTask:{workHackExpGain:t.earningsForTask.hack,workStrExpGain:t.earningsForTask.str,workDefExpGain:t.earningsForTask.def,workDexExpGain:t.earningsForTask.dex,workAgiExpGain:t.earningsForTask.agi,workChaExpGain:t.earningsForTask.cha,workMoneyGain:t.earningsForTask.money},workRepGain:t.getRepGain(K.a)}},getSleeveAugmentations:function(e=0){a("getSleeveAugmentations",Object(i.c)("sleeve","getSleeveAugmentations")),qe("getSleeveAugmentations"),$e("getSleeveAugmentations",e);const t=[];for(let a=0;a<K.a.sleeves[e].augmentations.length;a++)t.push(K.a.sleeves[e].augmentations[a].name);return t},getSleevePurchasableAugs:function(e=0){a("getSleevePurchasableAugs",Object(i.c)("sleeve","getSleevePurchasableAugs")),qe("getSleevePurchasableAugs"),$e("getSleevePurchasableAugs",e);const t=Object(_e.a)(K.a.sleeves[e],K.a),n=[];for(let e=0;e<t.length;e++){const a=t[e];n.push({name:a.name,cost:a.startingCost})}return n},purchaseSleeveAug:function(e=0,t=""){a("purchaseSleeveAug",Object(i.c)("sleeve","purchaseSleeveAug")),qe("purchaseSleeveAug"),$e("purchaseSleeveAug",e);const n=s.a[t];if(!n)throw We("sleeve.purchaseSleeveAug","Invalid aug: "+t);return K.a.sleeves[e].tryBuyAugmentation(K.a,n)}},formulas:{basic:{calculateSkill:function(e,t=1){return Ue("basic.calculateSkill",5),Object(U.b)(e,t)},calculateExp:function(e,t=1){return Ue("basic.calculateExp",5),Object(U.a)(e,t)},hackChance:function(e,t){return Ue("basic.hackChance",5),Object(C.b)(e,t)},hackExp:function(e,t){return Ue("basic.hackExp",5),Object(C.c)(e,t)},hackPercent:function(e,t){return Ue("basic.hackPercent",5),Object(C.e)(e,t)},growPercent:function(e,t,a,n=1){return Ue("basic.growPercent",5),Object(O.a)(e,t,a,n)},hackTime:function(e,t){return Ue("basic.hackTime",5),Object(C.d)(e,t)},growTime:function(e,t){return Ue("basic.growTime",5),Object(C.a)(e,t)},weakenTime:function(e,t){return Ue("basic.weakenTime",5),Object(C.f)(e,t)}},hacknetNodes:{moneyGainRate:function(e,t,a,n=1){return Ue("hacknetNodes.moneyGainRate",5),Object(D.c)(e,t,a,n)},levelUpgradeCost:function(e,t=1,a=1){return Ue("hacknetNodes.levelUpgradeCost",5),Object(D.b)(e,t,a)},ramUpgradeCost:function(e,t=1,a=1){return Ue("hacknetNodes.ramUpgradeCost",5),Object(D.e)(e,t,a)},coreUpgradeCost:function(e,t=1,a=1){return Ue("hacknetNodes.coreUpgradeCost",5),Object(D.a)(e,t,a)},hacknetNodeCost:function(e,t){return Ue("hacknetNodes.hacknetNodeCost",5),Object(D.d)(e,t)},constants:function(){return Ue("hacknetNodes.constants",5),Object.assign({},j.a)}},hacknetServers:{hashGainRate:function(e,t,a,n,r=1){return Ue("hacknetServers.hashGainRate",9),Object(I.c)(e,t,a,n,r)},levelUpgradeCost:function(e,t=1,a=1){return Ue("hacknetServers.levelUpgradeCost",9),Object(I.d)(e,t,a)},ramUpgradeCost:function(e,t=1,a=1){return Ue("hacknetServers.ramUpgradeCost",9),Object(I.e)(e,t,a)},coreUpgradeCost:function(e,t=1,a=1){return Ue("hacknetServers.coreUpgradeCost",9),Object(I.b)(e,t,a)},cacheUpgradeCost:function(e,t=1,a=1){return Ue("hacknetServers.cacheUpgradeCost",9),Object(I.a)(e,t,a)},hashUpgradeCost:function(e,t){Ue("hacknetServers.hashUpgradeCost",9);const a=K.a.hashManager.getUpgrade(e);if(!a)throw We("formulas.hacknetServers.calculateHashUpgradeCost","Invalid Hash Upgrade: "+e);return a.getCost(t)},hacknetServerCost:function(e,t){return Ue("hacknetServers.hacknetServerCost",9),Object(I.f)(e,t)},constants:function(){return Ue("hacknetServers.constants",9),Object.assign({},j.b)}}},heart:{break:function(){return K.a.karma}},exploit:function(){K.a.giveExploit(be.a.UndocumentedFunctionCall)},bypass:function(e){e.completely_unused_field=void 0,document.completely_unused_field=void 0,document.completely_unused_field=!0,e.completely_unused_field&&1.6===t.ramUsage&&K.a.giveExploit(be.a.Bypass),e.completely_unused_field=void 0,document.completely_unused_field=void 0},flags:function(e){e=Re(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}};const ut=Object.fromEntries([...function e(t){const a=[];for(const[n,r]of Object.entries(t))"function"==typeof r?a.push(n):"object"==typeof r&&a.push(...e(r));return a}(ct)].map(e=>[e,!0]));return ct}}).call(this,a(184))},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(103),r=a(18),i=a(8),o=a(12),s=a(98),l=a(14),c=a(165),u=a(4),m=a(126),h=a(49),p=a(468);class d{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-.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<.5){const t=.005*h.a[e].power;h.a[e].power+=Math.min(.85,t)}else{const a=.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-.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()+.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=.01;if(e?t/=2:h.a[this.facName].power*=1/1.008,!(Math.random()<.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,.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 p.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.015*Math.max(.002,this.getTerritory())*e}killMember(e){const t=this.respect,a=.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,.01)+t/5e6+Math.pow(e,.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)(d,e.data)}}o.c.constructors.Gang=d},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(80),r=a(59);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-.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+.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()<.002*a){const e=.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:<br>",n+=i.toString()+" hacking<br>",n+=o.toString()+" strength<br>",n+=s.toString()+" defense<br>",n+=l.toString()+" dexterity<br>",n+=c.toString()+" agility<br>",n+=u.toString()+" charisma<br>",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 i}));var n=a(2),r=a(62);function i(e){return Object(r.a)(n.a.formatReputation(e)+" / sec")}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(14);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(81);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 r}));var n=a(0);function r(e){let t="stock-market-input std-button";return null!=e.tooltip&&(t+=" tooltip"),n.createElement("button",{className:t,onClick:e.onClick},e.text,null!=e.tooltip&&n.createElement("span",{className:"tooltiptext"},e.tooltip))}},,,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";(function(e){a.d(t,"b",(function(){return o})),a.d(t,"a",(function(){return i}));var n=a(1);e(document).click((function(t){r&&null==e(t.target).closest(".game-options-box").get(0)&&i()}));var r=!1;function i(){r=!1,document.getElementById("game-options-container").style.display="none"}function o(){document.getElementById("game-options-container").style.display="flex",document.getElementById("settingsSuppressBladeburnerPopup").closest("fieldset").style.display=n.a.canAccessBladeburner()?"block":"none",setTimeout((function(){r=!0}),500)}document.addEventListener("DOMContentLoaded",(function(){}),!1)}).call(this,a(184))},,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));class n{constructor(e,t,a,n,r,i){this.infoText=e,this.enemies=t,this.offerHackingMission=a,this.offerHackingWork=n,this.offerFieldWork=r,this.offerSecurityWork=i,this.augmentationPriceMult=1,this.augmentationRepRequirementMult=1}offersWork(){return this.offerFieldWork||this.offerHackingMission||this.offerHackingWork||this.offerSecurityWork}}const r={Illuminati:new n("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),Daedalus:new n("Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.",[],!0,!0,!0,!1),"The Covenant":new n("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.<br><br>Only then can you discover immortality.",[],!0,!0,!0,!1),ECorp:new n("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),MegaCorp:new n("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.<br><br>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),"Bachman & Associates":new n("Where Law and Business meet - thats where we are.<br><br>Legal Insight - Business Instinct - Innovative Experience.",[],!0,!0,!0,!0),"Blade Industries":new n("Augmentation is Salvation.",[],!0,!0,!0,!0),NWO:new n("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),"Clarke Incorporated":new n("The Power of the Genome - Unlocked.",[],!0,!0,!0,!0),"OmniTek Incorporated":new n("Simply put, our mission is to design and build robots that make a difference.",[],!0,!0,!0,!0),"Four Sigma":new n("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),"KuaiGong International":new n("Dream big. Work hard. Make history.",[],!0,!0,!0,!0),"Fulcrum Secret Technologies":new n("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),BitRunners:new n("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. Its 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.<br><br>Those who run the bits, run the world.",[],!0,!0,!1,!1),"The Black Hand":new n("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.<br><br>So much pain. So many lives. Their darkness must end.",[],!0,!0,!0,!1),NiteSec:new n(" __..__ <br> _.nITESECNIt. <br> .-'NITESECNITESEc. <br> .' NITESECNITESECn <br> / NITESECNITESEC; <br> : :NITESECNITESEC; <br> ; $ NITESECNITESECN <br> : _, ,N'ITESECNITESEC <br> : .+^^`, : `NITESECNIT <br> ) /), `-,-=,NITESECNI <br> / ^ ,-;|NITESECN; <br> / _.' '-';NITESECN <br> ( , ,-''`^NITE' <br> )` :`. .' <br> )-- ; `- / <br> ' _.-' : <br> ( _.-' . <br> ------. <br> . <br> _.nIt <br> _.nITESECNi <br> nITESECNIT^' <br> NITE^' ___ <br> / .gP''''Tp. <br> : d' . `b <br> ; d' o `b ; <br> / d; `b| <br> /, $; @ `: <br> /' $$ ; <br> .' $$b o | <br> .' d$$$; : <br> / .d$$$$; , ; <br> d .dNITESEC $ | <br> :bp.__.gNITESEC$$ :$ ; <br> NITESECNITESECNIT $$b : <br>",[],!0,!0,!1,!1),Aevum:new n("The Silicon City.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Chongqing:new n("Serve the People.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),Ishima:new n("The East Asian Order of the Future.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"New Tokyo":new n("Asia's World City.",["Sector-12","Aevum","Volhaven"],!0,!0,!0,!0),"Sector-12":new n("The City of the Future.",["Chongqing","New Tokyo","Ishima","Volhaven"],!0,!0,!0,!0),Volhaven:new n("Benefit, Honor, and Glory.",["Chongqing","Sector-12","New Tokyo","Aevum","Ishima"],!0,!0,!0,!0),"Speakers for the Dead":new n("It is better to reign in Hell than to serve in Heaven.",[],!0,!0,!0,!0),"The Dark Army":new n("The World doesn't care about right or wrong. It only cares about power.",[],!0,!0,!0,!1),"The Syndicate":new n("Honor holds you back.",[],!0,!0,!0,!0),Silhouette:new n("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.<br><br>That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.",[],!0,!0,!0,!1),Tetrads:new n("Following the mandate of Heaven and carrying out the way.",[],!1,!1,!0,!0),"Slum Snakes":new n("Slum Snakes rule!",[],!1,!1,!0,!0),Netburners:new n("~~//*>H4CK||3T 8URN3R5**>?>\\~~",[],!0,!0,!1,!1),"Tian Di Hui":new n("Obey Heaven and work righteously.",[],!0,!0,!1,!0),CyberSec:new n("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),Bladeburners:new n("It's too bad they won't live. But then again, who does?<br><br>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)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(429),r=a(8);function i(e){const t=n.a[e];if(null==t)return;const a=`<i>${t.title}</i><br><br>${t.txt}`;Object(r.a)(a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u}));var n=a(26),r=a(86),i=a(224),o=a(67),s=a(98),l=a(65);let c=!1;function u(e){if(c=!0,e.constructor!==Array)throw new Error("Invalid non-array argument passed into writeCinematicText()");n.Engine.loadCinematicTextContent();const t=document.getElementById("cinematic-text-container");if(t.style.width="75%",null==t)throw new Error("Could not find cinematic-text-container for writeCinematicText()");Object(i.a)(t);for(let t=0;t<e.length;++t)if(!Object(l.a)(e[t]))throw new Error("Invalid non-string element in 'lines' argument. writeCinematicText() failed");return function e(t,a=0){if(a>=t.length)return Promise.resolve(!0);return(n=t[a],new Promise((function(e,t){const a=document.getElementById("cinematic-text-container"),i=document.createElement("p");a.appendChild(i),function e(t,a,n=0){return new Promise((function(i,o){Object(r.a)((function(){const r=a.substring(0,n);if(n>=a.length)return t.innerHTML=r,i(!0);t.innerHTML=r+"<span class='typed-cursor'> &#9608; </span>",e(t,a,n+1).then((function(e){i(e)}),(function(e){o(e)}))}),15)}))}(i,n,0).then((function(t){e(t)}),(function(e){t(e)}))}))).then((function(){return e(t,a+1)}));var n}(e).then((function(){return function(){var e=document.getElementById("cinematic-text-container"),t=document.getElementById("mainmenu-container");return e.appendChild(Object(o.a)("br")),new Promise((function(a){e.appendChild(Object(o.a)("a",{class:"a-link-button",innerText:"Continue...",clickListener:()=>{Object(i.a)(e),n.Engine.loadTerminalContent(),t.style.visibility="visible",c=!1,a()}}))}))}()})).catch((function(e){Object(s.a)(e)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(63),r=a(201),i=a(75),o=a(162),s=a(82),l=a(170),c=a(171);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.ip,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(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__(225),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(125),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(164),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(9);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();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,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("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(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let 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__.b)(e,{sourceType:"module",ecmaVersion:"latest"}),n=t+memCheckGlobalKey,r={};r[n]=new Set;let i={};var o=[];function s(e,a){const n=r[e]||(r[e]=new Set);a in i&&n.add(i[a]),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),r[t.key].add(a+memCheckGlobalKey);for(let n=0;n<e.specifiers.length;++n){const o=e.specifiers[n];void 0!==o.imported&&void 0!==o.local?i[o.local.name]=a+"."+o.imported.name:r[t.key].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 i}));var n=a(4),r=a(5);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";function n(e){const t="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";return new RegExp(`^${t}.${t}.${t}.${t}$`).test(e)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(125),r=function(e,t,a=0){this.sourceCode=e,this.sourceCodeLineOffset=a,"string"==typeof e&&(e=n.b(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.b(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.b(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.b("(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 p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;u<t.arguments_.length;u++)this.setProperty(p,u,t.arguments_[u]);this.setProperty(c,"arguments",p);var d=l.id&&l.id.name;return d&&this.setProperty(c,d,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.b(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 _=this,b=t.arguments_.concat((function(e){t.value=e,_.paused_=!1}));return this.paused_=!0,void o.asyncFunc.apply(t.funcThis_,b)}{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 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 r}));var n=a(22);function r(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=n.b[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";a.d(t,"a",(function(){return o}));var n=a(15),r=a(3),i=a(18);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";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,"a",(function(){return o}));var n=a(0),r=a(102),i=a(3);function o(e){let t=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(t+=" - Level "+e.level),"string"==typeof e.aug.info?n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,t),panelContent:n.createElement("p",null,n.createElement("span",{dangerouslySetInnerHTML:{__html:e.aug.info}}),n.createElement("br",null),n.createElement("br",null),e.aug.stats)}):n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,t),panelContent:n.createElement("p",null,e.aug.info,n.createElement("br",null),n.createElement("br",null),e.aug.stats)})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(20),o=a(8);function s(e){const[t,a]=Object(n.useState)();return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations."),r.a.createElement("input",{autoFocus:!0,type:"number",placeholder:"Team size",className:"text-input",onChange:e=>a(parseFloat(e.target.value))}),r.a.createElement("a",{className:"a-link-button",onClick:function(){if(void 0===t)return;const a=Math.round(t);isNaN(a)||a<0?Object(o.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=a,Object(i.b)(e.popupId)}},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(38);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,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(580),r=a(15),i=a(190),o=a(3),s=a(14);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 i}));var n=a(0),r=a.n(n);function i(){return r.a.createElement("span",{style:{fontSize:"1em"},className:"blinking-cursor"},"|")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(132);function i(e){return Object(r.a)(n.a.formatHashes(e)+" / sec")}},,,,,,,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}));var n=a(174),r=a(12);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<br> 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(169),r=a(2);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:`<div id="${this.text.replace(/\s/g,"")}-corp-research-click-listener">${this.text}<br>${r.a.format(this.cost,"0,0")} Scientific Research<span class="tooltiptext">`+a.desc+"</span></div>",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let a=0;a<this.children.length;++a)if(t=this.children[a].findNode(e),null!=t)return t;return null}setParent(e){this.parent=e}}class s{constructor(){i(this,"researched",{}),i(this,"root",null)}createTreantMarkup(){if(null==this.root)return{};return{chart:{container:""},nodeStructure:this.root.createTreantMarkup()}}getAllNodes(){const e=[],t=[];if(null==this.root)return e;for(t.push(this.root);0!==t.length;){const a=t.shift();if(null!=a){e.push(a.text);for(let e=0;e<a.children.length;++e)t.push(a.children[e])}}return e}getAdvertisingMultiplier(){return this.getMultiplierHelper("advertisingMult")}getEmployeeChaMultiplier(){return this.getMultiplierHelper("employeeChaMult")}getEmployeeCreMultiplier(){return this.getMultiplierHelper("employeeCreMult")}getEmployeeEffMultiplier(){return this.getMultiplierHelper("employeeEffMult")}getEmployeeIntMultiplier(){return this.getMultiplierHelper("employeeIntMult")}getProductionMultiplier(){return this.getMultiplierHelper("productionMult")}getProductProductionMultiplier(){return this.getMultiplierHelper("productProductionMult")}getSalesMultiplier(){return this.getMultiplierHelper("salesMult")}getScientificResearchMultiplier(){return this.getMultiplierHelper("sciResearchMult")}getStorageMultiplier(){return this.getMultiplierHelper("storageMult")}getMultiplierHelper(e){let t=1;if(null==this.root)return t;const a=[];for(a.push(this.root);0!==a.length;){const r=a.shift();if(null==r||!r.researched)continue;const i=n.a[r.text];if(null==i){console.warn("Invalid Research name in node: "+r.text);continue}const o=i[e];if(null!=o){t*=o;for(let e=0;e<r.children.length;++e)a.push(r.children[e])}else console.warn("Invalid propName specified in ResearchTree.getMultiplierHelper: "+e)}return t}findNode(e){return null==this.root?null:this.root.findNode(e)}research(e){if(null==this.root)return;const t=[];for(t.push(this.root);0!==t.length;){const a=t.shift();if(null!=a){if(a.text===e)return a.researched=!0,void(this.researched[e]=!0);for(let e=0;e<a.children.length;++e)t.push(a.children[e])}}console.warn("ResearchTree.research() did not find the specified Research node for: "+e)}setRoot(e){this.root=e}}},,function(e,t,a){"use strict";a.d(t,"b",(function(){return n})),a.d(t,"a",(function(){return r}));const n="Type 'help name' to learn more about the command 'name'<br><br>alias [-g] [name=\"value\"] Create or display Terminal aliases<br>analyze Get information about the current machine <br>backdoor Install a backdoor on the current machine <br>buy [-l/program] Purchase a program through the Dark Web<br>cat [file] Display a .msg, .lit, or .txt file<br>cd [dir] Change to a new directory<br>check [script] [args...] Print a script's logs to Terminal<br>clear Clear all text on the terminal <br>cls See 'clear' command <br>connect [ip/hostname] Connects to a remote server<br>download [script/text file] Downloads scripts or text files to your computer<br>expr [math expression] Evaluate a mathematical expression<br>free Check the machine's memory (RAM) usage<br>hack Hack the current machine<br>help [command] Display this help text, or the help text for a command<br>home Connect to home computer<br>hostname Displays the hostname of the machine<br>ifconfig Displays the IP address of the machine<br>kill [script/pid] [args...] Stops the specified script on the current server <br>killall Stops all running scripts on the current machine<br>ls [dir] [| grep pattern] Displays all files on the machine<br>lscpu Displays the number of CPU cores on the machine<br>mem [script] [-t] [n] Displays the amount of RAM required to run the script<br>mv [src] [dest] Move/rename a text or script file<br>nano [file] Text editor - Open up and edit a script or text file<br>ps Display all scripts that are currently running<br>rm [file] Delete a file from the server<br>run [name] [-t] [n] [args...] Execute a program or script<br>scan Prints all immediately-available network connections<br>scan-analyze [d] [-a] Prints info for all servers up to <i>d</i> nodes away<br>scp [file] [server] Copies a file to a destination server<br>sudov Shows whether you have root access on this computer<br>tail [script] [args...] Displays dynamic logs for the specified script<br>theme [preset] | bg txt hlgt Change the color scheme of the UI<br>top Displays all running scripts and their RAM usage<br>unalias [alias name] Deletes the specified alias<br>wget [url] [target file] Retrieves code/text from a web server<br>",r={alias:"alias [-g] [name=\"value\"] <br>Create or display aliases. An alias enables a replacement of a word with another string. It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: <br><br>alias nuke=\"run NUKE.exe\"<br><br>Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For example, if the following alias was set: <br><br>alias worm=\"HTTPWorm.exe\"<br><br>and then you tried to run the following terminal command: <br><br>run worm<br><br>This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: <br><br>alias -g worm=\"HTTPWorm.exe\"<br><br>Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. <br><br>Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form 'alias NAME=VALUE' on the Terminal. <br><br>The 'unalias' command can be used to remove aliases.<br><br>",analyze:"analze<br>Prints details and statistics about the current server. The information that is printed includes basic server details such as the hostname, whether the player has root access, what ports are opened/closed, and also hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is available on the server, etc.",backdoor:"backdoor<br>Install a backdoor on the current machine, grants a secret bonus depending on the machine.<br>Requires root access to run.<br>",buy:"buy [-l / program]<br>Purchase a program through the Dark Web. Requires a TOR router to use.<br><br>If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the dark web to the Terminal, as well as their costs.<br><br>Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.",cat:"cat [file]<br>Display message (.msg), literature (.lit), or text (.txt) files. Examples:<br><br>cat j1.msg<br>cat foo.lit<br>cat servers.txt",cd:"cd [dir]<br>Change to the specified directory. Note that this works even for directories that don't exist. If you change to a directory that does not exist, it will not be 'created'. Examples:<br><br>cd scripts/hacking<br>cd /logs<br>cd ../",check:"check [script name] [args...]<br>Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by a space. Remember that a running script is uniquely identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: <br><br>run foo.script 1 2 foodnstuff<br><br>Then to run the 'check' command on this script you would have to pass the same arguments in: <br><br>check foo.script 1 2 foodnstuff",clear:"clear<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command",cls:"cls<br>Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command",connect:"connect [hostname/ip]<br>Connect to a remote server. The hostname or IP address of the remote server must be given as the argument to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To see which servers can be connected to, use the 'scan' command.",download:"download [script/text file]<br>Downloads a script or text file to your computer (like your real life computer).<br>You can also download all of your scripts/text files as a zip file using the following Terminal commands:<br><br>Download all scripts and text files: download *<br>Download all scripts: download *.script<br>Download all text files: download *.txt<br>",expr:"expr [mathematical expression]<br>Evaluate a simple mathematical expression. Supports native JavaScript operators:<br>+, -, /, *, **, %<br>Example:<br>expr 25 * 2 ** 10<br>Note that letters (non-digits) are not allowed and will be removed from the input.",free:"free<br>Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as how much of it is being used.",hack:"hack<br>Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics<br>",help:"help [command]<br>Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print more detailed information about the Terminal command. Examples: <br><br>help alias<br>help scan-analyze",home:"home<br>Connect to your home computer. This will work no matter what server you are currently connected to.",hostname:"hostname<br>Prints the hostname of the current server",ifconfig:"ipconfig<br>Prints the IP address of the current server",kill:"kill [script name] [args...]<br>kill [pid]<br>Kill the script specified by the script name and arguments OR by its PID.<br><br>If you are killing the script using its filename and arguments, then each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that are used to start it. So, if a script was ran with the following arguments:<br><br>run foo.script 1 sigma-cosmetics<br><br>Then to kill this script the same arguments would have to be used:<br><br>kill foo.script 1 sigma-cosmetics<br><br>If you are killing the script using its PID, then the PID argument must be numeric",killall:"killall<br>Kills all scripts on the current server. Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. The script will not be stopped/killed until after that time has elapsed.",ls:"ls [dir] [| grep pattern]<br>The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. The files will be displayed in alphabetical order. <br><br>The 'dir' optional parameter can be used to display files/directories in another directory.<br><br>The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.<br><br>Examples:<br><br>List all files with the '.script' extension in the current directory:<br>ls | grep .script<br><br>List all files with the '.js' extension in the root directory:<br>ls / | grep .js<br><br>List all files with the word 'purchase' in the filename, in the 'scripts' directory:<br>ls scripts | grep purchase",lscpu:"lscpu<br>Prints the number of CPU Cores the current server has",mem:"mem [script name] [-t] [num threads]<br>Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then an argument for the number of threads must be passed in afterwards. Examples:<br><br>mem foo.script<br>mem foo.script -t 50<br>The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example above will print the amount of RAM needed to run 'foo.script' with 50 threads.",mv:"mv [src] [dest]<br>Move the source file to the specified destination. This can also be used to rename files. This command only works for scripts and text files (.txt). This command CANNOT be used to convert to different file types<br><br>Note that, unlike the Linux 'mv' command, the destination argument must be the full filepath. Examples: <br><br>mv hacking-controller.script scripts/hacking-controller.script<br>mv myScript.js myOldScript.js",nano:"nano [file name]<br>Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be edited using the Text Editor. If the file does not already exist, then a new, empty one will be created",ps:"ps<br>Prints all scripts that are running on the current server",rm:"rm [file]<br>Removes the specified file from the current server. A file can be a script, a program, or a message file. <br><br>WARNING: This is permanent and cannot be undone",run:"run [file name] [-t] [num threads] [args...]<br>Execute a program or a script.<br><br>The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used to indicate that the script should be run with the specified number of threads. If the flag is omitted, then the script will be run with a single thread by default. If the '-t' flag is used, then it MUST come immediately after the script name, and the [num threads] argument MUST come immediately afterwards. <br><br>[args...] represents a variable number of arguments that will be passed into the script. See the documentation about script arguments. Each specified argument must be separated by a space. <br><br>",scan:"scan<br>Prints all immediately-available network connection. This will print a list of all servers that you can currently connect to using the 'connect' Terminal command.","scan-analyze":"scan-analyze [depth] [-a]<br>Prints detailed information about all servers up to [depth] nodes away on the network. Calling 'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal command. This command also shows the relative paths to reach each server.<br><br>By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to 5 and 10, respectively.<br><br>The information 'scan-analyze' displays about each server includes whether or not you have root access to it, its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM it has.<br><br>By default, this command will not display servers that you have purchased. However, you can pass in the -a flag at the end of the command if you would like to enable that.",scp:"scp [filename] [target server]<br>Copies the specified file from the current server to the target server. This command only works for script files (.script extension), literature files (.lit extension), and text files (.txt extension). The second argument passed in must be the hostname or IP of the target server.",sudov:"sudov<br>Prints whether or not you have root access to the current machine",tail:"tail [script name] [args...]<br>Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used to run it. So, if a script was ran with the following arguments: <br><br>run foo.script 10 50000<br><br>Then in order to check its logs with 'tail' the same arguments must be used: <br><br>tail foo.script 10 50000",theme:"theme [preset] | [#background #text #highlight]<br>Change the color of the game's user interface<br><br>This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and must be either 3 or 6 digits. Example:<br><br>theme #ffffff #385 #235012<br><br>A color picker such as <a href='https://www.google.com/search?q=color+picker&oq=color+picker&aqs=chrome.0.0l6.951j0j1&sourceid=chrome&ie=UTF-8' target='_blank'>Google's</a> can be used to get your desired hex color values<br><br>Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.",top:"top<br>Prints a list of all scripts running on the current server as well as their thread count and how much RAM they are using in total.",unalias:"unalias [alias name]<br>Deletes the specified alias. Note that the double quotation marks are required. <br><br>As an example, if an alias was declared using:<br><br>alias r=\"run\"<br><br>Then it could be removed using:<br><br>unalias r<br><br>It is not necessary to differentiate between global and non-global aliases when using 'unalias'",wget:"wget [url] [target file]<br>Retrieves data from a URL and downloads it to a file on the current server. The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, it will be overwritten by this command.<br><br>Note that it will not be possible to download data from many websites because they do not allow cross-origin resource sharing (CORS). Example:<br><br>wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=75},,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(54);function r(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:n.a[t]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t="cmpy-mgmt-header-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.text)}},,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(643),i=a(644),o=a(81),s=a(238),l=a(33),c=a(4),u=a(8);class m extends n.Component{constructor(e){super(e),this.state={city:e.p.city,inCity:null==e.initiallyInCity||e.initiallyInCity,location:e.p.location},this.enterLocation=this.enterLocation.bind(this),this.returnToCity=this.returnToCity.bind(this),this.travel=this.travel.bind(this)}enterLocation(e){this.props.p.gotoLocation(e),this.setState({inCity:!1,location:e})}returnToCity(){this.setState({inCity:!0})}renderCity(){const e=o.a[this.state.city];if(null==e)throw new Error("Invalid city when rendering UI: "+this.state.city);return n.createElement("div",{className:"noselect"},n.createElement("h2",null,this.state.city),n.createElement(r.a,{city:e,enterLocation:this.enterLocation}))}renderLocation(){const e=s.a[this.state.location];if(null==e)throw new Error("Invalid location when rendering UI: "+this.state.location);return e.types.includes(l.a.StockMarket)&&this.props.engine.loadStockMarketContent(),n.createElement(i.a,{engine:this.props.engine,loc:e,p:this.props.p,returnToCity:this.returnToCity,travel:this.travel})}travel(e){const t=this.props.p,a=c.a.TravelCost;if(t.canAfford(a)){if(t.loseMoney(a),t.travel(e),Object(u.a)(n.createElement("span",{className:"noselect"},"You are now in ",e,"!")),!1===t.firstTimeTraveled){t.firstTimeTraveled=!0;const e=document.getElementById("travel-tab"),a=document.getElementById("world-menu-header");null!=e&&null!==a&&(e.style.display="list-item",a.click(),a.click())}this.props.p.travel(e)&&this.setState({inCity:!0,city:e})}else Object(u.a)("You cannot afford to travel to "+e)}render(){return this.state.inCity?n.createElement("div",{id:"location-container"},this.renderCity()):this.renderLocation()}}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(276),o=a(995);function s(){return(s=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 l=Object(i.a)({root:{backgroundColor:"#555",border:"1px solid #333",color:"white",margin:"5px",padding:"3px 5px","&:hover":{backgroundColor:"#666"}},textPrimary:{color:"rgb( 144, 202, 249)"},textSecondary:{color:"rgb(244, 143, 177)"},disabled:{backgroundColor:"#333",color:"#fff",cursor:"default"}}),c=e=>r.a.createElement(o.a,s({},e,{classes:{...l(),...e.classes}}))},,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(425),i=a(501),o=a(502),s=a(1),l=a(19),c=a(161);class u extends n.Component{constructor(e){super(e),this.state={rerender:!1},this.export=this.export.bind(this)}export(){this.props.exportGameFn(),this.setState({rerender:!this.state.rerender})}render(){return n.createElement("div",{id:"augmentations-container"},n.createElement("div",{id:"augmentations-content"},n.createElement("h1",null,"Purchased Augmentations"),n.createElement("p",null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),n.createElement("p",null,"WARNING: Installing your Augmentations resets most of your progress, including:"),n.createElement("br",null),n.createElement("p",null,"- Stats/Skill levels and Experience"),n.createElement("p",null,"- Money"),n.createElement("p",null,"- Scripts on every computer but your home computer"),n.createElement("p",null,"- Purchased servers"),n.createElement("p",null,"- Hacknet Nodes"),n.createElement("p",null,"- Faction/Company reputation"),n.createElement("p",null,"- Stocks"),n.createElement("br",null),n.createElement("p",null,"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)"),n.createElement(l.a,{onClick:this.props.installAugmentationsFn,text:"Install Augmentations",tooltip:"'I never asked for this'"}),n.createElement(l.a,{addClasses:"flashing-button",onClick:this.export,text:"Backup Save "+(Object(c.b)()?"(+1 favor to all factions)":""),tooltip:"It's always a good idea to backup/export your save!"}),n.createElement(o.a,null),n.createElement("h1",null,"Installed Augmentations"),n.createElement("p",null,`List of all Augmentations ${s.a.sourceFiles.length>0?"and Source Files ":""} that have been installed. You have gained the effects of these.`),n.createElement(r.a,null),n.createElement("br",null)," ",n.createElement("br",null),n.createElement(i.a,null)))}}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(14);const r={Tracking:()=>Object(n.a)(5,75)/10,"Bounty Hunter":()=>Object(n.a)(5,75)/10,Retirement:()=>Object(n.a)(5,75)/10,Investigation:()=>Object(n.a)(10,40)/10,"Undercover Operation":()=>Object(n.a)(10,40)/10,"Sting Operation":()=>Object(n.a)(3,40)/10,Raid:()=>Object(n.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(n.a)(1,20)/10,Assassination:()=>Object(n.a)(1,20)/10}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)}a.d(t,"a",(function(){return n}))},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(163),i=a(1),o=a(44),s=a(7),l=a(10),c=a(290);function u(){if(o.a.hasOwnProperty("Darkweb Server")){const e=o.a.getIp("Darkweb Server");if(!Object(c.a)(e))return;e==i.a.getCurrentServer().ip&&Object(s.c)("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 m(e){if(0!=e.length)switch(e[0]){case"buy":{if(2!=e.length)return Object(s.c)("Incorrect number of arguments. Usage: "),Object(s.c)("buy -l"),void Object(s.c)("buy [item name]");const t=e[1];"-l"==t||"-1"==t||"--list"==t?function(){for(const e in r.a){const t=r.a[e];Object(s.e)(n.createElement(n.Fragment,null,t.program," - ",n.createElement(l.a,{money:t.price,player:i.a})," - ",t.description))}}():function(e){e=e.toLowerCase();let t=null;for(const a in r.a){const n=r.a[a];n.program.toLowerCase()==e&&(t=n)}if(null===t)return void Object(s.c)("Unrecognized item: "+e);if(i.a.hasProgram(t.program))return void Object(s.c)("You already have the "+t.program+" program");if(i.a.money.lt(t.price))return void Object(s.c)("Not enough money to purchase "+t.program);i.a.loseMoney(t.price),i.a.getHomeComputer().programs.push(t.program),Object(s.c)("You have purchased the "+t.program+" program. The new program can be found on your home computer.")}(t);break}default:Object(s.c)("Command not found")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(64),r=a(45),i=a(12);class o{constructor(e="",t=0,a=0,i=n.a.LimitBuy,o=r.a.Long){let s=!1;if("number"==typeof t&&"number"==typeof a||(s=!0),(isNaN(t)||isNaN(a))&&(s=!0),"string"!=typeof e&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=e,this.shares=t,this.price=a,this.type=i,this.pos=o}toJSON(){return Object(i.b)("Order",this)}static fromJSON(e){return Object(i.a)(o,e.data)}}i.c.constructors.Order=o},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(57);const r={longestName:0,longestSymbol:0};for(const e in n.a)r.longestName=Math.max(e.length,r.longestName),r.longestSymbol=Math.max(n.a[e].length,r.longestSymbol)},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(6);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,"city",null),r(this,"costMult",0),r(this,"expMult",0),r(this,"name",n.a.Void),r(this,"types",[]),r(this,"techVendorMaxRam",0),r(this,"techVendorMinRam",0),e.city&&(this.city=e.city),e.costMult&&(this.costMult=e.costMult),e.expMult&&(this.expMult=e.expMult),e.infiltrationData&&(this.infiltrationData=e.infiltrationData),e.name&&(this.name=e.name),e.types&&(this.types=e.types),e.techVendorMaxRam&&(this.techVendorMaxRam=e.techVendorMaxRam),e.techVendorMinRam&&(this.techVendorMinRam=e.techVendorMinRam)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){let t="cmpy-mgmt-city-tab";return e.current&&(t+=" current"),r.a.createElement("button",{className:t,onClick:e.onClick},e.name)}},function(e,t,a){"use strict";function n(e){return null==e||e.options.length<=0||e.selectedIndex<0?"":e.options[e.selectedIndex].text}a.d(t,"a",(function(){return n}))},,function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(22),o=a(122),s=a(72);const l={All:0,Foreign:1,Owned:2,Purchased:3};function c(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case l.All:return!0;case l.Foreign:return"home"!==t.hostname&&!a;case l.Owned:return a||t instanceof s.a||"home"===t.hostname;case l.Purchased:return a||t instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+n),!1}}const a=[];for(const e in i.b){const n=i.b[e];t(n)&&a.push(r.a.createElement("option",{key:n.hostname,value:n.hostname},n.hostname))}return r.a.createElement("select",{className:"dropdown",onChange:e.onChange,style:e.style},a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(140);const o=({card:e,hidden:t})=>{let a;switch(e.suit){case i.b.Clubs:a=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:a=r.a.createElement("span",null,"♦");break;case i.b.Hearts:a=r.a.createElement("span",null,"♥");break;case i.b.Spades:a=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+e.suit)}return r.a.createElement("div",{className:"casino-card "+(e.isRedSuit()?"red":"black")},r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"value"},t?" - ":e.formatValue()),r.a.createElement("div",{className:"suit"},t?" - ":a)))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(276),o=a(711);function s(){return(s=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 l=Object(i.a)({root:{backgroundColor:"rgb(30, 30, 30)",border:"2px solid #000",borderRadius:"10px",display:"inline-block",flexWrap:"wrap",padding:"10px"}}),c=e=>r.a.createElement(o.a,s({},e,{classes:{...l(),...e.classes}}))},,function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=new class{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise<string>;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise<void>;\n grow(ip: string, threads: number, stock: boolean): Promise<string>;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise<string>;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise<boolean>;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise<string>;\n installBackdoor(): Promise<void>;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(18),r=a(30);function i(e,t){const a=t.augmentations.slice().filter(e=>"NeuroFlux Governor"!==e);for(const t of a)if(!e.augmentations.some(e=>e.name==t))return!1;return!0}const o=[{title:"Gain root access on CSEC",fulfilled:()=>{const e=Object(r.a)("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=Object(r.a)("CSEC");return!(!e||!e.hasOwnProperty("backdoorInstalled"))&&e.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:e=>e.factions.includes("CyberSec")},{title:"Install all the Augmentations from CyberSec",fulfilled:e=>i(e,n.a.CyberSec)},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:e=>e.factions.includes("NiteSec")},{title:"Install all the Augmentations from NiteSec",fulfilled:e=>i(e,n.a.NiteSec)},{title:"Join the faction hinted at in j3.msg",fulfilled:e=>e.factions.includes("The Black Hand")},{title:"Install all the Augmentations from The Black Hand",fulfilled:e=>i(e,n.a["The Black Hand"])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:e=>e.factions.includes("BitRunners")},{title:"Install all the Augmentations from BitRunners",fulfilled:e=>i(e,n.a.BitRunners)},{title:"Complete fl1ght.exe",fulfilled:e=>e.factions.includes("Daedalus")},{title:"Install the special Augmentation from Daedalus",fulfilled:e=>e.augmentations.some(e=>"The Red Pill"==e.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a(2),i=a(102),o=a(209),s=a(84),l=a(8),c=a(176),u=a(11),m=a(137),h=a(10);function p(e){const t=e.workerScript.scriptRef,a=c.a.bind(null,t),p=s.a.bind(null,t,t.server);const d=t.onlineMoneyMade/t.onlineRunningTime,f=t.onlineExpGained/t.onlineRunningTime,g=t.offlineMoneyMade/t.offlineRunningTime,y=t.offlineExpGained/t.offlineRunningTime;return n.createElement(i.a,{headerClass:"active-scripts-script-header",headerContent:n.createElement(n.Fragment,null,e.workerScript.name),panelClass:"active-scripts-script-panel",panelContent:n.createElement(n.Fragment,null,n.createElement("pre",null,"Threads: ",r.a.formatThreads(e.workerScript.scriptRef.threads)),n.createElement("pre",null,"Args: ",Object(m.a)(e.workerScript.args)),n.createElement("pre",null,"Online Time: ",Object(u.b)(1e3*t.onlineRunningTime)),n.createElement("pre",null,"Offline Time: ",Object(u.b)(1e3*t.offlineRunningTime)),n.createElement("pre",null,"Total online production: ",n.createElement(h.a,{money:t.onlineMoneyMade})),n.createElement("pre",null,Array(26).join(" ")+r.a.formatExp(t.onlineExpGained)+" hacking exp"),n.createElement("pre",null,"Online production rate: ",n.createElement(h.a,{money:d})," / second"),n.createElement("pre",null,Array(25).join(" ")+r.a.formatExp(f)+" hacking exp / second"),n.createElement("pre",null,"Total offline production: ",n.createElement(h.a,{money:t.offlineMoneyMade})),n.createElement("pre",null,Array(27).join(" ")+r.a.formatExp(t.offlineExpGained)+" hacking exp"),n.createElement("pre",null,"Offline production rate: ",n.createElement(h.a,{money:g})," / second"),n.createElement("pre",null,Array(26).join(" ")+r.a.formatExp(y)+" hacking exp / second"),n.createElement(o.a,{onClick:a,text:"Log"}),n.createElement(o.a,{onClick:function(){p(),Object(l.a)("Killing script")},text:"Kill Script"}))})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(121),r=a(104);function i(){Object(r.a)("loader"),Object(n.a)("entire-game-container").style.visibility="visible"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(426),i=a(497),o=a(498),s=a(500),l=a(27),c=a(105);class u extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.collapseAllHeaders=this.collapseAllHeaders.bind(this),this.expandAllHeaders=this.expandAllHeaders.bind(this),this.sortByAcquirementTime=this.sortByAcquirementTime.bind(this),this.sortInOrder=this.sortInOrder.bind(this),this.listRef=n.createRef()}collapseAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const a=t[e];a instanceof HTMLButtonElement&&(a.classList.contains("active")&&a.click())}}expandAllHeaders(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const a=t[e];a instanceof HTMLButtonElement&&(a.classList.contains("active")||a.click())}}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}sortByAcquirementTime(){l.a.OwnedAugmentationsOrder=c.a.AcquirementTime,this.rerender()}sortInOrder(){l.a.OwnedAugmentationsOrder=c.a.Alphabetically,this.rerender()}render(){return n.createElement(n.Fragment,null,n.createElement(i.a,{collapseAllButtonsFn:this.collapseAllHeaders,expandAllButtonsFn:this.expandAllHeaders,sortByAcquirementTimeFn:this.sortByAcquirementTime,sortInOrderFn:this.sortInOrder}),n.createElement("ul",{className:"augmentations-list",ref:this.listRef},n.createElement(s.a,null),n.createElement(o.a,null),n.createElement(r.a,null)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(1),i=a(15),o=a(3),s=a(27),l=a(105),c=a(297);function u(){const e=r.a.augmentations.slice();s.a.OwnedAugmentationsOrder===l.a.Alphabetically&&e.sort((e,t)=>e.name<=t.name?-1:1);const t=e.map(e=>{const t=i.a[e.name];let a=null;return e.name===o.a.NeuroFluxGovernor&&(a=e.level),n.createElement("li",{key:e.name},n.createElement(c.a,{aug:t,level:a}))});return n.createElement(n.Fragment,null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(12);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class i{constructor(){var e,t,a;a=0,(t="state")in(e=this)?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}getState(){return r[this.state]}nextState(){(this.state<0||this.state>=r.length)&&(this.state=0),++this.state,this.state>=r.length&&(this.state=0)}toJSON(){return Object(n.b)("CorporationState",this)}static fromJSON(e){return Object(n.a)(i,e.data)}}n.c.constructors.CorporationState=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){function t(t){"Escape"===t.key&&e.removePopup()}return Object(n.useEffect)(()=>(document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)})),r.a.createElement("div",{className:"popup-box-content",id:e.id+"-content"},r.a.createElement(e.content,e.props))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(89),r=a(37);const i={};!function(){let e,t,a;e="The Beginner's Guide to Hacking",t=r.a.HackersStartingHandbook,a="Some resources:<br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html' target='_blank' style='margin:4px'>Learn to Program</a><br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html' target='_blank' style='margin:4px'>For Experienced JavaScript Developers: NetscriptJS</a><br><br><a class='a-link-button' href='https://bitburner.readthedocs.io/en/latest/netscript.html' target='_blank' style='margin:4px'>Netscript Documentation</a><br><br>When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.<br><br>-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)<br><br>-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()<br><br>-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()<br><br>-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game<br><br>-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'<br><br>-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",i[t]=new n.a(e,t,a),e="The Complete Handbook for Creating a Successful Corporation",t=r.a.CorporationManagementHandbook,a="<u>Getting Started with Corporations</u><br>To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.<br><br>Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.<br><br>The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.<br><br>Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.<br><br>Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').<br><br>To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.<br><br>Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.<br><br>These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.<br><br><u>Tips/Pointers</u><br>-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.<br><br>-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.<br><br>-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers<br><br>-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.<br><br>-If your employees have low morale, energy, or happiness, their production will greatly suffer.<br><br>-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.<br><br>-Don't forget to advertise your company. You won't have any business if nobody knows you.<br><br>-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales<br><br>-Remember, you need to spend money to make money!<br><br>-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",i[t]=new n.a(e,t,a),e="A Brief History of Synthoids",t=r.a.HistoryOfSynthoids,a="Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.<br><br>Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued OmniTek had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.<br><br>All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.<br><br>What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.<br><br>It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.<br><br>In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.<br><br>Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, and that many of them are blending in as normal humans in society today. In response, many nations have created Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.<br><br>To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.<br><br>Nobody knows what happened to the terrorist group Ascendis Totalis.",i[t]=new n.a(e,t,a),e="A Green Tomorrow",t=r.a.AGreenTomorrow,a="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.<br><br>Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.<br><br>The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.<br><br>Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",i[t]=new n.a(e,t,a),e="Alpha and Omega",t=r.a.AlphaOmega,a="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'<br><br>And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",i[t]=new n.a(e,t,a),e="Are We Living in a Computer Simulation?",t=r.a.SimulatedReality,a="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.<br><br>Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened. <br><br>Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",i[t]=new n.a(e,t,a),e="Beyond Man",t=r.a.BeyondMan,a="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.<br><br>And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?<br><br>Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",i[t]=new n.a(e,t,a),e="Brighter than the Sun",t=r.a.BrighterThanTheSun,a="When people think about the corporations that dominate the East, they typically think of KuaiGong International, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.<br><br>TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.<br><br>The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.<br><br>TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.",i[t]=new n.a(e,t,a),e="Democracy is Dead: The Fall of an Empire",t=r.a.DemocracyIsDead,a="They rose from the shadows in the street.<br>From the places where the oppressed meet.<br>Their cries echoed loudly through the air.<br>As they once did in Tiananmen Square.<br>Loudness in the silence, Darkness in the light.<br>They came forth with power and might.<br>Once the beacon of democracy, America was first.<br>Its pillars of society destroyed and dispersed.<br>Soon the cries rose everywhere, with revolt and riot.<br>Until one day, finally, all was quiet.<br>From the ashes rose a new order, corporatocracy was its name.<br>Rome, Mongol, Byzantine, all of history is just the same.<br>For man will never change in a fundamental way.<br>And now democracy is dead, in the USA.",i[t]=new n.a(e,t,a),e="Figures Show Rising Crime Rates in Sector-12",t=r.a.Sector12Crime,a="A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in Sector-12. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.<br><br>CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.",i[t]=new n.a(e,t,a),e="Man and the Machine",t=r.a.ManAndMachine,a="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?<br><br>The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",i[t]=new n.a(e,t,a),e="Secret Societies",t=r.a.SecretSocieties,a="The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.<br><br>However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.<br><br>Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious Bitrunners, whose purpose still remains unknown.",i[t]=new n.a(e,t,a),e="Space: The Failed Frontier",t=r.a.TheFailedFrontier,a="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.<br><br>But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.<br><br>And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",i[t]=new n.a(e,t,a),e="Coded Intelligence: Myth or Reality?",t=r.a.CodedIntelligence,a="Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.<br><br>We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.<br><br>Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'",i[t]=new n.a(e,t,a),e="Synthetic Muscles",t=r.a.SyntheticMuscles,a="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.<br><br>As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",i[t]=new n.a(e,t,a),e="Tensions rise in global tech race",t=r.a.TensionsInTechRace,a="Have we entered a new Cold War? Is WWIII just beyond the horizon?<br><br>After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, MegaCorp and ECorp have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.",i[t]=new n.a(e,t,a),e="The Cost of Immortality",t=r.a.CostOfImmortality,a="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.<br><br>Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.<br><br>Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",i[t]=new n.a(e,t,a),e="The Hidden World",t=r.a.TheHiddenWorld,a="WAKE UP SHEEPLE<br><br>THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY<br><br>THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!<br><br>Yes, the Illuminati of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.<br><br>OPEN YOUR EYES<br><br>It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.<br><br>THEY ARE ALL AROUND YOU<br><br>After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.",i[t]=new n.a(e,t,a),e="The New God",t=r.a.TheNewGod,a="Everyone has a moment in their life when they wonder about the bigger questions.<br><br>What's the point of all this? What is my purpose?<br><br>Some people dare to think even bigger.<br><br>What will the fate of the human race be?<br><br>We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.<br><br>The Singularity is here. The merging of man and machine. This is where humanity evolves into ",i[t]=new n.a(e,t,a),e="The New Triads",t=r.a.NewTriads,a="The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the Tetrads.<br><br>It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.<br><br>Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.",i[t]=new n.a(e,t,a),e="The Secret War",t=r.a.TheSecretWar,a="",i[t]=new n.a(e,t,a)}()},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(431),r=a(432),i=a(490),o=a(491),s=a(492),l=a(496),c=a(202),u=a(16),m=a(208),h=a(12),p=a(61);function d(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=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.intelligence_exp=0,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.money=new p.a(1e3),this.homeComputer="",this.city=u.a.Sector12,this.location="",this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new c.a,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.currentWorkFactionName="",this.currentWorkFactionDescription="",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.createProgramName="",this.createProgramReqLvl=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_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.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=0,this.corporation=0,this.bladeburner=0,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.resleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.firstFacInvRecvd=!1,this.firstAugPurchased=!1,this.firstTimeTraveled=!1,this.firstProgramAvailable=!1,this.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.a,this.moneySourceB=new m.a,this.scriptProdSinceLastAug=0,this.exploits=[]}Object.assign(d.prototype,s,l,r,i,o,n),d.prototype.toJSON=function(){return Object(h.b)("PlayerObject",this)},d.fromJSON=function(e){return Object(h.a)(d,e.data)},h.c.constructors.PlayerObject=d},function(e,t,a){"use strict";a.r(t),a.d(t,"hasAugmentation",(function(){return r}));var n=a(21);function r(e){const t=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessBladeburner",(function(){return i})),a.d(t,"inBladeburner",(function(){return o})),a.d(t,"startBladeburner",(function(){return s}));var n=a(113),r=a(43);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 O}));var n=a(17),r=a(6);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},f={},g={},y={},_={},b={},E={},v={},k={},C={};n.j.forEach(e=>{i[e]=!0,c[e]=!0}),n.d.forEach(e=>{o[e]=!0,c[e]=!0}),n.f.forEach(e=>{s[e]=!0,c[e]=!0}),c[n.i[0]]=!0,l[n.i[0]]=!0,n.b.forEach(e=>{u[e]=!0}),n.h.forEach(e=>{h[e]=!0}),n.a.forEach(e=>{m[e]=!0}),n.k.forEach(e=>{p[e]=!0}),n.c.forEach(e=>{d[e]=!0});for(let e=0;e<n.j.length;++e){const t=n.j[e];e<=5&&(f[t]=!0),e<=3&&(g[t]=!0)}for(let e=0;e<n.b.length;++e){const t=n.b[e];e<=3&&(y[t]=!0)}_[n.e[0]]=!0,b[n.e[1]]=!0,E[n.g[0]]=!0,v[n.g[1]]=!0,k[n.b[3]]=!0,C[n.b[5]]=!0;const O=[{name:r.a.AevumECorp,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:r.a.Sector12MegaCorp,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:3,salaryMultiplier:3,jobStatReqOffset:249},{name:r.a.AevumBachmanAndAssociates,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.6,salaryMultiplier:2.6,jobStatReqOffset:224},{name:r.a.Sector12BladeIndustries,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:224},{name:r.a.VolhavenNWO,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.75,salaryMultiplier:2.75,jobStatReqOffset:249},{name:r.a.AevumClarkeIncorporated,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:r.a.VolhavenOmniTekIncorporated,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.25,salaryMultiplier:2.25,jobStatReqOffset:224},{name:r.a.Sector12FourSigma,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.5,salaryMultiplier:2.5,jobStatReqOffset:224},{name:r.a.ChongqingKuaiGongInternational,info:"",companyPositions:Object.assign({},c,u,h),expMultiplier:2.2,salaryMultiplier:2.2,jobStatReqOffset:224},{name:r.a.AevumFulcrumTechnologies,info:"",companyPositions:Object.assign({},c,u),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:224},{name:r.a.IshimaStormTechnologies,info:"",companyPositions:Object.assign({},c,p,u),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:r.a.NewTokyoDefComm,info:"",companyPositions:Object.assign({},C,c,p),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:r.a.VolhavenHeliosLabs,info:"",companyPositions:Object.assign({},C,c,p),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:r.a.NewTokyoVitaLife,info:"",companyPositions:Object.assign({},c,u,p),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:199},{name:r.a.Sector12IcarusMicrosystems,info:"",companyPositions:Object.assign({},c,u,p),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:r.a.Sector12UniversalEnergy,info:"",companyPositions:Object.assign({},c,u,p),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:199},{name:r.a.AevumGalacticCybersystems,info:"",companyPositions:Object.assign({},c,u,p),expMultiplier:1.9,salaryMultiplier:1.9,jobStatReqOffset:199},{name:r.a.AevumAeroCorp,info:"",companyPositions:Object.assign({},C,k,c,h),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:r.a.VolhavenOmniaCybersystems,info:"",companyPositions:Object.assign({},C,k,c,h),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:r.a.ChongqingSolarisSpaceSystems,info:"",companyPositions:Object.assign({},C,k,c,h),expMultiplier:1.7,salaryMultiplier:1.7,jobStatReqOffset:199},{name:r.a.Sector12DeltaOne,info:"",companyPositions:Object.assign({},C,k,c,h),expMultiplier:1.6,salaryMultiplier:1.6,jobStatReqOffset:199},{name:r.a.NewTokyoGlobalPharmaceuticals,info:"",companyPositions:Object.assign({},c,u,p,h),expMultiplier:1.8,salaryMultiplier:1.8,jobStatReqOffset:224},{name:r.a.IshimaNovaMedical,info:"",companyPositions:Object.assign({},c,u,p,h),expMultiplier:1.75,salaryMultiplier:1.75,jobStatReqOffset:199},{name:r.a.Sector12CIA,info:"",companyPositions:Object.assign({},f,s,l,o,h,m),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:r.a.Sector12NSA,info:"",companyPositions:Object.assign({},f,s,l,o,h,m),expMultiplier:2,salaryMultiplier:2,jobStatReqOffset:149},{name:r.a.AevumWatchdogSecurity,info:"",companyPositions:Object.assign({},f,s,o,h,m,p),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:124},{name:r.a.VolhavenLexoCorp,info:"",companyPositions:Object.assign({},c,p,u,h),expMultiplier:1.4,salaryMultiplier:1.4,jobStatReqOffset:99},{name:r.a.AevumRhoConstruction,info:"",companyPositions:Object.assign({},g,y),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:49},{name:r.a.Sector12AlphaEnterprises,info:"",companyPositions:Object.assign({},g,y,p),expMultiplier:1.5,salaryMultiplier:1.5,jobStatReqOffset:99},{name:r.a.AevumPolice,info:"",companyPositions:Object.assign({},h,g),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:99},{name:r.a.VolhavenSysCoreSecurities,info:"",companyPositions:Object.assign({},c),expMultiplier:1.3,salaryMultiplier:1.3,jobStatReqOffset:124},{name:r.a.VolhavenCompuTek,info:"",companyPositions:Object.assign({},c),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:r.a.AevumNetLinkTechnologies,info:"",companyPositions:Object.assign({},c),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:99},{name:r.a.Sector12CarmichaelSecurity,info:"",companyPositions:Object.assign({},c,p,m,h),expMultiplier:1.2,salaryMultiplier:1.2,jobStatReqOffset:74},{name:r.a.Sector12FoodNStuff,info:"",companyPositions:Object.assign({},b,v),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:r.a.Sector12JoesGuns,info:"",companyPositions:Object.assign({},b,v),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0},{name:r.a.IshimaOmegaSoftware,info:"",companyPositions:Object.assign({},i,p,o),expMultiplier:1.1,salaryMultiplier:1.1,jobStatReqOffset:49},{name:r.a.NewTokyoNoodleBar,info:"",companyPositions:Object.assign({},_,E),expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0}]},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={name:"",cost:0,desc:""}){n(this,"name",""),n(this,"cost",0),n(this,"desc",""),n(this,"advertisingMult",1),n(this,"employeeChaMult",1),n(this,"employeeCreMult",1),n(this,"employeeEffMult",1),n(this,"employeeIntMult",1),n(this,"productionMult",1),n(this,"productProductionMult",1),n(this,"salesMult",1),n(this,"sciResearchMult",1),n(this,"storageMult",1),this.name=e.name,this.cost=e.cost,this.desc=e.desc,e.advertisingMult&&(this.advertisingMult=e.advertisingMult),e.employeeChaMult&&(this.employeeChaMult=e.employeeChaMult),e.employeeCreMult&&(this.employeeCreMult=e.employeeCreMult),e.employeeEffMult&&(this.employeeEffMult=e.employeeEffMult),e.employeeIntMult&&(this.employeeIntMult=e.employeeIntMult),e.productionMult&&(this.productionMult=e.productionMult),e.productProductionMult&&(this.productProductionMult=e.productProductionMult),e.salesMult&&(this.salesMult=e.salesMult),e.sciResearchMult&&(this.sciResearchMult=e.sciResearchMult),e.storageMult&&(this.storageMult=e.storageMult)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=[{name:"AutoBrew",cost:12e3,desc:"Automatically keep your employees fully caffeinated with coffee injections. This research will keep the energy of all employees at its maximum possible value, for no cost. This will also disable the Coffee upgrade."},{name:"AutoPartyManager",cost:15e3,desc:"Automatically analyzes your employees' happiness and morale and boosts them whenever it detects a decrease. This research will keep the morale and happiness of all employees at their maximum possible values, for no cost. This will also disable the 'Throw Party' feature."},{name:"Automatic Drug Administration",cost:1e4,desc:"Research how to automatically administer performance-enhacing drugs to all of your employees. This unlocks Drug-related Research."},{name:"Bulk Purchasing",cost:5e3,desc:"Research the art of buying materials in bulk. This allows you to purchase any amount of a material instantly."},{name:"CPH4 Injections",cost:25e3,desc:"Develop an advanced and harmless synthetic drug that is administered to employees to increase all of their stats, except experience, by 10%.",employeeCreMult:1.1,employeeChaMult:1.1,employeeEffMult:1.1,employeeIntMult:1.1},{name:"Drones",cost:5e3,desc:"Acquire the knowledge needed to create advanced drones. This research does nothing by itself, but unlocks other Drone-related research."},{name:"Drones - Assembly",cost:25e3,desc:"Manufacture and use Assembly Drones to improve the efficiency of your production lines. This increases all production by 20%.",productionMult:1.2},{name:"Drones - Transport",cost:3e4,desc:"Manufacture and use intelligent Transport Drones to optimize your warehouses. This increases the storage space of all warehouses by 50%.",storageMult:1.5},{name:"Go-Juice",cost:25e3,desc:"Provide employees with Go-Juice, a coffee-derivative that further enhances the brain's dopamine production. This increases the maximum energy of all employees by 10."},{name:"Hi-Tech R&D Laboratory",cost:5e3,desc:"Construct a cutting edge facility dedicated to advanced research and and development. This allows you to spend Scientific Research on powerful upgrades. It also globally increases Scientific Research production by 10%.",sciResearchMult:1.1},{name:"HRBuddy-Recruitment",cost:15e3,desc:"Use automated software to handle the hiring of employees. With this research, each office will automatically hire one employee per market cycle if there is available space."},{name:"HRBuddy-Training",cost:2e4,desc:"Use automated software to handle the training of employees. With this research, each employee hired with HRBuddy-Recruitment will automatically be assigned to 'Training', rather than being unassigned."},{name:"JoyWire",cost:2e4,desc:"A brain implant which is installed in employees, increasing their maximum happiness by 10."},{name:"Market-TA.I",cost:2e4,desc:"Develop advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know what price to sell your Materials/Products at in order to avoid losing sales due to having too high of a mark-up. It also lets you automatically use that sale price."},{name:"Market-TA.II",cost:5e4,desc:"Develop double-advanced AI software that uses technical analysis to help you understand and exploit the market. This research allows you to know how many sales of a Material/Product you lose or gain from having too high or too low or a sale price. It also lets you automatically set the sale price of your Materials/Products at the optimal price such that the amount sold matches the amount produced."},{name:"Overclock",cost:15e3,desc:"Equip employees with a headset that uses transcranial direct current stimulation (tDCS) to increase the speed of their neurotransmitters. This research increases the intelligence and efficiency of all employees by 25%.",employeeEffMult:1.25,employeeIntMult:1.25},{name:"Self-Correcting Assemblers",cost:25e3,desc:"Create assemblers that can be used for universal production. These assemblers use deep learning to improve their efficiency at their tasks. This research increases all production by 10%",productionMult:1.1},{name:"Sti.mu",cost:3e4,desc:"Upgrade the tDCS headset to stimulate regions of the brain that control confidence and enthusiasm. This research increases the max morale of all employees by 10."},{name:"sudo.Assist",cost:15e3,desc:"Develop a virtual assistant AI to handle and manage administrative issues for your corporation."},{name:"uPgrade: Capacity.I",cost:2e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 3 to 4)."},{name:"uPgrade: Capacity.II",cost:3e4,desc:"Expand the industry's capacity for designing and manufacturing its various products. This increases the industry's maximum number of products by 1 (from 4 to 5)."},{name:"uPgrade: Dashboard",cost:5e3,desc:"Improve the software used to manage the industry's production line for its various products. This allows you to manage the production and sale of a product before it's finished being designed."},{name:"uPgrade: Fulcrum",cost:1e4,desc:"Streamline the manufacturing of this industry's various products. This research increases the production of your products by 5%",productProductionMult:1.05}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t){var a,n,r;r="",(n="name")in(a=this)?Object.defineProperty(a,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[n]=r,this.name=e,this.create=t}htmlID(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(4);function r(e){return function(t){return t.hacking_skill>=e}}const i=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:r(1),time:n.a.MillisecondsPerFiveMinutes}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:r(50),time:2*n.a.MillisecondsPerFiveMinutes}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:r(100),time:n.a.MillisecondsPerHalfHour}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:r(250),time:n.a.MillisecondsPer2Hours}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:r(500),time:n.a.MillisecondsPer4Hours}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:r(750),time:n.a.MillisecondsPer8Hours}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:r(75),time:n.a.MillisecondsPerQuarterHour}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:r(400),time:n.a.MillisecondsPer2Hours}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:r(75),time:n.a.MillisecondsPerHalfHour}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:r(25),time:n.a.MillisecondsPerQuarterHour}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:n.a.MillisecondsPerFiveMinutes/20}},{key:"Flight",name:"fl1ght.exe",create:null}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(439),i=a(442),o=a(447),s=a(210),l=a(4),c=a(5),u=a(207),m=a(43),h=a(48);const p=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];class d extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1,purchasingAugs:!!e.initiallyOnAugmentationsPage&&e.initiallyOnAugmentationsPage},this.manageGang=this.manageGang.bind(this),this.rerender=this.rerender.bind(this),this.routeToMain=this.routeToMain.bind(this),this.routeToPurchaseAugs=this.routeToPurchaseAugs.bind(this),this.sleevePurchases=this.sleevePurchases.bind(this),this.startFieldWork=this.startFieldWork.bind(this),this.startHackingContracts=this.startHackingContracts.bind(this),this.startHackingMission=this.startHackingMission.bind(this),this.startSecurityWork=this.startSecurityWork.bind(this)}manageGang(){if(this.props.p.inGang())return this.props.engine.loadGangContent();const e=this.props.faction.name;let t=!1;"NiteSec"!==e&&"The Black Hand"!==e||(t=!0);const a=Object(h.d)(),n=Object(h.c)();if(null==a||null==n)return;a.innerHTML="Create Gang",a.addEventListener("click",()=>{this.props.p.startGang(e,t);const a=document.getElementById("world-menu-header");a instanceof HTMLElement&&(a.click(),a.click()),this.props.engine.loadGangContent(),Object(h.a)()}),n.innerHTML="Cancel",n.addEventListener("click",()=>{Object(h.a)()});let r="";r=t?"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare is not as important.<br><br>":"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. Compared to hacking gangs, progression with combat gangs can be more difficult as territory management is more important. However, well-managed combat gangs can progress faster than hacking ones.<br><br>",Object(h.b)(`Would you like to create a new Gang with ${e}?<br><br>Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.<br><br>`+r+"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.")}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}routeToMain(){this.setState({purchasingAugs:!1})}routeToPurchaseAugs(){this.setState({purchasingAugs:!0})}sleevePurchases(){Object(u.d)(this.props.p)}startFieldWork(){this.props.p.startFactionFieldWork(this.props.faction)}startHackingContracts(){this.props.p.startFactionHackWork(this.props.faction)}startHackingMission(){const e=this.props.faction;this.props.p.singularityStopWork(),this.props.engine.loadMissionContent(),this.props.startHackingMissionFn(e)}startSecurityWork(){this.props.p.startFactionSecurityWork(this.props.faction)}render(){return this.state.purchasingAugs?this.renderAugmentationsPage():this.renderMainPage()}renderMainPage(){const e=this.props.p,t=this.props.faction,a=t.getInfo(),r=e.inGang()&&e.getGangName()===t.name,u=Math.floor(l.a.BaseFavorToDonate*c.a.RepToDonateToFaction),h=t.favor>=u,d="The Covenant"===t.name&&e.bitNodeN>=10&&m.a[10];let f=e.canAccessGang()&&p.includes(t.name);return e.inGang()&&(e.getGangName()!==t.name?f=!1:e.getGangName()===t.name&&(f=!0)),n.createElement("div",{id:"faction-container"},n.createElement("h1",null,t.name),n.createElement(o.a,{faction:t,factionInfo:a}),f&&n.createElement(s.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:this.manageGang}),!r&&a.offerHackingMission&&n.createElement(s.a,{buttonText:"Hacking Mission",infoText:"Attempt a hacking mission for your faction. A mission is a mini game that, if won, earns you significant reputation with this faction. (Recommended hacking level: 200+)",onClick:this.startHackingMission}),!r&&a.offerHackingWork&&n.createElement(s.a,{buttonText:"Hacking Contracts",infoText:"Complete hacking contracts for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your hacking skill. You will gain hacking exp.",onClick:this.startHackingContracts}),!r&&a.offerFieldWork&&n.createElement(s.a,{buttonText:"Field Work",infoText:"Carry out field missions for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on all of your stats. You will gain exp for all stats.",onClick:this.startFieldWork}),!r&&a.offerSecurityWork&&n.createElement(s.a,{buttonText:"Security Work",infoText:"Serve in a security detail for your faction. Your effectiveness, which determines how much reputation you gain for this faction, is based on your combat stats. You will gain exp for all combat stats.",onClick:this.startSecurityWork}),!r&&a.offersWork()&&n.createElement(i.a,{faction:this.props.faction,p:this.props.p,rerender:this.rerender,favorToDonate:u,disabled:!h}),n.createElement(s.a,{buttonText:"Purchase Augmentations",infoText:"As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",onClick:this.routeToPurchaseAugs}),d&&n.createElement(s.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:this.sleevePurchases}))}renderAugmentationsPage(){return n.createElement("div",{id:"faction-container"},n.createElement(r.a,{faction:this.props.faction,p:this.props.p,routeToMainPage:this.routeToMain}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(440),i=a(15),o=a(3),s=a(105),l=a(27),c=a(19);const u={width:"70%"};class m extends n.Component{constructor(e){super(e),this.isPlayersGang=e.p.inGang()&&e.p.getGangName()===e.faction.name,this.state={rerenderFlag:!1,sortOrder:s.b.Default},this.rerender=this.rerender.bind(this)}getAugs(){if(this.isPlayersGang){const e=[];for(const t in i.a){i.a[t].isSpecial||e.push(t)}return e}return this.props.faction.augmentations.slice()}getAugsSorted(){switch(l.a.PurchaseAugmentationsOrder){case s.b.Cost:return this.getAugsSortedByCost();case s.b.Reputation:return this.getAugsSortedByReputation();default:return this.getAugsSortedByDefault()}}getAugsSortedByCost(){const e=this.getAugs();return e.sort((e,t)=>{const a=i.a[e],n=i.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),e}getAugsSortedByReputation(){const e=this.getAugs();return e.sort((e,t)=>{const a=i.a[e],n=i.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement}),e}getAugsSortedByDefault(){return this.getAugs()}switchSortOrder(e){l.a.PurchaseAugmentationsOrder=e,this.rerender()}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=this.getAugsSorted(),t=e.filter(e=>e===o.a.NeuroFluxGovernor||!this.props.p.augmentations.some(t=>t.name===e)&&!this.props.p.queuedAugmentations.some(t=>t.name===e)),a=e=>n.createElement(r.a,{augName:e,faction:this.props.faction,key:e,p:this.props.p,rerender:this.rerender}),i=t.map(e=>a(e));let l=n.createElement(n.Fragment,null);const m=e.filter(e=>!t.includes(e));return 0!==m.length&&(l=n.createElement(n.Fragment,null,n.createElement("br",null),n.createElement("h2",null,"Purchased Augmentations"),n.createElement("p",{style:u},"This factions also offers these augmentations but you already own them."),m.map(e=>a(e)))),n.createElement("div",null,n.createElement(c.a,{onClick:this.props.routeToMainPage,text:"Back"}),n.createElement("h1",null,"Faction Augmentations"),n.createElement("p",{style:u},"These are all of the Augmentations that are available to purchase from ",this.props.faction.name,". Augmentations are powerful upgrades that will enhance your abilities."),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Cost),text:"Sort by Cost"}),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Reputation),text:"Sort by Reputation"}),n.createElement(c.a,{onClick:()=>this.switchSortOrder(s.b.Default),text:"Sort by Default Order"}),n.createElement("br",null),i,l)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(70),i=a(15),o=a(3),s=a(27),l=a(10),c=a(62),u=a(19),m=a(441);const h={margin:"4px",padding:"4px"},p={display:"inline-block"};class d extends n.Component{constructor(e){super(e);const t=i.a[this.props.augName];if(null==t)throw new Error(`aug ${this.props.augName} does not exists`);this.aug=t,this.handleClick=this.handleClick.bind(this)}getMoneyCost(){return this.aug.baseCost*this.props.faction.getInfo().augmentationPriceMult}getRepCost(){return this.aug.baseRepRequirement*this.props.faction.getInfo().augmentationRepRequirementMult}handleClick(){s.a.SuppressBuyAugmentationConfirmation?Object(r.f)(this.aug,this.props.faction):Object(r.g)(this.aug,this.props.faction)}hasPrereqs(){return Object(r.c)(this.aug)}hasReputation(){return this.props.faction.playerReputation>=this.getRepCost()}owned(){let e=!1;for(const t of this.props.p.queuedAugmentations)if(t.name===this.props.augName){e=!0;break}for(const t of this.props.p.augmentations)if(t.name===this.props.augName){e=!0;break}return e}render(){if(null==this.aug)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+this.props.augName),null;const e=this.getMoneyCost(),t=this.getRepCost();let a=!1,i=n.createElement(n.Fragment,null),s="";this.hasPrereqs()?this.aug.name!==o.a.NeuroFluxGovernor&&(this.aug.owned||this.owned())?a=!0:this.hasReputation()?i=n.createElement(n.Fragment,null,"UNLOCKED (at ",Object(c.a)(t)," faction reputation) - ",n.createElement(l.a,{money:e,player:this.props.p})):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",Object(c.a)(t)," faction reputation - ",n.createElement(l.a,{money:e,player:this.props.p}),")"),s="red"):(a=!0,i=n.createElement(n.Fragment,null,"LOCKED (Requires ",this.aug.prereqs.map(e=>Object(m.a)(e))," as prerequisite)"),s="red");const d={display:"inline-block"};""!==s&&(d.color=s);let f=this.aug.name;this.aug.name===o.a.NeuroFluxGovernor&&(f+=" - Level "+Object(r.b)());let g=n.createElement(n.Fragment,null);return g="string"==typeof this.aug.info?n.createElement(n.Fragment,null,n.createElement("span",{dangerouslySetInnerHTML:{__html:this.aug.info}}),n.createElement("br",null),n.createElement("br",null),this.aug.stats):n.createElement(n.Fragment,null,this.aug.info,n.createElement("br",null),n.createElement("br",null),this.aug.stats),n.createElement("li",null,n.createElement("span",{style:h},n.createElement(u.a,{disabled:a,onClick:this.handleClick,style:p,text:f,tooltip:g}),n.createElement("p",{style:d},i)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){return n.createElement("span",{className:"samefont",style:{color:"white"}},e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(4),o=a(353),s=a(10),l=a(62),c=a(19),u=a(2),m=a(8),h=a(143);const p={margin:"5px",height:"26px"};function d(e){const[t,a]=Object(n.useState)(null),d=(i.a.DonateMoneyToRepDivisor+"").length-1;function f(){return null!==t&&(!(isNaN(t)||t<=0)&&!e.p.money.lt(t))}return r.a.createElement("div",{className:"faction-work-div"},r.a.createElement("div",{className:"faction-work-div-wrapper"},r.a.createElement("input",{className:"text-input",onChange:function(e){const t=u.a.parseMoney(e.target.value);""===e.target.value||isNaN(t)?a(null):a(t)},placeholder:"Donation amount",style:p,disabled:e.disabled}),r.a.createElement(c.a,{onClick:function(){const a=e.faction,n=t;if(null===n)return;if(!f())return;e.p.loseMoney(n);const i=Object(o.a)(n,e.p);e.faction.playerReputation+=i,Object(m.a)(r.a.createElement(r.a.Fragment,null,"You just donated ",r.a.createElement(s.a,{money:n})," to ",a.name," to gain ",Object(l.a)(i)," reputation.")),e.rerender()},text:"Donate Money",disabled:e.disabled||!f()}),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):f()?r.a.createElement("p",null,"This donation will result in ",Object(l.a)(Object(o.a)(t,e.p))," reputation gain"):e.p.money.lt(t)?r.a.createElement("p",null,"Insufficient funds"):r.a.createElement("p",null,"Invalid donate amount entered!")}),null),e.disabled?r.a.createElement("p",null,"Unlocked at ",e.favorToDonate," favor with ",e.faction.name):r.a.createElement("div",{className:"text"},r.a.createElement(h.a,{tex:String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${d}}}`}))))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(448),i=a(449),o=a(62),s=a(244),l=a(143);const c={display:"block"},u={display:"block",width:"70%"};class m extends n.Component{constructor(e){super(e),this.getFavorGainContent=this.getFavorGainContent.bind(this),this.getReputationContent=this.getReputationContent.bind(this)}getFavorGainContent(){const e=this.props.faction.getFavorGain()[0];return n.createElement(n.Fragment,null,"You will have ",Object(s.a)(this.props.faction.favor+e)," faction favor after installing an Augmentation.",n.createElement(l.a,{tex:String.raw`\large{r = \text{total faction reputation}}`}),n.createElement(l.a,{tex:String.raw`\large{favor=\left\lfloor\log_{1.02}\left(\frac{r+25000}{25500}\right)\right\rfloor}`}))}getReputationContent(){return n.createElement(n.Fragment,null,"Reputation: ",Object(o.a)(this.props.faction.playerReputation))}render(){const e=n.createElement(n.Fragment,null,"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.",n.createElement(l.a,{tex:String.raw`\large{r = reputation}`}),n.createElement(l.a,{tex:String.raw`\large{\Delta r = \Delta r \times \frac{100+favor}{100}}`})),t={__html:this.props.factionInfo.infoText};return n.createElement("div",null,n.createElement("pre",null,n.createElement("i",{className:"text",dangerouslySetInnerHTML:t})),n.createElement("p",{style:c},"-------------------------"),n.createElement(r.a,{intervalTime:5e3,getContent:this.getReputationContent,getTooltip:this.getFavorGainContent}),n.createElement("p",{style:c},"-------------------------"),n.createElement(i.a,{content:n.createElement(n.Fragment,null,"Faction Favor: ",Object(s.a)(this.props.faction.favor)),tooltip:e}),n.createElement("p",{style:c},"-------------------------"),n.createElement("p",{style:u},"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities."))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{constructor(e){var t,a,n;super(e),n=0,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={i:0}}componentDidMount(){const e=this.props.intervalTime?this.props.intervalTime:1e3;this.interval=window.setInterval(()=>this.tick(),e)}componentWillUnmount(){clearInterval(this.interval)}tick(){this.setState(e=>({i:e.i+1}))}hasTooltip(){return null==this.props.getTooltip||!!this.props.getTooltip()}tooltip(){return this.props.getTooltip?this.props.getTooltip():n.createElement(n.Fragment,null)}render(){return n.createElement("div",{className:"tooltip",style:this.props.style},n.createElement("p",null,this.props.getContent()),this.hasTooltip()&&n.createElement("span",{className:"tooltiptext"},this.tooltip()))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);class r extends n.Component{render(){return n.createElement("div",{className:"tooltip",style:this.props.style},n.createElement("p",null,this.props.content),n.createElement("span",{className:"tooltiptext"},this.props.tooltip))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(451),o=a(175),s=a(207),l=a(454),c=a(19),u=a(10),m=a(8);function h(){return(h=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)}function p(e){const[t,a]=Object(n.useState)(0);function p(){return(e.p.sleevesFromCovenant+1)*s.a}function d(){a(t+1)}let f=!1;e.p.canAfford(p())||(f=!0),e.p.sleevesFromCovenant>=s.b&&(f=!0);const g=[];for(let t=0;t<e.p.sleeves.length;++t){const a=e.p.sleeves[t];g.push(r.a.createElement(i.a,h({},e,{sleeve:a,index:t,rerender:d,key:t})))}return r.a.createElement("div",null,r.a.createElement(l.a,{popup:s.c,text:"Close"}),r.a.createElement("p",null,"Would you like to purchase an additional Duplicate Sleeve from The Covenant for"," ",r.a.createElement(u.a,{money:p(),player:e.p}),"?"),r.a.createElement("br",null),r.a.createElement("p",null,"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of"," ",s.b," from The Covenant."),r.a.createElement(c.a,{disabled:f,onClick:function(){e.p.sleevesFromCovenant>=s.b||(e.p.canAfford(p())?(e.p.loseMoney(p()),e.p.sleevesFromCovenant+=1,e.p.sleeves.push(new o.a(e.p)),d()):Object(m.a)("You cannot afford to purchase a Duplicate Sleeve",!1))},text:"Purchase"}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes."),g)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(452);class i extends n.Component{render(){return n.createElement("div",{className:"bladeburner-action"},n.createElement("h1",null,"Duplicate Sleeve ",this.props.index),n.createElement(r.a,this.props))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(2),i=a(19),o=a(10);class s extends n.Component{constructor(e){super(e),this.state={amt:1},this.changePurchaseAmount=this.changePurchaseAmount.bind(this),this.purchaseMemory=this.purchaseMemory.bind(this)}changePurchaseAmount(e){let t=parseInt(e.target.value);isNaN(t)&&(t=1);const a=100-this.props.sleeve.memory;t>a&&(t=a),this.setState({amt:t})}getPurchaseCost(){if(isNaN(this.state.amt))return 1/0;const e=100-this.props.sleeve.memory;return this.state.amt>e?1/0:this.props.sleeve.getMemoryUpgradeCost(this.state.amt)}purchaseMemory(){const e=this.getPurchaseCost();this.props.p.canAfford(e)&&(this.props.sleeve.upgradeMemory(this.state.amt),this.props.p.loseMoney(e),this.props.rerender())}render(){const e=`sleeve-${this.props.index}-memory-upgrade-input`,t=100-this.props.sleeve.memory,a=this.getPurchaseCost(),s=!this.props.p.canAfford(a);let l;return l=isNaN(this.state.amt)?n.createElement(n.Fragment,null,"Invalid value"):this.state.amt>t?n.createElement(n.Fragment,null,"Memory cannot exceed 100?"):n.createElement(n.Fragment,null,"Purchase ",this.state.amt," memory - ",n.createElement(o.a,{money:a,player:this.props.p}),"?"),n.createElement("div",null,n.createElement("h2",null,n.createElement("u",null,"Upgrade Memory")),n.createElement("p",null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",r.a.formatSleeveMemory(this.props.sleeve.memory),")"),n.createElement("label",{htmlFor:e},"Amount of memory to purchase (must be an integer):"),n.createElement("input",{className:"text-input",id:e,onChange:this.changePurchaseAmount,type:"number",value:this.state.amt}),n.createElement("br",null),n.createElement(i.a,{disabled:s,onClick:this.purchaseMemory,text:l}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(17);const r=[{name:n.j[0],nextPosition:n.j[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:n.j[1],nextPosition:n.j[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.j[2],nextPosition:n.j[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:n.j[3],nextPosition:n.j[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:n.j[4],nextPosition:n.j[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:n.j[5],nextPosition:n.j[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:n.j[6],nextPosition:n.j[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:n.j[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:n.d[0],nextPosition:n.d[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:n.d[1],nextPosition:n.d[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:n.d[2],nextPosition:n.d[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:n.d[3],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:n.i[0],nextPosition:n.j[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[0],nextPosition:n.f[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[1],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:n.b[0],nextPosition:n.b[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:n.b[1],nextPosition:n.b[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:n.b[2],nextPosition:n.b[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:n.b[3],nextPosition:n.b[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:n.b[4],nextPosition:n.b[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:n.b[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:n.h[0],nextPosition:n.h[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:n.h[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[2],nextPosition:n.h[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:n.h[3],nextPosition:n.h[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.h[4],nextPosition:n.h[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:n.a[0],nextPosition:n.a[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:n.a[1],nextPosition:n.a[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:n.a[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:n.e[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:n.e[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:n.k[0],nextPosition:n.k[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:n.k[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:n.c[0],nextPosition:n.c[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:n.c[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:n.g[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:n.g[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(34),i=a(186),o=a(455);class s extends o.a{constructor(e){super(e),this.closePopup=this.closePopup.bind(this)}closePopup(){let e;this.props.onClose&&this.props.onClose(),e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup,e instanceof HTMLElement&&(r.unmountComponentAtNode(e),Object(i.a)(e))}render(){const e=this.props.class?this.props.class:"std-button";return n.createElement("button",{className:e,onClick:this.closePopup,style:this.props.style},this.props.text)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(34),i=a(56),o=a(186);class s extends n.Component{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.keyListener=this.keyListener.bind(this)}componentDidMount(){document.addEventListener("keydown",this.keyListener)}componentWillUnmount(){document.removeEventListener("keydown",this.keyListener)}handleClick(){let e;this.props.onClose&&this.props.onClose(),e="string"==typeof this.props.popup?document.getElementById(this.props.popup):this.props.popup,e instanceof HTMLElement&&(r.unmountComponentAtNode(e),Object(o.a)(e))}keyListener(e){e.keyCode===i.a.ESC&&this.handleClick()}render(){const e=this.props.class?this.props.class:"std-button";return n.createElement("button",{className:e,onClick:this.handleClick,style:this.props.style},this.props.text)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(70),r=a(26),i=a(1),o=a(68),s=a(31);function l(){document.getElementById("faction-invitation-box-container").style.display="none"}function c(e){var t;t="You have received a faction invitation from "+e.name,document.getElementById("faction-invitation-box-text").innerHTML=t,e.alreadyInvited=!0,i.a.factionInvitations.push(e.name),s.b.isOn(s.a.Factions)&&r.Engine.loadFactionsContent(),Object(o.a)("faction-invitation-box-yes").addEventListener("click",(function(){return-1===i.a.factionInvitations.findIndex(t=>t===e.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(n.d)(e),l(),s.b.isOn(s.a.Factions)&&r.Engine.loadFactionsContent(),!1})),Object(o.a)("faction-invitation-box-no").addEventListener("click",(function(){return l(),!1})),document.getElementById("faction-invitation-box-container").style.display="flex"}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(14);function r(e){let t=e;return t.startsWith("[")&&(t=t.slice(1)),t.endsWith("]")&&(t=t.slice(0,-1)),t}function i(e){let t=e;return(t.startsWith('"')||t.startsWith("'"))&&(t=t.slice(1)),(t.endsWith('"')||t.endsWith("'"))&&(t=t.slice(0,-1)),t}function o(e){const t=[];return e.forEach(e=>{let a=e.toString();a=["[",a,"]"].join(""),t.push(a)}),t.join(",").replace(/\s/g,"")}const s=[{desc:e=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${e}?`].join(" "),difficulty:1,gen:()=>Object(n.a)(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(e,t)=>{let a=2,n=e;for(;n>(a-1)*(a-1);){for(;n%a==0;)n=Math.round(n/a);++a}return(1===n?a-1:n)===parseInt(t,10)}},{desc:e=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",""+e.toString()].join(" "),difficulty:1,gen:()=>{const e=Object(n.a)(5,40),t=[];t.length=e;for(let a=0;a<e;++a)t[a]=Object(n.a)(-10,10);return t},name:"Subarray with Maximum Sum",numTries:10,solver:(e,t)=>{const a=e.slice();for(let e=1;e<a.length;e++)a[e]=Math.max(a[e],a[e]+a[e-1]);return parseInt(t,10)===Math.max(...a)}},{desc:e=>["It is possible write four as a sum in exactly four different ways:\n\n","&nbsp;&nbsp;&nbsp;&nbsp;3 + 1\n","&nbsp;&nbsp;&nbsp;&nbsp;2 + 2\n","&nbsp;&nbsp;&nbsp;&nbsp;2 + 1 + 1\n","&nbsp;&nbsp;&nbsp;&nbsp;1 + 1 + 1 + 1\n\n",`How many different ways can the number ${e} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>Object(n.a)(8,100),name:"Total Ways to Sum",numTries:10,solver:(e,t)=>{const a=[1];a.length=e+1,a.fill(0,1);for(let t=1;t<e;++t)for(let n=t;n<=e;++n)a[n]+=a[n-t];return a[e]===parseInt(t,10)}},{desc:e=>{let t=["Given the following array of array of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");return t+="&nbsp;&nbsp;&nbsp;&nbsp;[\n",t+=e.map(e=>"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["+e.map(e=>(""+e).padStart(2," ")).join(",")+"]").join("\n"),t+="\n&nbsp;&nbsp;&nbsp;&nbsp;]\n",t+=["\nHere is an example of what spiral order should be:\n\n","&nbsp;&nbsp;&nbsp;&nbsp;[\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[1, 2, 3]\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[4, 5, 6]\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[7, 8, 9]\n","&nbsp;&nbsp;&nbsp;&nbsp;]\n\n","Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n\n","&nbsp;&nbsp;&nbsp;&nbsp;[\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[1,&nbsp;&nbsp;2,&nbsp;&nbsp;3,&nbsp;&nbsp;4]\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[5,&nbsp;&nbsp;6,&nbsp;&nbsp;7,&nbsp;&nbsp;8]\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[9,&nbsp;10,&nbsp;11,&nbsp;12]\n","&nbsp;&nbsp;&nbsp;&nbsp;]\n\n","Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]"].join(" "),t},difficulty:2,gen:()=>{const e=Object(n.a)(1,15),t=Object(n.a)(1,15),a=[];a.length=e;for(let n=0;n<e;++n)a[n]=[],a[n].length=t;for(let r=0;r<e;++r)for(let e=0;e<t;++e)a[r][e]=Object(n.a)(1,50);return a},name:"Spiralize Matrix",numTries:10,solver:(e,t)=>{const a=[];let n=0,i=e.length-1,o=0,s=e[0].length-1,l=0;for(;;){for(let t=o;t<=s;t++)a[l]=e[n][t],++l;if(++n>i)break;for(let t=n;t<=i;t++)a[l]=e[t][s],++l;if(--s<o)break;for(let t=s;t>=o;t--)a[l]=e[i][t],++l;if(--i<n)break;for(let t=i;t>=n;t--)a[l]=e[t][o],++l;if(++o>s)break}const c=r(t).replace(/\s/g,"").split(",");for(let e=0;e<c.length;++e)c[e]=parseInt(c[e],10);if(a.length!==c.length)return!1;for(let e=0;e<a.length;++e)if(a[e]!==c[e])return!1;return!0}},{desc:e=>["You are given the following array of integers:\n\n",e+"\n\n","Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index exactly.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const e=Object(n.a)(3,25),t=[];t.length=e;for(let e=0;e<t.length;++e)Math.random()<.2?t[e]=0:t[e]=Object(n.a)(0,10);return t},name:"Array Jumping Game",numTries:1,solver:(e,t)=>{const a=e.length;let n=0;for(let t=0;n<a&&n<=t;++n)t=Math.max(n+e[n],t);const r=n===a;return!("1"!==t||!r)||"0"===t&&!r}},{desc:e=>["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(e)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const e=[],t=Object(n.a)(3,20);for(let a=0;a<t;++a){const t=Object(n.a)(1,25),a=t+Object(n.a)(1,10);e.push([t,a])}return e},name:"Merge Overlapping Intervals",numTries:15,solver:(e,t)=>{const a=e.slice();a.sort((e,t)=>e[0]-t[0]);const n=[];let i=a[0][0],s=a[0][1];for(const e of a)e[0]<=s?s=Math.max(s,e[1]):(n.push([i,s]),i=e[0],s=e[1]);n.push([i,s]);const l=o(n),c=t.replace(/\s/g,"");return l===c||l===r(c)}},{desc:e=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",e+"\n\n","Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let e="";for(let t=0;t<4;++t){e+=Object(n.a)(0,255).toString()}return e},name:"Generate IP Addresses",numTries:10,solver:(e,t)=>{const a=[];for(let t=1;t<=3;++t)for(let n=1;n<=3;++n)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(t+n+r+i===e.length){const o=parseInt(e.substring(0,t),10),s=parseInt(e.substring(t,t+n),10),l=parseInt(e.substring(t+n,t+n+r),10),c=parseInt(e.substring(t+n+r,t+n+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const t=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");t.length===e.length+3&&a.push(t)}}const n=r(t).replace(/\s/g,"").split(",");if(n.length!==a.length)return!1;for(const e of n)if(!a.includes(e))return!1;return!0}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a<e;++a)t[a]=Object(n.a)(1,200);return t},name:"Algorithmic Stock Trader I",numTries:5,solver:(e,t)=>{let a=0,n=0;for(let t=1;t<e.length;++t)a=Math.max(0,a+=e[t]-e[t-1]),n=Math.max(a,n);return n.toString()===t}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a<e;++a)t[a]=Object(n.a)(1,200);return t},name:"Algorithmic Stock Trader II",numTries:10,solver:(e,t)=>{let a=0;for(let t=1;t<e.length;++t)a+=Math.max(e[t]-e[t-1],0);return a.toString()===t}},{desc:e=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",e+"\n\n","Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const e=Object(n.a)(3,50),t=[];t.length=e;for(let a=0;a<e;++a)t[a]=Object(n.a)(1,200);return t},name:"Algorithmic Stock Trader III",numTries:10,solver:(e,t)=>{let a=Number.MIN_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const t of e)i=Math.max(i,n+t),n=Math.max(n,r-t),r=Math.max(r,a+t),a=Math.max(a,-1*t);return i.toString()===t}},{desc:e=>["You are given the following array with two elements:\n\n",`[${e[0]}, [${e[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" "),difficulty:8,gen:()=>{const e=Object(n.a)(2,10),t=Object(n.a)(3,50),a=[];a.length=t;for(let e=0;e<t;++e)a[e]=Object(n.a)(1,200);return[e,a]},name:"Algorithmic Stock Trader IV",numTries:10,solver:(e,t)=>{const a=e[0],n=e[1],r=n.length;if(r<2)return 0===parseInt(t);if(a>r/2){let e=0;for(let t=1;t<r;++t)e+=Math.max(n[t]-n[t-1],0);return parseInt(t)===e}const i=[],o=[];i.length=a+1,o.length=a+1;for(let e=0;e<=a;++e)i[e]=Number.MIN_SAFE_INTEGER,o[e]=0;let s;for(let e=0;e<r;++e){s=n[e];for(let e=a;e>0;--e)o[e]=Math.max(o[e],i[e]+s),i[e]=Math.max(i[e],o[e-1]-s)}return parseInt(t)===o[a]}},{desc:e=>{function t(e,a=0){const n=e.length;if(a>=n)return"";let r=["&nbsp;".repeat(n-a+1),"[",e[a].toString(),"]"].join("");return a<n-1&&(r+=","),r+"\n"+t(e,a+1)}return["Given a triangle, find the minimum path sum from top to bottom. In each step","of the path, you may only move to adjacent numbers in the row below.","The triangle is represented as a 2D array of numbers:\n\n",function(e){return["[\n",t(e),"]"].join("")}(e)+"\n\n","Example: If you are given the following triangle:\n\n[\n","&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[2],\n","&nbsp;&nbsp;&nbsp;&nbsp;[3,4],\n","&nbsp;&nbsp;&nbsp;[6,5,7],\n","&nbsp;&nbsp;[4,1,8,3]\n","]\n\n","The minimum path sum is 11 (2 -> 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=Object(n.a)(3,12);e.length=t;for(let a=0;a<t;++a){e[a]=[],e[a].length=a+1;for(let t=0;t<e[a].length;++t)e[a][t]=Object(n.a)(1,9)}return e},name:"Minimum Path Sum in a Triangle",numTries:10,solver:(e,t)=>{const a=e.length,n=e[a-1].slice();for(let t=a-2;t>-1;--t)for(let a=0;a<e[t].length;++a)n[a]=Math.min(n[a],n[a+1])+e[t][a];return n[0]===parseInt(t)}},{desc:e=>{const t=e[0],a=e[1];return["You are in a grid with",`${t} rows and ${a} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${t}, ${a}]`].join(" ")},difficulty:3,gen:()=>[Object(n.a)(2,14),Object(n.a)(2,14)],name:"Unique Paths in a Grid I",numTries:10,solver:(e,t)=>{const a=e[0],n=e[1],r=[];r.length=a;for(let e=0;e<a;e++)r[e]=1;for(let e=1;e<n;e++)for(let e=1;e<a;e++)r[e]+=r[e-1];return parseInt(t)===r[a-1]}},{desc:e=>{let t="";for(const a of e)t+=a.toString()+",\n";return["You are located in the top-left corner of the following grid:\n\n",t+"\n","You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const e=Object(n.a)(2,12),t=Object(n.a)(2,12),a=[];a.length=e;for(let n=0;n<e;++n)a[n]=[],a[n].length=t,a[n].fill(0);for(let n=0;n<e;++n)for(let r=0;r<t;++r)0===n&&0===r||n===e-1&&r===t-1||Math.random()<.15&&(a[n][r]=1);return a},name:"Unique Paths in a Grid II",numTries:10,solver:(e,t)=>{const a=[];a.length=e.length;for(let t=0;t<a.length;++t)a[t]=e[t].slice();for(let e=0;e<a.length;e++)for(let t=0;t<a[0].length;t++)1==a[e][t]?a[e][t]=0:0==e&&0==t?a[0][0]=1:a[e][t]=(e>0?a[e-1][t]:0)+(t>0?a[e][t-1]:0);return a[a.length-1][a[0].length-1]===parseInt(t)}},{desc:e=>["Given the following string:\n\n",e+"\n\n","remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")( -> [""]'].join(" "),difficulty:10,gen:()=>{const e=Object(n.a)(6,20),t=[];t.length=e,Math.random()<.8?t[0]="(":t[0]=")";for(let a=1;a<e;++a){const e=Math.random();t[a]=e<.4?"(":e<.8?")":"a"}return t.join("")},name:"Sanitize Parentheses in Expression",numTries:10,solver:(e,t)=>{let a=0,n=0;const i=[];for(let t=0;t<e.length;++t)"("===e[t]?++a:")"===e[t]&&(a>0?--a:++n);!function e(t,a,n,r,i,o,s){if(i.length!==a)"("===i[a]?(n>0&&e(t,a+1,n-1,r,i,o,s),e(t+1,a+1,n,r,i,o+i[a],s)):")"===i[a]?(r>0&&e(t,a+1,n,r-1,i,o,s),t>0&&e(t-1,a+1,n,r,i,o+i[a],s)):e(t,a+1,n,r,i,o+i[a],s);else if(0===n&&0===r&&0===t){for(let e=0;e<s.length;e++)if(s[e]===o)return;s.push(o)}}(0,0,a,n,e,"",i);const o=r(t).replace(/\s/g,"").split(",");if(o.length!==i.length)return!1;for(const e of i)if(!o.includes(e))return!1;return!0}},{desc:e=>{const t=e[0],a=e[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",t+"\n\n",`You are also given a target number of ${a}. Return all possible ways`,"you can add the +, -, and * operators to the string such that it evaluates","to the target number.\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${t}", ${a}]\n\n`,"NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const e=Object(n.a)(4,12),t=[];t.length=e;for(let e=0;e<t.length;++e)t[e]=String(0===e?Object(n.a)(1,9):Object(n.a)(0,9));const a=Object(n.a)(-100,100);return[t.join(""),a]},name:"Find All Valid Math Expressions",numTries:10,solver:(e,t)=>{const a=e[0],n=e[1];const o=r(t).split(",");for(let e=0;e<o.length;++e)o[e]=i(o[e]).replace(/\s/g,"");if(null==a||0===a.length)return 0===o.length||1===o.length&&""===o[0];const s=[];!function e(t,a,n,r,i,o,s){if(i!==n.length)for(let l=i;l<n.length&&(l==i||"0"!=n[i]);++l){const c=parseInt(n.substring(i,l+1));0===i?e(t,a+c,n,r,l+1,c,c):(e(t,a+"+"+c,n,r,l+1,o+c,c),e(t,a+"-"+c,n,r,l+1,o-c,-c),e(t,a+"*"+c,n,r,l+1,o-s+s*c,s*c))}else r===o&&t.push(a)}(s,"",a,n,0,0,0);for(const e of s)if(!o.includes(e))return!1;return!0}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(56),o=a(63),s=a(93);function l(e){const[t,a]=Object(n.useState)("");const l=o.d[e.c.type],c=[];for(const[t,a]of l.desc(e.c.data).split("\n").entries())c.push(r.a.createElement("span",{key:t,dangerouslySetInnerHTML:{__html:a+"<br />"}}));return r.a.createElement("div",null,r.a.createElement(s.b,{value:e.c.type,tag:s.a.Tag_h1}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",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("p",null,c),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",style:{width:"50%",marginTop:"8px"},autoFocus:!0,placeholder:"Enter Solution here",value:t,onChange:function(e){a(e.target.value)},onKeyDown:function(a){const n=a.target.value;a.keyCode===i.a.ENTER&&""!==n&&(a.preventDefault(),e.onAttempt(t))}}),r.a.createElement("button",{className:"std-button",onClick:()=>e.onAttempt(t)},"Solve"))}},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,"costPerLevel",0),n(this,"desc",""),n(this,"hasTargetServer",!1),n(this,"name",""),n(this,"value",0),n(this,"effectText",()=>null),null!=e.cost&&(this.cost=e.cost),null!=e.effectText&&(this.effectText=e.effectText),this.costPerLevel=e.costPerLevel,this.desc=e.desc,this.hasTargetServer=!!e.hasTargetServer&&e.hasTargetServer,this.name=e.name,this.value=e.value}getCost(e){return"number"==typeof this.cost?this.cost:Math.round((e+1)*this.costPerLevel)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2),o=a(10);const s=[{cost:4,costPerLevel:4,desc:"Sell hashes for $1m",name:"Sell for Money",effectText:e=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e6*e})),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:e=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e9*e})," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",effectText:e=>r.a.createElement(r.a.Fragment,null,"Improves studying by ",20*e,"%"),value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:e=>r.a.createElement(r.a.Fragment,null,"Improves training by ",20*e,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",e,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(100*e,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:e=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(10*e,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:e=>r.a.createElement(r.a.Fragment,null,"Generated ",e," contracts."),value:1}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function r(e){let t="";for(let a=0;a<e;++a)t+=n.charAt(Math.floor(Math.random()*n.length));return t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(6),r=a(37);const i=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:n.a.AevumECorp},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:n.a.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:n.a.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[r.a.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:n.a.Sector12BladeIndustries},{hackDifficulty:99,hostname:"nwo",literature:[r.a.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:n.a.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[r.a.BeyondMan,r.a.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:n.a.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[r.a.CodedIntelligence,r.a.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:n.a.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:n.a.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:n.a.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[r.a.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:n.a.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:"Fulcrum Secret Technologies Server"},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:n.a.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:n.a.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[r.a.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:n.a.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:[r.a.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:n.a.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:n.a.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:n.a.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:n.a.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[r.a.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[r.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[r.a.AGreenTomorrow,r.a.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:n.a.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:n.a.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:[r.a.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:n.a.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:n.a.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[r.a.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:n.a.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:n.a.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[r.a.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[r.a.AGreenTomorrow,r.a.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:n.a.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:n.a.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:n.a.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[r.a.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:n.a.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:n.a.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:n.a.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:n.a.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:n.a.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:n.a.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:n.a.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[r.a.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:n.a.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:n.a.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[r.a.SecretSocieties,r.a.TheFailedFrontier,r.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:n.a.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:n.a.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:n.a.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:n.a.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[r.a.SecretSocieties,r.a.TheFailedFrontier,r.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:n.a.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:n.a.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:n.a.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:n.a.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[r.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:[r.a.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:n.a.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:n.a.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[r.a.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:n.a.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:n.a.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:n.a.NewTokyoNoodleBar},{hackDifficulty:10,hostname:"foodnstuff",literature:[r.a.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:n.a.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:n.a.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[r.a.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[r.a.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[r.a.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[r.a.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:n.a.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:n.a.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:n.a.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20,specialName:n.a.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:n.a.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:n.a.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:n.a.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[r.a.SimulatedReality,r.a.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"BitRunners Server"},{hackDifficulty:0,hostname:"I.I.I.I",literature:[r.a.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:"The Black Hand Server"},{hackDifficulty:0,hostname:"avmnite-02h",literature:[r.a.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:"NiteSec Server"},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:"The Dark Army Server"},{hackDifficulty:0,hostname:"CSEC",literature:[r.a.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:"CyberSec Server"},{hackDifficulty:0,hostname:"The-Cave",literature:[r.a.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:"Daedalus Server"},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:"w0r1d_d43m0n"}]},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,"parent",null),n(this,"stopFlag",!1),n(this,"vars",{}),e instanceof r&&(this.vars=Object.assign({},e.vars)),this.parent=e}lookup(e){let t=this;for(;t;){if(Object.prototype.hasOwnProperty.call(t.vars,e))return t;t=t.parent}return null}get(e){if(e in this.vars)return this.vars[e];throw new Error("Undefined variable "+e)}set(e,t){const a=this.lookup(e);return null!==a?a.vars[e]=t:this.vars[e]=t}def(e,t){return this.vars[e]=t}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return Industry}));var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(12),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(16),decimal_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(61),_IndustryData__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(35),_data_Constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(28),_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(29),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(100),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(14),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(465),_OfficeSpace__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(204),_Product__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(219),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(8),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(65),_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(106),_Warehouse__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(124),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(205),_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(11);function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class Industry{constructor(e={}){_defineProperty(this,"name",""),_defineProperty(this,"type",_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_6__.a({name:"Scientific Research"})),_defineProperty(this,"researched",{}),_defineProperty(this,"reqMats",{}),_defineProperty(this,"prodMats",[]),_defineProperty(this,"products",{}),_defineProperty(this,"makesProducts",!1),_defineProperty(this,"awareness",0),_defineProperty(this,"popularity",0),_defineProperty(this,"startingCost",0),_defineProperty(this,"reFac",0),_defineProperty(this,"sciFac",0),_defineProperty(this,"hwFac",0),_defineProperty(this,"robFac",0),_defineProperty(this,"aiFac",0),_defineProperty(this,"advFac",0),_defineProperty(this,"prodMult",0),_defineProperty(this,"upgrades",Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__.a).length).fill(0)),_defineProperty(this,"state","START"),_defineProperty(this,"newInd",!0),_defineProperty(this,"offices",{[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0}),this.name=e.name?e.name:"",this.type=e.type?e.type:_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0},this.init()}init(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.d[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);switch(this.startingCost=e,this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error("Invalid Industry Type passed into Industry.init(): "+this.type)}}getProductDescriptionText(){if(!this.makesProducts)return"";switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}}getMaximumNumberProducts(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.BaseMaxProducts+e}hasMaximumNumberProducts(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()}calculateProductionFactors(){let e=0;for(let t=0;t<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a))continue;const r=n.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}this.prodMult=e<1?1:e}updateWarehouseSizeUsed(e){e.updateMaterialSizeUsed();for(const t in this.products)if(this.products.hasOwnProperty(t)){const a=this.products[t];if(void 0===a)continue;e.sizeUsed+=a.data[e.loc][0]*a.siz,a.data[e.loc][0]>0&&(e.breakdown+=t+": "+Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__.c)(a.data[e.loc][0]*a.siz,0)+"<br>")}}process(e=1,t,a){if(this.state=t,"START"===t){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);let t=0;for(const n in this.offices){const r=this.offices[n];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses.plus(t),this.processMaterialMarket(),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);const n=a.getDreamSenseGain(),r=4*n;return void(n>0&&(this.popularity+=n*e,this.awareness+=r*e))}let n=this.processMaterials(e,a);Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1])),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1]))}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;e<t.length;++e)n.materials[t[e]].processMarket();n.materials.Hardware.processMarket(),n.materials.Robots.processMarket(),n.materials.AICores.processMarket(),n.materials.RealEstate.processMarket()}}processProductMarket(e=1){for(const t in this.products)if(this.products.hasOwnProperty(t)){const a=this.products[t];if(void 0===a)continue;let n=4e-4*Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__.a)(0,3);if(0===n)continue;this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software&&this.type!==_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics||(n*=3),n*=e,a.dmd-=n,a.cmp+=n,a.cmp=Math.min(a.cmp,99.99),a.dmd=Math.max(a.dmd,.001)}}processMaterials(marketCycles=1,corporation){let revenue=0,expenses=0;if(this.calculateProductionFactors(),"EXPORT"===this.state)for(let e=0;e<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++e){const t=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[e];if(!(this.warehouses[t]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a))continue;const a=this.warehouses[t];if(0!==a)for(const e in a.materials)if(a.materials.hasOwnProperty(e)){const t=a.materials[e];t.imp=0}}for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[i],office=this.offices[city];if(0!==office){if(this.warehouses[city]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a){const warehouse=this.warehouses[city];if(0===warehouse)continue;switch(this.state){case"PURCHASE":{for(const e in warehouse.materials){if(!warehouse.materials.hasOwnProperty(e))continue;const t=warehouse.materials[e];let a=0,n=0;warehouse.smartSupplyEnabled&&Object.keys(this.reqMats).includes(e)||(a=t.buy*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,n="RealEstate"==e?a:Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]),a=Math.min(a,n),a>0&&(t.qty+=a,expenses+=a*t.bCost),this.updateWarehouseSizeUsed(warehouse))}const e={};for(const t in warehouse.materials){if(!warehouse.materials.hasOwnProperty(t))continue;if(!warehouse.smartSupplyEnabled||!Object.keys(this.reqMats).includes(t))continue;const a=warehouse.materials[t],n=this.reqMats[t];if(void 0===n)throw new Error(`reqMat "${t}" is undefined`);a.buy=n*warehouse.smartSupplyStore;let r=a.buy*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[t]);r=Math.min(r,i),r>0&&(e[t]=r)}let t=1e99;for(const a in e){const n=e[a];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[a];if(void 0===r)throw new Error(`reqMat "${a}" is undefined`);const i=n/r;i<t&&(t=i)}for(const a in e){const n=this.reqMats[a];if(void 0===n)throw new Error(`reqMat "${a}" is undefined`);e[a]=t*n}let a=0;for(const t in e){const n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");a+=n*_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[t]}const n=warehouse.size-warehouse.sizeUsed;if(a>n)for(const t in e){const r=e[t];if(void 0===r)throw new Error("Somehow smartbuy matname is undefined");e[t]=Math.floor(r*n/a)}for(const t in e){if(!warehouse.smartSupplyUseLeftovers[t])continue;const a=warehouse.materials[t],n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");e[t]=Math.max(0,n-a.qty)}for(const t in e){const a=warehouse.materials[t],n=e[t];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");a.qty+=n,expenses+=n*a.bCost}break}case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){const e=warehouse.materials[this.prodMats[0]],t=this.getOfficeProductivity(office)*this.prodMult*corporation.getProductionMultiplier()*this.getProductionMultiplier();let a;a=e.prdman[0]?Math.min(t,e.prdman[1]):t,a*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let n=0;for(let e=0;e<this.prodMats.length;++e)n+=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[this.prodMats[e]];for(const e in this.reqMats){const t=this.reqMats[e];void 0!==t&&(n-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]*t)}if(n>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/n);a=Math.min(e,a)}a<0&&(a=0),warehouse.smartSupplyStore+=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const e in this.reqMats)if(this.reqMats.hasOwnProperty(e)){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a;warehouse.materials[e].qty<n&&(r=Math.min(r,warehouse.materials[e].qty/n))}if(r<=0&&(r=0,a=0),r>0&&a>0){for(const e in this.reqMats){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a*r;warehouse.materials[e].qty-=n,warehouse.materials[e].prd=0,warehouse.materials[e].prd-=n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)}for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].qty+=a*r,warehouse.materials[this.prodMats[e]].qlt=office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer]/90+Math.pow(this.sciResearch.qty,this.sciFac)+Math.pow(warehouse.materials.AICores.qty,this.aiFac)/1e4}else for(const e in this.reqMats)this.reqMats.hasOwnProperty(e)&&(warehouse.materials[e].prd=0);const i=a*r/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);for(let e=0;e<this.prodMats.length;++e)warehouse.materials[this.prodMats[e]].prd=i}else for(const e in this.reqMats)warehouse.materials[e].prd=0;break;case"SALE":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];if(mat.sCost<0||!1===mat.sllman[0]){mat.sll=0;continue}const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(mat),markupLimit=mat.getMarkupLimit();let sCost;if(mat.marketTa2){const e=mat.prd,t=markupLimit,a=e,n=(mat.qlt+.001)*marketFactor*businessFactor*corporation.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=mat.bCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+mat.bCost,mat.marketTa2Price=i,sCost=i}else mat.marketTa1?sCost=mat.bCost+markupLimit:Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(mat.sCost)?(sCost=mat.sCost.replace(/MP/g,mat.bCost+""),sCost=eval(sCost)):sCost=mat.sCost;let markup=1;sCost>mat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost<mat.bCost&&(markup=sCost<=0?1e12:mat.bCost/sCost);const maxSell=(mat.qlt+.001)*marketFactor*markup*businessFactor*corporation.getSalesMultiplier()*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(mat.sllman[1])){let tmp=mat.sllman[1].replace(/MAX/g,maxSell+"");tmp=tmp.replace(/PROD/g,mat.prd+"");try{sellAmt=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error evaluating your sell amount for material "+mat.name+" in "+this.name+"'s "+city+" office. The sell amount is being set to zero"),sellAmt=0}sellAmt=Math.min(maxSell,sellAmt)}else sellAmt=-1===mat.sllman[1]?maxSell:Math.min(maxSell,mat.sllman[1]);if(sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(mat.qty,sellAmt),sellAmt<0){console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`),mat.sll=0;continue}sellAmt&&sCost>=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI<mat.exp.length;++expI){const exp=mat.exp[expI],amtStr=exp.amt.replace(/MAX/g,mat.qty/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)+"");let amt=0;try{amt=eval(amtStr)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Calculating export for "+mat.name+" in "+this.name+"'s "+city+" division failed with error: "+e);continue}if(isNaN(amt))Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error calculating export amount for "+mat.name+" in "+this.name+"'s "+city+" division.");else{if(amt=amt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,mat.qty<amt&&(amt=mat.qty),0===amt)break;for(let e=0;e<corporation.divisions.length;++e)if(corporation.divisions[e].name===exp.ind){const t=corporation.divisions[e],a=t.warehouses[exp.city];if(!(a instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a)){console.error(`Invalid export! ${t.name} ${exp.city}`);break}if(a.sizeUsed>=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles),a.materials[matName].qty+=amt,a.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,t.updateWarehouseSizeUsed(a);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(e=1,t){let a=0;if("PRODUCTION"===this.state)for(const t in this.products){const a=this.products[t];if(void 0!==a&&!a.fin){const t=a.createCity,n=this.offices[t];if(0===n)continue;const r=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;a.createProduct(e,c),a.prog>=100&&a.finishProduct(n.employeeProd,this);break}}for(const n in this.products)if(this.products.hasOwnProperty(n)){const r=this.products[n];r instanceof _Product__WEBPACK_IMPORTED_MODULE_10__.a&&r.fin&&(a+=this.processProduct(e,r,t))}return[a,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a)switch(this.state){case"PRODUCTION":{const e=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let t;t=product.prdman[city][0]?Math.min(e,product.prdman[city][1]):e,t*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let a=product.siz;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const t=product.reqMats[e];a-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]*t}if(a>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/a);t=Math.min(e,t)}warehouse.smartSupplyStore+=t/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let n=1;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t;warehouse.materials[e].qty<a&&(n=Math.min(n,warehouse.materials[e].qty/a))}if(n>0&&t>0){for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t*n;warehouse.materials[e].qty-=a,warehouse.materials[e].prd-=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const e in product.reqMats)product.reqMats.hasOwnProperty(e)&&(product.pCost+=product.reqMats[e]*warehouse.materials[e].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,a=e,n=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));const maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(e){for(const t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]}upgrade(e,t){const a=t.corporation,n=t.office,r=e[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e<n.employees.length;++e)n.employees[e].ene=Math.min(1.05*n.employees[e].ene,n.maxEne);break;case 1:{const e=a.getAdvertisingMultiplier()*this.getAdvertisingMultiplier();this.awareness+=3*e,this.popularity+=1*e,this.awareness*=1.01*e,this.popularity*=(1+Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__.a)(1,3)/100)*e;break}default:console.error("Un-implemented function index: "+r)}}getOfficeProductivity(e,t={}){const a=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Operations],n=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer],r=e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Management],i=a+n+r;if(i<=0)return 0;const o=1+r/(1.2*i),s=(Math.pow(a,.4)+Math.pow(n,.3))*o;return t&&t.forProduct?.025*s:.05*s}getBusinessFactor(e){const t=1+e.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Business];return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__.a)(t,.26,1e4)}getAdvertisingFactors(){const e=Math.pow(this.awareness+1,this.advFac),t=Math.pow(this.popularity+1,this.advFac),a=0===this.awareness?.01:Math.max((this.popularity+.001)/this.awareness,.01);return[Math.pow(e*t*a,.85),e,t,a]}getMarketFactor(e){return Math.max(.1,e.dmd*(100-e.cmp)/100)}hasResearch(e){return!0===this.researched[e]}updateResearchTree(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry "${this.type}"`);if(Object.keys(e.researched).length!==Object.keys(this.researched).length)for(const t in this.researched)e.research(t)}getAdvertisingMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getAdvertisingMultiplier()}getEmployeeChaMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeChaMultiplier()}getEmployeeCreMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeCreMultiplier()}getEmployeeEffMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeEffMultiplier()}getEmployeeIntMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getEmployeeIntMultiplier()}getProductionMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getProductionMultiplier()}getProductProductionMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getProductProductionMultiplier()}getSalesMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getSalesMultiplier()}getScientificResearchMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getScientificResearchMultiplier()}getStorageMultiplier(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.c[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);return this.updateResearchTree(),e.getStorageMultiplier()}copy(){const e=new Industry;e.sciResearch=this.sciResearch.copy(),e.researched={};for(const t of Object.keys(this.researched))e.researched[t]=this.researched[t];e.reqMats={};for(const t of Object.keys(this.reqMats))e.reqMats[t]=this.reqMats[t];return e.name=this.name,e.type=this.type,e.makesProducts=this.makesProducts,e.awareness=this.awareness,e.popularity=this.popularity,e.startingCost=this.startingCost,e.reFac=this.reFac,e.sciFac=this.sciFac,e.hwFac=this.hwFac,e.robFac=this.robFac,e.aiFac=this.aiFac,e.advFac=this.advFac,e.prodMult=this.prodMult,e.state=this.state,e.newInd=this.newInd,e.lastCycleRevenue=this.lastCycleRevenue.plus(0),e.lastCycleExpenses=this.lastCycleExpenses.plus(0),e.thisCycleRevenue=this.thisCycleRevenue.plus(0),e.thisCycleExpenses=this.thisCycleExpenses.plus(0),e.upgrades=this.upgrades.slice(),e.prodMats=this.prodMats.slice(),e}toJSON(){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__.b)("Industry",this)}static fromJSON(e){return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__.a)(Industry,e.data)}}_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__.c.constructors.Industry=Industry},function(e,t,a){"use strict";function n(e,t,a){return(t<=0||t>=1)&&console.warn(`Exponential factor is ${t}. This is not an intended value for it`),a<1&&console.warn(`Linear factor is ${a}. This is not an intended value for it`),Math.pow(e,t)+e/a}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(35);const r={[n.a.Food]:{Quality:.7,Durability:.1,Aesthetics:.2},[n.a.Tobacco]:{Quality:.4,Durability:.2,Reliability:.2,Aesthetics:.2},[n.a.Pharmaceutical]:{Quality:.2,Performance:.2,Durability:.1,Reliability:.3,Features:.2},[n.a.Computer]:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},Computer:{Quality:.15,Performance:.25,Durability:.25,Reliability:.2,Aesthetics:.05,Features:.1},[n.a.Robotics]:{Quality:.1,Performance:.2,Durability:.2,Reliability:.2,Aesthetics:.1,Features:.2},[n.a.Software]:{Quality:.2,Performance:.2,Reliability:.2,Durability:.2,Features:.2},[n.a.Healthcare]:{Quality:.4,Performance:.1,Durability:.1,Reliability:.3,Features:.1},[n.a.RealEstate]:{Quality:.2,Durability:.25,Reliability:.1,Aesthetics:.35,Features:.1}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:1,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:2.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:6,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks<br><br>Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses<br><br>Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:15,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:120,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism<br><br>Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations<br><br>Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:1,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets<br><br>Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:1.2,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs<br><br>Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory<br><br>Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars<br><br>Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:38,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets<br><br>Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:24,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations<br><br>Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism<br><br>Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Terrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:36,territory:{money:1,respect:2,wanted:2}}},{desc:"Assign this gang member to be a vigilante and protect the city from criminals<br><br>Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(293),r=a(126),i=a(116),o=a(49),s=a(12);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=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.a.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof n.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=4*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.respect)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*a*n*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.5*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.wanted)/100);if(isNaN(n)||n<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*a*n;const r=7*t.baseWanted/Math.pow(3*a*n,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.2*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.money)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*a*n*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.a.Unassigned)return;const a=Math.pow(t.difficulty,.9)*e,n=this.expMult();this.hack_exp+=t.hackWeight/1500*a*n.hack,this.str_exp+=t.strWeight/1500*a*n.str,this.def_exp+=t.defWeight/1500*a*n.def,this.dex_exp+=t.dexWeight/1500*a*n.dex,this.agi_exp+=t.agiWeight/1500*a*n.agi,this.cha_exp+=t.chaWeight/1500*a*n.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getAscensionResults(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack)/this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points+e.str)/this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points+e.def)/this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex)/this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi)/this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)/this.calculateAscensionMult(this.cha_asc_points)}}ascend(){const e=this.getAscensionResults(),t=this.getGainedAscensionPoints();this.hack_asc_points+=t.hack,this.str_asc_points+=t.str,this.def_asc_points+=t.def,this.dex_asc_points+=t.dex,this.agi_asc_points+=t.agi,this.cha_asc_points+=t.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let e=0;e<this.augmentations.length;++e){const t=i.a[this.augmentations[e]];this.applyUpgrade(t)}this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=0,this.updateSkillLevels();const a=this.earnedRespect;return this.earnedRespect=0,{respect:a,hack:e.hack,str:e.str,def:e.def,dex:e.dex,agi:e.agi,cha:e.cha}}applyUpgrade(e){null!=e.mults.str&&(this.str_mult*=e.mults.str),null!=e.mults.def&&(this.def_mult*=e.mults.def),null!=e.mults.dex&&(this.dex_mult*=e.mults.dex),null!=e.mults.agi&&(this.agi_mult*=e.mults.agi),null!=e.mults.cha&&(this.cha_mult*=e.mults.cha),null!=e.mults.hack&&(this.hack_mult*=e.mults.hack)}buyUpgrade(e,t,a){return!this.augmentations.includes(e.name)&&!this.upgrades.includes(e.name)&&(!t.money.lt(a.getUpgradeCost(e))&&(t.loseMoney(a.getUpgradeCost(e)),"g"===e.type?this.augmentations.push(e.name):this.upgrades.push(e.name),this.applyUpgrade(e),!0))}toJSON(){return Object(s.b)("GangMember",this)}static fromJSON(e){return Object(s.a)(c,e.data)}}s.c.constructors.GangMember=c},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(90),r=a(2);class i{constructor(e="",t=0,a=n.a.Weapon,r={}){this.name=e,this.cost=t,this.type=a,this.mults=r,this.desc=this.createDescription()}createDescription(){const e=["Effects:"];return null!=this.mults.str&&(e.push(`+${r.a.formatPercentage(this.mults.str-1,0)} strength skill`),e.push(`+${r.a.formatPercentage((this.mults.str-1)/4,2)} strength exp`)),null!=this.mults.def&&(e.push(`+${r.a.formatPercentage(this.mults.def-1,0)} defense skill`),e.push(`+${r.a.formatPercentage((this.mults.def-1)/4,2)} defense exp`)),null!=this.mults.dex&&(e.push(`+${r.a.formatPercentage(this.mults.dex-1,0)} dexterity skill`),e.push(`+${r.a.formatPercentage((this.mults.dex-1)/4,2)} dexterity exp`)),null!=this.mults.agi&&(e.push(`+${r.a.formatPercentage(this.mults.agi-1,0)} agility skill`),e.push(`+${r.a.formatPercentage((this.mults.agi-1)/4,2)} agility exp`)),null!=this.mults.cha&&(e.push(`+${r.a.formatPercentage(this.mults.cha-1,0)} charisma skill`),e.push(`+${r.a.formatPercentage((this.mults.cha-1)/4,2)} charisma exp`)),null!=this.mults.hack&&(e.push(`+${r.a.formatPercentage(this.mults.hack-1,0)} hacking skill`),e.push(`+${r.a.formatPercentage((this.mults.hack-1)/4,2)} hacking exp`)),e.join("<br>")}getType(){switch(this.type){case n.a.Weapon:return"Weapon";case n.a.Armor:return"Armor";case n.a.Vehicle:return"Vehicle";case n.a.Rootkit:return"Rootkit";case n.a.Augmentation:return"Augmentation";default:return""}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(75),r=a(471),i=a(76),o=a(163),s=a(87),l=a(22);const c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","download","expr","free","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan","scan-analyze","scp","sudov","tail","theme","top"];function u(e,t,a,u=""){let m=[];m=m.concat(Object.keys(i.b));const h=e.getCurrentServer(),p=e.getHomeComputer();let d="",f=null;function g(){for(const e of h.contracts)m.push(e.fn)}function y(){for(const e of h.messages)e instanceof s.a||m.push(e)}function _(){for(const e of p.programs)m.push(e)}function b(){for(const e of h.scripts){const t=k(e.filename);t&&m.push(t)}}function E(){for(const e of h.textFiles){const t=k(e.fn);t&&m.push(t)}}function v(){const e=Object(r.a)(h,null==f?"/":f);for(let t=0;t<e.length;++t){const a=k(null==f?e[t]:f+e[t]);null!=a&&(e[t]=a)}m=m.concat(e)}function k(e){if(!f){if(""!==d){let t=d;return t.endsWith("/")||(t+="/"),d+e}return e}return e.startsWith(f)?function(e){return null==d||null==f?(console.warn("convertParentPath() called when paths are null"),e):e.startsWith(f)?d+e.slice(f.length):(console.warn(`convertParentPath() called for invalid path. (filepath=${e}) (evaledParentDirPath=${f})`),e)}(e):null}function C(e){let a=e;return a.endsWith(" ")||(a+=" "),t.startsWith(a)}if(C("./")&&-1==a){for(let e=0;e<h.scripts.length;++e)m.push("./"+h.scripts[e].filename);for(let e=0;e<p.programs.length;++e)m.push("./"+p.programs[e]);return m}if(-1===a)return c.concat(Object.keys(i.a)).concat(Object.keys(i.b));const O=t.split(" ");if(0===O.length)return console.warn("Tab autocompletion logic reached invalid branch"),m;const w=O[O.length-1];if(d=Object(n.c)(w),f=Object(n.a)(d,u),"/"===f)f=null;else{if(null==f)return m;f+="/"}if(C("buy")){const e=[];for(const t in o.a){const a=o.a[t];e.push(a.program)}return e.concat(Object.keys(i.b))}if(C("scp")&&1===a){for(const e in l.b)m.push(l.b[e].ip),m.push(l.b[e].hostname);return m}if(C("scp")&&0===a)return b(),y(),E(),v(),m;if(C("connect")){for(let e=0;e<h.serversOnNetwork.length;++e){const t=l.b[h.serversOnNetwork[e]];null!=t&&(m.push(t.ip),m.push(t.hostname))}return m}return C("kill")||C("tail")||C("mem")||C("check")?(b(),v(),m):C("nano")?(b(),E(),m.push(".fconf"),v(),m):C("rm")?(b(),_(),y(),E(),g(),v(),m):C("run")?(b(),_(),g(),v(),m):C("cat")?(function(){for(const e of h.messages)e instanceof s.a&&m.push(e.filename)}(),y(),E(),v(),m):C("download")||C("mv")?(b(),E(),v(),m):C("cd")?(v(),m):(C("ls")&&0===a&&v(),m)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(75);function r(e,t){const a=[];if(!Object(n.f)(t))return a;let r=t;function i(e){if("/"===r&&Object(n.e)(e)){const t=Object(n.d)(e);"/"===t||a.includes(t)||a.push(t)}else if(e.startsWith(r)){const t=e.slice(r.length),i=Object(n.d)(t);"/"===i||a.includes(i)||a.push(i)}}r.endsWith("/")||(r+="/");for(const t of e.scripts)i(t.filename);for(const t of e.textFiles)i(t.fn);return a}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(7),r=a(11);function i(e,t,a){if(a.constructor!==Array)return;if(!Object(r.a)(a))return;if(""===t)for(let t=a.length-1;t>=0;--t)a[t].toLowerCase().startsWith(e.toLowerCase())||a.splice(t,1);else for(let e=a.length-1;e>=0;--e)a[e].toLowerCase().startsWith(t.toLowerCase())||a.splice(e,1);const i=document.getElementById("terminal-input-text-box");if(null==i)return void console.warn("Couldn't find terminal input DOM element (id=terminal-input-text-box) when trying to autocomplete");const o=i,s=o.value.lastIndexOf(";");let l="";if(0!==a.length)if(1===a.length)l=""===t?a[0]+" ":e+" "+a[0],o.value=-1===s?l:o.value.slice(0,s+1)+" "+l,o.focus();else{const i=Object(r.e)(a);let l="";for(let e=0;e<a.length;++e)l+=a[e],l+=" ";""===t?i===e?(Object(n.c)("> "+e),Object(n.c)(l)):(o.value=-1===s?i:`${o.value.slice(0,s+1)} ${i}`,o.focus()):i===t?(Object(n.c)("> "+e+" "+t),Object(n.c)(l)):(o.value=-1==s?`${e} ${i}`:`${o.value.slice(0,s+1)} ${e} ${i}`,o.focus())}}},,,,function(e,t,a){"use strict";function n(e){return!isNaN(e)&&(0!==e&&0==(e&e-1))}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(57),r=a(6);const i=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.a.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.a.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.a.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.a.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.a.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.a.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.a.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.a.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.a.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.a.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.a.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.a.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.a.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.a.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.a.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.a.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.a.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.a.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:n.a[r.a.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.a.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.a.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.a.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.a.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:n.a[r.a.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.a.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.a.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:n.a[r.a.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.a.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.a.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:n.a[r.a.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:n.a["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:"Joes Guns",otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:n.a["Joes Guns"]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:n.a["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Titan Laboratories"]}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(479),i=a(480);class o extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1},this.rerender=this.rerender.bind(this)}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){return n.createElement("div",{id:"stock-market-container"},n.createElement(r.a,{initStockMarket:this.props.initStockMarket,p:this.props.p,rerender:this.rerender}),this.props.p.hasWseAccount&&n.createElement(i.a,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,eventEmitterForReset:this.props.eventEmitterForReset,p:this.props.p,placeOrder:this.props.placeOrder,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stockMarket:this.props.stockMarket}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(157),i=a(4),o=a(19),s=a(160),l=a(10),c=a(8);const u={display:"block"};class m extends n.Component{constructor(e){super(e),this.handleClick4SMarketDataHelpTip=this.handleClick4SMarketDataHelpTip.bind(this),this.purchaseWseAccount=this.purchaseWseAccount.bind(this),this.purchaseTixApiAccess=this.purchaseTixApiAccess.bind(this),this.purchase4SMarketData=this.purchase4SMarketData.bind(this),this.purchase4SMarketDataTixApiAccess=this.purchase4SMarketDataTixApiAccess.bind(this)}handleClick4SMarketDataHelpTip(){Object(c.a)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility<br><br>Price Forecast indicates the probability the stock has of increasing or decreasing. A '+' forecast means the stock has a higher chance of increasing than decreasing, and a '-' means the opposite. The number of '+/-' symbols is used to illustrate the magnitude of these probabilities. For example, '+++' means that the stock has a significantly higher chance of increasing than decreasing, while '+' means that the stock only has a slightly higher chance of increasing than decreasing.<br><br>Volatility represents the maximum percentage by which a stock's price can change every tick (a tick occurs every few seconds while the game is running).<br><br>A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change.")}purchaseWseAccount(){if(this.props.p.hasWseAccount)return;if(!this.props.p.canAfford(i.a.WSEAccountCost))return;this.props.p.hasWseAccount=!0,this.props.initStockMarket(),this.props.p.loseMoney(i.a.WSEAccountCost),this.props.rerender();const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}purchaseTixApiAccess(){this.props.p.hasTixApiAccess||this.props.p.canAfford(i.a.TIXAPICost)&&(this.props.p.hasTixApiAccess=!0,this.props.p.loseMoney(i.a.TIXAPICost),this.props.rerender())}purchase4SMarketData(){this.props.p.has4SData||this.props.p.canAfford(Object(r.a)())&&(this.props.p.has4SData=!0,this.props.p.loseMoney(Object(r.a)()),this.props.rerender())}purchase4SMarketDataTixApiAccess(){this.props.p.has4SDataTixApi||this.props.p.canAfford(Object(r.b)())&&(this.props.p.has4SDataTixApi=!0,this.props.p.loseMoney(Object(r.b)()),this.props.rerender())}renderPurchaseWseAccountButton(){if(this.props.p.hasWseAccount)return n.createElement(s.a,{text:"WSE Account - Purchased"});{const e=i.a.WSEAccountCost;return n.createElement(o.a,{disabled:!this.props.p.canAfford(e),onClick:this.purchaseWseAccount,text:n.createElement(n.Fragment,null,"Buy WSE Account - ",n.createElement(l.a,{money:e,player:this.props.p}))})}}renderPurchaseTixApiAccessButton(){if(this.props.p.hasTixApiAccess)return n.createElement(s.a,{text:"TIX API Access - Purchased"});{const e=i.a.TIXAPICost;return n.createElement(o.a,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchaseTixApiAccess,style:u,text:n.createElement(n.Fragment,null,"Buy Trade Information eXchange (TIX) API Access - ",n.createElement(l.a,{money:e,player:this.props.p}))})}}renderPurchase4SMarketDataButton(){if(this.props.p.has4SData)return n.createElement(s.a,{text:"4S Market Data - Purchased",tooltip:"Lets you view additional pricing and volatility information about stocks"});{const e=Object(r.a)();return n.createElement(o.a,{disabled:!this.props.p.canAfford(e)||!this.props.p.hasWseAccount,onClick:this.purchase4SMarketData,text:n.createElement(n.Fragment,null,"Buy 4S Market Data Access - ",n.createElement(l.a,{money:e,player:this.props.p})),tooltip:"Lets you view additional pricing and volatility information about stocks"})}}renderPurchase4SMarketDataTixApiAccessButton(){if(this.props.p.hasTixApiAccess){if(this.props.p.has4SDataTixApi)return n.createElement(s.a,{text:"4S Market Data TIX API - Purchased",tooltip:"Let you access 4S Market Data through Netscript"});{const e=Object(r.b)();return n.createElement(o.a,{disabled:!this.props.p.canAfford(e),onClick:this.purchase4SMarketDataTixApiAccess,text:n.createElement(n.Fragment,null,"Buy 4S Market Data TIX API Access - ",n.createElement(l.a,{money:e,player:this.props.p})),tooltip:"Let you access 4S Market Data through Netscript"})}}return n.createElement(o.a,{disabled:!0,text:"Buy 4S Market Data TIX API Access",tooltip:"Requires TIX API Access"})}render(){return n.createElement("div",{className:"stock-market-info-and-purchases"},n.createElement("p",null,"Welcome to the World Stock Exchange (WSE)!"),n.createElement("button",{className:"std-button"},n.createElement("a",{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia")),n.createElement("br",null),n.createElement("p",null,"To begin trading, you must first purchase an account:"),this.renderPurchaseWseAccountButton(),n.createElement("h2",null,"Trade Information eXchange (TIX) API"),n.createElement("p",null,"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies."),this.renderPurchaseTixApiAccessButton(),n.createElement("h2",null,"Four Sigma (4S) Market Data Feed"),n.createElement("p",null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies."),this.renderPurchase4SMarketDataButton(),n.createElement("button",{className:"help-tip-big",onClick:this.handleClick4SMarketDataHelpTip},"?"),this.renderPurchase4SMarketDataTixApiAccessButton(),n.createElement("p",null,"Commission Fees: Every transaction you make has a"," ",n.createElement(l.a,{money:i.a.StockMarketCommission,player:this.props.p})," commission fee."),n.createElement("br",null),n.createElement("p",null,"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(481),i=a(229),o=a(80),s=a(486);class l extends n.Component{constructor(e){super(e),this.state={rerenderFlag:!1,tickerDisplayMode:i.b.AllStocks,watchlistFilter:"",watchlistSymbols:[]},this.changeDisplayMode=this.changeDisplayMode.bind(this),this.changeWatchlistFilter=this.changeWatchlistFilter.bind(this),this.collapseAllTickers=this.collapseAllTickers.bind(this),this.expandAllTickers=this.expandAllTickers.bind(this),this.rerender=this.rerender.bind(this),this.listRef=n.createRef()}changeDisplayMode(){this.state.tickerDisplayMode===i.b.AllStocks?this.setState({tickerDisplayMode:i.b.Portfolio}):this.setState({tickerDisplayMode:i.b.AllStocks})}changeWatchlistFilter(e){const t=e.target.value,a=t.replace(/\s/g,"");this.setState({watchlistFilter:t}),""!==a?this.setState({watchlistSymbols:a.split(",")}):this.setState({watchlistSymbols:[]})}collapseAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const a=t[e];a instanceof HTMLButtonElement&&(a.classList.contains("active")&&a.click())}}expandAllTickers(){const e=this.listRef.current;if(null==e)return;const t=e.getElementsByClassName("accordion-header");for(let e=0;e<t.length;++e){const a=t[e];a instanceof HTMLButtonElement&&(a.classList.contains("active")||a.click())}}rerender(){this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=[];for(const t in this.props.stockMarket){const a=this.props.stockMarket[t];if(a instanceof o.a){if(this.state.watchlistSymbols.length>0&&!this.state.watchlistSymbols.includes(a.symbol))continue;let t=this.props.stockMarket.Orders[a.symbol];if(null==t&&(t=[]),this.state.tickerDisplayMode===i.b.Portfolio&&0===a.playerShares&&0===a.playerShortShares&&0===t.length)continue;e.push(n.createElement(r.a,{buyStockLong:this.props.buyStockLong,buyStockShort:this.props.buyStockShort,cancelOrder:this.props.cancelOrder,key:a.symbol,orders:t,p:this.props.p,placeOrder:this.props.placeOrder,rerenderAllTickers:this.rerender,sellStockLong:this.props.sellStockLong,sellStockShort:this.props.sellStockShort,stock:a}))}}const t={eventEmitterForReset:this.props.eventEmitterForReset,id:"StockTickersErrorBoundary"};return n.createElement(s.a,t,n.createElement(i.a,{changeDisplayMode:this.changeDisplayMode,changeWatchlistFilter:this.changeWatchlistFilter,collapseAllTickers:this.collapseAllTickers,expandAllTickers:this.expandAllTickers,tickerDisplayMode:this.state.tickerDisplayMode}),n.createElement("ul",{id:"stock-market-list",ref:this.listRef},e))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n,r=a(0),i=a(482),o=a(483),s=a(485),l=a(271),c=a(118),u=a(64),m=a(45),h=a(43),p=a(2),d=a(102),f=a(10),g=a(8),y=a(48);!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}));class _ extends r.Component{constructor(e){super(e),this.state={orderType:n.Market,position:m.a.Long,qty:""},this.getBuyTransactionCostContent=this.getBuyTransactionCostContent.bind(this),this.getSellTransactionCostContent=this.getSellTransactionCostContent.bind(this),this.handleBuyButtonClick=this.handleBuyButtonClick.bind(this),this.handleBuyMaxButtonClick=this.handleBuyMaxButtonClick.bind(this),this.handleHeaderClick=this.handleHeaderClick.bind(this),this.handleOrderTypeChange=this.handleOrderTypeChange.bind(this),this.handlePositionTypeChange=this.handlePositionTypeChange.bind(this),this.handleQuantityChange=this.handleQuantityChange.bind(this),this.handleSellButtonClick=this.handleSellButtonClick.bind(this),this.handleSellAllButtonClick=this.handleSellAllButtonClick.bind(this)}createPlaceOrderPopupBox(e,t,a){const n=Object(y.i)(),r=Object(y.h)();n.innerText=e,n.addEventListener("click",()=>{const e=parseFloat(Object(y.g)());if(isNaN(e))return Object(g.a)("Invalid input for price: "+Object(y.g)()),!1;a(e),Object(y.e)()}),r.innerText="Cancel Order",r.addEventListener("click",()=>{Object(y.e)()}),Object(y.f)(t)}getBuyTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;const a=Object(c.b)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Purchasing ",p.a.formatShares(t)," shares (",this.state.position===m.a.Long?"Long":"Short",") will cost ",r.createElement(f.a,{money:a}),".")}getQuantity(){return Math.round(parseFloat(this.state.qty))}getSellTransactionCostContent(){const e=this.props.stock,t=this.getQuantity();if(isNaN(t))return null;if(this.state.position===m.a.Long){if(t>e.playerShares)return r.createElement(r.Fragment,null,"You do not have this many shares in the Long position")}else if(t>e.playerShortShares)return r.createElement(r.Fragment,null,"You do not have this many shares in the Short position");const a=Object(c.c)(e,t,this.state.position);return null==a?null:r.createElement(r.Fragment,null,"Selling ",p.a.formatShares(t)," shares (",this.state.position===m.a.Long?"Long":"Short",") will result in a gain of ",r.createElement(f.a,{money:a}),".")}handleBuyButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(g.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.buyStockShort(this.props.stock,e):this.props.buyStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:this.createPlaceOrderPopupBox("Place Buy Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.LimitBuy,this.state.position)});break;case n.Stop:this.createPlaceOrderPopupBox("Place Buy Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.StopBuy,this.state.position)})}}handleBuyMaxButtonClick(){const e=this.props.p.money.toNumber(),t=this.props.stock;let a=Object(c.a)(t,this.state.position,e);switch(a=Math.min(a,Math.round(t.maxShares-t.playerShares-t.playerShortShares)),this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.buyStockShort(t,a):this.props.buyStockLong(t,a),this.props.rerenderAllTickers();break;default:Object(g.a)("ERROR: 'Buy Max' only works for Market Orders")}}handleHeaderClick(e){const t=e.currentTarget;t.classList.toggle("active");const a=t.nextElementSibling;"block"===a.style.display?a.style.display="none":a.style.display="block"}handleOrderTypeChange(e){switch(e.target.value){case n.Limit:this.setState({orderType:n.Limit});break;case n.Stop:this.setState({orderType:n.Stop});break;case n.Market:default:this.setState({orderType:n.Market})}}handlePositionTypeChange(e){e.target.value===m.a.Short?this.setState({position:m.a.Short}):this.setState({position:m.a.Long})}handleQuantityChange(e){this.setState({qty:e.target.value})}handleSellButtonClick(){const e=this.getQuantity();if(isNaN(e))Object(g.a)("Invalid input for quantity (number of shares): "+this.state.qty);else switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.sellStockShort(this.props.stock,e):this.props.sellStockLong(this.props.stock,e),this.props.rerenderAllTickers();break;case n.Limit:this.createPlaceOrderPopupBox("Place Sell Limit Order","Enter the price for your Limit Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.LimitSell,this.state.position)});break;case n.Stop:this.createPlaceOrderPopupBox("Place Sell Stop Order","Enter the price for your Stop Order",t=>{this.props.placeOrder(this.props.stock,e,t,u.a.StopSell,this.state.position)})}}handleSellAllButtonClick(){const e=this.props.stock;switch(this.state.orderType){case n.Market:this.state.position===m.a.Short?this.props.sellStockShort(e,e.playerShortShares):this.props.sellStockLong(e,e.playerShares),this.props.rerenderAllTickers();break;default:Object(g.a)("ERROR: 'Sell All' only works for Market Orders")}}hasOrderAccess(){return 8===this.props.p.bitNodeN||h.a[8]>=3}hasShortAccess(){return 8===this.props.p.bitNodeN||h.a[8]>=2}render(){return r.createElement("li",null,r.createElement(d.a,{headerContent:r.createElement(i.a,{p:this.props.p,stock:this.props.stock}),panelContent:r.createElement("div",null,r.createElement("input",{className:"stock-market-input",onChange:this.handleQuantityChange,placeholder:"Quantity (Shares)",value:this.state.qty}),r.createElement("select",{className:"stock-market-input dropdown",onChange:this.handlePositionTypeChange,value:this.state.position},r.createElement("option",{value:m.a.Long},"Long"),this.hasShortAccess()&&r.createElement("option",{value:m.a.Short},"Short")),r.createElement("select",{className:"stock-market-input dropdown",onChange:this.handleOrderTypeChange,value:this.state.orderType},r.createElement("option",{value:n.Market},n.Market),this.hasOrderAccess()&&r.createElement("option",{value:n.Limit},n.Limit),this.hasOrderAccess()&&r.createElement("option",{value:n.Stop},n.Stop)),r.createElement(l.a,{onClick:this.handleBuyButtonClick,text:"Buy",tooltip:this.getBuyTransactionCostContent()}),r.createElement(l.a,{onClick:this.handleSellButtonClick,text:"Sell",tooltip:this.getSellTransactionCostContent()}),r.createElement(l.a,{onClick:this.handleBuyMaxButtonClick,text:"Buy MAX"}),r.createElement(l.a,{onClick:this.handleSellAllButtonClick,text:"Sell ALL"}),r.createElement(s.a,{p:this.props.p,stock:this.props.stock}),r.createElement(o.a,{cancelOrder:this.props.cancelOrder,orders:this.props.orders,p:this.props.p,stock:this.props.stock}))}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(357),i=a(27),o=a(2);const s=["cs","lv","pl","ru"];function l(e){const t=e.stock,a=o.a.formatMoney(t.price),l=s.includes(i.a.Locale)?15:12,c=" ".repeat(1+r.a.longestName-t.name.length+(r.a.longestSymbol-t.symbol.length)),u=" ".repeat(l-a.length);let m=`${t.name}${c}${t.symbol} -${u}${a}`;if(e.p.has4SData){m+=` - Volatility: ${o.a.formatPercentage(t.mv/100)} - Price Forecast: `;let e=t.b;t.otlkMag<0&&(e=!e),m+=(e?"+":"-").repeat(Math.floor(Math.abs(t.otlkMag)/10)+1)}const h={color:"#66ff33"};return t.lastPrice===t.price?h.color="white":t.lastPrice>t.price&&(h.color="red"),n.createElement("pre",{style:h},m)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(484);class i extends n.Component{render(){const e=[];for(let t=0;t<this.props.orders.length;++t){const a=this.props.orders[t];e.push(n.createElement(r.a,{cancelOrder:this.props.cancelOrder,order:a,key:t}))}return n.createElement("ul",{className:"stock-market-order-list"},e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(45),i=a(2),o=a(10);class s extends n.Component{constructor(e){super(e),this.handleCancelOrderClick=this.handleCancelOrderClick.bind(this)}handleCancelOrderClick(){this.props.cancelOrder({order:this.props.order})}render(){const e=this.props.order,t=e.pos===r.a.Long?"Long Position":"Short Position",a=n.createElement(n.Fragment,null,e.type," - ",t," - ",i.a.formatShares(e.shares)," @ ",n.createElement(o.a,{money:e.price}));return n.createElement("li",null,a,n.createElement("button",{className:"std-button stock-market-order-cancel-btn",onClick:this.handleCancelOrderClick},"Cancel Order"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(2),i=a(10),o=a(43);const s={display:"block"};class l extends n.Component{renderLongPosition(){const e=this.props.stock,t=e.playerShares*e.playerAvgPx,a=(e.getBidPrice()-e.playerAvgPx)*e.playerShares;let o=a/t;return isNaN(o)&&(o=0),n.createElement("div",null,n.createElement("h3",{className:"tooltip"},"Long Position:",n.createElement("span",{className:"tooltiptext"},"Shares in the long position will increase in value if the price of the corresponding stock increases")),n.createElement("br",null),n.createElement("p",null,"Shares: ",r.a.formatShares(e.playerShares)),n.createElement("br",null),n.createElement("p",null,"Average Price: ",n.createElement(i.a,{money:e.playerAvgPx})," (Total Cost: ",n.createElement(i.a,{money:t})),n.createElement("br",null),n.createElement("p",null,"Profit: ",n.createElement(i.a,{money:a})," (",r.a.formatPercentage(o),")"),n.createElement("br",null))}renderShortPosition(){const e=this.props.stock,t=e.playerShortShares*e.playerAvgShortPx,a=(e.playerAvgShortPx-e.getAskPrice())*e.playerShortShares;let s=a/t;return isNaN(s)&&(s=0),8===this.props.p.bitNodeN||o.a[8]>=2?n.createElement("div",null,n.createElement("h3",{className:"tooltip"},"Short Position:",n.createElement("span",{className:"tooltiptext"},"Shares in the short position will increase in value if the price of the corresponding stock decreases")),n.createElement("br",null),n.createElement("p",null,"Shares: ",r.a.formatShares(e.playerShortShares)),n.createElement("br",null),n.createElement("p",null,"Average Price: ",n.createElement(i.a,{money:e.playerAvgShortPx})," (Total Cost: ",n.createElement(i.a,{money:t}),")"),n.createElement("br",null),n.createElement("p",null,"Profit: ",n.createElement(i.a,{money:a})," (",r.a.formatPercentage(s),")"),n.createElement("br",null)):null}render(){const e=this.props.stock;return n.createElement("div",{className:"stock-market-position-text"},n.createElement("p",{style:s},"Max Shares: ",r.a.formatShares(e.maxShares)),n.createElement("p",{className:"tooltip"},"Ask Price: ",n.createElement(i.a,{money:e.getAskPrice()}),n.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Bid Price: ",n.createElement(i.a,{money:e.getBidPrice()}),n.createElement("span",{className:"tooltiptext"},"See Investopedia for details on what this is")),this.renderLongPosition(),this.renderShortPosition())}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(236);const i={border:"1px solid red",display:"inline-block",margin:"4px",padding:"4px"};class o extends n.Component{constructor(e){super(e),this.state={errorInfo:"",hasError:!1}}componentDidCatch(e,t){console.error("Caught error in React ErrorBoundary. Component stack:"),console.error(t.componentStack)}componentDidMount(){const e=()=>{this.setState({hasError:!1})};this.hasEventEmitter()&&this.props.eventEmitterForReset.addSubscriber({cb:e,id:this.props.id})}componentWillUnmount(){this.hasEventEmitter()&&this.props.eventEmitterForReset.removeSubscriber(this.props.id)}hasEventEmitter(){return null!=this.props.eventEmitterForReset&&this.props.eventEmitterForReset instanceof r.a&&null!=this.props.id&&"string"==typeof this.props.id}render(){return this.state.hasError?n.createElement("div",{style:i},n.createElement("p",null,"Error rendering UI. This is (probably) a bug. Please report to game developer."),n.createElement("p",null,"In the meantime, try refreshing the game WITHOUT saving."),n.createElement("p",null,"Error info: "+this.state.errorInfo)):this.props.children}static getDerivedStateFromError(e){return{errorInfo:e.message,hasError:!0}}}},function(e,t,a){"use strict";function n(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}a.d(t,"a",(function(){return n}))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(88),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(489);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let loadedModule,urls=null,script=workerScript.getScript();shouldCompile(script,scripts)&&(script.markUpdated(),urls=_getScriptUrls(script,scripts,[]),script.url=urls[urls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(urls[urls.length - 1].url)"))),script.dependencies=urls),loadedModule=await script.module;let ns=workerScript.env.vars;try{if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,script.filename+" cannot be run because it does not have a main function.");return loadedModule.main(ns)}finally{if(null!=urls)for(const e in urls)URL.revokeObjectURL(e.url)}}function shouldCompile(e,t){return""===e.module||e.dependencies.some(a=>{const n=t.find(e=>e.filename==a.filename);if(!n)return!0;return n.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,a){const n=[];a.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,a);return n.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',n.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.a(e.filename,URL.createObjectURL(makeScriptBlob(r)))),n}catch(e){for(const e in n)URL.revokeObjectURL(e);throw e}finally{a.pop()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessCorporation",(function(){return i})),a.d(t,"hasCorporation",(function(){return o})),a.d(t,"startCorporation",(function(){return s}));var n=a(173),r=a(43);function i(){return 3===this.bitNodeN||r.a[3]>0}function o(){return null!=this.corporation&&this.corporation instanceof n.a}function s(e,t=0){this.corporation=new n.a({name:e}),this.corporation.totalShares+=t}},function(e,t,a){"use strict";a.r(t),a.d(t,"canAccessGang",(function(){return s})),a.d(t,"getGangFaction",(function(){return l})),a.d(t,"getGangName",(function(){return c})),a.d(t,"hasGangWith",(function(){return u})),a.d(t,"inGang",(function(){return m})),a.d(t,"startGang",(function(){return h}));var n=a(18),r=a(260),i=a(43),o=a(5);function s(){return 2===this.bitNodeN||!(i.a[2]<=0)&&this.karma<=-54e3*o.a.GangKarmaRequirement}function l(){const e=n.a[this.gang.facName];if(null==e)throw new Error("Gang has invalid faction name: "+this.gang.facName);return e}function c(){return this.inGang()?this.gang.facName:""}function u(e){return this.inGang()&&this.gang.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.r(t),a.d(t,"init",(function(){return re})),a.d(t,"prestigeAugmentation",(function(){return ie})),a.d(t,"prestigeSourceFile",(function(){return oe})),a.d(t,"receiveInvite",(function(){return se})),a.d(t,"calculateSkill",(function(){return le})),a.d(t,"updateSkillLevels",(function(){return ce})),a.d(t,"resetMultipliers",(function(){return ue})),a.d(t,"hasProgram",(function(){return me})),a.d(t,"setMoney",(function(){return he})),a.d(t,"gainMoney",(function(){return pe})),a.d(t,"loseMoney",(function(){return de})),a.d(t,"canAfford",(function(){return fe})),a.d(t,"recordMoneySource",(function(){return ge})),a.d(t,"gainHackingExp",(function(){return ye})),a.d(t,"gainStrengthExp",(function(){return _e})),a.d(t,"gainDefenseExp",(function(){return be})),a.d(t,"gainDexterityExp",(function(){return Ee})),a.d(t,"gainAgilityExp",(function(){return ve})),a.d(t,"gainCharismaExp",(function(){return ke})),a.d(t,"gainIntelligenceExp",(function(){return Ce})),a.d(t,"queryStatFromString",(function(){return Oe})),a.d(t,"resetWorkStatus",(function(){return we})),a.d(t,"processWorkEarnings",(function(){return Se})),a.d(t,"startWork",(function(){return Te})),a.d(t,"cancelationPenalty",(function(){return xe})),a.d(t,"work",(function(){return Me})),a.d(t,"finishWork",(function(){return Pe})),a.d(t,"startWorkPartTime",(function(){return Ae})),a.d(t,"workPartTime",(function(){return Re})),a.d(t,"finishWorkPartTime",(function(){return Ne})),a.d(t,"startFocusing",(function(){return De})),a.d(t,"stopFocusing",(function(){return Ie})),a.d(t,"startFactionWork",(function(){return je})),a.d(t,"startFactionHackWork",(function(){return Le})),a.d(t,"startFactionFieldWork",(function(){return Be})),a.d(t,"startFactionSecurityWork",(function(){return Fe})),a.d(t,"workForFaction",(function(){return We})),a.d(t,"finishFactionWork",(function(){return Ue})),a.d(t,"getWorkMoneyGain",(function(){return Ge})),a.d(t,"getWorkHackExpGain",(function(){return He})),a.d(t,"getWorkStrExpGain",(function(){return Ke})),a.d(t,"getWorkDefExpGain",(function(){return qe})),a.d(t,"getWorkDexExpGain",(function(){return $e})),a.d(t,"getWorkAgiExpGain",(function(){return ze})),a.d(t,"getWorkChaExpGain",(function(){return Ye})),a.d(t,"getWorkRepGain",(function(){return Ve})),a.d(t,"startCreateProgramWork",(function(){return Je})),a.d(t,"createProgramWork",(function(){return Xe})),a.d(t,"finishCreateProgramWork",(function(){return Qe})),a.d(t,"startClass",(function(){return Ze})),a.d(t,"takeClass",(function(){return et})),a.d(t,"finishClass",(function(){return tt})),a.d(t,"startCrime",(function(){return at})),a.d(t,"commitCrime",(function(){return nt})),a.d(t,"finishCrime",(function(){return rt})),a.d(t,"singularityStopWork",(function(){return it})),a.d(t,"takeDamage",(function(){return ot})),a.d(t,"regenerateHp",(function(){return st})),a.d(t,"hospitalize",(function(){return lt})),a.d(t,"applyForJob",(function(){return ct})),a.d(t,"getNextCompanyPosition",(function(){return ut})),a.d(t,"quitJob",(function(){return mt})),a.d(t,"applyForSoftwareJob",(function(){return ht})),a.d(t,"applyForSoftwareConsultantJob",(function(){return pt})),a.d(t,"applyForItJob",(function(){return dt})),a.d(t,"applyForSecurityEngineerJob",(function(){return ft})),a.d(t,"applyForNetworkEngineerJob",(function(){return gt})),a.d(t,"applyForBusinessJob",(function(){return yt})),a.d(t,"applyForBusinessConsultantJob",(function(){return _t})),a.d(t,"applyForSecurityJob",(function(){return bt})),a.d(t,"applyForAgentJob",(function(){return Et})),a.d(t,"applyForEmployeeJob",(function(){return vt})),a.d(t,"applyForPartTimeEmployeeJob",(function(){return kt})),a.d(t,"applyForWaiterJob",(function(){return Ct})),a.d(t,"applyForPartTimeWaiterJob",(function(){return Ot})),a.d(t,"isQualified",(function(){return wt})),a.d(t,"reapplyAllAugmentations",(function(){return St})),a.d(t,"reapplyAllSourceFiles",(function(){return Tt})),a.d(t,"checkForFactionInvitations",(function(){return xt})),a.d(t,"setBitNodeNumber",(function(){return Mt})),a.d(t,"queueAugmentation",(function(){return Pt})),a.d(t,"gainCodingContractReward",(function(){return At})),a.d(t,"travel",(function(){return Rt})),a.d(t,"gotoLocation",(function(){return Nt})),a.d(t,"canAccessResleeving",(function(){return Dt})),a.d(t,"giveExploit",(function(){return It})),a.d(t,"getIntelligenceBonus",(function(){return jt})),a.d(t,"getCasinoWinnings",(function(){return Lt}));var n=a(15),r=a(94),i=a(190),o=a(3),s=a(5),l=a(63),c=a(136),u=a(40),m=a(320),h=a(262),p=a(54),d=a(17),f=a(4),g=a(38),y=a(245),_=a(50),b=a(26),E=a(103),v=a(18),k=a(70),C=a(49),O=a(39),w=a(81),S=a(238),T=a(16),x=a(6),M=a(175),P=a(144),A=a(217),R=a(138),N=a(22),D=a(30),I=a(27),j=a(44),L=a(494),B=a(495),F=a(195),W=a(43),U=a(261),G=a(216),H=a(61),K=a(2),q=a(208),$=a(8),z=a(68),Y=a(11),V=a(62),J=a(10),X=a(123),Q=a(263),Z=a(0),ee=a.n(Z),te=a(34),ae=a.n(te);const ne=1e3/f.a.MilliPerCycle;function re(){var e=Object(D.h)({adminRights:!0,hostname:"home",ip:Object(N.c)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.homeComputer=e.ip,this.currentServer=e.ip,Object(N.a)(e),this.getHomeComputer().programs.push(g.a.NukeProgram.name)}function ie(){var e=this.getHomeComputer();this.currentServer=e.ip,this.homeComputer=e.ip,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=T.a.Sector12,this.location="",this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.resleeves=[];let t=Math.min(3,W.a[10]+(10===this.bitNodeN?1:0))+this.sleevesFromCovenant;this.sleeves.length>t&&(this.sleeves.length=t);for(let e=this.sleeves.length;e<t;e++)this.sleeves.push(new M.a(this));for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]instanceof M.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.updateSkillLevels(),this.hp=this.max_hp}function oe(){this.prestigeAugmentation();for(let e=0;e<this.sleeves.length;++e)this.sleeves[e]instanceof M.a?this.sleeves[e].prestige(this):this.sleeves[e]=new M.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);const e=document.getElementById("character-menu-header");e instanceof HTMLElement&&(e.click(),e.click()),this.timeWorked=0,this.gang=null,Object(C.c)(),this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.corporation=0,this.moneySourceB.reset(),this.playtimeSinceLastBitnode=0,this.augmentations=[]}function se(e){this.factionInvitations.includes(e)||this.factions.includes(e)||(this.firstFacInvRecvd=!0,this.factionInvitations.push(e))}function le(e,t=1){return Object(P.b)(e,t)}function ce(){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;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function ue(){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 me(e){const t=this.getHomeComputer();if(null==t)return!1;for(var a=0;a<t.programs.length;++a)if(e.toLowerCase()==t.programs[a].toLowerCase())return!0;return!1}function he(e){isNaN(e)?console.error("NaN passed into Player.setMoney()"):this.money=new H.a(e)}function pe(e){isNaN(e)?console.error("NaN passed into Player.gainMoney()"):this.money=this.money.plus(e)}function de(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 fe(e){return isNaN(e)?(console.error("NaN passed into Player.canAfford()"),!1):this.money.gte(e)}function ge(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 ye(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(P.b)(this.hacking_exp,this.hacking_mult*s.a.HackingLevelMultiplier))}function _e(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(P.b)(this.strength_exp,this.strength_mult*s.a.StrengthLevelMultiplier))}function be(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(P.b)(this.defense_exp,this.defense_mult*s.a.DefenseLevelMultiplier))}function Ee(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(P.b)(this.dexterity_exp,this.dexterity_mult*s.a.DexterityLevelMultiplier))}function ve(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(P.b)(this.agility_exp,this.agility_mult*s.a.AgilityLevelMultiplier))}function ke(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(P.b)(this.charisma_exp,this.charisma_mult*s.a.CharismaLevelMultiplier))}function Ce(e){isNaN(e)?console.error("ERROR: NaN passed into Player.gainIntelligenceExp()"):(W.a[5]>0||this.intelligence>0)&&(this.intelligence_exp+=e)}function Oe(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:void 0}function we(e,t,a){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="",ae.a.unmountComponentAtNode(document.getElementById("work-in-progress-text")))}function Se(e=1){const t=this.focus?1:.8,a=t*this.workHackExpGainRate*e,n=t*this.workStrExpGainRate*e,r=t*this.workDefExpGainRate*e,i=t*this.workDexExpGainRate*e,o=t*this.workAgiExpGainRate*e,s=t*this.workChaExpGainRate*e,l=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(a),this.gainStrengthExp(n),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(o),this.gainCharismaExp(s),this.gainMoney(l),this.className?this.recordMoneySource(l,"class"):this.recordMoneySource(l,"work"),this.workHackExpGained+=a,this.workStrExpGained+=n,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=o,this.workChaExpGained+=s,this.workRepGained+=t*this.workRepGainRate*e,this.workMoneyGained+=t*this.workMoneyGainRate*e,this.workMoneyGained-=t*this.workMoneyLossRate*e}function Te(e){this.resetWorkStatus(f.a.WorkTypeCompany,e),this.isWorking=!0,this.focus=!0,this.companyName=e,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;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Cancel Work",t.addEventListener("click",()=>(this.finishWork(!0),!1));const a=Object(z.a)("work-in-progress-something-else-button");a.style.visibility="visible",a.innerHTML="Do something else simultaneously",a.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function xe(){const e=j.a[this.companyName];if(e){const t=N.b[e];if(t&&t.backdoorInstalled)return.75}return.5}function Me(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=f.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.a.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.a.MillisecondsPer8Hours)return this.finishWork(!1);const a=u.a[this.companyName];let n="0";null!=a&&a instanceof c.a?n=a.playerReputation:console.error("Could not find Company: "+this.companyName),Object(U.a)(a,this.workRepGainRate,e);const r=this.jobs[this.companyName],i=.5===this.cancelationPenalty()?"half":"three-quarters";var o=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation:"," ",Object(V.a)(n),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(Q.a)(this.workRepGainRate*ne),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.a.formatExp(this.workChaExpGainRate*ne)+" / sec",") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain ",i," of the reputation you've earned so far."),o)}function Pe(e,t=!1){e&&(this.workRepGained*=this.cancelationPenalty());u.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let a=ee.a.createElement(ee.a.Fragment,null,"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(a=e?ee.a.createElement(ee.a.Fragment,null,"You worked a short shift of ",Object(Y.b)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"Since you cancelled your work early, you only gained half of the reputation you earned. ",ee.a.createElement("br",null),ee.a.createElement("br",null),a):ee.a.createElement(ee.a.Fragment,null,"You worked a full shift of 8 hours! ",ee.a.createElement("br",null),ee.a.createElement("br",null),a),t||Object($.a)(a),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),t){var n="You worked a short shift of "+Object(Y.b)(this.timeWorked)+" and earned $"+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatReputation(this.workRepGained)+" reputation, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ae(e){this.resetWorkStatus(f.a.WorkTypeCompanyPartTime,e),this.isWorking=!0,this.focus=!0,this.companyName=e,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;var t=Object(z.a)("work-in-progress-cancel-button");t.innerHTML="Stop Working",t.addEventListener("click",()=>(this.finishWorkPartTime(),!1)),b.Engine.loadWorkInProgressContent()}function Re(e){var t=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=f.a.MillisecondsPer8Hours&&(t=!0,e=Math.round((f.a.MillisecondsPer8Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=f.a.MillisecondsPer8Hours)return this.finishWorkPartTime();var a=u.a[this.companyName],n="0";null!=a&&a instanceof c.a?n=a.playerReputation:console.error("Could not find Company: "+this.companyName);const r=this.jobs[this.companyName],i=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working as a ",r," at ",this.companyName," (Current Company Reputation:"," ",Object(V.a)(n),")",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(V.a)(K.a.formatExp(this.workRepGainRate*ne)+" / sec"),") reputation for this company ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)+" / sec",") hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)+" / sec",") strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)+" / sec",") defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)+" / sec",") dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)+" / sec",") agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.a.formatExp(this.workChaExpGainRate*ne)+" / sec",") charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job."),i)}function Ne(e=!1){u.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const t=ee.a.createElement(ee.a.Fragment,null,"You worked for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the company ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null));if(e||Object($.a)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var a="You worked for "+Object(Y.b)(this.timeWorked)+" and earned a total of $"+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatReputation(this.workRepGained)+" reputation, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),a}this.resetWorkStatus()}function De(){document.getElementById("mainmenu-container").style.visibility="hidden",this.focus=!0,b.Engine.loadWorkInProgressContent()}function Ie(){document.getElementById("mainmenu-container").style.visibility="visible",this.focus=!1,b.Engine.loadTerminalContent()}function je(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=s.a.FactionWorkRepGain,this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=f.a.MillisecondsPer20Hours;const a=Object(z.a)("work-in-progress-cancel-button");a.innerHTML="Stop Faction Work",a.addEventListener("click",()=>(this.finishFactionWork(!0),!1));const n=Object(z.a)("work-in-progress-something-else-button");n.style.visibility="visible",n.innerHTML="Do something else simultaneously",n.addEventListener("click",()=>(this.stopFocusing(),!1)),b.Engine.loadWorkInProgressContent()}function Le(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=(this.hacking_skill+this.intelligence)/f.a.MaxSkillLevel*this.faction_rep_mult*this.getIntelligenceBonus(.5),this.factionWorkType=f.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)}function Be(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(R.a)(this,e),this.factionWorkType=f.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)}function Fe(e){this.resetWorkStatus(f.a.WorkTypeFaction,e.name,f.a.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(R.b)(this,e),this.factionWorkType=f.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)}function We(e){const t=v.a[this.currentWorkFactionName];switch(this.factionWorkType){case f.a.FactionWorkHacking:this.workRepGainRate=Object(R.c)(this,t);break;case f.a.FactionWorkField:this.workRepGainRate=Object(R.a)(this,t);break;case f.a.FactionWorkSecurity:this.workRepGainRate=Object(R.b)(this,t)}var a=!1;if(this.timeWorked+b.Engine._idleSpeed*e>=f.a.MillisecondsPer20Hours&&(a=!0,e=Math.round((f.a.MillisecondsPer20Hours-this.timeWorked)/b.Engine._idleSpeed)),this.timeWorked+=b.Engine._idleSpeed*e,this.processWorkEarnings(e),a||this.timeWorked>=f.a.MillisecondsPer20Hours)return this.finishFactionWork(!1);const n=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently ",this.currentWorkFactionDescription," for your faction ",t.name,ee.a.createElement("br",null),"(Current Faction Reputation: ",Object(V.a)(t.playerReputation),"). ",ee.a.createElement("br",null),"You have been doing this for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"You have earned: ",ee.a.createElement("br",null),ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained})," (",Object(X.a)(this.workMoneyGainRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," (",Object(Q.a)(this.workRepGainRate*ne),") reputation for this faction ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.a.formatExp(this.workChaExpGainRate*ne)," / sec) charisma exp ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",ee.a.createElement("br",null),"There is no penalty for cancelling earlier."),n)}function Ue(e,t=!1){var a=v.a[this.currentWorkFactionName];if(a.playerReputation+=this.workRepGained,this.updateSkillLevels(),t||Object($.a)(ee.a.createElement(ee.a.Fragment,null,"You worked for your faction ",a.name," for a total of ",Object(Y.b)(this.timeWorked)," ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),Object(V.a)(this.workRepGained)," reputation for the faction ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadFactionContent(),Object(k.a)(a.name),t){var n="You worked for your faction "+a.name+" for a total of "+Object(Y.b)(this.timeWorked)+". You earned "+K.a.formatReputation(this.workRepGained)+" rep, "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, and "+K.a.formatExp(this.workChaExpGained)+" cha exp.";return this.resetWorkStatus(),n}this.resetWorkStatus()}function Ge(){let e=1;const t=u.a[this.companyName];W.a[11]>0&&(e=1+t.favor/100);const a=this.jobs[this.companyName],n=p.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 He(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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 Ke(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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 qe(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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 $e(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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 ze(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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 Ye(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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 Ve(){const e=u.a[this.companyName],t=this.jobs[this.companyName],a=p.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;var n=a.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);n+=this.intelligence/f.a.MaxSkillLevel;var r=1+e.favor/100;return isNaN(r)&&(r=1),n*this.company_rep_mult*r}function Je(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeCreateProgram,this.createProgramReqLvl=a,this.timeNeededToCompleteWork=t;for(var n=0;n<this.getHomeComputer().programs.length;++n){var r=this.getHomeComputer().programs[n];if(r.startsWith(e)&&r.endsWith("%-INC")){var i=r.split("-");if(3!=i.length)break;var o=Number(i[1].slice(0,-1));if(isNaN(o)||o<0||o>=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(n,1)}}this.createProgramName=e;var s=Object(z.a)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",()=>(this.finishCreateProgramWork(!0),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function Xe(e){var t=this.createProgramReqLvl,a=this.hacking_skill/t*this.getIntelligenceBonus(3);a=1+(a-1)/5,this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=b.Engine._idleSpeed*e*a;var n=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1);const r=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You are currently working on coding ",n,".",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have been working for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"The program is ",(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",ee.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later."),r)}function Qe(e){var t=this.createProgramName;if(!1===e)Object($.a)("You've finished creating "+t+"!<br>The new program can be found on your home computer."),this.getHomeComputer().programs.push(t);else{var a=t+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(a)}e||this.gainIntelligenceExp(this.createProgramReqLvl/f.a.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadTerminalContent(),this.resetWorkStatus()}function Ze(e,t,a){this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeStudyClass,this.className=a;const n=1e3/b.Engine._idleSpeed;var r=0,i=0,o=0,l=0,c=0,u=0,m=0;const h=this.hashManager;switch(a){case f.a.ClassStudyComputerScience:i=f.a.ClassStudyComputerScienceBaseExp*t/n*h.getStudyMult();break;case f.a.ClassDataStructures:r=f.a.ClassDataStructuresBaseCost*e/n,i=f.a.ClassDataStructuresBaseExp*t/n*h.getStudyMult();break;case f.a.ClassNetworks:r=f.a.ClassNetworksBaseCost*e/n,i=f.a.ClassNetworksBaseExp*t/n*h.getStudyMult();break;case f.a.ClassAlgorithms:r=f.a.ClassAlgorithmsBaseCost*e/n,i=f.a.ClassAlgorithmsBaseExp*t/n*h.getStudyMult();break;case f.a.ClassManagement:r=f.a.ClassManagementBaseCost*e/n,m=f.a.ClassManagementBaseExp*t/n*h.getStudyMult();break;case f.a.ClassLeadership:r=f.a.ClassLeadershipBaseCost*e/n,m=f.a.ClassLeadershipBaseExp*t/n*h.getStudyMult();break;case f.a.ClassGymStrength:r=f.a.ClassGymBaseCost*e/n,o=t/n*h.getTrainingMult();break;case f.a.ClassGymDefense:r=f.a.ClassGymBaseCost*e/n,l=t/n*h.getTrainingMult();break;case f.a.ClassGymDexterity:r=f.a.ClassGymBaseCost*e/n,c=t/n*h.getTrainingMult();break;case f.a.ClassGymAgility:r=f.a.ClassGymBaseCost*e/n,u=t/n*h.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=i*this.hacking_exp_mult*s.a.ClassGymExpGain,this.workStrExpGainRate=o*this.strength_exp_mult*s.a.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*s.a.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*s.a.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*s.a.ClassGymExpGain,this.workChaExpGainRate=m*this.charisma_exp_mult*s.a.ClassGymExpGain;var p=Object(z.a)("work-in-progress-cancel-button");a==f.a.ClassGymStrength||a==f.a.ClassGymDefense||a==f.a.ClassGymDexterity||a==f.a.ClassGymAgility?p.innerHTML="Stop training at gym":p.innerHTML="Stop taking course",p.addEventListener("click",()=>(this.finishClass(),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function et(e){this.timeWorked+=b.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e);const a=document.getElementById("work-in-progress-text");ae.a.render(ee.a.createElement(ee.a.Fragment,null,"You have been ",t," for ",Object(Y.b)(this.timeWorked),ee.a.createElement("br",null),ee.a.createElement("br",null),"This has cost you: ",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:-this.workMoneyGained})," (",Object(X.a)(this.workMoneyLossRate*ne),") ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You have gained: ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," (",K.a.formatExp(this.workHackExpGainRate*ne)," / sec) hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," (",K.a.formatExp(this.workStrExpGainRate*ne)," / sec) strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," (",K.a.formatExp(this.workDefExpGainRate*ne)," / sec) defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," (",K.a.formatExp(this.workDexExpGainRate*ne)," / sec) dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," (",K.a.formatExp(this.workAgiExpGainRate*ne)," / sec) agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," (",K.a.formatExp(this.workChaExpGainRate*ne)," / sec) charisma exp ",ee.a.createElement("br",null),"You may cancel at any time"),a)}function tt(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($.a)(ee.a.createElement(ee.a.Fragment,null,"After ",this.className," for ",Object(Y.b)(this.timeWorked),", ",ee.a.createElement("br",null),"you spent a total of ",ee.a.createElement(J.a,{money:-this.workMoneyGained}),". ",ee.a.createElement("br",null),ee.a.createElement("br",null),"You earned a total of: ",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," hacking exp ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense exp ",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity exp ",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility exp ",ee.a.createElement("br",null),K.a.formatExp(this.workChaExpGained)," charisma exp",ee.a.createElement("br",null))),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,b.Engine.loadLocationContent(!1),e){var t="After "+this.className+" for "+Object(Y.b)(this.timeWorked)+", you spent a total of "+K.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+K.a.formatExp(this.workHackExpGained)+" hacking exp, "+K.a.formatExp(this.workStrExpGained)+" strength exp, "+K.a.formatExp(this.workDefExpGained)+" defense exp, "+K.a.formatExp(this.workDexExpGained)+" dexterity exp, "+K.a.formatExp(this.workAgiExpGained)+" agility exp, and "+K.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}this.resetWorkStatus()}function at(e,t,a,n,r,i,o,l,c,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=f.a.WorkTypeCrime,u&&u.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u.workerscript),this.workHackExpGained=t*this.hacking_exp_mult*s.a.CrimeExpGain,this.workStrExpGained=a*this.strength_exp_mult*s.a.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*s.a.CrimeExpGain,this.workDexExpGained=r*this.dexterity_exp_mult*s.a.CrimeExpGain,this.workAgiExpGained=i*this.agility_exp_mult*s.a.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*s.a.CrimeExpGain,this.workMoneyGained=l*this.crime_money_mult*s.a.CrimeMoney,this.timeNeededToCompleteWork=c;const m=Object(z.a)("work-in-progress-cancel-button");m.innerHTML="Cancel crime",m.addEventListener("click",()=>(this.finishCrime(!0),!1));Object(z.a)("work-in-progress-something-else-button").style.visibility="hidden",b.Engine.loadWorkInProgressContent()}function nt(e){if(this.timeWorked+=b.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),a=Math.round(t/5);a<0&&(a=0),a>20&&(a=20);var n="["+Array(a+1).join("|")+Array(20-a+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".<br>Time remaining: "+Object(Y.b)(this.timeNeededToCompleteWork-this.timeWorked)+"<br>"+n.replace(/ /g,"&nbsp;")}}function rt(e){if(!e){if(Object(y.a)(this,this.crimeType)){let e=null;for(const t in _.a)if(_.a[t].type==this.crimeType){e=_.a[t];break}null==e&&Object($.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,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+K.a.formatMoney(this.workMoneyGained)+", "+K.a.formatExp(this.workHackExpGained)+" hack exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, "+K.a.formatExp(this.workChaExpGained)+" cha exp."):Object($.a)(ee.a.createElement(ee.a.Fragment,null,"Crime successful!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),ee.a.createElement(J.a,{money:this.workMoneyGained}),ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.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,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+K.a.formatExp(this.workHackExpGained)+" hack exp, "+K.a.formatExp(this.workStrExpGained)+" str exp, "+K.a.formatExp(this.workDefExpGained)+" def exp, "+K.a.formatExp(this.workDexExpGained)+" dex exp, "+K.a.formatExp(this.workAgiExpGained)+" agi exp, "+K.a.formatExp(this.workChaExpGained)+" cha exp."):Object($.a)(ee.a.createElement(ee.a.Fragment,null,"Crime failed!",ee.a.createElement("br",null),ee.a.createElement("br",null),"You gained:",ee.a.createElement("br",null),K.a.formatExp(this.workHackExpGained)," hacking experience ",ee.a.createElement("br",null),K.a.formatExp(this.workStrExpGained)," strength experience",ee.a.createElement("br",null),K.a.formatExp(this.workDefExpGained)," defense experience",ee.a.createElement("br",null),K.a.formatExp(this.workDexExpGained)," dexterity experience",ee.a.createElement("br",null),K.a.formatExp(this.workAgiExpGained)," agility experience",ee.a.createElement("br",null),K.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)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),b.Engine.loadLocationContent(!1)}function it(){if(!this.isWorking)return"";var 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 ot(e){if("number"==typeof e)return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0);console.warn("Player.takeDamage() called without a numeric argument: "+e)}function st(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 lt(){const e=Object(G.b)(this);return!1===I.a.SuppressHospitalizationPopup&&Object($.a)(ee.a.createElement(ee.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 ",ee.a.createElement(J.a,{money:e}))),this.loseMoney(e),this.recordMoneySource(-1*e,"hospitalization"),this.hp=this.max_hp,e}function ct(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 t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let i=e;if(!this.isQualified(r,i)){var o=Object(h.a)(r,i);return!t&&void Object($.a)("Unforunately, you do not qualify for this position<br>"+o)}for(;;){let 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){if(this.jobs[r.name]=i.name,this.companyName=this.location,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),t)return!0;Object($.a)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!")}else{var s=Object(m.a)(i);if(null==s){if(t)return!1;Object($.a)("You are already at the highest position for your field! No promotion available")}else if(r.hasPosition(s)){if(t)return!1;o=Object(h.a)(r,s);Object($.a)("Unfortunately, you do not qualify for a promotion<br>"+o)}else{if(t)return!1;Object($.a)("You are already at the highest position for your field! No promotion available")}}}function ut(e,t){var 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=p.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 mt(e){this.isWorking=!1,this.companyName="",delete this.jobs[e]}function ht(e=!1){return this.applyForJob(p.a[d.j[0]],e)}function pt(e=!1){return this.applyForJob(p.a[d.k[0]],e)}function dt(e=!1){return this.applyForJob(p.a[d.d[0]],e)}function ft(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.i[0]])?this.applyForJob(p.a[d.i[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function gt(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.f[0]])?this.applyForJob(p.a[d.f[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function yt(e=!1){return this.applyForJob(p.a[d.b[0]],e)}function _t(e=!1){return this.applyForJob(p.a[d.c[0]],e)}function bt(e=!1){return this.applyForJob(p.a[d.h[2]],e)}function Et(e=!1){var t=u.a[this.location];return this.isQualified(t,p.a[d.a[0]])?this.applyForJob(p.a[d.a[0]],e):!e&&void Object($.a)("Unforunately, you do not qualify for this position")}function vt(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.e[1]])){if(this.companyName=t.name,this.jobs[t.name]=d.e[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.a)("Congratulations, you are now employed at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function kt(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.g[1]])){if(this.jobs[t.name]=d.g[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.a)("Congratulations, you are now employed part-time at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function Ct(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.e[0]])){if(this.companyName=t.name,this.jobs[t.name]=d.e[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.a)("Congratulations, you are now employed as a waiter at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function Ot(e=!1){var t=u.a[this.location];if(this.isQualified(t,p.a[d.g[0]])){if(this.companyName=t.name,this.jobs[t.name]=d.g[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object($.a)("Congratulations, you are now employed as a part-time waiter at "+this.companyName)}else{if(e)return!1;Object($.a)("Unforunately, you do not qualify for this position")}}function wt(e,t){var 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 St(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 a=this.augmentations[e].name;var t=n.a[a];if(null!=t)if(t.owned=!0,t.name!=o.a.NeuroFluxGovernor)Object(r.a)(this.augmentations[e],!0);else for(let a=0;a<t.level;++a)Object(r.a)(this.augmentations[e],!0);else console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${a} will be skipped`)}}function Tt(){for(let t=0;t<this.sourceFiles.length;++t){var e="SourceFile"+this.sourceFiles[t].n;null!=F.a[e]?Object(L.a)(this.sourceFiles[t]):console.error("Invalid source file number: "+this.sourceFiles[t].n)}Object(B.a)()}function xt(){let e=[];var t=this.augmentations.length;const 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}var 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);var 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);var 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);var c=v.a.ECorp;c.isBanned||c.isMember||c.alreadyInvited||!r(x.a.AevumECorp)||e.push(c);var m=v.a.MegaCorp;m.isBanned||m.isMember||m.alreadyInvited||!r(x.a.Sector12MegaCorp)||e.push(m);var h=v.a["Bachman & Associates"];h.isBanned||h.isMember||h.alreadyInvited||!r(x.a.AevumBachmanAndAssociates)||e.push(h);var p=v.a["Blade Industries"];p.isBanned||p.isMember||p.alreadyInvited||!r(x.a.Sector12BladeIndustries)||e.push(p);var d=v.a.NWO;d.isBanned||d.isMember||d.alreadyInvited||!r(x.a.VolhavenNWO)||e.push(d);var g=v.a["Clarke Incorporated"];g.isBanned||g.isMember||g.alreadyInvited||!r(x.a.AevumClarkeIncorporated)||e.push(g);var y=v.a["OmniTek Incorporated"];y.isBanned||y.isMember||y.alreadyInvited||!r(x.a.VolhavenOmniTekIncorporated)||e.push(y);var _=v.a["Four Sigma"];_.isBanned||_.isMember||_.alreadyInvited||!r(x.a.Sector12FourSigma)||e.push(_);var b=v.a["KuaiGong International"];b.isBanned||b.isMember||b.alreadyInvited||!r(x.a.ChongqingKuaiGongInternational)||e.push(b);var E=v.a["Fulcrum Secret Technologies"],k=N.b[j.a[j.b.FulcrumSecretTechnologies]];null==k?console.error("Could not find Fulcrum Secret Technologies Server"):E.isBanned||E.isMember||E.alreadyInvited||!k.backdoorInstalled||!r(x.a.AevumFulcrumTechnologies,25e4)||e.push(E);var C=v.a.BitRunners,w=N.b[j.a[j.b.BitRunnersServer]];null==w?console.error("Could not find BitRunners Server"):C.isBanned||C.isMember||!w.backdoorInstalled||C.alreadyInvited||e.push(C);var S=v.a["The Black Hand"],M=N.b[j.a[j.b.TheBlackHandServer]];null==M?console.error("Could not find The Black Hand Server"):S.isBanned||S.isMember||!M.backdoorInstalled||S.alreadyInvited||e.push(S);var P=v.a.NiteSec,A=N.b[j.a[j.b.NiteSecServer]];null==A?console.error("Could not find NiteSec Server"):P.isBanned||P.isMember||!A.backdoorInstalled||P.alreadyInvited||e.push(P);var R=v.a.Chongqing;R.isBanned||R.isMember||R.alreadyInvited||!this.money.gte(2e7)||this.city!=T.a.Chongqing||e.push(R);var D=v.a["Sector-12"];D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(15e6)||this.city!=T.a.Sector12||e.push(D);var I=v.a["New Tokyo"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(2e7)||this.city!=T.a.NewTokyo||e.push(I);var L=v.a.Aevum;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(4e7)||this.city!=T.a.Aevum||e.push(L);var B=v.a.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=T.a.Ishima||e.push(B);var F=v.a.Volhaven;F.isBanned||F.isMember||F.alreadyInvited||!this.money.gte(5e7)||this.city!=T.a.Volhaven||e.push(F);var W=v.a["Speakers for the Dead"];!W.isBanned&&!W.isMember&&!W.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(x.a.Sector12CIA)&&!a.includes(x.a.Sector12NSA)&&e.push(W);var U=v.a["The Dark Army"];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==T.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!a.includes(x.a.Sector12CIA)&&!a.includes(x.a.Sector12NSA)&&e.push(U);var G=v.a["The Syndicate"];!G.isBanned&&!G.isMember&&!G.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==T.a.Aevum||this.city==T.a.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&!a.includes(x.a.Sector12CIA)&&!a.includes(x.a.Sector12NSA)&&e.push(G);var H=v.a.Silhouette;!H.isBanned&&!H.isMember&&!H.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(H);var K=v.a.Tetrads;!K.isBanned&&!K.isMember&&!K.alreadyInvited&&(this.city==T.a.Chongqing||this.city==T.a.NewTokyo||this.city==T.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(K);var q=v.a["Slum Snakes"];!q.isBanned&&!q.isMember&&!q.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(q);var $=v.a.Netburners,z=0,Y=0,V=0;for(let e=0;e<this.hacknetNodes.length;++e)if(Object(O.g)(this)){const t=N.b[this.hacknetNodes[e]];t&&(V+=t.level,z+=t.maxRam,Y+=t.cores)}else V+=this.hacknetNodes[e].level,z+=this.hacknetNodes[e].ram,Y+=this.hacknetNodes[e].cores;!$.isBanned&&!$.isMember&&!$.alreadyInvited&&this.hacking_skill>=80&&z>=8&&Y>=4&&V>=100&&e.push($);var J=v.a["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=T.a.Chongqing&&this.city!=T.a.NewTokyo&&this.city!=T.a.Ishima||e.push(J);var X=v.a.CyberSec,Q=N.b[j.a[j.b.CyberSecServer]];return null==Q?console.error("Could not find CyberSec Server"):X.isBanned||X.isMember||!Q.backdoorInstalled||X.alreadyInvited||e.push(X),e}function Mt(e){this.bitNodeN=e}function Pt(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.firstAugPurchased=!0,this.queuedAugmentations.push(new i.a(e))}function At(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);var a=f.a.CodingContractBaseFactionRepGain*t;return v.a[e.name].playerReputation+=a,`Gained ${a} faction reputation for ${e.name}`;case l.c.FactionReputationAll:const i=f.a.CodingContractBaseFactionRepGain*t,o=["Bladeburners"];var n=this.factions.slice();if(0==(n=n.filter(e=>!o.includes(e))).length)return e.type=l.c.Money,this.gainCodingContractReward(e,t);const m=Math.floor(i/n.length);for(const e of n)v.a[e]instanceof E.a&&(v.a[e].playerReputation+=m);return`Gained ${m} reputation for each of the following factions: ${n.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);a=f.a.CodingContractBaseCompanyRepGain*t;return u.a[e.name].playerReputation+=a,`Gained ${a} company reputation for ${e.name}`;case l.c.Money:default:var r=f.a.CodingContractBaseMoneyGain*t*s.a.CodingContractMoney;return this.gainMoney(r),this.recordMoneySource(r,"codingcontract"),"Gained "+K.a.formatMoney(r)}}function Rt(e){return null==w.a[e]?(console.warn("Player.travel() called with invalid city: "+e),!1):(this.city=e,!0)}function Nt(e){return null==S.a[e]?(console.warn("Player.gotoLocation() called with invalid location: "+e),!1):(this.location=e,!0)}function Dt(){return 10===this.bitNodeN||W.a[10]>0}function It(e){this.exploits.includes(e)||this.exploits.push(e)}function jt(e){return Object(A.a)(this.intelligence,e)}function Lt(){return this.moneySourceA.casino}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(16),r=a(6),i=a(33);const o=[{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.a.AevumAeroCorp,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.a.AevumBachmanAndAssociates,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.a.AevumClarkeIncorporated,types:[i.a.Company]},{city:n.a.Aevum,costMult:3,expMult:2,name:r.a.AevumCrushFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.a.AevumECorp,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.a.AevumFulcrumTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.a.AevumGalacticCybersystems,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.a.AevumNetLinkTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.a.AevumPolice,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.a.AevumRhoConstruction,types:[i.a.Company]},{city:n.a.Aevum,costMult:10,expMult:5,name:r.a.AevumSnapFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,costMult:4,expMult:3,name:r.a.AevumSummitUniversity,types:[i.a.University]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.a.AevumWatchdogSecurity,types:[i.a.Company]},{city:n.a.Aevum,name:r.a.AevumCasino,types:[i.a.Casino]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.a.ChongqingKuaiGongInternational,types:[i.a.Company]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.a.ChongqingSolarisSpaceSystems,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.a.IshimaNovaMedical,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.a.IshimaOmegaSoftware,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.a.IshimaStormTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.a.NewTokyoDefComm,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.a.NewTokyoGlobalPharmaceuticals,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.a.NewTokyoNoodleBar,types:[i.a.Company,i.a.Special]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.a.NewTokyoVitaLife,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.a.Sector12AlphaEnterprises,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.a.Sector12BladeIndustries,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CIA,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.a.Sector12CarmichaelSecurity,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CityHall,types:[i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12DeltaOne,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12FoodNStuff,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.a.Sector12FourSigma,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.a.Sector12IcarusMicrosystems,types:[i.a.Company]},{city:n.a.Sector12,expMult:1,costMult:1,name:r.a.Sector12IronGym,types:[i.a.Gym]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.a.Sector12JoesGuns,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.a.Sector12MegaCorp,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12NSA,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,costMult:20,expMult:10,name:r.a.Sector12PowerhouseGym,types:[i.a.Gym]},{city:n.a.Sector12,costMult:3,expMult:2,name:r.a.Sector12RothmanUniversity,types:[i.a.University]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12UniversalEnergy,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.a.VolhavenCompuTek,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.a.VolhavenHeliosLabs,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.a.VolhavenLexoCorp,types:[i.a.Company]},{city:n.a.Volhaven,costMult:7,expMult:4,name:r.a.VolhavenMilleniumFitnessGym,types:[i.a.Gym]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.a.VolhavenNWO,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.a.VolhavenOmniTekIncorporated,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.a.VolhavenOmniaCybersystems,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.a.VolhavenSysCoreSecurities,types:[i.a.Company]},{city:n.a.Volhaven,costMult:5,expMult:4,name:r.a.VolhavenZBInstituteOfTechnology,types:[i.a.University]},{city:null,name:r.a.Hospital,types:[i.a.Hospital]},{city:null,name:r.a.Slums,types:[i.a.Slums]},{city:null,name:r.a.TravelAgency,types:[i.a.TravelAgency]},{city:null,name:r.a.WorldStockExchange,types:[i.a.StockMarket]}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(195),r=a(1);function i(e){const t="SourceFile"+e.n,a=n.a[t];if(null!=a){switch(e.n){case 1:{let t=0;for(let a=0;a<e.lvl;++a)t+=16/Math.pow(2,a);const a=1+t/100,n=1-t/100;r.a.hacking_chance_mult*=a,r.a.hacking_speed_mult*=a,r.a.hacking_money_mult*=a,r.a.hacking_grow_mult*=a,r.a.hacking_mult*=a,r.a.strength_mult*=a,r.a.defense_mult*=a,r.a.dexterity_mult*=a,r.a.agility_mult*=a,r.a.charisma_mult*=a,r.a.hacking_exp_mult*=a,r.a.strength_exp_mult*=a,r.a.defense_exp_mult*=a,r.a.dexterity_exp_mult*=a,r.a.agility_exp_mult*=a,r.a.charisma_exp_mult*=a,r.a.company_rep_mult*=a,r.a.faction_rep_mult*=a,r.a.crime_money_mult*=a,r.a.crime_success_mult*=a,r.a.hacknet_node_money_mult*=a,r.a.hacknet_node_purchase_cost_mult*=n,r.a.hacknet_node_ram_cost_mult*=n,r.a.hacknet_node_core_cost_mult*=n,r.a.hacknet_node_level_cost_mult*=n,r.a.work_money_mult*=a;break}case 2:{let t=0;for(let a=0;a<e.lvl;++a)t+=24/Math.pow(2,a);const a=1+t/100;r.a.crime_money_mult*=a,r.a.crime_success_mult*=a,r.a.charisma_mult*=a;break}case 3:{let t=0;for(let a=0;a<e.lvl;++a)t+=8/Math.pow(2,a);const a=1+t/100;r.a.charisma_mult*=a,r.a.work_money_mult*=a;break}case 4:break;case 5:{let t=0;for(let a=0;a<e.lvl;++a)t+=8/Math.pow(2,a);const a=1+t/100;r.a.hacking_chance_mult*=a,r.a.hacking_speed_mult*=a,r.a.hacking_money_mult*=a,r.a.hacking_grow_mult*=a,r.a.hacking_mult*=a,r.a.hacking_exp_mult*=a;break}case 6:{let t=0;for(let a=0;a<e.lvl;++a)t+=8/Math.pow(2,a);const a=1+t/100;r.a.strength_exp_mult*=a,r.a.defense_exp_mult*=a,r.a.dexterity_exp_mult*=a,r.a.agility_exp_mult*=a,r.a.strength_mult*=a,r.a.defense_mult*=a,r.a.dexterity_mult*=a,r.a.agility_mult*=a;break}case 7:{let t=0;for(let a=0;a<e.lvl;++a)t+=8/Math.pow(2,a);const a=1+t/100;r.a.bladeburner_max_stamina_mult*=a,r.a.bladeburner_stamina_gain_mult*=a,r.a.bladeburner_analysis_mult*=a,r.a.bladeburner_success_chance_mult*=a;break}case 8:{let t=0;for(let a=0;a<e.lvl;++a)t+=12/Math.pow(2,a);const a=1+t/100;r.a.hacking_grow_mult*=a;break}case 9:case 10:break;case 11:{let t=0;for(let a=0;a<e.lvl;++a)t+=32/Math.pow(2,a);const a=1+t/100;r.a.work_money_mult*=a,r.a.company_rep_mult*=a;break}case 12:break;default:console.error("Invalid source file number: "+e.n)}a.owned=!0}else console.error("Invalid source file number: "+e.n)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(1);function r(){if(n.a.exploits&&0===n.a.exploits.length)return;const e=Math.pow(1.001,n.a.exploits.length),t=Math.pow(.999,n.a.exploits.length);n.a.hacking_chance_mult*=e,n.a.hacking_speed_mult*=e,n.a.hacking_money_mult*=e,n.a.hacking_grow_mult*=e,n.a.hacking_mult*=e,n.a.strength_mult*=e,n.a.defense_mult*=e,n.a.dexterity_mult*=e,n.a.agility_mult*=e,n.a.charisma_mult*=e,n.a.hacking_exp_mult*=e,n.a.strength_exp_mult*=e,n.a.defense_exp_mult*=e,n.a.dexterity_exp_mult*=e,n.a.agility_exp_mult*=e,n.a.charisma_exp_mult*=e,n.a.company_rep_mult*=e,n.a.faction_rep_mult*=e,n.a.crime_money_mult*=e,n.a.crime_success_mult*=e,n.a.hacknet_node_money_mult*=e,n.a.hacknet_node_purchase_cost_mult*=t,n.a.hacknet_node_ram_cost_mult*=t,n.a.hacknet_node_core_cost_mult*=t,n.a.hacknet_node_level_cost_mult*=t,n.a.work_money_mult*=e}},function(e,t,a){"use strict";a.r(t),a.d(t,"hasTorRouter",(function(){return l})),a.d(t,"getCurrentServer",(function(){return c})),a.d(t,"getHomeComputer",(function(){return u})),a.d(t,"getUpgradeHomeRamCost",(function(){return m})),a.d(t,"createHacknetServer",(function(){return h}));var n=a(4),r=a(5),i=a(72),o=a(22),s=a(44);function l(){return s.a.hasOwnProperty("Darkweb Server")}function c(){return o.b[this.currentServer]}function u(){return o.b[this.homeComputer]}function m(){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 h(){const e="hacknet-node-"+this.hacknetNodes.length,t=new i.a({adminRights:!0,hostname:e,ip:Object(o.c)()});this.hacknetNodes.push(t.ip),Object(o.a)(t);const a=this.getHomeComputer();return a.serversOnNetwork.push(t.ip),t.serversOnNetwork.push(a.ip),t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(19);function i(e){return n.createElement(n.Fragment,null,n.createElement(r.a,{onClick:e.expandAllButtonsFn,text:"Expand All"}),n.createElement(r.a,{onClick:e.collapseAllButtonsFn,text:"Collapse All"}),n.createElement(r.a,{onClick:e.sortInOrderFn,text:"Sort in Order",tooltip:"Sorts the Augmentations alphabetically and Source-Files in numeral order"}),n.createElement(r.a,{onClick:e.sortByAcquirementTimeFn,text:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source-Files based on when you acquired them (same as default)"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(1),i=a(27),o=a(105),s=a(195),l=a(499);function c(){const e=r.a.sourceFiles.slice();i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&e.sort((e,t)=>e.n-t.n);const t=e.map(e=>{const t="SourceFile"+e.n,a=s.a[t];return null==a?(console.error("Invalid source file number: "+e.n),null):n.createElement("li",{key:e.n},n.createElement(l.a,{level:e.lvl,sf:a}))});return n.createElement(n.Fragment,null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(102);function i(e){const t=12===e.sf.n?"∞":"3";return n.createElement(r.a,{headerContent:n.createElement(n.Fragment,null,e.sf.name,n.createElement("br",null),`Level ${e.level} / ${t}`),panelContent:n.createElement("p",{dangerouslySetInnerHTML:{__html:e.sf.info}})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1),i=a(159),o=a(102);function s(){const e=r.a.exploits;return 0===e.length?n.createElement(n.Fragment,null):n.createElement("li",{key:-1},n.createElement(o.a,{headerContent:n.createElement(n.Fragment,null,"Source-File -1: Exploits in the BitNodes",n.createElement("br",null),"Level ",e.length," / ?"),panelContent:n.createElement(n.Fragment,null,n.createElement("p",null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),n.createElement("p",null,"It increases all of the player's multipliers by 0.1%"),n.createElement("br",null),n.createElement("p",null,"You have found the following exploits:"),n.createElement("ul",null,e.map(e=>n.createElement("li",{key:e},"* ",Object(i.b)(e)))))}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(1),i=a(2),o=a(15);function s(){const e=function(){const e={};for(const t of r.a.queuedAugmentations){const a=o.a[t.name];for(const t in a.mults){const n=e[t]?e[t]:1;e[t]=n*a.mults[t]}}return e}();function t(e){return n.createElement("table",null,n.createElement("tbody",null,e.map(e=>n.createElement("tr",{key:e[0]},n.createElement("td",{key:"0"},n.createElement("span",null,e[0]," multiplier: ")),n.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatPercentage(e[1])),function(e){let t=[];return e&&(t=[n.createElement("td",{key:"2"}," ","=>"," "),n.createElement("td",{key:"3"},i.a.formatPercentage(e))]),t}(e[2])))))}return n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement("strong",null,n.createElement("u",null,"Multipliers:"))),n.createElement("br",null),t([["Hacking Chance ",r.a.hacking_chance_mult,r.a.hacking_chance_mult*e.hacking_chance_mult],["Hacking Speed ",r.a.hacking_speed_mult,r.a.hacking_speed_mult*e.hacking_speed_mult],["Hacking Money ",r.a.hacking_money_mult,r.a.hacking_money_mult*e.hacking_money_mult],["Hacking Growth ",r.a.hacking_grow_mult,r.a.hacking_grow_mult*e.hacking_grow_mult]]),n.createElement("br",null),t([["Hacking Level ",r.a.hacking_mult,r.a.hacking_mult*e.hacking_mult],["Hacking Experience ",r.a.hacking_exp_mult,r.a.hacking_exp_mult*e.hacking_exp_mult]]),n.createElement("br",null),t([["Strength Level ",r.a.strength_mult,r.a.strength_mult*e.strength_mult],["Strength Experience ",r.a.strength_exp_mult,r.a.strength_exp_mult*e.strength_exp_mult]]),n.createElement("br",null),t([["Defense Level ",r.a.defense_mult,r.a.defense_mult*e.defense_mult],["Defense Experience ",r.a.defense_exp_mult,r.a.defense_exp_mult*e.defense_exp_mult]]),n.createElement("br",null),t([["Dexterity Level ",r.a.dexterity_mult,r.a.dexterity_mult*e.dexterity_mult],["Dexterity Experience ",r.a.dexterity_exp_mult,r.a.dexterity_exp_mult*e.dexterity_exp_mult]]),n.createElement("br",null),t([["Agility Level ",r.a.agility_mult,r.a.agility_mult*e.agility_mult],["Agility Experience ",r.a.agility_exp_mult,r.a.agility_exp_mult*e.agility_exp_mult]]),n.createElement("br",null),t([["Charisma Level ",r.a.charisma_mult,r.a.charisma_mult*e.charisma_mult],["Charisma Experience ",r.a.charisma_exp_mult,r.a.charisma_exp_mult*e.charisma_exp_mult]]),n.createElement("br",null),t([["Hacknet Node production ",r.a.hacknet_node_money_mult,r.a.hacknet_node_money_mult*e.hacknet_node_money_mult],["Hacknet Node purchase cost ",r.a.hacknet_node_purchase_cost_mult,r.a.hacknet_node_purchase_cost_mult*e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost ",r.a.hacknet_node_ram_cost_mult,r.a.hacknet_node_ram_cost_mult*e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost ",r.a.hacknet_node_core_cost_mult,r.a.hacknet_node_core_cost_mult*e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost ",r.a.hacknet_node_level_cost_mult,r.a.hacknet_node_level_cost_mult*e.hacknet_node_level_cost_mult]]),n.createElement("br",null),t([["Company reputation gain ",r.a.company_rep_mult,r.a.company_rep_mult*e.company_rep_mult],["Faction reputation gain ",r.a.faction_rep_mult,r.a.faction_rep_mult*e.faction_rep_mult],["Salary ",r.a.work_money_mult,r.a.work_money_mult*e.work_money_mult]]),n.createElement("br",null),t([["Crime success ",r.a.crime_success_mult,r.a.crime_success_mult*e.crime_success_mult],["Crime money ",r.a.crime_money_mult,r.a.crime_money_mult*e.crime_money_mult]]),n.createElement("br",null),n.createElement((function(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,t([["Bladeburner Success Chance",r.a.bladeburner_success_chance_mult,r.a.bladeburner_success_chance_mult*e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",r.a.bladeburner_max_stamina_mult,r.a.bladeburner_max_stamina_mult*e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",r.a.bladeburner_stamina_gain_mult,r.a.bladeburner_stamina_gain_mult*e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",r.a.bladeburner_analysis_mult,r.a.bladeburner_analysis_mult*e.bladeburner_analysis_mult]]),n.createElement("br",null)):n.createElement(n.Fragment,null)}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(15),i=a(3),o=a(1),s=a(297);function l(){const e=[];let t=-1;for(let e=o.a.queuedAugmentations.length-1;e>=0;e--)if(o.a.queuedAugmentations[e].name===i.a.NeuroFluxGovernor){t=e;break}for(let a=0;a<o.a.queuedAugmentations.length;a++){const l=o.a.queuedAugmentations[a];if(l.name===i.a.NeuroFluxGovernor&&a!==t)continue;const c=r.a[l.name];let u=null;l.name===i.a.NeuroFluxGovernor&&(u=l.level),e.push(n.createElement("li",{key:`${l.name}${l.level}`},n.createElement(s.a,{aug:c,level:u})))}return n.createElement("ul",{className:"augmentations-list"},e)}},function(e,t,a){"use strict";function n(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}a.d(t,"a",(function(){return n}))},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(2),s=a(62);const l=r.a.Component;class c extends l{render(){const e=r.a.createElement("tr",{id:"character-int-wrapper"},r.a.createElement("td",{className:"character-int-cell"},"Int: "),r.a.createElement("td",{id:"character-int-text",className:"character-int-cell character-stat-cell"},o.a.formatSkill(i.a.intelligence))),t=r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",{className:"character-divider"},r.a.createElement("td",{colSpan:"2"},"Work progress:")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},"+",Object(s.a)(i.a.workRepGained)," rep")),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:"2"},r.a.createElement("button",{onClick:()=>i.a.startFocusing(),id:"character-overview-options-button",className:"character-overview-btn"},"Focus"))));return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{id:"character-hp-wrapper"},r.a.createElement("td",{className:"character-hp-cell"},"HP:"),r.a.createElement("td",{id:"character-hp-text",className:"character-hp-cell character-stat-cell"},o.a.formatHp(i.a.hp)+" / "+o.a.formatHp(i.a.max_hp))),r.a.createElement("tr",{id:"character-money-wrapper"},r.a.createElement("td",{className:"character-money-cell"},"Money: "),r.a.createElement("td",{id:"character-money-text",className:"character-money-cell character-stat-cell"},o.a.formatMoney(i.a.money.toNumber()))),r.a.createElement("tr",{id:"character-hack-wrapper"},r.a.createElement("td",{className:"character-hack-cell"},"Hack: "),r.a.createElement("td",{id:"character-hack-text",className:"character-hack-cell character-stat-cell"},o.a.formatSkill(i.a.hacking_skill))),r.a.createElement("tr",{id:"character-str-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-combat-cell"},"Str: "),r.a.createElement("td",{id:"character-str-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.strength))),r.a.createElement("tr",{id:"character-def-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Def: "),r.a.createElement("td",{id:"character-def-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.defense))),r.a.createElement("tr",{id:"character-dex-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Dex: "),r.a.createElement("td",{id:"character-dex-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.dexterity))),r.a.createElement("tr",{id:"character-agi-wrapper"},r.a.createElement("td",{className:"character-combat-cell"},"Agi: "),r.a.createElement("td",{id:"character-agi-text",className:"character-combat-cell character-stat-cell"},o.a.formatSkill(i.a.agility))),r.a.createElement("tr",{id:"character-cha-wrapper",className:"character-divider"},r.a.createElement("td",{className:"character-cha-cell"},"Cha: "),r.a.createElement("td",{id:"character-cha-text",className:"character-cha-cell character-stat-cell"},o.a.formatSkill(i.a.charisma))),i.a.intelligence>=1&&e,i.a.isWorking&&!i.a.focus&&t)))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return T}));var n=a(3),r=a(63),i=a(203),o=a(40),s=a(38),l=a(18),c=a(1),u=a(296),m=a(22),h=a(72),p=a(30),d=a(99),f=a(59),g=a(113),y=a(80),_=a(146),b=a(8),E=a(10),v=a(0),k=a.n(v);k.a.Component;const C=[1,2,3,4,5,6,7,8,9,10,11,12],O=1e27,w=1e12;function S(e){const[t,a]=Object(v.useState)(0);const{title:n,add:r,subtract:i,reset:o}=e;return k.a.createElement(k.a.Fragment,null,k.a.createElement("button",{className:"std-button add-exp-button",onClick:()=>r(t)},"+"),k.a.createElement("input",{className:"text-input exp-input",type:"number",placeholder:"+/- "+n,value:t,onChange:function(e){a(parseFloat(e.target.value))}}),k.a.createElement("button",{className:"std-button remove-exp-button",onClick:()=>i(t)},"-"),k.a.createElement("button",{className:"std-button",onClick:o},"Reset"))}function T(e){const[t,a]=Object(v.useState)("ECorp"),[T,x]=Object(v.useState)("Illuminati"),[M,P]=Object(v.useState)("NUKE.exe"),[A,R]=Object(v.useState)("home"),[N,D]=Object(v.useState)("Augmented Targeting I"),[I,j]=Object(v.useState)("Find Largest Prime Factor"),[L,B]=Object(v.useState)(0),[F,W]=Object(v.useState)("");function U(e){return function(){c.a.gainMoney(e)}}function G(e,t){return function(a){switch(e){case"hacking":a&&c.a.gainHackingExp(a*t);break;case"strength":a&&c.a.gainStrengthExp(a*t);break;case"defense":a&&c.a.gainDefenseExp(a*t);break;case"dexterity":a&&c.a.gainDexterityExp(a*t);break;case"agility":a&&c.a.gainAgilityExp(a*t);break;case"charisma":a&&c.a.gainCharismaExp(a*t);break;case"intelligence":a&&c.a.gainIntelligenceExp(a*t)}c.a.updateSkillLevels()}}function H(e){return function(t){c.a.karma+=t*e}}function K(e){return function(){switch(e){case"hacking":c.a.hacking_exp=0;break;case"strength":c.a.strength_exp=0;break;case"defense":c.a.defense_exp=0;break;case"dexterity":c.a.dexterity_exp=0;break;case"agility":c.a.agility_exp=0;break;case"charisma":c.a.charisma_exp=0;break;case"intelligence":c.a.intelligence_exp=0}c.a.updateSkillLevels()}}function q(e){return function(t){const a=l.a[T];null==a||isNaN(t)||(a.playerReputation+=t*e)}}function $(e){return function(t){const a=l.a[T];null==a||isNaN(t)||(a.favor+=t*e)}}function z(e,t){return function(){if(0!==t)if(c.a.sourceFiles.some(t=>t.n===e))for(let a=0;a<c.a.sourceFiles.length;a++)c.a.sourceFiles[a].n===e&&(c.a.sourceFiles[a].lvl=t);else c.a.sourceFiles.push(new u.a(e,t));else c.a.sourceFiles=c.a.sourceFiles.filter(t=>t.n!==e)}}function Y(e){return()=>{for(let t=0;t<C.length;t++)z(C[t],e)()}}function V(e){return function(a){const n=o.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function J(e){return function(a){const n=o.a[t];null==n||isNaN(a)||(n.favor+=a*e)}}function X(e){return function(t){c.a.bladeburner&&c.a.bladeburner.changeRank(c.a,t*e)}}function Q(e){return function(t){c.a.bladeburner&&(c.a.bladeburner.storedCycles+=t*e)}}function Z(e){return function(t){c.a.gang&&(c.a.gang.storedCycles+=t*e)}}function ee(e){return function(t){c.a.corporation&&(c.a.corporation.storedCycles+=t*e)}}function te(e){const t=F.replace(/\s/g,"");let a=function(e){return!0};""!==t&&"all"!==t&&(a=function(e){return t.split(",").includes(e)});for(const t in f.a)if(f.a.hasOwnProperty(t)){const n=f.a[t];n instanceof y.a&&a(n.symbol)&&e(n)}}function ae(t){return()=>{c.a.lastUpdate-=t,e.engine._lastUpdate-=t,_.b.saveGame(e.engine.indexedDb),setTimeout(()=>location.reload(),1e3)}}let ne=[];for(const e in l.a)ne.push(k.a.createElement("option",{key:l.a[e].name,value:l.a[e].name},l.a[e].name));let re=[];for(const e in n.a)re.push(k.a.createElement("option",{key:n.a[e],value:n.a[e]},n.a[e]));let ie=[];for(const e in s.a)ie.push(k.a.createElement("option",{key:s.a[e].name,value:s.a[e].name},s.a[e].name));let oe=[];for(const e in m.b){const t=m.b[e].hostname;oe.push(k.a.createElement("option",{key:t,value:t},t))}let se=[];for(const e in o.a){const t=o.a[e].name;se.push(k.a.createElement("option",{key:t,value:t},t))}const le=[],ce=Object.keys(r.d);for(let e=0;e<ce.length;e++){const t=ce[e];le.push(k.a.createElement("option",{key:t,value:t},t))}return k.a.createElement("div",{id:"dev-menu-container",className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h1",null,"Development Menu - Only meant to be used for testing/debugging")),k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Generic")),k.a.createElement("div",{className:"row"},k.a.createElement("button",{className:"std-button",onClick:U(1e6)},"Add ",k.a.createElement(E.a,{money:1e6})),k.a.createElement("button",{className:"std-button",onClick:U(1e9)},"Add ",k.a.createElement(E.a,{money:1e9})),k.a.createElement("button",{className:"std-button",onClick:U(1e12)},"Add ",k.a.createElement(E.a,{money:1e12})),k.a.createElement("button",{className:"std-button",onClick:U(1e15)},"Add ",k.a.createElement(E.a,{money:1e15})),k.a.createElement("button",{className:"std-button",onClick:U(1/0)},"Add ",k.a.createElement(E.a,{money:1/0})),k.a.createElement("button",{className:"std-button",onClick:function(){c.a.getHomeComputer().maxRam*=2}},"Upgrade Home Computer's RAM")),k.a.createElement("div",{className:"row"},k.a.createElement("button",{className:"std-button",onClick:function(){Object(d.a)(c.a.bitNodeN,!0,!0)}},"Quick b1t_flum3.exe"),k.a.createElement("button",{className:"std-button",onClick:function(){Object(d.a)(c.a.bitNodeN,!0)}},"Run b1t_flum3.exe"),k.a.createElement("button",{className:"std-button",onClick:function(){Object(d.a)(c.a.bitNodeN,!1,!0)}},"Quick w0rld_d34m0n"),k.a.createElement("button",{className:"std-button",onClick:function(){Object(d.a)(c.a.bitNodeN)}},"Hack w0rld_d34m0n")),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Experience / Stats")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"All:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button tooltip",onClick:function(){c.a.gainHackingExp(O),c.a.gainStrengthExp(O),c.a.gainDefenseExp(O),c.a.gainDexterityExp(O),c.a.gainAgilityExp(O),c.a.gainCharismaExp(O),c.a.gainIntelligenceExp(O),c.a.updateSkillLevels()}},"Tons of exp",k.a.createElement("span",{className:"tooltiptext"},"Sometimes you just need a ton of experience in every stat")),k.a.createElement("button",{className:"std-button tooltip",onClick:function(){c.a.hacking_exp=0,c.a.strength_exp=0,c.a.defense_exp=0,c.a.dexterity_exp=0,c.a.agility_exp=0,c.a.charisma_exp=0,c.a.intelligence_exp=0,c.a.updateSkillLevels()}},"Reset",k.a.createElement("span",{className:"tooltiptext"},"Reset all experience to 0")))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Hacking:")),k.a.createElement("td",null,k.a.createElement(S,{title:"hacking exp",add:G("hacking",1),subtract:G("hacking",-1),reset:K("hacking")}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Strength:")),k.a.createElement("td",null,k.a.createElement(S,{title:"strength exp",add:G("strength",1),subtract:G("strength",-1),reset:K("strength")}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Defense:")),k.a.createElement("td",null,k.a.createElement(S,{title:"defense exp",add:G("defense",1),subtract:G("defense",-1),reset:K("defense")}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Dexterity:")),k.a.createElement("td",null,k.a.createElement(S,{title:"dexterity exp",add:G("dexterity",1),subtract:G("dexterity",-1),reset:K("dexterity")}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Agility:")),k.a.createElement("td",null,k.a.createElement(S,{title:"agility exp",add:G("agility",1),subtract:G("agility",-1),reset:K("agility")}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Charisma:")),k.a.createElement("td",null,k.a.createElement(S,{title:"charisma exp",add:G("charisma",1),subtract:G("charisma",-1),reset:K("charisma")}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Intelligence:")),k.a.createElement("td",null,k.a.createElement(S,{title:"intelligence exp",add:G("intelligence",1),subtract:G("intelligence",-1),reset:K("intelligence")})),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){0===c.a.intelligence&&(c.a.intelligence=1,c.a.updateSkillLevels())}},"Enable")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.intelligence_exp=0,c.a.intelligence=0,c.a.updateSkillLevels()}},"Disable"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text text-center"},"Karma:")),k.a.createElement("td",null,k.a.createElement(S,{title:"karma",add:H(1),subtract:H(-1),reset:function(){c.a.karma=0}}))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Factions")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Faction:")),k.a.createElement("td",null,k.a.createElement("select",{id:"factions-dropdown",className:"dropdown exp-input",onChange:function(e){x(e.target.value)},value:T},ne))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Invites:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.receiveInvite(T)}},"Receive invite from faction")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in l.a)c.a.receiveInvite(l.a[e].name)}},"Receive all Invites"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Reputation:")),k.a.createElement("td",null,k.a.createElement(S,{title:"reputation",add:q(1),subtract:q(-1),reset:function(){const e=l.a[T];null!=e&&(e.playerReputation=0)}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Favor:")),k.a.createElement("td",null,k.a.createElement(S,{title:"favor",add:$(1),subtract:$(-1),reset:function(){const e=l.a[T];null!=e&&(e.favor=0)}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"All Reputation:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in l.a)l.a[e].playerReputation=O}},"Tons"),k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in l.a)l.a[e].playerReputation=0}},"Reset"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"All Favor:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in l.a)l.a[e].favor=O}},"Tons"),k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in l.a)l.a[e].favor=0}},"Reset"))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Augmentations")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Aug:")),k.a.createElement("td",null,k.a.createElement("select",{id:"dev-augs-dropdown",className:"dropdown",onChange:function(e){D(e.target.value)},value:N},re))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Queue:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.queueAugmentation(N)}},"One"),k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in n.a){const t=n.a[e];c.a.queueAugmentation(t)}}},"All"))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Source-Files")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Exploits:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button touch-right",onClick:function(){c.a.exploits=[]}},"Clear"))),k.a.createElement("tr",{key:"sf-all"},k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"All:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button touch-right",onClick:Y(0)},"0"),k.a.createElement("button",{className:"std-button touch-sides",onClick:Y(1)},"1"),k.a.createElement("button",{className:"std-button touch-sides",onClick:Y(2)},"2"),k.a.createElement("button",{className:"std-button touch-left",onClick:Y(3)},"3"))),C.map(e=>k.a.createElement("tr",{key:"sf-"+e},k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"SF-",e,":")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button touch-right",onClick:z(e,0)},"0"),k.a.createElement("button",{className:"std-button touch-sides",onClick:z(e,1)},"1"),k.a.createElement("button",{className:"std-button touch-sides",onClick:z(e,2)},"2"),k.a.createElement("button",{className:"std-button touch-left",onClick:z(e,3)},"3")))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Programs")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Program:")),k.a.createElement("td",null,k.a.createElement("select",{id:"dev-programs-dropdown",className:"dropdown",onChange:function(e){P(e.target.value)},value:M},ie))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Add:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.hasProgram(M)||c.a.getHomeComputer().programs.push(M)}},"One"),k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in s.a)c.a.hasProgram(s.a[e].name)||c.a.getHomeComputer().programs.push(s.a[e].name)}},"All"))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Servers")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Server:")),k.a.createElement("td",{colSpan:2},k.a.createElement("select",{id:"dev-servers-dropdown",className:"dropdown",onChange:function(e){R(e.target.value)},value:A},oe))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Root:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){const e=Object(p.a)(A);null!==e&&(e instanceof h.a||(e.hasAdminRights=!0,e.sshPortOpen=!0,e.ftpPortOpen=!0,e.smtpPortOpen=!0,e.httpPortOpen=!0,e.sqlPortOpen=!0,e.openPortCount=5))}},"Root one")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in m.b){const t=m.b[e];if(t instanceof h.a)return;t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5}}},"Root all"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Security:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){const e=Object(p.a)(A);null!==e&&(e instanceof h.a||(e.hackDifficulty=e.minDifficulty))}},"Min one")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in m.b){const t=m.b[e];t instanceof h.a||(t.hackDifficulty=t.minDifficulty)}}},"Min all"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Money:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){const e=Object(p.a)(A);null!==e&&(e instanceof h.a||(e.moneyAvailable=e.moneyMax))}},"Max one")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in m.b){const t=m.b[e];t instanceof h.a||(t.moneyAvailable=t.moneyMax)}}},"Max all"))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Companies")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Company:")),k.a.createElement("td",{colSpan:3},k.a.createElement("select",{id:"dev-companies-dropdown",className:"dropdown",onChange:function(e){a(e.target.value)},value:t},se))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Reputation:")),k.a.createElement("td",null,k.a.createElement(S,{title:"reputation",add:V(1),subtract:V(-1),reset:function(){o.a[t].playerReputation=0}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Favor:")),k.a.createElement("td",null,k.a.createElement(S,{title:"favor",add:J(1),subtract:J(-1),reset:function(){o.a[t].favor=0}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"All Reputation:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in o.a)o.a[e].playerReputation=w}},"Tons"),k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in o.a)o.a[e].playerReputation=0}},"Reset"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"All Favor:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in o.a)o.a[e].favor=w}},"Tons"),k.a.createElement("button",{className:"std-button",onClick:function(){for(const e in o.a)o.a[e].favor=0}},"Reset"))))))),c.a.bladeburner instanceof g.a&&k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Bladeburner")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Rank:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.bladeburner&&c.a.bladeburner.changeRank(c.a,w)}},"Tons")),k.a.createElement("td",null,k.a.createElement(S,{title:"rank",add:X(1),subtract:X(-1),reset:function(){c.a.bladeburner.rank=0,c.a.bladeburner.maxRank=0}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Cycles:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.bladeburner&&(c.a.bladeburner.storedCycles+=w)}},"Tons")),k.a.createElement("td",null,k.a.createElement(S,{title:"cycles",add:Q(1),subtract:Q(-1),reset:function(){c.a.bladeburner&&(c.a.bladeburner.storedCycles=0)}}))))))),c.a.inGang()&&k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Gang")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Cycles:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.gang&&(c.a.gang.storedCycles=w)}},"Tons")),k.a.createElement("td",null,k.a.createElement(S,{title:"cycles",add:Z(1),subtract:Z(-1),reset:function(){c.a.gang&&(c.a.gang.storedCycles=0)}}))))))),c.a.hasCorporation()&&k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Corporation")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.corporation&&(c.a.corporation.funds=c.a.corporation.funds.plus(1e99))}},"Tons of funds"),k.a.createElement("button",{className:"std-button",onClick:function(){c.a.corporation&&(c.a.corporation.funds=c.a.corporation.funds.minus(c.a.corporation.funds))}},"Reset funds"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Cycles:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.corporation&&(c.a.corporation.storedCycles=w)}},"Tons")),k.a.createElement("td",null,k.a.createElement(S,{title:"cycles",add:ee(1),subtract:ee(-1),reset:function(){c.a.corporation&&(c.a.corporation.storedCycles=0)}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.corporation&&c.a.corporation.divisions.forEach(e=>{Object.keys(e.products).forEach(t=>{const a=e.products[t];if(void 0===a)throw new Error("Impossible product undefined");a.prog=99.9})})}},"Finish products"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){c.a.corporation&&c.a.corporation.divisions.forEach(e=>{e.sciResearch.qty+=1e10})}},"Tons of research"))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Coding Contracts")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:i.b},"Generate Random Contract"),k.a.createElement("button",{className:"std-button",onClick:i.c},"Generate Random Contract on Home Comp"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("select",{id:"contract-types-dropdown",className:"dropdown",onChange:function(e){j(e.target.value)},value:I},le),k.a.createElement("button",{className:"std-button",onClick:function(){Object(i.a)({problemType:I,server:"home"})}},"Generate Specified Contract Type on Home Comp"))))))),c.a.hasWseAccount&&k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Stock Market")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Symbol:")),k.a.createElement("td",null,k.a.createElement("input",{id:"dev-stock-symbol",className:"text-input",type:"text",placeholder:"symbol/'all'",onChange:function(e){W(e.target.value)}}))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Price:")),k.a.createElement("td",null,k.a.createElement("input",{id:"dev-stock-price",className:"text-input",type:"number",placeholder:"$$$",onChange:function(e){B(parseFloat(e.target.value))}}),k.a.createElement("button",{className:"std-button",onClick:function(){isNaN(L)||te(e=>{e.price=L})}},"Set"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Caps:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){let e=[];te(t=>{e.push(k.a.createElement("tr",{key:t.symbol},k.a.createElement("td",null,t.symbol),k.a.createElement("td",{style:{textAlign:"right"}},k.a.createElement(E.a,{money:t.cap}))))}),Object(b.a)(k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("th",null,"Stock"),k.a.createElement("th",null,"Price cap")),e)))}},"View stock caps"))))))),c.a.sleeves.length>0&&k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Sleeves")),k.a.createElement("table",null,k.a.createElement("tbody",null,k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Shock:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(let e=0;e<c.a.sleeves.length;++e)c.a.sleeves[e].shock=0}},"Max all")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(let e=0;e<c.a.sleeves.length;++e)c.a.sleeves[e].shock=100}},"Clear all"))),k.a.createElement("tr",null,k.a.createElement("td",null,k.a.createElement("span",{className:"text"},"Sync:")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(let e=0;e<c.a.sleeves.length;++e)c.a.sleeves[e].sync=100}},"Max all")),k.a.createElement("td",null,k.a.createElement("button",{className:"std-button",onClick:function(){for(let e=0;e<c.a.sleeves.length;++e)c.a.sleeves[e].sync=0}},"Clear all"))))))),k.a.createElement("div",{className:"row"},k.a.createElement("div",{className:"col"},k.a.createElement("div",{className:"row"},k.a.createElement("h2",null,"Offline time skip:")),k.a.createElement("div",{className:"row"},k.a.createElement("button",{className:"std-button",onClick:ae(6e4)},"1 minute"),k.a.createElement("button",{className:"std-button",onClick:ae(36e5)},"1 hour"),k.a.createElement("button",{className:"std-button",onClick:ae(864e5)},"1 day")))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(18),o=a(70);function s(e){const t=Object(n.useState)(!1)[1];return r.a.createElement("div",{id:"factions-container"},r.a.createElement("h1",null,"Factions"),r.a.createElement("p",null,"Lists all factions you have joined"),r.a.createElement("br",null),r.a.createElement("ul",null,e.player.factions.map(t=>r.a.createElement("li",{key:t},r.a.createElement("a",{className:"a-link-button",onClick:()=>function(t){e.engine.loadFactionContent(),Object(o.a)(t)}(t),style:{padding:"4px",margin:"4px",display:"inline-block"}},t)))),r.a.createElement("br",null),r.a.createElement("h1",null,"Outstanding Faction Invitations"),r.a.createElement("p",{style:{width:"70%"}},"Lists factions you have been invited to. You can accept these faction invitations at any time."),r.a.createElement("ul",null,e.player.factionInvitations.map(e=>r.a.createElement("li",{key:e,style:{padding:"6px",margin:"6px"}},r.a.createElement("p",{style:{display:"inline",margin:"4px",padding:"4px"}},e),r.a.createElement("a",{className:"a-link-button",onClick:a=>function(e,a){e.isTrusted&&(Object(o.d)(i.a[a]),t(e=>!e))}(a,e),style:{display:"inline",margin:"4px",padding:"4px"}},"Accept Faction Invitation")))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(508),o=a(510),s=a(511);function l(e){return r.a.createElement("div",{id:"bladeburner-container"},r.a.createElement("div",{style:{height:"60%",display:"block",position:"relative"}},r.a.createElement("div",{style:{height:"100%",width:"30%",display:"inline-block",border:"1px solid white"}},r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player,engine:e.engine})),r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player})),r.a.createElement("div",{style:{width:"70%",display:"block",border:"1px solid white",marginTop:"6px",padding:"6px",position:"relative"}},r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(11),o=a(36),s=a(10),l=a(134),c=a(2),u=a(8),m=a(20),h=a(18),p=a(70),d=a(509);function f(e){const t=Object(n.useState)(!1)[1];return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Rank: ",Object(i.c)(e.bladeburner.rank,2),r.a.createElement("span",{className:"tooltiptext"},"Your rank within the Bladeburner division.")),r.a.createElement("br",null),r.a.createElement("p",null,"Stamina: ",Object(i.c)(e.bladeburner.stamina,3)," / ",Object(i.c)(e.bladeburner.maxStamina,3)),r.a.createElement("div",{className:"help-tip",onClick:function(){Object(u.a)("Performing actions will use up your stamina.<br><br>Your max stamina is determined primarily by your agility stat.<br><br>Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.<br><br>Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).<br><br>Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}},"?"),r.a.createElement("br",null),r.a.createElement("p",null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement("p",null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement("p",null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement("p",null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement("p",null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement("p",null,"Current City: ",e.bladeburner.city),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Population: ",c.a.formatPopulation(e.bladeburner.getCurrentCity().popEst),r.a.createElement("span",{className:"tooltiptext"},"This is your Bladeburner division's estimate of how many Synthoids exist in your current city.")),r.a.createElement("div",{className:"help-tip",onClick:function(){Object(u.a)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.<br><br>Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.<br><br>The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}},"?"),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Est. Synthoid Communities: ",Object(i.c)(e.bladeburner.getCurrentCity().comms,0),r.a.createElement("span",{className:"tooltiptext"},"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"City Chaos: ",Object(i.c)(e.bladeburner.getCurrentCity().chaos),r.a.createElement("span",{className:"tooltiptext"},"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3),r.a.createElement("br",null),r.a.createElement("span",{className:"tooltiptext"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")),r.a.createElement("p",null,"Skill Points: ",Object(i.c)(e.bladeburner.skillPoints,0)),r.a.createElement("br",null),Object(l.a)([["Aug. Success Chance mult: ",Object(i.c)(100*e.player.bladeburner_success_chance_mult,1)+"%"],["Aug. Max Stamina mult: ",Object(i.c)(100*e.player.bladeburner_max_stamina_mult,1)+"%"],["Aug. Stamina Gain mult: ",Object(i.c)(100*e.player.bladeburner_stamina_gain_mult,1)+"%"],["Aug. Field Analysis mult: ",Object(i.c)(100*e.player.bladeburner_analysis_mult,1)+"%"]]),r.a.createElement("br",null),r.a.createElement("a",{onClick:function(){const t="bladeburner-travel-popup";Object(m.a)(t,d.a,{bladeburner:e.bladeburner,popupId:t})},className:"a-link-button",style:{display:"inline-block"}},"Travel"),r.a.createElement("a",{onClick:function(){const t=h.a.Bladeburners;t.isMember?(e.engine.loadFactionContent(),Object(p.a)("Bladeburners")):e.bladeburner.rank>=o.a.RankNeededForFaction?(Object(p.d)(t),Object(u.a)("Congratulations! You were accepted into the Bladeburners faction")):Object(u.a)("You need a rank of 25 to join the Bladeburners Faction!")},className:"a-link-button tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},"Apply to the Bladeburner Faction, or go to the faction page if you are already a member"),"Faction"),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(20),o=a(239);function s(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise."),r.a.createElement(o.a,{currentCity:e.bladeburner.city,onTravel:t=>function(t){e.bladeburner.city=t,Object(i.b)(e.popupId)}(t)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n);function i(e){return r.a.createElement("tr",null,r.a.createElement("td",{className:"bladeburner-console-line",style:{color:"var(--my-font-color)",whiteSpace:"pre-wrap"}},e.content))}function o(e){const t=Object(n.useRef)(null),a=Object(n.useState)(!1)[1],[o,s]=Object(n.useState)(e.bladeburner.consoleHistory.length);function l(){t.current&&(t.current.scrollTop=t.current.scrollHeight)}function c(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(c,1e3),t=setInterval(l,100);return()=>{clearInterval(e),clearInterval(t)}},[]),r.a.createElement("div",{ref:t,className:"bladeburner-console-div"},r.a.createElement("table",{className:"bladeburner-console-table"},r.a.createElement("tbody",null,e.bladeburner.consoleLogs.map((e,t)=>r.a.createElement(i,{key:t,content:e})),r.a.createElement("tr",{key:"input",id:"bladeburner-console-input-row",className:"bladeburner-console-input-row"},r.a.createElement("td",{className:"bladeburner-console-input-cell"},r.a.createElement("pre",null,"> "),r.a.createElement("input",{autoFocus:!0,className:"bladeburner-console-input",tabIndex:1,type:"text",onKeyDown:function(t){if(13===t.keyCode){t.preventDefault();const a=t.currentTarget.value;t.currentTarget.value="",a.length>0&&(e.bladeburner.postToConsole("> "+a),e.bladeburner.executeConsoleCommands(e.player,a),s(e.bladeburner.consoleHistory.length),c())}const a=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=o;const n=a.length;if(0===n)return;(e<0||e>n)&&s(n),0!==e&&(e-=1),s(e);const r=a[e];t.currentTarget.value=r}if(40===t.keyCode){const e=o,n=a.length;if(0==n)return;if((e<0||e>n)&&s(n),e==n||e==n-1)s(n),t.currentTarget.value="";else{s(o+1);const e=a[o+1];t.currentTarget.value=e}}}}))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(512),o=a(515),s=a(518),l=a(521),c=a(524),u=a(154);function m(e){const[t,a]=Object(n.useState)("General"),m=Object(n.useState)(!1)[1];function h(e){return r.a.createElement("a",{onClick:()=>a(e.name),className:t!==e.name?"bladeburner-nav-button noselect":"bladeburner-nav-button-inactive noselect"},e.name)}return Object(n.useEffect)(()=>{const e=setInterval(()=>m(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(h,{name:"General"}),r.a.createElement(h,{name:"Contracts"}),r.a.createElement(h,{name:"Operations"}),r.a.createElement(h,{name:"BlackOps"}),r.a.createElement(h,{name:"Skills"}),r.a.createElement("div",{style:{display:"block",margin:"4px",padding:"4px"}},"General"===t&&r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player}),"Contracts"===t&&r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player}),"Operations"===t&&r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player}),"BlackOps"===t&&r.a.createElement(l.a,{bladeburner:e.bladeburner,player:e.player}),"Skills"===t&&r.a.createElement(c.a,{bladeburner:e.bladeburner})),r.a.createElement("span",{className:"text"},u.b," = This action requires stealth, ",u.a," = This action involves retirement"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(513);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(514),o=a(148);function s(e){const t=[];for(const e in o.a)o.a.hasOwnProperty(e)&&t.push(o.a[e]);return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t.name,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(25),o=a(131),s=a(11),l=a(93);function c(e){const t=Object(n.useState)(!1)[1],a=e.action.name===e.bladeburner.action.name,c=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),u=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),m="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(l.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(c,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(l.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:c/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a[e.action.name],e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},"Time Required: ",Object(s.b)(1e3*u),-1!==m&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.c)(100*m,1),"%")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(516);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(517);function o(e){const t=Object.keys(e.bladeburner.contracts),a=e.bladeburner.contracts;return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:a[t],player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(25),o=a(131),s=a(11),l=a(154),c=a(36),u=a(240),m=a(93);function h(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.action.type===i.a.Contract&&e.action.name===e.bladeburner.action.name,h=e.action.getEstSuccessChance(e.bladeburner),p=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),d=e.action.level>=e.action.maxLevel,f=e.action.getActionTime(e.bladeburner),g=`bladeburner-${e.action.name}-autolevel-checkbox`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(p,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(m.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:p/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a.Contract,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(c.a.ContractSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),r.a.createElement("a",{onClick:function(){++e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(d?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),r.a.createElement("a",{onClick:function(){--e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(e.action.level<=1?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},r.a.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),"Estimated success chance: ",r.a.createElement(u.a,{chance:h})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*f),r.a.createElement("br",null),"Contracts remaining: ",Math.floor(e.action.count),r.a.createElement("br",null),"Successes: ",e.action.successes,r.a.createElement("br",null),"Failures: ",e.action.failures),r.a.createElement("br",null),r.a.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:g},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:g,checked:e.action.autoLevel,onChange:function(a){e.action.autoLevel=a.target.checked,t(e=>!e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(519);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",n.createElement("br",null),n.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",n.createElement("br",null),n.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(520);function o(e){const t=Object.keys(e.bladeburner.operations),a=e.bladeburner.operations;return r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t,className:"bladeburner-action"},r.a.createElement(i.a,{bladeburner:e.bladeburner,action:a[t],player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(25),o=a(131),s=a(11),l=a(154),c=a(36),u=a(20),m=a(298),h=a(240),p=a(93);function d(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.action.type===i.a.Operation&&e.action.name===e.bladeburner.action.name,d=e.action.getEstSuccessChance(e.bladeburner),f=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),g=e.action.level>=e.action.maxLevel,y=e.action.getActionTime(e.bladeburner),_=`bladeburner-${e.action.name}-autolevel-checkbox`;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.b,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(f,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(p.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(o.a)({progress:f/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{onClick:function(){e.bladeburner.action.type=i.a.Operation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},className:"a-link-button",style:{margin:"3px",padding:"3px"}},"Start"),r.a.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";Object(u.a)(t,m.a,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",Object(s.c)(e.action.teamCount,0),")")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{className:"tooltip",style:{display:"inline-block"}},r.a.createElement("span",{className:"tooltiptext"},e.action.getSuccessesNeededForNextLevel(c.a.OperationSuccessesPerLevel)," successes needed for next level"),"Level: ",e.action.level," / ",e.action.maxLevel),r.a.createElement("a",{onClick:function(){++e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(g?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↑"),r.a.createElement("a",{onClick:function(){--e.action.level,a&&e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)},style:{padding:"2px",margin:"2px"},className:"tooltip "+(e.action.level<=1?"a-link-button-inactive":"a-link-button")},a&&r.a.createElement("span",{className:"tooltiptext"},"WARNING: changing the level will restart the Operation"),"↓"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},r.a.createElement("span",{dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),"Estimated success chance: ",r.a.createElement(h.a,{chance:d})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*y),r.a.createElement("br",null),"Operations remaining: ",Math.floor(e.action.count),r.a.createElement("br",null),"Successes: ",e.action.successes,r.a.createElement("br",null),"Failures: ",e.action.failures),r.a.createElement("br",null),r.a.createElement("label",{className:"tooltip",style:{color:"white"},htmlFor:_},"Autolevel:",r.a.createElement("span",{className:"tooltiptext"},"Automatically increase operation level when possible")),r.a.createElement("input",{type:"checkbox",id:_,checked:e.action.autoLevel,onChange:function(a){e.action.autoLevel=a.target.checked,t(e=>!e)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(522);function i(e){return n.createElement(n.Fragment,null,n.createElement("p",{style:{display:"block",margin:"4px",padding:"4px"}},"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",n.createElement("br",null),n.createElement("br",null),n.createElement("b",null,"Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops."),n.createElement("br",null),n.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),n.createElement(r.a,{bladeburner:e.bladeburner,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(147),o=a(523);function s(e){let t=[];for(const e in i.a)i.a.hasOwnProperty(e)&&t.push(i.a[e]);return t.sort((function(e,t){return e.reqdRank-t.reqdRank})),t=t.filter((a,n)=>!(null==e.bladeburner.blackops[t[n].name]&&0!==n&&null==e.bladeburner.blackops[t[n-1].name])),t=t.reverse(),r.a.createElement(r.a.Fragment,null,t.map(t=>r.a.createElement("li",{key:t.name,className:"bladeburner-action"},r.a.createElement(o.a,{bladeburner:e.bladeburner,action:t,player:e.player}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(11),o=a(25),s=a(131),l=a(154),c=a(20),u=a(298),m=a(240),h=a(93);function p(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,p=e.action.getEstSuccessChance(e.bladeburner),d=e.action.getActionTime(e.bladeburner),f=e.bladeburner.rank>=e.action.reqdRank,g=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete);return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(h.b,{value:e.action.name})," (IN PROGRESS - ",Object(i.c)(g,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")"):r.a.createElement(h.b,{value:e.action.name})),a?r.a.createElement("p",{style:{display:"block"}},Object(s.a)({progress:g/e.bladeburner.actionTimeToComplete})):r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:f?"a-link-button":"a-link-button-inactive",style:{margin:"3px",padding:"3px"},onClick:function(){e.bladeburner.action.type=o.a.BlackOperation,e.bladeburner.action.name=e.action.name,e.bladeburner.startAction(e.player,e.bladeburner.action),t(e=>!e)}},"Start"),r.a.createElement("a",{onClick:function(){const t="bladeburner-operation-set-team-size-popup";Object(c.a)(t,u.a,{bladeburner:e.bladeburner,action:e.action,popupId:t})},style:{margin:"3px",padding:"3px"},className:"a-link-button"},"Set Team Size (Curr Size: ",Object(i.c)(e.action.teamCount,0),")")),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.action.desc}}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"block",color:f?"white":"red"}},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement("pre",{style:{display:"inline-block"}},"Estimated Success Chance: ",r.a.createElement(m.a,{chance:p})," ",e.action.isStealth?l.b:r.a.createElement(r.a.Fragment,null),e.action.isKill?l.a:r.a.createElement(r.a.Fragment,null),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*d)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(525),o=a(36),s=a(11);function l(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.skillMultipliers;function l(e){return e&&1!==e}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("strong",null,"Skill Points: ",Object(s.c)(e.bladeburner.skillPoints,0))),r.a.createElement("p",null,"You will gain one skill point every ",o.a.RanksPerSkillPoint," ranks.",r.a.createElement("br",null),r.a.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.",r.a.createElement("br",null)),r.a.createElement("br",null),l(a.successChanceAll)&&r.a.createElement("p",null,"Total Success Chance: x",Object(s.c)(a.successChanceAll,3)),l(a.successChanceStealth)&&r.a.createElement("p",null,"Stealth Success Chance: x",Object(s.c)(a.successChanceStealth,3)),l(a.successChanceKill)&&r.a.createElement("p",null,"Retirement Success Chance: x",Object(s.c)(a.successChanceKill,3)),l(a.successChanceContract)&&r.a.createElement("p",null,"Contract Success Chance: x",Object(s.c)(a.successChanceContract,3)),l(a.successChanceOperation)&&r.a.createElement("p",null,"Operation Success Chance: x",Object(s.c)(a.successChanceOperation,3)),l(a.successChanceEstimate)&&r.a.createElement("p",null,"Synthoid Data Estimate: x",Object(s.c)(a.successChanceEstimate,3)),l(a.actionTime)&&r.a.createElement("p",null,"Action Time: x",Object(s.c)(a.actionTime,3)),l(a.effHack)&&r.a.createElement("p",null,"Hacking Skill: x",Object(s.c)(a.effHack,3)),l(a.effStr)&&r.a.createElement("p",null,"Strength: x",Object(s.c)(a.effStr,3)),l(a.effDef)&&r.a.createElement("p",null,"Defense: x",Object(s.c)(a.effDef,3)),l(a.effDex)&&r.a.createElement("p",null,"Dexterity: x",Object(s.c)(a.effDex,3)),l(a.effAgi)&&r.a.createElement("p",null,"Agility: x",Object(s.c)(a.effAgi,3)),l(a.effCha)&&r.a.createElement("p",null,"Charisma: x",Object(s.c)(a.effCha,3)),l(a.effInt)&&r.a.createElement("p",null,"Intelligence: x",Object(s.c)(a.effInt,3)),l(a.stamina)&&r.a.createElement("p",null,"Stamina: x",Object(s.c)(a.stamina,3)),l(a.money)&&r.a.createElement("p",null,"Contract Money: x",Object(s.c)(a.money,3)),l(a.expGain)&&r.a.createElement("p",null,"Exp Gain: x",Object(s.c)(a.expGain,3)),r.a.createElement("br",null),r.a.createElement(i.a,{bladeburner:e.bladeburner,onUpgrade:()=>t(e=>!e)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(526),i=a(139);function o(e){return n.createElement(n.Fragment,null,Object.keys(i.a).map(t=>n.createElement("li",{key:t,className:"bladeburner-action"},n.createElement(r.a,{bladeburner:e.bladeburner,skill:i.a[t],onUpgrade:e.onUpgrade}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(93),o=a(11);function s(e){const t=e.skill.name;let a=0;e.bladeburner.skills[t]&&!isNaN(e.bladeburner.skills[t])&&(a=e.bladeburner.skills[t]);const n=e.skill.calculateCost(a),s=e.bladeburner.skillPoints>=n,l=!!e.skill.maxLvl&&a>=e.skill.maxLvl;return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{style:{display:"inline-block"}},r.a.createElement(i.b,{value:e.skill.name})),r.a.createElement("a",{onClick:function(){e.bladeburner.skillPoints<n||(e.bladeburner.skillPoints-=n,e.bladeburner.upgradeSkill(e.skill),e.onUpgrade())},style:{display:"inline-block",margin:"3px",padding:"3px"},className:s&&!l?"a-link-button":"a-link-button-inactive"},"Level"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"block"}},"Level: ",a),l?r.a.createElement("p",{style:{color:"red",display:"block"}},"MAX LEVEL"):r.a.createElement("p",{style:{display:"block"}},"Skill Points required: ",Object(o.c)(n,0)),r.a.createElement("p",{style:{display:"inline-block"},dangerouslySetInnerHTML:{__html:e.skill.desc}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(528),o=a(541),s=a(70);function l(e){const[t,a]=Object(n.useState)(!0),l=Object(n.useState)(!1)[1];return Object(n.useEffect)(()=>{const e=setInterval(()=>l(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{id:"gang-container"},r.a.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){e.engine.loadFactionContent(),Object(s.a)(e.gang.facName)}},"Back"),r.a.createElement("a",{className:t?"a-link-button-inactive":"a-link-button",style:{display:"inline-block"},onClick:()=>a(!0)},"Gang Management"),r.a.createElement("a",{className:t?"a-link-button":"a-link-button-inactive",style:{display:"inline-block"},onClick:()=>a(!1)},"Gang Territory"),t?r.a.createElement(i.a,{gang:e.gang,player:e.player}):r.a.createElement(o.a,{gang:e.gang}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(529),o=a(531);function s(e){return r.a.createElement("div",{style:{display:"block"}},r.a.createElement("p",{className:"noselect",style:{width:"70%"}},"This page is used to manage your gang members and get an overview of your gang's stats.",r.a.createElement("br",null),r.a.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",e.gang.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.a.createElement("br",null),r.a.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.a.createElement("br",null),r.a.createElement(i.a,{gang:e.gang}),r.a.createElement("br",null),r.a.createElement(o.a,{gang:e.gang,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(18),o=a(11),s=a(2),l=a(123),c=a(62),u=a(49),m=a(530);function h(e){const t=100*u.a[e.gang.facName].territory;let a;return a=t<=0?Object(o.c)(0,2):t>=100?Object(o.c)(100,2):Object(o.c)(t,2),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Respect: ",s.a.formatRespect(e.gang.respect)," (",s.a.formatRespect(5*e.gang.respectGainRate)," / sec)",r.a.createElement("span",{className:"tooltiptext"},"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level: ",s.a.formatWanted(e.gang.wanted)," (",s.a.formatWanted(5*e.gang.wantedGainRate)," / sec)",r.a.createElement("span",{className:"tooltiptext"},"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.")),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Wanted Level Penalty: -",Object(o.c)(100*(1-e.gang.getWantedPenalty()),2),"%",r.a.createElement("span",{className:"tooltiptext"},"Penalty for respect and money gain rates due to Wanted Level")),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement("p",{style:{display:"inline-block"}},"Money gain rate: ",Object(l.a)(5*e.gang.moneyGainRate))),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Territory: ",a,"%",r.a.createElement("span",{className:"tooltiptext"},"The percentage of total territory your Gang controls")),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"}},"Faction reputation: ",Object(c.a)(i.a[e.gang.facName].playerReputation)),r.a.createElement("br",null),r.a.createElement(m.a,{gang:e.gang}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(4),i=a(11);function o(e){const t=1e3/r.a._idleSpeed;if(e.gang.storedCycles/t*1e3<=5e3)return n.createElement(n.Fragment,null);const a=e.gang.storedCycles/t*1e3;return n.createElement(n.Fragment,null,n.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Bonus time: ",Object(i.b)(a),n.createElement("span",{className:"tooltiptext noselect"},"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")),n.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(532),o=a(533),s=a(20),l=a(539);function c(e){const[t,a]=Object(n.useState)(""),c=Object(n.useState)(!1)[1];const u=e.gang.members.filter(e=>e.name.indexOf(t)>-1||e.task.indexOf(t)>-1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{onRecruit:()=>c(e=>!e),gang:e.gang}),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input noselect",placeholder:"Filter gang member",style:{margin:"5px",padding:"5px"},value:t,onChange:function(e){a(e.target.value)}}),r.a.createElement("a",{className:"a-link-button",style:{display:"inline-block"},onClick:function(){Object(s.a)("gang-upgrade-popup",i.a,{gang:e.gang,player:e.player,popupId:"gang-upgrade-popup"})}},"Manage Equipment"),r.a.createElement("ul",null,u.map(t=>r.a.createElement("li",{key:t.name},r.a.createElement(o.a,{gang:e.gang,member:t})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(11),o=a(2),s=a(116),l=a(10),c=a(20),u=a(90);function m(e){const t=Object.keys(s.a).filter(t=>{const a=s.a[t];return!e.player.money.gt(e.gang.getUpgradeCost(a))&&(a.type===e.type&&!e.upgrades.includes(t))}).map(e=>s.a[e]);return 0===t.length?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Next at ",r.a.createElement(l.a,{money:t[0].cost}))}function h(e){const t=Object(n.useState)(!1)[1];function a(t,a){return Object.keys(s.a).filter(n=>{const r=s.a[n];return!e.player.money.lt(e.gang.getUpgradeCost(r))&&(r.type===a&&!t.includes(n))}).map(e=>s.a[e])}const o=a(e.member.upgrades,u.a.Weapon),c=a(e.member.upgrades,u.a.Armor),h=a(e.member.upgrades,u.a.Vehicle),p=a(e.member.upgrades,u.a.Rootkit),d=a(e.member.augmentations,u.a.Augmentation);function f(e){const t=s.a[e];return r.a.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},t.name,r.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:t.desc}}))}function g(a,n=!1){return r.a.createElement("a",{key:a.name,className:"a-link-button tooltip",style:{margin:"2px",padding:"2px",display:"block",fontSize:"11px"},onClick:function(){e.member.buyUpgrade(a,e.player,e.gang),t(e=>!e)}},a.name," - ",r.a.createElement(l.a,{money:e.gang.getUpgradeCost(a),player:e.player}),r.a.createElement("span",{className:n?"tooltiptextleft":"tooltiptext",dangerouslySetInnerHTML:{__html:a.desc}}))}const y=e.member.calculateAscensionMult(e.member.hack_asc_points),_=e.member.calculateAscensionMult(e.member.str_asc_points),b=e.member.calculateAscensionMult(e.member.def_asc_points),E=e.member.calculateAscensionMult(e.member.dex_asc_points),v=e.member.calculateAscensionMult(e.member.agi_asc_points),k=e.member.calculateAscensionMult(e.member.cha_asc_points);return r.a.createElement("div",{style:{border:"1px solid white"}},r.a.createElement("h1",null,e.member.name,"(",e.member.task,")"),r.a.createElement("pre",{style:{fontSize:"14px",display:"inline-block",width:"20%"}},"Hack: ",e.member.hack," (x",Object(i.c)(e.member.hack_mult*y,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*_,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*b,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*E,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*v,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*k,2),")"),r.a.createElement("div",{className:"gang-owned-upgrades-div noselect"},"Purchased Upgrades: ",e.member.upgrades.map(e=>f(e)),e.member.augmentations.map(e=>f(e))),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Weapons"),o.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Weapon,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Armor"),c.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Armor,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Vehicles"),h.map(e=>g(e)),r.a.createElement(m,{gang:e.gang,type:u.a.Vehicle,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Rootkits"),p.map(e=>g(e,!0)),r.a.createElement(m,{gang:e.gang,type:u.a.Rootkit,player:e.player,upgrades:e.member.upgrades})),r.a.createElement("div",{className:"noselect",style:{width:"20%",display:"inline-block"}},r.a.createElement("h2",null,"Augmentations"),d.map(e=>g(e,!0)),r.a.createElement(m,{gang:e.gang,type:u.a.Augmentation,player:e.player,upgrades:e.member.upgrades})))}function p(e){const t=Object(n.useState)(!1)[1],[a,i]=Object(n.useState)("");function s(t){27===t.keyCode&&Object(c.b)(e.popupId)}return Object(n.useEffect)(()=>{window.addEventListener("keydown",s);const e=setInterval(()=>t(e=>!e),1e3);return()=>{clearInterval(e),window.removeEventListener("keydown",s)}},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement("input",{className:"text-input noselect",value:a,placeholder:"Filter gang member",onChange:e=>i(e.target.value)}),r.a.createElement("p",{className:"tooltip",style:{marginLeft:"6px",display:"inline-block"}},"Discount: -",o.a.formatPercentage(1-1/e.gang.getDiscount()),r.a.createElement("span",{className:"tooltiptext noselect"},"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")),e.gang.members.map(t=>r.a.createElement(h,{key:t.name,player:e.player,gang:e.gang,member:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(102),o=a(534);function s(e){return r.a.createElement(i.a,{panelInitiallyOpened:!0,headerContent:r.a.createElement(r.a.Fragment,null,e.member.name),panelContent:r.a.createElement(o.a,{gang:e.gang,member:e.member})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(535),o=a(537),s=a(538);function l(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{className:"gang-member-info-div tooltip"},r.a.createElement(i.a,{onAscend:()=>t(e=>!e),gang:e.gang,member:e.member})),r.a.createElement("div",{className:"gang-member-info-div"},r.a.createElement(o.a,{onTaskChange:()=>t(e=>!e),gang:e.gang,member:e.member})),r.a.createElement("div",{className:"gang-member-info-div"},r.a.createElement(s.a,{member:e.member})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(8),o=a(11),s=a(2),l=a(20),c=a(536);function u(e){const t={hack:e.member.calculateAscensionMult(e.member.hack_asc_points),str:e.member.calculateAscensionMult(e.member.str_asc_points),def:e.member.calculateAscensionMult(e.member.def_asc_points),dex:e.member.calculateAscensionMult(e.member.dex_asc_points),agi:e.member.calculateAscensionMult(e.member.agi_asc_points),cha:e.member.calculateAscensionMult(e.member.cha_asc_points)};return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:"tooltiptext smallfont"},"Hk: x",s.a.formatMultiplier(e.member.hack_mult*t.hack),"(x",s.a.formatMultiplier(e.member.hack_mult)," Eq, x",s.a.formatMultiplier(t.hack)," Asc)",r.a.createElement("br",null),"St: x",s.a.formatMultiplier(e.member.str_mult*t.str),"(x",s.a.formatMultiplier(e.member.str_mult)," Eq, x",s.a.formatMultiplier(t.str)," Asc)",r.a.createElement("br",null),"Df: x",s.a.formatMultiplier(e.member.def_mult*t.def),"(x",s.a.formatMultiplier(e.member.def_mult)," Eq, x",s.a.formatMultiplier(t.def)," Asc)",r.a.createElement("br",null),"Dx: x",s.a.formatMultiplier(e.member.dex_mult*t.dex),"(x",s.a.formatMultiplier(e.member.dex_mult)," Eq, x",s.a.formatMultiplier(t.dex)," Asc)",r.a.createElement("br",null),"Ag: x",s.a.formatMultiplier(e.member.agi_mult*t.agi),"(x",s.a.formatMultiplier(e.member.agi_mult)," Eq, x",s.a.formatMultiplier(t.agi)," Asc)",r.a.createElement("br",null),"Ch: x",s.a.formatMultiplier(e.member.cha_mult*t.cha),"(x",s.a.formatMultiplier(e.member.cha_mult)," Eq, x",s.a.formatMultiplier(t.cha)," Asc)"),r.a.createElement("pre",null,"Hacking: ",Object(o.c)(e.member.hack,0)," (",s.a.formatExp(e.member.hack_exp)," exp)",r.a.createElement("br",null),"Strength: ",Object(o.c)(e.member.str,0)," (",s.a.formatExp(e.member.str_exp)," exp)",r.a.createElement("br",null),"Defense: ",Object(o.c)(e.member.def,0)," (",s.a.formatExp(e.member.def_exp)," exp)",r.a.createElement("br",null),"Dexterity: ",Object(o.c)(e.member.dex,0)," (",s.a.formatExp(e.member.dex_exp)," exp)",r.a.createElement("br",null),"Agility: ",Object(o.c)(e.member.agi,0)," (",s.a.formatExp(e.member.agi_exp)," exp)",r.a.createElement("br",null),"Charisma: ",Object(o.c)(e.member.cha,0)," (",s.a.formatExp(e.member.cha_exp)," exp)",r.a.createElement("br",null)),r.a.createElement("br",null),e.member.canAscend()&&r.a.createElement(r.a.Fragment,null,r.a.createElement("button",{className:"accordion-button noselect",onClick:function(){const t="gang-management-ascend-member "+e.member.name;Object(l.a)(t,c.a,{member:e.member,gang:e.gang,popupId:t,onAscend:e.onAscend})}},"Ascend"),r.a.createElement("div",{className:"help-tip noselect",style:{marginTop:"5px"},onClick:function(){Object(i.a)(r.a.createElement(r.a.Fragment,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.a.createElement("br",null),r.a.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.a.createElement("br",null),r.a.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))}},"?")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(2),o=a(20),s=a(8);function l(e){const t=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const a=e.member.getAscensionResults();return r.a.createElement(r.a.Fragment,null,r.a.createElement("pre",null,"Are you sure you want to ascend this member? They will lose all of",r.a.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",r.a.createElement("br",null),r.a.createElement("br",null),"Furthermore, your gang will lose ",i.a.formatRespect(e.member.earnedRespect)," respect",r.a.createElement("br",null),r.a.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",r.a.createElement("br",null),"Hacking: x",i.a.format(a.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(a.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(a.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(a.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(a.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(a.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement("button",{className:"std-button",onClick:function(){e.onAscend();const t=e.gang.ascendMember(e.member);Object(s.a)(r.a.createElement("p",null,"You ascended ",e.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(t.respect)," respect.",r.a.createElement("br",null),r.a.createElement("br",null),e.member.name," gained the following stat multipliers for ascending:",r.a.createElement("br",null),"Hacking: x",i.a.format(t.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(t.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(t.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(t.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(t.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(t.cha,"0.000"),r.a.createElement("br",null))),Object(o.b)(e.popupId)}},"Ascend"),r.a.createElement("button",{className:"std-button",onClick:function(){Object(o.b)(e.popupId)}},"Cancel"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(2),o=a(134),s=a(123);function l(e){const[t,a]=Object(n.useState)(e.member.task);const l=e.gang.getAllTaskNames(),c=[["Money:",Object(s.a)(5*e.member.calculateMoneyGain(e.gang))],["Respect:",i.a.formatRespect(5*e.member.calculateRespectGain(e.gang))+" / sec"],["Wanted Level:",i.a.formatWanted(5*e.member.calculateWantedLevelGain(e.gang))+" / sec"],["Total Respect:",""+i.a.formatRespect(e.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement("select",{onChange:function(t){const n=t.target.value;e.member.assignToTask(n),a(n),e.onTaskChange()},className:"dropdown noselect",value:t},r.a.createElement("option",{key:0,value:"---"},"---"),l.map((e,t)=>r.a.createElement("option",{key:t+1,value:e},e))),r.a.createElement("div",null,Object(o.a)(c)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(126);function o(e){const t=i.a[e.member.task],a=t?t.desc:i.a.Unassigned.desc;return r.a.createElement("p",{className:"inline noselect",dangerouslySetInnerHTML:{__html:a}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(540),o=a(165),s=a(11),l=a(20);function c(e){if(e.gang.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!e.gang.canRecruitMember()){const t=e.gang.getRespectNeededToRecruitMember();return r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:"a-link-button-inactive",style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"),r.a.createElement("p",{style:{margin:"10px",color:"red",display:"inline-block"}},Object(s.c)(t,2)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("a",{className:"a-link-button",onClick:function(){const t="recruit-gang-member-popup";Object(l.a)(t,i.a,{gang:e.gang,popupId:t,onRecruit:e.onRecruit})},style:{display:"inline-block",margin:"10px"}},"Recruit Gang Member"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(20),o=a(8);function s(e){const[t,a]=Object(n.useState)("");function s(){""!==t?e.gang.canRecruitMember()?e.gang.recruitMember(t)?(e.onRecruit(),Object(i.b)(e.popupId)):Object(o.a)("You already have a gang member with this name!"):Object(o.a)("You cannot recruit another Gang member!"):Object(o.a)("You must enter a name for your Gang member!")}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"noselect"},"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&s()},onChange:function(e){a(e.target.value)},className:"text-input noselect",type:"text",placeholder:"unique name"}),r.a.createElement("a",{className:"std-button",onClick:s},"Recruit Gang Member"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(2),o=a(8),s=a(11),l=a(49);function c(e){function t(e){const t=100*e;return t<=0?Object(s.c)(0,2):t>=100?Object(s.c)(100,2):Object(s.c)(t,2)}const a=l.a[e.gang.facName].power;const n=Object.keys(l.a).filter(t=>t!=e.gang.facName);return r.a.createElement("div",{style:{width:"70%"}},r.a.createElement("p",{className:"noselect"},"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control.",r.a.createElement("br",null),r.a.createElement("br",null),"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang.",r.a.createElement("br",null),r.a.createElement("br",null),"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("input",{checked:e.gang.territoryWarfareEngaged,id:"warfare",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.territoryWarfareEngaged=t.target.checked}),r.a.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Engage in Territory Warfare",r.a.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")),r.a.createElement("br",null),r.a.createElement("p",{style:{display:"inline-block"}},"Territory Clash Chance: ",i.a.formatPercentage(e.gang.territoryClashChance,3)),r.a.createElement("div",{className:"help-tip noselect",style:{display:"inline-block"},onClick:function(){Object(o.a)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}},"?"),r.a.createElement("br",null),r.a.createElement("input",{checked:e.gang.notifyMemberDeath,id:"notify",type:"checkbox",style:{display:"inline-block",margin:"2px"},onChange:t=>e.gang.notifyMemberDeath=t.target.checked}),r.a.createElement("label",{htmlFor:"warfare",className:"tooltip noselect",style:{color:"white",display:"inline-block"}},"Notify about Gang Member Deaths",r.a.createElement("span",{className:"tooltiptext",style:{display:"inline-block"}},"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")),r.a.createElement("br",null),r.a.createElement("fieldset",{style:{display:"block",margin:"6px"}},r.a.createElement("p",null,r.a.createElement("b",null,r.a.createElement("u",null,e.gang.facName)),r.a.createElement("br",null),"Power: ",Object(s.c)(l.a[e.gang.facName].power,6),r.a.createElement("br",null),"Territory: ",t(l.a[e.gang.facName].territory),"%",r.a.createElement("br",null),r.a.createElement("br",null),n.map(e=>function(e){const n=l.a[e].power,o=a/(n+a);return r.a.createElement("span",{key:e},r.a.createElement("u",null,e),r.a.createElement("br",null),"Power: ",Object(s.c)(n,6),r.a.createElement("br",null),"Territory: ",t(l.a[e].territory),"%",r.a.createElement("br",null),"Chance to win clash with this gang: ",i.a.formatPercentage(o,3),r.a.createElement("br",null),r.a.createElement("br",null))}(e)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(42),o=a(299);function s(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[s,l]=Object(n.useState)("Overview");Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]);const[c,u]=Object(n.useState)(!0),[m,h]=Object(n.useState)(!0),[p,d]=Object(n.useState)(!0),[f,g]=Object(n.useState)(!0),y=i.a.currStep===i.d.CharacterGoToTerminalPage||i.a.currStep===i.d.ActiveScriptsPage,_=i.a.currStep===i.d.GoToCharacterPage,b=i.a.currStep===i.d.TerminalGoToActiveScriptsPage,E=i.a.currStep===i.d.GoToHacknetNodesPage,v=i.a.currStep===i.d.HacknetNodesGoToWorldPage,k=i.a.currStep===i.d.WorldDescription;const C=Object(o.a)(e.player).length,O=C>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,w=e.player.factionInvitations.length>0||e.player.factions.length>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,S=e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,T=e.player.sleeves.length>0,x=null!=e.player.corporation,M=null!=e.player.gang;return r.a.createElement("ul",{id:"mainmenu",className:"mainmenu noscrollbar noselect"},r.a.createElement("li",{className:"menu-header"},r.a.createElement("button",{id:"hacking-menu-header",className:"noselect mainmenu-accordion-header"+(c?" opened":"")+(y?" flashing-button":""),onClick:()=>u(e=>!e)},"Hacking")),c&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:y?"flashing-button":"",onClick:function(){e.engine.loadTerminalContent(),y&&Object(i.b)()}},"Terminal")),r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadScriptEditorContent()},"Create Script")),r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:b?"flashing-button":"",onClick:function(){e.engine.loadActiveScriptsContent(),b&&Object(i.b)()}},"Active Scripts")),O&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:"notification",onClick:()=>e.engine.loadCreateProgramContent()},"Create Program",C>0&&r.a.createElement("span",{className:"badge"},C)))),r.a.createElement("li",{className:"menu-header"},r.a.createElement("button",{id:"character-menu-header",className:"noselect mainmenu-accordion-header"+(m?" opened":""),onClick:()=>h(e=>!e)},"Character")),m&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:_?"flashing-button":"",onClick:function(){e.engine.loadTerminalContent(),_&&Object(i.b)()}},"Stats")),w&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:"notification",onClick:()=>e.engine.loadFactionsContent()},"Factions",e.player.factionInvitations.length>0&&r.a.createElement("span",{className:"badge"},e.player.factionInvitations.length))),S&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:"notification",onClick:()=>e.engine.loadAugmentationsContent()},"Augmentations",e.player.queuedAugmentations.length>0&&r.a.createElement("span",{className:"badge"},e.player.queuedAugmentations.length))),r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:E?"flashing-button":"",onClick:function(){e.engine.loadHacknetNodesContent(),E&&Object(i.b)()}},"Hacknet")),T&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadSleevesContent()},"Sleeves"))),r.a.createElement("li",{className:"menu-header"},r.a.createElement("button",{id:"world-menu-header",className:"noselect mainmenu-accordion-header"+(p?" opened":""),onClick:()=>d(e=>!e)},"World")),p&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:v?"flashing-button":"",onClick:function(){e.engine.loadLocationContent(),v&&Object(i.b)()}},"City")),r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadTravelContent()},"Travel")),""!==e.player.companyName&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadJobContent()},"Job")),e.player.hasWseAccount&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadStockMarketContent()},"Stock Market")),e.player.bladeburner&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadBladeburnerContent()},"Bladeburner")),x&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadCorporationContent()},"Corp")),M&&r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadGangContent()},"Gang"))),r.a.createElement("li",{className:"menu-header"},r.a.createElement("button",{id:"help-menu-header",className:"noselect mainmenu-accordion-header"+(f?" opened":""),onClick:()=>g(e=>!e)},"Help")),f&&r.a.createElement(r.a.Fragment,null,r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{onClick:()=>e.engine.loadMilestonesContent()},"Milestones")),r.a.createElement("li",{className:"mainmenu-accordion-panel"},r.a.createElement("button",{className:k?"flashing-button":"",onClick:function(){e.engine.loadTutorialContent(),k&&Object(i.b)()}},"Tutorial")),!1))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(321),o=a(544),s=a(20),l=a(545),c=a(35);function u(e){if(0===Object.keys(c.a).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort().length)return r.a.createElement(r.a.Fragment,null);return r.a.createElement(i.a,{current:!1,onClick:function(){const t="cmpy-mgmt-expand-industry-popup";Object(s.a)(t,o.a,{corp:e.corp,setDivisionName:e.setDivisionName,popupId:t})},text:"Expand into new Industry"})}function m(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[o,s]=Object(n.useState)("Overview");return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{id:"corporation-container"},r.a.createElement("div",null,r.a.createElement(i.a,{current:"Overview"===o,key:"overview",onClick:()=>s("Overview"),text:e.corp.name}),e.corp.divisions.map(e=>r.a.createElement(i.a,{current:e.name===o,key:e.name,onClick:()=>s(e.name),text:e.name})),r.a.createElement(u,{corp:e.corp,setDivisionName:s})),r.a.createElement(l.a,{rerender:a,corp:e.corp,divisionName:o,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(35),l=a(46);function c(e){const t=Object.keys(s.a).sort().filter(t=>void 0===e.corp.divisions.find(e=>e.type===t)).sort(),[a,c]=Object(n.useState)(t.length>0?t[0]:""),[u,m]=Object(n.useState)("");function h(){try{Object(l.l)(e.corp,a,u)}catch(e){return void Object(i.a)(e+"")}e.setDivisionName(u),Object(o.b)(e.popupId)}const p=s.b[a];if(void 0===p)throw new Error(`Trying to create an industry that doesn't exists: '${a}'`);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Create a new division to expand into a new industry:"),r.a.createElement("select",{className:"dropdown",defaultValue:a,onChange:function(e){c(e.target.value)}},t.map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("p",null,p(e.corp)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("p",null,"Division name:"),r.a.createElement("input",{autoFocus:!0,value:u,onChange:function(e){m(e.target.value)},onKeyDown:function(e){13===e.keyCode&&h()},type:"text",className:"text-input",style:{display:"block"},maxLength:30,pattern:"[a-zA-Z0-9-_]"}),r.a.createElement("span",{onClick:h,className:"popup-box-button"},"Create Division"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(546),o=a(569),s=a(16);function l(e){const t="Overview"!==e.divisionName?e.corp.divisions.find(t=>t.name===e.divisionName):void 0;return void 0===t?r.a.createElement("div",{id:"cmpy-mgmt-panel"},r.a.createElement(o.a,e)):r.a.createElement("div",{id:"cmpy-mgmt-panel"},r.a.createElement(i.a,{rerender:e.rerender,division:t,corp:e.corp,city:s.a.Sector12,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(359),o=a(547),s=a(20),l=a(548);function c(e){return 0===Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).length?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{current:!1,key:"Expand into new City",name:"Expand into new City",onClick:function(){const t="cmpy-mgmt-expand-city-popup";Object(s.a)(t,o.a,{popupId:t,corp:e.corp,division:e.division,cityStateSetter:e.setCity})}})}function u(e){const[t,a]=Object(n.useState)(e.city),o=e.division.offices[t];return 0===o?(a("Sector-12"),r.a.createElement(r.a.Fragment,null)):r.a.createElement(r.a.Fragment,null,Object.values(e.division.offices).map(e=>0!==e&&r.a.createElement(i.a,{current:t===e.loc,key:e.loc,name:e.loc,onClick:()=>a(e.loc)})),r.a.createElement(c,{corp:e.corp,division:e.division,setCity:a}),r.a.createElement(l.a,{rerender:e.rerender,corp:e.corp,division:e.division,city:t,warehouse:e.division.warehouses[t],office:o,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(28),o=a(20),s=a(8),l=a(46),c=a(74);function u(e){const t=Object(n.useRef)(null);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Would you like to expand into a new city by opening an office? This would cost"," ",r.a.createElement(c.a,{money:i.a.OfficeInitialCost,corp:e.corp})),r.a.createElement("select",{ref:t,className:"dropdown",style:{margin:"5px"}},Object.keys(e.division.offices).filter(t=>0===e.division.offices[t]).map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){if(null!==t.current){try{Object(l.k)(e.corp,e.division,t.current.value)}catch(e){return void Object(s.a)(e+"")}Object(s.a)(`Opened a new office in ${t.current.value}!`),e.cityStateSetter(t.current.value),Object(o.b)(e.popupId)}},disabled:e.corp.funds.lt(0)},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(549),o=a(553),s=a(557);function l(e){return r.a.createElement("div",null,r.a.createElement("div",{className:"cmpy-mgmt-industry-left-panel"},r.a.createElement(o.a,{rerender:e.rerender,player:e.player,corp:e.corp,division:e.division,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{rerender:e.rerender,player:e.player,corp:e.corp,division:e.division,office:e.office})),r.a.createElement("div",{className:"cmpy-mgmt-industry-right-panel"},r.a.createElement(s.a,{rerender:e.rerender,player:e.player,corp:e.corp,currentCity:e.city,division:e.division,warehouse:e.warehouse})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(29),o=a(2),s=a(360),l=a(20),c=a(550),u=a(551),m=a(552),h=a(10);function p(e,t){let a=0;for(let n=0;n<e.length;++n)e[n].pos===t&&a++;return a}function d(e){return e.manualMode?r.a.createElement("button",{className:"std-button tooltip",onClick:()=>e.switchMode(e=>!e)},"Switch to Auto Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You simply have to select the number of assignments for each job")):r.a.createElement("button",{className:"std-button tooltip",onClick:()=>e.switchMode(e=>!e)},"Switch to Manual Mode",r.a.createElement("span",{className:"tooltiptext"},"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs"))}function f(e){const[t,a]=Object(n.useState)(e.office.employees.length>0?e.office.employees[0]:null),l=[];for(let t=0;t<e.office.employees.length;++t)l.push(r.a.createElement("option",{key:e.office.employees[t].name},e.office.employees[t].name));const c=t;let u="";const m=[],p=Object.values(i.a);for(let e=0;e<p.length;++e)m.push(r.a.createElement("option",{key:p[e],value:p[e]},p[e])),null!=c&&c.pos===p[e]&&(u=p[e]);const d="0.000",f=c?c.cre*e.corp.getEmployeeCreMultiplier()*e.division.getEmployeeCreMultiplier():0,g=c?c.cha*e.corp.getEmployeeChaMultiplier()*e.division.getEmployeeChaMultiplier():0,y=c?c.int*e.corp.getEmployeeIntMultiplier()*e.division.getEmployeeIntMultiplier():0,_=c?c.eff*e.corp.getEmployeeEffMultiplier()*e.division.getEmployeeEffMultiplier():0;return r.a.createElement("div",{style:{color:"white",margin:"4px",padding:"4px"}},r.a.createElement("select",{className:"dropdown",onChange:function(t){const n=Object(s.a)(t.target);for(let t=0;t<e.office.employees.length;++t)if(n===e.office.employees[t].name){a(e.office.employees[t]);break}e.rerender()}},l),null!=t&&r.a.createElement("p",null,"Morale: ",o.a.format(t.mor,d),r.a.createElement("br",null),"Happiness: ",o.a.format(t.hap,d),r.a.createElement("br",null),"Energy: ",o.a.format(t.ene,d),r.a.createElement("br",null),"Intelligence: ",o.a.format(y,d),r.a.createElement("br",null),"Charisma: ",o.a.format(g,d),r.a.createElement("br",null),"Experience: ",o.a.format(t.exp,d),r.a.createElement("br",null),"Creativity: ",o.a.format(f,d),r.a.createElement("br",null),"Efficiency: ",o.a.format(_,d),r.a.createElement("br",null),"Salary: ",r.a.createElement(h.a,{money:t.sal})),null!=t&&r.a.createElement("select",{className:"dropdown",onChange:function(a){if(null===t)return;const n=Object(s.a)(a.target);t.pos=n,e.rerender()},value:u},m))}function g(e){const t=p(e.office.employees,e.job),a=p(e.office.employees,i.a.Unassigned);return r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",{className:"tooltip",style:{fontSize:"15px",margin:"5px 0px 5px 0px",width:"50%"}},e.job," (",t,")",r.a.createElement("span",{className:"tooltiptext"},e.desc)),r.a.createElement("button",{className:a>0?"std-button":"a-link-button-inactive",onClick:function(){a<=0?console.warn("Cannot assign employee. No unassigned employees available"):(e.office.assignEmployeeToJob(e.job),e.office.calculateEmployeeProductivity(e.corp,e.division),e.rerender())}},"+"),r.a.createElement("button",{className:t>0?"std-button":"a-link-button-inactive",onClick:function(){e.office.unassignEmployeeFromJob(e.job),e.office.calculateEmployeeProductivity(e.corp,e.division),e.rerender()}},"-"),r.a.createElement("br",null))}function y(e){const t=p(e.office.employees,i.a.Unassigned),a=1===e.corp.unlockUpgrades[4];let n=0,s=0,l=0,c=0;for(let t=0;t<e.office.employees.length;++t)n+=e.office.employees[t].mor,s+=e.office.employees[t].hap,l+=e.office.employees[t].ene,c+=e.office.employees[t].sal;let u=0,m=0,d=0;return e.office.employees.length>0&&(u=n/e.office.employees.length,m=s/e.office.employees.length,d=l/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("strong",null,"Unassigned Employees: ",t)),r.a.createElement("br",null),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Morale:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(u,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Happiness:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(m,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Avg Employee Energy:")),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(d,"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Total Employee Salary:")),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement(h.a,{money:c})))),a&&r.a.createElement(r.a.Fragment,null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Material Production:",r.a.createElement("span",{className:"tooltiptext"},"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"))),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(e.division.getOfficeProductivity(e.office),"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Product Production:",r.a.createElement("span",{className:"tooltiptext"},"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees"))),r.a.createElement("td",null,r.a.createElement("p",null,o.a.format(e.division.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",{className:"tooltip",style:{display:"inline-block"}},"Business Multiplier:",r.a.createElement("span",{className:"tooltiptext"},"The effect this office's 'Business' employees has on boosting sales"))),r.a.createElement("td",null,r.a.createElement("p",null,"x",o.a.format(e.division.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Engineer,desc:"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)"}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(g,{rerender:e.rerender,office:e.office,corp:e.corp,division:e.division,player:e.player,job:i.a.Training,desc:"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."}))}function _(e){const[t,a]=Object(n.useState)(!1),i={fontSize:"13px"};let o="tooltip";e.office.atCapacity()?o+=" a-link-button-inactive":(o+=" std-button",0===e.office.employees.length&&(o+=" flashing-button"));let s="tooltip";return e.office.atCapacity()?s+=" a-link-button-inactive":s+=" std-button",r.a.createElement("div",{className:"cmpy-mgmt-employee-panel"},r.a.createElement("h1",{style:{margin:"4px 0px 5px 0px"}},"Office Space"),r.a.createElement("p",null,"Size: ",e.office.employees.length," / ",e.office.size," employees"),r.a.createElement("button",{className:o,onClick:function(){const t="cmpy-mgmt-hire-employee-popup";Object(l.a)(t,u.a,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player})},style:i},"Hire Employee",0===e.office.employees.length&&r.a.createElement("span",{className:"tooltiptext"},"You'll need to hire some employees to get your operations started! It's recommended to have at least one employee in every position")),r.a.createElement("button",{className:s,onClick:function(){e.office.atCapacity()||(e.office.hireRandomEmployee(),e.rerender())},style:i},"Autohire Employee",r.a.createElement("span",{className:"tooltiptext"},"Automatically hires an employee and gives him/her a random name")),r.a.createElement("br",null),r.a.createElement("button",{className:"std-button tooltip",onClick:function(){const t="cmpy-mgmt-upgrade-office-size-popup";Object(l.a)(t,c.a,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player})},style:i,disabled:e.corp.funds.lt(0)},"Upgrade size",r.a.createElement("span",{className:"tooltiptext"},"Upgrade the office's size so that it can hold more employees!")),!e.division.hasResearch("AutoPartyManager")&&r.a.createElement("button",{className:"std-button tooltip",onClick:function(){const t="cmpy-mgmt-throw-office-party-popup";Object(l.a)(t,m.a,{office:e.office,corp:e.corp,popupId:t})},style:i,disabled:e.corp.funds.lt(0)},"Throw Party",r.a.createElement("span",{className:"tooltiptext"},'"Throw an office party to increase your employee\'s morale and happiness"')),r.a.createElement("br",null),r.a.createElement("div",null,r.a.createElement(d,{manualMode:t,switchMode:a})),t?r.a.createElement(f,{rerender:e.rerender,corp:e.corp,division:e.division,office:e.office,player:e.player}):r.a.createElement(y,{rerender:e.rerender,corp:e.corp,division:e.division,office:e.office,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(20),o=a(2),s=a(8),l=a(28),c=a(46);function u(e){const t=Math.round(e.office.size/l.a.OfficeInitialSize),a=l.a.OfficeInitialCost*Math.pow(1.09,t);let n=0;for(let e=0;e<5;++e)n+=Math.pow(1.09,t+e);const u=l.a.OfficeInitialCost*n,m=e.corp.funds.dividedBy(l.a.OfficeInitialCost).toNumber();let h=1;for(n=Math.pow(1.09,t);h<50&&!(n>=m);){const e=Math.pow(1.09,t+h);if(n+e>m)break;n+=e,++h}const p=l.a.OfficeInitialCost*n;function d(t,a){e.corp.funds.lt(t)?Object(s.a)("You don't have enough company funds to purchase this upgrade!"):(Object(c.y)(e.corp,e.office,a),Object(s.a)("Office space increased! It can now hold "+e.office.size+" employees"),e.rerender()),Object(i.b)(e.popupId)}function f(e){return r.a.createElement("button",{className:"tooltip "+(e.corp.funds.lt(e.cost)?"a-link-button-inactive":"a-link-button"),style:{display:"inline-block",margin:"4px"},onClick:()=>d(e.cost,e.size)},"by ",e.size,r.a.createElement("span",{className:"tooltiptext"},o.a.formatMoney(e.cost)))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Increase the size of your office space to fit additional employees!"),r.a.createElement("p",null,"Upgrade size: "),r.a.createElement(f,{corp:e.corp,cost:a,size:l.a.OfficeInitialSize}),r.a.createElement(f,{corp:e.corp,cost:u,size:5*l.a.OfficeInitialSize}),r.a.createElement(f,{corp:e.corp,cost:p,size:h*l.a.OfficeInitialSize}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(20),o=a(2),s=a(28),l=a(14),c=a(11),u=a(246),m=a(8);function h(e){const[t,a]=Object(n.useState)("");function o(){for(let a=0;a<e.office.employees.length;++a)if(e.office.employees[a].name===t)return void Object(m.a)("You already have an employee with this nickname!");e.employee.name=t,e.office.employees.push(e.employee),e.rerender(),Object(i.b)(e.popupId)}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Give your employee a nickname!"),r.a.createElement("input",{value:t,className:"text-input",type:"text",placeholder:"Employee nickname",onKeyDown:function(e){13===e.keyCode&&o()},onChange:function(e){a(e.target.value)}}),r.a.createElement("button",{className:"std-button",onClick:o},"Hire!"))}function p(e){return r.a.createElement("div",{onClick:function(){const t="cmpy-mgmt-name-employee-popup";Object(i.a)(t,h,{rerender:e.rerender,office:e.office,corp:e.corp,popupId:t,player:e.player,employee:e.employee}),Object(i.b)(e.popupId)},className:"cmpy-mgmt-find-employee-option"},"Intelligence: ",Object(c.c)(e.employee.int,1),r.a.createElement("br",null),"Charisma: ",Object(c.c)(e.employee.cha,1),r.a.createElement("br",null),"Experience: ",Object(c.c)(e.employee.exp,1),r.a.createElement("br",null),"Creativity: ",Object(c.c)(e.employee.cre,1),r.a.createElement("br",null),"Efficiency: ",Object(c.c)(e.employee.eff,1),r.a.createElement("br",null),"Salary: ",o.a.formatMoney(e.employee.sal)," \\ s",r.a.createElement("br",null))}function d(e){if(e.office.atCapacity())return r.a.createElement(r.a.Fragment,null);const t=Object(l.a)(25,50)/100,a=Object(l.a)(51,75)/100,n=Object(l.a)(76,100)/100,i=Object(l.a)(50,100),o=Object(l.a)(50,100),c=Object(l.a)(50,100),m=Object(l.a)(50,100),h=Object(l.a)(50,100),d=s.a.EmployeeSalaryMultiplier*(i+o+c+m+h),f=new u.a({intelligence:i*t,charisma:o*t,experience:c*t,creativity:m*t,efficiency:h*t,salary:d*t}),g=new u.a({intelligence:i*a,charisma:o*a,experience:c*a,creativity:m*a,efficiency:h*a,salary:d*a}),y=new u.a({intelligence:i*n,charisma:o*n,experience:c*n,creativity:m*n,efficiency:h*n,salary:d*n});return r.a.createElement(r.a.Fragment,null,r.a.createElement("h1",null,"Select one of the following candidates for hire:"),r.a.createElement(p,{rerender:e.rerender,employee:f,office:e.office,corp:e.corp,popupId:e.popupId,player:e.player}),r.a.createElement(p,{rerender:e.rerender,employee:g,office:e.office,corp:e.corp,popupId:e.popupId,player:e.player}),r.a.createElement(p,{rerender:e.rerender,employee:y,office:e.office,corp:e.corp,popupId:e.popupId,player:e.player}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(20),o=a(2),s=a(8),l=a(46);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null===t||isNaN(t)||t<0)Object(s.a)("Invalid value entered");else{const a=t*e.office.employees.length;if(e.corp.funds.lt(a))Object(s.a)("You don't have enough company funds to throw a party!");else{const a=Object(l.w)(e.corp,e.office,t);Object(s.a)("You threw a party for the office! The morale and happiness of each employee increased by "+o.a.formatPercentage(a-1)),Object(i.b)(e.popupId)}}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"),r.a.createElement((function(e){let t=e.cost;return null!==t&&(isNaN(t)||t<0)?r.a.createElement("p",null,"Invalid value entered!"):(null===t&&(t=0),r.a.createElement("p",null,"Throwing this party will cost a total of ",o.a.formatMoney(t*e.office.employees.length)))}),{cost:t,office:e.office}),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",style:{margin:"5px"},placeholder:"$ / employee",onChange:function(e){a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{className:"std-button",onClick:c},"Throw Party"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(35),o=a(205),s=a(2),l=a(8),c=a(131),u=a(554),m=a(555),h=a(20),p=a(10),d=a(74);function f(e){function t(e){return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",onClick:e.onClick,key:e.key},e.text,null!=e.tooltip&&r.a.createElement("span",{className:"tooltiptext"},e.tooltip))}const a=function(){let t="",a="";switch(e.division.type){case i.a.Food:t="Build Restaurant",a="Build and manage a new restaurant!";break;case i.a.Tobacco:t="Create Product",a="Create a new tobacco product!";break;case i.a.Pharmaceutical:t="Create Drug",a="Design and develop a new pharmaceutical drug!";break;case i.a.Computer:case"Computer":t="Create Product",a="Design and manufacture a new computer hardware product!";break;case i.a.Robotics:t="Design Robot",a="Design and create a new robot or robotic system!";break;case i.a.Software:t="Develop Software",a="Develop a new piece of software!";break;case i.a.Healthcare:t="Build Hospital",a="Build and manage a new hospital!";break;case i.a.RealEstate:t="Develop Property",a="Develop a new piece of real estate property!";break;default:return t="Create Product",a="Create a new product!",r.a.createElement(r.a.Fragment,null)}a+="<br><br>To begin developing a product, first choose the city in which it will be designed. The stats of your employees in the selected city affect the properties of the finished product, such as its quality, performance, and durability.<br><br>You can also choose to invest money in the design and marketing of the product. Investing money in its design will result in a superior product. Investing money in marketing the product will help the product's sales.";const n=e.division.hasMaximumNumberProducts(),o=n?"a-link-button-inactive tooltip":"std-button";return r.a.createElement("button",{className:o+(0===Object.keys(e.division.products).length?" flashing-button":""),onClick:function(){const t="cmpy-mgmt-create-product-popup";Object(h.a)(t,u.a,{popupText:a,division:e.division,corp:e.corp,popupId:t})},style:{margin:"6px",display:"inline-block"},disabled:e.corp.funds.lt(0)},t,n&&r.a.createElement("span",{className:"tooltiptext"},"You have reached the maximum number of products: ",e.division.getMaximumNumberProducts()))}();return r.a.createElement("div",{className:"cmpy-mgmt-industry-overview-panel"},function(){const t=1===e.corp.unlockUpgrades[4],a=e.division.lastCycleRevenue.minus(e.division.lastCycleExpenses).toNumber();let n=!1;const i=e.division.getAdvertisingFactors(),o=i[1],u=i[2],d=i[3],f=i[0];return t&&(n=!0),r.a.createElement("div",null,"Industry: ",e.division.type," (Corp Funds: ",r.a.createElement(p.a,{money:e.corp.funds.toNumber()}),")",r.a.createElement("br",null)," ",r.a.createElement("br",null),"Awareness: ",s.a.format(e.division.awareness,"0.000")," ",r.a.createElement("br",null),"Popularity: ",s.a.format(e.division.popularity,"0.000")," ",r.a.createElement("br",null),!1!==n&&r.a.createElement("p",{className:"tooltip"},"Advertising Multiplier: x",s.a.format(f,"0.000"),r.a.createElement("span",{className:"tooltiptext cmpy-mgmt-advertising-info"},"Total multiplier for this industrys sales due to its awareness and popularity",r.a.createElement("br",null),"Awareness Bonus: x",s.a.format(Math.pow(o,.85),"0.000"),r.a.createElement("br",null),"Popularity Bonus: x",s.a.format(Math.pow(u,.85),"0.000"),r.a.createElement("br",null),"Ratio Multiplier: x",s.a.format(Math.pow(d,.85),"0.000"))),n,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Revenue: ")),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement(p.a,{money:e.division.lastCycleRevenue.toNumber()})," / s"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Expenses: ")),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement(p.a,{money:e.division.lastCycleExpenses.toNumber()})," / s"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement("p",null,"Profit: ")),r.a.createElement("td",null,r.a.createElement("p",null,r.a.createElement(p.a,{money:a})," / s"))))),r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Production Multiplier: ",s.a.format(e.division.prodMult,"0.00"),r.a.createElement("span",{className:"tooltiptext"},"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate")),r.a.createElement("div",{className:"help-tip",onClick:function(){function t(e){return Object(c.a)({progress:e,totalTicks:20})}Object(l.a)(`Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these materials have on your production varies between Industries. For example, Real Estate may be very effective for some Industries, but ineffective for others.<br><br>This division's production multiplier is calculated by summing the individual production multiplier of each of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial to expand into new cities as this can greatly increase the production multiplier of your entire Division.<br><br>Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):<br><br>Hardware:&nbsp;&nbsp;&nbsp; ${t(e.division.hwFac)}<br>Robots:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${t(e.division.robFac)}<br>AI Cores:&nbsp;&nbsp;&nbsp; ${t(e.division.aiFac)}<br>Real Estate: `+t(e.division.reFac))}},"?"),r.a.createElement("br",null)," ",r.a.createElement("br",null),r.a.createElement("p",{className:"tooltip"},"Scientific Research: ",s.a.format(e.division.sciResearch.qty,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Scientific Research increases the quality of the materials and products that you produce.")),r.a.createElement("button",{className:"help-tip",onClick:function(){const t="corporation-research-popup-box";Object(h.a)(t,m.a,{industry:e.division,popupId:t})}},"Research"))}(),r.a.createElement("br",null),r.a.createElement("u",{className:"industry-purchases-and-upgrades-header"},"Purchases & Upgrades"),r.a.createElement("br",null),function(){const a=[];for(const i in o.a){const s=o.a[i];if(e.division.hasResearch("AutoBrew")&&"Coffee"===s[4])continue;const l=s[0],c=s[1],u=s[2];let m=0;switch(l){case 0:m=e.office.employees.length*c;break;default:m=c*Math.pow(u,e.division.upgrades[l])}function n(){e.corp.funds.lt(m)||(e.corp.funds=e.corp.funds.minus(m),e.division.upgrade(s,{corporation:e.corp,office:e.office}),e.rerender())}a.push(t({key:i,onClick:n,text:r.a.createElement(r.a.Fragment,null,s[4]," - ",r.a.createElement(d.a,{money:m,corp:e.corp})),tooltip:s[5]}))}return a}()," ",r.a.createElement("br",null),e.division.makesProducts&&a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(35),l=a(46);function c(e){const t=Object.keys(e.division.offices).filter(t=>0!==e.division.offices[t]),[a,c]=Object(n.useState)(t.length>0?t[0]:""),[u,m]=Object(n.useState)(""),[h,p]=Object(n.useState)(null),[d,f]=Object(n.useState)(null);if(e.division.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);function g(){if(null!==h&&null!==d){try{Object(l.j)(e.corp,e.division,a,u,h,d)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{dangerouslySetInnerHTML:{__html:e.popupText}}),r.a.createElement("select",{className:"dropdown",style:{margin:"5px"},onChange:function(e){c(e.target.value)},defaultValue:a},t.map(e=>r.a.createElement("option",{key:e,value:e},e))),r.a.createElement("input",{onChange:function(e){m(e.target.value)},className:"text-input",style:{margin:"5px"},placeholder:(y=e.division.type,y===s.a.Food?"Restaurant Name":y===s.a.Healthcare?"Hospital Name":y===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement("input",{onChange:function(e){""===e.target.value?p(null):p(parseFloat(e.target.value))},autoFocus:!0,type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Design investment"}),r.a.createElement("input",{onChange:function(e){""===e.target.value?f(null):f(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&g()},type:"number",className:"text-input",style:{margin:"5px"},placeholder:"Marketing investment"}),r.a.createElement("button",{className:"std-button",onClick:g},"Develop Product"));var y}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(35),l=a(28),c=a(169),u=a(556),m=a(46);function h(e){const t=s.c[e.industry.type];return void 0===t?r.a.createElement(r.a.Fragment,null):(Object(n.useEffect)(()=>{{const t=document.getElementById(e.popupId+"-content");null!=t&&(t.style.minHeight="80vh")}const a=t.createTreantMarkup();a.chart.container="#"+e.popupId+"-content",a.chart.nodeAlign="BOTTOM",a.chart.rootOrientation="WEST",a.chart.siblingSeparation=40,a.chart.connectors={type:"step",style:{"arrow-end":"block-wide-long",stroke:"white","stroke-width":2}},Object(u.Treant)(a);const n=t.getAllNodes();for(let t=0;t<n.length;++t){if(!0===e.industry.researched[n[t]])continue;c.a[n[t]];const a=n[t].replace(/\s/g,""),r=document.getElementById(a+"-corp-research-click-listener");null!=r?r.addEventListener("click",()=>{try{Object(m.n)(e.industry,n[t])}catch(e){Object(i.a)(e+"")}Object(i.a)(`Researched ${n[t]}. It may take a market cycle (~${l.a.SecsPerMarketCycle} seconds) before the effects of the Research apply.`),Object(o.b)(e.popupId)}):console.warn("Could not find Research Tree div for "+a)}}),r.a.createElement("div",{id:e.popupId},r.a.createElement("div",{id:e.popupId+"outer-box"}),r.a.createElement("div",null,"Multipliers from research:",r.a.createElement("br",null),"* Advertising Multiplier: x",t.getAdvertisingMultiplier(),r.a.createElement("br",null),"* Employee Charisma Multiplier: x",t.getEmployeeChaMultiplier(),r.a.createElement("br",null),"* Employee Creativity Multiplier: x",t.getEmployeeCreMultiplier(),r.a.createElement("br",null),"* Employee Efficiency Multiplier: x",t.getEmployeeEffMultiplier(),r.a.createElement("br",null),"* Employee Intelligence Multiplier: x",t.getEmployeeIntMultiplier(),r.a.createElement("br",null),"* Production Multiplier: x",t.getProductionMultiplier(),r.a.createElement("br",null),"* Sales Multiplier: x",t.getSalesMultiplier(),r.a.createElement("br",null),"* Scientific Research Multiplier: x",t.getScientificResearchMultiplier(),r.a.createElement("br",null),"* Storage Multiplier: x",t.getStorageMultiplier())))}},,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return IndustryWarehouse}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_data_Constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(28),_OfficeSpace__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(204),_Material__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(100),_Product__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(219),_Warehouse__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(124),_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(558),_ExportPopup__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(559),_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(560),_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(561),_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(562),_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(563),_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(564),_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(565),_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(566),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(2),_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(20),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(65),_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(10),_MoneyCost__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(74),_Helpers__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(567),_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__(568),_Actions__WEBPACK_IMPORTED_MODULE_22__=__webpack_require__(46);function ProductComponent(props){const corp=props.corp,division=props.division,city=props.city,product=props.product,nf="0.000",nfB="0.000a",hasUpgradeDashboard=division.hasResearch("uPgrade: Dashboard"),totalGain=product.data[city][1]-product.data[city][2];let sellButtonText;if(sellButtonText=product.sllman[city][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(product.sllman[city][1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB),"/",product.sllman[city][1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.sllman[city][1],nfB),")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)"),product.marketTa2)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.marketTa2Price[city]}));else if(product.marketTa1){const e=product.rat/product.mku;sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(product.sCost)){const sCost=product.sCost.replace(/MP/g,product.pCost+"");sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:eval(sCost)}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:product.sCost}));function openSellProductPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_SellProductPopup__WEBPACK_IMPORTED_MODULE_11__.a,{product:product,city:city,popupId:e})}let limitProductionButtonText="Limit Production";function openLimitProductProdutionPopup(){const e="cmpy-mgmt-limit-product-production-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__.a,{product:product,city:city,popupId:e})}function openDiscontinueProductPopup(){const e="cmpy-mgmt-discontinue-product-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__.a,{rerender:props.rerender,product:product,industry:division,corp:props.corp,popupId:e,player:props.player})}function openProductMarketTaPopup(){const e="cmpy-mgmt-marketta-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__.a,{product:product,industry:division,popupId:e})}return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.prdman[city][1],nf)+")"),product.fin?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.data[city][2],nfB)," /s")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.rat,nf),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.fea,nf),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of the material cost it takes to create this Product.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(product.pCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openSellProductPopup},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openLimitProductProdutionPopup},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openDiscontinueProductPopup},"Discontinue"),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openProductMarketTaPopup},"Market-TA"))):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-product-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"Designing ",product.name," (req. Operations/Engineers in ",product.createCity,")..."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(product.prog,"0.00"),"% complete"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),hasUpgradeDashboard&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openSellProductPopup},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openLimitProductProdutionPopup},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openDiscontinueProductPopup},"Discontinue"),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openProductMarketTaPopup},"Market-TA")))}function MaterialComponent(props){const corp=props.corp,division=props.division,warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__.a))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.buy,nfB)})`,purchaseButtonClass=tutorial?"std-button flashing-button tooltip":"std-button";function openPurchaseMaterialPopup(){const e="cmpy-mgmt-material-purchase-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__.a,{mat:mat,industry:division,warehouse:warehouse,corp:props.corp,popupId:e})}function openExportPopup(){const e="cmpy-mgmt-export-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_ExportPopup__WEBPACK_IMPORTED_MODULE_7__.a,{mat:mat,corp:props.corp,popupId:e})}let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(mat.sllman[1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB),"/",mat.sllman[1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sllman[1],nfB),")"),mat.marketTa2)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.marketTa2Price}));else if(mat.marketTa1)sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__.a)(mat.sCost)){const sCost=mat.sCost.replace(/MP/g,mat.bCost+"");sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:eval(sCost)}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,sellButtonText," @ ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__.a,{money:mat.sCost}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)");function openSellMaterialPopup(){const e="cmpy-mgmt-material-sell-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__.a,{mat:mat,corp:props.corp,popupId:e})}function openMaterialMarketTaPopup(){const e="cmpy-mgmt-export-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(e,_MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__.a,{mat:mat,industry:division,corp:props.corp,popupId:e})}function shouldFlash(){return props.division.prodMats.includes(props.mat.name)&&!mat.sllman[0]}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-material-div"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(totalGain,nfB),"/s)",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.cmp,nf))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatMoney(mat.bCost),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Market Price: The price you would pay if you were to buy this material on the market"))," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip"},"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.format(mat.qlt,"0.00a"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"The quality of your material. Higher quality will lead to more sales"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{style:{display:"inline-block"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:purchaseButtonClass,onClick:openPurchaseMaterialPopup,disabled:props.warehouse.smartSupplyEnabled&&Object.keys(props.division.reqMats).includes(props.mat.name)},purchaseButtonText,tutorial&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext"},"Purchase your required materials to get production started!")),1===corp.unlockUpgrades[0]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openExportPopup},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button"+(shouldFlash()?" flashing-button":""),onClick:openSellMaterialPopup},sellButtonText),division.hasResearch("Market-TA.I")&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:openMaterialMarketTaPopup},"Market-TA")))}function IndustryWarehouse(e){return e.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__.a?function(){if(0===e.warehouse)return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null);const t={color:e.warehouse.sizeUsed>=e.warehouse.size?"red":"white",margin:"5px"},a=_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),n=e.corp.funds.gt(a)?"std-button":"a-link-button-inactive",r=[];for(const t in e.division.reqMats)if(e.division.reqMats.hasOwnProperty(t)){const a=[" *",e.division.reqMats[t],t].join(" ");r.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{key:t},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,a)))}let i;switch(e.division.state){case"START":i="Current state: Preparing...";break;case"PURCHASE":i="Current state: Purchasing materials...";break;case"PRODUCTION":i="Current state: Producing materials and/or products...";break;case"SALE":i="Current state: Selling materials and/or products...";break;case"EXPORT":i="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+e.division.state)}const o=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof _Material__WEBPACK_IMPORTED_MODULE_3__.a&&Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__.a)(t,e.division)&&o.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent,{rerender:e.rerender,city:e.currentCity,corp:e.corp,division:e.division,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const s=[];if(e.division.makesProducts&&Object.keys(e.division.products).length>0)for(const t in e.division.products){const a=e.division.products[t];a instanceof _Product__WEBPACK_IMPORTED_MODULE_4__.a&&s.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent,{rerender:e.rerender,player:e.player,city:e.currentCity,corp:e.corp,division:e.division,key:t,product:a}))}return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",{className:"tooltip",style:t},"Storage: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__.a.formatBigNumber(e.warehouse.size),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:e.warehouse.breakdown}})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:n,onClick:function(){null!==e.division&&0!==e.warehouse&&(++e.warehouse.level,e.warehouse.updateSize(e.corp,e.division),e.corp.funds=e.corp.funds.minus(a),e.rerender())}},"Upgrade Warehouse Size - ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__.a,{money:a,corp:e.corp})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"This industry uses the following equation for it's production: "),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__.a,{division:e.division}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p",null,i),e.corp.unlockUpgrades[1]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:function(){if(0===e.warehouse)return;const t="cmpy-mgmt-smart-supply-popup";Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__.a)(t,_SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__.a,{division:e.division,warehouse:e.warehouse,corp:e.corp,player:e.player,popupId:t})}},"Configure Smart Supply")),o,s)}():react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div",{className:"cmpy-mgmt-warehouse-panel"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button",{className:"std-button",onClick:()=>{return t=e.division,a=e.currentCity,Object(_Actions__WEBPACK_IMPORTED_MODULE_22__.m)(e.corp,t,a),void e.rerender();var t,a},disabled:e.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost)},"Purchase Warehouse (",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__.a,{money:_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.WarehouseInitialCost,corp:e.corp}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(20);function o(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"),r.a.createElement("button",{className:"popup-box-button",onClick:function(){e.industry.discontinueProduct(e.product),Object(i.b)(e.popupId),e.rerender()}},"Discontinue"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(46);function l(e){if(0===e.corp.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(e.corp.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[t,a]=Object(n.useState)(e.corp.divisions[0].name),[l,c]=Object(n.useState)(Object.keys(e.corp.divisions[0].warehouses)[0]),[u,m]=Object(n.useState)(""),h=Object(n.useState)(!1)[1];function p(t){for(let a=0;a<e.mat.exp.length;++a)if(e.mat.exp[a].ind===t.ind&&e.mat.exp[a].city===t.city&&e.mat.exp[a].amt===t.amt){e.mat.exp.splice(a,1);break}h(e=>!e)}const d=e.corp.divisions.find(e=>e.name===t);if(void 0===d)throw new Error(`Export popup somehow ended up with undefined division '${d}'`);const f=Object.keys(d.warehouses).filter(e=>0!==d.warehouses[e]);return f.length>0&&!f.includes(l)&&c(f[0]),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."),r.a.createElement("select",{className:"dropdown",onChange:function(e){a(e.target.value)},defaultValue:t},e.corp.divisions.map(e=>r.a.createElement("option",{key:e.name,value:e.name},e.name))),r.a.createElement("select",{className:"dropdown",onChange:function(e){c(e.target.value)},defaultValue:l},f.map(e=>{if(0!==d.warehouses[e])return r.a.createElement("option",{key:e,value:e},e)})),r.a.createElement("input",{className:"text-input",placeholder:"Export amount / s",onChange:function(e){m(e.target.value)}}),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:function(){try{Object(s.e)(t,l,e.mat,u)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}},"Export"),r.a.createElement("p",null,"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."),e.mat.exp.map((e,t)=>r.a.createElement("div",{key:t,className:"cmpy-mgmt-existing-export",onClick:()=>p(e)},"Industry: ",e.ind,r.a.createElement("br",null),"City: ",e.city,r.a.createElement("br",null),"Amount/s: ",e.amt)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(20),o=a(46);function s(e){const[t,a]=Object(n.useState)(null);function s(){let a=t;null===a&&(a=-1),Object(o.i)(e.product,e.city,a),Object(i.b)(e.popupId)}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no limit."),r.a.createElement("input",{autoFocus:!0,className:"text-input",style:{margin:"5px"},placeholder:"Limit",type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement("button",{className:"std-button",style:{margin:"5px",display:"inline-block"},onClick:s},"Limit production"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2);function o(e){if(!e.industry.hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const[t,a]=Object(n.useState)(e.mat.bCost),o=Object(n.useState)(!1)[1];const s=e.mat.getMarkupLimit();const l=t;let c=1;return l>e.mat.bCost?l-e.mat.bCost>s&&(c=Math.pow(s/(l-e.mat.bCost),2)):l<e.mat.bCost&&(c=l<=0?1e12:e.mat.bCost/l),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("br",null),r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.II")),r.a.createElement("br",null),"If you sell at ",i.a.formatMoney(l),", then you will sell"," ",i.a.format(c,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement("input",{className:"text-input",type:"number",style:{marginTop:"4px"},onChange:function(e){""===e.target.value?a(0):a(parseFloat(e.target.value))},value:t}),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa2-checkbox",style:{color:"white"}},"Use Market-TA.II for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)")),r.a.createElement("input",{id:"cmpy-mgmt-marketa2-checkbox",type:"checkbox",onChange:function(t){e.mat.marketTa2=t.target.checked,o(e=>!e)},checked:e.mat.marketTa2,style:{margin:"3px"}})),r.a.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function s(e){const t=Object(n.useState)(!1)[1];const a=e.mat.getMarkupLimit();return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.I")),r.a.createElement("br",null),"The maximum sale price you can mark this up to is ",i.a.formatMoney(e.mat.bCost+a),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")),r.a.createElement("input",{id:"cmpy-mgmt-marketa1-checkbox",type:"checkbox",onChange:function(a){e.mat.marketTa1=a.target.checked,t(e=>!e)},checked:e.mat.marketTa1,style:{margin:"3px"}})),r.a.createElement(o,{mat:e.mat,industry:e.industry}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(46);function l(e){const[t,a]=Object(n.useState)(e.mat.sllman[1]?e.mat.sllman[1]+"":""),[l,c]=Object(n.useState)(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.mat));function u(){try{Object(s.o)(e.mat,t,l)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}function m(e){13===e.keyCode&&u()}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the maximum amount of ",e.mat.name," you would like to sell per second, as well as the price at which you would like to sell at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",value:t,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){a(e.target.value)},onKeyDown:m}),r.a.createElement("input",{className:"text-input",value:l,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){c(e.target.value)},onKeyDown:m}),r.a.createElement("button",{className:"std-button",onClick:u},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(46);function l(e){const[t,a]=Object(n.useState)(!0),[l,c]=Object(n.useState)(e.product.sllman[e.city][1]?e.product.sllman[e.city][1]:""),[u,m]=Object(n.useState)(function(e){let t=e.sCost?e.sCost+"":"";return e.marketTa2?t+=" (Market-TA.II)":e.marketTa1&&(t+=" (Market-TA.I)"),t}(e.product));function h(){try{Object(s.p)(e.product,e.city,l,u,t)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}function p(e){13===e.keyCode&&h()}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the maximum amount of ",e.product.name," you would like to sell per second, as well as the price at which you would like to sell it at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."),r.a.createElement("br",null),r.a.createElement("input",{className:"text-input",value:l,autoFocus:!0,type:"text",placeholder:"Sell amount",style:{marginTop:"4px"},onChange:function(e){c(e.target.value)},onKeyDown:p}),r.a.createElement("input",{className:"text-input",value:u,type:"text",placeholder:"Sell price",style:{marginTop:"4px"},onChange:function(e){m(e.target.value)},onKeyDown:p}),r.a.createElement("button",{className:"std-button",onClick:h},"Confirm"),r.a.createElement("div",{style:{border:"1px solid white",display:"inline-block"}},r.a.createElement("label",{htmlFor:e.popupId+"-checkbox"},"Use same 'Sell Amount' for all cities"),r.a.createElement("input",{checked:t,onChange:function(e){a(e.target.checked)},id:e.popupId+"-checkbox",style:{margin:"2px"},type:"checkbox"})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(106),l=a(2),c=a(46);function u(e){const t=parseFloat(e.amount),a=t*e.mat.bCost,n=s.a[e.mat.name];return t*n>(e.warehouse.size-e.warehouse.sizeUsed)/n?r.a.createElement(r.a.Fragment,null,"Not enough warehouse space to purchase this amount"):isNaN(a)?r.a.createElement(r.a.Fragment,null,"Invalid put for Bulk Purchase amount"):r.a.createElement(r.a.Fragment,null,"Purchasing ",l.a.format(t,"0,0.00")," of ",e.mat.name," will cost"," ",l.a.formatMoney(a))}function m(e){const[t,a]=Object(n.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to bulk purchase. This purchases the specified amount instantly (all at once)."),r.a.createElement(u,{warehouse:e.warehouse,mat:e.mat,amount:t}),r.a.createElement("input",{onChange:function(e){a(e.target.value)},type:"number",placeholder:"Bulk Purchase amount",style:{margin:"5px"},onKeyDown:function(a){13===a.keyCode&&function(){const a=parseFloat(t),n=s.a[e.mat.name];if(a*n>(e.warehouse.size-e.warehouse.sizeUsed)/n)Object(i.a)("You do not have enough warehouse size to fit this purchase");else if(isNaN(a))Object(i.a)("Invalid input amount");else{const t=a*e.mat.bCost;if(!e.corp.funds.gt(t))return void Object(i.a)("You cannot afford this purchase.");e.corp.funds=e.corp.funds.minus(t),e.mat.qty+=a,Object(o.b)(e.popupId)}}()}}),r.a.createElement("button",{className:"std-button"},"Confirm Bulk Purchase"))}function h(e){const[t,a]=Object(n.useState)(e.mat.buy?e.mat.buy:null);function s(){if(null!==t){try{Object(c.c)(e.mat,t)}catch(e){Object(i.a)(e+"")}Object(o.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the amount of ",e.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement("input",{onChange:function(e){a(parseFloat(e.target.value))},className:"text-input",autoFocus:!0,placeholder:"Purchase amount",type:"number",style:{margin:"5px"},onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement("button",{onClick:s,className:"std-button"},"Confirm"),r.a.createElement("button",{onClick:function(){e.mat.buy=0,Object(o.b)(e.popupId)},className:"std-button"},"Clear Purchase"),e.industry.hasResearch("Bulk Purchasing")&&r.a.createElement(m,{corp:e.corp,mat:e.mat,industry:e.industry,warehouse:e.warehouse,popupId:e.popupId}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(2);function o(e){const t=e.product.rat/e.product.mku,[a,o]=Object(n.useState)(e.product.pCost),s=Object(n.useState)(!1)[1];const l=a;let c=1;return l>e.product.pCost&&l-e.product.pCost>t&&(c=t/(l-e.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("br",null),r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.II")),r.a.createElement("br",null),"If you sell at ",i.a.formatMoney(l),", then you will sell"," ",i.a.format(c,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement("input",{className:"text-input",onChange:function(e){o(parseFloat(e.target.value))},value:a,type:"number",style:{marginTop:"4px"}}),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa2-checkbox",style:{color:"white"}},"Use Market-TA.II for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold).")),r.a.createElement("input",{className:"text-input",onChange:function(t){e.product.marketTa2=t.target.checked,s(e=>!e)},id:"cmpy-mgmt-marketa2-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa2})),r.a.createElement("p",null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function s(e){const t=e.product.rat/e.product.mku,a=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,r.a.createElement("u",null,r.a.createElement("strong",null,"Market-TA.I")),r.a.createElement("br",null),"The maximum sale price you can mark this up to is"," ",i.a.formatMoney(e.product.pCost+t),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales."),r.a.createElement("div",{style:{display:"block"}},r.a.createElement("label",{className:"tooltip",htmlFor:"cmpy-mgmt-marketa1-checkbox",style:{color:"white"}},"Use Market-TA.I for Auto-Sale Price",r.a.createElement("span",{className:"tooltiptext"},"If this is enabled, then this Product will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above).")),r.a.createElement("input",{onChange:function(t){e.product.marketTa1=t.target.checked,a(e=>!e)},className:"text-input",id:"cmpy-mgmt-marketa1-checkbox",style:{margin:"3px"},type:"checkbox",checked:e.product.marketTa1})),e.industry.hasResearch("Market-TA.II")&&r.a.createElement(o,{product:e.product,industry:e.industry,popupId:e.popupId}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(46),o=a(100),s=a(8);function l(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);const o=e.matName+"-use-leftovers";return r.a.createElement("div",{key:e.matName},r.a.createElement("label",{style:{color:"white"},htmlFor:o},e.warehouse.materials[e.matName].name),r.a.createElement("input",{type:"checkbox",id:o,onChange:function(t){try{const a=e.warehouse.materials[e.matName];Object(i.v)(e.warehouse,a,t.target.checked)}catch(e){Object(s.a)(e+"")}a(t.target.checked)},style:{margin:"3px"},checked:t}),r.a.createElement("br",null))}function c(e){const t=Object(n.useState)(!1)[1];const a=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof o.a&&Object.keys(e.division.reqMats).includes(t)&&a.push(r.a.createElement(l,{key:t,warehouse:e.warehouse,matName:t}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("label",{style:{color:"white"},htmlFor:"cmpy-mgmt-smart-supply-checkbox"},"Enable Smart Supply"),r.a.createElement("input",{type:"checkbox",id:"cmpy-mgmt-smart-supply-checkbox",onChange:function(a){Object(i.u)(e.warehouse,a.target.checked),t(e=>!e)},style:{margin:"3px"},checked:e.warehouse.smartSupplyEnabled}),r.a.createElement("br",null),r.a.createElement("p",null,"Use materials already in the warehouse instead of buying new ones, if available:"),a)}},function(e,t,a){"use strict";function n(e,t){return!!Object.keys(t.reqMats).includes(e)||(!!t.prodMats.includes(e)||!!["Hardware","Robots","AICores","RealEstate"].includes(e))}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(143);function o(e){const t=[];for(const a of Object.keys(e.division.reqMats)){const n=e.division.reqMats[a];void 0!==n&&t.push(String.raw`${n}\text{ }${a}`)}const a=e.division.prodMats.slice();return e.division.makesProducts&&a.push(e.division.type),r.a.createElement("span",{className:"text"},r.a.createElement(i.a,{display:!1,tex:t.join("+")+String.raw`\Rightarrow`+a.map(e=>String.raw`1\text{ }${e}`).join("+")}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(570),o=a(571),s=a(572),l=a(573),c=a(574),u=a(575),m=a(576),h=a(577),p=a(578),d=a(28),f=a(233),g=a(234),y=a(4),_=a(2),b=a(11),E=a(20),v=a(10);function k(e){function t(e){let t=e.className?e.className:"std-button";const a=null!=e.tooltip;return a&&(t+=" tooltip"),r.a.createElement("a",{className:t,onClick:e.onClick,style:{display:e.display?e.display:"block"}},e.text,a&&r.a.createElement("span",{className:"tooltiptext"},e.tooltip))}function a(){console.log("hello click");Object(E.a)("corp-bribe-popup",s.a,{player:e.player,popupId:"corp-bribe-popup",corp:e.corp})}const n=e.corp.revenue.minus(e.corp.expenses).toNumber();function k(e){return e.mult<=1?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,e.name,_.a.format(e.mult,"0.000"),r.a.createElement("br",null))}function C(){const t="cmpy-mgmt-find-investors-popup";Object(E.a)(t,h.a,{rerender:e.rerender,player:e.player,popupId:t,corp:e.corp})}function O(){const t="cmpy-mgmt-go-public-popup";Object(E.a)(t,p.a,{rerender:e.rerender,player:e.player,popupId:t,corp:e.corp})}function w(){const t="cmpy-mgmt-sell-shares-popup";Object(E.a)(t,l.a,{corp:e.corp,player:e.player,popupId:t,rerender:e.rerender})}function S(){const t="corp-buyback-shares-popup";Object(E.a)(t,c.a,{rerender:e.rerender,player:e.player,popupId:t,corp:e.corp})}function T(){const t="cmpy-mgmt-issue-new-shares-popup";Object(E.a)(t,m.a,{popupId:t,corp:e.corp})}function x(){const t="cmpy-mgmt-issue-dividends-popup";Object(E.a)(t,u.a,{popupId:t,corp:e.corp})}return r.a.createElement("div",null,r.a.createElement("p",null,"Total Funds: ",r.a.createElement(v.a,{money:e.corp.funds.toNumber()}),r.a.createElement("br",null),"Total Revenue: ",r.a.createElement(v.a,{money:e.corp.revenue.toNumber()})," / s",r.a.createElement("br",null),"Total Expenses: ",r.a.createElement(v.a,{money:e.corp.expenses.toNumber()})," / s",r.a.createElement("br",null),"Total Profits: ",r.a.createElement(v.a,{money:n})," / s",r.a.createElement("br",null),r.a.createElement((function(){if(e.corp.dividendPercentage<=0||n<=0)return r.a.createElement(r.a.Fragment,null);const t=e.corp.dividendPercentage/100*n,a=n-t,i=t/e.corp.totalShares,o=e.corp.numShares*i;return r.a.createElement(r.a.Fragment,null,"Retained Profits (after dividends): ",r.a.createElement(v.a,{money:a})," / s",r.a.createElement("br",null),r.a.createElement("br",null),"Dividend Percentage: ",_.a.format(e.corp.dividendPercentage/100,"0%"),r.a.createElement("br",null),"Dividends per share: ",r.a.createElement(v.a,{money:i})," / s",r.a.createElement("br",null),"Your earnings as a shareholder (Pre-Tax): ",r.a.createElement(v.a,{money:o})," / s",r.a.createElement("br",null),"Dividend Tax Rate: ",e.corp.dividendTaxPercentage,"%",r.a.createElement("br",null),"Your earnings as a shareholder (Post-Tax):"," ",r.a.createElement(v.a,{money:o*(1-e.corp.dividendTaxPercentage/100)})," / s",r.a.createElement("br",null),r.a.createElement("br",null))}),null),"Publicly Traded: ",e.corp.public?"Yes":"No",r.a.createElement("br",null),"Owned Stock Shares: ",_.a.format(e.corp.numShares,"0.000a"),r.a.createElement("br",null),"Stock Price: ",e.corp.public?r.a.createElement(v.a,{money:e.corp.sharePrice}):"N/A",r.a.createElement("br",null)),r.a.createElement("p",{className:"tooltip"},"Total Stock Shares: ",_.a.format(e.corp.totalShares,"0.000a"),r.a.createElement("span",{className:"tooltiptext"},"Outstanding Shares: ",_.a.format(e.corp.issuedShares,"0.000a"),r.a.createElement("br",null),"Private Shares:"," ",_.a.format(e.corp.totalShares-e.corp.issuedShares-e.corp.numShares,"0.000a"))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(k,{name:"Production Multiplier: ",mult:e.corp.getProductionMultiplier()}),r.a.createElement(k,{name:"Storage Multiplier: ",mult:e.corp.getStorageMultiplier()}),r.a.createElement(k,{name:"Advertising Multiplier: ",mult:e.corp.getAdvertisingMultiplier()}),r.a.createElement(k,{name:"Empl. Creativity Multiplier: ",mult:e.corp.getEmployeeCreMultiplier()}),r.a.createElement(k,{name:"Empl. Charisma Multiplier: ",mult:e.corp.getEmployeeChaMultiplier()}),r.a.createElement(k,{name:"Empl. Intelligence Multiplier: ",mult:e.corp.getEmployeeIntMultiplier()}),r.a.createElement(k,{name:"Empl. Efficiency Multiplier: ",mult:e.corp.getEmployeeEffMultiplier()}),r.a.createElement(k,{name:"Sales Multiplier: ",mult:e.corp.getSalesMultiplier()}),r.a.createElement(k,{name:"Scientific Research Multiplier: ",mult:e.corp.getScientificResearchMultiplier()}),r.a.createElement("br",null),r.a.createElement((function(){const t=e.corp.storedCycles*y.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement("p",null,"Bonus time: ",Object(b.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}),null),r.a.createElement("div",null,r.a.createElement(t,{className:"a-link-button",display:"inline-block",onClick:()=>e.corp.getStarterGuide(e.player),text:"Getting Started Guide",tooltip:"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file that guides you through the beginning of setting up a Corporation and provides some tips/pointers for helping you get started with managing it."}),e.corp.public?r.a.createElement((function(){const a=e.corp,n=a.shareSaleCooldown>0,i=n?"a-link-button-inactive":"std-button",o=n?"Cannot sell shares for "+a.convertCooldownToString(a.shareSaleCooldown):"Sell your shares in the company. The money earned from selling your shares goes into your personal account, not the Corporation's. This is one of the only ways to profit from your business venture.",s=a.issueNewSharesCooldown>0,l=s?"a-link-button-inactive":"std-button",c=s?"Cannot issue new shares for "+a.convertCooldownToString(a.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(t,{className:i,display:"inline-block",onClick:w,text:"Sell Shares",tooltip:o}),r.a.createElement(t,{className:"std-button",display:"inline-block",onClick:S,text:"Buyback shares",tooltip:"Buy back shares you that previously issued or sold at market price."}),r.a.createElement("br",null),r.a.createElement(t,{className:l,display:"inline-block",onClick:T,text:"Issue New Shares",tooltip:c}),r.a.createElement(t,{className:"std-button",display:"inline-block",onClick:x,text:"Issue Dividends",tooltip:"Manage the dividends that are paid out to shareholders (including yourself)"}),r.a.createElement("br",null))}),null):r.a.createElement((function(){const a=e.corp.fundingRound<4,n=a?"std-button":"a-link-button-inactive",i=a?"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company":void 0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(t,{className:n,onClick:C,text:"Find Investors",tooltip:i,display:"inline-block"}),r.a.createElement(t,{className:"std-button",onClick:O,display:"inline-block",text:"Go Public",tooltip:"Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a public company, your shares will be traded on the stock market."}),r.a.createElement("br",null))}),null),r.a.createElement((function(){const n=e.corp.determineValuation()>=d.a.BribeThreshold||!0,i=n?"a-link-button":"a-link-button-inactive";return r.a.createElement(t,{className:i,display:"inline-block",onClick:a,text:"Bribe Factions",tooltip:n?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"})}),null)),r.a.createElement("br",null),r.a.createElement((function(){return e.corp.divisions.length<=0?r.a.createElement(r.a.Fragment,null):r.a.createElement("div",{className:"cmpy-mgmt-upgrade-container"},r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Unlocks "),Object.values(f.a).filter(t=>0===e.corp.unlockUpgrades[t[0]]).map(t=>r.a.createElement(o.a,{rerender:e.rerender,player:e.player,corp:e.corp,upgradeData:t,key:t[0]})),r.a.createElement("h1",{className:"cmpy-mgmt-upgrade-header"}," Upgrades "),e.corp.upgrades.map((e,t)=>g.a[t]).map(t=>r.a.createElement(i.a,{rerender:e.rerender,player:e.player,corp:e.corp,upgrade:t,key:t[0]})))}),null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(8),o=a(46),s=a(74);function l(e){const t=e.upgrade,a=e.corp.upgrades[t[0]],n=t[1],l=t[2],c=n*Math.pow(l,a),u=r.a.createElement(r.a.Fragment,null,t[4]," - ",r.a.createElement(s.a,{money:c,corp:e.corp})),m=t[5];return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(c)){try{Object(o.h)(e.corp,e.upgrade)}catch(e){Object(i.a)(e+"")}e.rerender()}}},u,r.a.createElement("span",{className:"tooltiptext"},m))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(8),o=a(46),s=a(74);function l(e){const t=e.upgradeData,a=r.a.createElement(r.a.Fragment,null,t[2]," - ",r.a.createElement(s.a,{money:t[1],corp:e.corp})),n=t[3];return r.a.createElement("div",{className:"cmpy-mgmt-upgrade-div tooltip",style:{width:"45%"},onClick:function(){if(!e.corp.funds.lt(t[1])){try{Object(o.x)(e.corp,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.rerender()}}},a,r.a.createElement("span",{className:"tooltiptext"},n))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(18),o=a(28),s=a(2),l=a(20),c=a(8);function u(e){const[t,a]=Object(n.useState)(0),[u,m]=Object(n.useState)(0),[h,p]=Object(n.useState)(e.player.factions.length>0?e.player.factions[0]:"");function d(t,a){return(t+a*e.corp.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement("select",{className:"dropdown",style:{margin:"3px"},defaultValue:h,onChange:function(e){p(e.target.value)}},e.player.factions.map(e=>{if(i.a[e].getInfo().offersWork())return r.a.createElement("option",{key:e,value:e},e)})),r.a.createElement("p",null,function(t,a){return 0===t&&0===a?"":isNaN(t)||isNaN(a)||t<0||a<0?"ERROR: Invalid value(s) entered":e.corp.funds.lt(t)?"ERROR: You do not have this much money to bribe with":a>e.corp.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(d(t,a))+" reputation with "+h+" with this bribe"}(t||0,u||0)),r.a.createElement("input",{className:"text-input",onChange:function(e){a(parseFloat(e.target.value))},placeholder:"Corporation funds",style:{margin:"5px"}}),r.a.createElement("input",{className:"text-input",onChange:function(e){m(parseFloat(e.target.value))},placeholder:"Stock Shares",style:{margin:"5px"}}),r.a.createElement("button",{className:"a-link-button",onClick:()=>function(t,a){const n=i.a[h];if(null==n&&Object(c.a)("ERROR: You must select a faction to bribe"),isNaN(t)||isNaN(a)||t<0||a<0);else if(e.corp.funds.lt(t));else if(a>e.corp.numShares);else{const r=d(t,a);Object(c.a)("You gained "+s.a.formatReputation(r)+" reputation with "+n.name+" by bribing them."),n.playerReputation+=r,e.corp.funds=e.corp.funds.minus(t),e.corp.numShares-=a,Object(l.b)(e.popupId)}}(t||0,u||0),style:{display:"inline-block"}},"Bribe"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(2),o=a(8),s=a(20),l=a(28);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t)if(isNaN(t)||t<=0)Object(o.a)("ERROR: Invalid value for number of shares");else if(t>e.corp.numShares)Object(o.a)("ERROR: You don't have this many shares to sell");else{const a=e.corp.calculateShareSale(t),n=a[0],r=a[1],c=a[2];if(e.corp.numShares-=t,isNaN(e.corp.issuedShares)){console.error("Corporation issuedShares is NaN: "+e.corp.issuedShares);const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares+=t,e.corp.sharePrice=r,e.corp.shareSalesUntilPriceUpdate=c,e.corp.shareSaleCooldown=l.a.SellSharesCooldown,e.player.gainMoney(n),e.player.recordMoneySource(n,"corporation"),Object(s.b)(e.popupId),Object(o.a)(`Sold ${i.a.formatMoney(t)} shares for `+i.a.formatMoney(n)+". "+`The corporation's stock price fell to ${i.a.formatMoney(e.corp.sharePrice)} as a result of dilution.`),e.rerender()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).",r.a.createElement("br",null),r.a.createElement("br",null),"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"The current price of your company's stock is ",i.a.formatMoney(e.corp.sharePrice)),r.a.createElement((function(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(e.shares)||e.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(e.shares>e.corp.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const t=e.corp.calculateShareSale(e.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",e.shares," shares for a total of ",i.a.formatMoney(t))}}),{shares:t,corp:e.corp}),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to sell",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{onClick:c,className:"a-link-button",style:{display:"inline-block"}},"Sell shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(20),o=a(2),s=a(8);function l(e){const[t,a]=Object(n.useState)(null);const l=1.1*e.corp.sharePrice;function c(){if(null===t)return;const a=1.1*e.corp.sharePrice;if(isNaN(t)||t<=0)Object(s.a)("ERROR: Invalid value for number of shares");else if(t>e.corp.issuedShares)Object(s.a)("ERROR: There are not this many oustanding shares to buy back");else if(t*a>e.player.money)Object(s.a)("ERROR: You do not have enough money to purchase this many shares (you need "+o.a.format(t*a,"$0.000a")+")");else{if(e.corp.numShares+=t,isNaN(e.corp.issuedShares)){console.warn("Corporation issuedShares is NaN: "+e.corp.issuedShares),console.warn("Converting to number now");const t=e.corp.issuedShares;isNaN(t)?e.corp.issuedShares=0:e.corp.issuedShares=t}e.corp.issuedShares-=t,e.player.loseMoney(t*a),Object(i.b)(e.popupId),e.rerender()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"To purchase these shares, you must use your own money (NOT your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"The current buyback price of your company's stock is ",o.a.formatMoney(l),". Your company currently has ",o.a.formatBigNumber(e.corp.issuedShares)," outstanding stock shares."),r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):isNaN(t)||t<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):t>e.corp.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(e.corp.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",t," shares for a total of ",o.a.formatMoney(t*l))}),null),r.a.createElement("br",null),r.a.createElement("input",{autoFocus:!0,className:"text-input",type:"number",placeholder:"Shares to buyback",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{onClick:c,className:"a-link-button",style:{display:"inline-block"}},"Buy shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(20),o=a(8),s=a(28),l=a(46);function c(e){const[t,a]=Object(n.useState)(null);function c(){if(null!==t){try{Object(l.g)(e.corp,t/100)}catch(e){Object(o.a)(e+"")}Object(i.b)(e.popupId)}}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.",r.a.createElement("br",null),r.a.createElement("br",null),"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and ",s.a.DividendMaxPercentage,". (A percentage of 0 means no dividends will be issued",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),"* Dividends are taxed. Taxes start at 50%, but can be decreased",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement("input",{autoFocus:!0,onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&c()},className:"text-input",placeholder:"Dividend %",type:"number",style:{margin:"5px"}}),r.a.createElement("button",{onClick:c,className:"std-button",style:{display:"inline-block"}},"Allocate Dividend Percentage"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(2),o=a(8),s=a(20),l=a(14),c=a(28);function u(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);const t=Math.round(.9*e.corp.sharePrice),a=Math.round(.2*e.corp.totalShares),n=a-a%1e6;let o=e.shares;return isNaN(o)?r.a.createElement("p",null,"Invalid input"):(o/=1e7,o=1e7*Math.round(o),o<1e7?r.a.createElement("p",null,"Must issue at least 10 million new shares"):o>n?r.a.createElement("p",null,"You cannot issue that many shares"):r.a.createElement("p",null,"Issue $",i.a.format(o,"0.000a")," new shares for"," ",i.a.formatMoney(o*t),"?"))}function m(e){const[t,a]=Object(n.useState)(null),m=Math.round(.2*e.corp.totalShares),h=m-m%1e6;function p(){if(null===t)return;const a=Math.round(.9*e.corp.sharePrice);let n=t;if(isNaN(n))return void Object(o.a)("Invalid input for number of new shares");if(n=1e7*Math.round(n/1e7),n<1e7||n>h)return void Object(o.a)("Invalid input for number of new shares");const r=n*a;e.corp.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,e.corp.totalShares+=n;let u=Object(l.a)(0,Math.round(n/2));u=1e6*Math.round(u/1e6),e.corp.issuedShares+=n-u,e.corp.funds=e.corp.funds.plus(r),e.corp.immediatelyUpdateSharePrice(),Object(s.b)(e.popupId),Object(o.a)(`Issued ${i.a.format(n,"0.000a")} and raised ${i.a.formatMoney(r)}. ${i.a.format(u,"0.000a")} of these shares were bought by private investors.<br><br>Stock price decreased to `+i.a.formatMoney(e.corp.sharePrice))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.",r.a.createElement("br",null),r.a.createElement("br",null)," * You can issue at most ",i.a.formatMoney(h)," new shares",r.a.createElement("br",null)," * New shares are sold at a 10% discount",r.a.createElement("br",null)," * You can only issue new shares once every 12 hours",r.a.createElement("br",null)," * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share",r.a.createElement("br",null)," * Number of new shares issued must be a multiple of 10 million",r.a.createElement("br",null),r.a.createElement("br",null),"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."),r.a.createElement(u,{corp:e.corp,shares:t}),r.a.createElement("input",{className:"text-input",autoFocus:!0,placeholder:"# New Shares",style:{margin:"5px"},onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&p()}}),r.a.createElement("button",{onClick:p,className:"std-button",style:{display:"inline-block"}},"Issue New Shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(20),o=a(2),s=a(28);function l(e){const t=e.corp.determineValuation();let a=0,n=4;switch(e.corp.fundingRound){case 0:a=.1,n=4;break;case 1:a=.35,n=3;break;case 2:a=.25,n=3;break;case 3:a=.2,n=2.5;break;default:return r.a.createElement(r.a.Fragment,null)}const l=t*a*n,c=Math.floor(s.a.INITIALSHARES*a);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"An investment firm has offered you ",o.a.formatMoney(l)," in funding in exchange for a"," ",o.a.format(100*a,"0.000a"),"% stake in the company (",o.a.format(c,"0.000a")," shares).",r.a.createElement("br",null),r.a.createElement("br",null),"Do you accept or reject this offer?",r.a.createElement("br",null),r.a.createElement("br",null),"Hint: Investment firms will offer more money if your corporation is turning a profit"),r.a.createElement("button",{onClick:function(){e.corp.fundingRound++,e.corp.addFunds(l),e.corp.numShares-=c,e.rerender(),Object(i.b)(e.popupId)},className:"std-button"},"Accept"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(2);function l(e){const[t,a]=Object(n.useState)(""),l=e.corp.determineValuation()/e.corp.totalShares;function c(){const a=parseFloat(t),n=e.corp.determineValuation()/e.corp.totalShares;isNaN(a)?Object(i.a)("Invalid value for number of issued shares"):a>e.corp.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(e.corp.public=!0,e.corp.sharePrice=n,e.corp.issuedShares=a,e.corp.numShares-=a,e.corp.addFunds(a*n),e.rerender(),Object(i.a)(`You took your ${e.corp.name} public and earned `+s.a.formatMoney(a*n)+" in your IPO"),Object(o.b)(e.popupId))}return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive ",s.a.formatMoney(l)," per share (the IPO money will be deposited directly into your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"You have a total of ",s.a.format(e.corp.numShares,"0.000a")," of shares that you can issue."),r.a.createElement("input",{className:"text-input",value:t,onChange:function(e){a(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&c()}}),r.a.createElement("button",{className:"std-button",onClick:c},"Go Public"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(300),o=a(581);const s={Cost:"Cost",Hacking:"Hacking Level",Strength:"Strength Level",Defense:"Defense Level",Dexterity:"Dexterity Level",Agility:"Agility Level",Charisma:"Charisma Level",AverageCombatStats:"Average Combat Stats",AverageAllStats:"Average Stats",TotalNumAugmentations:"Number of Augmentations"};function l(...e){let t=0;for(let a=0;a<e.length;++a)t+=e[a];return t/e.length}const c={Cost:(e,t)=>e.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking_skill-t.hacking_skill,Strength:(e,t)=>e.strength-t.strength,Defense:(e,t)=>e.defense-t.defense,Dexterity:(e,t)=>e.dexterity-t.dexterity,Agility:(e,t)=>e.agility-t.agility,Charisma:(e,t)=>e.charisma-t.charisma,AverageCombatStats:(e,t)=>l(e.strength,e.defense,e.dexterity,e.agility)-l(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>l(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-l(t.hacking_skill,t.strength,t.defense,t.dexterity,t.agility,t.charisma),TotalNumAugmentations:(e,t)=>e.augmentations.length-t.augmentations.length};function u(e){const[t,a]=Object(n.useState)(s.Cost);0===e.player.resleeves.length&&(e.player.resleeves=Object(i.a)());const l=c[t];if(void 0===l)throw new Error(`sort function '${t}' is undefined`);return e.player.resleeves.sort(l),r.a.createElement("div",{id:"resleeve-container"},r.a.createElement("p",{style:{display:"block",width:"75%"}},"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!",r.a.createElement("br",null),r.a.createElement("br",null),"Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File."),r.a.createElement("p",{style:{display:"inline-block"}},"Sort By: "),r.a.createElement("select",{className:"dropdown",defaultValue:t,onChange:function(e){a(e.target.value)}},Object.keys(s).map(e=>r.a.createElement("option",{key:e,value:e},s[e]))),e.player.resleeves.map((t,a)=>r.a.createElement(o.a,{key:a,player:e.player,resleeve:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(119),r=a(15),i=a(12);class o extends n.a{constructor(){super()}getCost(){const e=this.hacking_exp+this.strength_exp+this.defense_exp+this.dexterity_exp+this.agility_exp+this.charisma_exp;let t=0;for(let e=0;e<this.augmentations.length;++e){const a=r.a[this.augmentations[e].name];null!=a?t+=a.startingCost:console.error("Could not find Augmentation "+this.augmentations[e].name)}return 25e3*e+t*Math.pow(1.2,this.augmentations.length)}toJSON(){return Object(i.b)("Resleeve",this)}static fromJSON(e){return Object(i.a)(o,e.data)}}i.c.constructors.Resleeve=o},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(15),o=a(300),s=a(10),l=a(2),c=a(8);function u(e){const[t,a]=Object(n.useState)(e.resleeve.augmentations[0].name);const u=i.a[t],m=e.resleeve.getCost();return r.a.createElement("div",{className:"resleeve-elem",style:{display:"block"}},r.a.createElement("div",{className:"resleeve-panel",style:{width:"30%"}},r.a.createElement("p",null,"Hacking: ",l.a.formatSkill(e.resleeve.hacking_skill)," (",l.a.formatExp(e.resleeve.hacking_exp)," exp)",r.a.createElement("br",null),"Strength: ",l.a.formatSkill(e.resleeve.strength)," (",l.a.formatExp(e.resleeve.strength_exp)," exp)",r.a.createElement("br",null),"Defense: ",l.a.formatSkill(e.resleeve.defense)," (",l.a.formatExp(e.resleeve.defense_exp)," exp)",r.a.createElement("br",null),"Dexterity: ",l.a.formatSkill(e.resleeve.dexterity)," (",l.a.formatExp(e.resleeve.dexterity_exp)," exp)",r.a.createElement("br",null),"Agility: ",l.a.formatSkill(e.resleeve.agility)," (",l.a.formatExp(e.resleeve.agility_exp)," exp)",r.a.createElement("br",null),"Charisma: ",l.a.formatSkill(e.resleeve.charisma)," (",l.a.formatExp(e.resleeve.charisma_exp)," exp)",r.a.createElement("br",null),"# Augmentations: ",e.resleeve.augmentations.length),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(r.a.Fragment,null,r.a.createElement("h2",null,r.a.createElement("u",null,"Total Multipliers:")),"Hacking Level multiplier: ",l.a.formatPercentage(e.resleeve.hacking_mult),r.a.createElement("br",null),"Hacking Experience multiplier: ",l.a.formatPercentage(e.resleeve.hacking_exp_mult),r.a.createElement("br",null),"Strength Level multiplier: ",l.a.formatPercentage(e.resleeve.strength_mult),r.a.createElement("br",null),"Strength Experience multiplier: ",l.a.formatPercentage(e.resleeve.strength_exp_mult),r.a.createElement("br",null),"Defense Level multiplier: ",l.a.formatPercentage(e.resleeve.defense_mult),r.a.createElement("br",null),"Defense Experience multiplier: ",l.a.formatPercentage(e.resleeve.defense_exp_mult),r.a.createElement("br",null),"Dexterity Level multiplier: ",l.a.formatPercentage(e.resleeve.dexterity_mult),r.a.createElement("br",null),"Dexterity Experience multiplier: ",l.a.formatPercentage(e.resleeve.dexterity_exp_mult),r.a.createElement("br",null),"Agility Level multiplier: ",l.a.formatPercentage(e.resleeve.agility_mult),r.a.createElement("br",null),"Agility Experience multiplier: ",l.a.formatPercentage(e.resleeve.agility_exp_mult),r.a.createElement("br",null),"Charisma Level multiplier: ",l.a.formatPercentage(e.resleeve.charisma_mult),r.a.createElement("br",null),"Charisma Experience multiplier: ",l.a.formatPercentage(e.resleeve.charisma_exp_mult),r.a.createElement("br",null),"Hacking Chance multiplier: ",l.a.formatPercentage(e.resleeve.hacking_chance_mult),r.a.createElement("br",null),"Hacking Speed multiplier: ",l.a.formatPercentage(e.resleeve.hacking_speed_mult),r.a.createElement("br",null),"Hacking Money multiplier: ",l.a.formatPercentage(e.resleeve.hacking_money_mult),r.a.createElement("br",null),"Hacking Growth multiplier: ",l.a.formatPercentage(e.resleeve.hacking_grow_mult),r.a.createElement("br",null),"Salary multiplier: ",l.a.formatPercentage(e.resleeve.work_money_mult),r.a.createElement("br",null),"Company Reputation Gain multiplier: ",l.a.formatPercentage(e.resleeve.company_rep_mult),r.a.createElement("br",null),"Faction Reputation Gain multiplier: ",l.a.formatPercentage(e.resleeve.faction_rep_mult),r.a.createElement("br",null),"Crime Money multiplier: ",l.a.formatPercentage(e.resleeve.crime_money_mult),r.a.createElement("br",null),"Crime Success multiplier: ",l.a.formatPercentage(e.resleeve.crime_success_mult),r.a.createElement("br",null),"Hacknet Income multiplier: ",l.a.formatPercentage(e.resleeve.hacknet_node_money_mult),r.a.createElement("br",null),"Hacknet Purchase Cost multiplier:",l.a.formatPercentage(e.resleeve.hacknet_node_purchase_cost_mult),r.a.createElement("br",null),"Hacknet Level Upgrade Cost multiplier:",l.a.formatPercentage(e.resleeve.hacknet_node_level_cost_mult),r.a.createElement("br",null),"Hacknet Ram Upgrade Cost multiplier:",l.a.formatPercentage(e.resleeve.hacknet_node_ram_cost_mult),r.a.createElement("br",null),"Hacknet Core Upgrade Cost multiplier:",l.a.formatPercentage(e.resleeve.hacknet_node_core_cost_mult),r.a.createElement("br",null),"Bladeburner Max Stamina multiplier:",l.a.formatPercentage(e.resleeve.bladeburner_max_stamina_mult),r.a.createElement("br",null),"Bladeburner Stamina Gain multiplier:",l.a.formatPercentage(e.resleeve.bladeburner_stamina_gain_mult),r.a.createElement("br",null),"Bladeburner Field Analysis multiplier:",l.a.formatPercentage(e.resleeve.bladeburner_analysis_mult),r.a.createElement("br",null),"Bladeburner Success Chance multiplier:",l.a.formatPercentage(e.resleeve.bladeburner_success_chance_mult)))}},"Multipliers")),r.a.createElement("div",{className:"resleeve-panel",style:{width:"50%"}},r.a.createElement("select",{className:"resleeve-aug-selector dropdown",onChange:function(e){a(e.target.value)}},e.resleeve.augmentations.map(e=>r.a.createElement("option",{key:e.name,value:e.name},e.name))),r.a.createElement("p",null,void 0!==u&&u.info)),r.a.createElement("div",{className:"resleeve-panel",style:{width:"20%"}},r.a.createElement("p",null,"It costs ",r.a.createElement(s.a,{money:m,player:e.player})," to purchase this Sleeve."),r.a.createElement("button",{className:"std-button",onClick:function(){Object(o.b)(e.resleeve,e.player)&&Object(c.a)(r.a.createElement(r.a.Fragment,null,"You re-sleeved for ",r.a.createElement(s.a,{money:m}),"!"))}},"Purchase")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(583);function o(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,150);return()=>clearInterval(e)},[]),r.a.createElement("div",{id:"sleeves-container",style:{width:"70%"}},r.a.createElement("h1",null,"Sleeves"),r.a.createElement("p",null,"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.",r.a.createElement("br",null),r.a.createElement("br",null),"Sleeves can be used to perform different tasks synchronously.",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"}},"FAQ"),r.a.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves"},"Documentation"),r.a.createElement("ul",null,e.player.sleeves.map((t,n)=>r.a.createElement("li",{key:n},r.a.createElement(i.a,{rerender:a,player:e.player,sleeve:t})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(0),r=a.n(n),i=a(47),o=a(4),s=a(50),l=a(2),c=a(8),u=a(131),m=a(20),h=a(584),p=a(585),d=a(586),f=a(10),g=a(123),y=a(263),_=a(587),b=a(588),E=a(589),v=a(590),k=a(95);function C(e){const[t,a]=Object(n.useState)(["------","------","------"]);let C=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working your job at ",e.sleeve.currentTaskLocation,".");break;case i.a.Faction:{let t="nothing";switch(e.sleeve.factionWorkType){case k.a.Field:t="Field work";break;case k.a.Hacking:t="Hacking contracts";break;case k.a.Security:t="Security work"}C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",s.a[e.sleeve.crimeType].type," (Success Rate:"," ",l.a.formatPercentage(s.a[e.sleeve.crimeType].successRate(e.sleeve)),").");break;case i.a.Class:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.");break;case i.a.Synchro:C=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.");break;default:console.error("Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): "+t[0])}let O=[];if(e.sleeve.currentTask===i.a.Crime)O=[["Money",r.a.createElement(f.a,{money:parseFloat(e.sleeve.currentTaskLocation)}),"(on success)"],["Hacking Exp",l.a.formatExp(e.sleeve.gainRatesForTask.hack),"(2x on success)"],["Strength Exp",l.a.formatExp(e.sleeve.gainRatesForTask.str),"(2x on success)"],["Defense Exp",l.a.formatExp(e.sleeve.gainRatesForTask.def),"(2x on success)"],["Dexterity Exp",l.a.formatExp(e.sleeve.gainRatesForTask.dex),"(2x on success)"],["Agility Exp",l.a.formatExp(e.sleeve.gainRatesForTask.agi),"(2x on success)"],["Charisma Exp",l.a.formatExp(e.sleeve.gainRatesForTask.cha),"(2x on success)"]];else if(O=[["Money:",Object(g.a)(5*e.sleeve.gainRatesForTask.money)],["Hacking Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.hack)+" / s"],["Strength Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.str)+" / s"],["Defense Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.def)+" / s"],["Dexterity Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.dex)+" / s"],["Agility Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.agi)+" / s"],["Charisma Exp:",l.a.formatExp(5*e.sleeve.gainRatesForTask.cha)+" / s"]],e.sleeve.currentTask===i.a.Company||e.sleeve.currentTask===i.a.Faction){const t=e.sleeve.getRepGain(e.player);O.push(["Reputation:",Object(y.a)(5*t)])}return r.a.createElement("div",{className:"sleeve-elem"},r.a.createElement("div",{className:"sleeve-panel",style:{width:"25%"}},r.a.createElement("div",{className:"sleeve-stats-text"},r.a.createElement(_.a,{sleeve:e.sleeve}),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(b.a,{sleeve:e.sleeve}))}},"More Stats"),r.a.createElement("button",{className:"std-button"+(e.player.money.lt(o.a.TravelCost)?" tooltip":""),onClick:function(){Object(m.a)("sleeve-travel-popup",p.a,{popupId:"sleeve-travel-popup",sleeve:e.sleeve,player:e.player,rerender:e.rerender})},disabled:e.player.money.lt(o.a.TravelCost)},"Travel",e.player.money.lt(o.a.TravelCost)&&r.a.createElement("span",{className:"tooltiptext"},"Not enough money")),r.a.createElement("button",{className:"std-button"+(e.sleeve.shock<100?" tooltip":""),onClick:function(){Object(m.a)("sleeve-augmentation-popup",h.a,{sleeve:e.sleeve,player:e.player})},style:{display:"block"},disabled:e.sleeve.shock<100},"Manage Augmentations",e.sleeve.shock<100&&r.a.createElement("span",{className:"tooltiptext"},"Unlocked when sleeve has fully recovered")))),r.a.createElement("div",{className:"sleeve-panel",style:{width:"40%"}},r.a.createElement(v.a,{player:e.player,sleeve:e.sleeve,setABC:a}),r.a.createElement("p",null,C),r.a.createElement("p",null,e.sleeve.currentTask===i.a.Crime&&Object(u.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement("button",{className:"std-button",onClick:function(){switch(console.log(t),e.sleeve.resetTaskStatus(),t[0]){case"------":break;case"Work for Company":e.sleeve.workForCompany(e.player,t[1]);break;case"Work for Faction":e.sleeve.workForFaction(e.player,t[1],t[2]);break;case"Commit Crime":e.sleeve.commitCrime(e.player,t[1]);break;case"Take University Course":e.sleeve.takeUniversityCourse(e.player,t[2],t[1]);break;case"Workout at Gym":e.sleeve.workoutAtGym(e.player,t[2],t[1]);break;case"Shock Recovery":e.sleeve.shockRecovery(e.player);break;case"Synchronize":e.sleeve.synchronize(e.player);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+t[0])}e.rerender()}},"Set Task")),r.a.createElement("div",{className:"sleeve-panel",style:{width:"35%"}},r.a.createElement(d.a,{title:"Earnings (Pre-Synchronization)",stats:O}),r.a.createElement("button",{className:"std-button",onClick:function(){Object(c.a)(r.a.createElement(E.a,{sleeve:e.sleeve}))}},"More Earnings Info")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(295),o=a(15),s=a(10),l=a(226);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,150);return()=>clearInterval(e)},[]);const c=e.sleeve.augmentations.map(e=>e.name),u=Object(i.a)(e.sleeve,e.player);return r.a.createElement("div",{className:"noselect"},r.a.createElement("p",{style:{display:"block"}},"Owned Augmentations:"),r.a.createElement("div",{style:{width:"70%"}},c.map(e=>{const t=o.a[e];let a=t.info;return"string"!=typeof a&&(a=Object(l.renderToStaticMarkup)(a)),a+="<br /><br />",a+=Object(l.renderToStaticMarkup)(t.stats),r.a.createElement("div",{key:e,className:"gang-owned-upgrade tooltip"},e,r.a.createElement("span",{className:"tooltiptext",dangerouslySetInnerHTML:{__html:a}}))})),r.a.createElement("p",null,"You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they would for you. You can only purchase Augmentations that you have unlocked through Factions.",r.a.createElement("br",null),r.a.createElement("br",null),"When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the Duplicate Sleeve will immediately lose all of its stat experience."),u.map(t=>{let n=t.info;return"string"!=typeof n&&(n=Object(l.renderToStaticMarkup)(n)),n+="<br /><br />",n+=Object(l.renderToStaticMarkup)(t.stats),r.a.createElement("div",{key:t.name,className:"cmpy-mgmt-upgrade-div",onClick:()=>function(t){e.sleeve.tryBuyAugmentation(e.player,t),a()}(t)},r.a.createElement("div",{style:{fontSize:"12px",padding:"2px"}},r.a.createElement("h2",null,t.name),r.a.createElement("br",null),"Cost: ",r.a.createElement(s.a,{money:t.startingCost,player:e.player}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",{dangerouslySetInnerHTML:{__html:n}})))}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(4),o=a(20),s=a(10),l=a(239),c=a(8);function u(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. Traveling to a different city costs ",r.a.createElement(s.a,{money:i.a.TravelCost,player:e.player}),". It will also set your current sleeve task to idle."),r.a.createElement(l.a,{currentCity:e.sleeve.city,onTravel:t=>function(t){e.player.canAfford(i.a.TravelCost)||Object(c.a)("You cannot afford to have this sleeve travel to another city"),e.sleeve.city=t,e.player.loseMoney(i.a.TravelCost),e.sleeve.resetTaskStatus(),Object(o.b)(e.popupId),e.rerender()}(t)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(0);function r(e){return n.createElement(n.Fragment,null,n.createElement("pre",null,e.title),n.createElement("table",null,n.createElement("tbody",null,e.stats.map((e,t)=>n.createElement("tr",{key:t},e.map((e,t)=>{let a={};return 0!==t&&(a={textAlign:"right"}),n.createElement("td",{style:a,key:t},e)}))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(0);function i(e){let t={};return t={textAlign:"right"},r.createElement(r.Fragment,null,r.createElement("table",null,r.createElement("tbody",null,r.createElement("tr",null,r.createElement("td",{className:"character-hp-cell"},"HP: "),r.createElement("td",{className:"character-hp-cell",style:t},n.a.formatHp(e.sleeve.hp)," / ",n.a.formatHp(e.sleeve.max_hp))),r.createElement("tr",null,r.createElement("td",null,"City: "),r.createElement("td",{style:t},e.sleeve.city)),r.createElement("tr",null,r.createElement("td",{className:"character-hack-cell"},"Hacking: "),r.createElement("td",{className:"character-hack-cell",style:t},n.a.formatSkill(e.sleeve.hacking_skill))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Strength: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.strength))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Defense: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.defense))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Dexterity: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.dexterity))),r.createElement("tr",null,r.createElement("td",{className:"character-combat-cell"},"Agility: "),r.createElement("td",{className:"character-combat-cell",style:t},n.a.formatSkill(e.sleeve.agility))),r.createElement("tr",null,r.createElement("td",{className:"character-cha-cell"},"Charisma: "),r.createElement("td",{className:"character-cha-cell",style:t},n.a.formatSkill(e.sleeve.charisma))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Shock: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveShock(100-e.sleeve.shock))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Sync: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveSynchro(e.sleeve.sync))),r.createElement("tr",null,r.createElement("td",{className:"character-int-cell"},"Memory: "),r.createElement("td",{className:"character-int-cell",style:t},n.a.formatSleeveMemory(e.sleeve.memory))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(2),r=a(134),i=a(0);function o(e){return i.createElement(i.Fragment,null,Object(r.a)([["Hacking: ",e.sleeve.hacking_skill,`(${n.a.formatExp(e.sleeve.hacking_exp)} exp)`],["Strength: ",e.sleeve.strength,`(${n.a.formatExp(e.sleeve.strength_exp)} exp)`],["Defense: ",e.sleeve.defense,`(${n.a.formatExp(e.sleeve.defense_exp)} exp)`],["Dexterity: ",e.sleeve.dexterity,`(${n.a.formatExp(e.sleeve.dexterity_exp)} exp)`],["Agility: ",e.sleeve.agility,`(${n.a.formatExp(e.sleeve.agility_exp)} exp)`],["Charisma: ",e.sleeve.charisma,`(${n.a.formatExp(e.sleeve.charisma_exp)} exp)`]],"Stats:"),i.createElement("br",null),Object(r.a)([["Hacking Level multiplier: ",n.a.formatPercentage(e.sleeve.hacking_mult)],["Hacking Experience multiplier: ",n.a.formatPercentage(e.sleeve.hacking_exp_mult)],["Strength Level multiplier: ",n.a.formatPercentage(e.sleeve.strength_mult)],["Strength Experience multiplier: ",n.a.formatPercentage(e.sleeve.strength_exp_mult)],["Defense Level multiplier: ",n.a.formatPercentage(e.sleeve.defense_mult)],["Defense Experience multiplier: ",n.a.formatPercentage(e.sleeve.defense_exp_mult)],["Dexterity Level multiplier: ",n.a.formatPercentage(e.sleeve.dexterity_mult)],["Dexterity Experience multiplier: ",n.a.formatPercentage(e.sleeve.dexterity_exp_mult)],["Agility Level multiplier: ",n.a.formatPercentage(e.sleeve.agility_mult)],["Agility Experience multiplier: ",n.a.formatPercentage(e.sleeve.agility_exp_mult)],["Charisma Level multiplier: ",n.a.formatPercentage(e.sleeve.charisma_mult)],["Charisma Experience multiplier: ",n.a.formatPercentage(e.sleeve.charisma_exp_mult)],["Faction Reputation Gain multiplier: ",n.a.formatPercentage(e.sleeve.faction_rep_mult)],["Company Reputation Gain multiplier: ",n.a.formatPercentage(e.sleeve.company_rep_mult)],["Salary multiplier: ",n.a.formatPercentage(e.sleeve.work_money_mult)],["Crime Money multiplier: ",n.a.formatPercentage(e.sleeve.crime_money_mult)],["Crime Success multiplier: ",n.a.formatPercentage(e.sleeve.crime_success_mult)]],"Multipliers:"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(2),r=a(10),i=a(0),o=a(134);function s(e){return i.createElement(i.Fragment,null,Object(o.a)([["Money ",i.createElement(r.a,{money:e.sleeve.earningsForTask.money})],["Hacking Exp ",n.a.formatExp(e.sleeve.earningsForTask.hack)],["Strength Exp ",n.a.formatExp(e.sleeve.earningsForTask.str)],["Defense Exp ",n.a.formatExp(e.sleeve.earningsForTask.def)],["Dexterity Exp ",n.a.formatExp(e.sleeve.earningsForTask.dex)],["Agility Exp ",n.a.formatExp(e.sleeve.earningsForTask.agi)],["Charisma Exp ",n.a.formatExp(e.sleeve.earningsForTask.cha)]],"Earnings for Current Task:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.sleeve.earningsForPlayer.money})],["Hacking Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.hack)],["Strength Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.str)],["Defense Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.def)],["Dexterity Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.dex)],["Agility Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.agi)],["Charisma Exp: ",n.a.formatExp(e.sleeve.earningsForPlayer.cha)]],"Total Earnings for Host Consciousness:"),i.createElement("br",null),Object(o.a)([["Money: ",i.createElement(r.a,{money:e.sleeve.earningsForSleeves.money})],["Hacking Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.hack)],["Strength Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.str)],["Defense Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.def)],["Dexterity Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.dex)],["Agility Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.agi)],["Charisma Exp: ",n.a.formatExp(e.sleeve.earningsForSleeves.cha)]],"Total Earnings for Other Sleeves:"),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(47),o=a(50),s=a(6),l=a(16),c=a(18),u=a(95);const m=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],h=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function p(e,t){const a=[];for(const n of e.sleeves)t!==n&&n.currentTask===i.a.Company&&a.push(n.currentTaskLocation);const n=Object.keys(e.jobs);for(let e=0;e<n.length;++e)a.includes(n[e])||n[e];return n}function d(e,t){const a=["Bladeburners"];e.gang&&a.push(e.gang.facName);for(const n of e.sleeves)t!==n&&n.currentTask===i.a.Faction&&a.push(n.currentTaskLocation);const n=[];for(const t of e.factions)a.includes(t)||n.push(t);return n}const f={"------":()=>({first:["------"],second:()=>["------"]}),"Work for Company":(e,t)=>{let a=p(e,t);return 0===a.length&&(a=["------"]),{first:a,second:()=>["------"]}},"Work for Faction":(e,t)=>{let a=d(e,t);return 0===a.length&&(a=["------"]),{first:a,second:e=>{const t=c.a[e].getInfo(),a=[];return t.offerHackingWork&&a.push("Hacking Contracts"),t.offerFieldWork&&a.push("Field Work"),t.offerSecurityWork&&a.push("Security Work"),a}}},"Commit Crime":()=>({first:Object.keys(o.a),second:()=>["------"]}),"Take University Course":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumSummitUniversity];break;case l.a.Sector12:a=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:a=[s.a.VolhavenZBInstituteOfTechnology];break;default:a=["No university available in city!"]}return{first:m,second:()=>a}},"Workout at Gym":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumCrushFitnessGym,s.a.AevumSnapFitnessGym];break;case l.a.Sector12:a=[s.a.Sector12IronGym,s.a.Sector12PowerhouseGym];break;case l.a.Volhaven:a=[s.a.VolhavenMilleniumFitnessGym];break;default:a=["No gym available in city!"]}return{first:h,second:()=>a}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},g={"------":()=>!0,"Work for Company":(e,t)=>p(e,t).length>0,"Work for Faction":(e,t)=>d(e,t).length>0,"Commit Crime":()=>!0,"Take University Course":(e,t)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(t.city),"Workout at Gym":(e,t)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(t.city),"Shock Recovery":(e,t)=>t.shock<100,Synchronize:(e,t)=>t.sync<100};function y(e){const t=function(e){switch(e.currentTask){case i.a.Idle:return["------","------","------"];case i.a.Company:return["Work for Company",e.currentTaskLocation,"------"];case i.a.Faction:{let t="";switch(e.factionWorkType){case u.a.Hacking:t="Hacking Contracts";break;case u.a.Field:t="Field Work";break;case u.a.Security:t="Security Work"}return["Work for Faction",e.currentTaskLocation,t]}case i.a.Crime:return["Commit Crime",e.crimeType,"------"];case i.a.Class:return["Take University Course",e.className,e.currentTaskLocation];case i.a.Gym:return["Workout at Gym",e.gymStatType,e.currentTaskLocation];case i.a.Recovery:return["Shock Recovery","------","------"];case i.a.Synchro:return["Synchronize","------","------"]}}(e.sleeve),[a,o]=Object(n.useState)(t[0]),[s,l]=Object(n.useState)(t[1]),[c,m]=Object(n.useState)(t[2]),h=Object.keys(g).filter(t=>g[t](e.player,e.sleeve)),p=f[a];if(void 0===p)throw new Error(`No function for task '${a}'`);const d=p(e.player,e.sleeve),y=d.second(s);return d.first.length>0&&!d.first.includes(s)&&(l(d.first[0]),e.setABC([a,d.first[0],c])),y.length>0&&!y.includes(c)&&(m(y[0]),e.setABC([a,s,y[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement("select",{className:"dropdown",onChange:function(t){const n=t.target.value,r=f[n];if(void 0===r)throw new Error(`No function for task '${a}'`);const i=r(e.player,e.sleeve),s=i.second(i.first[0]);m(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},defaultValue:a},h.map(e=>r.a.createElement("option",{key:e,value:e},e))),!(1===d.first.length&&"------"===d.first[0])&&r.a.createElement("select",{className:"dropdown",onChange:function(t){l(t.target.value),e.setABC([a,t.target.value,c])},defaultValue:s},d.first.map(e=>r.a.createElement("option",{key:e,value:e},e))),!(1===y.length&&"------"===y[0])&&r.a.createElement("select",{className:"dropdown",onChange:function(t){m(t.target.value),e.setABC([a,s,t.target.value])},defaultValue:c},y.map(e=>r.a.createElement("option",{key:e,value:e},e))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(31),r=a(592),i=a(0),o=a(34);let s;function l(e,t,a,l,c){if(!n.b.isOn(n.a.Infiltration))return;const u=function(e,t){const a=e.strength+e.defense+e.dexterity+e.agility+e.charisma,n=t-Math.pow(a,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}(t,l);o.render(i.createElement(r.a,{Engine:e,Player:t,Location:a,StartingDifficulty:l,Difficulty:u,MaxLevel:c}),s)}document.addEventListener("DOMContentLoaded",(function e(){const t=document.getElementById("infiltration-container");if(null===t)throw new Error("huh?");s=t,document.removeEventListener("DOMContentLoaded",e)}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(593),o=a(623);function s(e){const[t,a]=Object(n.useState)(!1);return t?r.a.createElement(o.a,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel}):r.a.createElement(i.a,{Player:e.Player,Engine:e.Engine,Location:e.Location,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel,start:()=>a(!0),cancel:function(){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(19),o=a(60);function s(e,t){let a="";return t<=0?t=0:t>13?t=13:(t--,a=">"),r.a.createElement("span",{style:{color:e}},"=".repeat(t),a," ".repeat(13-a.length-t))}function l(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{container:!0,spacing:3},r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("h1",null,"Infiltrating ",e.Location)),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("h2",null,"Maximum level: ",e.MaxLevel)),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("pre",null,"[",0===(t=e.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,s("white",13*t),s("orange",13*(t-1)),s("red",13*(t-2))),"]"),r.a.createElement("pre",null," ^ ^ ^ ^"),r.a.createElement("pre",null," Trivial Normal Hard Impossible")),r.a.createElement(o.a,{item:!0,xs:10},r.a.createElement("p",null,"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation."),r.a.createElement("br",null),r.a.createElement("p",null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.a.createElement("br",null),r.a.createElement("p",null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement("p",null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement("p",null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement("p",null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(o.a,{item:!0,xs:3},r.a.createElement(i.a,{onClick:e.start,text:"Start"})),r.a.createElement(o.a,{item:!0,xs:3},r.a.createElement(i.a,{onClick:e.cancel,text:"Cancel"}))));var t}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n,r=a(0),i=a.n(r),o=a(60),s=a(624),l=a(625),c=a(626),u=a(627),m=a(628),h=a(629),p=a(630),d=a(631),f=a(632),g=a(633);!function(e){e[e.Countdown=0]="Countdown",e[e.Minigame=1]="Minigame",e[e.Result=2]="Result",e[e.Sell=3]="Sell"}(n||(n={}));const y=[c.a,l.a,u.a,m.a,h.a,p.a,d.a,f.a];function _(e){const[t,a]=Object(r.useState)(1),[l,c]=Object(r.useState)(n.Countdown),[u,m]=Object(r.useState)(""),[h,p]=Object(r.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*y.length)});function d(){let e=h.lastGames[0];const t=[h.lastGames[0],h.lastGames[1],h.id];for(;t.includes(e);)e=Math.floor(Math.random()*y.length);return e}function f(){p({lastGames:[h.lastGames[1],h.id],id:d()})}function _(e){m(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let b;switch(l){case n.Countdown:b=i.a.createElement(s.a,{onFinish:()=>c(n.Minigame)});break;case n.Minigame:{const r=y[h.id];b=i.a.createElement(r,{onSuccess:function(){_(!0),t===e.MaxLevel?c(n.Sell):(c(n.Countdown),a(t+1)),f()},onFailure:function(t){c(n.Countdown),_(!1);const a=null!=t&&t.automated?e.Player.hp:3*e.StartingDifficulty;if(e.Player.takeDamage(a)){const t=document.getElementById("mainmenu-container");if(null===t)throw new Error("mainmenu-container not found");t.style.visibility="visible",e.Engine.loadLocationContent()}f()},difficulty:e.Difficulty+t/50});break}case n.Sell:b=i.a.createElement(g.a,{Player:e.Player,Engine:e.Engine,StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,MaxLevel:e.MaxLevel})}return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{container:!0,spacing:3},i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement("h3",null,"Level: ",t," / ",e.MaxLevel),i.a.createElement((function(){return i.a.createElement("h4",null,i.a.createElement("span",{style:{color:"gray"}},u.slice(0,u.length-1)),u[u.length-1])}),null)),i.a.createElement(o.a,{item:!0,xs:12},b)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(60);function o(e){const[t,a]=Object(n.useState)(3);return Object(n.useEffect)(()=>{0!==t?setTimeout(()=>a(t-1),200):e.onFinish()}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",null,"Get Ready!"),r.a.createElement("h1",null,t))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(142),c=a(110),u=a(304);const m={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};function h(e){const t={timer:0,min:0,max:0};Object(c.a)(m,e.difficulty,t);const a=t.timer,[h,p]=Object(n.useState)(""),[d]=Object(n.useState)(function(e){let t="";const a=Object(l.b)(e.min,e.max);for(let e=0;e<a;e++)t+=["[","<","(","{"][Math.floor(4*Math.random())];return t}(t));return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Close the brackets"),r.a.createElement("p",{style:{fontSize:"5em"}},`${d}${h}`,r.a.createElement(u.a,null)),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=function(e){return 48==e.keyCode&&e.shiftKey?")":221!=e.keyCode||e.shiftKey?221==e.keyCode&&e.shiftKey?"}":190==e.keyCode&&e.shiftKey?">":"":"]"}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(d[d.length-h.length-1],a)?e.onFailure():d.length!==h.length+1?p(h+a):e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(110);const c={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};function u(e){const t={window:0};Object(l.a)(c,e.difficulty,t);const[a,u]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{let e=-1;const a=window.setTimeout(()=>{u(!1),e=window.setTimeout(()=>u(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(a),-1!==e&&clearInterval(e)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Slash when his guard is down!"),r.a.createElement("p",{style:{fontSize:"5em"}},a?"!Guarding!":"!ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(142),c=a(110),u=a(304);const m={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};function h(e){const t={timer:0,min:0,max:0};Object(c.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e<t;e++)e>0&&(a+=" "),a+=p[Math.floor(Math.random()*p.length)];return a}(t)),[d,f]=Object(n.useState)("");return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),16===t.keyCode)return;const a=d+t.key.toUpperCase();h.startsWith(a)?h===a?e.onSuccess():f(a):e.onFailure()},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("p",{style:{transform:"scaleX(-1)"}},h)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("p",null,d,r.a.createElement(u.a,null))))}const p=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(110);const c={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function u(e){const t={timer:0,size:0};Object(l.a)(c,e.difficulty,t);const a=t.timer,[u]=Object(n.useState)(function(e){const t=[];t.push(m[Math.floor(Math.random()*m.length)]);for(let a=0;a<e.size;a++){const e=h[Math.floor(Math.random()*h.length)];t.includes(e)?a--:t.push(e)}return function(e){for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}(t),t}(t)),[p,d]=Object(n.useState)(0);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",null,"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=t.keyCode;if(32===a)return void(m.includes(u[p])?e.onSuccess():e.onFailure());let n=p;for([38,87,68,39].includes(a)&&n++,[65,37,83,40].includes(a)&&n--;n<0;)n+=u.length;for(;n>u.length-1;)n-=u.length;d(n)},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement("h2",{style:{fontSize:"2em"}},"↑"),r.a.createElement("h2",{style:{fontSize:"2em"}},u[p]),r.a.createElement("h2",{style:{fontSize:"2em"}},"↓")))}const m=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],h=["aggressive","aloof","arrogant","big-headed","boastful","boring","bossy","careless","clingy","couch potato","cruel","cynical","grumpy","hot air","know it all","obnoxious","pain in the neck","picky","tactless","thoughtless"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(142),c=a(110);const u={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:10}};function m(e){const t={timer:0,min:0,max:0};Object(c.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=["←","→","↑","↓"];let a="";for(let n=0;n<Object(l.b)(e.min,e.max);n++){let e=t[Math.floor(4*Math.random())];for(;e===a[a.length-1];)e=t[Math.floor(4*Math.random())];a+=e}return a}(t)),[h,p]=Object(n.useState)(0);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Enter the Code!"),r.a.createElement("p",{style:{fontSize:"5em"}},m[h]),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault(),m[h]===Object(l.a)(t)?(p(h+1),h+1>=m.length&&e.onSuccess()):e.onFailure()},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(110),c=a(142);const u={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function m(e){const t={timer:0,width:0,height:0,symbols:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=[];for(let a=0;a<Math.round(e.height);a++){const a=[];for(let t=0;t<Math.round(e.width);t++)a.push(h()+h());t.push(a)}return t}(t)),[p]=Object(n.useState)(function(e,t){const a=[];for(let n=0;n<Math.round(t.symbols);n++)a.push(e[Math.floor(Math.random()*e.length)][Math.floor(Math.random()*e[0].length)]);return a}(m,t)),[d,f]=Object(n.useState)(0),[g,y]=Object(n.useState)([0,0]);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Match the symbols!"),r.a.createElement("h2",{style:{fontSize:"2em"}},"Targets:"," ",p.map((e,t)=>t==d?r.a.createElement("span",{key:""+t,style:{fontSize:"1em",color:"blue"}},e," "):r.a.createElement("span",{key:""+t,style:{fontSize:"1em"}},e," "))),r.a.createElement("br",null),m.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,e.map((e,a)=>a==g[0]&&t==g[1]?r.a.createElement("span",{key:`${a}${t}`,style:{fontSize:"2em",color:"blue"}},e," "):r.a.createElement("span",{key:`${a}${t}`,style:{fontSize:"2em"}},e," "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=[0,0];switch(Object(c.a)(t)){case"↑":a[1]--;break;case"←":a[0]--;break;case"↓":a[1]++;break;case"→":a[0]++}const n=[g[0]+a[0],g[1]+a[1]];if(n[0]=(n[0]+m[0].length)%m[0].length,n[1]=(n[1]+m.length)%m.length,y(n),32==t.keyCode){if(m[g[1]][g[0]]!==p[d])return void e.onFailure();f(d+1),p.length===d+1&&e.onSuccess()}},onFailure:e.onFailure})))}function h(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(110),c=a(142);const u={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function m(e){const t={timer:0,width:0,height:0,mines:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=h(e);for(let a=0;a<e.mines;a++){const e=Math.floor(Math.random()*t.length),n=Math.floor(Math.random()*t[0].length);t[e][n]?a--:t[e][n]=!0}return t}(t)),[p,d]=Object(n.useState)(h(t)),[f,g]=Object(n.useState)([0,0]),[y,_]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{const e=setTimeout(()=>_(!1),2e3);return()=>clearInterval(e)},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},y?"Remember all the mines!":"Mark all the mines!"),m.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,e.map((e,a)=>y?m[t][a]?r.a.createElement("span",{key:a},"[?] "):r.a.createElement("span",{key:a},"[ ] "):a==f[0]&&t==f[1]?r.a.createElement("span",{key:a},"[X] "):p[t][a]?r.a.createElement("span",{key:a},"[.] "):r.a.createElement("span",{key:a},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),y)return;const a=[0,0];switch(Object(c.a)(t)){case"↑":a[1]--;break;case"←":a[0]--;break;case"↓":a[1]++;break;case"→":a[0]++}const n=[f[0]+a[0],f[1]+a[1]];if(n[0]=(n[0]+m[0].length)%m[0].length,n[1]=(n[1]+m.length)%m.length,g(n),32==t.keyCode){if(!m[f[1]][f[0]])return void e.onFailure();d(t=>(t[f[1]][f[0]]=!0,function(e,t){function a(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return a(e)===a(t)}(m,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}function h(e){const t=[];for(let a=0;a<e.height;a++)t.push(new Array(Math.round(e.width)).fill(!1));return t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(60),o=a(108),s=a(109),l=a(142),c=a(110);const u={Trivial:{timer:9e3,wiresmin:4,wiresmax:4,rules:2},Normal:{timer:7e3,wiresmin:6,wiresmax:6,rules:2},Hard:{timer:5e3,wiresmin:8,wiresmax:8,rules:3},Impossible:{timer:4e3,wiresmin:9,wiresmax:9,rules:4}},m=["|",".","/","-","█","#"],h=["red","#FFC107","blue","white"],p={red:"red","#FFC107":"yellow",blue:"blue",white:"white"};function d(e){const t={timer:0,wiresmin:0,wiresmax:0,rules:0};Object(c.a)(u,e.difficulty,t);const a=t.timer,[p]=Object(n.useState)(function(e){const t=[],a=Object(l.b)(e.wiresmin,e.wiresmax);for(let e=0;e<a;e++){const e=[h[Math.floor(Math.random()*h.length)]];Math.random()<.15&&e.push(h[Math.floor(Math.random()*h.length)]),t.push({tpe:m[Math.floor(Math.random()*m.length)],colors:e})}return t}(t)),[d,y]=Object(n.useState)(new Array(p.length).fill(!1)),[_]=Object(n.useState)(function(e,t){const a=t.rules,n=[f,g],r=[];for(let t=0;t<a;t++)r.push(n[t%2](e));return r}(p,t));return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement("h1",{className:"noselect"},"Cut the wires with the following properties! (keyboard 1 to 9)"),_.map((e,t)=>r.a.createElement("h3",{key:t},e.toString())),r.a.createElement("pre",null,new Array(p.length).fill(0).map((e,t)=>r.a.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("pre",null,p.map((e,a)=>3!==t&&4!==t||!d[a]?r.a.createElement("span",{key:a,style:{color:e.colors[t%e.colors.length]}},"|",e.tpe,"|   "):r.a.createElement("span",{key:a},"      "))))),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=parseInt(t.key);a<1||a>p.length||isNaN(a)||y(t=>{const n=[...t];n[a-1]=!0,_.some(e=>e.shouldCut(p[a-1],a-1))||e.onFailure();const r=[];for(let e=0;e<p.length;e++){let t=!1;for(let a=0;a<_.length;a++)t=t||_[a].shouldCut(p[e],e);r.push(t)}return r.every((e,t)=>e===n[t])&&e.onSuccess(),n})},onFailure:e.onFailure})))}function f(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function g(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${p[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(18),r=a(0),i=a.n(r),o=a(19),s=a(60),l=a(10),c=a(62),u=a(5);function m(e){const[t,a]=Object(r.useState)("none");function m(){const t=document.getElementById("mainmenu-container");if(!t)throw new Error("mainmenu-container somehow null");t.style.visibility="visible",e.Engine.loadLocationContent()}const h=e.MaxLevel*Math.pow(1.01,e.MaxLevel),p=Math.pow(e.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*h*u.a.InfiltrationRep,d=Math.pow(e.Difficulty+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*h*u.a.InfiltrationMoney;return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{container:!0,spacing:3},i.a.createElement(s.a,{item:!0,xs:10},i.a.createElement("h1",null,"Infiltration successful!")),i.a.createElement(s.a,{item:!0,xs:10},i.a.createElement("h2",null,"You can trade the confidential information you found for money or reputation."),i.a.createElement("select",{className:"dropdown",onChange:function(e){a(e.target.value)}},i.a.createElement("option",{key:"none",value:"none"},"none"),e.Player.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement("option",{key:e,value:e},e))),i.a.createElement(o.a,{onClick:function(){"none"!==t&&(n.a[t].playerReputation+=p,m())},text:i.a.createElement(i.a.Fragment,null,"Trade for ",Object(c.a)(p)," reputation")})),i.a.createElement(s.a,{item:!0,xs:3},i.a.createElement(o.a,{onClick:function(){e.Player.gainMoney(d),e.Player.recordMoneySource(d,"infiltration"),m()},text:i.a.createElement(i.a.Fragment,null,"Sell for ",i.a.createElement(l.a,{money:d}))})),i.a.createElement(s.a,{item:!0,xs:3},i.a.createElement(o.a,{onClick:m,text:"Quit"}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(635),o=a(636),s=a(637),l=a(178),c=a(638),u=a(640),m=a(641),h=a(642),p=a(24),d=a(39),f=a(22),g=a(122),y=a(20);function _(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[_,b]=Object(n.useState)(p.c.x1);Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]);let E,v=0;for(let t=0;t<e.player.hacknetNodes.length;++t){const a=e.player.hacknetNodes[t];if(Object(d.g)(e.player)){if(a instanceof l.a)throw new Error("node was hacknet node");const e=f.b[a];if(e instanceof g.a)throw new Error("node was a normal server");e?v+=e.hashRate:console.warn(`Could not find Hacknet Server object in AllServers map (i=${t})`)}else{if("string"==typeof a)throw new Error("node was ip string");v+=a.moneyGainRatePerSecond}}E=Object(d.g)(e.player)?Object(d.b)(e.player):Object(d.a)(e.player);const k=[()=>b(p.c.x1),()=>b(p.c.x5),()=>b(p.c.x10),()=>b(p.c.MAX)],C=e.player.hacknetNodes.map(t=>{if(Object(d.g)(e.player)){if(t instanceof l.a)throw new Error("node was hacknet node");const n=f.b[t];if(null==n)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+t);if(n instanceof g.a)throw new Error("node was normal server");return r.a.createElement(s.a,{player:e.player,key:n.hostname,node:n,purchaseMultiplier:_,rerender:a})}if("string"==typeof t)throw new Error("node was ip string");return r.a.createElement(o.a,{player:e.player,key:t.name,node:t,purchaseMultiplier:_,rerender:a})});return r.a.createElement("div",{id:"hacknet-nodes-container"},r.a.createElement("h1",null,"Hacknet ",Object(d.g)(e.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(d.g)(e.player)}),r.a.createElement(h.a,{cost:E,multiplier:_,onClick:function(){Object(d.l)(e.player),a()}}),r.a.createElement("br",null),r.a.createElement("div",{id:"hacknet-nodes-money-multipliers-div"},r.a.createElement(m.a,{totalProduction:v,player:e.player}),r.a.createElement(u.a,{onClicks:k,purchaseMultiplier:_})),Object(d.g)(e.player)&&r.a.createElement("button",{className:"std-button",onClick:function(){Object(y.a)("hacknet-server-hash-upgrades-popup",c.a,{player:e.player})},style:{display:"block"}},"Spend Hashes on Upgrades"),r.a.createElement("ul",{id:"hacknet-nodes-list"},C))}},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 r.a.createElement("div",null,r.a.createElement("p",{className:"hacknet-general-info"},"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced."),e.hasHacknetServers?r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"hacknet-general-info"},"Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers will perform computations and operations on the network, earning you hashes. Hashes can be spent on a variety of different upgrades."),r.a.createElement("p",{className:"hacknet-general-info"},"Hacknet Servers can also be used as servers to run scripts. However, running scripts on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash rate will be reduced by the percentage of RAM that is being used by that Server to run scripts.")):r.a.createElement(r.a.Fragment,null,r.a.createElement("p",{className:"hacknet-general-info"},"Here, you can purchase a Hacknet Node, a specialized machine that can connect and contribute its resources to the Hacknet network. This allows you to take a small percentage of profits from hacks performed on the network. Essentially, you are renting out your Node's computing power."),r.a.createElement("p",{className:"hacknet-general-info"},"Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node can be upgraded in order to increase its computing power and thereby increase the profit you earn from it.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(24),o=a(39),s=a(10),l=a(123);function c(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let c,u,m,h,p,d;if(t.level>=i.a.MaxLevel)c=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),u="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);c=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),u=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.ram>=i.a.MaxRam)m=r.a.createElement(r.a.Fragment,null,"MAX RAM"),h="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);m=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),h=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cores>=i.a.MaxCores)p=r.a.createElement(r.a.Fragment,null,"MAX CORES"),d="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);p=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),d=e.player.money.lt(l)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},t.name)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},r.a.createElement(s.a,{money:t.totalMoneyGenerated,player:e.player})," (",Object(l.a)(t.moneyGainRatePerSecond),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.level),r.a.createElement("button",{className:u,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(e.player,t,i.a.MaxLevel)),Object(o.n)(e.player,t,r),n()}},c)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},t.ram,"GB"),r.a.createElement("button",{className:h,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(e.player,t,i.a.MaxRam)),Object(o.o)(e.player,t,r),n()}},m)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},t.cores),r.a.createElement("button",{className:d,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(e.player,t,i.a.MaxCores)),Object(o.k)(e.player,t,r),n()}},p))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(24),o=a(39),s=a(10),l=a(132),c=a(305);function u(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let u,m,h,p,d,f,g,y;if(t.level>=i.b.MaxLevel)u=r.a.createElement(r.a.Fragment,null,"MAX LEVEL"),m="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);u=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),m=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.maxRam>=i.b.MaxRam)h=r.a.createElement(r.a.Fragment,null,"MAX RAM"),p="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);h=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),p=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cores>=i.b.MaxCores)d=r.a.createElement(r.a.Fragment,null,"MAX CORES"),f="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);d=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),f=e.player.money.lt(l)?"std-button-disabled":"std-button"}if(t.cache>=i.b.MaxCache)g=r.a.createElement(r.a.Fragment,null,"MAX CACHE"),y="std-button-disabled";else{let n=0;if("MAX"===a)n=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;n=Math.min(e,a)}const l=t.calculateCacheUpgradeCost(n);g=r.a.createElement(r.a.Fragment,null,"Upgrade x",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),y=e.player.money.lt(l)?"std-button-disabled":"std-button"}return r.a.createElement("li",{className:"hacknet-node"},r.a.createElement("div",{className:"hacknet-node-container"},r.a.createElement("div",{className:"row"},r.a.createElement("h1",{style:{fontSize:"1em"}},t.hostname)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Production:"),r.a.createElement("span",{className:"text money-gold"},Object(l.a)(t.totalHashesGenerated)," (",Object(c.a)(t.hashRate),")")),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Hash Capacity:"),r.a.createElement("span",{className:"text"},Object(l.a)(t.hashCapacity))),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.level),r.a.createElement("button",{className:m,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(e.player,t,i.b.MaxLevel)),Object(o.n)(e.player,t,r),n()}},u)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"RAM:"),r.a.createElement("span",{className:"text upgradable-info"},t.maxRam,"GB"),r.a.createElement("button",{className:p,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(e.player,t,i.b.MaxRam)),Object(o.o)(e.player,t,r),n()}},h)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cores:"),r.a.createElement("span",{className:"text upgradable-info"},t.cores),r.a.createElement("button",{className:f,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(e.player,t,i.b.MaxCores)),Object(o.k)(e.player,t,r),n()}},d)),r.a.createElement("div",{className:"row"},r.a.createElement("p",null,"Cache Level:"),r.a.createElement("span",{className:"text upgradable-info"},t.cache),r.a.createElement("button",{className:y,onClick:function(){let r=a;"MAX"===a&&(r=Object(o.c)(e.player,t,i.b.MaxCache)),Object(o.j)(e.player,t,r),n(),Object(o.p)(e.player)}},g))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(202),o=a(155),s=a(132),l=a(639);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)},[]);const c=e.player.hashManager;if(!(c instanceof i.a))throw new Error("Player does not have a HashManager)");const u=Object.keys(o.a).map(t=>{const n=o.a[t];return r.a.createElement(l.a,{player:e.player,upg:n,hashManager:c,key:n.name,rerender:a})});return r.a.createElement("div",null,r.a.createElement("p",null,"Spend your hashes on a variety of different upgrades"),r.a.createElement("p",null,"Hashes: ",Object(s.a)(e.player.hashManager.hashes)),u)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(39),o=a(362),s=a(8),l=a(93),c=a(132);function u(e){const[t,a]=Object(n.useState)("ecorp");const u=e.hashManager,m=e.upg,h=u.getUpgradeCost(m.name),p=u.upgrades[m.name],d=m.effectText(p),f=u.hashes>=h?"std-button":"std-button-disabled";return r.a.createElement("div",{className:"bladeburner-action"},r.a.createElement(l.b,{value:m.name}),r.a.createElement("p",null,"Cost: ",Object(c.a)(h),", Bought: ",p," times"),r.a.createElement("p",null,m.desc),r.a.createElement("button",{className:f,onClick:function(){if(e.hashManager.hashes>=e.hashManager.getUpgradeCost(e.upg.name)){Object(i.m)(e.player,e.upg.name,t)||Object(s.a)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature upgrade affects."),e.rerender()}}},"Purchase"),p>0&&d&&r.a.createElement("p",null,d),m.hasTargetServer&&r.a.createElement(o.a,{serverType:o.b.Foreign,onChange:function(e){a(e.target.value)},style:{margin:"5px"}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(24);function o(e){return r.a.createElement("button",{className:e.className,onClick:e.onClick},e.text)}function s(e){if(null==e.purchaseMultiplier)throw new Error("MultiplierButtons constructed without required props");const t=["x1","x5","x10","MAX"],a=e.onClicks,n=[];for(let s=0;s<t.length;++s){const l=t[s],c={className:e.purchaseMultiplier===i.c[l]?"std-button-disabled":"std-button",key:l,onClick:a[s],text:l};n.push(r.a.createElement(o,c))}return r.a.createElement("span",{id:"hacknet-nodes-multipliers"},n)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(39),o=a(10),s=a(123),l=a(305),c=a(132);function u(e){const t=Object(i.g)(e.player);let a;return a=t?Object(l.a)(e.totalProduction):Object(s.a)(e.totalProduction),r.a.createElement("p",{id:"hacknet-nodes-money"},r.a.createElement("span",null,"Money: "),r.a.createElement(o.a,{money:e.player.money.toNumber()}),r.a.createElement("br",null),t&&r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Hashes: ",Object(c.a)(e.player.hashManager.hashes)," / ",Object(c.a)(e.player.hashManager.capacity)),r.a.createElement("br",null)),r.a.createElement("span",null,"Total Hacknet ",t?"Server":"Node"," Production: "),a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(39),o=a(1),s=a(10);function l(e){const t=e.cost;let a,n=o.a.canAfford(t)?"std-button":"std-button-disabled",l={};return Object(i.g)(o.a)?Object(i.h)(o.a)?(n="std-button-disabled",a=r.a.createElement(r.a.Fragment,null,"Hacknet Server limit reached"),l={color:"red"}):a=r.a.createElement(r.a.Fragment,null,"Purchase Hacknet Server - ",r.a.createElement(s.a,{money:t,player:o.a})):a=r.a.createElement(r.a.Fragment,null,"Purchase Hacknet Node - ",r.a.createElement(s.a,{money:t,player:o.a})),r.a.createElement("button",{className:n,onClick:e.onClick,style:l},a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(27),i=a(19);class o extends n.Component{asciiCity(){const e=e=>e?n.createElement("span",{key:e,className:"tooltip",style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:this.props.enterLocation.bind(this,e)},n.createElement("b",null,"X")):n.createElement("span",null,"*"),t=/[A-Z]/g,a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},r=n=>{const r=[],i=[];let o;for(;null!==(o=t.exec(n));)i.push(o);if(0===i.length)return r.push(n),r;for(let t=0;t<i.length;t++){const o=0===t?0:i[t-1].index+1,s=i[t].index;r.push(n.slice(o,s));const l=a[n[i[t].index]];r.push(e(this.props.city.locations[l]))}return r.push(n.slice(i[i.length-1].index+1)),r},i=[],o=this.props.city.asciiArt.split("\n");for(const e in o)i.push(n.createElement("pre",{key:e},r(o[e])));return n.createElement("div",{className:"noselect"},i)}listCity(){const e=this.props.city.locations.map(e=>n.createElement("li",{key:e},n.createElement(i.a,{onClick:this.props.enterLocation.bind(this,e),text:e})));return n.createElement("ul",null,e)}render(){return n.createElement(n.Fragment,null,r.a.DisableASCIIArt?this.listCity():this.asciiCity())}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a(645),i=a(646),o=a(647),s=a(648),l=a(649),c=a(651),u=a(655),m=a(656),h=a(657),p=a(33),d=a(27),f=a(44),g=a(30),y=a(19),_=a(677);class b extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"}}getLocationSpecificContent(){const e=[];return this.props.loc.types.includes(p.a.Company)&&e.push(n.createElement(r.a,{engine:this.props.engine,key:"companylocation",locName:this.props.loc.name,p:this.props.p})),this.props.loc.types.includes(p.a.Gym)&&e.push(n.createElement(i.a,{key:"gymlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.Hospital)&&e.push(n.createElement(o.a,{key:"hospitallocation",p:this.props.p})),this.props.loc.types.includes(p.a.Slums)&&e.push(n.createElement(s.a,{key:"slumslocation",p:this.props.p})),this.props.loc.types.includes(p.a.Special)&&e.push(n.createElement(l.a,{engine:this.props.engine,key:"speciallocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.TechVendor)&&e.push(n.createElement(c.a,{key:"techvendorlocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.TravelAgency)&&e.push(n.createElement(u.a,{key:"travelagencylocation",p:this.props.p,travel:this.props.travel})),this.props.loc.types.includes(p.a.University)&&e.push(n.createElement(m.a,{key:"universitylocation",loc:this.props.loc,p:this.props.p})),this.props.loc.types.includes(p.a.Casino)&&e.push(n.createElement(h.a,{key:"casinoLocation",p:this.props.p})),e}render(){const e=this.getLocationSpecificContent(),t=f.a.getIp(this.props.loc.name),a=Object(g.b)(t),r=null!==a&&Object(g.d)(a);return n.createElement("div",null,n.createElement(y.a,{onClick:this.props.returnToCity,style:this.btnStyle,text:"Return to World"}),n.createElement("h1",{className:"noselect"},r&&!d.a.DisableTextEffects?n.createElement(_.a,{content:this.props.loc.name}):this.props.loc.name),e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a(158),i=a(238),o=a(40),s=a(192),l=a(54),c=a(17),u=a(19),m=a(62),h=a(244),p=a(48);function d(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const f={display:"block"};class g extends n.Component{constructor(e){if(super(e),d(this,"companyPosition",null),d(this,"jobTitle",null),this.btnStyle={display:"block"},this.quit=this.quit.bind(this),this.applyForAgentJob=this.applyForAgentJob.bind(this),this.applyForBusinessConsultantJob=this.applyForBusinessConsultantJob.bind(this),this.applyForBusinessJob=this.applyForBusinessJob.bind(this),this.applyForEmployeeJob=this.applyForEmployeeJob.bind(this),this.applyForItJob=this.applyForItJob.bind(this),this.applyForPartTimeEmployeeJob=this.applyForPartTimeEmployeeJob.bind(this),this.applyForPartTimeWaiterJob=this.applyForPartTimeWaiterJob.bind(this),this.applyForSecurityJob=this.applyForSecurityJob.bind(this),this.applyForSoftwareConsultantJob=this.applyForSoftwareConsultantJob.bind(this),this.applyForSoftwareJob=this.applyForSoftwareJob.bind(this),this.applyForWaiterJob=this.applyForWaiterJob.bind(this),this.startInfiltration=this.startInfiltration.bind(this),this.work=this.work.bind(this),this.location=i.a[e.locName],null==this.location)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);if(this.company=o.a[e.locName],null==this.company)throw new Error("CompanyLocation component constructed with invalid company: "+e.locName);this.state={employedHere:!1},this.props.p.location=e.locName,this.checkIfEmployedHere(!1)}applyForAgentJob(e){e.isTrusted&&(this.props.p.applyForAgentJob(),this.checkIfEmployedHere(!0))}applyForBusinessConsultantJob(e){e.isTrusted&&(this.props.p.applyForBusinessConsultantJob(),this.checkIfEmployedHere(!0))}applyForBusinessJob(e){e.isTrusted&&(this.props.p.applyForBusinessJob(),this.checkIfEmployedHere(!0))}applyForEmployeeJob(e){e.isTrusted&&(this.props.p.applyForEmployeeJob(),this.checkIfEmployedHere(!0))}applyForItJob(e){e.isTrusted&&(this.props.p.applyForItJob(),this.checkIfEmployedHere(!0))}applyForPartTimeEmployeeJob(e){e.isTrusted&&(this.props.p.applyForPartTimeEmployeeJob(),this.checkIfEmployedHere(!0))}applyForPartTimeWaiterJob(e){e.isTrusted&&(this.props.p.applyForPartTimeWaiterJob(),this.checkIfEmployedHere(!0))}applyForSecurityJob(e){e.isTrusted&&(this.props.p.applyForSecurityJob(),this.checkIfEmployedHere(!0))}applyForSoftwareConsultantJob(e){e.isTrusted&&(this.props.p.applyForSoftwareConsultantJob(),this.checkIfEmployedHere(!0))}applyForSoftwareJob(e){e.isTrusted&&(this.props.p.applyForSoftwareJob(),this.checkIfEmployedHere(!0))}applyForWaiterJob(e){e.isTrusted&&(this.props.p.applyForWaiterJob(),this.checkIfEmployedHere(!0))}checkIfEmployedHere(e=!1){this.jobTitle=this.props.p.jobs[this.props.locName],null!=this.jobTitle&&(this.companyPosition=l.a[this.jobTitle]),e&&this.setState({employedHere:null!=this.jobTitle})}startInfiltration(e){if(!e.isTrusted)return;const t=this.location;if(!t.infiltrationData)return void console.error(`trying to start infiltration at ${this.props.locName} but the infiltrationData is null`);this.props.engine.loadInfiltrationContent(this.props.locName,t.infiltrationData.startingSecurityLevel,t.infiltrationData.maxClearanceLevel);t.infiltrationData}work(e){if(!e.isTrusted)return;const t=this.companyPosition;t instanceof s.a&&(t.isPartTimeJob()||t.isSoftwareConsultantJob()||t.isBusinessConsultantJob()?this.props.p.startWorkPartTime(this.props.locName):this.props.p.startWork(this.props.locName))}quit(e){if(!e.isTrusted)return;const t=Object(p.d)(),a=Object(p.c)();null!=t&&null!=a&&(t.innerHTML="Quit job",a.innerHTML="Cancel",t.addEventListener("click",()=>{this.props.p.quitJob(this.props.locName),this.checkIfEmployedHere(!0),Object(p.a)()}),a.addEventListener("click",()=>{Object(p.a)()}),Object(p.b)(n.createElement(n.Fragment,null,"Would you like to quit your job at ",this.company.name,"?")))}render(){const e=null!=this.jobTitle,t=this.company.getFavorGain();return n.createElement("div",null,e&&n.createElement("div",null,n.createElement("p",null,"Job Title: ",this.jobTitle),n.createElement("br",null),n.createElement("p",{style:f},"-------------------------"),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Company reputation: ",Object(m.a)(this.company.playerReputation),n.createElement("span",{className:"tooltiptext"},"You will earn ",Object(h.a)(t[0])," company favor upon resetting after installing Augmentations")),n.createElement("br",null),n.createElement("br",null),n.createElement("p",{style:f},"-------------------------"),n.createElement("br",null),n.createElement("p",{className:"tooltip"},"Company Favor: ",Object(h.a)(this.company.favor),n.createElement("span",{className:"tooltiptext"},"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.")),n.createElement("br",null),n.createElement("br",null),n.createElement("p",{style:f},"-------------------------"),n.createElement("br",null),n.createElement(u.a,{onClick:this.work,text:"Work"}),"    ",n.createElement(u.a,{onClick:this.quit,text:"Quit"})),this.company.hasAgentPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.a[0]],onClick:this.applyForAgentJob,p:this.props.p,style:this.btnStyle,text:"Apply for Agent Job"}),this.company.hasBusinessConsultantPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.c[0]],onClick:this.applyForBusinessConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Consultant Job"}),this.company.hasBusinessPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.b[0]],onClick:this.applyForBusinessJob,p:this.props.p,style:this.btnStyle,text:"Apply for Business Job"}),this.company.hasEmployeePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.e[1]],onClick:this.applyForEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be an Employee"}),this.company.hasEmployeePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.g[1]],onClick:this.applyForPartTimeEmployeeJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Employee"}),this.company.hasITPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.d[0]],onClick:this.applyForItJob,p:this.props.p,style:this.btnStyle,text:"Apply for IT Job"}),this.company.hasSecurityPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.h[2]],onClick:this.applyForSecurityJob,p:this.props.p,style:this.btnStyle,text:"Apply for Security Job"}),this.company.hasSoftwareConsultantPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.k[0]],onClick:this.applyForSoftwareConsultantJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Consultant Job"}),this.company.hasSoftwarePositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.j[0]],onClick:this.applyForSoftwareJob,p:this.props.p,style:this.btnStyle,text:"Apply for Software Job"}),this.company.hasWaiterPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.e[0]],onClick:this.applyForWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a Waiter"}),this.company.hasWaiterPositions()&&n.createElement(r.a,{company:this.company,entryPosType:l.a[c.g[0]],onClick:this.applyForPartTimeWaiterJob,p:this.props.p,style:this.btnStyle,text:"Apply to be a part-time Waiter"}),null!=this.location.infiltrationData&&n.createElement(u.a,{onClick:this.startInfiltration,style:this.btnStyle,text:"Infiltrate Company"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(4),i=a(30),o=a(44),s=a(19),l=a(10);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.trainStrength=this.trainStrength.bind(this),this.trainDefense=this.trainDefense.bind(this),this.trainDexterity=this.trainDexterity.bind(this),this.trainAgility=this.trainAgility.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=o.a.getIp(this.props.loc.name),t=Object(i.b)(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const a=t.backdoorInstalled?.9:1;return this.props.loc.costMult*a}train(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}trainStrength(){this.train(r.a.ClassGymStrength)}trainDefense(){this.train(r.a.ClassGymDefense)}trainDexterity(){this.train(r.a.ClassGymDexterity)}trainAgility(){this.train(r.a.ClassGymAgility)}render(){const e=r.a.ClassGymBaseCost*this.calculateCost();return n.createElement("div",null,n.createElement(s.a,{onClick:this.trainStrength,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Strength (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainDefense,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Defense (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainDexterity,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Dexterity (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}),n.createElement(s.a,{onClick:this.trainAgility,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Train Agility (",n.createElement(l.a,{money:e,player:this.props.p})," / sec)")}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(216),i=a(107),o=a(10),s=a(8);class l extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return Object(r.b)(this.props.p)}getHealed(e){if(!e.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const t=this.getCost();this.props.p.loseMoney(t),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),Object(s.a)(n.createElement(n.Fragment,null,"You were healed to full health! The hospital billed you for ",n.createElement(o.a,{money:t})))}render(){const e=this.getCost();return n.createElement(i.a,{onClick:this.getHealed,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Get treatment for wounds - ",n.createElement(o.a,{money:e,player:this.props.p}))})}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(50),i=a(2),o=a(107);class s extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.shoplift=this.shoplift.bind(this),this.robStore=this.robStore.bind(this),this.mug=this.mug.bind(this),this.larceny=this.larceny.bind(this),this.dealDrugs=this.dealDrugs.bind(this),this.bondForgery=this.bondForgery.bind(this),this.traffickArms=this.traffickArms.bind(this),this.homicide=this.homicide.bind(this),this.grandTheftAuto=this.grandTheftAuto.bind(this),this.kidnap=this.kidnap.bind(this),this.assassinate=this.assassinate.bind(this),this.heist=this.heist.bind(this)}shoplift(e){e.isTrusted&&r.a.Shoplift.commit(this.props.p)}robStore(e){e.isTrusted&&r.a.RobStore.commit(this.props.p)}mug(e){e.isTrusted&&r.a.Mug.commit(this.props.p)}larceny(e){e.isTrusted&&r.a.Larceny.commit(this.props.p)}dealDrugs(e){e.isTrusted&&r.a.DealDrugs.commit(this.props.p)}bondForgery(e){e.isTrusted&&r.a.BondForgery.commit(this.props.p)}traffickArms(e){e.isTrusted&&r.a.TraffickArms.commit(this.props.p)}homicide(e){e.isTrusted&&r.a.Homicide.commit(this.props.p)}grandTheftAuto(e){e.isTrusted&&r.a.GrandTheftAuto.commit(this.props.p)}kidnap(e){e.isTrusted&&r.a.Kidnap.commit(this.props.p)}assassinate(e){e.isTrusted&&r.a.Assassination.commit(this.props.p)}heist(e){e.isTrusted&&r.a.Heist.commit(this.props.p)}render(){const e=r.a.Shoplift.successRate(this.props.p),t=r.a.RobStore.successRate(this.props.p),a=r.a.Mug.successRate(this.props.p),s=r.a.Larceny.successRate(this.props.p),l=r.a.DealDrugs.successRate(this.props.p),c=r.a.BondForgery.successRate(this.props.p),u=r.a.TraffickArms.successRate(this.props.p),m=r.a.Homicide.successRate(this.props.p),h=r.a.GrandTheftAuto.successRate(this.props.p),p=r.a.Kidnap.successRate(this.props.p),d=r.a.Assassination.successRate(this.props.p),f=r.a.Heist.successRate(this.props.p);return n.createElement("div",null,n.createElement(o.a,{intervalTime:5e3,onClick:this.shoplift,style:this.btnStyle,text:`Shoplift (${i.a.formatPercentage(e)} chance of success)`,tooltip:"Attempt to shoplift from a low-end retailer"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.robStore,style:this.btnStyle,text:`Rob store (${i.a.formatPercentage(t)} chance of success)`,tooltip:"Attempt to commit armed robbery on a high-end store"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.mug,style:this.btnStyle,text:`Mug someone (${i.a.formatPercentage(a)} chance of success)`,tooltip:"Attempt to mug a random person on the street"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.larceny,style:this.btnStyle,text:`Larceny (${i.a.formatPercentage(s)} chance of success)`,tooltip:"Attempt to rob property from someone's house"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.dealDrugs,style:this.btnStyle,text:`Deal Drugs (${i.a.formatPercentage(l)} chance of success)`,tooltip:"Attempt to deal drugs"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.bondForgery,style:this.btnStyle,text:`Bond Forgery (${i.a.formatPercentage(c)} chance of success)`,tooltip:"Attempt to forge corporate bonds"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.traffickArms,style:this.btnStyle,text:`Traffick illegal Arms (${i.a.formatPercentage(u)} chance of success)`,tooltip:"Attempt to smuggle illegal arms into the city"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.homicide,style:this.btnStyle,text:`Homicide (${i.a.formatPercentage(m)} chance of success)`,tooltip:"Attempt to murder a random person on the street"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.grandTheftAuto,style:this.btnStyle,text:`Grand theft Auto (${i.a.formatPercentage(h)} chance of success)`,tooltip:"Attempt to commit grand theft auto"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.kidnap,style:this.btnStyle,text:`Kidnap and Ransom (${i.a.formatPercentage(p)} chance of success)`,tooltip:"Attempt to kidnap and ransom a high-profile-target"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.assassinate,style:this.btnStyle,text:`Assassinate (${i.a.formatPercentage(d)} chance of success)`,tooltip:"Attempt to assassinate a high-profile target"}),n.createElement(o.a,{intervalTime:5e3,onClick:this.heist,style:this.btnStyle,text:`Heist (${i.a.formatPercentage(f)} chance of success)`,tooltip:"Attempt to pull off the ultimate heist"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(187),i=a(6),o=a(107),s=a(19),l=a(8);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.renderNoodleBar=this.renderNoodleBar.bind(this),this.createCorporationPopup=this.createCorporationPopup.bind(this),this.handleBladeburner=this.handleBladeburner.bind(this),this.handleResleeving=this.handleResleeving.bind(this),this.state={inBladeburner:this.props.p.inBladeburner()}}createCorporationPopup(){Object(r.b)(this.props.p)}handleBladeburner(){const e=this.props.p;if(e.inBladeburner())this.props.engine.loadBladeburnerContent();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),Object(l.a)("You have been accepted into the Bladeburner division!"),this.setState({inBladeburner:!0});const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(l.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}handleResleeving(){this.props.engine.loadResleevingContent()}renderBladeburner(){if(!this.props.p.canAccessBladeburner())return null;const e=this.state.inBladeburner?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return n.createElement(s.a,{onClick:this.handleBladeburner,style:this.btnStyle,text:e})}renderNoodleBar(){return n.createElement(s.a,{onClick:function(){Object(l.a)(n.createElement(n.Fragment,null,"You ate some delicious noodles and feel refreshed."))},style:this.btnStyle,text:"Eat noodles"})}renderCreateCorporation(){return this.props.p.canAccessCorporation()?n.createElement(o.a,{disabled:!this.props.p.canAccessCorporation()||this.props.p.hasCorporation(),onClick:this.createCorporationPopup,style:this.btnStyle,text:"Create a Corporation"}):n.createElement(n.Fragment,null,n.createElement("p",null,n.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}renderResleeving(){return this.props.p.canAccessResleeving()?n.createElement(s.a,{onClick:this.handleResleeving,style:this.btnStyle,text:"Re-Sleeve"}):null}render(){switch(this.props.loc.name){case i.a.NewTokyoVitaLife:return this.renderResleeving();case i.a.Sector12CityHall:return this.renderCreateCorporation();case i.a.Sector12NSA:return this.renderBladeburner();case i.a.NewTokyoNoodleBar:return this.renderNoodleBar();default:console.error(`Location ${this.props.loc.name} doesn't have any special properties`)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(67),r=a(186);function i(e,t){const a=Object(n.a)("button",{class:t.class?t.class:"popup-box-button",display:t.display?t.display:"inline-block",innerText:null==t.innerText?"Cancel":t.innerText});function i(e){27===e.keyCode&&a.click()}return a.addEventListener("click",()=>{if(e instanceof Element)Object(r.a)(e);else try{const t=document.getElementById(e);t instanceof Element&&Object(r.a)(t)}catch(e){console.error("createPopupCloseButton() threw: "+e)}return document.removeEventListener("keydown",i),!1}),document.addEventListener("keydown",i),a}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(187),o=a(652),s=a(653),l=a(654),c=a(115),u=a(19),m=a(10);function h(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]);const h={display:"block"},p=[];for(let t=e.loc.techVendorMinRam;t<=e.loc.techVendorMaxRam;t*=2){const a=Object(c.a)(t);p.push(r.a.createElement(u.a,{key:t,onClick:()=>Object(i.a)(t,e.p),style:h,text:r.a.createElement(r.a.Fragment,null,"Purchase ",t,"GB Server - ",r.a.createElement(m.a,{money:a,player:e.p})),disabled:!e.p.canAfford(a)}))}return r.a.createElement("div",null,p,r.a.createElement("br",null),r.a.createElement("p",{className:"noselect"},r.a.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom order in person."')),r.a.createElement("br",null),r.a.createElement(s.a,{p:e.p,rerender:a}),r.a.createElement(o.a,{p:e.p,rerender:a}),r.a.createElement(l.a,{p:e.p,rerender:a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(4),o=a(115),s=a(160),l=a(19),c=a(10),u=a(143);function m(e){const t={display:"block"},a=e.p.getHomeComputer();if(a.maxRam>=i.a.HomeComputerMaxRam)return r.a.createElement(s.a,{style:t,text:"Upgrade 'home' RAM - MAX"});const n=e.p.getUpgradeHomeRamCost();return r.a.createElement(l.a,{disabled:!e.p.canAfford(n),onClick:function(){Object(o.d)(e.p),e.rerender()},style:t,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' RAM (",a.maxRam,"GB -> ",2*a.maxRam,"GB) -"," ",r.a.createElement(c.a,{money:n,player:e.p})),tooltip:r.a.createElement(u.a,{tex:String.raw`\large{cost = 3.2 \times 10^3 \times 1.58^{log_2{(ram)}}}`})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(187),o=a(4),s=a(160),l=a(19),c=a(10);function u(e){const t={display:"block"};return e.p.hasTorRouter()?r.a.createElement(s.a,{style:t,text:"TOR Router - Purchased"}):r.a.createElement(l.a,{disabled:!e.p.canAfford(o.a.TorRouterCost),onClick:function(){Object(i.d)(e.p),e.rerender()},style:t,text:r.a.createElement(r.a.Fragment,null,"Purchase TOR router - ",r.a.createElement(c.a,{money:o.a.TorRouterCost,player:e.p}))})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(160),o=a(19),s=a(10),l=a(143);function c(e){const t={display:"block"},a=e.p.getHomeComputer(),n=a.cpuCores>=8;if(n)return r.a.createElement(i.a,{style:t,text:"Upgrade 'home' cores - MAX"});const c=1e9*Math.pow(7.5,a.cpuCores);return r.a.createElement(o.a,{disabled:!e.p.canAfford(c),onClick:function(){n||e.p.canAfford(c)&&(e.p.loseMoney(c),a.cpuCores++,e.rerender())},style:t,text:r.a.createElement(r.a.Fragment,null,"Upgrade 'home' cores (",a.cpuCores," -> ",a.cpuCores+1,") -"," ",r.a.createElement(s.a,{money:c,player:e.p})),tooltip:r.a.createElement(l.a,{tex:String.raw`\large{cost = 10^9 \times 7.5 ^{\text{cores}}}`})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a(16),i=a(187),o=a(4),s=a(27),l=a(19),c=a(10),u=a(239);class m extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"}}asciiWorldMap(){return n.createElement("div",{className:"noselect"},n.createElement("p",null,"From here, you can travel to any other city! A ticket costs"," ",n.createElement(c.a,{money:o.a.TravelCost,player:this.props.p}),"."),n.createElement(u.a,{currentCity:this.props.p.city,onTravel:e=>Object(i.c)(e,this.props.travel)}))}listWorldMap(){const e=[];for(const t in r.a){const a=r.a[t];a!==this.props.p.city&&e.push(n.createElement(l.a,{key:a,onClick:i.c.bind(null,a,this.props.travel),style:this.btnStyle,text:"Travel to "+a}))}return n.createElement("div",null,n.createElement("p",null,"From here, you can travel to any other city! A ticket costs ",n.createElement(c.a,{money:o.a.TravelCost}),"."),e)}render(){return s.a.DisableASCIIArt?this.listWorldMap():this.asciiWorldMap()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(4),i=a(30),o=a(44),s=a(19),l=a(10);class c extends n.Component{constructor(e){super(e),this.btnStyle={display:"block"},this.take=this.take.bind(this),this.study=this.study.bind(this),this.dataStructures=this.dataStructures.bind(this),this.networks=this.networks.bind(this),this.algorithms=this.algorithms.bind(this),this.management=this.management.bind(this),this.leadership=this.leadership.bind(this),this.calculateCost=this.calculateCost.bind(this)}calculateCost(){const e=o.a.getIp(this.props.loc.name),t=Object(i.b)(e);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return this.props.loc.costMult;const a=t.backdoorInstalled?.9:1;return this.props.loc.costMult*a}take(e){const t=this.props.loc;this.props.p.startClass(this.calculateCost(),t.expMult,e)}study(){this.take(r.a.ClassStudyComputerScience)}dataStructures(){this.take(r.a.ClassDataStructures)}networks(){this.take(r.a.ClassNetworks)}algorithms(){this.take(r.a.ClassAlgorithms)}management(){this.take(r.a.ClassManagement)}leadership(){this.take(r.a.ClassLeadership)}render(){const e=this.calculateCost(),t=r.a.ClassDataStructuresBaseCost*e,a=r.a.ClassNetworksBaseCost*e,i=r.a.ClassAlgorithmsBaseCost*e,o=r.a.ClassManagementBaseCost*e,c=r.a.ClassLeadershipBaseCost*e;return n.createElement("div",null,n.createElement(s.a,{onClick:this.study,style:this.btnStyle,text:"Study Computer Science (free)",tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.dataStructures,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Data Structures course (",n.createElement(l.a,{money:t,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.networks,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Networks course (",n.createElement(l.a,{money:a,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.algorithms,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Algorithms course (",n.createElement(l.a,{money:i,player:this.props.p})," / sec)"),tooltip:"Gain hacking experience!"}),n.createElement(s.a,{onClick:this.management,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Management course (",n.createElement(l.a,{money:o,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}),n.createElement(s.a,{onClick:this.leadership,style:this.btnStyle,text:n.createElement(n.Fragment,null,"Take Leadership course (",n.createElement(l.a,{money:c,player:this.props.p})," / sec)"),tooltip:"Gain charisma experience!"}))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n,r=a(0),i=a(658),o=a(674),s=a(675),l=a(676),c=a(19);!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(n||(n={}));class u extends r.Component{constructor(e){super(e),this.state={game:n.None},this.updateGame=this.updateGame.bind(this)}updateGame(e){this.setState({game:e})}renderGames(){return r.createElement(r.Fragment,null,r.createElement(c.a,{onClick:()=>this.updateGame(n.Coin),text:"Play coin flip"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Slots),text:"Play slots"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Roulette),text:"Play roulette"}),r.createElement("br",null),r.createElement(c.a,{onClick:()=>this.updateGame(n.Blackjack),text:"Play blackjack"}))}renderGame(){let e=null;switch(this.state.game){case n.Coin:e=r.createElement(o.a,{p:this.props.p});break;case n.Slots:e=r.createElement(l.a,{p:this.props.p});break;case n.Roulette:e=r.createElement(s.a,{p:this.props.p});break;case n.Blackjack:e=r.createElement(i.a,{p:this.props.p});break;case n.None:break;default:throw new Error("MissingCaseException: "+this.state.game)}return r.createElement(r.Fragment,null,r.createElement(c.a,{onClick:()=>this.updateGame(n.None),text:"Stop playing"}),e)}render(){return this.state.game===n.None?this.renderGames():this.renderGame()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(10),i=a(200),o=a(659),s=a(274),l=a(998),c=a(363),u=a(661),m=a(332),h=a(366);function p(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var d;!function(e){e.Pending="",e.PlayerWon="You won!",e.PlayerWonByBlackjack="You Won! Blackjack!",e.DealerWon="You lost!",e.Tie="Push! (Tie)"}(d||(d={}));class f extends i.a{constructor(e){super(e),p(this,"canStartGame",()=>{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),p(this,"startGame",()=>{if(!this.canStartGame())return;this.props.p.loseMoney(this.state.bet);const e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result:d.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(d.Tie):this.finishGame(d.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(d.DealerWon)}),p(this,"getHandValue",e=>{let t=[0];for(let a=0;a<e.cards.length;++a){const n=e.cards[a].value;t=n>=10?t.map(e=>e+10):1===n?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+n)}return t}),p(this,"getTrueHandValue",e=>{const t=this.getHandValue(e),a=t.filter(e=>e<=21);return a.length>0?(a.sort((e,t)=>e-t),a[a.length-1]):t[0]}),p(this,"getHandDisplayValues",e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),p(this,"isHandBusted",e=>this.getTrueHandValue(e)>21),p(this,"playerHit",e=>{if(!e.isTrusted)return;const t=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:t}),this.isHandBusted(t)&&this.finishGame(d.DealerWon)}),p(this,"playerStay",e=>{if(!e.isTrusted)return;let t=this.state.dealerHand;for(;;){if(!(this.getTrueHandValue(t)<=16))break;t=t.addCards(this.deck.safeDrawCard())}if(this.setState({dealerHand:t}),this.isHandBusted(t))this.finishGame(d.PlayerWon);else{const e=this.getTrueHandValue(t),a=this.getTrueHandValue(this.state.playerHand);if(e>21||a>21)throw new Error("Someone busted when not expected to");a>e?this.finishGame(d.PlayerWon):a<e?this.finishGame(d.DealerWon):this.finishGame(d.Tie)}}),p(this,"finishGame",e=>{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===d.DealerWon?t=-1*this.state.bet:e===d.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),p(this,"isPlayerWinResult",e=>e===d.PlayerWon||e===d.PlayerWonByBlackjack),p(this,"wagerOnChange",e=>{const{p:t}=this.props,a=e.target.value,n=Math.round(parseFloat(a));isNaN(n)?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):n<=0?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):n>1e8?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):t.canAfford(n)?this.setState({bet:n,betInput:a,wagerInvalid:!1,wagerInvalidHelperText:"",result:d.Pending}):this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),p(this,"startOnClick",e=>{e.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new o.a(5);this.state={playerHand:new s.a([]),dealerHand:new s.a([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:d.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:a,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:p,gains:f}=this.state,g=this.getHandDisplayValues(t),y=this.getHandDisplayValues(a);return n.createElement("div",null,n.createElement("div",null,n.createElement(u.a,{value:e,label:n.createElement(n.Fragment,null,"Wager (Max: ",n.createElement(r.a,{money:1e8}),")"),disabled:i,onChange:this.wagerOnChange,error:s,helperText:s?p:"",type:"number",variant:"filled",style:{width:"200px"},InputProps:{startAdornment:n.createElement(l.a,{position:"start"},"$")}}),n.createElement("p",null,"Total earnings this session: ",n.createElement(r.a,{money:f}))),i?n.createElement("div",null,n.createElement(m.a,{color:"primary",onClick:this.playerHit},"Hit"),n.createElement(m.a,{color:"secondary",onClick:this.playerStay},"Stay")):n.createElement("div",null,n.createElement(m.a,{color:"primary",onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start")),(i||o!==d.Pending)&&n.createElement("div",null,n.createElement(h.a,{variant:"outlined",elevation:2},n.createElement("pre",null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement("pre",null,"Value(s): "),g.map((e,t)=>n.createElement("pre",{key:t},e))),n.createElement("br",null),n.createElement(h.a,{variant:"outlined",elevation:2},n.createElement("pre",null,"Dealer"),a.cards.map((e,t)=>n.createElement(c.a,{card:e,hidden:i&&0!==t,key:t})),!i&&n.createElement(n.Fragment,null,n.createElement("pre",null,"Value(s): "),y.map((e,t)=>n.createElement("pre",{key:t},e))))),o!==d.Pending&&n.createElement("p",null,o,this.isPlayerWinResult(o)&&n.createElement(n.Fragment,null," You gained ",n.createElement(r.a,{money:this.state.bet})),o===d.DealerWon&&n.createElement(n.Fragment,null," You lost ",n.createElement(r.a,{money:this.state.bet}))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(140),r=a(660);class i{constructor(e=1){var t,a,n;n=[],(a="cards")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.numDecks=e,this.reset()}shuffle(){this.cards=Object(r.shuffle)(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let e=1;e<=13;++e)for(let t=0;t<this.numDecks;++t)this.cards.push(new n.a(e,n.b.Clubs)),this.cards.push(new n.a(e,n.b.Diamonds)),this.cards.push(new n.a(e,n.b.Hearts)),this.cards.push(new n.a(e,n.b.Spades));this.shuffle()}size(){return this.cards.length}isEmpty(){return 0===this.cards.length}}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(276),o=a(980);function s(){return(s=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 l={backgroundColor:"rgba(57, 54, 54, 0.9)","&:hover":{backgroundColor:"rgba(70, 70, 70, 0.9)"}},c={border:"1px solid #e2e2e1",overflow:"hidden",borderRadius:4,color:"white",...l},u=Object(i.a)({root:{...c}}),m=Object(i.a)({root:{...l,color:"white"},focused:{backgroundColor:"rgba(70, 70, 70, 0.9)"},disabled:{color:"white"}}),h=Object(i.a)({root:{color:"white"},focused:{color:"white !important"},disabled:{color:"white !important"}}),p=e=>{var t,a;return r.a.createElement(o.a,s({},e,{classes:{...u(),...e.classes},InputProps:{classes:{...m(),...null===(t=e.InputProps)||void 0===t?void 0:t.classes},...e.InputProps},InputLabelProps:{classes:{...h(),...null===(a=e.InputLabelProps)||void 0===a?void 0:a.classes},...e.InputLabelProps}}))}},,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(19),i=a(196),o=a(200),s=a(51);class l extends o.a{constructor(e){super(e),this.state={investment:1e3,result:n.createElement("span",null," "),status:"",playLock:!1},this.play=this.play.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e4&&(t=1e4),t<0&&(t=0),this.setState({investment:t})}play(e){if(this.reachedLimit(this.props.p))return;let t;t=i.a.random()<.5?"H":"T";const a=e===t;this.setState({result:n.createElement("span",{className:a?"text":"failure"},t),status:a?" win!":"lose!",playLock:!0}),setTimeout(()=>this.setState({playLock:!1}),250),a?this.win(this.props.p,this.state.investment):this.win(this.props.p,-this.state.investment),this.reachedLimit(this.props.p)}render(){return n.createElement(n.Fragment,null,n.createElement("pre",null,"+———————+"),n.createElement("pre",null,"| | | |"),n.createElement("pre",null,"| | ",this.state.result," | |"),n.createElement("pre",null,"| | | |"),n.createElement("pre",null,"+———————+"),n.createElement("span",{className:"text"},"Play for: "),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,value:this.state.investment}),n.createElement("br",null),n.createElement(r.a,{onClick:Object(s.a)(()=>this.play("H")),text:"Head!",disabled:this.state.playLock}),n.createElement(r.a,{onClick:Object(s.a)(()=>this.play("T")),text:"Tail!",disabled:this.state.playLock}),n.createElement("h1",null,this.state.status))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a(19),i=a(10),o=a(200),s=a(196),l=a(51);const c=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],u={Red:{match:e=>0!==e&&c.includes(e),payout:1},Black:{match:e=>!c.includes(e),payout:1},Odd:{match:e=>0!==e&&e%2==1,payout:1},Even:{match:e=>0!==e&&e%2==0,payout:1},High:{match:e=>0!==e&&e>18,payout:1},Low:{match:e=>0!==e&&e<19,payout:1},Third1:{match:e=>0!==e&&e<=12,payout:2},Third2:{match:e=>0!==e&&(e>=13&&e<=24),payout:2},Third3:{match:e=>0!==e&&e>=25,payout:2}};function m(e){return{match:t=>e===t,payout:36}}class h extends o.a{constructor(e){var t,a,n;super(e),n=-1,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.rng=new s.b((new Date).getTime()),this.state={investment:1e3,canPlay:!0,status:"waiting",n:0,lock:!0,strategy:{payout:0,match:()=>!1}},this.step=this.step.bind(this),this.currentNumber=this.currentNumber.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){this.state.lock||this.setState({n:Math.floor(37*Math.random())})}componentWillUnmount(){clearInterval(this.interval)}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e7&&(t=1e7),t<0&&(t=0),this.setState({investment:t})}currentNumber(){if(0===this.state.n)return"0";const e=(t=this.state.n,[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(t)?"R":"B");var t;return`${this.state.n}${e}`}play(e){this.reachedLimit(this.props.p)||(this.setState({canPlay:!1,lock:!1,status:"playing",strategy:e}),setTimeout(()=>{let e=Math.floor(37*this.rng.random()),t=n.createElement(n.Fragment,null),a=0,r=this.state.strategy.match(e);if(r&&Math.random()>.9)for(r=!1;this.state.strategy.match(e);)e++;r?(a=this.state.investment*this.state.strategy.payout,t=n.createElement(n.Fragment,null,"won ",n.createElement(i.a,{money:a}))):(a=-this.state.investment,t=n.createElement(n.Fragment,null,"lost ",n.createElement(i.a,{money:-a}))),this.win(this.props.p,a),this.setState({canPlay:!0,lock:!0,status:t,n:e}),this.reachedLimit(this.props.p)},1600))}render(){return n.createElement(n.Fragment,null,n.createElement("h1",null,this.currentNumber()),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),n.createElement("h1",null,this.state.status),n.createElement("table",null,n.createElement("tbody",null,n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"3",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(3)))})),n.createElement("td",null,n.createElement(r.a,{text:"6",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(6)))})),n.createElement("td",null,n.createElement(r.a,{text:"9",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(9)))})),n.createElement("td",null,n.createElement(r.a,{text:"12",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(12)))})),n.createElement("td",null,n.createElement(r.a,{text:"15",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(15)))})),n.createElement("td",null,n.createElement(r.a,{text:"18",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(18)))})),n.createElement("td",null,n.createElement(r.a,{text:"21",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(21)))})),n.createElement("td",null,n.createElement(r.a,{text:"24",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(24)))})),n.createElement("td",null,n.createElement(r.a,{text:"27",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(27)))})),n.createElement("td",null,n.createElement(r.a,{text:"30",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(30)))})),n.createElement("td",null,n.createElement(r.a,{text:"33",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(33)))})),n.createElement("td",null,n.createElement(r.a,{text:"36",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(36)))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"2",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(2)))})),n.createElement("td",null,n.createElement(r.a,{text:"5",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(5)))})),n.createElement("td",null,n.createElement(r.a,{text:"8",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(8)))})),n.createElement("td",null,n.createElement(r.a,{text:"11",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(11)))})),n.createElement("td",null,n.createElement(r.a,{text:"14",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(14)))})),n.createElement("td",null,n.createElement(r.a,{text:"17",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(17)))})),n.createElement("td",null,n.createElement(r.a,{text:"20",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(20)))})),n.createElement("td",null,n.createElement(r.a,{text:"23",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(23)))})),n.createElement("td",null,n.createElement(r.a,{text:"26",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(26)))})),n.createElement("td",null,n.createElement(r.a,{text:"29",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(29)))})),n.createElement("td",null,n.createElement(r.a,{text:"32",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(32)))})),n.createElement("td",null,n.createElement(r.a,{text:"35",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(35)))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"1",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(1)))})),n.createElement("td",null,n.createElement(r.a,{text:"4",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(4)))})),n.createElement("td",null,n.createElement(r.a,{text:"7",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(7)))})),n.createElement("td",null,n.createElement(r.a,{text:"10",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(10)))})),n.createElement("td",null,n.createElement(r.a,{text:"13",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(13)))})),n.createElement("td",null,n.createElement(r.a,{text:"16",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(16)))})),n.createElement("td",null,n.createElement(r.a,{text:"19",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(19)))})),n.createElement("td",null,n.createElement(r.a,{text:"22",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(22)))})),n.createElement("td",null,n.createElement(r.a,{text:"25",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(25)))})),n.createElement("td",null,n.createElement(r.a,{text:"28",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(28)))})),n.createElement("td",null,n.createElement(r.a,{text:"31",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(31)))})),n.createElement("td",null,n.createElement(r.a,{text:"34",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(34)))}))),n.createElement("tr",null,n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"1 to 12",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third1))})),n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"13 to 24",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third2))})),n.createElement("td",{colSpan:4},n.createElement(r.a,{text:"25 to 36",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Third3))}))),n.createElement("tr",null,n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Red",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Red))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Black",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Black))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Odd",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Odd))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Even",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Even))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"High",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.High))})),n.createElement("td",{colSpan:2},n.createElement(r.a,{text:"Low",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(u.Low))}))),n.createElement("tr",null,n.createElement("td",null,n.createElement(r.a,{text:"0",disabled:!this.state.canPlay,onClick:Object(l.a)(()=>this.play(m(0)))}))))))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a(19),i=a(10),o=a(196),s=a(200),l=a(51);const c=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function u(e,t){switch(e){case"$":return[20,200,1e3][t];case"@":return[8,80,400][t];case"♥":case"?":return[6,20,150][t];case"D":case"E":return[1,8,30][t];default:return[1,5,20][t]}}const m=[[[0,0],[0,1],[0,2],[0,3],[0,4]],[[1,0],[1,1],[1,2],[1,3],[1,4]],[[2,0],[2,1],[2,2],[2,3],[2,4]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[0,0],[1,1],[1,2],[1,3],[0,4]],[[2,0],[1,1],[1,2],[1,3],[2,4]],[[1,0],[0,1],[0,2],[0,3],[1,4]],[[1,0],[2,1],[2,2],[2,3],[1,4]]];class h extends s.a{constructor(e){var t,a,n;super(e),n=-1,(a="interval")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.rng=new o.b(this.props.p.totalPlaytime),this.state={index:[0,0,0,0,0],investment:1e3,locks:[0,0,0,0,0],canPlay:!0,status:"waiting"},this.play=this.play.bind(this),this.lock=this.lock.bind(this),this.unlock=this.unlock.bind(this),this.step=this.step.bind(this),this.checkWinnings=this.checkWinnings.bind(this),this.getTable=this.getTable.bind(this),this.updateInvestment=this.updateInvestment.bind(this)}componentDidMount(){this.interval=window.setInterval(this.step,50)}step(){let e=!1;const t=this.state.index.slice();for(const a in t)(t[a]!==this.state.locks[a]||e)&&(t[a]=(t[a]+1)%c.length,e=!0);this.setState({index:t}),e&&t.every((e,t)=>e===this.state.locks[t])&&this.checkWinnings()}componentWillUnmount(){clearInterval(this.interval)}getTable(){return[[c[(this.state.index[0]+c.length-1)%c.length],c[(this.state.index[1]+c.length-1)%c.length],c[(this.state.index[2]+c.length-1)%c.length],c[(this.state.index[3]+c.length-1)%c.length],c[(this.state.index[4]+c.length-1)%c.length]],[c[this.state.index[0]],c[this.state.index[1]],c[this.state.index[2]],c[this.state.index[3]],c[this.state.index[4]]],[c[(this.state.index[0]+1)%c.length],c[(this.state.index[1]+1)%c.length],c[(this.state.index[2]+1)%c.length],c[(this.state.index[3]+1)%c.length],c[(this.state.index[4]+1)%c.length]]]}play(){this.reachedLimit(this.props.p)||(this.setState({status:"playing"}),this.win(this.props.p,-this.state.investment),this.state.canPlay&&(this.unlock(),setTimeout(this.lock,2e3*this.rng.random()+1e3)))}lock(){this.setState({locks:[Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length),Math.floor(this.rng.random()*c.length)]})}checkWinnings(){const e=this.getTable(),t=function(t){const a=[];for(const n of t)a.push(e[n[0]][n[1]]);return a},a=function(e){let t=1;for(let a=1;a<e.length&&e[a]===e[a-1];a++)t++;return t};let r=-this.state.investment;for(const e of m){const n=t(e),i=a(n);if(i<3)continue;const o=u(n[0],i-3);r+=this.state.investment*o,this.win(this.props.p,this.state.investment*o)}this.setState({status:n.createElement(n.Fragment,null,r>0?"gained":"lost"," ",n.createElement(i.a,{money:Math.abs(r)})),canPlay:!0}),this.reachedLimit(this.props.p)}unlock(){this.setState({locks:[-1,-1,-1,-1,-1],canPlay:!1})}updateInvestment(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e6&&(t=1e6),t<0&&(t=0),this.setState({investment:t})}render(){const e=this.getTable();return n.createElement(n.Fragment,null,n.createElement("pre",null,"+———————————————————————+"),n.createElement("pre",null,"| | ",e[0][0]," | ",e[0][1]," | ",e[0][2]," | ",e[0][3]," | ",e[0][4]," | |"),n.createElement("pre",null,"| | | | | | | |"),n.createElement("pre",null,"| | ",c[this.state.index[0]]," | ",c[this.state.index[1]]," | ",c[this.state.index[2]]," | ",c[this.state.index[3]]," | ",c[this.state.index[4]]," | |"),n.createElement("pre",null,"| | | | | | | |"),n.createElement("pre",null,"| | ",c[(this.state.index[0]+1)%c.length]," | ",c[(this.state.index[1]+1)%c.length]," | ",c[(this.state.index[2]+1)%c.length]," | ",c[(this.state.index[3]+1)%c.length]," | ",c[(this.state.index[4]+1)%c.length]," | |"),n.createElement("pre",null,"+———————————————————————+"),n.createElement("input",{type:"number",className:"text-input",onChange:this.updateInvestment,placeholder:"Amount to play",value:this.state.investment,disabled:!this.state.canPlay}),n.createElement(r.a,{onClick:Object(l.a)(this.play),text:"Spin!",disabled:!this.state.canPlay}),n.createElement("h1",null,this.state.status),n.createElement("h2",null,"Pay lines"),n.createElement("pre",null,"----- ····· ·····"),n.createElement("pre",null,"····· ----- ·····"),n.createElement("pre",null,"····· ····· -----"),n.createElement("br",null),n.createElement("pre",null,"··^·· \\···/ \\···/"),n.createElement("pre",null,"·/·\\· ·\\·/· ·---·"),n.createElement("pre",null,"/···\\ ··v·· ·····"),n.createElement("br",null),n.createElement("pre",null,"····· ·---· ·····"),n.createElement("pre",null,"·---· /···\\ \\···/"),n.createElement("pre",null,"/···\\ ····· ·---·"))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(e.content);return Object(n.useEffect)(()=>{let e=5;const n=setInterval(()=>{if(e--,e>0)return;e=5*Math.random();const n=Math.random()*t.length,r=t.charAt(n);a(function(e,t,a){return e.substring(0,t)+a+e.substring(t+1)}(t,n,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],a=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const n of a)if(n.includes(e))return t(n);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{a(t)},50)},100);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(299);function o(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,1e3);return()=>clearInterval(e)},[]),r.a.createElement("div",{id:"create-program-container"},r.a.createElement("p",{id:"create-program-page-text"},"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later."),r.a.createElement("ul",{id:"create-program-list"},Object(i.a)(e.player).map(t=>{const a=t.create;return null===a?r.a.createElement(r.a.Fragment,null):r.a.createElement("a",{key:t.name,className:"a-link-button tooltip",onClick:()=>e.player.startCreateProgramWork(t.name,a.time,a.level)},t.name,r.a.createElement("span",{className:"tooltiptext"},a.tooltip))})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return x}));var n=a(0),r=a.n(n),i=a(19),o=a(680),s=a(20),l=a(693),c=a(694),u=a(75),m=a(8),h=a(220),p=a(82),d=a(201),f=a(162),g=a(288),y=a(164),_=a(2),b=a(368),E=a(369),v=a(259),k=a(27),C=a(42);let O=[];!function(){const e=Object(v.a)({});O=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"];O=O.filter(e=>!t.includes(e))}();let w="",S="",T=null;function x(e){const t=Object(n.useRef)(null),[a,v]=Object(n.useState)(e.filename?e.filename:w),[x,M]=Object(n.useState)(e.code?e.code:S),[P,A]=Object(n.useState)("RAM: ???"),[R,N]=Object(n.useState)({theme:k.a.MonacoTheme,insertSpaces:k.a.MonacoInsertSpaces});function D(){if(null!==t.current){const e=t.current.getPosition();null!==e&&b.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(T=null,C.a.isRunning&&C.a.currStep===C.d.TerminalTypeScript){if("n00dles.script"!==a)return void Object(m.a)("Leave the script name as 'n00dles'!");if(-1==x.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(m.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.");for(let n=0;n<t.scripts.length;n++)if(a==t.scripts[n].filename)return t.scripts[n].saveScript(x,e.player.currentServer,t.scripts),e.engine.loadTerminalContent(),Object(C.b)();const n=new d.a;return n.saveScript(x,e.player.currentServer,t.scripts),t.scripts.push(n),Object(C.b)()}if(""==a)return void Object(m.a)("You must specify a filename!");if(".fconf"!==a&&!Object(u.g)(a))return void Object(m.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(".fconf"===a)try{Object(h.c)(x)}catch(e){return void Object(m.a)("Invalid .fconf file: "+e)}else if(Object(p.a)(a)){for(let t=0;t<n.scripts.length;t++)if(a==n.scripts[t].filename)return n.scripts[t].saveScript(x,e.player.currentServer,n.scripts),void e.engine.loadTerminalContent();const t=new d.a;t.saveScript(x,e.player.currentServer,n.scripts),n.scripts.push(t)}else{if(!a.endsWith(".txt"))return void Object(m.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(x),void e.engine.loadTerminalContent();const t=new f.a(a,x);n.textFiles.push(t)}}e.engine.loadTerminalContent()}async function I(){const t=x+"",a=await Object(g.a)(t,e.player.getCurrentServer().scripts);if(!(a>0)){switch(a){case y.a.ImportError:A("RAM: Import Error");break;case y.a.URLImportError:A("RAM: HTTP Import Error");break;case y.a.SyntaxError:default:A("RAM: Syntax Error")}return new Promise(()=>{})}A("RAM: "+_.a.formatRAM(a))}return Object(n.useEffect)(()=>{""!==e.filename&&(w=e.filename,S=e.code,T=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(I,1e3);return()=>clearInterval(e)},[x]),Object(n.useEffect)(()=>{function e(e){k.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),D())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement("div",{id:"script-editor-wrapper"},r.a.createElement("div",{id:"script-editor-filename-wrapper"},r.a.createElement("p",{id:"script-editor-filename-tag",className:"noselect"}," ",r.a.createElement("strong",{style:{backgroundColor:"#555"}},"Script name: ")),r.a.createElement("input",{id:"script-editor-filename",type:"text",maxLength:100,tabIndex:1,value:a,onChange:function(e){w=a,v(e.target.value)}}),r.a.createElement(i.a,{text:"options",onClick:function(){const e="script-editor-options-popup",t={theme:"",insertSpaces:!1};Object.assign(t,R),Object(s.a)(e,l.a,{id:e,options:t,save:e=>{N(e),k.a.MonacoTheme=e.theme,k.a.MonacoInsertSpaces=e.insertSpaces}})}})),r.a.createElement(o.a,{beforeMount:function(e){e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of O)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(E.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(E.a,"netscript.d.ts")},onMount:function(e){if(t.current=e,null===t.current)return;const n=b.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==T&&t.current.setPosition({lineNumber:T.lineNumber,column:T.column+1}),t.current.focus()},loading:r.a.createElement("p",null,"Loading script editor!"),height:"80%",defaultLanguage:"javascript",defaultValue:x,onChange:function(e){void 0!==e&&(S=e,null!==t.current&&(T=t.current.getPosition()),M(e))},theme:R.theme,options:R}),r.a.createElement("div",{id:"script-editor-buttons-wrapper"},r.a.createElement(i.a,{text:"Beautify",onClick:function(){if(null===t.current)return;const e=Object(c.js_beautify)(x,{indent_with_tabs:!R.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}}),r.a.createElement("p",{id:"script-editor-status-text",style:{display:"inline-block",margin:"10px"}},P),r.a.createElement("button",{className:"std-button",style:{display:"inline-block"},onClick:D},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement("a",{className:"std-button",style:{display:"inline-block"},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Netscript Documentation")))}},,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(19),o=a(20);function s(e){const[t,a]=Object(n.useState)(e.options.theme),[s,l]=Object(n.useState)(e.options.insertSpaces);return r.a.createElement("div",{className:"editor-options-container noselect"},r.a.createElement("div",{className:"editor-options-line"},r.a.createElement("p",null,"Theme: "),r.a.createElement("select",{className:"dropdown",onChange:e=>a(e.target.value),defaultValue:t},r.a.createElement("option",{value:"vs-dark"},"vs-dark"),r.a.createElement("option",{value:"light"},"light"))),r.a.createElement("div",{className:"editor-options-line"},r.a.createElement("p",null,"Use whitespace over tabs: "),r.a.createElement("input",{type:"checkbox",onChange:e=>l(e.target.checked),checked:s})),r.a.createElement("br",null),r.a.createElement(i.a,{style:{width:"50px"},text:"Save",onClick:function(){e.save({theme:t,insertSpaces:s}),Object(o.b)(e.id)}}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(370),r=a(0);function i(e){const t=function(e,t){let a=-1;for(let n=0;n<t.length;n++)t[n].fulfilled(e)&&(a=n);return a}(e.player,n.a),a=n.a.map((a,n)=>{if(n<=t+1)return r.createElement("ul",{key:n},r.createElement("p",null,"[",a.fulfilled(e.player)?"x":" ","] ",a.title))});return r.createElement("div",{id:"milestones-container"},r.createElement("h1",null,"Milestones"),r.createElement("p",null,"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations."),r.createElement("br",null),r.createElement("h2",null,"Completing fl1ght.exe"),r.createElement("li",null,a))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){return r.a.createElement("div",{id:"tutorial-container"},r.a.createElement("h1",null,"Tutorial (AKA Links to Documentation)"),r.a.createElement("a",{id:"tutorial-getting-started-link",className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},"Getting Started"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},"Servers & Networking"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},"Hacking"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},"Scripts"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},"Netscript Programming Language"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},"Traveling"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},"Companies"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},"Infiltration"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},"Factions"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},"Augmentations"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("a",{className:"a-link-button",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},"Keyboard Shortcuts"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(2),o=a(133),s=a(8),l=a(11),c=a(5),u=a(43),m=a(115),h=a(24),p=a(134),d=a(10);function f(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[f,g]=Object(n.useState)("Overview");function y(e){const t=[["Total:",r.a.createElement(d.a,{money:e.total})]];return e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(d.a,{money:e.bladeburner})]),e.codingcontract&&t.push(["Coding Contracts:",r.a.createElement(d.a,{money:e.codingcontract})]),e.work&&t.push(["Company Work:",r.a.createElement(d.a,{money:e.work})]),e.class&&t.push(["Class:",r.a.createElement(d.a,{money:e.class})]),e.corporation&&t.push(["Corporation:",r.a.createElement(d.a,{money:e.corporation})]),e.crime&&t.push(["Crimes:",r.a.createElement(d.a,{money:e.crime})]),e.gang&&t.push(["Gang:",r.a.createElement(d.a,{money:e.gang})]),e.hacking&&t.push(["Hacking:",r.a.createElement(d.a,{money:e.hacking})]),e.hacknetnode&&t.push(["Hacknet Nodes:",r.a.createElement(d.a,{money:e.hacknetnode})]),e.hospitalization&&t.push(["Hospitalization:",r.a.createElement(d.a,{money:e.hospitalization})]),e.infiltration&&t.push(["Infiltration:",r.a.createElement(d.a,{money:e.infiltration})]),e.stock&&t.push(["Stock Market:",r.a.createElement(d.a,{money:e.stock})]),e.casino&&t.push(["Casino:",r.a.createElement(d.a,{money:e.casino})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(d.a,{money:e.sleeves})]),Object(p.a)(t)}function _(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement("table",null,r.a.createElement("tbody",null,e.rows.map(e=>r.a.createElement("tr",{key:e[0]},r.a.createElement("td",{key:"0"},e[0]+" multiplier:"),r.a.createElement("td",{key:"1",style:{textAlign:"right",paddingLeft:"5px"}},i.a.formatPercentage(e[1])),function(e){return u.a[5]>0&&e.length>2&&e[1]!=e[2]?r.a.createElement("td",{key:"2",style:{textAlign:"right"}}," ","(",i.a.formatPercentage(e[2]),")"):r.a.createElement(r.a.Fragment,null)}(e))))))}Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]);const b=[["Time played since last Augmentation:",Object(l.b)(e.player.playtimeSinceLastAug)]];return e.player.sourceFiles.length>0&&b.push(["Time played since last Bitnode destroyed:",Object(l.b)(e.player.playtimeSinceLastBitnode)]),b.push(["Total Time played:",Object(l.b)(e.player.totalPlaytime)]),r.a.createElement("div",{id:"character-container"},r.a.createElement("pre",null,r.a.createElement("b",null,"General"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",null,"Current City: ",e.player.city),r.a.createElement("br",null),r.a.createElement((function(){return e.player.companyName?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Employer at which you last worked: ",e.player.companyName),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement((function(){return""!==e.player.companyName?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Job you last worked: ",e.player.jobs[e.player.companyName]),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement((function(){return e.player.jobs&&0!==Object.keys(e.player.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"All Employers:"),r.a.createElement("br",null),r.a.createElement("ul",null,Object.keys(e.player.jobs).map(e=>r.a.createElement("li",{key:e}," * ",e))),r.a.createElement("br",null),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement("span",null,"Money: ",r.a.createElement(d.a,{money:e.player.money.toNumber()})),r.a.createElement("button",{className:"popup-box-button",style:{display:"inline-block",float:"none"},onClick:function(){let t=r.a.createElement(r.a.Fragment,null,r.a.createElement("u",null,"Money earned since you last installed Augmentations:"),r.a.createElement("br",null),y(e.player.moneySourceA));0!==e.player.sourceFiles.length&&(t=r.a.createElement(r.a.Fragment,null,t,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("u",null,"Money earned in this BitNode:"),r.a.createElement("br",null),y(e.player.moneySourceB))),Object(s.a)(t,!1)}},"Money Statistics & Breakdown"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("b",null,"Stats"),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",{key:"0"},r.a.createElement("td",{key:"0"},"Hacking:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.hacking_skill)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.hacking_exp)," exp)")),r.a.createElement("tr",{key:"1"},r.a.createElement("td",{key:"0"},"Strength:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.strength)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.strength_exp)," exp)")),r.a.createElement("tr",{key:"2"},r.a.createElement("td",{key:"0"},"Defense:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.defense)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.defense_exp)," exp)")),r.a.createElement("tr",{key:"3"},r.a.createElement("td",{key:"0"},"Dexterity:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.dexterity)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.dexterity_exp)," exp)")),r.a.createElement("tr",{key:"4"},r.a.createElement("td",{key:"0"},"Agility:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.agility)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.agility_exp)," exp)")),r.a.createElement("tr",{key:"5"},r.a.createElement("td",{key:"0"},"Charisma:"),r.a.createElement("td",{key:"1",style:{textAlign:"right"}},i.a.formatSkill(e.player.charisma)),r.a.createElement("td",{key:"2",style:{textAlign:"right"}},"(",i.a.formatExp(e.player.charisma_exp)," exp)")),r.a.createElement((function(){return e.player.intelligence>0&&(5===e.player.bitNodeN||u.a[5]>0)?r.a.createElement("tr",{key:"5"},r.a.createElement("td",null,"Intelligence:"),r.a.createElement("td",{style:{textAlign:"right"}},i.a.formatSkill(e.player.intelligence))):r.a.createElement(r.a.Fragment,null)}),null))),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Hacking Chance",e.player.hacking_chance_mult],["Hacking Speed",e.player.hacking_speed_mult],["Hacking Money",e.player.hacking_money_mult,e.player.hacking_money_mult*c.a.ScriptHackMoney],["Hacking Growth",e.player.hacking_grow_mult,e.player.hacking_grow_mult*c.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Hacking Level",e.player.hacking_mult,e.player.hacking_mult*c.a.HackingLevelMultiplier],["Hacking Experience",e.player.hacking_exp_mult,e.player.hacking_exp_mult*c.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Strength Level",e.player.strength_mult,e.player.strength_mult*c.a.StrengthLevelMultiplier],["Strength Experience",e.player.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Defense Level",e.player.defense_mult,e.player.defense_mult*c.a.DefenseLevelMultiplier],["Defense Experience",e.player.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Dexterity Level",e.player.dexterity_mult,e.player.dexterity_mult*c.a.DexterityLevelMultiplier],["Dexterity Experience",e.player.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Agility Level",e.player.agility_mult,e.player.agility_mult*c.a.AgilityLevelMultiplier],["Agility Experience",e.player.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Charisma Level",e.player.charisma_mult,e.player.charisma_mult*c.a.CharismaLevelMultiplier],["Charisma Experience",e.player.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Hacknet Node production",e.player.hacknet_node_money_mult,e.player.hacknet_node_money_mult*c.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.player.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.player.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.player.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.player.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Company reputation gain",e.player.company_rep_mult],["Faction reputation gain",e.player.faction_rep_mult,e.player.faction_rep_mult*c.a.FactionWorkRepGain],["Salary",e.player.work_money_mult,e.player.work_money_mult*c.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(_,{rows:[["Crime success",e.player.crime_success_mult],["Crime money",e.player.crime_money_mult,e.player.crime_money_mult*c.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement((function(){return e.player.canAccessBladeburner()?r.a.createElement(r.a.Fragment,null,r.a.createElement(_,{rows:[["Bladeburner Success Chance",e.player.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.player.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.player.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.player.bladeburner_success_chance_mult]]}),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null)}),null),r.a.createElement("br",null),r.a.createElement("b",null,"Misc."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("span",null,`Servers owned: ${e.player.purchasedServers.length} / ${Object(m.b)()}`),r.a.createElement("br",null),r.a.createElement((function(){return 9===e.player.bitNodeN||u.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,`Hacknet Servers owned: ${e.player.hacknetNodes.length} / ${h.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Hacknet Nodes owned: "+e.player.hacknetNodes.length),r.a.createElement("br",null))}),null),r.a.createElement("span",null,"Augmentations installed: "+e.player.augmentations.length),r.a.createElement("br",null),r.a.createElement("br",null),Object(p.a)(b),r.a.createElement("br",null),r.a.createElement((function(){if(e.player.sourceFiles.length>0){const t="BitNode"+e.player.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,"Current BitNode: ",e.player.bitNodeN," (",o.a[t].name,")"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("div",{style:{width:"60%",fontSize:"13px",marginLeft:"4%"}},o.a[t].info.split("<br>").map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement("span",{style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},e),r.a.createElement("br",null)))))}return r.a.createElement(r.a.Fragment,null)}),null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(26),r=a(27),i=a(2);function o(){function e(e){0===r.a.AutosaveInterval?e.innerHTML="disabled":e.innerHTML=`every ${r.a.AutosaveInterval}s`}const t=document.getElementById("settingsNSExecTimeRangeValLabel"),a=document.getElementById("settingsNSLogRangeValLabel"),o=document.getElementById("settingsNSPortRangeValLabel"),s=document.getElementById("settingsSuppressMessages"),l=document.getElementById("settingsSuppressFactionInvites"),c=document.getElementById("settingsSuppressTravelConfirmation"),u=document.getElementById("settingsSuppressBuyAugmentationConfirmation"),m=document.getElementById("settingsSuppressHospitalizationPopup"),h=document.getElementById("settingsSuppressBladeburnerPopup"),p=document.getElementById("settingsAutosaveIntervalValLabel"),d=document.getElementById("settingsDisableHotkeys"),f=document.getElementById("settingsDisableASCIIArt"),g=document.getElementById("settingsDisableTextEffects"),y=document.getElementById("settingsLocale");t.innerHTML=r.a.CodeInstructionRunTime+"ms",a.innerHTML=r.a.MaxLogCapacity,o.innerHTML=r.a.MaxPortCapacity,s.checked=r.a.SuppressMessages,l.checked=r.a.SuppressFactionInvites,c.checked=r.a.SuppressTravelConfirmation,u.checked=r.a.SuppressBuyAugmentationConfirmation,m.checked=r.a.SuppressHospitalizationPopup,h.checked=r.a.SuppressBladeburnerPopup,e(p),d.checked=r.a.DisableHotkeys,f.checked=r.a.CityListView,g.checked=r.a.DisableTextEffects,y.value=r.a.Locale,i.a.updateLocale(r.a.Locale);const _=document.getElementById("settingsNSExecTimeRangeVal"),b=document.getElementById("settingsNSLogRangeVal"),E=document.getElementById("settingsNSPortRangeVal"),v=document.getElementById("settingsAutosaveIntervalVal");_.value=r.a.CodeInstructionRunTime,b.value=r.a.MaxLogCapacity,E.value=r.a.MaxPortCapacity,v.value=r.a.AutosaveInterval,_.oninput=function(){t.innerHTML=this.value+"ms",r.a.CodeInstructionRunTime=this.value},b.oninput=function(){a.innerHTML=this.value,r.a.MaxLogCapacity=this.value},E.oninput=function(){o.innerHTML=this.value,r.a.MaxPortCapacity=this.value},v.oninput=function(){r.a.AutosaveInterval=Number(this.value),e(p),0===Number(this.value)?n.Engine.Counters.autoSaveCounter=1/0:n.Engine.Counters.autoSaveCounter=5*Number(this.value)},s.onclick=function(){r.a.SuppressMessages=this.checked},l.onclick=function(){r.a.SuppressFactionInvites=this.checked},c.onclick=function(){r.a.SuppressTravelConfirmation=this.checked},u.onclick=function(){r.a.SuppressBuyAugmentationConfirmation=this.checked},m.onclick=function(){r.a.SuppressHospitalizationPopup=this.checked},h.onclick=function(){r.a.SuppressBladeburnerPopup=this.checked},d.onclick=function(){r.a.DisableHotkeys=this.checked},f.onclick=function(){r.a.DisableASCIIArt=this.checked},g.onclick=function(){r.a.DisableTextEffects=this.checked},y.onchange=function(){if(!i.a.updateLocale(y.value)){console.warn("Invalid locale for numeral: "+y.value);let e="en";return r.a.Locale=e,void(y.value=e)}r.a.Locale=y.value}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(700),o=a(701);function s(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[s,l]=Object(n.useState)("Overview");return Object(n.useEffect)(()=>{const e=setInterval(a,20);return()=>clearInterval(e)},[]),r.a.createElement("div",{id:"active-scripts-container"},r.a.createElement("p",null,"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running."),r.a.createElement(i.a,e),r.a.createElement(o.a,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(10);function i(e){const t=e.p.scriptProdSinceLastAug/(e.p.playtimeSinceLastAug/1e3);let a=0;for(const t of e.workerScripts.values())a+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return n.createElement("p",{id:"active-scripts-total-prod"},"Total online production of Active scripts: ",n.createElement("span",{className:"money-gold"},n.createElement("span",{id:"active-scripts-total-production-active"},n.createElement(r.a,{money:a}))," ","/ sec"),n.createElement("br",null),"Total online production since last Aug installation: ",n.createElement("span",{id:"active-scripts-total-prod-aug-total",className:"money-gold"},n.createElement(r.a,{money:e.p.scriptProdSinceLastAug}))," (",n.createElement("span",{className:"money-gold"},n.createElement("span",{id:"active-scripts-total-prod-aug-avg",className:"money-gold"},n.createElement(r.a,{money:t}))," ","/ sec"),")")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(702),i=a(153),o=a(30);class s extends n.Component{constructor(e){var t,a,n;super(e),n={},(a="serverToScriptMap")in(t=this)?Object.defineProperty(t,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[a]=n,this.state={rerenderFlag:!1},this.updateServerToScriptsMap(),this.rerender=this.rerender.bind(this)}componentDidMount(){i.a.addSubscriber({cb:this.rerender,id:"ActiveScriptsUI"})}componentWillUnmount(){i.a.removeSubscriber("ActiveScriptsUI")}updateServerToScriptsMap(){const e={};for(const t of this.props.workerScripts.values()){const a=Object(o.b)(t.serverIp);null!=a?(null==e[a.hostname]&&(e[a.hostname]={server:a,workerScripts:[]}),e[a.hostname].workerScripts.push(t)):console.warn("WorkerScript has invalid IP address: "+t.serverIp)}this.serverToScriptMap=e}rerender(){this.updateServerToScriptsMap(),this.setState(e=>({rerenderFlag:!e.rerenderFlag}))}render(){const e=Object.keys(this.serverToScriptMap).map(e=>{const t=this.serverToScriptMap[e];return n.createElement(r.a,{key:e,server:t.server,workerScripts:t.workerScripts})});return n.createElement("ul",{className:"active-scripts-list",id:"active-scripts-list"},e)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(102),i=a(703),o=a(131);function s(e){const t=e.server,a=`${t.hostname}${" ".repeat(18)}`.slice(0,Math.max(t.hostname.length,18)),s={progress:t.ramUsed/t.maxRam,totalTicks:30},l=`${a} ${Object(o.a)(s)}`;return n.createElement(r.a,{headerContent:n.createElement("pre",null,l),panelContent:n.createElement(i.a,{workerScripts:e.workerScripts})})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(371),o=a(209);function s(e){if(e.workerScripts.length>20)return r.a.createElement(l,{workerScripts:e.workerScripts});const t=e.workerScripts.map(e=>r.a.createElement(i.a,{key:`${e.name}_${e.args}`,workerScript:e}));return r.a.createElement("ul",null,t)}function l(e){const[t,a]=Object(n.useState)(0),s=[],l=Math.ceil(e.workerScripts.length/20),c=Math.min(20*(t+1),e.workerScripts.length);for(let a=20*t;a<c;a++){const t=e.workerScripts[a];s.push(r.a.createElement(i.a,{key:`${t.name}_${t.args}`,workerScript:t}))}function u(e){return e<0&&(e=0),l-1<e&&(e=l-1),e}const m=u(t);function h(e){a(t=>(t+=e,u(t=Math.round(t))))}return m!==t&&a(m),r.a.createElement(r.a.Fragment,null,r.a.createElement("ul",null,s),r.a.createElement(o.a,{onClick:()=>h(-1e99),text:"<<"}),r.a.createElement(o.a,{onClick:()=>h(-1),text:"<"}),r.a.createElement("span",{className:"text"},t+1," / ",l),r.a.createElement(o.a,{onClick:()=>h(1),text:">"}),r.a.createElement(o.a,{onClick:()=>h(1e99),text:">>"}))}},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(102),s=a(2);function l(e){const t=i.b[e.ip];let a=0;for(const e of t.scripts)a+=e.code.length;for(const e of t.textFiles)a+=e.text.length;if(0===a)return r.a.createElement(r.a.Fragment,null);const n=[];for(const e of t.scripts)n.push({name:e.filename,size:e.code.length});for(const e of t.textFiles)n.push({name:e.fn,size:e.text.length});return n.sort((e,t)=>t.size-e.size),r.a.createElement(o.a,{headerContent:r.a.createElement(r.a.Fragment,null,t.hostname," (",s.a.formatBigNumber(a),"b)"),panelContent:r.a.createElement("ul",null,n.map(e=>r.a.createElement("li",{key:e.name},e.name,": ",s.a.formatBigNumber(e.size),"b")))})}function c(){const e=[];for(const t of Object.keys(i.b))e.push(t);return r.a.createElement(r.a.Fragment,null,r.a.createElement("p",null,"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are."),e.map(e=>r.a.createElement(l,{key:e,ip:e})))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a(58)},function(e,t,a){"use strict";var n=a(1),r=a(159);setInterval((function(){"5.5e+1"!==55..toExponential()&&n.a.giveExploit(r.a.PrototypeTampering)}),9e5)},function(e,t,a){"use strict";var n=a(1),r=a(159);!function(){function e(e){if(!(e.target&&e.target instanceof Element))return;"none"===window.getComputedStyle(e.target).display&&e.isTrusted&&n.a.giveExploit(r.a.Unclickable)}document.addEventListener("DOMContentLoaded",(function t(){const a=document.getElementById("unclickable");null!=a?(a.addEventListener("click",e),document.removeEventListener("DOMContentLoaded",t)):console.error("Could not find the unclickable elem for the related exploit.")}))}()}]);
//# sourceMappingURL=engine.bundle.js.map