From 4460bf16135d111fcf6a4575663af22e7fd7d001 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 12 Dec 2021 14:02:45 -0500 Subject: [PATCH] fix shortcuts --- main.bundle.js | 2 +- main.bundle.js.map | 2 +- src/Sidebar/ui/SidebarRoot.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/main.bundle.js b/main.bundle.js index 7f078ffc7..ce46e18e5 100644 --- a/main.bundle.js +++ b/main.bundle.js @@ -16,5 +16,5 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=n.a(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var a,i=0;a=e.body[i];i++)t.node.body.push(a);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var a=t.node,n=a.type;if("Program"===n&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[n](e,t,a)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!a.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,a=this.createNativeFunction((function(e){throw EvalError("Can't happen")}),!1);a.eval=!0,this.setProperty(e,"eval",a),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var n=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 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= 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>>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;t0;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>=":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>":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;uu?t.arguments_[u]:void 0;this.setProperty(c,m,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;un.a.ServerMaxGrowthRate&&(s=n.a.ServerMaxGrowthRate);const l=o*(e.serverGrowth/100)*r.a.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*a.hacking_grow_mult*c)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n),i=a(118),o=a(41),s=a(1),l=a(10);const c=new i.a;function u(){const[e,t]=Object(n.useState)(null);return Object(n.useEffect)(()=>c.subscribe(e=>{t(e)}),[]),r.a.createElement(r.a.Fragment,null,null!=e&&r.a.createElement(o.a,{open:!0,onClose:function(){null!==e&&(e.resolve(!1),t(null))}},r.a.createElement(s.a,null,e.txt),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!0),t(null))}},"Yes"),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!1),t(null))}},"No")))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(20),r=a(6),i=a(24);function o(e,t){const a=e.augmentations.map(e=>e.name),o=[];function s(e){return e.name!==r.a.NeuroFluxGovernor&&(!a.includes(e.name)&&(!o.includes(e)&&!e.isSpecial))}if(t.inGang()){const e=t.getGangFaction();for(const t in n.a){const a=n.a[t];s(a)&&(e.playerReputation>a.baseRepRequirement&&o.push(a))}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.a[e];if(null!=t)for(const e of t.augmentations){const a=n.a[e];s(a)&&(t.playerReputation>a.baseRepRequirement&&o.push(a))}}return o}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=new(a(118).a)},,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(6),o=a(302),s=a(97),l=a(32),c=a(1),u=a(73),m=a(189),h=a(70),p=a.n(h),d=a(134),f=a.n(d);function g(e){const[t,a]=Object(n.useState)(!1);let h=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(h+=" - Level "+e.level),"string"==typeof e.aug.info?r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(p.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,{dangerouslySetInnerHTML:{__html:e.aug.info}}),e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,e.aug.stats))))):r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(p.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,null,e.aug.info,e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats)))))}},,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i}));var n=a(0);const r=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},n.createElement("g",null,n.createElement("path",{d:"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"}),n.createElement("path",{d:"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"}))),i=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},n.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),n.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),n.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),n.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(57),o=a(29),s=a(1),l=a(26),c=a(32),u=a(94),m=a(528),h=a.n(m),p=a(529),d=a.n(p);function f({action:e,isActive:t,bladeburner:a,rerender:n}){const m=o.b.Player(),p=e.level1;return r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{display:"flex"},r.a.createElement(l.a,{title:r.a.createElement(s.a,null,e.getSuccessesNeededForNextLevel(i.a.ContractSuccessesPerLevel)," successes needed for next level")},r.a.createElement(s.a,null,"Level: ",e.level," / ",e.maxLevel))),r.a.createElement(l.a,{title:t?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!p,onClick:function(){p&&(++e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(h.a,null)))),r.a.createElement(l.a,{title:t?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!f,onClick:function(){f&&(--e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(d.a,null)))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1),o=a(26),s=a(32),l=a(147);function c(e){return r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(o.a,{title:r.a.createElement(i.a,null,"Automatically increase operation level when possible")},r.a.createElement(i.a,null," Autolevel:")),r.a.createElement(l.a,{checked:e.action.autoLevel,onChange:function(t){e.action.autoLevel=t.target.checked,e.rerender()}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(886),o=a(22),s=a(10);function l(e){const[t,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{disabled:0===e.bladeburner.teamSize,onClick:()=>a(!0)},"Set Team Size (Curr Size: ",Object(o.c)(e.action.teamCount,0),")"),r.a.createElement(i.a,{open:t,onClose:()=>a(!1),action:e.action,bladeburner:e.bladeburner}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){const[e,t]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)}),r.a.createElement(r.a.Fragment,null,e?"|":"")}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(964),r=a(20),i=a(279),o=a(6),s=a(31);function l(e,t){const a=e.getCost();if(!t.canAfford(a))return!1;t.loseMoney(a,"other"),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=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{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(e=>i(e,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(e=>i(e,n,r))},500)},20);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(23),o=a(1038),s=a(8),l=a(13),c=a(29),u=a(16),m=a(396),h=a(15),p=a(1),d=a(32),f=a(10);function g(e,t,a){const n=s.a.TravelCost;e.canAfford(n)&&(e.loseMoney(n,"other"),e.travel(a),Object(h.a)(r.a.createElement(r.a.Fragment,null,"You are now in ",a,"!")),t.toCity())}function y(e){const t=c.b.Player(),a=c.b.Router(),h=Object(n.useState)(!1)[1],[y,b]=Object(n.useState)(!1),[E,k]=Object(n.useState)(i.a.Sector12);function v(){h(e=>!e)}function _(e){const n=s.a.TravelCost;t.canAfford(n)&&(l.a.SuppressTravelConfirmation?g(t,a,e):(b(!0),k(e)))}return Object(n.useEffect)(()=>{const e=setInterval(v,1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h4"},"Travel Agency"),r.a.createElement(d.a,{mx:2},r.a.createElement(p.a,null,"From here, you can travel to any other city! A ticket costs"," ",r.a.createElement(u.a,{money:s.a.TravelCost,player:e.p}),"."),l.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(i.a).filter(t=>t!=e.p.city).map(e=>{if(void 0===Object.entries(i.a).find(t=>t[1]===e))throw new Error(`could not find key for city '${e}'`);return r.a.createElement(r.a.Fragment,{key:e},r.a.createElement(f.a,{onClick:()=>_(e),sx:{m:2}},r.a.createElement(p.a,null,"Travel to ",e)),r.a.createElement("br",null))})):r.a.createElement(m.a,{currentCity:e.p.city,onTravel:e=>_(e)})),r.a.createElement(o.a,{city:E,travel:()=>g(t,a,E),open:y,onClose:()=>b(!1)}))}},function(e,t,a){"use strict";a.d(t,"b",(function(){return N})),a.d(t,"a",(function(){return B}));var n=a(0),r=a.n(n),i=a(1047),o=a(1061),s=a(112),l=a(15),c=a(91),u=a(284),m=a(241),h=a(441),p=a(270),d=a(4),f=a(454),g=a(446),y=a(13),b=a(40),E=a(362),k=a(182),v=a(1062),_=a(10),w=a(1),S=a(127),C=a(32),x=a(82),O=a(94),M=a(520),T=a.n(M),R=a(1063);let A=!1,P=[];function N(){const e=Object(g.a)({});P=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","alterReality"];P=P.filter(e=>!t.includes(e)).sort()}let I="",F="",D="",j=null;function B(e){const t=Object(n.useRef)(null),[a,g]=Object(n.useState)(e.filename?e.filename:I),[M,N]=Object(n.useState)(e.filename?e.code:F),[B,G]=Object(n.useState)([]);D=e.filename?e.hostname:D,""===D&&(D=e.player.getCurrentServer().hostname);const[L,W]=Object(n.useState)("RAM: ???"),[H,U]=Object(n.useState)(!1),[q,K]=Object(n.useState)(!1),[z,$]=Object(n.useState)({theme:y.a.MonacoTheme,insertSpaces:y.a.MonacoInsertSpaces,fontSize:y.a.MonacoFontSize}),Y=Object(n.useMemo)(()=>Object(E.debounce)(e=>{W(e),U(!1)},300),[]);function V(){if(null!==t.current){const e=t.current.getPosition();null!==e&&f.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(j=null,b.a.isRunning&&b.a.currStep===b.f.TerminalTypeScript){if("n00dles.script"!==a)return void Object(l.a)("Leave the script name as 'n00dles.script'!");if(-1==M.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(l.a)("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");let n=!1;for(let e=0;e0)){switch(n){case p.a.ImportError:Y("RAM: Import Error");break;case p.a.URLImportError:Y("RAM: HTTP Import Error");break;case p.a.SyntaxError:default:Y("RAM: Syntax Error")}return new Promise(()=>{})}Y("RAM: "+d.a.formatRAM(n))}Object(n.useEffect)(()=>{void 0!==e.filename&&(I=e.filename,F=e.code,j=null)},[]),Object(n.useEffect)(()=>{J(M)},[]),Object(n.useEffect)(()=>{function e(e){y.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),V())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)});const X=11e3/-window.innerHeight+100;return r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(x.a,{placeholder:"filename",type:"text",tabIndex:1,value:a,onChange:function(e){I=e.target.value,g(e.target.value)},InputProps:{startAdornment:r.a.createElement(w.a,null,D,":~/")}}),r.a.createElement(O.a,{onClick:()=>K(!0)},r.a.createElement(r.a.Fragment,null,r.a.createElement(T.a,null),"options"))),r.a.createElement(i.a,{beforeMount:function(e){if(A)return;A=!0,e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of P)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),async function(){const t=await e.languages.getLanguages().find(e=>"javascript"===e.id).loader();t.language.tokenizer.root.unshift(["ns",{token:"ns"}]);for(const e of P)t.language.tokenizer.root.unshift([e,{token:"netscriptfunction"}]);["let","const","var","function"].forEach(e=>t.language.tokenizer.root.unshift([e,{token:"otherkeywords"}])),["true","false","null","undefined"].forEach(e=>t.language.tokenizer.root.unshift([e,{token:"otherkeyvars"}])),t.language.tokenizer.root.unshift(["this",{token:"this"}])}();const t=(R.a+"").replace(/export /g,"");e.languages.typescript.javascriptDefaults.addExtraLib(t,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(t,"netscript.d.ts"),Object(v.a)(e)},onMount:function(e){if(t.current=e,null===t.current)return;const n=f.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==j&&t.current.setPosition({lineNumber:j.lineNumber,column:j.column+1}),t.current.focus()},loading:r.a.createElement(w.a,null,"Loading script editor!"),height:X+"%",defaultLanguage:"javascript",defaultValue:M,onChange:function(e){if(void 0!==e){F=e,N(e),J(e);try{null!==t.current&&(j=t.current.getPosition(),function(e){if(null===t.current)return;if(!a.endsWith(".ns")&&!a.endsWith(".js"))return;const n=Object(h.b)(e);if(-1!==n){const e=t.current.deltaDecorations(B,[{range:{startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:10},options:{isWholeLine:!0,glyphMarginClassName:"myGlyphMarginClass",glyphMarginHoverMessage:{value:"Possible infinite loop, await something."}}}]);G(e)}else{const e=t.current.deltaDecorations(B,[]);G(e)}}(e))}catch(e){}}},theme:z.theme,options:{...z,glyphMargin:!0}}),r.a.createElement(C.a,{display:"flex",flexDirection:"row",sx:{m:1},alignItems:"center"},r.a.createElement(_.a,{onClick:function(){null!==t.current&&t.current.getAction("editor.action.formatDocument").run()}},"Beautify"),r.a.createElement(w.a,{color:H?"secondary":"primary",sx:{mx:1}},L),r.a.createElement(_.a,{onClick:V},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement(w.a,{sx:{mx:1}}," ","Documentation:"," ",r.a.createElement(S.a,{target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Basic")," ","|",r.a.createElement(S.a,{target:"_blank",href:"https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md"},"Full"))),r.a.createElement(o.a,{open:q,onClose:()=>K(!1),options:{theme:y.a.MonacoTheme,insertSpaces:y.a.MonacoInsertSpaces,fontSize:y.a.MonacoFontSize},save:e=>{$(e),y.a.MonacoTheme=e.theme,y.a.MonacoInsertSpaces=e.insertSpaces,y.a.MonacoFontSize=e.fontSize}}))}},,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return compile})),__webpack_require__.d(__webpack_exports__,"b",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(107),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1069);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function compile(script,scripts){if(!shouldCompile(script,scripts))return;await script.updateRamUsage(scripts);const uurls=_getScriptUrls(script,scripts,[]);script.url&&URL.revokeObjectURL(script.url),script.dependencies.length>0&&script.dependencies.forEach(e=>URL.revokeObjectURL(e.url)),script.url=uurls[uurls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(uurls[uurls.length - 1].url)"))),script.dependencies=uurls}async function executeJSScript(e=[],t){const a=t.getScript();if(null===a)throw new Error("script is null");await compile(a,e),t.ramUsage=a.ramUsage;const n=await a.module,r=t.env.vars;if(!n.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(t,a.filename+" cannot be run because it does not have a main function.");return n.main(r)}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 i}));var n=a(547),r=a(402);function i(e){return function(t){t=Object(n.a)(t);const a={};for(const e of t){let t=String;"number"==typeof e[1]?t=Number:"boolean"==typeof e[1]?t=Boolean:Array.isArray(e[1])&&(t=[String]);const n=e[0].length>1?2:1;a["-".repeat(n)+e[0]]=t}const i=r(a,{argv:e});for(const e of t)i.hasOwnProperty("--"+e[0])&&i.hasOwnProperty("-"+e[0])||(i[e[0]]=e[1]);for(const e of Object.keys(i)){if(!e.startsWith("-"))continue;const t=i[e];delete i[e];const a=2===e.length?1:2;i[e.slice(a)]=t}return i}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));const n=new(a(509).a)("",()=>{});function r(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=n.getProperty(e,"length");for(let i=0;i{m(e,0)},disabled:0===s},"rtl"===t.direction?n.createElement(d.a,null):n.createElement(l.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s-1)},disabled:0===s},"rtl"===t.direction?n.createElement(h.a,null):n.createElement(u.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s+1)},disabled:s>=Math.ceil(a/c)-1},"rtl"===t.direction?n.createElement(u.a,null):n.createElement(h.a,null)),n.createElement(o.a,{onClick:e=>{m(e,Math.max(0,Math.ceil(a/c)-1))},disabled:s>=Math.ceil(a/c)-1},"rtl"===t.direction?n.createElement(l.a,null):n.createElement(d.a,null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(126),i=a(49);function o(){return(o=Object.assign||function(e){for(var t=1;tn.createElement(i.a,o({},e,{classes:{root:s().root,...e.classes}}));function c(e){return n.createElement(l,{style:{backgroundColor:e.color},onMouseEnter:e.onMouseEnter,onClick:e.onClick})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(27);function r(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=Object(n.d)(e.server);if(null==t)return 0;for(let a=0;a0||r.a[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof n.a}function s(){this.bladeburner=new n.a(this)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(393),r=a(21);class i extends n.a{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.Contract=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper
skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return s}));var n=a(365),r=a(74);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.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(288),r=a(4);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class o{constructor(e={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[e.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+e.text);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t${this.text}
${r.a.format(this.cost,"0,0")} Scientific Research`+a.desc+"",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let a=0;a0){const t=e[Math.floor(Math.random()*e.length)];Object(f.c)(t)}L.Counters.checkFactionInvitations=100}if(L.Counters.passiveFactionGrowth<=0){const e=Math.floor(5-L.Counters.passiveFactionGrowth);Object(f.e)(e),L.Counters.passiveFactionGrowth=5}if(L.Counters.messages<=0&&(Object(v.b)(),r.a[o.a.TheRedPill].owned?L.Counters.messages=4500:L.Counters.messages=150),w.a.corporation instanceof m.a&&w.a.corporation.process(w.a),L.Counters.mechanicProcess<=0){if(w.a.bladeburner instanceof l.a)try{w.a.bladeburner.process(g.b,w.a)}catch(e){Object(D.a)("Exception caught in Bladeburner.process(): "+e)}L.Counters.mechanicProcess=5}L.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(c.b)(),L.Counters.contractGeneration=3e3)},load:function(e){if(Object(j.a)(),Object(S.b)(e)){O.b.emit(),Object(s.b)(w.a),Object(M.b)(w.a),Object(i.c)(),w.a.reapplyAllSourceFiles(),w.a.hasWseAccount&&Object(T.h)(),L._lastUpdate=(new Date).getTime();const e=w.a.lastUpdate,t=L._lastUpdate-e,a=Math.floor(t/h.a._idleSpeed);let r=0;const o=w.a.moneySourceA.hacking/w.a.playtimeSinceLastAug*t*.75;if(w.a.gainMoney(o,"hacking"),Object(_.b)(),w.a.isWorking)w.a.focus=!0,w.a.workType==h.a.WorkTypeFaction?w.a.workForFaction(a):w.a.workType==h.a.WorkTypeCreateProgram?w.a.createProgramWork(a):w.a.workType==h.a.WorkTypeStudyClass?w.a.takeClass(a):w.a.workType==h.a.WorkTypeCrime?w.a.commitCrime(a):w.a.workType==h.a.WorkTypeCompanyPartTime?w.a.workPartTime(a):w.a.work(a);else for(let e=0;eF.a.emit(G.a.createElement(G.a.Fragment,null,"Offline for ",k,". While you were offline, your scripts generated"," ",G.a.createElement(P.a,{money:o}),", your Hacknet Nodes generated ",u," and you gained"," ",G.a.createElement(I.a,{reputation:r})," reputation divided amongst your factions.")),250)}else Object(s.b)(w.a),L.start(),w.a.init(),Object(C.f)(w.a.getHomeComputer()),Object(u.b)(),Object(p.c)(),Object(i.c)(),Object(v.c)(),Object(M.b)(w.a),Object(k.e)();Object(y.b)()},start:function(){const e=(new Date).getTime();let t=e-L._lastUpdate;const a=t%h.a._idleSpeed;t=Math.floor(t/h.a._idleSpeed),t>0&&(L._lastUpdate=e-a,w.a.lastUpdate=e-a,L.updateGame(t)),window.requestAnimationFrame(L.start)}}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1354),o=a(1),s=a(46),l=a(32),c=a(126),u=a(154),m=a(93),h=a(310),p=a(2),d=a(581),f=a(108),g=a(8),y=a(456);const b=Object(c.a)(e=>Object(u.a)({root:{backgroundColor:e.colors.backgroundprimary}}));function E(){const e=b(),[t,a]=Object(n.useState)(!1),[c,u]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{const e=setTimeout(()=>{c||a(!0)},2e3);return()=>clearTimeout(e)}),Object(n.useEffect)(()=>{!async function(){await Object(h.b)().then(e=>{try{d.a.load(e)}catch(e){throw Object(y.a)(),u(!0),e}u(!0)}).catch(e=>{console.error(e),d.a.load(""),u(!0)})}()},[]),r.a.createElement(l.a,{className:e.root},c?r.a.createElement(f.a,{terminal:m.a,engine:d.a,player:p.a}):r.a.createElement(s.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(s.a,{item:!0},r.a.createElement(i.a,{size:150,color:"primary"})),r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,{variant:"h3"},"Loading Bitburner v",g.a.VersionString)),t&&r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,null,"If the game fails to load, consider ",r.a.createElement("a",{href:"?noScripts"},"killing all scripts")))))}},,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";function n(e){function t(e,t,a){return e*t+a}const a=t(e-1,Math.log(51)-Math.log(50),Math.log(51)),n=t(500,Math.exp(a),-25e3);return Math.round(1e4*n)/1e4}function r(e){const t=Math.log((e+25e3)/25500)/Math.log(1.02)+1;return Math.round(1e4*t)/1e4}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}))},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 o}));var n=a(100),r=a(68),i=a(21);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 f}));var n=a(624),r=a(69),i=a(24),o=a(790),s=a(514),l=a(21),c=a(8),u=a(791),m=a(5),h=a(2),p=a(6);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}class f{constructor(){d(this,"storedCycles",0),d(this,"fragments",[])}baseSize(){return u.a.BaseSize+m.a.StaneksGiftExtraSize+h.a.sourceFileLvl(13)}width(){return Math.floor(this.baseSize()/2+1)}height(){return Math.floor(this.baseSize()/2+.6)}charge(e,t,a){t.avgCharge=(t.numCharge*t.avgCharge+a)/(t.numCharge+1),t.numCharge++;const n=i.a["Church of the Machine God"];n.playerReputation+=e.faction_rep_mult*(Math.pow(a,.95)*(n.favor+100))/1e3}inBonus(){return this.storedCycles*c.a._idleSpeed/1e3>1}process(e,t=1){e.hasAugmentation(p.a.StaneksGift1)&&(this.storedCycles+=t,this.storedCycles-=10,this.storedCycles=Math.max(0,this.storedCycles),this.updateMults(e),s.a.emit())}effect(e){let t=e.neighboors().map(e=>this.fragmentAt(e[0],e[1])).filter(e=>!!e);t=t.filter(e=>e.fragment().type===r.b.Booster);let a=1;t=t.filter((e,t,a)=>a.indexOf(e)===t);for(const e of t)a*=e.fragment().power;return Object(o.a)(e.avgCharge,e.numCharge,e.fragment().power,a)}canPlace(e,t,a,r){if(e<0||t<0)return!1;if(e+r.width(a)>this.width())return!1;if(t+r.height(a)>this.height())return!1;if(this.count(r)>=r.limit)return!1;const i=new n.a({x:e,y:t,rotation:a,fragment:r});for(const e of this.fragments)if(e.collide(i))return!1;return!0}place(e,t,a,r){return!!this.canPlace(e,t,a,r)&&(this.fragments.push(new n.a({x:e,y:t,rotation:a,fragment:r})),!0)}findFragment(e,t){return this.fragments.find(a=>a.x===e&&a.y===t)}fragmentAt(e,t){for(const a of this.fragments)if(a.fullAt(e,t))return a}count(e){let t=0;for(const a of this.fragments)a.fragment().id===e.id&&t++;return t}delete(e,t){for(let a=0;a{e.avgCharge=0,e.numCharge=0})}updateMults(e){e.reapplyAllAugmentations(!0),e.reapplyAllSourceFiles();for(const t of this.fragments){const a=t.fragment(),n=this.effect(t);switch(a.type){case r.b.HackingChance:e.hacking_chance_mult*=n;break;case r.b.HackingSpeed:e.hacking_speed_mult*=n;break;case r.b.HackingMoney:e.hacking_money_mult*=n;break;case r.b.HackingGrow:e.hacking_grow_mult*=n;break;case r.b.Hacking:e.hacking_mult*=n,e.hacking_exp_mult*=n;break;case r.b.Strength:e.strength_mult*=n,e.strength_exp_mult*=n;break;case r.b.Defense:e.defense_mult*=n,e.defense_exp_mult*=n;break;case r.b.Dexterity:e.dexterity_mult*=n,e.dexterity_exp_mult*=n;break;case r.b.Agility:e.agility_mult*=n,e.agility_exp_mult*=n;break;case r.b.Charisma:e.charisma_mult*=n,e.charisma_exp_mult*=n;break;case r.b.HacknetMoney:e.hacknet_node_money_mult*=n;break;case r.b.HacknetCost:e.hacknet_node_purchase_cost_mult*=n,e.hacknet_node_ram_cost_mult*=n,e.hacknet_node_core_cost_mult*=n,e.hacknet_node_level_cost_mult*=n;break;case r.b.Rep:e.company_rep_mult*=n,e.faction_rep_mult*=n;break;case r.b.WorkMoney:e.work_money_mult*=n;break;case r.b.Crime:e.crime_success_mult*=n,e.crime_money_mult*=n;break;case r.b.Bladeburner:e.bladeburner_max_stamina_mult*=n,e.bladeburner_stamina_gain_mult*=n,e.bladeburner_analysis_mult*=n,e.bladeburner_success_chance_mult*=n}}e.updateSkillLevels()}prestigeAugmentation(){this.clearCharge()}prestigeSourceFile(){this.clear(),this.storedCycles=0}toJSON(){return Object(l.b)("StaneksGift",this)}static fromJSON(e){return Object(l.a)(f,e.data)}}l.c.constructors.StaneksGift=f},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(221),r=a(21);class i{constructor(e){e?(this.id=e.fragment.id,this.x=e.x,this.y=e.y,this.avgCharge=0,this.numCharge=0,this.rotation=e.rotation):(this.id=-1,this.x=-1,this.y=-1,this.avgCharge=-1,this.numCharge=-1,this.rotation=-1)}collide(e){const t=this.fragment(),a=e.fragment(),n=e.x-this.x,r=e.y-this.y;for(let i=0;i[this.x+e[0],this.y+e[1]])}copy(){const e=Object(n.b)(this.id);if(null===e)throw new Error("ActiveFragment id refers to unknown Fragment.");const t=new i({x:this.x,y:this.y,rotation:this.rotation,fragment:e});return t.avgCharge=this.avgCharge,t.numCharge=this.numCharge,t}toJSON(){return Object(r.b)("ActiveFragment",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.ActiveFragment=i},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(9);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,"b",(function(){return m})),a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(27),o=a(45),s=a(85),l=a(116),c=a(75),u=a(10);const m={All:0,Foreign:1,Owned:2,Purchased:3};function h(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case m.All:return!0;case m.Foreign:return"home"!==t.hostname&&!a;case m.Owned:return a||t instanceof s.a||"home"===t.hostname;case m.Purchased:return a||t instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+n),!1}}const a=[];for(const e of Object(i.c)())t(e)&&a.push(r.a.createElement(c.a,{key:e.hostname,value:e.hostname},e.hostname));return r.a.createElement(l.a,{startAdornment:r.a.createElement(u.a,{onClick:e.purchase,disabled:!e.canPurchase},"Buy"),sx:{mx:1},value:e.value,onChange:e.onChange},a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a(1),i=a(10),o=a(1024),s=a(1026),l=a(1027),c=a(1028),u=a(1029),m=a(1032),h=a(542),p=a(1039),d=a(1040),f=a(48),g=a(13),y=a(119),b=a(27),E=a(541),k=a(29);function v({loc:e}){const t=k.b.Router(),a=k.b.Player();const v=function(){const r=[];return e.types.includes(f.a.Company)&&r.push(n.createElement(o.a,{key:"companylocation",locName:e.name})),e.types.includes(f.a.Gym)&&r.push(n.createElement(s.a,{key:"gymlocation",router:t,loc:e,p:a})),e.types.includes(f.a.Hospital)&&r.push(n.createElement(l.a,{key:"hospitallocation",p:a})),e.types.includes(f.a.Slums)&&r.push(n.createElement(c.a,{key:"slumslocation"})),e.types.includes(f.a.Special)&&r.push(n.createElement(u.a,{key:"speciallocation",loc:e})),e.types.includes(f.a.TechVendor)&&r.push(n.createElement(m.a,{key:"techvendorlocation",loc:e})),e.types.includes(f.a.TravelAgency)&&r.push(n.createElement(h.a,{key:"travelagencylocation",p:a,router:t})),e.types.includes(f.a.University)&&r.push(n.createElement(p.a,{key:"universitylocation",loc:e})),e.types.includes(f.a.Casino)&&r.push(n.createElement(d.a,{key:"casinoLocation",p:a})),r}(),_=Object(b.d)(e.name),w=null!==_&&Object(y.b)(_);return n.createElement(n.Fragment,null,n.createElement(i.a,{onClick:()=>t.toCity()},"Return to World"),n.createElement(r.a,{variant:"h4"},w&&!g.a.DisableTextEffects?n.createElement(E.a,{content:e.name}):e.name),v)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(232),o=a(126),s=a(154),l=a(73);const c=Object(o.a)(()=>Object(s.a)({card:{padding:"10px",border:"solid 1px #808080",backgroundColor:"white",display:"inline-block",borderRadius:"10px",fontSize:"18.5px",textAlign:"center",margin:"3px",fontWeight:"bold"},red:{color:"red"},black:{color:"black"},value:{fontSize:"20px",fontFamily:"sans-serif"}})),u=({card:e,hidden:t})=>{const a=c();let n;switch(e.suit){case i.b.Clubs:n=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:n=r.a.createElement("span",null,"♦");break;case i.b.Hearts:n=r.a.createElement("span",null,"♥");break;case i.b.Spades:n=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+e.suit)}return r.a.createElement(l.a,{className:`${a.card} ${e.isRedSuit()?a.red:a.black}`},r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:a.value},t?" - ":e.formatValue()),r.a.createElement("span",null,t?" - ":n)))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(24),r=a(27);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.d)("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=Object(r.d)("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 r}));var n=a(8);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(88);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(8),r=a(5);function i(e){const t=1e3/n.a._idleSpeed;let a=0,i=0,o=0,s=0,l=0,c=0,u=0;const m=e.hashManager;switch(e.className){case n.a.ClassStudyComputerScience:i=n.a.ClassStudyComputerScienceBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassDataStructures:a=n.a.ClassDataStructuresBaseCost*e.workCostMult/t,i=n.a.ClassDataStructuresBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassNetworks:a=n.a.ClassNetworksBaseCost*e.workCostMult/t,i=n.a.ClassNetworksBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassAlgorithms:a=n.a.ClassAlgorithmsBaseCost*e.workCostMult/t,i=n.a.ClassAlgorithmsBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassManagement:a=n.a.ClassManagementBaseCost*e.workCostMult/t,u=n.a.ClassManagementBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassLeadership:a=n.a.ClassLeadershipBaseCost*e.workCostMult/t,u=n.a.ClassLeadershipBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassGymStrength:a=n.a.ClassGymBaseCost*e.workCostMult/t,o=e.workExpMult/t*m.getTrainingMult();break;case n.a.ClassGymDefense:a=n.a.ClassGymBaseCost*e.workCostMult/t,s=e.workExpMult/t*m.getTrainingMult();break;case n.a.ClassGymDexterity:a=n.a.ClassGymBaseCost*e.workCostMult/t,l=e.workExpMult/t*m.getTrainingMult();break;case n.a.ClassGymAgility:a=n.a.ClassGymBaseCost*e.workCostMult/t,c=e.workExpMult/t*m.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}return{workMoneyLossRate:a,workHackExpGainRate:i*e.hacking_exp_mult*r.a.ClassGymExpGain,workStrExpGainRate:o*e.strength_exp_mult*r.a.ClassGymExpGain,workDefExpGainRate:s*e.defense_exp_mult*r.a.ClassGymExpGain,workDexExpGainRate:l*e.dexterity_exp_mult*r.a.ClassGymExpGain,workAgiExpGainRate:c*e.agility_exp_mult*r.a.ClassGymExpGain,workChaExpGainRate:u*e.charisma_exp_mult*r.a.ClassGymExpGain}}},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 ","",'alias [-g] [name="value"] Create or display Terminal aliases',"analyze Get information about the current machine ","backdoor Install a backdoor on the current machine ","buy [-l/program] Purchase a program through the Dark Web","cat [file] Display a .msg, .lit, or .txt file","cd [dir] Change to a new directory","check [script] [args...] Print a script's logs to Terminal","clear Clear all text on the terminal ","cls See 'clear' command ","connect [hostname] Connects to a remote server","cp [src] [dst]: Copy a file","download [script/text file] Downloads scripts or text files to your computer","expr [math expression] Evaluate a mathematical expression","free Check the machine's memory (RAM) usage","grow Spoof money in a servers bank account, increasing the amount available.","hack Hack the current machine","help [command] Display this help text, or the help text for a command","home Connect to home computer","hostname Displays the hostname of the machine","kill [script/pid] [args...] Stops the specified script on the current server ","killall Stops all running scripts on the current machine","ls [dir] [| grep pattern] Displays all files on the machine","lscpu Displays the number of CPU cores on the machine","mem [script] [-t] [n] Displays the amount of RAM required to run the script","mv [src] [dest] Move/rename a text or script file","nano [file] Text editor - Open up and edit a script or text file","ps Display all scripts that are currently running","rm [file] Delete a file from the server","run [name] [-t n] [--tail] [args...] Execute a program or script","scan Prints all immediately-available network connections","scan-analyze [d] [-a] Prints info for all servers up to d nodes away","scp [file] [server] Copies a file to a destination server","sudov Shows whether you have root access on this computer","tail [script] [args...] Displays dynamic logs for the specified script","top Displays all running scripts and their RAM usage","unalias [alias name] Deletes the specified alias","weaken [server] Reduce the security of a server","wget [url] [target file] Retrieves code/text from a web server"],r={alias:['alias [-g] [name="value"] '," ","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: "," ",'alias nuke="run NUKE.exe"'," ","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: "," ",'alias worm="HTTPWorm.exe"'," ","and then you tried to run the following terminal command: "," ","run worm"," ","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: "," ",'alias -g worm="HTTPWorm.exe"'," ","Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. "," ","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. "," ","The 'unalias' command can be used to remove aliases."," "],analyze:["analze"," ","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"," ","Install a backdoor on the current machine, grants a secret bonus depending on the machine."," ","Requires root access to run."," "],buy:["buy [-l / program]"," ","Purchase a program through the Dark Web. Requires a TOR router to use."," ","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."," ","Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive."],cat:["cat [file]"," ","Display message (.msg), literature (.lit), or text (.txt) files. Examples:"," ","cat j1.msg"," ","cat foo.lit"," ","cat servers.txt"],cd:["cd [dir]"," ","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:"," ","cd scripts/hacking"," ","cd /logs"," ","cd ../"],check:["check [script name] [args...]"," ","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: "," ","run foo.script 1 2 foodnstuff"," ","Then to run the 'check' command on this script you would have to pass the same arguments in: "," ","check foo.script 1 2 foodnstuff"],clear:["clear"," ","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"," ","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]"," ","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."],cp:["cp [src] [dst]"," ","Copy a file on this server. To copy a file to another server use scp."],download:["download [script/text file]"," ","Downloads a script or text file to your computer (like your real life computer)."," ","You can also download all of your scripts/text files as a zip file using the following Terminal commands:"," ","Download all scripts and text files: download *"," ","Download all scripts: download *.script"," ","Download all text files: download *.txt"," "],expr:["expr [mathematical expression]"," ","Evaluate a simple mathematical expression. Supports native JavaScript operators:"," ","+, -, /, *, **, %"," ","Example:"," ","expr 25 * 2 ** 10"," ","Note that letters (non-digits) are not allowed and will be removed from the input."],free:["free"," ","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."],grow:["grow","","Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.","See the wiki page for hacking mechanics."],hack:["hack"," ","Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics"," "],help:["help [command]"," ","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: "," ","help alias"," ","help scan-analyze"],home:["homeConnect to your home computer. This will work no matter what server you are currently connected to."],hostname:["hostname"," ","Prints the hostname of the current server"],kill:["kill [script name] [args...]"," ","kill [pid]"," ","Kill the script specified by the script name and arguments OR by its PID."," ","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:"," ","run foo.script 1 sigma-cosmetics"," ","Then to kill this script the same arguments would have to be used:"," ","kill foo.script 1 sigma-cosmetics"," ","If you are killing the script using its PID, then the PID argument must be numeric"],killall:["killall"," ","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]"," ","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. "," ","The 'dir' optional parameter can be used to display files/directories in another directory."," ","The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern."," ","Examples:"," ","List all files with the '.script' extension in the current directory:"," ","ls | grep .script"," ","List all files with the '.js' extension in the root directory:"," ","ls / | grep .js"," ","List all files with the word 'purchase' in the filename, in the 'scripts' directory:"," ","ls scripts | grep purchase"],lscpu:["lscpu"," ","Prints the number of CPU Cores the current server has"],mem:["mem [script name] [-t num_threads]"," ","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:"," ","mem foo.script"," ","mem foo.script -t 50"," ","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]"," ","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"," ","Note that, unlike the Linux 'mv' command, the destination argument must be the ","full filepath. ","Examples: "," ","mv hacking-controller.script scripts/hacking-controller.script"," ","mv myScript.js myOldScript.js"],nano:["nano [file name]"," ","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"," ","Prints all scripts that are running on the current server"],rm:["rm [file]"," ","Removes the specified file from the current server. A file can be a script, a program, or a message file. "," ","WARNING: This is permanent and cannot be undone"],run:["run [file name] [-t] [num threads] [args...]"," ","Execute a program or a script."," ","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. "," ","[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. "," "],scan:["scan"," ","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]"," ","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."," ","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."," ","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."," ","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]"," ","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"," ","Prints whether or not you have root access to the current machine"],tail:["tail [script name] [args...]"," ","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: "," ","run foo.script 10 50000"," ","Then in order to check its logs with 'tail' the same arguments must be used: "," ","tail foo.script 10 50000"],top:["top"," ","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]"," ","Deletes the specified alias. Note that the double quotation marks are required. "," ","As an example, if an alias was declared using:"," ",'alias r="run"'," ","Then it could be removed using:"," ","unalias r"," ","It is not necessary to differentiate between global and non-global aliases when using 'unalias'"],weaken:["weaken","","Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.","Requires root access. See the wiki page for hacking mechanics."],wget:["wget [url] [target file]"," ","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."," ","Note that it will not be possible to download data from many websites because they do not allow ","cross-origin resource sharing (CORS). Example:"," ","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 oe}));var n=a(224),r=a(85),i=a(45),o=a(60),s=a(99),l=a(294),c=a(91),u=a(8),m=a(27),h=a(112),p=a(443),d=a(40),f=a(119),g=a(411),y=a(92),b=a(13),E=a(170),k=a(89),v=a(4),_=a(22),w=a(1124),S=a(1125),C=a(1126),x=a(1127),O=a(1128),M=a(1129),T=a(1130),R=a(1131),A=a(1132),P=a(1133),N=a(1136),I=a(1137),F=a(1138),D=a(1139),j=a(1140),B=a(1141),G=a(1142),L=a(1143),W=a(1144),H=a(1145),U=a(1146),q=a(1147),K=a(1148),z=a(1149),$=a(1150),Y=a(1151),V=a(1152),J=a(1155),X=a(1156),Q=a(1157),Z=a(1158),ee=a(1159),te=a(1160),ae=a(1161),ne=a(1162),re=a(1163);function ie(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class oe{constructor(){ie(this,"action",null),ie(this,"commandHistory",[]),ie(this,"commandHistoryIndex",0),ie(this,"outputHistory",[new n.b("Bitburner v"+u.a.VersionString,"primary")]),ie(this,"contractOpen",!1),ie(this,"currDir","/")}process(e,t,a){null!==this.action&&(this.action.timeLeft-=u.a._idleSpeed*a/1e3,this.action.timeLeft<.01&&this.finishAction(e,t,!1),l.b.emit())}append(e){this.outputHistory.push(e),this.outputHistory.length>b.a.MaxTerminalCapacity&&this.outputHistory.splice(0,this.outputHistory.length-b.a.MaxTerminalCapacity),l.b.emit()}print(e){this.append(new n.b(e,"primary"))}printRaw(e){this.append(new n.c(e))}error(e){this.append(new n.b(e,"error"))}success(e){this.append(new n.b(e,"success"))}info(e){this.append(new n.b(e,"info"))}warn(e){this.append(new n.b(e,"warn"))}startHack(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.d)(t,e)/4,"h")}}startGrow(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.a)(t,e)/16,"g")}}startWeaken(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.f)(t,e)/16,"w")}}startBackdoor(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot backdoor this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.d)(t,e)/4,"b")}}startAnalyze(){this.print("Analyzing system..."),this.startAction(1,"a")}startAction(e,t){this.action=new n.d(e,t)}finishHack(e,t,a=!1){if(a)return;const n=t.getCurrentServer();if(n instanceof r.a)return void this.error("Cannot hack this kind of server");if(!(n instanceof i.a))throw new Error("server should be normal server");const o=Object(k.b)(n,t),s=Math.random(),l=Object(k.c)(n,t),c=l/4;if(s=n.getMaxNumTries()?(this.error("Contract FAILED - Contract is now self-destructing"),a.removeContract(n)):this.error(`Contract FAILED - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case s.b.Cancelled:default:this.print("Contract cancelled")}this.contractOpen=!1}executeScanAnalyzeCommand(e,t=1,a=!1){this.print("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),this.print(" ");const i={};for(const e of Object(m.c)())i[e.hostname]=0;const s=[],l=[0],c=e.getCurrentServer();for(s.push(c);0!=s.length;){const c=s.pop();if(!c)continue;const u=l.pop();if(void 0===u)continue;const m=c instanceof r.a;if(!a&&c.purchasedByPlayer&&"home"!=c.hostname)continue;if(i[c.hostname]||u>t)continue;if(!a&&m)continue;i[c.hostname]=1;for(let e=c.serversOnNetwork.length-1;e>=0;--e){const t=Object(f.a)(c,e);null!==t&&(s.push(t),l.push(u+1))}if(0==u)continue;const h=Array(4*(u-1)+1).join("-");e.hasProgram(o.a.AutoLink.name)?this.append(new n.a(h,c.hostname)):this.print(h+c.hostname);const p=h+"--";let d="NO";c.hasAdminRights&&(d="YES");let g=`${p}Root Access: ${d}${m?"":", Required hacking skill: "+c.requiredHackingSkill}`;c.hasOwnProperty("numOpenPortsRequired")&&(g+="\n"+p+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),g+="\n"+p+"RAM: "+v.a.formatRAM(c.maxRam),g+="\n ",this.print(g)}}connectToServer(e,t){const a=Object(m.d)(t);null!=a?(e.getCurrentServer().isConnectedTo=!1,e.currentServer=a.hostname,e.getCurrentServer().isConnectedTo=!0,this.print("Connected to "+a.hostname),this.setcwd("/"),"darkweb"==e.getCurrentServer().hostname&&Object(p.b)()):this.error("Invalid server. Connection failed.")}executeCommands(e,t,a){a=(a=a.trim()).replace(/\s\s+/g," "),this.commandHistory[this.commandHistory.length-1]!=a&&(this.commandHistory.push(a),this.commandHistory.length>50&&this.commandHistory.splice(0,1)),this.commandHistoryIndex=this.commandHistory.length;const n=Object(g.b)(a);for(let a=0;athis.clear(),cls:()=>this.clear(),connect:R.a,cp:A.a,download:P.a,expr:N.a,free:I.a,grow:F.a,hack:D.a,help:j.a,home:B.a,hostname:G.a,kill:L.a,killall:W.a,ls:H.a,lscpu:U.a,mem:q.a,mv:K.a,nano:z.a,ps:$.a,rm:Y.a,run:V.a,scan:J.a,scp:Q.a,sudov:Z.a,tail:ee.a,top:te.a,unalias:ae.a,weaken:ne.a,wget:re.a}[i.toLowerCase()];o?o(this,e,t,r,n.slice(1)):this.error(`Command ${n[0]} not found`)}getProgressText(){if(null===this.action)throw new Error("trying to get the progress text when there's no action");return Object(E.a)({progress:(this.action.time-this.action.timeLeft)/this.action.time,totalTicks:50})}}},,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(31);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{const a=e.slice();for(let e=1;e["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    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{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+="    [\n",t+=e.map(e=>"        ["+e.map(e=>(""+e).padStart(2," ")).join(",")+"]").join("\n"),t+="\n    ]\n",t+=["\nHere is an example of what spiral order should be:\n\n","    [\n","        [1, 2, 3]\n","        [4, 5, 6]\n","        [7, 8, 9]\n","    ]\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","    [\n","        [1,  2,  3,  4]\n","        [5,  6,  7,  8]\n","        [9, 10, 11, 12]\n","    ]\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{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;t--)a[l]=e[i][t],++l;if(--i=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["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{const a=e.length;let n=0;for(let t=0;n["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{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{let a=0,n=0;for(let t=1;t["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{let a=0;for(let t=1;t["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{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{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;t0;--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=[" ".repeat(n-a+1),"[",e[a].toString(),"]"].join("");return a 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=Object(n.a)(3,12);e.length=t;for(let a=0;a{const a=e.length,n=e[a-1].slice();for(let t=a-2;t>-1;--t)for(let a=0;a{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{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{const a=[];a.length=e.length;for(let t=0;t0?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{let a=0,n=0;const i=[];for(let t=0;t0?--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{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{const a=e[0],n=e[1];const o=r(t).split(",");for(let e=0;e=e}}const h=[{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:m(1),time:n.a.MillisecondsPerFiveMinutes},run:(e,t,a,n)=>{if(n instanceof r.a){if(!n.hasAdminRights)return n.openPortCount>=n.numOpenPortsRequired?(n.hasAdminRights=!0,void t.print("NUKE successful! Gained root access to "+n.hostname)):void t.print("NUKE unsuccessful. Not enough ports have been opened");t.print("You already have root access to this computer. There is no reason to run NUKE.exe")}else t.error("Cannot nuke this kind of server.")}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:m(50),time:2*n.a.MillisecondsPerFiveMinutes},run:(e,t,a,n)=>{n instanceof r.a?n.sshPortOpen?t.print("SSH Port (22) is already open!"):(n.sshPortOpen=!0,t.print("Opened SSH Port(22)!"),n.openPortCount++):t.error("Cannot run BruteSSH.exe on this kind of server.")}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:m(100),time:n.a.MillisecondsPerHalfHour},run:(e,t,a,n)=>{n instanceof r.a?n.ftpPortOpen?t.print("FTP Port (21) is already open!"):(n.ftpPortOpen=!0,t.print("Opened FTP Port (21)!"),n.openPortCount++):t.error("Cannot run FTPCrack.exe on this kind of server.")}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:m(250),time:n.a.MillisecondsPer2Hours},run:(e,t,a,n)=>{n instanceof r.a?n.smtpPortOpen?t.print("SMTP Port (25) is already open!"):(n.smtpPortOpen=!0,t.print("Opened SMTP Port (25)!"),n.openPortCount++):t.error("Cannot run relaySMTP.exe on this kind of server.")}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:m(500),time:n.a.MillisecondsPer4Hours},run:(e,t,a,n)=>{n instanceof r.a?n.httpPortOpen?t.print("HTTP Port (80) is already open!"):(n.httpPortOpen=!0,t.print("Opened HTTP Port (80)!"),n.openPortCount++):t.error("Cannot run HTTPWorm.exe on this kind of server.")}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:m(750),time:n.a.MillisecondsPer8Hours},run:(e,t,a,n)=>{n instanceof r.a?n.sqlPortOpen?t.print("SQL Port (1433) is already open!"):(n.sqlPortOpen=!0,t.print("Opened SQL Port (1433)!"),n.openPortCount++):t.error("Cannot run SQLInject.exe on this kind of server.")}},{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:m(75),time:n.a.MillisecondsPerQuarterHour},run:(e,t)=>{t.print("This executable cannot be run."),t.print("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}},{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:m(400),time:n.a.MillisecondsPer2Hours},run:(e,t)=>{t.print("This executable cannot be run."),t.print("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:m(75),time:n.a.MillisecondsPerHalfHour},run:(e,t,a,n,s)=>{if(1!==s.length)return void t.error("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const l=Object(o.d)(s[0]);null!=l?l instanceof r.a?(t.print(l.hostname+":"),t.print("Server base security level: "+l.baseDifficulty),t.print("Server current security level: "+l.hackDifficulty),t.print("Server growth rate: "+l.serverGrowth),t.print("Netscript hack() execution time: "+Object(i.b)(1e3*Object(u.d)(l,a),!0)),t.print("Netscript grow() execution time: "+Object(i.b)(1e3*Object(u.a)(l,a),!0)),t.print("Netscript weaken() execution time: "+Object(i.b)(1e3*Object(u.f)(l,a),!0))):t.error("ServerProfiler.exe can only be run on normal servers."):t.error("Invalid server IP/hostname")}},{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:m(25),time:n.a.MillisecondsPerQuarterHour},run:(e,t)=>{t.print("This executable cannot be run."),t.print("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),t.print("When using scan-analyze, click on a server's hostname to connect to it.")}},{key:"Formulas",name:"Formulas.exe",create:{level:1e3,tooltip:"This program allows you to use the formulas API",req:m(1e3),time:n.a.MillisecondsPer4Hours},run:(e,t)=>{t.print("This executable cannot be run."),t.print("Formulas.exe lets you use the formulas API.")}},{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>=1},time:n.a.MillisecondsPerFiveMinutes/20},run:()=>{c.a.emit()}},{key:"Flight",name:"fl1ght.exe",create:null,run:(e,t,a)=>{const n=Math.round(30*l.a.DaedalusAugsRequirement);if(!(a.augmentations.length>=n&&a.money>1e11&&a.hacking>=2500))return t.print(`Augmentations: ${a.augmentations.length} / ${n}`),t.print(`Money: ${s.a.formatMoney(a.money)} / $100b`),void t.print(`Hacking skill: ${a.hacking} / 2500`);t.print("We will contact you."),t.print("-- Daedalus --")}}]},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 d}));var n=a(768),r=a(556),i=a(559),o=a(376),s=a(43),l=a(383),c=a(9),u=a(330),m=a(23),h=a(338),p=a(21);class d{constructor(){this.hacking=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=1e3,this.city=m.a.Sector12,this.location=c.a.TravelAgency,this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new u.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.workCostMult=1,this.workExpMult=1,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=null,this.corporation=null,this.bladeburner=null,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.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new h.a,this.moneySourceB=new h.a,this.scriptProdSinceLastAug=0,this.exploits=[],this.init=s.bb,this.prestigeAugmentation=s.eb,this.prestigeSourceFile=s.fb,this.receiveInvite=s.nb,this.calculateSkill=s.o,this.updateSkillLevels=s.Lb,this.resetMultipliers=s.qb,this.hasProgram=s.Z,this.setMoney=s.tb,this.gainMoney=s.J,this.loseMoney=s.db,this.canAfford=s.r,this.recordMoneySource=s.ob,this.gainHackingExp=s.H,this.gainStrengthExp=s.K,this.gainDefenseExp=s.F,this.gainDexterityExp=s.G,this.gainAgilityExp=s.C,this.gainCharismaExp=s.D,this.gainIntelligenceExp=s.I,this.queryStatFromString=s.ib,this.resetWorkStatus=s.rb,this.processWorkEarnings=s.hb,this.startWork=s.Fb,this.cancelationPenalty=s.s,this.work=s.Mb,this.finishWork=s.A,this.startWorkPartTime=s.Gb,this.workPartTime=s.Ob,this.finishWorkPartTime=s.B,this.startFocusing=s.Eb,this.stopFocusing=s.Hb,this.startFactionWork=s.Db,this.startFactionHackWork=s.Bb,this.startFactionFieldWork=s.Ab,this.startFactionSecurityWork=s.Cb,this.workForFaction=s.Nb,this.finishFactionWork=s.z,this.getWorkMoneyGain=s.U,this.getWorkHackExpGain=s.T,this.getWorkStrExpGain=s.W,this.getWorkDefExpGain=s.R,this.getWorkDexExpGain=s.S,this.getWorkAgiExpGain=s.P,this.getWorkChaExpGain=s.Q,this.getWorkRepGain=s.V,this.process=s.gb,this.startCreateProgramWork=s.yb,this.createProgramWork=s.v,this.finishCreateProgramWork=s.x,this.startClass=s.xb,this.takeClass=s.Ib,this.finishClass=s.w,this.startCrime=s.zb,this.commitCrime=s.u,this.finishCrime=s.y,this.singularityStopWork=s.vb,this.takeDamage=s.Jb,this.regenerateHp=s.pb,this.hospitalize=s.ab,this.applyForJob=s.f,this.getNextCompanyPosition=s.O,this.quitJob=s.kb,this.applyForSoftwareJob=s.m,this.applyForSoftwareConsultantJob=s.l,this.applyForItJob=s.e,this.applyForSecurityEngineerJob=s.j,this.applyForNetworkEngineerJob=s.g,this.applyForBusinessJob=s.c,this.applyForBusinessConsultantJob=s.b,this.applyForSecurityJob=s.k,this.applyForAgentJob=s.a,this.applyForEmployeeJob=s.d,this.applyForPartTimeEmployeeJob=s.h,this.applyForWaiterJob=s.n,this.applyForPartTimeWaiterJob=s.i,this.isQualified=s.cb,this.reapplyAllAugmentations=s.lb,this.reapplyAllSourceFiles=s.mb,this.checkForFactionInvitations=s.t,this.setBitNodeNumber=s.sb,this.queueAugmentation=s.jb,this.gainCodingContractReward=s.E,this.travel=s.Kb,this.gotoLocation=s.Y,this.canAccessResleeving=s.q,this.giveExploit=s.X,this.getIntelligenceBonus=s.M,this.getCasinoWinnings=s.L,this.hasAugmentation=n.a,this.canAccessBladeburner=r.a,this.inBladeburner=r.b,this.startBladeburner=r.c,this.canAccessCorporation=i.a,this.hasCorporation=i.b,this.startCorporation=i.c,this.canAccessGang=o.a,this.getGangFaction=o.b,this.getGangName=o.c,this.hasGangWith=o.d,this.inGang=o.e,this.startGang=o.f,this.hasTorRouter=l.f,this.getCurrentServer=l.b,this.getHomeComputer=l.c,this.getUpgradeHomeRamCost=l.e,this.getUpgradeHomeCoresCost=l.d,this.createHacknetServer=l.a,this.factionWorkType="",this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.getMult=s.N,this.setMult=s.ub,this.canAccessCotMG=s.p,this.sourceFileLvl=s.wb}toJSON(){return Object(p.b)("PlayerObject",this)}static fromJSON(e){return Object(p.a)(d,e.data)}}p.c.constructors.PlayerObject=d},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(34);function r(e,t=!1){const a=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===a)return!0;if(!t)for(const e of this.queuedAugmentations)if(e.name===a)return!0;return!1}},function(e,t,a){"use strict";function n(){const e=new Date,t=("0"+e.getHours()).slice(-2),a=("0"+e.getMinutes()).slice(-2),n=("0"+e.getSeconds()).slice(-2);return`${e.getMonth()+1}/${e.getDate()} ${t}:${a}:${n}`}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(21);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(146),r=a(59);const i={};!function(){let e,t,a;e="The Beginner's Guide to Hacking",t=r.a.HackersStartingHandbook,a="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

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.

-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)

-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()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-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

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-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="Getting Started with Corporations
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. 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.

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.

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.

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').

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.

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.

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.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-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.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-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

-Remember, you need to spend money to make money!

-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.

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.

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.

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.

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.

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.

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.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

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.

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.

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.

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.'

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.

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.

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.

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?

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.

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.

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.

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.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
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.

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?

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.

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.

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.

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.

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.

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.

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.

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?

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.

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.

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

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

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.

OPEN YOUR EYES

It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

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.

What's the point of all this? What is my purpose?

Some people dare to think even bigger.

What will the fate of the human race be?

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.

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.

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.

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 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

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:3,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:7.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:18,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks

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

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

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:45,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:360,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism

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

Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:3,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets

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:3.6,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs

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:15,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

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:7.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

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:45,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

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:114,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms

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:174,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

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:72,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations

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:360,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

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

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(506),r=a(220),i=a(203),o=a(21),s=a(176);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 Object(s.a)(e)}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(),a={respect:e.respect,wantedLevel:e.wanted,territory:e.getTerritory()};return Object(s.d)(a,this,t)}calculateWantedLevelGain(e){const t=this.getTask(),a={respect:e.respect,wantedLevel:e.wanted,territory:e.getTerritory()};return Object(s.e)(a,this,t)}calculateMoneyGain(e){const t=this.getTask(),a={respect:e.respect,wantedLevel:e.wanted,territory:e.getTerritory()};return Object(s.c)(a,this,t)}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.calculateAscensionMult(this.hack_asc_points),this.str_exp+=t.strWeight/1500*a*n.str*this.calculateAscensionMult(this.str_asc_points),this.def_exp+=t.defWeight/1500*a*n.def*this.calculateAscensionMult(this.def_asc_points),this.dex_exp+=t.dexWeight/1500*a*n.dex*this.calculateAscensionMult(this.dex_asc_points),this.agi_exp+=t.agiWeight/1500*a*n.agi*this.calculateAscensionMult(this.agi_asc_points),this.cha_exp+=t.chaWeight/1500*a*n.cha*this.calculateAscensionMult(this.cha_asc_points)}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Object(s.b)(this.hack_exp),str:Object(s.b)(this.str_exp),def:Object(s.b)(this.def_exp),dex:Object(s.b)(this.dex_exp),agi:Object(s.b)(this.agi_exp),cha:Object(s.b)(this.cha_exp)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getCurrentAscensionMults(){return{hack:this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points)}}getAscensionMultsAfterAscend(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack),str:this.calculateAscensionMult(this.str_asc_points+e.str),def:this.calculateAscensionMult(this.def_asc_points+e.def),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)}}getAscensionResults(){const e=this.getAscensionMultsAfterAscend(),t=this.getCurrentAscensionMults();return{hack:e.hack/t.hack,str:e.str/t.str,def:e.def/t.def,dex:e.dex/t.dex,agi:e.agi/t.agi,cha:e.cha/t.cha}}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")}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 n}));const n={"Slum Snakes":1,Tetrads:2,"The Syndicate":2,"The Dark Army":2,"Speakers for the Dead":5,NiteSec:2,"The Black Hand":5}},function(e,t,a){"use strict";a.d(t,"a",(function(){return S}));var n=a(28),r=a(9);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},f={},g={},y={},b={},E={},k={},v={},_={},w={};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;enull),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(4),o=a(16);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";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(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(88),r=a(9);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 l}));var n=a(14),r=a(444),i=a(67),o=a(220),s=a(203);function l(e,t,a){const l=function(t){const n=e.gang;if(null===n)throw new Error("Must have joined gang");if(!(n instanceof r.a))throw a.makeRuntimeErrorMsg("gang."+t,"You do not currently have a Gang")},c=function(t,n){const r=e.gang;if(null===r)throw new Error("Must have joined gang");for(const e of r.members)if(e.name===n)return e;throw a.makeRuntimeErrorMsg("gang."+t,`Invalid gang member: '${n}'`)};return{createGang:function(t){a.updateDynamicRam("createGang",Object(n.c)("gang","createGang"));if(!e.canAccessGang()||!["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"].includes(t))return!1;if(e.inGang())return!1;if(!e.factions.includes(t))return!1;const r="NiteSec"===t||"The Black Hand"===t;return e.startGang(t,r),!0},inGang:function(){return a.updateDynamicRam("inGang",Object(n.c)("gang","inGang")),e.inGang()},getMemberNames:function(){a.updateDynamicRam("getMemberNames",Object(n.c)("gang","getMemberNames")),l("getMemberNames");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return t.members.map(e=>e.name)},getGangInformation:function(){a.updateDynamicRam("getGangInformation",Object(n.c)("gang","getGangInformation")),l("getGangInformation");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return{faction:t.facName,isHacking:t.isHackingGang,moneyGainRate:t.moneyGainRate,power:t.getPower(),respect:t.respect,respectGainRate:t.respectGainRate,territory:t.getTerritory(),territoryClashChance:t.territoryClashChance,territoryWarfareEngaged:t.territoryWarfareEngaged,wantedLevel:t.wanted,wantedLevelGainRate:t.wantedGainRate,wantedPenalty:t.getWantedPenalty()}},getOtherGangInformation:function(){a.updateDynamicRam("getOtherGangInformation",Object(n.c)("gang","getOtherGangInformation")),l("getOtherGangInformation");const e={};for(const t in i.a)e[t]=Object.assign({},i.a[t]);return e},getMemberInformation:function(t){a.updateDynamicRam("getMemberInformation",Object(n.c)("gang","getMemberInformation")),l("getMemberInformation");const r=e.gang;if(null===r)throw new Error("Should not be called without Gang");const i=c("getMemberInformation",t);return{name:i.name,task:i.task,earnedRespect:i.earnedRespect,hack:i.hack,str:i.str,def:i.def,dex:i.dex,agi:i.agi,cha:i.cha,hack_exp:i.hack_exp,str_exp:i.str_exp,def_exp:i.def_exp,dex_exp:i.dex_exp,agi_exp:i.agi_exp,cha_exp:i.cha_exp,hack_mult:i.hack_mult,str_mult:i.str_mult,def_mult:i.def_mult,dex_mult:i.dex_mult,agi_mult:i.agi_mult,cha_mult:i.cha_mult,hack_asc_mult:i.calculateAscensionMult(i.hack_asc_points),str_asc_mult:i.calculateAscensionMult(i.str_asc_points),def_asc_mult:i.calculateAscensionMult(i.def_asc_points),dex_asc_mult:i.calculateAscensionMult(i.dex_asc_points),agi_asc_mult:i.calculateAscensionMult(i.agi_asc_points),cha_asc_mult:i.calculateAscensionMult(i.cha_asc_points),hack_asc_points:i.hack_asc_points,str_asc_points:i.str_asc_points,def_asc_points:i.def_asc_points,dex_asc_points:i.dex_asc_points,agi_asc_points:i.agi_asc_points,cha_asc_points:i.cha_asc_points,upgrades:i.upgrades.slice(),augmentations:i.augmentations.slice(),respectGain:i.calculateRespectGain(r),wantedLevelGain:i.calculateWantedLevelGain(r),moneyGain:i.calculateMoneyGain(r)}},canRecruitMember:function(){a.updateDynamicRam("canRecruitMember",Object(n.c)("gang","canRecruitMember")),l("canRecruitMember");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return t.canRecruitMember()},recruitMember:function(r){a.updateDynamicRam("recruitMember",Object(n.c)("gang","recruitMember")),l("recruitMember");const i=e.gang;if(null===i)throw new Error("Should not be called without Gang");const o=i.recruitMember(r);return o?t.log("gang.recruitMember",()=>`Successfully recruited Gang Member '${r}'`):t.log("gang.recruitMember",()=>`Failed to recruit Gang Member '${r}'`),o},getTaskNames:function(){a.updateDynamicRam("getTaskNames",Object(n.c)("gang","getTaskNames")),l("getTaskNames");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");const r=t.getAllTaskNames();return r.unshift("Unassigned"),r},setMemberTask:function(e,r){a.updateDynamicRam("setMemberTask",Object(n.c)("gang","setMemberTask")),l("setMemberTask");const i=c("setMemberTask",e).assignToTask(r);return i?t.log("gang.setMemberTask",()=>`Successfully assigned Gang Member '${e}' to '${r}' task`):t.log("gang.setMemberTask",()=>`Failed to assign Gang Member '${e}' to '${r}' task. '${e}' is now Unassigned`),i},getTaskStats:function(e){a.updateDynamicRam("getTaskStats",Object(n.c)("gang","getTaskStats")),l("getTaskStats");const t=function(e,t){const n=o.a[t];if(!n)throw a.makeRuntimeErrorMsg("gang."+e,`Invalid task: '${t}'`);return n}("getTaskStats",e),r=Object.assign({},t);return r.territory=Object.assign({},t.territory),r},getEquipmentNames:function(){return a.updateDynamicRam("getEquipmentNames",Object(n.c)("gang","getEquipmentNames")),l("getEquipmentNames"),Object.keys(s.a)},getEquipmentCost:function(t){a.updateDynamicRam("getEquipmentCost",Object(n.c)("gang","getEquipmentCost")),l("getEquipmentCost");const r=e.gang;if(null===r)throw new Error("Should not be called without Gang");const i=s.a[t];return null===i?1/0:r.getUpgradeCost(i)},getEquipmentType:function(e){a.updateDynamicRam("getEquipmentType",Object(n.c)("gang","getEquipmentType")),l("getEquipmentType");const t=s.a[e];return null==t?"":t.getType()},getEquipmentStats:function(e){a.updateDynamicRam("getEquipmentStats",Object(n.c)("gang","getEquipmentStats")),l("getEquipmentStats");const t=s.a[e];if(!t)throw a.makeRuntimeErrorMsg("getEquipmentStats","Invalid equipment: "+e);const r=t.mults;return Object.assign({},r)},purchaseEquipment:function(r,i){a.updateDynamicRam("purchaseEquipment",Object(n.c)("gang","purchaseEquipment")),l("purchaseEquipment");const o=e.gang;if(null===o)throw new Error("Should not be called without Gang");const u=c("purchaseEquipment",r),m=s.a[i];if(!m)return!1;const h=u.buyUpgrade(m,e,o);return h?t.log("gang.purchaseEquipment",()=>`Purchased '${i}' for Gang member '${r}'`):t.log("gang.purchaseEquipment",()=>`Failed to purchase '${i}' for Gang member '${r}'`),h},ascendMember:function(r){a.updateDynamicRam("ascendMember",Object(n.c)("gang","ascendMember")),l("ascendMember");const i=e.gang;if(null===i)throw new Error("Should not be called without Gang");const o=c("ascendMember",r);if(o.canAscend())return i.ascendMember(o,t)},getAscensionResult:function(t){a.updateDynamicRam("getAscensionResult",Object(n.c)("gang","getAscensionResult")),l("getAscensionResult");if(null===e.gang)throw new Error("Should not be called without Gang");const r=c("getAscensionResult",t);if(r.canAscend())return{respect:r.earnedRespect,...r.getAscensionResults()}},setTerritoryWarfare:function(r){a.updateDynamicRam("setTerritoryWarfare",Object(n.c)("gang","setTerritoryWarfare")),l("setTerritoryWarfare");const i=e.gang;if(null===i)throw new Error("Should not be called without Gang");r?(i.territoryWarfareEngaged=!0,t.log("gang.setTerritoryWarfare",()=>"Engaging in Gang Territory Warfare")):(i.territoryWarfareEngaged=!1,t.log("gang.setTerritoryWarfare",()=>"Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(t){a.updateDynamicRam("getChanceToWinClash",Object(n.c)("gang","getChanceToWinClash")),l("getChanceToWinClash");const r=e.gang;if(null===r)throw new Error("Should not be called without Gang");if(null==i.a[t])throw a.makeRuntimeErrorMsg("gang.getChanceToWinClash","Invalid gang: "+t);const o=i.a[r.facName].power;return o/(i.a[t].power+o)},getBonusTime:function(){a.updateDynamicRam("getBonusTime",Object(n.c)("gang","getBonusTime")),l("getBonusTime");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return Math.round(t.storedCycles/5)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(14),r=a(166),i=a(74),o=a(72),s=a(513),l=a(20),c=a(333);function u(e,t,a){const u=function(t){if(10!==e.bitNodeN&&!i.a[10])throw a.makeRuntimeErrorMsg("sleeve."+t,"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")},m=function(n,r){if(r>=e.sleeves.length||r<0){const e="Invalid sleeve number: "+r;throw t.log(n,()=>e),a.makeRuntimeErrorMsg("sleeve."+n,e)}};return{getNumSleeves:function(){return a.updateDynamicRam("getNumSleeves",Object(n.c)("sleeve","getNumSleeves")),u("getNumSleeves"),e.sleeves.length},setToShockRecovery:function(t=0){const r=a.number("setToShockRecovery","sleeveNumber",t);return a.updateDynamicRam("setToShockRecovery",Object(n.c)("sleeve","setToShockRecovery")),u("setToShockRecovery"),m("setToShockRecovery",r),e.sleeves[r].shockRecovery(e)},setToSynchronize:function(t=0){const r=a.number("setToSynchronize","sleeveNumber",t);return a.updateDynamicRam("setToSynchronize",Object(n.c)("sleeve","setToSynchronize")),u("setToSynchronize"),m("setToSynchronize",r),e.sleeves[r].synchronize(e)},setToCommitCrime:function(t=0,r=""){const i=a.number("setToCommitCrime","sleeveNumber",t),o=a.string("setToCommitCrime","crimeName",r);a.updateDynamicRam("setToCommitCrime",Object(n.c)("sleeve","setToCommitCrime")),u("setToCommitCrime"),m("setToCommitCrime",i);const s=Object(c.b)(o);return null!==s&&e.sleeves[i].commitCrime(e,s.name)},setToUniversityCourse:function(t=0,r="",i=""){const o=a.number("setToUniversityCourse","sleeveNumber",t),s=a.string("setToUniversityCourse","universityName",r),l=a.string("setToUniversityCourse","className",i);return a.updateDynamicRam("setToUniversityCourse",Object(n.c)("sleeve","setToUniversityCourse")),u("setToUniversityCourse"),m("setToUniversityCourse",o),e.sleeves[o].takeUniversityCourse(e,s,l)},travel:function(t=0,r=""){const i=a.number("travel","sleeveNumber",t),o=a.string("setToUniversityCourse","cityName",r);return a.updateDynamicRam("travel",Object(n.c)("sleeve","travel")),u("travel"),m("travel",i),e.sleeves[i].travel(e,o)},setToCompanyWork:function(t=0,r=""){const i=a.number("setToCompanyWork","sleeveNumber",t),s=a.string("setToUniversityCourse","companyName",r);a.updateDynamicRam("setToCompanyWork",Object(n.c)("sleeve","setToCompanyWork")),u("setToCompanyWork"),m("setToCompanyWork",i);for(let t=0;t=e.hacknetNodes.length)throw a.makeRuntimeErrorMsg(n,"Index specified for Hacknet Node is out-of-bounds: "+t);if(Object(r.g)(e)){const r=e.hacknetNodes[t];if("string"!=typeof r)throw new Error("hacknet node was not a string");const o=Object(s.d)(r);if(!(o instanceof i.a))throw new Error("hacknet server was not actually hacknet server");if(null==o)throw a.makeRuntimeErrorMsg(n,`Could not get Hacknet Server for index ${t}. This is probably a bug, please report to game dev`);return o}{const a=e.hacknetNodes[t];if(!(a instanceof o.a))throw new Error("hacknet node was not node.");return a}};return{numNodes:function(){return e.hacknetNodes.length},maxNumNodes:function(){return Object(r.g)(e)?n.b.MaxServers:1/0},purchaseNode:function(){return Object(r.l)(e)},getPurchaseNodeCost:function(){return Object(r.g)(e)?Object(r.b)(e):Object(r.a)(e)},getNodeStats:function(t){const a=l(t,"getNodeStats"),n=Object(r.g)(e),o={name:a instanceof i.a?a.hostname:a.name,level:a.level,ram:a instanceof i.a?a.maxRam:a.ram,ramUsed:a instanceof i.a?a.ramUsed:void 0,cores:a.cores,production:a instanceof i.a?a.hashRate:a.moneyGainRatePerSecond,timeOnline:a.onlineTimeSeconds,totalProduction:a instanceof i.a?a.totalHashesGenerated:a.totalMoneyGenerated};return n&&a instanceof i.a&&(o.cache=a.cache,o.hashCapacity=a.hashCapacity),o},upgradeLevel:function(t,a){const n=l(t,"upgradeLevel");return Object(r.n)(e,n,a)},upgradeRam:function(t,a){const n=l(t,"upgradeRam");return Object(r.o)(e,n,a)},upgradeCore:function(t,a){const n=l(t,"upgradeCore");return Object(r.k)(e,n,a)},upgradeCache:function(a,n){if(!Object(r.g)(e))return!1;const o=l(a,"upgradeCache");if(!(o instanceof i.a))return t.log("upgradeCache",()=>"Can only be called on hacknet servers"),!1;const s=Object(r.j)(e,o,n);return s&&Object(r.p)(e),s},getLevelUpgradeCost:function(t,a){return l(t,"upgradeLevel").calculateLevelUpgradeCost(a,e.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(t,a){return l(t,"upgradeRam").calculateRamUpgradeCost(a,e.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(t,a){return l(t,"upgradeCore").calculateCoreUpgradeCost(a,e.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(a,n){if(!Object(r.g)(e))return 1/0;const o=l(a,"upgradeCache");return o instanceof i.a?o.calculateCacheUpgradeCost(n):(t.log("getCacheUpgradeCost",()=>"Can only be called on hacknet servers"),-1)},numHashes:function(){return Object(r.g)(e)?e.hashManager.hashes:0},hashCapacity:function(){return Object(r.g)(e)?e.hashManager.capacity:0},hashCost:function(t){return Object(r.g)(e)?e.hashManager.getUpgradeCost(t):1/0},spendHashes:function(t,a){return!!Object(r.g)(e)&&Object(r.m)(e,t,a)},getHashUpgradeLevel:function(t){const n=e.hashManager.upgrades[t];if(void 0===n)throw a.makeRuntimeErrorMsg("hacknet.hashUpgradeLevel","Invalid Hash Upgrade: "+t);return n},getStudyMult:function(){return Object(r.g)(e)?e.hashManager.getStudyMult():1},getTrainingMult:function(){return Object(r.g)(e)?e.hashManager.getTrainingMult():1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(107),r=a(14),i=a(105),o=a(221),s=a(6);function l(e,t,a){function l(t){e.hasAugmentation(s.a.StaneksGift1,!0)||a.makeRuntimeErrorMsg(t,"Requires Stanek's Gift installed.")}return{width:function(){return i.b.width()},height:function(){return i.b.height()},charge:function(o,s){const c=a.number("stanek.charge","rootX",o),u=a.number("stanek.charge","rootY",s);a.updateDynamicRam("charge",Object(r.c)("stanek","charge")),l("charge");const m=i.b.findFragment(c,u);if(!m)throw a.makeRuntimeErrorMsg("stanek.charge",`No fragment with root (${c}, ${u}).`);const h=i.b.inBonus()?200:1e3;return Object(n.c)(h,t).then((function(){if(t.env.stopFlag)return Promise.reject(t);const a=i.b.charge(e,m,t.scriptRef.threads);return t.log("stanek.charge",()=>`Charged fragment for ${a} charge.`),Promise.resolve()}))},fragmentDefinitions:function(){return a.updateDynamicRam("fragmentDefinitions",Object(r.c)("stanek","fragmentDefinitions")),l("fragmentDefinitions"),t.log("stanek.fragmentDefinitions",()=>`Returned ${o.c.length} fragments`),o.c.map(e=>e.copy())},activeFragments:function(){return a.updateDynamicRam("activeFragments",Object(r.c)("stanek","activeFragments")),l("activeFragments"),t.log("stanek.activeFragments",()=>`Returned ${i.b.fragments.length} fragments`),i.b.fragments.map(e=>({...e.copy(),...e.fragment().copy()}))},clear:function(){a.updateDynamicRam("clear",Object(r.c)("stanek","clear")),l("clear"),t.log("stanek.clear",()=>"Cleared Stanek's Gift."),i.b.clear()},canPlace:function(e,t,n,s){const c=a.number("stanek.canPlace","rootX",e),u=a.number("stanek.canPlace","rootY",t),m=a.number("stanek.canPlace","rotation",n),h=a.number("stanek.canPlace","fragmentId",s);a.updateDynamicRam("canPlace",Object(r.c)("stanek","canPlace")),l("canPlace");const p=Object(o.b)(h);if(!p)throw a.makeRuntimeErrorMsg("stanek.canPlace","Invalid fragment id: "+h);return i.b.canPlace(c,u,m,p)},place:function(e,t,n,s){const c=a.number("stanek.place","rootX",e),u=a.number("stanek.place","rootY",t),m=a.number("stanek.place","rotation",n),h=a.number("stanek.place","fragmentId",s);a.updateDynamicRam("place",Object(r.c)("stanek","place")),l("place");const p=Object(o.b)(h);if(!p)throw a.makeRuntimeErrorMsg("stanek.place","Invalid fragment id: "+h);return i.b.place(c,u,m,p)},get:function(e,t){const n=a.number("stanek.get","rootX",e),o=a.number("stanek.get","rootY",t);a.updateDynamicRam("get",Object(r.c)("stanek","get")),l("get");const s=i.b.findFragment(n,o);if(void 0!==s)return s.copy()},remove:function(e,t){const n=a.number("stanek.remove","rootX",e),o=a.number("stanek.remove","rootY",t);return a.updateDynamicRam("remove",Object(r.c)("stanek","remove")),l("remove"),i.b.delete(n,o)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(5);function r(e,t,a,r){return 1+Math.log(e+1)/(100*Math.log(1.8))*Math.pow((t+1)/5,.07)*a*r*n.a.StaneksGiftPowerMultiplier}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={RAMBonus:.1,BaseSize:9}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(214),r=a(14),i=a(5);function o(e,t,a){const o=function(t,r=!1){const i=e.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");if(!(7===e.bitNodeN||e.sourceFiles.some(e=>7===e.n))){const e="You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.";throw a.makeRuntimeErrorMsg("bladeburner."+t,e)}if(!r){if(!(i instanceof n.a)){const e="You must be a member of the Bladeburner division to use this API.";throw a.makeRuntimeErrorMsg("bladeburner."+t,e)}}},s=function(t,n){const r=e.bladeburner;if(null===r)throw new Error("Must have joined bladeburner");if(!r.cities.hasOwnProperty(n))throw a.makeRuntimeErrorMsg("bladeburner."+t,"Invalid city: "+n)},l=function(t,n,r){const i=e.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");const o=i.getActionIdFromTypeAndName(n,r);if(!o)throw a.makeRuntimeErrorMsg("bladeburner."+t,`Invalid action type='${n}', name='${r}'`);const s=i.getActionObject(o);if(!s)throw a.makeRuntimeErrorMsg("bladeburner."+t,`Invalid action type='${n}', name='${r}'`);return s};return{getContractNames:function(){a.updateDynamicRam("getContractNames",Object(r.c)("bladeburner","getContractNames")),o("getContractNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getContractNamesNetscriptFn()},getOperationNames:function(){a.updateDynamicRam("getOperationNames",Object(r.c)("bladeburner","getOperationNames")),o("getOperationNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getOperationNamesNetscriptFn()},getBlackOpNames:function(){a.updateDynamicRam("getBlackOpNames",Object(r.c)("bladeburner","getBlackOpNames")),o("getBlackOpNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e=""){a.updateDynamicRam("getBlackOpRank",Object(r.c)("bladeburner","getBlackOpRank")),o("getBlackOpRank");return l("getBlackOpRank","blackops",e).reqdRank},getGeneralActionNames:function(){a.updateDynamicRam("getGeneralActionNames",Object(r.c)("bladeburner","getGeneralActionNames")),o("getGeneralActionNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){a.updateDynamicRam("getSkillNames",Object(r.c)("bladeburner","getSkillNames")),o("getSkillNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getSkillNamesNetscriptFn()},startAction:function(n="",i=""){a.updateDynamicRam("startAction",Object(r.c)("bladeburner","startAction")),o("startAction");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.startActionNetscriptFn(e,n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.startAction",e)}},stopBladeburnerAction:function(){a.updateDynamicRam("stopBladeburnerAction",Object(r.c)("bladeburner","stopBladeburnerAction")),o("stopBladeburnerAction");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.resetAction()},getCurrentAction:function(){a.updateDynamicRam("getCurrentAction",Object(r.c)("bladeburner","getCurrentAction")),o("getCurrentAction");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getTypeAndNameFromActionId(t.action)},getActionTime:function(n="",i=""){a.updateDynamicRam("getActionTime",Object(r.c)("bladeburner","getActionTime")),o("getActionTime");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getActionTimeNetscriptFn(e,n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getActionTime",e)}},getActionEstimatedSuccessChance:function(n="",i=""){a.updateDynamicRam("getActionEstimatedSuccessChance",Object(r.c)("bladeburner","getActionEstimatedSuccessChance")),o("getActionEstimatedSuccessChance");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getActionEstimatedSuccessChanceNetscriptFn(e,n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getActionEstimatedSuccessChance",e)}},getActionRepGain:function(e="",t="",n){a.updateDynamicRam("getActionRepGain",Object(r.c)("bladeburner","getActionRepGain")),o("getActionRepGain");const s=l("getActionRepGain",e,t);let c;return c=null==n||isNaN(n)?Math.pow(s.rewardFac,s.level-1):Math.pow(s.rewardFac,n-1),s.rankGain*c*i.a.BladeburnerRank},getActionCountRemaining:function(n="",i=""){a.updateDynamicRam("getActionCountRemaining",Object(r.c)("bladeburner","getActionCountRemaining")),o("getActionCountRemaining");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getActionCountRemainingNetscriptFn(n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getActionCountRemaining",e)}},getActionMaxLevel:function(e="",t=""){a.updateDynamicRam("getActionMaxLevel",Object(r.c)("bladeburner","getActionMaxLevel")),o("getActionMaxLevel");return l("getActionMaxLevel",e,t).maxLevel},getActionCurrentLevel:function(e="",t=""){a.updateDynamicRam("getActionCurrentLevel",Object(r.c)("bladeburner","getActionCurrentLevel")),o("getActionCurrentLevel");return l("getActionCurrentLevel",e,t).level},getActionAutolevel:function(e="",t=""){a.updateDynamicRam("getActionAutolevel",Object(r.c)("bladeburner","getActionAutolevel")),o("getActionAutolevel");return l("getActionCurrentLevel",e,t).autoLevel},setActionAutolevel:function(e="",t="",n=!0){a.updateDynamicRam("setActionAutolevel",Object(r.c)("bladeburner","setActionAutolevel")),o("setActionAutolevel");l("setActionAutolevel",e,t).autoLevel=n},setActionLevel:function(e="",t="",n=1){a.updateDynamicRam("setActionLevel",Object(r.c)("bladeburner","setActionLevel")),o("setActionLevel");const i=l("setActionLevel",e,t);if(n<1||n>i.maxLevel)throw a.makeRuntimeErrorMsg("bladeburner.setActionLevel",`Level must be between 1 and ${i.maxLevel}, is ${n}`);i.level=n},getRank:function(){a.updateDynamicRam("getRank",Object(r.c)("bladeburner","getRank")),o("getRank");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.rank},getSkillPoints:function(){a.updateDynamicRam("getSkillPoints",Object(r.c)("bladeburner","getSkillPoints")),o("getSkillPoints");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.skillPoints},getSkillLevel:function(n=""){a.updateDynamicRam("getSkillLevel",Object(r.c)("bladeburner","getSkillLevel")),o("getSkillLevel");const i=e.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");try{return i.getSkillLevelNetscriptFn(n,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getSkillLevel",e)}},getSkillUpgradeCost:function(n=""){a.updateDynamicRam("getSkillUpgradeCost",Object(r.c)("bladeburner","getSkillUpgradeCost")),o("getSkillUpgradeCost");const i=e.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");try{return i.getSkillUpgradeCostNetscriptFn(n,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getSkillUpgradeCost",e)}},upgradeSkill:function(n){a.updateDynamicRam("upgradeSkill",Object(r.c)("bladeburner","upgradeSkill")),o("upgradeSkill");const i=e.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");try{return i.upgradeSkillNetscriptFn(n,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.upgradeSkill",e)}},getTeamSize:function(n="",i=""){a.updateDynamicRam("getTeamSize",Object(r.c)("bladeburner","getTeamSize")),o("getTeamSize");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getTeamSizeNetscriptFn(n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getTeamSize",e)}},setTeamSize:function(n="",i="",s){a.updateDynamicRam("setTeamSize",Object(r.c)("bladeburner","setTeamSize")),o("setTeamSize");const l=e.bladeburner;if(null===l)throw new Error("Should not be called without Bladeburner");try{return l.setTeamSizeNetscriptFn(n,i,s,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.setTeamSize",e)}},getCityEstimatedPopulation:function(t){a.updateDynamicRam("getCityEstimatedPopulation",Object(r.c)("bladeburner","getCityEstimatedPopulation")),o("getCityEstimatedPopulation"),s("getCityEstimatedPopulation",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.cities[t].popEst},getCityCommunities:function(t){a.updateDynamicRam("getCityCommunities",Object(r.c)("bladeburner","getCityCommunities")),o("getCityCommunities"),s("getCityCommunities",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.cities[t].comms},getCityChaos:function(t){a.updateDynamicRam("getCityChaos",Object(r.c)("bladeburner","getCityChaos")),o("getCityChaos"),s("getCityChaos",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.cities[t].chaos},getCity:function(){a.updateDynamicRam("getCity",Object(r.c)("bladeburner","getCity")),o("getCityChaos");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.city},switchCity:function(t){a.updateDynamicRam("switchCity",Object(r.c)("bladeburner","switchCity")),o("switchCity"),s("switchCity",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.city=t},getStamina:function(){a.updateDynamicRam("getStamina",Object(r.c)("bladeburner","getStamina")),o("getStamina");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return[t.stamina,t.maxStamina]},joinBladeburnerFaction:function(){a.updateDynamicRam("joinBladeburnerFaction",Object(r.c)("bladeburner","joinBladeburnerFaction")),o("joinBladeburnerFaction",!0);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.joinBladeburnerFactionNetscriptFn(t)},joinBladeburnerDivision:function(){return a.updateDynamicRam("joinBladeburnerDivision",Object(r.c)("bladeburner","joinBladeburnerDivision")),(7===e.bitNodeN||e.sourceFileLvl(7)>0)&&(8!==e.bitNodeN&&(e.bladeburner instanceof n.a||(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100?(e.bladeburner=new n.a(e),t.log("joinBladeburnerDivision",()=>"You have been accepted into the Bladeburner division"),!0):(t.log("joinBladeburnerDivision",()=>"You do not meet the requirements for joining the Bladeburner division"),!1))))},getBonusTime:function(){a.updateDynamicRam("getBonusTime",Object(r.c)("bladeburner","getBonusTime")),o("getBonusTime");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return Math.round(t.storedCycles/5)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(14),r=a(794);function i(e,t,a){const i=function(e,t,n){const r=a.getServer(t,e).getContract(n);if(null==r)throw a.makeRuntimeErrorMsg("codingcontract."+e,`Cannot find contract '${n}' on server '${t}'`);return r};return{attempt:function(o,s,l=t.hostname,{returnReward:c}={}){a.updateDynamicRam("attempt",Object(n.c)("codingcontract","attempt"));const u=i("attempt",l,s);if(Object(r.a)(o)){const e=[];for(let t=0;t`Successfully completed Coding Contract '${s}'. Reward: ${a}`),h.removeContract(s),!c||a}return++u.tries,u.tries>=u.getMaxNumTries()?(t.log("attempt",()=>`Coding Contract attempt '${s}' failed. Contract is now self-destructing`),h.removeContract(s)):t.log("attempt",()=>`Coding Contract attempt '${s}' failed. ${u.getMaxNumTries()-u.tries} attempts remaining.`),!!c&&""},getContractType:function(e,r=t.hostname){a.updateDynamicRam("getContractType",Object(n.c)("codingcontract","getContractType"));return i("getContractType",r,e).getType()},getData:function(e,r=t.hostname){a.updateDynamicRam("getData",Object(n.c)("codingcontract","getData"));const o=i("getData",r,e).getData();if(o.constructor===Array){const e=o.slice();for(let t=0;te.constructor===Array)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(107),r=a(71),i=a(394),o=a(395),s=a(52),l=a(287);function c(e,t,a){function c(){const t=e.corporation;if(null===t)throw new Error("cannot be called without a corporation");return t}function u(e){const t=c().divisions.find(t=>t.name===e);if(void 0===t)throw new Error(`No division named '${e}'`);return t}function m(e,t){const a=u(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 h(e,t){const a=u(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 p(e,t,a){const n=h(e,t).materials[a];if(void 0===n)throw new Error(`Invalid material name: '${a}'`);return n}function d(e,t){const a=u(e).products[t];if(void 0===a)throw new Error(`Invalid product name: '${t}'`);return a}function f(e,t,a){const n=m(e,t).employees.find(e=>e.name===a);if(void 0===n)throw new Error(`Invalid employee name: '${a}'`);return n}function g(t,n){if(null===e.corporation)throw a.makeRuntimeErrorMsg("corporation."+t,"Must own a corporation.");if(n&&!e.corporation.unlockUpgrades[n])throw a.makeRuntimeErrorMsg("corporation."+t,"You do not have access to this API.")}return{...{getWarehouse:function(e,t){g("getWarehouse",7);const n=h(a.string("getWarehouse","divisionName",e),a.string("getWarehouse","cityName",t));return{level:n.level,loc:n.loc,size:n.size,sizeUsed:n.sizeUsed}},getMaterial:function(e,t,n){g("getMaterial",7);const r=p(a.string("getMaterial","divisionName",e),a.string("getMaterial","cityName",t),a.string("getMaterial","materialName",n));return{name:r.name,qty:r.qty,qlt:r.qlt}},getProduct:function(e,t){g("getProduct",7);const n=d(a.string("getProduct","divisionName",e),a.string("getProduct","productName",t));return{name:n.name,dmd:n.dmd,cmp:n.cmp,pCost:n.pCost,sCost:n.sCost}},purchaseWarehouse:function(e,t){g("purchaseWarehouse",7);const n=a.string("purchaseWarehouse","divisionName",e),i=a.string("purchaseWarehouse","cityName",t),o=c();Object(r.m)(o,u(n),i)},upgradeWarehouse:function(e,t){g("upgradeWarehouse",7);const n=a.string("upgradeWarehouse","divisionName",e),i=a.string("upgradeWarehouse","cityName",t),o=c();Object(r.z)(o,u(n),h(n,i))},sellMaterial:function(e,t,n,i,o){g("sellMaterial",7);const s=a.string("sellMaterial","divisionName",e),l=a.string("sellMaterial","cityName",t),c=a.string("sellMaterial","materialName",n),u=a.string("sellMaterial","amt",i),m=a.string("sellMaterial","price",o),h=p(s,l,c);Object(r.o)(h,u,m)},sellProduct:function(e,t,n,i,o,s){g("sellProduct",7);const l=a.string("sellProduct","divisionName",e),c=a.string("sellProduct","cityName",t),u=a.string("sellProduct","productName",n),m=a.string("sellProduct","amt",i),h=a.string("sellProduct","price",o),p=a.boolean(s),f=d(l,u);Object(r.p)(f,c,m,h,p)},discontinueProduct:function(e,t){g("discontinueProduct",7);const n=a.string("discontinueProduct","divisionName",e),r=a.string("discontinueProduct","productName",t);u(n).discontinueProduct(d(n,r))},setSmartSupply:function(e,t,n){g("setSmartSupply",7);const i=a.string("setSmartSupply","divisionName",e),o=a.string("sellProduct","cityName",t),s=a.boolean(n),l=h(i,o);Object(r.u)(l,s)},buyMaterial:function(e,t,n,i){g("buyMaterial",7);const o=a.string("buyMaterial","divisionName",e),s=a.string("buyMaterial","cityName",t),l=a.string("buyMaterial","materialName",n),c=a.number("buyMaterial","amt",i),u=p(o,s,l);Object(r.c)(u,c)},makeProduct:function(e,t,n,i,o){g("makeProduct",7);const s=a.string("makeProduct","divisionName",e),l=a.string("makeProduct","cityName",t),m=a.string("makeProduct","productName",n),h=a.number("makeProduct","designInvest",i),p=a.number("makeProduct","marketingInvest",o),d=c();Object(r.j)(d,u(s),l,m,h,p)},exportMaterial:function(e,t,n,i,o,s){g("exportMaterial",7);const l=a.string("exportMaterial","sourceDivision",e),c=a.string("exportMaterial","sourceCity",t),u=a.string("exportMaterial","targetDivision",n),m=a.string("exportMaterial","targetCity",i),h=a.string("exportMaterial","materialName",o),d=a.string("exportMaterial","amt",s);Object(r.e)(u,m,p(l,c,h),d+"")},cancelExportMaterial:function(e,t,n,i,o,s){g("cancelExportMaterial",7);const l=a.string("cancelExportMaterial","sourceDivision",e),c=a.string("cancelExportMaterial","sourceCity",t),u=a.string("cancelExportMaterial","targetDivision",n),m=a.string("cancelExportMaterial","targetCity",i),h=a.string("cancelExportMaterial","materialName",o),d=a.string("cancelExportMaterial","amt",s);Object(r.d)(u,m,p(l,c,h),d+"")},setMaterialMarketTA1:function(e,t,n,i){g("setMaterialMarketTA1",7);const o=a.string("setMaterialMarketTA1","divisionName",e),s=a.string("setMaterialMarketTA1","cityName",t),l=a.string("setMaterialMarketTA1","materialName",n),c=a.boolean(i);Object(r.q)(p(o,s,l),c)},setMaterialMarketTA2:function(e,t,n,i){g("setMaterialMarketTA2",7);const o=a.string("setMaterialMarketTA2","divisionName",e),s=a.string("setMaterialMarketTA2","cityName",t),l=a.string("setMaterialMarketTA2","materialName",n),c=a.boolean(i);Object(r.r)(p(o,s,l),c)},setProductMarketTA1:function(e,t,n){g("setProductMarketTA1",7);const i=a.string("setProductMarketTA1","divisionName",e),o=a.string("setProductMarketTA1","productName",t),s=a.boolean(n);Object(r.s)(d(i,o),s)},setProductMarketTA2:function(e,t,n){g("setProductMarketTA2",7);const i=a.string("setProductMarketTA2","divisionName",e),o=a.string("setProductMarketTA2","productName",t),s=a.boolean(n);Object(r.t)(d(i,o),s)}},...{assignJob:function(e,i,o,s){g("assignJob",8);const l=a.string("assignJob","divisionName",e),c=a.string("assignJob","cityName",i),u=a.string("assignJob","employeeName",o),m=a.string("assignJob","job",s),h=f(l,c,u);return Object(n.c)(1e3,t).then((function(){return Promise.resolve(Object(r.a)(h,m))}))},hireEmployee:function(e,t){g("hireEmployee",8);return m(a.string("hireEmployee","divisionName",e),a.string("hireEmployee","cityName",t)).hireRandomEmployee()},upgradeOfficeSize:function(e,t,n){g("upgradeOfficeSize",8);const i=a.string("upgradeOfficeSize","divisionName",e),o=a.string("upgradeOfficeSize","cityName",t),s=a.number("upgradeOfficeSize","size",n),l=m(i,o),u=c();Object(r.y)(u,l,s)},throwParty:function(i,o,s){g("throwParty",8);const u=a.string("throwParty","divisionName",i),h=a.string("throwParty","cityName",o),p=a.number("throwParty","costPerEmployee",s),d=m(u,h),f=c();return Object(n.c)(6e4/(e.hacking_speed_mult*Object(l.a)(e.intelligence,1)),t).then((function(){return Promise.resolve(Object(r.w)(f,d,p))}))},buyCoffee:function(i,o){g("buyCoffee",8);const s=a.string("buyCoffee","divisionName",i),h=a.string("buyCoffee","cityName",o),p=c();return Object(n.c)(6e4/(e.hacking_speed_mult*Object(l.a)(e.intelligence,1)),t).then((function(){return Promise.resolve(Object(r.b)(p,u(s),m(s,h)))}))},hireAdVert:function(e){g("hireAdVert",8);const t=a.string("hireAdVert","divisionName",e),n=c();Object(r.f)(n,u(t),m(t,"Sector-12"))},research:function(e,t){g("research",8);const n=a.string("research","divisionName",e),i=a.string("research","researchName",t);Object(r.n)(u(n),i)},getOffice:function(e,t){g("getOffice",8);const n=m(a.string("getOffice","divisionName",e),a.string("getOffice","cityName",t));return{loc:n.loc,size:n.size,minEne:n.minEne,maxEne:n.maxEne,minHap:n.minHap,maxHap:n.maxHap,maxMor:n.maxMor,employees:n.employees.map(e=>e.name),employeeProd:{Operations:n.employeeProd[s.a.Operations],Engineer:n.employeeProd[s.a.Engineer],Business:n.employeeProd[s.a.Business],Management:n.employeeProd[s.a.Management],"Research & Development":n.employeeProd[s.a.RandD],Training:n.employeeProd[s.a.Training]}}},getEmployee:function(e,t,n){g("getEmployee",8);const r=f(a.string("getEmployee","divisionName",e),a.string("getEmployee","cityName",t),a.string("getEmployee","employeeName",n));return{name:r.name,mor:r.mor,hap:r.hap,ene:r.ene,int:r.int,cha:r.cha,exp:r.exp,cre:r.cre,eff:r.eff,sal:r.sal,loc:r.loc,pos:r.pos}}},expandIndustry:function(e,t){g("expandIndustry");const n=a.string("expandIndustry","industryName",e),i=a.string("expandIndustry","divisionName",t),o=c();Object(r.l)(o,n,i)},expandCity:function(e,t){g("expandCity");const n=a.string("expandCity","divisionName",e),i=a.string("expandCity","cityName",t),o=c(),s=u(n);Object(r.k)(o,s,i)},unlockUpgrade:function(e){g("unlockUpgrade");const t=a.string("unlockUpgrade","upgradeName",e),n=c(),o=Object.values(i.a).find(e=>e[2]===t);if(void 0===o)throw new Error(`No upgrade named '${t}'`);Object(r.x)(n,o)},levelUpgrade:function(e){g("levelUpgrade");const t=a.string("levelUpgrade","upgradeName",e),n=c(),i=Object.values(o.a).find(e=>e[4]===t);if(void 0===i)throw new Error(`No upgrade named '${t}'`);Object(r.h)(n,i)},issueDividends:function(e){g("issueDividends");const t=a.number("issueDividends","percent",e),n=c();Object(r.g)(n,t)},getDivision:function(e){g("getDivision");const t=u(a.string("getDivision","divisionName",e)),n=[];for(const e of Object.values(t.offices))0!==e&&n.push(e.loc);return{name:t.name,type:t.type,awareness:t.awareness,popularity:t.popularity,prodMult:t.prodMult,research:t.sciResearch.qty,lastCycleRevenue:t.lastCycleRevenue,lastCycleExpenses:t.lastCycleExpenses,thisCycleRevenue:t.thisCycleRevenue,thisCycleExpenses:t.thisCycleExpenses,upgrades:t.upgrades,cities:n}},getCorporation:function(){g("getCorporation");const e=c();return{name:e.name,funds:e.funds,revenue:e.revenue,expenses:e.expenses,public:e.public,totalShares:e.totalShares,numShares:e.numShares,shareSaleCooldown:e.shareSaleCooldown,issuedShares:e.issuedShares,sharePrice:e.sharePrice,state:e.state+""}}}}},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__(21),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(23),_IndustryData__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(51),_data_Constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(42),_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(52),_Material__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(175),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(31),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(797),_OfficeSpace__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(334),_Product__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(357),_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(15),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(122),_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(164),_Warehouse__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(219),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(335);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_2__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_5__.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_14__.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_8__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_2__.a.Agriculture,this.lastCycleRevenue=0,this.lastCycleExpenses=0,this.thisCycleRevenue=0,this.thisCycleExpenses=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_13__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.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_3__.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_3__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.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}}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(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=0,this.thisCycleExpenses=0),this.lastCycleRevenue=this.thisCycleRevenue/(e*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses/(e*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.thisCycleRevenue=0,this.thisCycleExpenses=0,this.lastCycleRevenue>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_8__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses+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+n[0],this.thisCycleExpenses=this.thisCycleExpenses+n[1]),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue+n[0],this.thisCycleExpenses=this.thisCycleExpenses+n[1])}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;e0&&(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_3__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.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;in)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_3__.a.SecsPerMarketCycle*marketCycles;let n=0;for(let e=0;e0){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_3__.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].qty0&&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_3__.a.SecsPerMarketCycle*marketCycles)}for(let e=0;emat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_3__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_8__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.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_4__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.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_9__.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_3__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.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_3__.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_12__.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_3__.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].qty0&&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_3__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_3__.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_11__.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_11__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,(maxSell+"").toUpperCase());tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.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_3__.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_3__.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=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 s}));var n=a(42),r=a(31),i=a(21),o=a(52);class s{constructor(e={}){var t,a,i;t=this,a="cyclesUntilRaise",i=n.a.CyclesPerEmployeeRaise,a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,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=o.a.Unassigned}process(e=1,t){const a=.003*e,r=a*Math.random();this.exp+=a;const i=a*Math.random();this.pos===o.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.eneObject(u.f)(e),respectGain:function(e,t,a){return Object(u.d)(e,t,a)},wantedLevelGain:function(e,t,a){return Object(u.e)(e,t,a)},moneyGain:function(e,t,a){return Object(u.c)(e,t,a)},ascensionPointsGain:function(e){return Object(u.b)(e)},ascensionMultiplier:function(e){return Object(u.a)(e)}}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(14),r=a(223),i=a(95),o=a(204),s=a(100),l=a(68),c=a(88),u=a(257);function m(e,t,a){const m=function(t){if(!e.hasWseAccount)throw a.makeRuntimeErrorMsg(t,`You don't have WSE Access! Cannot use ${t}()`);if(!e.hasTixApiAccess)throw a.makeRuntimeErrorMsg(t,`You don't have TIX API Access! Cannot use ${t}()`)},h=function(e,t){const n=i.b[e];if(null==n)throw a.makeRuntimeErrorMsg(t,`Invalid stock symbol: '${e}'`);return n};return{getSymbols:function(){return a.updateDynamicRam("getSymbols",Object(n.c)("stock","getSymbols")),m("getSymbols"),Object.values(c.a)},getPrice:function(e){a.updateDynamicRam("getPrice",Object(n.c)("stock","getPrice")),m("getPrice");return h(e,"getPrice").price},getAskPrice:function(e){a.updateDynamicRam("getAskPrice",Object(n.c)("stock","getAskPrice")),m("getAskPrice");return h(e,"getAskPrice").getAskPrice()},getBidPrice:function(e){a.updateDynamicRam("getBidPrice",Object(n.c)("stock","getBidPrice")),m("getBidPrice");return h(e,"getBidPrice").getBidPrice()},getPosition:function(e){a.updateDynamicRam("getPosition",Object(n.c)("stock","getPosition")),m("getPosition");const t=i.b[e];if(null==t)throw a.makeRuntimeErrorMsg("getPosition","Invalid stock symbol: "+e);return[t.playerShares,t.playerAvgPx,t.playerShortShares,t.playerAvgShortPx]},getMaxShares:function(e){a.updateDynamicRam("getMaxShares",Object(n.c)("stock","getMaxShares")),m("getMaxShares");return h(e,"getMaxShares").maxShares},getPurchaseCost:function(e,t,r){a.updateDynamicRam("getPurchaseCost",Object(n.c)("stock","getPurchaseCost")),m("getPurchaseCost");const i=h(e,"getPurchaseCost");let s;t=Math.round(t);const c=r.toLowerCase();if(c.includes("l"))s=l.a.Long;else{if(!c.includes("s"))return 1/0;s=l.a.Short}const u=Object(o.b)(i,t,s);return null==u?1/0:u},getSaleGain:function(e,t,r){a.updateDynamicRam("getSaleGain",Object(n.c)("stock","getSaleGain")),m("getSaleGain");const i=h(e,"getSaleGain");let s;t=Math.round(t);const c=r.toLowerCase();if(c.includes("l"))s=l.a.Long;else{if(!c.includes("s"))return 0;s=l.a.Short}const u=Object(o.c)(i,t,s);return null==u?0:u},buy:function(e,i){a.updateDynamicRam("buy",Object(n.c)("stock","buy")),m("buy");const o=h(e,"buy");return Object(r.a)(o,i,t,{})?o.getAskPrice():0},sell:function(e,i){a.updateDynamicRam("sell",Object(n.c)("stock","sell")),m("sell");const o=h(e,"sell");return Object(r.c)(o,i,t,{})?o.getBidPrice():0},short:function(i,o){if(a.updateDynamicRam("short",Object(n.c)("stock","short")),m("short"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=1)throw a.makeRuntimeErrorMsg("short","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const s=h(i,"short");return Object(r.d)(s,o,t,{})?s.getBidPrice():0},sellShort:function(i,o){if(a.updateDynamicRam("sellShort",Object(n.c)("stock","sellShort")),m("sellShort"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=1)throw a.makeRuntimeErrorMsg("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const s=h(i,"sellShort");return Object(r.b)(s,o,t,{})?s.getAskPrice():0},placeOrder:function(r,o,c,u,p){if(a.updateDynamicRam("placeOrder",Object(n.c)("stock","placeOrder")),m("placeOrder"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const d=h(r,"placeOrder");let f,g;const y=u.toLowerCase();if(y.includes("limit")&&y.includes("buy"))f=s.a.LimitBuy;else if(y.includes("limit")&&y.includes("sell"))f=s.a.LimitSell;else if(y.includes("stop")&&y.includes("buy"))f=s.a.StopBuy;else{if(!y.includes("stop")||!y.includes("sell"))throw a.makeRuntimeErrorMsg("placeOrder","Invalid order type: "+u);f=s.a.StopSell}const b=p.toLowerCase();if(b.includes("l"))g=l.a.Long;else{if(!b.includes("s"))throw a.makeRuntimeErrorMsg("placeOrder","Invalid position type: "+p);g=l.a.Short}return Object(i.j)(d,o,c,f,g,t)},cancelOrder:function(r,o,c,u,p){if(a.updateDynamicRam("cancelOrder",Object(n.c)("stock","cancelOrder")),m("cancelOrder"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const d=h(r,"cancelOrder");if(isNaN(o)||isNaN(c))throw a.makeRuntimeErrorMsg("cancelOrder",`Invalid shares or price. Must be numeric. shares=${o}, price=${c}`);let f,g;const y=u.toLowerCase();if(y.includes("limit")&&y.includes("buy"))f=s.a.LimitBuy;else if(y.includes("limit")&&y.includes("sell"))f=s.a.LimitSell;else if(y.includes("stop")&&y.includes("buy"))f=s.a.StopBuy;else{if(!y.includes("stop")||!y.includes("sell"))throw a.makeRuntimeErrorMsg("cancelOrder","Invalid order type: "+u);f=s.a.StopSell}const b=p.toLowerCase();if(b.includes("l"))g=l.a.Long;else{if(!b.includes("s"))throw a.makeRuntimeErrorMsg("cancelOrder","Invalid position type: "+p);g=l.a.Short}const E={stock:d,shares:o,price:c,type:f,pos:g};return Object(i.c)(E,t)},getOrders:function(){if(a.updateDynamicRam("getOrders",Object(n.c)("stock","getOrders")),m("getOrders"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("getOrders","You must either be in BitNode-8 or have Source-File 8 Level 3.");const t={},r=i.a.Orders;for(const e in r){const a=r[e];if(a.constructor===Array&&a.length>0){t[e]=[];for(let n=0;n"Already purchased 4S Market Data."),!0):e.money"Not enough money to purchase 4S Market Data."),!1):(e.has4SData=!0,e.loseMoney(Object(u.a)(),"stock"),t.log("stock.purchase4SMarketData",()=>"Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){return a.updateDynamicRam("purchase4SMarketDataTixApi",Object(n.c)("stock","purchase4SMarketDataTixApi")),m("purchase4SMarketDataTixApi"),e.has4SDataTixApi?(t.log("stock.purchase4SMarketDataTixApi",()=>"Already purchased 4S Market Data TIX API"),!0):e.money"Not enough money to purchase 4S Market Data TIX API"),!1):(e.has4SDataTixApi=!0,e.loseMoney(Object(u.b)(),"stock"),t.log("stock.purchase4SMarketDataTixApi",()=>"Purchased 4S Market Data TIX API"),!0)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return G}));var n=a(113),r=a(144),i=a(20),o=a(140),s=a(321),l=a(6),c=a(131),u=a(8),m=a(122),h=a(14),p=a(324),d=a(333),f=a(322),g=a(86),y=a(291),b=a(67),E=a(23),k=a(9),v=a(108),_=a(92),w=a(25),S=a(227),C=a(27),x=a(60),O=a(4),M=a(5),T=a(215),R=a(61),A=a(24),P=a(107),N=a(22),I=a(119),F=a(93),D=a(89),j=a(45),B=a(409);function G(e,t,a){const G=function(e,t){if(!Object(o.b)(t))throw a.makeRuntimeErrorMsg(e,`Invalid augmentation: '${t}'`);return i.a[t]},L=function(e,t){if(!Object(A.b)(t))throw a.makeRuntimeErrorMsg(e,"Invalid faction name: '"+t);return A.a[t]},W=function(e,t){const n=R.a[t];if(null==n||!(n instanceof T.a))throw a.makeRuntimeErrorMsg(e,`Invalid company name: '${t}'`);return n},H=function(t=null){if(t&&Object(m.a)(t)){const a=e.getHomeComputer();for(const e of a.scripts)if(e.filename===t){if(e.ramUsage>a.maxRam-a.ramUsed)return;const t=new p.a(e,[]);t.threads=1,Object(r.e)(t,a)}}};return{getOwnedAugmentations:function(t=!1){a.updateDynamicRam("getOwnedAugmentations",Object(h.c)("getOwnedAugmentations")),a.checkSingularityAccess("getOwnedAugmentations",3);const n=[];for(let t=0;t`Faction '${r}' does not have the '${o}' augmentation.`),!1;if(!(c.name===l.a.NeuroFluxGovernor)){for(let a=0;a`You already have the '${o}' augmentation.`),!1;for(let a=0;a`You already have the '${o}' augmentation.`),!1}if(s.playerReputation`You do not have enough reputation with '${s.name}'.`),!1;const d=Object(n.f)(c,s,!0);return t.log("purchaseAugmentation",()=>d),!(!Object(m.a)(d)||!d.startsWith("You purchased"))&&(e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),!0)},softReset:function(e){a.updateDynamicRam("softReset",Object(h.c)("softReset")),a.checkSingularityAccess("softReset",3),t.log("softReset",()=>"Soft resetting. This will cause this script to be killed"),setTimeout(()=>{Object(s.a)(),H(e)},0),t.running=!1,Object(c.a)(t)},installAugmentations:function(n){if(a.updateDynamicRam("installAugmentations",Object(h.c)("installAugmentations")),a.checkSingularityAccess("installAugmentations",3),0===e.queuedAugmentations.length)return t.log("installAugmentations",()=>"You do not have any Augmentations to be installed."),!1;e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("installAugmentations",()=>"Installing Augmentations. This will cause this script to be killed"),setTimeout(()=>{Object(o.d)(),H(n)},0),t.running=!1,Object(c.a)(t)},goToLocation:function(n){a.updateDynamicRam("goToLocation",Object(h.c)("goToLocation")),a.checkSingularityAccess("goToLocation",1);const r=Object.values(S.a).find(e=>e.name===n);return r?e.city!==r.city?(t.log("goToLocation",()=>`No location named ${n} in ${e.city}`),!1):(v.b.toLocation(r),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain/100),!0):(t.log("goToLocation",()=>"No location named "+n),!1)},universityCourse:function(n,r){if(a.updateDynamicRam("universityCourse",Object(h.c)("universityCourse")),a.checkSingularityAccess("universityCourse",1),e.isWorking){const a=e.singularityStopWork();t.log("universityCourse",()=>a)}let i,o;switch(n.toLowerCase()){case k.a.AevumSummitUniversity.toLowerCase():if(e.city!=E.a.Aevum)return t.log("universityCourse",()=>"You cannot study at 'Summit University' because you are not in 'Aevum'."),!1;e.gotoLocation(k.a.AevumSummitUniversity),i=4,o=3;break;case k.a.Sector12RothmanUniversity.toLowerCase():if(e.city!=E.a.Sector12)return t.log("universityCourse",()=>"You cannot study at 'Rothman University' because you are not in 'Sector-12'."),!1;e.location=k.a.Sector12RothmanUniversity,i=3,o=2;break;case k.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(e.city!=E.a.Volhaven)return t.log("universityCourse",()=>"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'."),!1;e.location=k.a.VolhavenZBInstituteOfTechnology,i=5,o=4;break;default:return t.log("universityCourse",()=>`Invalid university name: '${n}'.`),!1}let s="";switch(r.toLowerCase()){case"Study Computer Science".toLowerCase():s=u.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():s=u.a.ClassDataStructures;break;case"Networks".toLowerCase():s=u.a.ClassNetworks;break;case"Algorithms".toLowerCase():s=u.a.ClassAlgorithms;break;case"Management".toLowerCase():s=u.a.ClassManagement;break;case"Leadership".toLowerCase():s=u.a.ClassLeadership;break;default:return t.log("universityCourse",()=>`Invalid class name: ${r}.`),!1}return e.startClass(v.b,i,o,s),t.log("universityCourse",()=>`Started ${s} at ${n}`),!0},gymWorkout:function(n,r){if(a.updateDynamicRam("gymWorkout",Object(h.c)("gymWorkout")),a.checkSingularityAccess("gymWorkout",1),e.isWorking){const a=e.singularityStopWork();t.log("gymWorkout",()=>a)}let i,o;switch(n.toLowerCase()){case k.a.AevumCrushFitnessGym.toLowerCase():if(e.city!=E.a.Aevum)return t.log("gymWorkout",()=>"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."),!1;e.location=k.a.AevumCrushFitnessGym,i=3,o=2;break;case k.a.AevumSnapFitnessGym.toLowerCase():if(e.city!=E.a.Aevum)return t.log("gymWorkout",()=>"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."),!1;e.location=k.a.AevumSnapFitnessGym,i=10,o=5;break;case k.a.Sector12IronGym.toLowerCase():if(e.city!=E.a.Sector12)return t.log("gymWorkout",()=>"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."),!1;e.location=k.a.Sector12IronGym,i=1,o=1;break;case k.a.Sector12PowerhouseGym.toLowerCase():if(e.city!=E.a.Sector12)return t.log("gymWorkout",()=>"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),!1;e.location=k.a.Sector12PowerhouseGym,i=20,o=10;break;case k.a.VolhavenMilleniumFitnessGym.toLowerCase():if(e.city!=E.a.Volhaven)return t.log("gymWorkout",()=>"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'."),!1;e.location=k.a.VolhavenMilleniumFitnessGym,i=7,o=4;break;default:return t.log("gymWorkout",()=>`Invalid gym name: ${n}. gymWorkout() failed`),!1}switch(r.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymAgility);break;default:return t.log("gymWorkout",()=>`Invalid stat: ${r}.`),!1}return t.log("gymWorkout",()=>`Started training ${r} at ${n}`),!0},travelToCity:function(n){switch(a.updateDynamicRam("travelToCity",Object(h.c)("travelToCity")),a.checkSingularityAccess("travelToCity",1),n){case E.a.Aevum:case E.a.Chongqing:case E.a.Sector12:case E.a.NewTokyo:case E.a.Ishima:case E.a.Volhaven:if(e.money"Traveled to "+n),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain/50),!0;default:return t.log("travelToCity",()=>`Invalid city name: '${n}'.`),!1}},purchaseTor:function(){if(a.updateDynamicRam("purchaseTor",Object(h.c)("purchaseTor")),a.checkSingularityAccess("purchaseTor",1),e.hasTorRouter())return t.log("purchaseTor",()=>"You already have a TOR router!"),!1;if(e.money"You cannot afford to purchase a Tor router."),!1;e.loseMoney(u.a.TorRouterCost,"other");const n=Object(I.f)({ip:Object(C.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(C.a)(n),e.getHomeComputer().serversOnNetwork.push(n.hostname),n.serversOnNetwork.push(e.getHomeComputer().hostname),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("purchaseTor",()=>"You have purchased a Tor router!"),!0},purchaseProgram:function(n){if(a.updateDynamicRam("purchaseProgram",Object(h.c)("purchaseProgram")),a.checkSingularityAccess("purchaseProgram",1),!e.hasTorRouter())return t.log("purchaseProgram",()=>"You do not have the TOR router."),!1;n=n.toLowerCase();const r=Object.values(y.a).find(e=>e.program.toLowerCase()===n);return null==r?(t.log("purchaseProgram",()=>`Invalid program name: '${n}.`),!1):e.money`Not enough money to purchase '${r.program}'. Need ${O.a.formatMoney(r.price)}`),!1):e.hasProgram(r.program)?(t.log("purchaseProgram",()=>`You already have the '${r.program}' program`),!0):(e.loseMoney(r.price,"other"),e.getHomeComputer().programs.push(r.program),t.log("purchaseProgram",()=>`You have purchased the '${r.program}' program. The new program can be found on your home computer.`),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain/50),!0)},getCurrentServer:function(){return a.updateDynamicRam("getCurrentServer",Object(h.c)("getCurrentServer")),a.checkSingularityAccess("getCurrentServer",1),e.getCurrentServer().hostname},connect:function(t){if(a.updateDynamicRam("connect",Object(h.c)("connect")),a.checkSingularityAccess("connect",1),!t)throw a.makeRuntimeErrorMsg("connect",`Invalid hostname: '${t}'`);const n=Object(C.d)(t);if(null==n)throw a.makeRuntimeErrorMsg("connect",`Invalid hostname: '${t}'`);if("home"===t)return e.getCurrentServer().isConnectedTo=!1,e.currentServer=e.getHomeComputer().hostname,e.getCurrentServer().isConnectedTo=!0,F.a.setcwd("/"),!0;const r=e.getCurrentServer();for(let a=0;a"cannot backdoor this kind of server"),Promise.resolve();const r=n,i=Object(D.d)(r,e)/4*1e3,o=Object(B.b)(r,e);if(!o.res)throw a.makeRuntimeErrorMsg("installBackdoor",o.msg||"");return t.log("installBackdoor",()=>`Installing backdoor on '${r.hostname}' in ${Object(N.b)(i,!0)}`),Object(P.c)(i,t).then((function(){return t.env.stopFlag?Promise.reject(t):(t.log("installBackdoor",()=>`Successfully installed backdoor on '${r.hostname}'`),r.backdoorInstalled=!0,_.a.WorldDaemon===r.hostname&&v.b.toBitVerse(!1,!1),Promise.resolve())}))},getStats:function(){return a.updateDynamicRam("getStats",Object(h.c)("getStats")),a.checkSingularityAccess("getStats",1),t.log("getStats",()=>"getStats is deprecated, please use getplayer"),{hacking:e.hacking,strength:e.strength,defense:e.defense,dexterity:e.dexterity,agility:e.agility,charisma:e.charisma,intelligence:e.intelligence}},getCharacterInformation:function(){return a.updateDynamicRam("getCharacterInformation",Object(h.c)("getCharacterInformation")),a.checkSingularityAccess("getCharacterInformation",1),t.log("getCharacterInformation",()=>"getCharacterInformation is deprecated, please use getplayer"),{bitnode:e.bitNodeN,city:e.city,factions:e.factions.slice(),hp:e.hp,jobs:Object.keys(e.jobs),jobTitles:Object.values(e.jobs),maxHp:e.max_hp,mult:{agility:e.agility_mult,agilityExp:e.agility_exp_mult,companyRep:e.company_rep_mult,crimeMoney:e.crime_money_mult,crimeSuccess:e.crime_success_mult,defense:e.defense_mult,defenseExp:e.defense_exp_mult,dexterity:e.dexterity_mult,dexterityExp:e.dexterity_exp_mult,factionRep:e.faction_rep_mult,hacking:e.hacking_mult,hackingExp:e.hacking_exp_mult,strength:e.strength_mult,strengthExp:e.strength_exp_mult,workMoney:e.work_money_mult},timeWorked:e.timeWorked,tor:e.hasTorRouter(),workHackExpGain:e.workHackExpGained,workStrExpGain:e.workStrExpGained,workDefExpGain:e.workDefExpGained,workDexExpGain:e.workDexExpGained,workAgiExpGain:e.workAgiExpGained,workChaExpGain:e.workChaExpGained,workRepGain:e.workRepGained,workMoneyGain:e.workMoneyGained,hackingExp:e.hacking_exp,strengthExp:e.strength_exp,defenseExp:e.defense_exp,dexterityExp:e.dexterity_exp,agilityExp:e.agility_exp,charismaExp:e.charisma_exp}},hospitalize:function(){if(a.updateDynamicRam("hospitalize",Object(h.c)("hospitalize")),a.checkSingularityAccess("hospitalize",1),!e.isWorking&&v.b.page()!==w.a.Infiltration&&v.b.page()!==w.a.BitVerse)return e.hospitalize();t.log("hospitalize",()=>"Cannot go to the hospital because the player is busy.")},isBusy:function(){return a.updateDynamicRam("isBusy",Object(h.c)("isBusy")),a.checkSingularityAccess("isBusy",1),e.isWorking||v.b.page()===w.a.Infiltration||v.b.page()===w.a.BitVerse},stopAction:function(){if(a.updateDynamicRam("stopAction",Object(h.c)("stopAction")),a.checkSingularityAccess("stopAction",1),e.isWorking){v.b.toTerminal();const a=e.singularityStopWork();return t.log("stopAction",()=>a),!0}return!1},upgradeHomeCores:function(){a.updateDynamicRam("upgradeHomeCores",Object(h.c)("upgradeHomeCores")),a.checkSingularityAccess("upgradeHomeCores",2);const n=e.getHomeComputer();if(n.cpuCores>=8)return t.log("upgradeHomeCores",()=>"Your home computer is at max cores."),!1;const r=e.getUpgradeHomeCoresCost();return e.money"You don't have enough money. Need "+O.a.formatMoney(r)),!1):(n.cpuCores+=1,e.loseMoney(r,"servers"),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeCores",()=>`Purchased an additional core for home computer! It now has ${n.cpuCores} cores.`),!0)},getUpgradeHomeCoresCost:function(){return a.updateDynamicRam("getUpgradeHomeCoresCost",Object(h.c)("getUpgradeHomeCoresCost")),a.checkSingularityAccess("getUpgradeHomeCoresCost",2),e.getUpgradeHomeCoresCost()},upgradeHomeRam:function(){a.updateDynamicRam("upgradeHomeRam",Object(h.c)("upgradeHomeRam")),a.checkSingularityAccess("upgradeHomeRam",2);const n=e.getHomeComputer();if(n.maxRam>=u.a.HomeComputerMaxRam)return t.log("upgradeHomeRam",()=>"Your home computer is at max RAM."),!1;const r=e.getUpgradeHomeRamCost();return e.money"You don't have enough money. Need "+O.a.formatMoney(r)),!1):(n.maxRam*=2,e.loseMoney(r,"servers"),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeRam",()=>`Purchased additional RAM for home computer! It now has ${O.a.formatRAM(n.maxRam)} of RAM.`),!0)},getUpgradeHomeRamCost:function(){return a.updateDynamicRam("getUpgradeHomeRamCost",Object(h.c)("getUpgradeHomeRamCost")),a.checkSingularityAccess("getUpgradeHomeRamCost",2),e.getUpgradeHomeRamCost()},workForCompany:function(n){if(a.updateDynamicRam("workForCompany",Object(h.c)("workForCompany")),a.checkSingularityAccess("workForCompany",2),null==n&&(n=e.companyName),null==n||""===n||!(R.a[n]instanceof T.a))return t.log("workForCompany",()=>`Invalid company: '${n}'`),!1;if(!Object.keys(e.jobs).includes(n))return t.log("workForCompany",()=>`You do not have a job at '${n}'`),!1;const r=e.jobs[n],i=g.a[r];if(""===r||!(i instanceof f.a))return t.log("workForCompany",()=>"You do not have a job"),!1;if(e.isWorking){const a=e.singularityStopWork();t.log("workForCompany",()=>a)}return i.isPartTimeJob()?e.startWorkPartTime(v.b,n):e.startWork(v.b,n),t.log("workForCompany",()=>`Began working at '${e.companyName}' as a '${r}'`),!0},applyToCompany:function(n,r){let i;switch(a.updateDynamicRam("applyToCompany",Object(h.c)("applyToCompany")),a.checkSingularityAccess("applyToCompany",2),W("applyToCompany",n),e.location=n,r.toLowerCase()){case"software":i=e.applyForSoftwareJob(!0);break;case"software consultant":i=e.applyForSoftwareConsultantJob(!0);break;case"it":i=e.applyForItJob(!0);break;case"security engineer":i=e.applyForSecurityEngineerJob(!0);break;case"network engineer":i=e.applyForNetworkEngineerJob(!0);break;case"business":i=e.applyForBusinessJob(!0);break;case"business consultant":i=e.applyForBusinessConsultantJob(!0);break;case"security":i=e.applyForSecurityJob(!0);break;case"agent":i=e.applyForAgentJob(!0);break;case"employee":i=e.applyForEmployeeJob(!0);break;case"part-time employee":i=e.applyForPartTimeEmployeeJob(!0);break;case"waiter":i=e.applyForWaiterJob(!0);break;case"part-time waiter":i=e.applyForPartTimeWaiterJob(!0);break;default:return t.log("applyToCompany",()=>`Invalid job: '${r}'.`),!1}return i?t.log("applyToCompany",()=>`You were offered a new job at '${n}' as a '${e.jobs[n]}'`):t.log("applyToCompany",()=>`You failed to get a new job/promotion at '${n}' in the '${r}' field.`),i},getCompanyRep:function(e){a.updateDynamicRam("getCompanyRep",Object(h.c)("getCompanyRep")),a.checkSingularityAccess("getCompanyRep",2);return W("getCompanyRep",e).playerReputation},getCompanyFavor:function(e){a.updateDynamicRam("getCompanyFavor",Object(h.c)("getCompanyFavor")),a.checkSingularityAccess("getCompanyFavor",2);return W("getCompanyFavor",e).favor},getCompanyFavorGain:function(e){a.updateDynamicRam("getCompanyFavorGain",Object(h.c)("getCompanyFavorGain")),a.checkSingularityAccess("getCompanyFavorGain",2);return W("getCompanyFavorGain",e).getFavorGain()},checkFactionInvitations:function(){return a.updateDynamicRam("checkFactionInvitations",Object(h.c)("checkFactionInvitations")),a.checkSingularityAccess("checkFactionInvitations",2),e.factionInvitations.slice()},joinFaction:function(r){if(a.updateDynamicRam("joinFaction",Object(h.c)("joinFaction")),a.checkSingularityAccess("joinFaction",2),L("joinFaction",r),!e.factionInvitations.includes(r))return t.log("joinFaction",()=>`You have not been invited by faction '${r}'`),!1;const i=A.a[r];Object(n.d)(i);for(let t=0;t`Joined the '${r}' faction.`),!0},workForFaction:function(n,r){if(a.updateDynamicRam("workForFaction",Object(h.c)("workForFaction")),a.checkSingularityAccess("workForFaction",2),L("workForFaction",n),e.inGang()&&void 0!==b.a[n])return t.log("workForFaction",()=>`Faction '${n}' does not offer work at the moment.`),!1;if(!e.factions.includes(n))return t.log("workForFaction",()=>`You are not a member of '${n}'`),!1;if(e.isWorking){const a=e.singularityStopWork();t.log("workForFaction",()=>a)}const i=A.a[n],o=["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"],s=["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Tetrads","Slum Snakes"],l=["ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Syndicate","Tetrads","Slum Snakes","Tian Di Hui"];switch(r.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return o.includes(i.name)?(e.startFactionHackWork(v.b,i),t.log("workForFaction",()=>`Started carrying out hacking contracts for '${i.name}'`),!0):(t.log("workForFaction",()=>`Faction '${i.name}' do not need help with hacking contracts.`),!1);case"field":case"fieldwork":case"field work":return s.includes(i.name)?(e.startFactionFieldWork(v.b,i),t.log("workForFaction",()=>`Started carrying out field missions for '${i.name}'`),!0):(t.log("workForFaction",()=>`Faction '${i.name}' do not need help with field missions.`),!1);case"security":case"securitywork":case"security work":return l.includes(i.name)?(e.startFactionSecurityWork(v.b,i),t.log("workForFaction",()=>`Started carrying out security work for '${i.name}'`),!0):(t.log("workForFaction",()=>`Faction '${i.name}' do not need help with security work.`),!1);default:t.log("workForFaction",()=>"Invalid work type: '"+r)}return!0},getFactionRep:function(e){a.updateDynamicRam("getFactionRep",Object(h.c)("getFactionRep")),a.checkSingularityAccess("getFactionRep",2);return L("getFactionRep",e).playerReputation},getFactionFavor:function(e){a.updateDynamicRam("getFactionFavor",Object(h.c)("getFactionFavor")),a.checkSingularityAccess("getFactionFavor",2);return L("getFactionFavor",e).favor},getFactionFavorGain:function(e){a.updateDynamicRam("getFactionFavorGain",Object(h.c)("getFactionFavorGain")),a.checkSingularityAccess("getFactionFavorGain",2);return L("getFactionFavorGain",e).getFavorGain()},donateToFaction:function(n,r){a.updateDynamicRam("donateToFaction",Object(h.c)("donateToFaction")),a.checkSingularityAccess("donateToFaction",3);const i=L("donateToFaction",n);if("number"!=typeof r||r<=0)return t.log("donateToFaction",()=>`Invalid donation amount: '${r}'.`),!1;if(e.money`You do not have enough money to donate ${O.a.formatMoney(r)} to '${n}'`),!1;const o=Math.round(u.a.BaseFavorToDonate*M.a.RepToDonateToFaction);if(i.favor`You do not have enough favor to donate to this faction. Have ${i.favor}, need ${o}`),!1;const s=r/u.a.DonateMoneyToRepDivisor*e.faction_rep_mult;return i.playerReputation+=s,e.loseMoney(r,"other"),t.log("donateToFaction",()=>`${O.a.formatMoney(r)} donated to '${n}' for ${O.a.formatReputation(s)} reputation`),!0},createProgram:function(n){if(a.updateDynamicRam("createProgram",Object(h.c)("createProgram")),a.checkSingularityAccess("createProgram",3),e.isWorking){const a=e.singularityStopWork();t.log("createProgram",()=>a)}n=n.toLowerCase();const r=Object.values(x.a).find(e=>e.name.toLowerCase()===n);if(null==r)return t.log("createProgram",()=>"The specified program does not exist: '"+n),!1;if(e.hasProgram(r.name))return t.log("createProgram",()=>`You already have the '${r.name}' program`),!1;const i=r.create;return null===i?(t.log("createProgram",()=>`You cannot create the '${r.name}' program`),!1):i.req(e)?(e.startCreateProgramWork(v.b,r.name,i.time,i.level),t.log("createProgram",()=>`Began creating program: '${n}'`),!0):(t.log("createProgram",()=>`Hacking level is too low to create '${r.name}' (level ${i.level} req)`),!1)},commitCrime:function(n){if(a.updateDynamicRam("commitCrime",Object(h.c)("commitCrime")),a.checkSingularityAccess("commitCrime",3),e.isWorking){const a=e.singularityStopWork();t.log("commitCrime",()=>a)}e.gotoLocation(k.a.Slums);const r=Object(d.b)(n.toLowerCase());if(null==r)throw a.makeRuntimeErrorMsg("commitCrime",`Invalid crime: '${n}'`);return t.log("commitCrime",()=>`Attempting to commit ${r.name}...`),r.commit(v.b,e,1,t)},getCrimeChance:function(t){a.updateDynamicRam("getCrimeChance",Object(h.c)("getCrimeChance")),a.checkSingularityAccess("getCrimeChance",3);const n=Object(d.b)(t.toLowerCase());if(null==n)throw a.makeRuntimeErrorMsg("getCrimeChance","Invalid crime: "+t);return n.successRate(e)},getCrimeStats:function(e){a.updateDynamicRam("getCrimeStats",Object(h.c)("getCrimeStats")),a.checkSingularityAccess("getCrimeStats",3);const t=Object(d.b)(e.toLowerCase());if(null==t)throw a.makeRuntimeErrorMsg("getCrimeStats","Invalid crime: "+e);return Object.assign({},t)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(28);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 u}));var n=a(2),r=a(284),i=a(27);const o=[["getHackTime","returns milliseconds"],["getGrowTime","returns milliseconds"],["getWeakenTime","returns milliseconds"],["getActionTime","returns milliseconds"],["hackAnalyzePercent","renamed 'hackAnalyze' and returns decimal"],["hackChance","renamed 'hackAnalyzeChance'"],["basic.calculateSkill","renamed 'skills.calculateSkill'"],["basic.calculateExp","renamed 'skills.calculateExp'"],["basic.hackChance","renamed 'hacking.hackChance'"],["basic.hackExp","renamed 'hacking.hackExp'"],["basic.hackPercent","renamed 'hacking.hackPercent'"],["basic.growPercent","renamed 'hacking.growPercent'"],["basic.hackTime","renamed 'hacking.hackTime'"],["basic.growTime","renamed 'hacking.growTime'"],["basic.weakenTime","renamed 'hacking.weakenTime'"],["write","needs to be awaited"],["scp","needs to be awaited"],["sleep","Can no longer be called simultenaously."],["hacking_skill","renamed 'hacking'"],["tryWrite","renamed 'tryWritePort'"]],s=[[/ns.getHackTime/g,"((...a)=>ns.getHackTime(...a)/1000)"],[/ns.getGrowTime/g,"((...a)=>ns.getGrowTime(...a)/1000)"],[/ns.getWeakenTime/g,"((...a)=>ns.getWeakenTime(...a)/1000)"],[/ns.bladeburner.getActionTime/g,"((...a)=>ns.bladeburner.getActionTime(...a)/1000)"],[/ns.hackAnalyzePercent/g,"((...a)=>ns.hackAnalyze(...a)*100)"],[/ns.hackChance/g,"ns.hackAnalyzeChance"],[/ns.tryWrite/g,"ns.tryWritePort"],[/formulas.basic.calculateSkill/g,"formulas.skills.calculateSkill"],[/formulas.basic.calculateExp/g,"formulas.skills.calculateExp"],[/formulas.basic.hackChance/g,"formulas.hacking.hackChance"],[/formulas.basic.hackExp/g,"formulas.hacking.hackExp"],[/formulas.basic.hackPercent/g,"formulas.hacking.hackPercent"],[/formulas.basic.growPercent/g,"formulas.hacking.growPercent"],[/formulas.basic.hackTime/g,"formulas.hacking.hackTime"],[/formulas.basic.growTime/g,"formulas.hacking.growTime"],[/formulas.basic.weakenTime/g,"formulas.hacking.weakenTime"]];function l(e){for(const t of s)if(e.match(t[0]))return!0;return!1}function c(e){const t=e.split("\n"),a=[];for(let e=0;eObject(T.a)({textfield:{borderBottom:"1px solid "+e.palette.primary.main},code:{whiteSpace:"pre",backgroundColor:e.palette.background.paper}}));function P(){const e=A(),t={[R.f.Start]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...",r.a.createElement("br",null),r.a.createElement("br",null),"This tutorial will show you the basics of the game. You may skip the tutorial at any time.")),canNext:!0},[R.f.GoToCharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's start by heading to the Stats page. Click"),r.a.createElement(f.a,null,r.a.createElement(y.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Stats")),r.a.createElement(o.a,null,"on the main navigation menu (left-hand side of the screen)")),canNext:!1},[R.f.CharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,r.a.createElement(y.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Stats")),r.a.createElement(o.a,null,"shows a lot of important information about your progress, such as your skills, money, and bonuses.")),canNext:!0},[R.f.CharacterGoToTerminalPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's head to your computer's terminal by clicking"),r.a.createElement(f.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal")),r.a.createElement(o.a,null,"on the main navigation menu.")),canNext:!1},[R.f.TerminalIntro]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,r.a.createElement(E.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Terminal")),r.a.createElement(o.a,null,"is used to interface with your home computer as well as all of the other machines around the world.")),canNext:!0},[R.f.TerminalHelp]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's try it out. Start by entering"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"(Don't forget to press Enter after typing the command)")),canNext:!1},[R.f.TerminalLs]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"displays a list of all available Terminal commands, how to use them, and a description of what they do."," ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's try another command. Enter"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> ls")),canNext:!1},[R.f.TerminalScan]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> ls"),r.a.createElement(o.a,null," ","is a basic command that shows files on the computer. Right now, it shows that you have a program called"," ","NUKE.exe on your computer. We'll get to what this does later. ",r.a.createElement("br",null),r.a.createElement("br",null),"Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan")),canNext:!1},[R.f.TerminalScanAnalyze1]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan"),r.a.createElement(o.a,null,"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"That's great and all, but there's so many servers. Which one should you go to?"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"gives some more detailed information about servers on the network. Try it now!")),canNext:!1},[R.f.TerminalScanAnalyze2]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"shows more detailed information about each server that you can connect to (servers that are a distance of one node away). ",r.a.createElement("br",null),r.a.createElement("br",null)," It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the following command:"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze 2")),canNext:!1},[R.f.TerminalConnect]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> connect hostname"),r.a.createElement(o.a,null,"From the results of "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze 2"),r.a.createElement(o.a,null," ","we can see that the n00dles server is only one node away. Let's connect so it now using:"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> connect n00dles")),canNext:!1},[R.f.TerminalAnalyze]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You are now connected to another machine! What can you do now? You can hack it!",r.a.createElement("br",null),r.a.createElement("br",null)," 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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Before you try to hack a server, you should run diagnostics using"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> analyze")),canNext:!1},[R.f.TerminalNuke]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"When "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null,"finishes running it will show useful information about hacking the server. ",r.a.createElement("br",null),r.a.createElement("br",null)," For this server, the required hacking skill is only 1, which means you can hack it right now. However, in order to hack a server you must first gain root access. The NUKE.exe 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."),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null," ","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"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> run NUKE.exe"),r.a.createElement(o.a,null)),canNext:!0},[R.f.TerminalManualHack]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You now have root access! You can hack the server using "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> hack"),r.a.createElement(o.a,null," Try doing that now.")),canNext:!0},[R.f.TerminalHackingMechanics]:{content:r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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. You will need to use"," ",r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> grow"),"and ",r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> weaken")),canNext:!0},[R.f.TerminalGoHome]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"From any server you can get back home using"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> home"),r.a.createElement(o.a,null,"Let's head home before creating our first script!")),canNext:!0},[R.f.TerminalCreateScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"To create a new script or edit an existing one, you can use"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> nano"),r.a.createElement(o.a,null,"Scripts must end with the .script extension. Let's make a script now by entering "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> nano n00dles.script"),r.a.createElement(o.a,null,"after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)")),canNext:!1},[R.f.TerminalTypeScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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: ",r.a.createElement("br",null)),r.a.createElement(o.a,{classes:{root:e.code}},r.a.createElement(d.a,{value:"while(true) {\n hack('n00dles');\n}"})),r.a.createElement(o.a,null,"For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the n00dles server.",r.a.createElement("br",null),r.a.createElement("br",null),"If you're an intermediate programmer you should use ns2 instead. It is much faster and offers more possibilities.",r.a.createElement("br",null),r.a.createElement("br",null),"To save and close the script editor, press the button in the bottom left, or press ctrl + b.")),canNext:!1},[R.f.TerminalFree]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"To check how much RAM is available on this machine, enter"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> free")),canNext:!1},[R.f.TerminalRunScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> run n00dles.script")),canNext:!1},[R.f.TerminalGoToActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Your script is now running! It will continuously run in the background and will automatically stop if the code ever completes (the n00dles.script will never complete because it runs an infinite loop). ",r.a.createElement("br",null),r.a.createElement("br",null),"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's check out some statistics for our running scripts by clicking"," "),r.a.createElement(f.a,null,r.a.createElement(C.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Active Scripts"))),canNext:!1},[R.f.ActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(f.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal"))),canNext:!1},[R.f.ActiveScriptsToTerminal]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the tail command. Do that now for the script we just ran by typing"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> tail n00dles.script")),canNext:!1},[R.f.TerminalTailScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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! ",r.a.createElement("br",null),r.a.createElement("br",null),"This covers the basics of hacking. To learn more about writing scripts, select"),r.a.createElement(f.a,null,r.a.createElement(v.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Tutorial")),r.a.createElement(o.a,null,"in the main navigation menu to look at the documentation. 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.",r.a.createElement("br",null),r.a.createElement("br",null),"For now, let's move on to something else!")),canNext:!0},[R.f.GoToHacknetNodesPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(f.a,null,r.a.createElement(w.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Hacknet")),r.a.createElement(o.a,null,"through the main navigation menu now.")),canNext:!0},[R.f.HacknetNodesIntroduction]:{content:r.a.createElement(o.a,null,"Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),canNext:!0},[R.f.HacknetNodesGoToWorldPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Let's go to"),r.a.createElement(f.a,null,r.a.createElement(O.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"City"))),canNext:!0},[R.f.WorldDescription]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"Lastly, click on"),r.a.createElement(f.a,null,r.a.createElement(v.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Tutorial"))),canNext:!0},[R.f.TutorialPageInfo]:{content:r.a.createElement(o.a,null,"This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the tutorial. Hope you enjoy the game!"),canNext:!0},[R.f.End]:{content:r.a.createElement(o.a,null),canNext:!0}},a=Object(n.useState)(!1)[1];function c(){a(e=>!e)}Object(n.useEffect)(()=>p.a.subscribe(c),[]);const m=R.a.currStep,g=t[m];if(void 0===g)throw new Error("error in the tutorial");return r.a.createElement(i.a,{square:!0,sx:{maxWidth:"70vw",p:2}},g.content,m!==R.f.TutorialPageInfo&&r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{onClick:R.d,"aria-label":"previous"},r.a.createElement(h.a,null)),g.canNext&&r.a.createElement(s.a,{onClick:R.c,"aria-label":"next"},r.a.createElement(u.a,null))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:R.b},m!==R.f.TutorialPageInfo?"SKIP TUTORIAL":"FINISH TUTORIAL"))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(126),o=a(189),s=a(1313),l=a(73),c=a(816),u=a.n(c),m=a(817),h=a.n(m),p=a(29),d=a(25);const f=Object(i.a)({visibilityToggle:{backgroundColor:"transparent",position:"absolute",top:"100%",right:0},overviewContainer:{position:"fixed",top:0,right:0,zIndex:1500,display:"flex",justifyContent:"flex-end",flexDirection:"column"}});function g({children:e}){const[t,a]=Object(n.useState)(!0),i=f(),c=p.b.Router();if(c.page()===d.a.BitVerse||c.page()===d.a.Loading||c.page()===d.a.Recovery)return r.a.createElement(r.a.Fragment,null);let m;return m=t?r.a.createElement(u.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"}),r.a.createElement(l.a,{square:!0,classes:{root:i.overviewContainer}},r.a.createElement(o.a,{in:t},e),r.a.createElement(s.a,{size:"small",classes:{root:i.visibilityToggle},onClick:()=>a(e=>!e)},m))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return Ie}));var n=a(0),r=a.n(n),i=a(12),o=a(17),s=a(154),l=a(126),c=a(1314),u=a(274),m=a(585),h=a(823),p=a.n(h),d=a(822),f=a.n(d),g=a(66),y=a(133),b=a(97),E=a(1),k=a(189),v=a(654),_=a(824),w=a.n(_),S=a(312),C=a.n(S),x=a(825),O=a.n(x),M=a(515),T=a.n(M),R=a(826),A=a.n(R),P=a(448),N=a.n(P),I=a(829),F=a.n(I),D=a(519),j=a.n(D),B=a(516),G=a.n(B),L=a(830),W=a.n(L),H=a(517),U=a.n(H),q=a(832),K=a.n(q),z=a(833),$=a.n(z),Y=a(834),V=a.n(Y),J=a(835),X=a.n(J),Q=a(836),Z=a.n(Q),ee=a(837),te=a.n(ee),ae=a(366),ne=a.n(ae),re=a(265),ie=a.n(re),oe=a(520),se=a.n(oe),le=a(827),ce=a.n(le),ue=a(828),me=a.n(ue),he=a(831),pe=a.n(he),de=a(838),fe=a.n(de),ge=a(134),ye=a.n(ge),be=a(70),Ee=a.n(be),ke=a(25),ve=a(8),_e=a(40),we=a(449),Se=a(13),Ce=a(267),xe=a(6),Oe=a(96),Me=a(358),Te=a(359);const Re=e=>({width:e.spacing(31),transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Ae=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${e.spacing(2)} + 1px)`,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(7)} + 1px)`}}),Pe=Object(o.a)(c.a,{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>({width:e.spacing(31),whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...Re(e),"& .MuiDrawer-paper":Re(e)},...!t&&{...Ae(e),"& .MuiDrawer-paper":Ae(e)}})),Ne=Object(l.a)(e=>Object(s.a)({active:{borderLeft:"3px solid "+e.palette.primary.main},listitem:{}}));function Ie(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const[o,s]=Object(n.useState)(!0),[l,c]=Object(n.useState)(!0),[h,d]=Object(n.useState)(!0),[_,S]=Object(n.useState)(!0),x=_e.a.currStep===_e.f.CharacterGoToTerminalPage||_e.a.currStep===_e.f.ActiveScriptsPage,M=_e.a.currStep===_e.f.GoToCharacterPage,R=_e.a.currStep===_e.f.TerminalGoToActiveScriptsPage,P=_e.a.currStep===_e.f.GoToHacknetNodesPage,I=_e.a.currStep===_e.f.HacknetNodesGoToWorldPage,D=_e.a.currStep===_e.f.WorldDescription,B=e.player.queuedAugmentations.length,L=e.player.factionInvitations.filter(e=>!Te.b.includes(e)).length,H=Object(we.a)(e.player).length-Me.b.length,q=Object(we.a)(e.player).length>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,z=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,Y=e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,J=e.player.sleeves.length>0,Q=!!e.player.corporation,ee=!!e.player.gang,ae=""!==e.player.companyName,re=e.player.hasWseAccount,oe=!!e.player.bladeburner,le=e.player.augmentations.some(e=>e.name===xe.a.StaneksGift1);function ue(){e.router.toTerminal(),x&&Object(_e.c)()}function he(){e.router.toScriptEditor()}function de(){e.router.toStats(),M&&Object(_e.c)()}function ge(){e.router.toActiveScripts(),R&&Object(_e.c)()}function be(){e.router.toCreateProgram()}function Re(){e.router.toFactions()}function Ae(){e.router.toAugmentations()}function Ie(){e.router.toHacknetNodes(),P&&Object(_e.c)()}function Fe(){e.router.toCity(),I&&Object(_e.c)()}function De(){e.router.toTravel()}function je(){e.router.toJob()}function Be(){e.router.toBladeburner()}function Ge(){e.router.toGang()}function Le(){e.router.toTutorial(),D&&Object(_e.c)()}Object(n.useEffect)(()=>{function t(t){if(!Se.a.DisableHotkeys&&!e.player.isWorking&&!Ce.b)if(t.keyCode==Oe.a.T&&t.altKey)t.preventDefault(),ue();else if(t.keyCode===Oe.a.C&&t.altKey)t.preventDefault(),de();else if(t.keyCode===Oe.a.E&&t.altKey)t.preventDefault(),he();else if(t.keyCode===Oe.a.S&&t.altKey)t.preventDefault(),ge();else if(t.keyCode===Oe.a.H&&t.altKey)t.preventDefault(),Ie();else if(t.keyCode===Oe.a.W&&t.altKey)t.preventDefault(),Fe();else if(t.keyCode===Oe.a.J&&t.altKey)t.preventDefault(),je();else if(t.keyCode===Oe.a.R&&t.altKey)t.preventDefault(),De();else if(t.keyCode===Oe.a.P&&t.altKey)t.preventDefault(),be();else if(t.keyCode===Oe.a.F&&t.altKey){if(e.page==ke.a.Terminal&&Se.a.EnableBashHotkeys)return;t.preventDefault(),Re()}else t.keyCode===Oe.a.A&&t.altKey?(t.preventDefault(),Ae()):t.keyCode===Oe.a.U&&t.altKey?(t.preventDefault(),Le()):t.keyCode===Oe.a.B&&t.altKey?(t.preventDefault(),Be()):t.keyCode===Oe.a.G&&t.altKey&&(t.preventDefault(),Ge())}return document.addEventListener("keypress",t),()=>document.removeEventListener("keypress",t)},[]);const We=Ne(),[He,Ue]=Object(n.useState)(!0);return r.a.createElement(Pe,{open:He,anchor:"left",variant:"permanent"},r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>Ue(e=>!e)},r.a.createElement(y.a,null,He?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(f.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Bitburner v",ve.a.VersionString)})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>s(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Hacking")}),o?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:o,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Terminal",className:Object(i.default)({[We.active]:e.page===ke.a.Terminal}),onClick:ue},r.a.createElement(y.a,null,r.a.createElement(C.a,{color:x?"error":e.page!==ke.a.Terminal?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:x?"error":e.page!==ke.a.Terminal?"secondary":"primary"},"Terminal"))),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Script Editor",className:Object(i.default)({[We.active]:e.page===ke.a.ScriptEditor}),onClick:he},r.a.createElement(y.a,null,r.a.createElement(O.a,{color:e.page!==ke.a.ScriptEditor?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.ScriptEditor?"secondary":"primary"},"Script Editor"))),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Active Scripts",className:Object(i.default)({[We.active]:e.page===ke.a.ActiveScripts}),onClick:ge},r.a.createElement(y.a,null,r.a.createElement(T.a,{color:R?"error":e.page!==ke.a.ActiveScripts?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:R?"error":e.page!==ke.a.ActiveScripts?"secondary":"primary"},"Active Scripts"))),q&&r.a.createElement(g.a,{button:!0,key:"Create Program",className:Object(i.default)({[We.active]:e.page===ke.a.CreateProgram}),onClick:be},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:H>0?H:void 0,color:"error"},r.a.createElement(A.a,{color:e.page!==ke.a.CreateProgram?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.CreateProgram?"secondary":"primary"},"Create Program"))),le&&r.a.createElement(g.a,{button:!0,key:"Staneks Gift",className:Object(i.default)({[We.active]:e.page===ke.a.StaneksGift}),onClick:function(){e.router.toStaneksGift()}},r.a.createElement(y.a,null,r.a.createElement(ce.a,{color:e.page!==ke.a.StaneksGift?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.StaneksGift?"secondary":"primary"},"Stanek's Gift"))))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>c(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(me.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Character")}),l?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:l,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Stats",className:Object(i.default)({[We.active]:e.page===ke.a.Stats}),onClick:de},r.a.createElement(y.a,null,r.a.createElement(N.a,{color:M?"error":e.page!==ke.a.Stats?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:M?"error":e.page!==ke.a.Stats?"secondary":"primary"},"Stats"))),z&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Factions",className:Object(i.default)({[We.active]:[ke.a.Factions,ke.a.Faction].includes(e.page)}),onClick:Re},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==L?L:void 0,color:"error"},r.a.createElement(F.a,{color:[ke.a.Factions,ke.a.Faction].includes(e.page)?"primary":"secondary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:[ke.a.Factions,ke.a.Faction].includes(e.page)?"primary":"secondary"},"Factions"))),Y&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Augmentations",className:Object(i.default)({[We.active]:e.page===ke.a.Augmentations}),onClick:Ae},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==B?B:void 0,color:"error"},r.a.createElement(j.a,{style:{transform:"rotate(-90deg)"},color:e.page!==ke.a.Augmentations?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Augmentations?"secondary":"primary"},"Augmentations"))),r.a.createElement(g.a,{button:!0,key:"Hacknet",className:Object(i.default)({[We.active]:e.page===ke.a.Hacknet}),onClick:Ie},r.a.createElement(y.a,null,r.a.createElement(G.a,{color:P?"error":e.page!==ke.a.Hacknet?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:P?"error":e.page!==ke.a.Hacknet?"secondary":"primary"},"Hacknet"))),J&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Sleeves",className:Object(i.default)({[We.active]:e.page===ke.a.Sleeves}),onClick:function(){e.router.toSleeves()}},r.a.createElement(y.a,null,r.a.createElement(W.a,{color:e.page!==ke.a.Sleeves?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Sleeves?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>d(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(pe.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"World")}),h?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:h,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"City",className:Object(i.default)({[We.active]:e.page===ke.a.City||e.page===ke.a.Resleeves||e.page===ke.a.Location}),onClick:Fe},r.a.createElement(y.a,null,r.a.createElement(U.a,{color:I?"error":e.page!==ke.a.City?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:I?"error":e.page!==ke.a.City?"secondary":"primary"},"City"))),r.a.createElement(g.a,{button:!0,key:"Travel",className:Object(i.default)({[We.active]:e.page===ke.a.Travel}),onClick:De},r.a.createElement(y.a,null,r.a.createElement(K.a,{color:e.page!==ke.a.Travel?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Travel?"secondary":"primary"},"Travel"))),ae&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Job",className:Object(i.default)({[We.active]:e.page===ke.a.Job}),onClick:je},r.a.createElement(y.a,null,r.a.createElement($.a,{color:e.page!==ke.a.Job?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Job?"secondary":"primary"},"Job"))),re&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Stock Market",className:Object(i.default)({[We.active]:e.page===ke.a.StockMarket}),onClick:function(){e.router.toStockMarket()}},r.a.createElement(y.a,null,r.a.createElement(V.a,{color:e.page!==ke.a.StockMarket?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.StockMarket?"secondary":"primary"},"Stock Market"))),oe&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Bladeburner",className:Object(i.default)({[We.active]:e.page===ke.a.Bladeburner}),onClick:Be},r.a.createElement(y.a,null,r.a.createElement(X.a,{color:e.page!==ke.a.Bladeburner?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Bladeburner?"secondary":"primary"},"Bladeburner"))),Q&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Corp",className:Object(i.default)({[We.active]:e.page===ke.a.Corporation}),onClick:function(){e.router.toCorporation()}},r.a.createElement(y.a,null,r.a.createElement(Z.a,{color:e.page!==ke.a.Corporation?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Corporation?"secondary":"primary"},"Corp"))),ee&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Gang",className:Object(i.default)({[We.active]:e.page===ke.a.Gang}),onClick:Ge},r.a.createElement(y.a,null,r.a.createElement(te.a,{color:e.page!==ke.a.Gang?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Gang?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>S(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(fe.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Help")}),_?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:_,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Milestones",className:Object(i.default)({[We.active]:e.page===ke.a.Milestones}),onClick:function(){e.router.toMilestones()}},r.a.createElement(y.a,null,r.a.createElement(ne.a,{color:e.page!==ke.a.Milestones?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Milestones?"secondary":"primary"},"Milestones"))),r.a.createElement(g.a,{button:!0,key:"Tutorial",className:Object(i.default)({[We.active]:e.page===ke.a.Tutorial}),onClick:Le},r.a.createElement(y.a,null,r.a.createElement(ie.a,{color:D?"error":e.page!==ke.a.Tutorial?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:D?"error":e.page!==ke.a.Tutorial?"secondary":"primary"},"Tutorial"))),r.a.createElement(g.a,{button:!0,key:"Options",className:Object(i.default)({[We.active]:e.page===ke.a.Options}),onClick:function(){e.router.toGameOptions()}},r.a.createElement(y.a,null,r.a.createElement(se.a,{color:e.page!==ke.a.Options?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Options?"secondary":"primary"},"Options"))),!1)))}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(840),o=a(841),s=a(842),l=a(843),c=a(336),u=a(29),m=a(1),h=a(10),p=a(26),d=a(32);function f(e){const t=u.b.Player(),a=Object(n.useState)(!1)[1];function f(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(f,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{variant:"h4"},"Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(m.a,null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),r.a.createElement(m.a,null,"WARNING: Installing your Augmentations resets most of your progress, including:"),r.a.createElement("br",null),r.a.createElement(m.a,null,"- Stats/Skill levels and Experience"),r.a.createElement(m.a,null,"- Money"),r.a.createElement(m.a,null,"- Scripts on every computer but your home computer"),r.a.createElement(m.a,null,"- Purchased servers"),r.a.createElement(m.a,null,"- Hacknet Nodes"),r.a.createElement(m.a,null,"- Faction/Company reputation"),r.a.createElement(m.a,null,"- Stocks"),r.a.createElement("br",null),r.a.createElement(m.a,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)")),r.a.createElement(m.a,{variant:"h4",color:"primary"},"Purchased Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(p.a,{title:r.a.createElement(m.a,null,"'I never asked for this'")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:0===t.queuedAugmentations.length,onClick:e.installAugmentationsFn},"Install Augmentations"))),r.a.createElement(p.a,{title:r.a.createElement(m.a,null,"It's always a good idea to backup/export your save!")},r.a.createElement(h.a,{sx:{mx:2},onClick:function(){e.exportGameFn(),f()},color:"error"},"Backup Save ",Object(c.b)()?"(+1 favor to all factions)":"")),r.a.createElement(s.a,null)),r.a.createElement(m.a,{variant:"h4"},"Installed Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(m.a,null,"List of all Augmentations that have been installed. You have gained the effects of these."),r.a.createElement(i.a,null)),r.a.createElement(o.a,null),r.a.createElement(l.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(521),o=a(20),s=a(6),l=a(13),c=a(29),u=a(183),m=a(10),h=a(26),p=a(274);function d(){const e=Object(n.useState)(!0)[1],t=c.b.Player().augmentations.slice();function a(){e(e=>!e)}return l.a.OwnedAugmentationsOrder===u.a.Alphabetically&&t.sort((e,t)=>e.name<=t.name?-1:1),r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{title:"Sorts the Augmentations alphabetically in numeral order"},r.a.createElement(m.a,{onClick:function(){l.a.OwnedAugmentationsOrder=u.a.Alphabetically,a()}},"Sort in Order")),r.a.createElement(h.a,{title:"Sorts the Augmentations based on when you acquired them (same as default)"},r.a.createElement(m.a,{sx:{mx:2},onClick:function(){l.a.OwnedAugmentationsOrder=u.a.AcquirementTime,a()}},"Sort by Acquirement Time")),r.a.createElement(p.a,{dense:!0},t.map(e=>{const t=o.a[e.name];let a=null;return e.name===s.a.NeuroFluxGovernor&&(a=e.level),r.a.createElement(i.a,{key:t.name,aug:t,level:a})})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(2),i=a(4),o=a(20),s=a(39),l=a(169),c=a(56),u=a(1),m=a(32);function h({r:e}){return e?n.createElement(n.Fragment,null,n.createElement(s.b,{key:"2"},n.createElement(u.a,null," ","=>"," ")),n.createElement(s.b,{key:"3"},n.createElement(u.a,null,i.a.formatPercentage(e)))):n.createElement(n.Fragment,null)}function p({rows:e}){return n.createElement(s.a,{size:"small",padding:"none"},n.createElement(l.a,null,e.map(e=>n.createElement(c.a,{key:e[0]},n.createElement(s.b,{key:"0"},n.createElement(u.a,{noWrap:!0},e[0]," multiplier: ")),n.createElement(s.b,{key:"1",style:{textAlign:"right"}},n.createElement(u.a,{noWrap:!0},i.a.formatPercentage(e[1]))),n.createElement(h,{r:e[2]})))))}function d(){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(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(p,{rows:[["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)}return n.createElement(n.Fragment,null,n.createElement(u.a,{variant:"h4"},"Multipliers"),n.createElement(m.a,{mx:2},n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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(t,null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(20),i=a(6),o=a(2),s=a(521),l=a(274);function c(){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;at(e=>!e)},r.a.createElement(l.a,{primary:r.a.createElement(u.a,{style:{whiteSpace:"pre-wrap"}},"Source-File -1: Exploits in the BitNodes",r.a.createElement("br",null),"Level ",a.length," / ",Object.keys(o.a).length)}),e?r.a.createElement(g.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(h.a,{in:e,unmountOnExit:!0},r.a.createElement(c.a,{m:4},r.a.createElement(u.a,null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),r.a.createElement(u.a,null,"It increases all of the player's multipliers by 0.1%"),r.a.createElement("br",null),r.a.createElement(u.a,null,"You have found the following exploits:"),r.a.createElement(c.a,{mx:2},a.map(e=>r.a.createElement(u.a,{key:e},"* ",Object(o.b)(e)))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(2),i=a(13),o=a(183),s=a(323),l=a(846);function c(){const e=r.a.sourceFiles.slice();return i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&e.sort((e,t)=>e.n-t.n),n.createElement(n.Fragment,null,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(l.a,{key:e.n,level:e.lvl,sf:a})}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(302),o=a(97),s=a(32),l=a(1),c=a(73),u=a(189),m=a(70),h=a.n(m),p=a(134),d=a.n(p);function f(e){const[t,a]=Object(n.useState)(!1),m=12===e.sf.n?"∞":"3";return r.a.createElement(s.a,{component:c.a},r.a.createElement(i.a,{onClick:()=>a(e=>!e)},r.a.createElement(o.a,{primary:r.a.createElement(l.a,{style:{whiteSpace:"pre-wrap"}},e.sf.name,r.a.createElement("br",null),`Level ${e.level} / ${m}`)}),t?r.a.createElement(d.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"})),r.a.createElement(u.a,{in:t,unmountOnExit:!0},r.a.createElement(s.a,{m:4},r.a.createElement(l.a,null,e.sf.info))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return S}));var n=a(214),r=a(6),i=a(0),o=a.n(i),s=a(848),l=a(850),c=a(852),u=a(853),m=a(854),h=a(855),p=a(856),d=a(857),f=a(858),g=a(859),y=a(860),b=a(861),E=a(862),k=a(863),v=a(864),_=a(865),w=a(1);function S(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(w.a,null,"Development Menu - Only meant to be used for testing/debugging"),o.a.createElement(s.a,{player:e.player,router:e.router}),o.a.createElement(l.a,{player:e.player}),o.a.createElement(c.a,{player:e.player}),o.a.createElement(u.a,{player:e.player}),o.a.createElement(m.a,{player:e.player}),o.a.createElement(h.a,{player:e.player}),o.a.createElement(p.a,null),o.a.createElement(d.a,null),e.player.bladeburner instanceof n.a&&o.a.createElement(f.a,{player:e.player}),e.player.inGang()&&o.a.createElement(g.a,{player:e.player}),e.player.hasCorporation()&&o.a.createElement(y.a,{player:e.player}),o.a.createElement(b.a,null),e.player.hasWseAccount&&o.a.createElement(E.a,null),e.player.sleeves.length>0&&o.a.createElement(k.a,{player:e.player}),e.player.augmentations.some(e=>e.name===r.a.StaneksGift1)&&o.a.createElement(v.a,null),o.a.createElement(_.a,{player:e.player,engine:e.engine}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(16);function p(e){function t(t){return function(){e.player.gainMoney(t,"other")}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"General")),r.a.createElement(s.a,null,r.a.createElement(m.a,{onClick:t(1e6)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e6}))),r.a.createElement(m.a,{onClick:t(1e9)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e9}))),r.a.createElement(m.a,{onClick:t(1e12)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e12}))),r.a.createElement(m.a,{onClick:t(1e15)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e15}))),r.a.createElement(m.a,{onClick:t(1/0)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1/0}))),r.a.createElement(m.a,{onClick:function(){e.player.getHomeComputer().maxRam*=2}},"+ RAM"),r.a.createElement("br",null),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!0,!0)}},"Quick b1t_flum3.exe"),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!0,!1)}},"Run b1t_flum3.exe"),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!1,!0)}},"Quick w0rld_d34m0n"),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!1,!1)}},"Hack w0rld_d34m0n")))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(132);const p=1e27;function d(e){function t(t,a){return function(n){switch(t){case"hacking":n&&e.player.gainHackingExp(n*a);break;case"strength":n&&e.player.gainStrengthExp(n*a);break;case"defense":n&&e.player.gainDefenseExp(n*a);break;case"dexterity":n&&e.player.gainDexterityExp(n*a);break;case"agility":n&&e.player.gainAgilityExp(n*a);break;case"charisma":n&&e.player.gainCharismaExp(n*a);break;case"intelligence":n&&e.player.gainIntelligenceExp(n*a)}e.player.updateSkillLevels()}}function a(t){return function(a){e.player.karma+=a*t}}function n(t){return function(){switch(t){case"hacking":e.player.hacking_exp=0;break;case"strength":e.player.strength_exp=0;break;case"defense":e.player.defense_exp=0;break;case"dexterity":e.player.dexterity_exp=0;break;case"agility":e.player.agility_exp=0;break;case"charisma":e.player.charisma_exp=0;break;case"intelligence":e.player.intelligence_exp=0}e.player.updateSkillLevels()}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Experience / Stats")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.gainHackingExp(p),e.player.gainStrengthExp(p),e.player.gainDefenseExp(p),e.player.gainDexterityExp(p),e.player.gainAgilityExp(p),e.player.gainCharismaExp(p),e.player.gainIntelligenceExp(p),e.player.updateSkillLevels()}},"Tons of exp"),r.a.createElement(m.a,{onClick:function(){e.player.hacking_exp=0,e.player.strength_exp=0,e.player.defense_exp=0,e.player.dexterity_exp=0,e.player.agility_exp=0,e.player.charisma_exp=0,e.player.intelligence_exp=0,e.player.updateSkillLevels()}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Hacking:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"hacking",placeholder:"exp",tons:()=>t("hacking",1)(p),add:t("hacking",1),subtract:t("hacking",-1),reset:n("hacking")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Strength:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"strength",placeholder:"exp",tons:()=>t("strength",1)(p),add:t("strength",1),subtract:t("strength",-1),reset:n("strength")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Defense:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"defense",placeholder:"exp",tons:()=>t("defense",1)(p),add:t("defense",1),subtract:t("defense",-1),reset:n("defense")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Dexterity:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"dexterity",placeholder:"exp",tons:()=>t("dexterity",1)(p),add:t("dexterity",1),subtract:t("dexterity",-1),reset:n("dexterity")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Agility:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"agility",placeholder:"exp",tons:()=>t("agility",1)(p),add:t("agility",1),subtract:t("agility",-1),reset:n("agility")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Charisma:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"charisma",placeholder:"exp",tons:()=>t("charisma",1)(p),add:t("charisma",1),subtract:t("charisma",-1),reset:n("charisma")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Intelligence:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"intelligence",placeholder:"exp",tons:()=>t("intelligence",1)(p),add:t("intelligence",1),subtract:t("intelligence",-1),reset:n("intelligence")})),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){0===e.player.intelligence&&(e.player.intelligence=1,e.player.updateSkillLevels())}},"Enable")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.intelligence_exp=0,e.player.intelligence=0,e.player.updateSkillLevels()}},"Disable"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Karma:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"karma",placeholder:"amt",tons:()=>t("intelligence",1)(1e5),add:a(1),subtract:a(-1),reset:function(){e.player.karma=0}})))))))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(132),d=a(24),f=a(1179),g=a(75),y=a(94),b=a(525),E=a.n(b),k=a(360),v=a.n(k),_=a(1180);function w(e){const[t,a]=Object(n.useState)("Illuminati");function l(e){return function(a){const n=d.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function b(e){return function(a){const n=d.a[t];null==n||isNaN(a)||(n.favor+=a*e)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Factions")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Faction:")),r.a.createElement("td",null,r.a.createElement(f.a,null,r.a.createElement(_.a,{id:"factions-select"},"Faction"),r.a.createElement(h.a,{labelId:"factions-select",id:"factions-dropdown",onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{onClick:function(){for(const t in d.a)e.player.receiveInvite(d.a[t].name)},size:"large","arial-label":"receive-all-invitation"},r.a.createElement(E.a,null)),r.a.createElement(y.a,{onClick:function(){e.player.receiveInvite(t)},size:"large","arial-label":"receive-one-invitation"},r.a.createElement(v.a,null)))},Object.values(d.a).map(e=>r.a.createElement(g.a,{key:e.name,value:e.name},e.name)))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const e=d.a[t];null!=e&&(e.playerReputation=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"favor",placeholder:"amt",tons:()=>b(1)(2e3),add:b(1),subtract:b(-1),reset:function(){const e=d.a[t];null!=e&&(e.favor=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].favor=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(116),m=a(6),h=a(1),p=a(75),d=a(94),f=a(525),g=a.n(f),y=a(360),b=a.n(y),E=a(524),k=a.n(E);function v(e){const[t,a]=Object(n.useState)("Augmented Targeting I");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(h.a,null,"Augmentations")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,null,"Aug:")),r.a.createElement("td",null,r.a.createElement(u.a,{onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){for(const t of Object.values(m.a))e.player.queueAugmentation(t)},size:"large"},r.a.createElement(g.a,null)),r.a.createElement(d.a,{onClick:function(){e.player.queueAugmentation(t)},size:"large"},r.a.createElement(b.a,null))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){e.player.augmentations=[]},size:"large"},r.a.createElement(k.a,null)))},Object.values(m.a).map(e=>r.a.createElement(p.a,{key:e,value:e},e)))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(507),p=a(1184);const d=[1,2,3,4,5,6,7,8,9,10,11,12];function f(e){function t(t,a){return function(){if(0!==a)if(e.player.sourceFiles.some(e=>e.n===t))for(let n=0;ne.n!==t)}}function a(e){return()=>{for(let a=0;ar.a.createElement("tr",{key:"sf-"+e},r.a.createElement("td",null,r.a.createElement(u.a,null,"SF-",e,":")),r.a.createElement("td",null,r.a.createElement(p.a,null,r.a.createElement(m.a,{onClick:t(e,0)},"0"),r.a.createElement(m.a,{onClick:t(e,1)},"1"),r.a.createElement(m.a,{onClick:t(e,2)},"2"),r.a.createElement(m.a,{onClick:t(e,3)},"3")))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(60),d=a(75);function f(e){const[t,a]=Object(n.useState)("NUKE.exe");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Programs")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Program:")),r.a.createElement("td",null,r.a.createElement(h.a,{onChange:function(e){a(e.target.value)},value:t},Object.values(p.a).map(e=>r.a.createElement(d.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Add:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.hasProgram(t)||e.player.getHomeComputer().programs.push(t)}},"One"),r.a.createElement(m.a,{onClick:function(){for(const t in p.a)e.player.hasProgram(p.a[t].name)||e.player.getHomeComputer().programs.push(p.a[t].name)}},"All")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(27),d=a(45),f=a(75);function g(){const[e,t]=Object(n.useState)("home");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Servers")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Server:")),r.a.createElement("td",{colSpan:2},r.a.createElement(h.a,{id:"dev-servers-dropdown",onChange:function(e){t(e.target.value)},value:e},Object(p.c)().map(e=>r.a.createElement(f.a,{key:e.hostname,value:e.hostname},e.hostname))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Root:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const t=Object(p.d)(e);null!==t&&t instanceof d.a&&(t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5)}},"Root one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(p.c)()){if(!(e instanceof d.a))return;e.hasAdminRights=!0,e.sshPortOpen=!0,e.ftpPortOpen=!0,e.smtpPortOpen=!0,e.httpPortOpen=!0,e.sqlPortOpen=!0,e.openPortCount=5}}},"Root all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Security:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const t=Object(p.d)(e);null!==t&&t instanceof d.a&&(t.hackDifficulty=t.minDifficulty)}},"Min one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(p.c)()){if(!(e instanceof d.a))return;e.hackDifficulty=e.minDifficulty}}},"Min all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Money:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const t=Object(p.d)(e);null!==t&&t instanceof d.a&&(t.moneyAvailable=t.moneyMax)}},"Max one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(p.c)()){if(!(e instanceof d.a))return;e.moneyAvailable=e.moneyMax}}},"Max all")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(61),d=a(75),f=a(132);function g(){const[e,t]=Object(n.useState)("ECorp");function a(t){return function(a){const n=p.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function l(t){return function(a){const n=p.a[e];null==n||isNaN(a)||(n.favor+=a*t)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Companies")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Company:")),r.a.createElement("td",{colSpan:3},r.a.createElement(h.a,{id:"dev-companies-dropdown",onChange:function(e){t(e.target.value)},value:e},Object.values(p.a).map(e=>r.a.createElement(d.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(f.a,{label:"reputation",placeholder:"amt",tons:()=>a(1)(1e12),add:a(1),subtract:a(-1),reset:function(){p.a[e].playerReputation=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(f.a,{label:"favor",placeholder:"amt",tons:()=>l(1)(2e3),add:l(1),subtract:l(-1),reset:function(){p.a[e].favor=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].favor=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1),o=a(190),s=a(191),l=a(192),c=a(70),u=a.n(c),m=a(132);function h(e){const t=e.player.bladeburner;if(null===t)return r.a.createElement(r.a.Fragment,null);function a(a){return function(n){t&&t.changeRank(e.player,n*a)}}function n(e){return function(a){t&&(t.storedCycles+=a*e)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(u.a,null)},r.a.createElement(i.a,null,"Bladeburner")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Rank:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"rank",placeholder:"amt",tons:function(){t&&t.changeRank(e.player,1e27)},add:a(1),subtract:a(-1),reset:function(){t&&(t.rank=0,t.maxRank=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){t&&(t.storedCycles+=1e27)},add:n(1),subtract:n(-1),reset:function(){t&&(t.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1),o=a(190),s=a(191),l=a(192),c=a(70),u=a.n(c),m=a(132);function h(e){function t(t){return function(a){e.player.gang&&(e.player.gang.storedCycles+=a*t)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(u.a,null)},r.a.createElement(i.a,null,"Gang")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.gang&&(e.player.gang.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.gang&&(e.player.gang.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(132);function p(e){function t(t){return function(a){e.player.corporation&&(e.player.corporation.storedCycles+=a*t)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Corporation")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds+1e99)}},"Tons of funds"),r.a.createElement(m.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds-e.player.corporation.funds)}},"Reset funds"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.corporation&&(e.player.corporation.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.corporation&&(e.player.corporation.storedCycles=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.corporation&&e.player.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"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.corporation&&e.player.corporation.divisions.forEach(e=>{e.sciResearch.qty+=1e10})}},"Tons of research")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(75),d=a(331),f=a(99);function g(){const[e,t]=Object(n.useState)("Find Largest Prime Factor");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Coding Contracts")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:d.b},"Generate Random Contract"),r.a.createElement(m.a,{onClick:d.c},"Generate Random Contract on Home Comp"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,{onChange:function(e){t(e.target.value)},value:e},Object.values(f.d).map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))),r.a.createElement(m.a,{onClick:function(){Object(d.a)({problemType:e,server:"home"})}},"Generate Specified Contract Type on Home Comp")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(82),p=a(16),d=a(15),f=a(95),g=a(136);function y(){const[e,t]=Object(n.useState)(0),[a,l]=Object(n.useState)("");function y(e){const t=a.replace(/\s/g,"");let n=()=>!0;""!==t&&"all"!==t&&(n=function(e){return t.split(",").includes(e)});for(const t in f.a)if(f.a.hasOwnProperty(t)){const a=f.a[t];a instanceof g.a&&n(a.symbol)&&e(a)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Stock Market")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Symbol:")),r.a.createElement("td",null,r.a.createElement(h.a,{placeholder:"symbol/'all'",onChange:function(e){l(e.target.value)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Price:")),r.a.createElement("td",null,r.a.createElement(h.a,{placeholder:"$$$",onChange:function(e){t(parseFloat(e.target.value))}}),r.a.createElement(m.a,{onClick:function(){isNaN(e)||y(t=>{t.price=e})}},"Set"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Caps:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const e=[];y(t=>{e.push(r.a.createElement("tr",{key:t.symbol},r.a.createElement("td",null,t.symbol),r.a.createElement("td",{style:{textAlign:"right"}},r.a.createElement(p.a,{money:t.cap}))))}),Object(d.a)(r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Stock"),r.a.createElement("th",null,"Price cap")),e)))}},"View stock caps")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(10),m=a(1);function h(e){return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(m.a,null,"Sleeves")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,null,"Shock:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(let t=0;ta.avgCharge+=t*e)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(u.a,null)},r.a.createElement(m.a,null,"Stanek's Gift")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,{label:"cycles",placeholder:"amt",tons:function(){i.b.storedCycles=1e6},add:e(1),subtract:e(-1),reset:function(){i.b.storedCycles=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,{label:"all charge",placeholder:"amt",tons:function(){i.b.fragments.forEach(e=>{e.avgCharge=1e21,e.numCharge=1e21})},add:t(1),subtract:t(-1),reset:function(){i.b.fragments.forEach(e=>{e.avgCharge=0,e.numCharge=0})}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(182);function p(e){function t(t){return()=>{e.player.lastUpdate-=t,e.engine._lastUpdate-=t,h.c.saveGame(),setTimeout(()=>location.reload(),1e3)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Time skip")),r.a.createElement(s.a,null,r.a.createElement(m.a,{onClick:t(6e4)},"1 minute"),r.a.createElement(m.a,{onClick:t(36e5)},"1 hour"),r.a.createElement(m.a,{onClick:t(864e5)},"1 day")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(867),o=a(869),s=a(870),l=a(29),c=a(46),u=a(32);function m(){const e=l.b.Player(),t=l.b.Router(),a=Object(n.useState)(!1)[1];function m(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(m,200);return()=>clearInterval(e)},[]);const h=e.bladeburner;return null===h?r.a.createElement(r.a.Fragment,null):r.a.createElement(u.a,{display:"flex",flexDirection:"column"},r.a.createElement(c.a,{container:!0},r.a.createElement(c.a,{item:!0,xs:6},r.a.createElement(i.a,{bladeburner:h,player:e,router:t})),r.a.createElement(c.a,{item:!0,xs:6},r.a.createElement(o.a,{bladeburner:h,player:e}))),r.a.createElement(s.a,{bladeburner:h,player:e}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(22),o=a(57),s=a(16),l=a(123),c=a(4),u=a(24),m=a(113),h=a(868),p=a(1),d=a(26),f=a(32),g=a(10),y=a(73);function b(e){const[t,a]=Object(n.useState)(!1),b=Object(n.useState)(!1)[1],E=e.bladeburner.rank>=o.a.RankNeededForFaction;return Object(n.useEffect)(()=>{const e=setInterval(()=>b(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(y.a,{sx:{p:1}},r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"Your rank within the Bladeburner division.")},r.a.createElement(p.a,null,"Rank: ",Object(i.c)(e.bladeburner.rank,2)))),r.a.createElement("br",null),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"Performing actions will use up your stamina.",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina is determined primarily by your agility stat.",r.a.createElement("br",null),r.a.createElement("br",null),"Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")},r.a.createElement(p.a,null,"Stamina: ",Object(i.c)(e.bladeburner.stamina,3)," / ",Object(i.c)(e.bladeburner.maxStamina,3)))),r.a.createElement("br",null),r.a.createElement(p.a,null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement(p.a,null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement(p.a,null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement(p.a,null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement(p.a,null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement(p.a,null,"Current City: ",e.bladeburner.city),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate population count increases success rate estimates.")},r.a.createElement(p.a,null,"Est. Synthoid Population: ",c.a.formatPopulation(e.bladeburner.getCurrentCity().popEst)))),r.a.createElement("br",null),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")},r.a.createElement(p.a,null,"Synthoid Communities: ",Object(i.c)(e.bladeburner.getCurrentCity().comms,0)))),r.a.createElement("br",null),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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(p.a,null,"City Chaos: ",Object(i.c)(e.bladeburner.getCurrentCity().chaos)))),r.a.createElement("br",null),e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3>15e3&&r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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.a,null,"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3)))),r.a.createElement("br",null)),r.a.createElement(p.a,null,"Skill Points: ",Object(i.c)(e.bladeburner.skillPoints,0)),r.a.createElement("br",null),r.a.createElement(l.a,{rows:[["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(g.a,{onClick:()=>a(!0)},"Travel"),r.a.createElement(d.a,{title:E?"":r.a.createElement(p.a,null,"Rank 25 required.")},r.a.createElement("span",null,r.a.createElement(g.a,{disabled:!E,onClick:function(){if(!E)return;const t=u.a.Bladeburners;t.isMember||Object(m.d)(t),e.router.toFaction(t)}},"Faction"))),r.a.createElement(h.a,{open:t,onClose:()=>a(!1),bladeburner:e.bladeburner}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(396),o=a(41),s=a(23),l=a(13),c=a(1),u=a(10);function m(e){function t(t){e.bladeburner.city=t,e.onClose()}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,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."),l.a.DisableASCIIArt?Object.values(s.a).map(e=>r.a.createElement(u.a,{key:e,onClick:()=>t(e)},e)):r.a.createElement(i.a,{currentCity:e.bladeburner.city,onTravel:e=>t(e)})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(73),o=a(274),s=a(66),l=a(32),c=a(1),u=a(82),m=a(126),h=a(154);const p=Object(m.a)(e=>Object(h.a)({textfield:{margin:e.spacing(0),width:"100%"},input:{backgroundColor:"#000"},nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"}}));function d(e){return r.a.createElement(s.a,{sx:{p:0}},r.a.createElement(c.a,null,e.content))}function f(e){const t=p(),a=Object(n.useRef)(null),[s,m]=Object(n.useState)(""),h=Object(n.useState)(!1)[1];const[f,g]=Object(n.useState)(e.bladeburner.consoleHistory.length);function y(){a.current&&(a.current.scrollTop=a.current.scrollHeight)}function b(){h(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(b,1e3),t=setInterval(y,100);return()=>{clearInterval(e),clearInterval(t)}},[]),r.a.createElement(l.a,{height:"60vh",display:"flex",alignItems:"stretch",component:i.a},r.a.createElement(l.a,null,r.a.createElement(o.a,{sx:{height:"100%",overflow:"auto"}},e.bladeburner.consoleLogs.map((e,t)=>r.a.createElement(d,{key:t,content:e})),r.a.createElement(u.a,{classes:{root:t.textfield},autoFocus:!0,tabIndex:1,type:"text",value:s,onChange:function(e){m(e.target.value)},onKeyDown:function(t){13===t.keyCode&&(t.preventDefault(),s.length>0&&(e.bladeburner.postToConsole("> "+s),e.bladeburner.executeConsoleCommands(e.player,s),g(e.bladeburner.consoleHistory.length),m("")));const a=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=f;const n=a.length;if(0===n)return;(e<0||e>n)&&g(n),0!==e&&(e-=1),g(e);const r=a[e];t.currentTarget.value=r}if(40===t.keyCode){const e=f,n=a.length;if(0==n)return;if((e<0||e>n)&&g(n),e==n||e==n-1)g(n),t.currentTarget.value="";else{g(f+1);const e=a[f+1];t.currentTarget.value=e}}},InputProps:{className:t.input,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,null,"> ")),spellCheck:!1}})),r.a.createElement("div",{ref:a})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(871),o=a(875),s=a(883),l=a(888),c=a(892),u=a(470),m=a(226),h=a(32);function p(e){const[t,a]=r.a.useState(0);return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{variant:"fullWidth",value:t,onChange:function(e,t){a(t)}},r.a.createElement(m.a,{label:"General"}),r.a.createElement(m.a,{label:"Contracts"}),r.a.createElement(m.a,{label:"Operations"}),r.a.createElement(m.a,{label:"BlackOps"}),r.a.createElement(m.a,{label:"Skills"})),r.a.createElement(h.a,{sx:{p:1}},0===t&&r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player}),1===t&&r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player}),2===t&&r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player}),3===t&&r.a.createElement(l.a,{bladeburner:e.bladeburner,player:e.player}),4===t&&r.a.createElement(c.a,{bladeburner:e.bladeburner})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(872),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"These are generic actions that will assist you in your Bladeburner duties."),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(873),o=a(231);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(i.a,{key:t.name,bladeburner:e.bladeburner,action: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(38),o=a(170),s=a(22),l=a(874),c=a(158),u=a(326),m=a(1),h=a(32),p=a(73);function d(e){const t=Object(n.useState)(!1)[1];const a=e.action.name===e.bladeburner.action.name,d=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),f=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":case"Incite Violence":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),g="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1,y=l.a[e.action.name];if(void 0===y)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(p.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{value:e.action.name}),r.a.createElement(m.a,null,"(IN PROGRESS - ",Object(s.c)(d,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(m.a,null,Object(o.a)({progress:d/e.bladeburner.actionTimeToComplete}))):r.a.createElement(h.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{value:e.action.name}),r.a.createElement(u.a,{bladeburner:e.bladeburner,type:i.a[e.action.name],name:e.action.name,rerender:function(){t(e=>!e)}})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,null,y.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,null,"Time Required: ",Object(s.b)(1e3*f),-1!==g&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.c)(100*g,1),"%")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Training:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Field Analysis":{desc:r.a.createElement(r.a.Fragment,null,"Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Recruitment:{desc:r.a.createElement(r.a.Fragment,null,"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Diplomacy:{desc:r.a.createElement(r.a.Fragment,null,"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},"Hyperbolic Regeneration Chamber":{desc:r.a.createElement(r.a.Fragment,null,"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.",r.a.createElement("br",null),r.a.createElement("br",null))},"Incite Violence":{desc:r.a.createElement(r.a.Fragment,null,"Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate additional contracts and operations, at the cost of increased Chaos.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(876),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"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(877);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(i.a,{key:t,bladeburner:e.bladeburner,action:a[t],player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(38),o=a(170),s=a(22),l=a(878),c=a(397),u=a(158),m=a(527),h=a(530),p=a(326),d=a(1),f=a(73);function g(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const g=e.bladeburner.action.type===i.a.Contract&&e.action.name===e.bladeburner.action.name,y=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),b=e.action.getActionTime(e.bladeburner),E=l.a[e.action.name];if(void 0===E)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(f.a,{sx:{my:1,p:1}},g?r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,null,r.a.createElement(u.a,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(y,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(d.a,null,Object(o.a)({progress:y/e.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name}),r.a.createElement(p.a,{bladeburner:e.bladeburner,type:i.a.Contract,name:e.action.name,rerender:a})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{action:e.action,bladeburner:e.bladeburner,isActive:g,rerender:a}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(d.a,null,E.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:e.action,bladeburner:e.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*b),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(h.a,{rerender:a,action:e.action}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Tracking:{desc:r.a.createElement(r.a.Fragment,null,"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.")},"Bounty Hunter":{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.")},Retirement:{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and retire (kill) rogue Synthoids.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(526),o=a(1),s=a(26);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves stealth")},i.b)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(526),o=a(1),s=a(26);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves retirement")},i.a)}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(884),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"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(885);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(i.a,{key:t,bladeburner:e.bladeburner,action:a[t],player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(38),o=a(170),s=a(22),l=a(397),c=a(527),u=a(530),m=a(326),h=a(531),p=a(887),d=a(158),f=a(1),g=a(73);function y(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const y=e.bladeburner.action.type===i.a.Operation&&e.action.name===e.bladeburner.action.name,b=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),E=e.action.getActionTime(e.bladeburner),k=p.a[e.action.name];if(void 0===k)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(g.a,{sx:{my:1,p:1}},y?r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,r.a.createElement(d.a,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(b,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(f.a,null,Object(o.a)({progress:b/e.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{value:e.action.name}),r.a.createElement(m.a,{bladeburner:e.bladeburner,type:i.a.Operation,name:e.action.name,rerender:a}),r.a.createElement(h.a,{action:e.action,bladeburner:e.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:e.action,bladeburner:e.bladeburner,isActive:y,rerender:a}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,null,k.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{action:e.action,bladeburner:e.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*E),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(u.a,{rerender:a,action:e.action}))}},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(41),s=a(1),l=a(10),c=a(82);function u(e){const[t,a]=Object(n.useState)();return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,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(c.a,{autoFocus:!0,type:"number",placeholder:"Team size",value:t,onChange:function(t){const n=parseFloat(t.target.value);n>e.bladeburner.teamSize?a(e.bladeburner.teamSize):a(n)}}),r.a.createElement(l.a,{sx:{mx:2},onClick:function(){if(void 0===t)return;const a=Math.round(t);isNaN(a)||a<0?Object(i.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=a,e.onClose()}},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Investigation:{desc:r.a.createElement(r.a.Fragment,null,"As a field agent, investigate and identify Synthoid populations, movements, and operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Investigation ops will increase the accuracy of your synthoid data.",r.a.createElement("br",null),r.a.createElement("br",null),"You will NOT lose HP from failed Investigation ops.")},"Undercover Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Undercover ops will increase the accuracy of your synthoid data.")},"Sting Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.")},Raid:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Stealth Retirement Operation":{desc:r.a.createElement(r.a.Fragment,null,"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.")},Assassination:{desc:r.a.createElement(r.a.Fragment,null,"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(889),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"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(244),o=a(890);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(o.a,{key:t.name,bladeburner:e.bladeburner,action:t,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(22),o=a(38),s=a(170),l=a(531),c=a(891),u=a(158),m=a(397),h=a(326),p=a(1),d=a(73);function f(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement(d.a,{sx:{my:1,p:1}},r.a.createElement(p.a,null,e.action.name," (COMPLETED)"));const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,f=e.action.getActionTime(e.bladeburner),g=e.bladeburner.rank>=e.action.reqdRank,y=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),b=c.a[e.action.name];if(void 0===b)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(d.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name}),r.a.createElement(p.a,null,"(IN PROGRESS - ",Object(i.c)(y,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(p.a,null,Object(s.a)({progress:y/e.bladeburner.actionTimeToComplete})))):r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name}),r.a.createElement(h.a,{bladeburner:e.bladeburner,type:o.a.BlackOperation,name:e.action.name,rerender:function(){t(e=>!e)}}),r.a.createElement(l.a,{action:e.action,bladeburner:e.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,null,b.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,{color:g?"primary":"error"},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement(p.a,null,r.a.createElement(m.a,{action:e.action,bladeburner:e.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*f)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={"Operation Typhoon":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Zero":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation X":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Titan":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Ares":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to intercept the deal. Leave no survivors.")},"Operation Archangel":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Juggernaut":{desc:r.a.createElement(r.a.Fragment,null,"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 they 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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your mission is to eradicate Juggernaut and his followers.")},"Operation Red Dragon":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation K":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"We do not have the power or jurisdiction to shut 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.")},"Operation Deckard":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Tyrell":{desc:r.a.createElement(r.a.Fragment,null,"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facilities. 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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Wallace":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Shoulder of Orion":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Hyron":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Morpheus":{desc:r.a.createElement(r.a.Fragment,null,"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the people's 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.",r.a.createElement("br",null),r.a.createElement("br",null),"The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.")},"Operation Ion Storm":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.")},"Operation Annihilus":{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Operation Ultron":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to find and destroy Ultron.")},"Operation Centurion":{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"It seems that the universe is not without a sense of irony.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},"Operation Vindictus":{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},"Operation Daedalus":{desc:r.a.createElement(r.a.Fragment,null," Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(893),o=a(57),s=a(22),l=a(1),c=a(5);function u(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.skillMultipliers;function u(e){return e&&1!==e}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,r.a.createElement("strong",null,"Skill Points: ",Object(s.c)(e.bladeburner.skillPoints,0))),r.a.createElement(l.a,null,"You will gain one skill point every"," ",o.a.RanksPerSkillPoint*c.a.BladeburnerSkillCost," ranks.",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."),u(a.successChanceAll)&&r.a.createElement(l.a,null,"Total Success Chance: x",Object(s.c)(a.successChanceAll,3)),u(a.successChanceStealth)&&r.a.createElement(l.a,null,"Stealth Success Chance: x",Object(s.c)(a.successChanceStealth,3)),u(a.successChanceKill)&&r.a.createElement(l.a,null,"Retirement Success Chance: x",Object(s.c)(a.successChanceKill,3)),u(a.successChanceContract)&&r.a.createElement(l.a,null,"Contract Success Chance: x",Object(s.c)(a.successChanceContract,3)),u(a.successChanceOperation)&&r.a.createElement(l.a,null,"Operation Success Chance: x",Object(s.c)(a.successChanceOperation,3)),u(a.successChanceEstimate)&&r.a.createElement(l.a,null,"Synthoid Data Estimate: x",Object(s.c)(a.successChanceEstimate,3)),u(a.actionTime)&&r.a.createElement(l.a,null,"Action Time: x",Object(s.c)(a.actionTime,3)),u(a.effHack)&&r.a.createElement(l.a,null,"Hacking Skill: x",Object(s.c)(a.effHack,3)),u(a.effStr)&&r.a.createElement(l.a,null,"Strength: x",Object(s.c)(a.effStr,3)),u(a.effDef)&&r.a.createElement(l.a,null,"Defense: x",Object(s.c)(a.effDef,3)),u(a.effDex)&&r.a.createElement(l.a,null,"Dexterity: x",Object(s.c)(a.effDex,3)),u(a.effAgi)&&r.a.createElement(l.a,null,"Agility: x",Object(s.c)(a.effAgi,3)),u(a.effCha)&&r.a.createElement(l.a,null,"Charisma: x",Object(s.c)(a.effCha,3)),u(a.effInt)&&r.a.createElement(l.a,null,"Intelligence: x",Object(s.c)(a.effInt,3)),u(a.stamina)&&r.a.createElement(l.a,null,"Stamina: x",Object(s.c)(a.stamina,3)),u(a.money)&&r.a.createElement(l.a,null,"Contract Money: x",Object(s.c)(a.money,3)),u(a.expGain)&&r.a.createElement(l.a,null,"Exp Gain: x",Object(s.c)(a.expGain,3)),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(894),i=a(202);function o(e){return n.createElement(n.Fragment,null,Object.keys(i.a).map(t=>n.createElement(r.a,{key:t,bladeburner:e.bladeburner,skill:i.a[t],onUpgrade:e.onUpgrade})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(158),o=a(22),s=a(1),l=a(94),c=a(32),u=a(73),m=a(523),h=a.n(m),p=a(895),d=a.n(p);function f(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),m=e.bladeburner.skillPoints>=n,p=!!e.skill.maxLvl&&a>=e.skill.maxLvl;return r.a.createElement(u.a,{sx:{my:1,p:1}},r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(i.a,{variant:"h6",color:"primary",value:e.skill.name}),!m||p?r.a.createElement(l.a,{disabled:!0},r.a.createElement(d.a,null)):r.a.createElement(l.a,{onClick:function(){e.bladeburner.skillPoints{const e=setInterval(()=>p(e=>!e),200);return()=>clearInterval(e)},[]),r.a.createElement(c.a.Gang.Provider,{value:t},r.a.createElement(u.a,{variant:"fullWidth",value:a,onChange:function(e,t){h(t)}},r.a.createElement(m.a,{label:"Management"}),r.a.createElement(m.a,{label:"Equipment"}),r.a.createElement(m.a,{label:"Territory"})),0===a&&r.a.createElement(i.a,null),1===a&&r.a.createElement(s.a,null),2===a&&r.a.createElement(o.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(900),o=a(902),s=a(135),l=a(1);function c(){const e=Object(s.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"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.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,null),r.a.createElement("br",null),r.a.createElement(o.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(24),o=a(22),s=a(4),l=a(98),c=a(104),u=a(67),m=a(901),h=a(135),p=a(1),d=a(26),f=a(32);function g(){const e=Object(h.b)(),t=100*u.a[e.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(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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(p.a,null,"Respect: ",s.a.formatRespect(e.respect)," (",s.a.formatRespect(5*e.respectGainRate)," / sec)"))),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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(p.a,null,"Wanted Level: ",s.a.formatWanted(e.wanted)," (",s.a.formatWanted(5*e.wantedGainRate)," / sec)"))),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"Penalty for respect and money gain rates due to Wanted Level")},r.a.createElement(p.a,null,"Wanted Level Penalty: -",Object(o.c)(100*(1-e.getWantedPenalty()),2),"%"))),r.a.createElement(p.a,null,"Money gain rate: ",r.a.createElement(l.a,{money:5*e.moneyGainRate})),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"The percentage of total territory your Gang controls")},r.a.createElement(p.a,null,"Territory: ",a,"%"))),r.a.createElement(p.a,null,"Faction reputation: ",r.a.createElement(c.a,{reputation:i.a[e.facName].playerReputation})),r.a.createElement(m.a,{gang:e}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(8),i=a(22),o=a(1),s=a(26),l=a(32);function c(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(l.a,{display:"flex"},n.createElement(s.a,{title:n.createElement(o.a,null,"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(o.a,null,"Bonus time: ",Object(i.b)(a))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(903),o=a(909),s=a(135);function l(){const e=Object(s.b)(),t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onRecruit:()=>t(e=>!e)}),r.a.createElement("ul",null,e.members.map(e=>r.a.createElement(i.a,{key:e.name,member:e}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(904),o=a(32),s=a(1),l=a(302),c=a(97),u=a(73),m=a(189),h=a(70),p=a.n(h),d=a(134),f=a.n(d);function g(e){const[t,a]=Object(n.useState)(!0);return r.a.createElement(o.a,{component:u.a},r.a.createElement(l.a,{onClick:()=>a(e=>!e)},r.a.createElement(c.a,{primary:r.a.createElement(s.a,null,e.member.name)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(p.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(o.a,{sx:{mx:4}},r.a.createElement(i.a,{member:e.member}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(905),o=a(907),s=a(908),l=a(46);function c(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(l.a,{container:!0},r.a.createElement(l.a,{item:!0,xs:4},r.a.createElement(i.a,{onAscend:()=>t(e=>!e),member:e.member})),r.a.createElement(l.a,{item:!0,xs:4},r.a.createElement(o.a,{onTaskChange:()=>t(e=>!e),member:e.member})),r.a.createElement(l.a,{item:!0,xs:4},r.a.createElement(s.a,{member:e.member})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(22),o=a(4),s=a(906),l=a(1),c=a(26),u=a(10),m=a(398),h=a(94),p=a(265),d=a.n(p);function f(e){const[t,a]=Object(n.useState)(!1),[p,f]=Object(n.useState)(!1),g={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(c.a,{title:r.a.createElement(l.a,null,"Hk: x",o.a.formatMultiplier(e.member.hack_mult*g.hack),"(x",o.a.formatMultiplier(e.member.hack_mult)," Eq, x",o.a.formatMultiplier(g.hack)," ","Asc)",r.a.createElement("br",null),"St: x",o.a.formatMultiplier(e.member.str_mult*g.str),"(x",o.a.formatMultiplier(e.member.str_mult)," Eq, x",o.a.formatMultiplier(g.str)," ","Asc)",r.a.createElement("br",null),"Df: x",o.a.formatMultiplier(e.member.def_mult*g.def),"(x",o.a.formatMultiplier(e.member.def_mult)," Eq, x",o.a.formatMultiplier(g.def)," ","Asc)",r.a.createElement("br",null),"Dx: x",o.a.formatMultiplier(e.member.dex_mult*g.dex),"(x",o.a.formatMultiplier(e.member.dex_mult)," Eq, x",o.a.formatMultiplier(g.dex)," ","Asc)",r.a.createElement("br",null),"Ag: x",o.a.formatMultiplier(e.member.agi_mult*g.agi),"(x",o.a.formatMultiplier(e.member.agi_mult)," Eq, x",o.a.formatMultiplier(g.agi)," ","Asc)",r.a.createElement("br",null),"Ch: x",o.a.formatMultiplier(e.member.cha_mult*g.cha),"(x",o.a.formatMultiplier(e.member.cha_mult)," Eq, x",o.a.formatMultiplier(g.cha)," ","Asc)")},r.a.createElement(l.a,null,"Hacking: ",Object(i.c)(e.member.hack,0)," (",o.a.formatExp(e.member.hack_exp)," exp)",r.a.createElement("br",null),"Strength: ",Object(i.c)(e.member.str,0)," (",o.a.formatExp(e.member.str_exp)," exp)",r.a.createElement("br",null),"Defense: ",Object(i.c)(e.member.def,0)," (",o.a.formatExp(e.member.def_exp)," exp)",r.a.createElement("br",null),"Dexterity: ",Object(i.c)(e.member.dex,0)," (",o.a.formatExp(e.member.dex_exp)," exp)",r.a.createElement("br",null),"Agility: ",Object(i.c)(e.member.agi,0)," (",o.a.formatExp(e.member.agi_exp)," exp)",r.a.createElement("br",null),"Charisma: ",Object(i.c)(e.member.cha,0)," (",o.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(u.a,{onClick:()=>f(!0)},"Ascend"),r.a.createElement(s.a,{open:p,onClose:()=>f(!1),member:e.member,onAscend:e.onAscend}),r.a.createElement(h.a,{onClick:()=>a(!0)},r.a.createElement(d.a,null)),r.a.createElement(m.a,{open:t,onClose:()=>a(!1)},r.a.createElement(l.a,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 m}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(41),l=a(135),c=a(1),u=a(10);function m(e){const t=Object(l.b)(),a=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]);const m=e.member.getCurrentAscensionMults(),h=e.member.getAscensionMultsAfterAscend();return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(m.hack,"0.000")," => x",i.a.format(h.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(m.str,"0.000")," => x",i.a.format(h.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(m.def,"0.000")," => x",i.a.format(h.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(m.dex,"0.000")," => x",i.a.format(h.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(m.agi,"0.000")," => x",i.a.format(h.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(m.cha,"0.000")," => x",i.a.format(h.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement(u.a,{onClick:function(){e.onAscend();const a=t.ascendMember(e.member);Object(o.a)(r.a.createElement(c.a,null,"You ascended ",e.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(a.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(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))),e.onClose()}},"Ascend"))}},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(123),s=a(98),l=a(135),c=a(75),u=a(116);function m(e){const t=Object(l.b)(),[a,m]=Object(n.useState)(e.member.task);const h=t.getAllTaskNames(),p=[["Money:",r.a.createElement(s.a,{money:5*e.member.calculateMoneyGain(t)})],["Respect:",i.a.formatRespect(5*e.member.calculateRespectGain(t))+" / sec"],["Wanted Level:",i.a.formatWanted(5*e.member.calculateWantedLevelGain(t))+" / sec"],["Total Respect:",""+i.a.formatRespect(e.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(t){const a=t.target.value;e.member.assignToTask(a),m(a),e.onTaskChange()},value:a},r.a.createElement(c.a,{key:0,value:"Unassigned"},"Unassigned"),h.map((e,t)=>r.a.createElement(c.a,{key:t+1,value:e},e))),r.a.createElement(o.a,{rows:p}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(220),o=a(1);function s(e){const t=i.a[e.member.task],a=t?t.desc:i.a.Unassigned.desc;return r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:a}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(910),o=a(292),s=a(22),l=a(135),c=a(1),u=a(10),m=a(32);function h(e){const t=Object(l.b)(),[a,h]=Object(n.useState)(!1);if(t.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!t.canRecruitMember()){const e=t.getRespectNeededToRecruitMember();return r.a.createElement(m.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,{sx:{mx:1},disabled:!0},"Recruit Gang Member"),r.a.createElement(c.a,null,Object(s.c)(e,2)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onClick:()=>h(!0)},"Recruit Gang Member"),r.a.createElement(i.a,{open:a,onClose:()=>h(!1),onRecruit:e.onRecruit}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(41),o=a(15),s=a(135),l=a(1),c=a(82),u=a(10);function m(e){const t=Object(s.b)(),[a,m]=Object(n.useState)(""),h=""===a||!t.canRecruitMember();function p(){h||(t.recruitMember(a)?(e.onRecruit(),e.onClose()):Object(o.a)("You already have a gang member with this name!"))}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,null,"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement(c.a,{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&p()},onChange:function(e){m(e.target.value)},type:"text",placeholder:"unique name",InputProps:{endAdornment:r.a.createElement(u.a,{disabled:h,onClick:p},"Recruit")}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(22),s=a(67),l=a(135),c=a(1),u=a(161),m=a(147),h=a(26),p=a(32),d=a(73);function f(){const e=Object(l.b)(),t=Object.keys(s.a).filter(t=>t!=e.facName);return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,null,"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),'To increase your chances of winning territory assign gang members to "Territory Warfare", this will build your gang power. Then enable "Engage in Territory Warfare" to start fighting over territory.'),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e.territoryWarfareEngaged,onChange:t=>e.territoryWarfareEngaged=t.target.checked}),label:r.a.createElement(h.a,{title:r.a.createElement(c.a,null,"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(c.a,null,"Engage in Territory Warfare"))}),r.a.createElement("br",null),r.a.createElement(p.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(c.a,null,"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(c.a,null,"Territory Clash Chance: ",i.a.formatPercentage(e.territoryClashChance,3)))),r.a.createElement("br",null),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e.notifyMemberDeath,onChange:t=>e.notifyMemberDeath=t.target.checked}),label:r.a.createElement(h.a,{title:r.a.createElement(c.a,null,"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(c.a,null,"Notify about Gang Member Deaths"))}),r.a.createElement("br",null),r.a.createElement(d.a,null,r.a.createElement(c.a,null,r.a.createElement("b",null,r.a.createElement("u",null,e.facName)),r.a.createElement("br",null),"Power: ",Object(o.c)(s.a[e.facName].power,6),r.a.createElement("br",null),"Territory: ",g(s.a[e.facName].territory),"%",r.a.createElement("br",null),r.a.createElement("br",null)),t.map(e=>r.a.createElement(y,{key:e,name:e}))))}function g(e){const t=100*e;return t<=0?Object(o.c)(0,2):t>=100?Object(o.c)(100,2):Object(o.c)(t,2)}function y(e){const t=Object(l.b)(),a=s.a[t.facName].power,n=s.a[e.name].power,u=a/(n+a);return r.a.createElement(c.a,null,r.a.createElement("u",null,e.name),r.a.createElement("br",null),"Power: ",Object(o.c)(n,6),r.a.createElement("br",null),"Territory: ",g(s.a[e.name].territory),"%",r.a.createElement("br",null),"Chance to win clash with this gang: ",i.a.formatPercentage(u,3),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(22),o=a(4),s=a(203),l=a(16),c=a(135),u=a(160),m=a(29),h=a(1),p=a(10),d=a(26),f=a(32),g=a(73);function y(e){const t=Object(c.b)(),a=m.b.Player(),n=Object.keys(s.a).filter(n=>{const r=s.a[n];return!(a.money>t.getUpgradeCost(r))&&(r.type===e.type&&!e.upgrades.includes(n))}).map(e=>s.a[e]);return 0===n.length?r.a.createElement(r.a.Fragment,null):r.a.createElement(h.a,null,"Next at ",r.a.createElement(l.a,{money:n[0].cost}))}function b({upgName:e}){const t=s.a[e];return r.a.createElement(g.a,{sx:{mx:1,p:1}},r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,{dangerouslySetInnerHTML:{__html:t.desc}})},r.a.createElement(h.a,null,t.name))))}function E(e){const t=Object(c.b)(),a=m.b.Player();return r.a.createElement(d.a,{title:r.a.createElement(h.a,{dangerouslySetInnerHTML:{__html:e.upg.desc}})},r.a.createElement("span",null,r.a.createElement(h.a,null,e.upg.name),r.a.createElement(p.a,{onClick:function(){e.member.buyUpgrade(e.upg,a,t),e.rerender()}},r.a.createElement(l.a,{money:t.getUpgradeCost(e.upg)}))))}function k(e){const t=Object(c.b)(),a=m.b.Player(),o=Object(n.useState)(!1)[1];function l(){o(e=>!e)}function p(e,n){return Object.keys(s.a).filter(r=>{const i=s.a[r];return!(a.moneys.a[e])}const d=p(e.member.upgrades,u.a.Weapon),k=p(e.member.upgrades,u.a.Armor),v=p(e.member.upgrades,u.a.Vehicle),_=p(e.member.upgrades,u.a.Rootkit),w=p(e.member.augmentations,u.a.Augmentation),S=e.member.calculateAscensionMult(e.member.hack_asc_points),C=e.member.calculateAscensionMult(e.member.str_asc_points),x=e.member.calculateAscensionMult(e.member.def_asc_points),O=e.member.calculateAscensionMult(e.member.dex_asc_points),M=e.member.calculateAscensionMult(e.member.agi_asc_points),T=e.member.calculateAscensionMult(e.member.cha_asc_points);return r.a.createElement(g.a,null,r.a.createElement(h.a,{variant:"h5",color:"primary"},e.member.name," (",e.member.task,")"),r.a.createElement(h.a,null,"Hack: ",e.member.hack," (x",Object(i.c)(e.member.hack_mult*S,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*C,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*x,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*O,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*M,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*T,2),")"),r.a.createElement(f.a,{display:"flex",flexWrap:"wrap"},r.a.createElement(h.a,null,"Purchased Upgrades: "),r.a.createElement("br",null),e.member.upgrades.map(e=>r.a.createElement(b,{key:e,upgName:e})),e.member.augmentations.map(e=>r.a.createElement(b,{key:e,upgName:e}))),r.a.createElement(f.a,{display:"flex",justifyContent:"space-around"},r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Weapons"),d.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Weapon,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Armor"),k.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Armor,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Vehicles"),v.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Vehicle,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Rootkits"),_.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Rootkit,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Augmentations"),w.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Augmentation,upgrades:e.member.upgrades}))))}function v(){const e=Object(c.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")},r.a.createElement(h.a,null,"Discount: -",o.a.formatPercentage(1-1/e.getDiscount()))),e.members.map(e=>r.a.createElement(k,{key:e.name,member:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(914),o=a(51),s=a(938),l=a(29),c=a(44),u=a(939),m=a(470),h=a(226);function p(){const e=l.b.Player().corporation;if(null===e)return r.a.createElement(r.a.Fragment,null);const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[p,d]=Object(n.useState)("Overview");Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const f=Object.keys(o.a).filter(t=>void 0===e.divisions.find(e=>e.type===t)).length>0;return r.a.createElement(c.a.Corporation.Provider,{value:e},r.a.createElement(m.a,{variant:"fullWidth",value:p,onChange:function(e,t){d(t)}},r.a.createElement(h.a,{label:e.name,value:"Overview"}),e.divisions.map(e=>r.a.createElement(h.a,{key:e.name,label:e.name,value:e.name})),f&&r.a.createElement(h.a,{label:"Expand",value:-1})),"Overview"===p&&r.a.createElement(u.a,{rerender:a}),-1===p&&r.a.createElement(s.a,{setDivisionName:d}),"string"==typeof p&&"Overview"!==p&&r.a.createElement(i.a,{rerender:a,divisionName:p+""}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(915),o=a(44),s=a(23);function l(e){const t=Object(o.b)(),a="Overview"!==e.divisionName?t.divisions.find(t=>t.name===e.divisionName):void 0;if(void 0===a)throw new Error("Cannot find division");return r.a.createElement(o.a.Division.Provider,{value:a},r.a.createElement(i.a,{rerender:e.rerender,city:s.a.Sector12}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(916),o=a(937),s=a(44),l=a(470),c=a(226);function u(e){const t=Object(s.c)(),[a,u]=Object(n.useState)(e.city),m=t.offices[a];if(0===m)return u("Sector-12"),r.a.createElement(r.a.Fragment,null);const h=Object.keys(t.offices).filter(e=>0===t.offices[e]).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"fullWidth",value:a,onChange:function(e,t){u(t)}},Object.values(t.offices).map(e=>0!==e&&r.a.createElement(c.a,{key:e.loc,label:e.loc,value:e.loc})),h&&r.a.createElement(c.a,{label:"Expand",value:"Expand"})),"Expand"!==a?r.a.createElement(i.a,{key:a,rerender:e.rerender,city:a,warehouse:t.warehouses[a],office:m}):r.a.createElement(o.a,{cityStateSetter:u}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(917),o=a(920),s=a(923),l=a(29),c=a(44),u=a(32);function m(e){const t=l.b.Player(),a=Object(c.b)(),n=Object(c.c)();return r.a.createElement(u.a,{display:"flex"},r.a.createElement(u.a,{sx:{width:"50%"}},r.a.createElement(o.a,{rerender:e.rerender,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{rerender:e.rerender,office:e.office})),r.a.createElement(u.a,{sx:{width:"50%"}},r.a.createElement(s.a,{rerender:e.rerender,player:t,corp:a,currentCity:e.city,division:n,warehouse:e.warehouse})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return A}));var n=a(0),r=a.n(n),i=a(52),o=a(4),s=a(918),l=a(919),c=a(16),u=a(44),m=a(1),h=a(10),p=a(94),d=a(73),f=a(528),g=a.n(f),y=a(529),b=a.n(y),E=a(26),k=a(75),v=a(116),_=a(236),w=a(169),S=a(56),C=a(39);function x(e,t){let a=0;for(let n=0;ne.switchMode(e=>!e)},"Switch to Auto Mode")):r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")},r.a.createElement(h.a,{onClick:()=>e.switchMode(e=>!e)},"Switch to Manual Mode"))}function M(e){const t=Object(u.b)(),a=Object(u.c)(),[s,l]=Object(n.useState)(e.office.employees.length>0?e.office.employees[0]:null),h=[];for(let t=0;t0&&(f=l/e.office.employees.length,g=h/e.office.employees.length,y=p/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Unassigned Employees:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,n))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Avg Employee Morale:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(f,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Avg Employee Happiness:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(g,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Avg Employee Energy:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(y,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Total Employee Salary:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,r.a.createElement(c.a,{money:d})))),s&&r.a.createElement(r.a.Fragment,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"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(m.a,null,"Material Production:"))),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"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(m.a,null,"Product Production:"))),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"The effect this office's 'Business' employees has on boosting sales")},r.a.createElement(m.a,null," Business Multiplier:"))),r.a.createElement(C.b,null,r.a.createElement(m.a,null,"x",o.a.format(a.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(T,{rerender:e.rerender,office:e.office,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,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(T,{rerender:e.rerender,office:e.office,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,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 A(e){const t=Object(u.b)(),a=Object(u.c)(),[i,o]=Object(n.useState)(!1),[c,p]=Object(n.useState)(!1),[f,g]=Object(n.useState)(!1);return r.a.createElement(d.a,null,r.a.createElement(m.a,null,"Office Space"),r.a.createElement(m.a,null,"Size: ",e.office.employees.length," / ",e.office.size," employees"),r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Automatically hires an employee and gives him/her a random name")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:e.office.atCapacity(),onClick:function(){e.office.atCapacity()||(e.office.hireRandomEmployee(),e.rerender())}},"Hire Employee"))),r.a.createElement("br",null),r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Upgrade the office's size so that it can hold more employees!")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:t.funds<0,onClick:()=>o(!0)},"Upgrade size"))),r.a.createElement(s.a,{rerender:e.rerender,office:e.office,open:i,onClose:()=>o(!1)}),!a.hasResearch("AutoPartyManager")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Throw an office party to increase your employee's morale and happiness")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:t.funds<0,onClick:()=>p(!0)},"Throw Party"))),r.a.createElement(l.a,{rerender:e.rerender,office:e.office,open:c,onClose:()=>p(!1)})),r.a.createElement("br",null),r.a.createElement(O,{manualMode:f,switchMode:g}),f?r.a.createElement(M,{rerender:e.rerender,office:e.office}):r.a.createElement(R,{rerender:e.rerender,office:e.office}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(42),s=a(71),l=a(41),c=a(44),u=a(1),m=a(10),h=a(26),p=a(32);function d(e){const t=Object(c.b)();return r.a.createElement(h.a,{title:i.a.formatMoney(e.cost)},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:t.funds{return a=e.cost,n=e.size,void(t.funds=m);){const e=Math.pow(1.09,a+h);if(i+e>m)break;i+=e,++h}const f=o.a.OfficeInitialCost*i;return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,null,"Increase the size of your office space to fit additional employees!"),r.a.createElement(p.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,null,"Upgrade size: "),r.a.createElement(d,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:n,size:o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:s,size:5*o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:f,size:h*o.a.OfficeInitialSize})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(71),l=a(16),c=a(41),u=a(44),m=a(1),h=a(10),p=a(82),d=a(32);function f(e){const t=Object(u.b)(),[a,f]=Object(n.useState)(0),g=a*e.office.employees.length,y=t.funds>=g;function b(){if(null===a||isNaN(a)||a<0)Object(o.a)("Invalid value entered");else if(y){const n=Object(s.w)(t,e.office,a);Object(o.a)("You threw a party for the office! The morale and happiness of each employee increased by "+i.a.formatPercentage(n-1)),e.rerender(),e.onClose()}else Object(o.a)("You don't have enough company funds to throw a party!")}function E(){return isNaN(a)||a<0?r.a.createElement(m.a,null,"Invalid value entered!"):r.a.createElement(m.a,null,"Throwing this party will cost a total of ",r.a.createElement(l.a,{money:g}))}return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(m.a,null,"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"),r.a.createElement(E,null),r.a.createElement(d.a,{display:"flex",alignItems:"center"},r.a.createElement(p.a,{autoFocus:!0,type:"number",placeholder:"$ / employee",value:a,onChange:function(e){let t=parseFloat(e.target.value);isNaN(t)&&(t=0),f(t)},onKeyDown:function(e){13===e.keyCode&&b()}}),r.a.createElement(h.a,{disabled:!y,onClick:b},"Throw Party")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var n=a(0),r=a.n(n),i=a(51),o=a(335),s=a(4),l=a(170),c=a(921),u=a(922),m=a(16),h=a(98),p=a(123),d=a(398),f=a(129),g=a(44),y=a(1),b=a(10),E=a(26),k=a(73),v=a(94),_=a(265),w=a.n(_),S=a(32);function C(){const e=Object(g.b)(),t=Object(g.c)(),[a,o]=Object(n.useState)(!1),s=t.hasMaximumNumberProducts();let l="";switch(t.type){case i.a.Food:l="Build Restaurant";break;case i.a.Tobacco:l="Create Product";break;case i.a.Pharmaceutical:l="Create Drug";break;case i.a.Computer:case"Computer":l="Create Product";break;case i.a.Robotics:l="Design Robot";break;case i.a.Software:l="Develop Software";break;case i.a.Healthcare:l="Build Hospital";break;case i.a.RealEstate:l="Develop Property";break;default:return l="Create Product",r.a.createElement(r.a.Fragment,null)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:s?r.a.createElement(y.a,null,"You have reached the maximum number of products: ",t.getMaximumNumberProducts()):""},r.a.createElement(b.a,{color:0===Object.keys(t.products).length?"error":"primary",onClick:()=>o(!0),disabled:e.funds<0},l)),r.a.createElement(c.a,{open:a,onClose:()=>o(!1)}))}function x(){const e=Object(g.b)(),t=Object(g.c)(),[a,i]=Object(n.useState)(!1),[o,c]=Object(n.useState)(!1),f=1===e.unlockUpgrades[4],k=t.lastCycleRevenue-t.lastCycleExpenses;let _=!1;const C=t.getAdvertisingFactors(),x=C[1],O=C[2],M=C[3],T=C[0];function R(e){return Object(l.a)({progress:e,totalTicks:20})}return f&&(_=!0),r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Industry: ",t.type," (Corp Funds: ",r.a.createElement(m.a,{money:e.funds}),")"),r.a.createElement("br",null),r.a.createElement(p.a,{rows:[["Awareness:",s.a.format(t.awareness,"0.000")],["Popularity:",s.a.format(t.popularity,"0.000")]]}),!1!==_&&r.a.createElement(E.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Total multiplier for this industrys sales due to its awareness and popularity"),r.a.createElement(p.a,{rows:[["Awareness Bonus:","x"+s.a.format(Math.pow(x,.85),"0.000")],["Popularity Bonus:","x"+s.a.format(Math.pow(O,.85),"0.000")],["Ratio Multiplier:","x"+s.a.format(Math.pow(M,.85),"0.000")]]}))},r.a.createElement(y.a,null,"Advertising Multiplier: x",s.a.format(T,"0.000"))),r.a.createElement("br",null),r.a.createElement(p.a,{rows:[["Revenue:",r.a.createElement(h.a,{money:t.lastCycleRevenue})],["Expenses:",r.a.createElement(h.a,{money:t.lastCycleExpenses})],["Profit:",r.a.createElement(h.a,{money:k})]]}),r.a.createElement("br",null),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate.")},r.a.createElement(y.a,null,"Production Multiplier: ",s.a.format(t.prodMult,"0.00"))),r.a.createElement(v.a,{onClick:()=>i(!0)},r.a.createElement(w.a,null)),r.a.createElement(d.a,{open:a,onClose:()=>i(!1)},r.a.createElement(y.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):",r.a.createElement("br",null),r.a.createElement("br",null),"Hardware:    ",R(t.hwFac),r.a.createElement("br",null),"Robots:      ",R(t.robFac),r.a.createElement("br",null),"AI Cores:    ",R(t.aiFac),r.a.createElement("br",null),"Real Estate: ",R(t.reFac)))),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Scientific Research increases the quality of the materials and products that you produce.")},r.a.createElement(y.a,null,"Scientific Research: ",s.a.format(t.sciResearch.qty,"0.000a"))),r.a.createElement(b.a,{sx:{mx:1},onClick:()=>c(!0)},"Research"),r.a.createElement(u.a,{open:o,onClose:()=>c(!1),industry:t})))}function O(e){const t=Object(g.b)(),a=Object(g.c)(),n=[];for(const s in o.a){const l=o.a[s];if(a.hasResearch("AutoBrew")&&"Coffee"===l[4])continue;const c=l[0],u=l[1],m=l[2];let h=0;switch(c){case 0:h=e.office.employees.length*u;break;default:h=u*Math.pow(m,a.upgrades[c])}function i(){t.funds0!==a.offices[e]),[g,y]=Object(n.useState)(f.length>0?f[0]:""),[b,E]=Object(n.useState)(""),[k,v]=Object(n.useState)(null),[_,w]=Object(n.useState)(null);if(a.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);let S=r.a.createElement(r.a.Fragment,null);switch(a.type){case s.a.Food:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Build and manage a new restaurant!");break;case s.a.Tobacco:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Create a new tobacco product!");break;case s.a.Pharmaceutical:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Design and develop a new pharmaceutical drug!");break;case s.a.Computer:case"Computer":S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Design and manufacture a new computer hardware product!");break;case s.a.Robotics:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Design and create a new robot or robotic system!");break;case s.a.Software:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Develop a new piece of software!");break;case s.a.Healthcare:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Build and manage a new hospital!");break;case s.a.RealEstate:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Develop a new piece of real estate property!");break;default:return S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Create a new product!"),r.a.createElement(r.a.Fragment,null)}function C(){if(null!==k&&null!==_){try{Object(l.j)(t,a,g,b,k,_)}catch(e){Object(i.a)(e+"")}e.onClose()}}return S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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."),r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,null,S),r.a.createElement(d.a,{style:{margin:"5px"},onChange:function(e){y(e.target.value)},defaultValue:g},f.map(e=>r.a.createElement(p.a,{key:e,value:e},e))),r.a.createElement(m.a,{onChange:function(e){E(e.target.value)},placeholder:(x=a.type,x===s.a.Food?"Restaurant Name":x===s.a.Healthcare?"Hospital Name":x===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement(m.a,{onChange:function(e){""===e.target.value?v(null):v(parseFloat(e.target.value))},autoFocus:!0,type:"number",placeholder:"Design investment"}),r.a.createElement(m.a,{onChange:function(e){""===e.target.value?w(null):w(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&C()},type:"number",placeholder:"Marketing investment"}),r.a.createElement(h.a,{onClick:C},"Develop Product"));var x}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(41),o=a(51),s=a(42),l=a(71),c=a(288),u=a(15),m=a(1),h=a(26),p=a(10),d=a(32),f=a(302),g=a(97),y=a(189),b=a(70),E=a.n(b),k=a(134),v=a.n(k);function _({n:e,division:t}){const[a,i]=Object(n.useState)(!1);if(null===e)return r.a.createElement(r.a.Fragment,null);const o=c.a[e.text];let b=t.sciResearch.qtyi(e=>!e)},r.a.createElement(g.a,null),a?r.a.createElement(v.a,{color:"primary"}):r.a.createElement(E.a,{color:"primary"}))),r.a.createElement(y.a,{in:a,unmountOnExit:!0},r.a.createElement(d.a,{m:4},e.children.map(e=>r.a.createElement(_,{key:e.text,division:t,n:e})))))}function w(e){const t=o.c[e.industry.type];return void 0===t?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(_,{division:e.industry,n:t.root}),r.a.createElement(m.a,null,"Research points: ",e.industry.sciResearch.qty.toFixed(3),r.a.createElement("br",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(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(0),r=a.n(n),i=a(42),o=a(175),s=a(357),l=a(219),c=a(924),u=a(925),m=a(930),h=a(164),p=a(4),d=a(129),f=a(935),g=a(936),y=a(71),b=a(44),E=a(1),k=a(26),v=a(73),_=a(10),w=a(32);function S(e){const t=Object(b.b)(),a=Object(b.c)(),[l,y]=Object(n.useState)(!1);if(0===e.warehouse)return r.a.createElement(r.a.Fragment,null);const S=i.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),C=t.funds>S;let x;switch(a.state){case"START":x="Current state: Preparing...";break;case"PURCHASE":x="Current state: Purchasing materials...";break;case"PRODUCTION":x="Current state: Producing materials and/or products...";break;case"SALE":x="Current state: Selling materials and/or products...";break;case"EXPORT":x="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+a.state)}const O=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof o.a&&Object(f.a)(t,a)&&O.push(r.a.createElement(m.a,{rerender:e.rerender,city:e.currentCity,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const M=[];if(a.makesProducts&&Object.keys(a.products).length>0)for(const t in a.products){const n=a.products[t];n instanceof s.a&&M.push(r.a.createElement(u.a,{rerender:e.rerender,city:e.currentCity,key:t,product:n}))}let T=r.a.createElement(r.a.Fragment,null);for(const t in e.warehouse.materials){const a=e.warehouse.materials[t];h.a.hasOwnProperty(t)&&(0!==a.qty&&(T=r.a.createElement(r.a.Fragment,null,T,t,": ",p.a.format(a.qty*h.a[t],"0,0.0"),r.a.createElement("br",null))))}for(const t in a.products){const n=a.products[t];void 0!==n&&(T=r.a.createElement(r.a.Fragment,null,T,t,": ",p.a.format(n.data[e.warehouse.loc][0]*n.siz,"0,0.0")))}return r.a.createElement(v.a,null,r.a.createElement(w.a,{display:"flex",alignItems:"center"},r.a.createElement(k.a,{title:0!==e.warehouse.sizeUsed?r.a.createElement(E.a,null,T):""},r.a.createElement(E.a,{color:e.warehouse.sizeUsed>=e.warehouse.size?"error":"primary"},"Storage: ",p.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",p.a.formatBigNumber(e.warehouse.size))),r.a.createElement(_.a,{disabled:!C,onClick:function(){null!==a&&0!==e.warehouse&&C&&(++e.warehouse.level,e.warehouse.updateSize(t,a),t.funds=t.funds-S,e.rerender())}},"Upgrade Warehouse Size - ",r.a.createElement(d.a,{money:S,corp:t}))),r.a.createElement(E.a,null,"This industry uses the following equation for it's production: "),r.a.createElement("br",null),r.a.createElement(E.a,null,r.a.createElement(g.a,{key:a.name,division:a})),r.a.createElement("br",null),r.a.createElement(E.a,null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),r.a.createElement("br",null),r.a.createElement(E.a,null,x),t.unlockUpgrades[1]&&r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{onClick:()=>y(!0)},"Configure Smart Supply"),r.a.createElement(c.a,{open:l,onClose:()=>y(!1),warehouse:e.warehouse})),O,M)}function C(e){return e.warehouse instanceof l.a?r.a.createElement(S,e):r.a.createElement(x,{rerender:e.rerender,city:e.currentCity})}function x(e){const t=Object(b.b)(),a=Object(b.c)(),n=t.funds!e)}}),label:r.a.createElement(u.a,null,"Enable Smart Supply")}),r.a.createElement("br",null),r.a.createElement(u.a,null,"Use materials already in the warehouse instead of buying new ones, if available:"),s))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ProductElem}));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__(42),_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(926),_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(927),_SellProductModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(928),_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(929),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(122),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(16),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(44),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(26),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(73),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(32);function ProductElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[sellOpen,setSellOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[limitOpen,setLimitOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[discontinueOpen,setDiscontinueOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[marketTaOpen,setMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),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_7__.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_6__.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_6__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_8__.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_8__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.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_8__.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_8__.a,{money:product.sCost}));let limitProductionButtonText="Limit Production";return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prdman[city][1],nf)+")"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,product.fin?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(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB)," /s")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_6__.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_6__.a.format(product.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rat,nf)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"An estimate of the material cost it takes to create this Product.")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost))))):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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prog,"0.00"),"% complete")),(hasUpgradeDashboard||product.fin)&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setSellOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellProductModal__WEBPACK_IMPORTED_MODULE_4__.a,{product:product,city:city,open:sellOpen,onClose:()=>setSellOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setLimitOpen(!0)},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__.a,{product:product,city:city,open:limitOpen,onClose:()=>setLimitOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setDiscontinueOpen(!0)},"Discontinue"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__.a,{product:product,rerender:props.rerender,open:discontinueOpen,onClose:()=>setDiscontinueOpen(!1)}),division.hasResearch("Market-TA.I")&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__.a,{product:product,open:marketTaOpen,onClose:()=>setMarketTaOpen(!1)}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(41),o=a(44),s=a(1),l=a(10);function c(e){const t=Object(o.c)();return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,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(l.a,{onClick:function(){t.discontinueProduct(e.product),e.onClose(),e.rerender()}},"Discontinue"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(71),o=a(41),s=a(1),l=a(10),c=a(82);function u(e){const[t,a]=Object(n.useState)(null);function u(){let a=t;null===a&&(a=-1),Object(i.i)(e.product,e.city,a),e.onClose()}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,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(c.a,{autoFocus:!0,placeholder:"Limit",type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&u()}}),r.a.createElement(l.a,{onClick:u},"Limit production"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(41),l=a(1),c=a(82),u=a(10),m=a(161),h=a(147);function p(e){const[t,a]=Object(n.useState)(!0),[p,d]=Object(n.useState)(e.product.sllman[e.city][1]?e.product.sllman[e.city][1]:""),[f,g]=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 y(){try{Object(o.p)(e.product,e.city,p,f,t)}catch(e){Object(i.a)(e+"")}e.onClose()}function b(e){13===e.keyCode&&y()}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,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(c.a,{value:p,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(e){d(e.target.value)},onKeyDown:b}),r.a.createElement(c.a,{value:f,type:"text",placeholder:"Sell price",onChange:function(e){g(e.target.value)},onKeyDown:b}),r.a.createElement(u.a,{onClick:y},"Confirm"),r.a.createElement(m.a,{control:r.a.createElement(h.a,{checked:t,onChange:function(e){a(e.target.checked)}}),label:r.a.createElement(l.a,null,"Use same 'Sell Amount' for all cities")}))}},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(41),s=a(44),l=a(1),c=a(82),u=a(161),m=a(147),h=a(26);function p(e){if(!Object(s.c)().hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const t=e.product.rat/e.product.mku,[a,o]=Object(n.useState)(e.product.pCost),p=Object(n.useState)(!1)[1];const d=a;let f=1;return d>e.product.pCost&&d-e.product.pCost>t&&(f=t/(d-e.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.II"),r.a.createElement("br",null),r.a.createElement(l.a,null,"If you sell at ",i.a.formatMoney(d),", then you will sell"," ",i.a.format(f,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement(c.a,{type:"number",onChange:function(e){o(parseFloat(e.target.value))},value:a}),r.a.createElement("br",null),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e.product.marketTa2,onChange:function(t){e.product.marketTa2=t.target.checked,p(e=>!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(e){const t=e.product.rat/e.product.mku,a=Object(n.useState)(!1)[1];return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,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(u.a,{control:r.a.createElement(m.a,{checked:e.product.marketTa1,onChange:function(t){e.product.marketTa1=t.target.checked,a(e=>!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(p,{product:e.product}))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return MaterialElem}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_OfficeSpace__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(334),_ExportModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(931),_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(932),_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(933),_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(934),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(122),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(16),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(44),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(26),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(73),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(32);function MaterialElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[purchaseMaterialOpen,setPurchaseMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[exportOpen,setExportOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[sellMaterialOpen,setSellMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[materialMarketTaOpen,setMaterialMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_1__.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_6__.a.format(mat.buy,nfB)})`;let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.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_6__.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_6__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_8__.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_8__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.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_8__.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_8__.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)");return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_6__.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_6__.a.format(mat.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(mat.bCost))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"The quality of your material. Higher quality will lead to more sales")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qlt,"0.00a")))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:tutorial?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Purchase your required materials to get production started!"):""},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:tutorial?"error":"primary",onClick:()=>setPurchaseMaterialOpen(!0),disabled:props.warehouse.smartSupplyEnabled&&Object.keys(division.reqMats).includes(props.mat.name)},purchaseButtonText))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__.a,{mat:mat,warehouse:warehouse,open:purchaseMaterialOpen,onClose:()=>setPurchaseMaterialOpen(!1)}),1===corp.unlockUpgrades[0]&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setExportOpen(!0)},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ExportModal__WEBPACK_IMPORTED_MODULE_2__.a,{mat:mat,open:exportOpen,onClose:()=>setExportOpen(!1)})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:division.prodMats.includes(props.mat.name)&&!mat.sllman[0]?"error":"primary",onClick:()=>setSellMaterialOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__.a,{mat:mat,open:sellMaterialOpen,onClose:()=>setSellMaterialOpen(!1)}),division.hasResearch("Market-TA.I")&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMaterialMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__.a,{mat:mat,open:materialMarketTaOpen,onClose:()=>setMaterialMarketTaOpen(!1)})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(41),l=a(44),c=a(1),u=a(82),m=a(10),h=a(32),p=a(75),d=a(116);function f(e){const t=Object(l.b)();if(0===t.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(t.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[a,f]=Object(n.useState)(t.divisions[0].name),[g,y]=Object(n.useState)(Object.keys(t.divisions[0].warehouses)[0]),[b,E]=Object(n.useState)(""),k=Object(n.useState)(!1)[1];function v(t){for(let a=0;a!e)}const _=t.divisions.find(e=>e.name===a);if(void 0===_)throw new Error(`Export popup somehow ended up with undefined division '${_}'`);const w=Object.keys(_.warehouses).filter(e=>0!==_.warehouses[e]);return w.length>0&&!w.includes(g)&&y(w[0]),r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(d.a,{onChange:function(e){const a=e.target.value;f(a),y(Object.keys(t.divisions[0].warehouses)[0])},value:a},t.divisions.map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))),r.a.createElement(d.a,{onChange:function(e){y(e.target.value)},value:g},w.map(e=>{if(0!==_.warehouses[e])return r.a.createElement(p.a,{key:e,value:e},e)})),r.a.createElement(u.a,{placeholder:"Export amount / s",onChange:function(e){E(e.target.value)},value:b}),r.a.createElement(m.a,{onClick:function(){try{Object(o.e)(a,g,e.mat,b)}catch(e){Object(i.a)(e+"")}e.onClose()}},"Export"),r.a.createElement(c.a,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(h.a,{display:"flex",alignItems:"center",key:t},r.a.createElement(m.a,{sx:{mx:2},onClick:()=>v(e)},"delete"),r.a.createElement(c.a,null,"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 d}));var n=a(0),r=a.n(n),i=a(4),o=a(41),s=a(44),l=a(1),c=a(82),u=a(161),m=a(147),h=a(26);function p(e){if(!Object(s.c)().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 p=e.mat.getMarkupLimit();const d=t;let f=1;return d>e.mat.bCost?d-e.mat.bCost>p&&(f=Math.pow(p/(d-e.mat.bCost),2)):d!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(e){const t=Object(n.useState)(!1)[1];const a=e.mat.getMarkupLimit();return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,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(u.a,{control:r.a.createElement(m.a,{checked:e.mat.marketTa1,onChange:function(a){e.mat.marketTa1=a.target.checked,t(e=>!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(p,{mat:e.mat}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(41),l=a(1),c=a(82),u=a(10);function m(e){const[t,a]=Object(n.useState)(e.mat.sllman[1]?e.mat.sllman[1]+"":""),[m,h]=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 p(){try{Object(o.o)(e.mat,t,m)}catch(e){Object(i.a)(e+"")}e.onClose()}function d(e){13===e.keyCode&&p()}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,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(c.a,{value:t,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(e){a(e.target.value)},onKeyDown:d}),r.a.createElement(c.a,{value:m,type:"text",placeholder:"Sell price",onChange:function(e){h(e.target.value)},onKeyDown:d}),r.a.createElement(u.a,{onClick:p},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(15),o=a(164),s=a(4),l=a(71),c=a(41),u=a(44),m=a(1),h=a(82),p=a(10);function d(e){const t=parseFloat(e.amount),a=t*e.mat.bCost,n=o.a[e.mat.name];return t*n>(e.warehouse.size-e.warehouse.sizeUsed)/n?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{color:"error"},"Not enough warehouse space to purchase this amount")):isNaN(a)?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{color:"error"},"Invalid put for Bulk Purchase amount")):r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,"Purchasing ",s.a.format(t,"0,0.00")," of ",e.mat.name," will cost"," ",s.a.formatMoney(a)))}function f(e){const t=Object(u.b)(),[a,s]=Object(n.useState)("");function l(){const n=parseFloat(a),r=o.a[e.mat.name];if(n*r>(e.warehouse.size-e.warehouse.sizeUsed)/r)Object(i.a)("You do not have enough warehouse size to fit this purchase");else if(isNaN(n))Object(i.a)("Invalid input amount");else{const a=n*e.mat.bCost;if(!(t.funds>=a))return void Object(i.a)("You cannot afford this purchase.");t.funds=t.funds-a,e.mat.qty+=n,e.onClose()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,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(d,{warehouse:e.warehouse,mat:e.mat,amount:a}),r.a.createElement(h.a,{value:a,onChange:function(e){s(e.target.value)},type:"number",placeholder:"Bulk Purchase amount",onKeyDown:function(e){13===e.keyCode&&l()}}),r.a.createElement(p.a,{onClick:l},"Confirm Bulk Purchase"))}function g(e){const t=Object(u.c)(),[a,o]=Object(n.useState)(e.mat.buy?e.mat.buy:0);function s(){if(null!==a){try{Object(l.c)(e.mat,a)}catch(e){Object(i.a)(e+"")}e.onClose()}}return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,"Enter the amount of ",e.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement(h.a,{value:a,onChange:function(e){o(parseFloat(e.target.value))},autoFocus:!0,placeholder:"Purchase amount",type:"number",onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement(p.a,{onClick:s},"Confirm"),r.a.createElement(p.a,{onClick:function(){e.mat.buy=0,e.onClose()}},"Clear Purchase"),t.hasResearch("Bulk Purchasing")&&r.a.createElement(f,{onClose:e.onClose,mat:e.mat,warehouse:e.warehouse})))}},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(153);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(i.MathJaxContext,null,r.a.createElement(i.MathJax,null,"\\("+t.join("+")+"\\Rightarrow"+a.map(e=>`1 \\text{${e}}`).join("+")+"\\)"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(42),o=a(15),s=a(71),l=a(129),c=a(44),u=a(1),m=a(75),h=a(116),p=a(10);function d(e){const t=Object(c.b)(),a=Object(c.c)(),d=Object.keys(a.offices).filter(e=>0===a.offices[e]),[f,g]=Object(n.useState)(d[0]),y=t.fundsr.a.createElement(m.a,{key:e,value:e},e))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(15),o=a(51),s=a(44),l=a(71),c=a(1),u=a(10),m=a(82),h=a(75),p=a(32),d=a(116);function f(e){const t=Object(s.b)(),a=Object.keys(o.a).sort().filter(e=>void 0===t.divisions.find(t=>t.type===e)).sort(),[f,g]=Object(n.useState)(a.length>0?a[0]:""),[y,b]=Object(n.useState)(""),E=o.d[f];if(void 0===E)throw new Error(`Invalid industry: '${f}'`);const k=t.fundsr.a.createElement(h.a,{key:e,value:e},e))),r.a.createElement(c.a,null,_(t)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,"Division name:"),r.a.createElement(p.a,{display:"flex",alignItems:"center"},r.a.createElement(m.a,{autoFocus:!0,value:y,onChange:function(e){b(e.target.value)},onKeyDown:function(e){13===e.keyCode&&v()},type:"text",InputProps:{endAdornment:r.a.createElement(u.a,{disabled:k,sx:{mx:1},onClick:v},"Expand")}})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var n=a(0),r=a.n(n),i=a(940),o=a(941),s=a(942),l=a(943),c=a(944),u=a(945),m=a(946),h=a(947),p=a(948),d=a(24),f=a(42),g=a(394),y=a(395),b=a(8),E=a(4),k=a(22),v=a(16),_=a(98),w=a(123),S=a(29),C=a(44),x=a(1),O=a(26),M=a(10),T=a(32),R=a(73),A=a(46);function P({rerender:e}){const t=S.b.Player(),a=Object(C.b)(),n=a.revenue-a.expenses,i=[];function o(e,t){1!==t&&i.push([e,E.a.format(t,"0.000")])}return o("Production Multiplier: ",a.getProductionMultiplier()),o("Storage Multiplier: ",a.getStorageMultiplier()),o("Advertising Multiplier: ",a.getAdvertisingMultiplier()),o("Empl. Creativity Multiplier: ",a.getEmployeeCreMultiplier()),o("Empl. Charisma Multiplier: ",a.getEmployeeChaMultiplier()),o("Empl. Intelligence Multiplier: ",a.getEmployeeIntMultiplier()),o("Empl. Efficiency Multiplier: ",a.getEmployeeEffMultiplier()),o("Sales Multiplier: ",a.getSalesMultiplier()),o("Scientific Research Multiplier: ",a.getScientificResearchMultiplier()),r.a.createElement(r.a.Fragment,null,r.a.createElement(w.a,{rows:[["Total Funds:",r.a.createElement(v.a,{money:a.funds})],["Total Revenue:",r.a.createElement(_.a,{money:a.revenue})],["Total Expenses:",r.a.createElement(_.a,{money:a.expenses})],["Publicly Traded:",a.public?"Yes":"No"],["Owned Stock Shares:",E.a.format(a.numShares,"0.000a")],["Stock Price:",a.public?r.a.createElement(v.a,{money:a.sharePrice}):"N/A"]]}),r.a.createElement("br",null),r.a.createElement(T.a,{display:"flex"},r.a.createElement(O.a,{title:r.a.createElement(w.a,{rows:[["Outstanding Shares:",E.a.format(a.issuedShares,"0.000a")],["Private Shares:",E.a.format(a.totalShares-a.issuedShares-a.numShares,"0.000a")]]})},r.a.createElement(x.a,null,"Total Stock Shares: ",E.a.format(a.totalShares,"0.000a")))),r.a.createElement("br",null),r.a.createElement(j,{profit:n}),r.a.createElement("br",null),r.a.createElement(w.a,{rows:i}),r.a.createElement("br",null),r.a.createElement(B,null),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"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.")},r.a.createElement(M.a,{onClick:()=>a.getStarterGuide(t)},"Getting Started Guide")),a.public?r.a.createElement(F,{rerender:e}):r.a.createElement(N,{rerender:e}),r.a.createElement(D,null),r.a.createElement("br",null),r.a.createElement(I,{rerender:e}))}function N({rerender:e}){const t=Object(C.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),l=t.fundingRound<4,c=l?"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company":"";return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{title:r.a.createElement(x.a,null,c)},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:!l,onClick:()=>i(!0)},"Find Investors"))),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"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(M.a,{onClick:()=>s(!0)},"Go Public")),r.a.createElement(h.a,{open:a,onClose:()=>i(!1),rerender:e}),r.a.createElement(p.a,{open:o,onClose:()=>s(!1),rerender:e}),r.a.createElement("br",null))}function I({rerender:e}){const t=Object(C.b)();return t.divisions.length<=0?r.a.createElement(x.a,{variant:"h4"},"Upgrades are unlocked once you create an industry."):r.a.createElement(r.a.Fragment,null,r.a.createElement(R.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Unlocks"),r.a.createElement(A.a,{container:!0},Object.values(g.a).filter(e=>!t.unlockUpgrades[e[0]]).map(t=>r.a.createElement(o.a,{rerender:e,upgradeData:t,key:t[0]})))),r.a.createElement(R.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Upgrades"),r.a.createElement(A.a,{container:!0},t.upgrades.map((e,t)=>y.a[t]).map(t=>r.a.createElement(i.a,{rerender:e,upgrade:t,key:t[0]})))))}function F({rerender:e}){const t=Object(C.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),[h,p]=Object(n.useState)(!1),[d,f]=Object(n.useState)(!1),g=t.shareSaleCooldown>0,y=g?"Cannot sell shares for "+t.convertCooldownToString(t.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.",b=t.issueNewSharesCooldown>0,E=b?"Cannot issue new shares for "+t.convertCooldownToString(t.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{title:r.a.createElement(x.a,null,y)},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:g,onClick:()=>i(!0)},"Sell Shares"))),r.a.createElement(l.a,{open:a,onClose:()=>i(!1),rerender:e}),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"Buy back shares you that previously issued or sold at market price.")},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:t.issuedShares<1,onClick:()=>s(!0)},"Buyback shares"))),r.a.createElement(c.a,{open:o,onClose:()=>s(!1),rerender:e}),r.a.createElement("br",null),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,E)},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:b,onClick:()=>p(!0)},"Issue New Shares"))),r.a.createElement(m.a,{open:h,onClose:()=>p(!1)}),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"Manage the dividends that are paid out to shareholders (including yourself)")},r.a.createElement(M.a,{onClick:()=>f(!0)},"Issue Dividends")),r.a.createElement(u.a,{open:d,onClose:()=>f(!1)}),r.a.createElement("br",null))}function D(){const e=S.b.Player(),t=Object(C.b)(),[a,i]=Object(n.useState)(!1),o=t.determineValuation()>=f.a.BribeThreshold&&e.factions.filter(e=>d.a[e].getInfo().offersWork()).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{title:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:!o,onClick:function(){o&&i(!0)}},"Bribe Factions"))),r.a.createElement(s.a,{open:a,onClose:()=>i(!1)}))}function j({profit:e}){const t=Object(C.b)();if(t.dividendPercentage<=0||e<=0)return r.a.createElement(r.a.Fragment,null);const a=t.dividendPercentage/100*e,n=e-a,i=a/t.totalShares;return r.a.createElement(w.a,{rows:[["Retained Profits (after dividends):",r.a.createElement(_.a,{money:n})],["Dividend Percentage:",E.a.format(t.dividendPercentage/100,"0%")],["Dividends per share:",r.a.createElement(_.a,{money:i})],["Your earnings as a shareholder:",r.a.createElement(_.a,{money:t.getDividends()})]]})}function B(){const e=Object(C.b)().storedCycles*b.a.MilliPerCycle;return e<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement(x.a,null,"Bonus time: ",Object(k.b)(e),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(129),l=a(44),c=a(1),u=a(26),m=a(10),h=a(32),p=a(46);function d(e){const t=Object(l.b)(),a=e.upgrade,n=t.upgrades[a[0]],d=a[1],f=a[2],g=d*Math.pow(f,n),y=a[5];return r.a.createElement(p.a,{item:!0,xs:4},r.a.createElement(h.a,{display:"flex",alignItems:"center",flexDirection:"row-reverse"},r.a.createElement(m.a,{disabled:t.funds!!i.a[e].getInfo().offersWork()&&!t.hasGangWith(e)),b=Object(m.b)(),[E,k]=Object(n.useState)(0),[v,_]=Object(n.useState)(0),[w,S]=Object(n.useState)(a.length>0?a[0]:""),C=null===E||null===v||0===E&&0===v||isNaN(E)||isNaN(v)||E<0||v<0||b.fundsb.numShares;function x(e,t){return(e+t*b.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(h.a,null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement(g.a,{display:"flex",alignItems:"center"},r.a.createElement(h.a,null,"Faction:"),r.a.createElement(y.a,{value:w,onChange:function(e){S(e.target.value)}},a.map(e=>{if(i.a[e].getInfo().offersWork()&&!t.hasGangWith(e))return r.a.createElement(d.a,{key:e,value:e},e)}))),r.a.createElement(h.a,null,function(e,t){return 0===e&&0===t?"":isNaN(e)||isNaN(t)||e<0||t<0?"ERROR: Invalid value(s) entered":b.fundsb.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(x(e,t))+" reputation with "+w+" with this bribe"}(E||0,v||0)),r.a.createElement(f.a,{onChange:function(e){k(parseFloat(e.target.value))},placeholder:"Corporation funds"}),r.a.createElement(f.a,{sx:{mx:1},onChange:function(e){_(parseFloat(e.target.value))},placeholder:"Stock Shares"}),r.a.createElement(p.a,{disabled:C,sx:{mx:1},onClick:()=>function(t,a){const n=i.a[w];if(C)return;const r=x(t,a);Object(l.a)("You gained "+s.a.formatReputation(r)+" reputation with "+n.name+" by bribing them."),n.playerReputation+=r,b.funds=b.funds-t,b.numShares-=a,e.onClose()}(E||0,v||0)},"Bribe"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(41),l=a(29),c=a(44),u=a(42),m=a(1),h=a(82),p=a(10),d=a(16);function f(e){const t=l.b.Player(),a=Object(c.b)(),[f,g]=Object(n.useState)(null),y=null===f||isNaN(f)||f<=0||f>a.numShares;function b(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>a.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const t=a.calculateShareSale(e.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",e.shares," shares for a total of ",i.a.formatMoney(t))}}function E(){if(null===f)return;if(y)return;const n=a.calculateShareSale(f),s=n[0],l=n[1],c=n[2];if(a.numShares-=f,isNaN(a.issuedShares)){console.error("Corporation issuedShares is NaN: "+a.issuedShares);const e=a.issuedShares;isNaN(e)?a.issuedShares=0:a.issuedShares=e}a.issuedShares+=f,a.sharePrice=l,a.shareSalesUntilPriceUpdate=c,a.shareSaleCooldown=u.a.SellSharesCooldown,t.gainMoney(s,"corporation"),e.onClose(),Object(o.a)(r.a.createElement(r.a.Fragment,null,"Sold ",i.a.formatMoney(f)," shares for",r.a.createElement(d.a,{money:s}),". The corporation's stock price fell to  ",r.a.createElement(d.a,{money:a.sharePrice}),"as a result of dilution.")),e.rerender()}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(m.a,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(a.sharePrice)),r.a.createElement(b,{shares:f,corp:a}),r.a.createElement("br",null),r.a.createElement(h.a,{variant:"standard",autoFocus:!0,type:"number",placeholder:"Shares to sell",onChange:function(e){""===e.target.value?g(null):g(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&E()}}),r.a.createElement(p.a,{disabled:y,onClick:E,sx:{mx:1}},"Sell shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(41),o=a(4),s=a(29),l=a(44),c=a(1),u=a(10),m=a(82);function h(e){const t=s.b.Player(),a=Object(l.b)(),[h,p]=Object(n.useState)(null);const d=1.1*a.sharePrice,f=null===h||isNaN(h)||h<=0||h>a.issuedShares||h*d>t.money;function g(){if(!f&&null!==h){if(a.numShares+=h,isNaN(a.issuedShares)){console.warn("Corporation issuedShares is NaN: "+a.issuedShares),console.warn("Converting to number now");const e=a.issuedShares;isNaN(e)?a.issuedShares=0:a.issuedShares=e}a.issuedShares-=h,t.loseMoney(h*d,"corporation"),e.onClose(),e.rerender()}}function y(){return null===h?r.a.createElement(r.a.Fragment,null):isNaN(h)||h<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):h>a.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(a.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",h," shares for a total of ",o.a.formatMoney(h*d))}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(d),". Your company currently has ",o.a.formatBigNumber(a.issuedShares)," outstanding stock shares."),r.a.createElement(y,null),r.a.createElement("br",null),r.a.createElement(m.a,{autoFocus:!0,type:"number",placeholder:"Shares to buyback",onChange:function(e){""===e.target.value?p(null):p(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&g()}}),r.a.createElement(u.a,{disabled:f,onClick:g},"Buy shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(15),o=a(41),s=a(42),l=a(71),c=a(44),u=a(1),m=a(82),h=a(10);function p(e){const t=Object(c.b)(),[a,p]=Object(n.useState)(0),d=!isNaN(a)&&a>=0&&a<=100*s.a.DividendMaxPercentage;function f(){if(d&&null!==a){try{Object(l.g)(t,a/100)}catch(e){Object(i.a)(e+"")}e.onClose()}}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,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 100. (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),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(m.a,{autoFocus:!0,value:a,onChange:function(e){if(""===e.target.value)p(0);else{let t=parseFloat(e.target.value);t>100&&(t=100),t<0&&(t=0),p(t)}},onKeyDown:function(e){13===e.keyCode&&f()},placeholder:"Dividend %",type:"number"}),r.a.createElement(h.a,{disabled:!d,sx:{mx:1},onClick:f},"Allocate Dividend Percentage"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(41),l=a(31),c=a(42),u=a(44),m=a(1),h=a(82),p=a(10);function d(e){const t=Object(u.b)();if(null===e.shares)return r.a.createElement(r.a.Fragment,null);const a=Math.round(.9*t.sharePrice),n=Math.round(.2*t.totalShares),o=n-n%1e6;let s=e.shares;return isNaN(s)?r.a.createElement(m.a,null,"Invalid input"):(s/=1e7,s=1e7*Math.round(s),s<1e7?r.a.createElement(m.a,null,"Must issue at least 10 million new shares"):s>o?r.a.createElement(m.a,null,"You cannot issue that many shares"):r.a.createElement(m.a,null,"Issue ",i.a.format(s,"0.000a")," new shares for"," ",i.a.formatMoney(s*a),"?"))}function f(e){const t=Object(u.b)(),[a,f]=Object(n.useState)(null),g=Math.round(.2*t.totalShares),y=g-g%1e6,b=1e7*Math.round((a||0)/1e7),E=null===a||isNaN(b)||b<1e7||b>y;function k(){if(null===a)return;if(E)return;const n=Math.round(.9*t.sharePrice);let r=a;r=1e7*Math.round(r/1e7);const s=r*n;t.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,t.totalShares+=r;let u=Object(l.a)(0,Math.round(r/2));u=1e6*Math.round(u/1e6),t.issuedShares+=r-u,t.funds=t.funds+s,t.immediatelyUpdateSharePrice(),e.onClose(),Object(o.a)(`Issued ${i.a.format(r,"0.000a")} and raised ${i.a.formatMoney(s)}. ${i.a.format(u,"0.000a")} of these shares were bought by private investors.

Stock price decreased to `+i.a.formatMoney(t.sharePrice))}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(m.a,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(y)," 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(d,{shares:a}),r.a.createElement(h.a,{autoFocus:!0,placeholder:"# New Shares",onChange:function(e){""===e.target.value?f(null):f(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&k()}}),r.a.createElement(p.a,{disabled:E,onClick:k,sx:{mx:1}},"Issue New Shares"))}},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(42),s=a(41),l=a(44),c=a(1),u=a(10);function m(e){const t=Object(l.b)(),a=t.determineValuation();let n=0,m=4;switch(t.fundingRound){case 0:n=.1,m=4;break;case 1:n=.35,m=3;break;case 2:n=.25,m=3;break;case 3:n=.2,m=2.5;break;default:return r.a.createElement(r.a.Fragment,null)}const h=a*n*m,p=Math.floor(o.a.INITIALSHARES*n);return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,null,"An investment firm has offered you ",i.a.formatMoney(h)," in funding in exchange for a"," ",i.a.format(100*n,"0.000a"),"% stake in the company (",i.a.format(p,"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(u.a,{onClick:function(){t.fundingRound++,t.addFunds(h),t.numShares-=p,e.rerender(),e.onClose()}},"Accept"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(15),o=a(41),s=a(4),l=a(44),c=a(1),u=a(10),m=a(82),h=a(32);function p(e){const t=Object(l.b)(),[a,p]=Object(n.useState)(""),d=t.determineValuation()/t.totalShares;function f(){const n=parseFloat(a),r=t.determineValuation()/t.totalShares;isNaN(n)?Object(i.a)("Invalid value for number of issued shares"):n>t.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(t.public=!0,t.sharePrice=r,t.issuedShares=n,t.numShares-=n,t.addFunds(n*r),e.rerender(),Object(i.a)(`You took your ${t.name} public and earned `+s.a.formatMoney(n*r)+" in your IPO"),e.onClose())}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(d)," 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(t.numShares,"0.000a")," of shares that you can issue."),r.a.createElement(h.a,{display:"flex",alignItems:"center"},r.a.createElement(m.a,{value:a,onChange:function(e){p(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&f()}}),r.a.createElement(u.a,{disabled:parseFloat(a)<0||parseFloat(a)>t.numShares,sx:{mx:1},onClick:f},"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(950),o=a(951),s=a(29),l=a(167);function c(e,t,a){const n=a-Math.pow(t,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}function u(e){const t=s.b.Player(),a=s.b.Router(),[u,m]=Object(n.useState)(!1);if(void 0===e.location.infiltrationData)throw new Error("Trying to do infiltration on invalid location.");const h=e.location.infiltrationData.startingSecurityLevel,p=function(e,t){return c(e,e.strength+e.defense+e.dexterity+e.agility+e.charisma,t)}(t,h),d=function(e,t){return c(e,Object(l.b)(9e3*e.strength_exp_mult,e.strength_mult)+Object(l.b)(9e3*e.defense_exp_mult,e.defense_mult)+Object(l.b)(9e3*e.agility_exp_mult,e.agility_mult)+Object(l.b)(9e3*e.dexterity_exp_mult,e.dexterity_mult)+Object(l.b)(9e3*e.charisma_exp_mult,e.charisma_mult),t)}(t,h);return console.log(`${p} ${d}`),u?r.a.createElement(o.a,{StartingDifficulty:h,Difficulty:p,Reward:d,MaxLevel:e.location.infiltrationData.maxClearanceLevel}):r.a.createElement(i.a,{Location:e.location,Difficulty:p,MaxLevel:e.location.infiltrationData.maxClearanceLevel,start:()=>m(!0),cancel:function(){a.toCity()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(46),o=a(1),s=a(10),l=a(4);function c(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 u(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h4"},"Infiltrating ",e.Location.name)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Maximum level: ",e.MaxLevel)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Difficulty: ",l.a.format(33.3333*e.Difficulty,"0")," / 100")),e.Difficulty>1.5&&r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Warning: This location is too heavily guarded for your current stats, try training or finding an easier location.")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"[",0===(t=e.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,c("white",13*t),c("orange",13*(t-1)),c("red",13*(t-2))),"]"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ^ ^ ^ ^"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," Trivial Normal Hard Impossible")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,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(o.a,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(o.a,null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:e.start},"Start")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:e.cancel},"Cancel"))));var t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n,r=a(29),i=a(0),o=a.n(i),s=a(46),l=a(952),c=a(953),u=a(955),m=a(956),h=a(957),p=a(958),d=a(959),f=a(960),g=a(961),y=a(962),b=a(1);!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 E=[u.a,c.a,m.a,h.a,p.a,d.a,f.a,g.a];function k(e){const t=r.b.Player(),a=r.b.Router(),[c,u]=Object(i.useState)(1),[m,h]=Object(i.useState)(n.Countdown),[p,d]=Object(i.useState)(""),[f,g]=Object(i.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*E.length)});function k(){let e=f.lastGames[0];const t=[f.lastGames[0],f.lastGames[1],f.id];for(;t.includes(e);)e=Math.floor(Math.random()*E.length);return e}function v(){g({lastGames:[f.lastGames[1],f.id],id:k()})}function _(e){d(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let w;switch(m){case n.Countdown:w=o.a.createElement(l.a,{onFinish:()=>h(n.Minigame)});break;case n.Minigame:{const r=E[f.id];w=o.a.createElement(r,{onSuccess:function(){_(!0),c===e.MaxLevel?h(n.Sell):(h(n.Countdown),u(c+1)),v()},onFailure:function(r){h(n.Countdown),_(!1);const i=null!=r&&r.automated?t.hp:3*e.StartingDifficulty;t.takeDamage(i)?a.toCity():v()},difficulty:e.Difficulty+c/50});break}case n.Sell:w=o.a.createElement(y.a,{StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,Reward:e.Reward,MaxLevel:e.MaxLevel})}function S(){return o.a.createElement(b.a,{variant:"h4"},o.a.createElement("span",{style:{color:"gray"}},p.slice(0,p.length-1)),p[p.length-1])}return o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{container:!0,spacing:3},o.a.createElement(s.a,{item:!0,xs:3},o.a.createElement(b.a,null,"Level: ",c," / ",e.MaxLevel),o.a.createElement(S,null)),o.a.createElement(s.a,{item:!0,xs:12},w)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(46),o=a(1);function s(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(o.a,{variant:"h4"},"Get Ready!"),r.a.createElement(o.a,{variant:"h4"},t))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(238),c=a(200),u=a(532),m=a(1);const h={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 p(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[p,d]=Object(n.useState)(""),[f]=Object(n.useState)(function(e){let t="";const a=Object(l.b)(e.min,e.max);for(let e=0;e"===e.key?">":""}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(f[f.length-p.length-1],a)?e.onFailure():f.length!==p.length+1?d(p+a):e.onSuccess())},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(46),o=a(198),s=a(199),l=a(200),c=a(1);const u={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};function m(e){const t={window:0};Object(l.a)(u,e.difficulty,t);const[a,m]=Object(n.useState)(0);return Object(n.useEffect)(()=>{let e=window.setTimeout(()=>{m(1),e=window.setTimeout(()=>{m(2),e=window.setTimeout(()=>m(0),t.window)},250)},3250*Math.random()+1500-(250+t.window));return()=>{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(c.a,{variant:"h4"},"Slash when his guard is down!"),0===a&&r.a.createElement(c.a,{variant:"h4"},"Guarding ..."),1===a&&r.a.createElement(c.a,{variant:"h4"},"Preparing?"),2===a&&r.a.createElement(c.a,{variant:"h4"},"ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault()," "===t.key&&(2!==a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(238),c=a(200),u=a(532),m=a(1);const h={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 p(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[p]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e0&&(a+=" "),a+=d[Math.floor(Math.random()*d.length)];return a}(t)),[f,g]=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(m.a,{variant:"h4"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),"Backspace"===t.key)return;const a=f+t.key.toUpperCase();p.startsWith(a)?p===a?e.onSuccess():g(a):e.onFailure()},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(m.a,{style:{transform:"scaleX(-1)"}},p)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(m.a,null,f,r.a.createElement(u.a,null))))}const d=["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 m}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(200),c=a(1);const u={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function m(e){const t={timer:0,size:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=[];t.push(h[Math.floor(Math.random()*h.length)]);for(let a=0;a0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}(t),t}(t)),[d,f]=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(c.a,{variant:"h4"},"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=t.key;if(" "===a)return void(h.includes(m[d])?e.onSuccess():e.onFailure());let n=d;for(["ArrowUp","w","ArrowRight","d"].includes(a)&&n++,["ArrowDown","s","ArrowLeft","a"].includes(a)&&n--;n<0;)n+=m.length;for(;n>m.length-1;)n-=m.length;f(n)},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(c.a,{variant:"h5",color:"primary"},"↑"),r.a.createElement(c.a,{variant:"h5",color:"primary"},m[d]),r.a.createElement(c.a,{variant:"h5",color:"primary"},"↓")))}const h=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],p=["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 h}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(238),c=a(200),u=a(1);const m={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 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=["←","→","↑","↓"];let a="";for(let n=0;n=h.length&&e.onSuccess()):e.onFailure()},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(46),o=a(198),s=a(199),l=a(200),c=a(238),u=a(1);const m={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 h(e){const t={timer:0,width:0,height:0,symbols:0};Object(l.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=[];for(let a=0;at==f?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),h.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement(u.a,null,e.map((e,a)=>a==y[0]&&t==y[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=[y[0]+a[0],y[1]+a[1]];if(n[0]=(n[0]+h[0].length)%h[0].length,n[1]=(n[1]+h.length)%h.length,b(n)," "===t.key){if(h[y[1]][y[0]]!==d[f])return void e.onFailure();g(f+1),d.length===f+1&&e.onSuccess()}},onFailure:e.onFailure})))}function p(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(200),c=a(238),u=a(1);const m={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 h(e){const t={timer:0,width:0,height:0,mines:0};Object(l.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=p(e);for(let a=0;a{const e=setTimeout(()=>E(!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(u.a,{variant:"h4"},b?"Remember all the mines!":"Mark all the mines!"),h.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement(u.a,null,e.map((e,a)=>b?h[t][a]?r.a.createElement("span",{key:a},"[?] "):r.a.createElement("span",{key:a},"[ ] "):a==g[0]&&t==g[1]?r.a.createElement("span",{key:a},"[X] "):d[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(),b)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=[g[0]+a[0],g[1]+a[1]];if(n[0]=(n[0]+h[0].length)%h[0].length,n[1]=(n[1]+h.length)%h.length,y(n)," "==t.key){if(!h[g[1]][g[0]])return void e.onFailure();f(t=>(t[g[1]][g[0]]=!0,function(e,t){function a(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return a(e)===a(t)}(h,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}function p(e){const t=[];for(let a=0;ar.a.createElement(o.a,{key:t},e.toString())),r.a.createElement(o.a,null,new Array(d.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(o.a,null,d.map((e,a)=>3!==t&&4!==t||!f[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(s.a,{onKeyDown:function(t){t.preventDefault();const a=parseInt(t.key);a<1||a>d.length||isNaN(a)||b(t=>{const n=[...t];n[a-1]=!0,E.some(e=>e.shouldCut(d[a-1],a-1))||e.onFailure();const r=[];for(let e=0;ee===n[t])&&e.onSuccess(),n})},onFailure:e.onFailure})))}function g(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function y(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${d[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(24),r=a(0),i=a.n(r),o=a(46),s=a(16),l=a(104),c=a(5),u=a(29),m=a(1),h=a(10),p=a(75),d=a(116);function f(e){const t=u.b.Player(),a=u.b.Router(),[f,g]=Object(r.useState)("none");function y(){a.toCity()}const b=e.MaxLevel*Math.pow(1.01,e.MaxLevel),E=Math.pow(e.Reward+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*b*c.a.InfiltrationRep,k=Math.pow(e.Reward+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*b*c.a.InfiltrationMoney;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:10},i.a.createElement(m.a,{variant:"h4"},"Infiltration successful!")),i.a.createElement(o.a,{item:!0,xs:10},i.a.createElement(m.a,{variant:"h5",color:"primary"},"You can trade the confidential information you found for money or reputation."),i.a.createElement(d.a,{value:f,onChange:function(e){g(e.target.value)}},i.a.createElement(p.a,{key:"none",value:"none"},"none"),t.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement(p.a,{key:e,value:e},e))),i.a.createElement(h.a,{onClick:function(){"none"!==f&&(n.a[f].playerReputation+=E,y())}},"Trade for ",i.a.createElement(l.a,{reputation:E})," reputation")),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(h.a,{onClick:function(){t.gainMoney(k,"infiltration"),y()}},"Sell for ",i.a.createElement(s.a,{money:k}))),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(h.a,{onClick:y},"Quit"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(533),o=a(965),s=a(29),l=a(1),c=a(116),u=a(75),m=a(32);const h={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 p(...e){let t=0;for(let a=0;ae.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking-t.hacking,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)=>p(e.strength,e.defense,e.dexterity,e.agility)-p(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>p(e.hacking,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-p(t.hacking,t.strength,t.defense,t.dexterity,t.agility,t.charisma),TotalNumAugmentations:(e,t)=>e.augmentations.length-t.augmentations.length};function f(){const e=s.b.Player(),[t,a]=Object(n.useState)(h.Cost);0===e.resleeves.length&&(e.resleeves=Object(i.a)());const p=d[t];if(void 0===p)throw new Error(`sort function '${t}' is undefined`);return e.resleeves.sort(p),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"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(m.a,{display:"flex",alignItems:"center"},r.a.createElement(l.a,null,"Sort By: "),r.a.createElement(c.a,{value:t,onChange:function(e){a(e.target.value)}},Object.keys(h).map(e=>r.a.createElement(u.a,{key:e,value:e},h[e])))),e.resleeves.map((t,a)=>r.a.createElement(o.a,{key:a,player:e,resleeve:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(205),r=a(20),i=a(21);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;er.a.createElement(d.a,{key:e.name,value:e.name},e.name))),r.a.createElement(u.a,null,void 0!==g&&g.info)),r.a.createElement(f.a,{item:!0,xs:3},r.a.createElement(u.a,null,"It costs ",r.a.createElement(s.a,{money:y,player:e.player})," to purchase this Sleeve."),r.a.createElement(h.a,{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:y}),"!"))}},"Purchase"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(29),o=a(8),s=a(4),l=a(104),c=a(410),u=a(98),m=a(16),h=a(22),p=a(24),d=a(215),f=a(61),g=a(227),y=a(9),b=a(1),E=a(46),k=a(10),v=a(170);const _=1e3/o.a.MilliPerCycle;function w(){const e=Object(n.useState)(!1)[1];function t(){e(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(t,o.a.MilliPerCycle);return()=>clearInterval(e)},[]);const a=i.b.Player(),w=i.b.Router(),S=p.a[a.currentWorkFactionName];if(a.workType==o.a.WorkTypeFaction){function C(){w.toFaction(S),a.finishFactionWork(!0)}function x(){w.toFaction(S),a.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently ",a.currentWorkFactionDescription," for your faction ",S.name,r.a.createElement("br",null),"(Current Faction Reputation: ",r.a.createElement(l.a,{reputation:S.playerReputation}),"). ",r.a.createElement("br",null),"You have been doing this for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{money:a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this faction ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null),r.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",r.a.createElement("br",null),"There is no penalty for cancelling earlier.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{sx:{mx:2},onClick:C},"Stop Faction Work"),r.a.createElement(k.a,{onClick:x},"Do something else simultaneously")))}const O=a.className;if(""!==a.className){function C(){a.finishClass(!0),w.toCity()}let e="";return e=O==o.a.ClassGymStrength||O==o.a.ClassGymDefense||O==o.a.ClassGymDexterity||O==o.a.ClassGymAgility?"Stop training at gym":"Stop taking course",r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You have been ",O," for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"This has cost you: ",r.a.createElement("br",null),r.a.createElement(m.a,{money:-a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyLossRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),"You have gained: ",r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null),"You may cancel at any time")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{onClick:C},e)))}if(a.workType==o.a.WorkTypeCompany){const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof d.a))throw new Error("Could not find Company: "+a.companyName);function C(){a.finishWork(!0),w.toJob()}function x(){a.stopFocusing(),w.toJob()}t=e.playerReputation;const n=a.jobs[a.companyName],i=.5===a.cancelationPenalty()?"half":"three-quarters";return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",n," at ",a.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:t}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{money:a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null),r.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.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{sx:{mx:2},onClick:C},"Stop Working"),r.a.createElement(k.a,{onClick:x},"Do something else simultaneously")))}if(a.workType==o.a.WorkTypeCompanyPartTime){function C(){a.finishWorkPartTime(!0),w.toJob()}function x(){a.stopFocusing(),w.toJob()}const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof d.a))throw new Error("Could not find Company: "+a.companyName);t=e.playerReputation;const n=a.jobs[a.companyName];return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",n," at ",a.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:t}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{money:a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null),r.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.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{sx:{mx:2},onClick:C},"Stop Working"),r.a.createElement(k.a,{onClick:x},"Do something else simultaneously")))}if(""!==a.crimeType){const e=Math.round(a.timeWorked/a.timeNeededToCompleteWork*100);let t=Math.round(e/5);t<0&&(t=0),t>20&&(t=20);const n=Object(v.a)({progress:(t+1)/20,totalTicks:20});return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,r.a.createElement(b.a,null,"You are attempting to ",a.crimeType,"."),r.a.createElement("br",null),r.a.createElement(b.a,null,"Time remaining: ",Object(h.b)(a.timeNeededToCompleteWork-a.timeWorked)),r.a.createElement("br",null),r.a.createElement("pre",null,n))),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{onClick:()=>{w.toLocation(g.a[y.a.Slums]),a.finishCrime(!0)}},"Cancel crime")))}return""!==a.createProgramName?r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working on coding ",a.createProgramName,".",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"The program is ",(a.timeWorkedCreateProgram/a.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",r.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{onClick:()=>{a.finishCreateProgramWork(!0),w.toTerminal()}},"Cancel work on creating program"))):(a.workType||w.toTerminal(),r.a.createElement(r.a.Fragment,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return N}));var n=a(0),r=a.n(n),i=a(126),o=a(154),s=a(1),l=a(472),c=a(46),u=a(161),m=a(147),h=a(116),p=a(75),d=a(10),f=a(32),g=a(274),y=a(66),b=a(127),E=a(26),k=a(82),v=a(1004),_=a.n(v),w=a(1005),S=a.n(w),C=a(968),x=a(15),O=a(971),M=a(972),T=a(13),R=a(310),A=a(329);const P=Object(i.a)(e=>Object(o.a)({root:{width:50,padding:e.spacing(2),userSelect:"none"}}));function N(e){const t=P(),a=Object(n.useRef)(null),[i,o]=Object(n.useState)(T.a.CodeInstructionRunTime),[v,w]=Object(n.useState)(T.a.MaxLogCapacity),[N,I]=Object(n.useState)(T.a.MaxPortCapacity),[F,D]=Object(n.useState)(T.a.MaxTerminalCapacity),[j,B]=Object(n.useState)(T.a.AutosaveInterval),[G,L]=Object(n.useState)(T.a.SuppressMessages),[W,H]=Object(n.useState)(T.a.SuppressFactionInvites),[U,q]=Object(n.useState)(T.a.SuppressTravelConfirmation),[K,z]=Object(n.useState)(T.a.SuppressBuyAugmentationConfirmation),[$,Y]=Object(n.useState)(T.a.SuppressTIXPopup),[V,J]=Object(n.useState)(T.a.SuppressBladeburnerPopup),[X,Q]=Object(n.useState)(T.a.DisableHotkeys),[Z,ee]=Object(n.useState)(T.a.DisableASCIIArt),[te,ae]=Object(n.useState)(T.a.DisableTextEffects),[ne,re]=Object(n.useState)(T.a.EnableBashHotkeys),[ie,oe]=Object(n.useState)(T.a.TimestampsFormat),[se,le]=Object(n.useState)(T.a.SaveGameOnFileSave),[ce,ue]=Object(n.useState)(T.a.Locale),[me,he]=Object(n.useState)(!1),[pe,de]=Object(n.useState)(!1),[fe,ge]=Object(n.useState)(!1);return r.a.createElement("div",{className:t.root,style:{width:"90%"}},r.a.createElement(s.a,{variant:"h4",gutterBottom:!0},"Options"),r.a.createElement(c.a,{container:!0,spacing:3},r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(g.a,null,r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript exec time (ms)")),r.a.createElement(l.a,{value:i,onChange:function(e,t){o(t),T.a.CodeInstructionRunTime=t},step:1,min:5,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript log size")),r.a.createElement(l.a,{value:v,onChange:function(e,t){w(t),T.a.MaxLogCapacity=t},step:20,min:20,max:500,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Netscript port size")),r.a.createElement(l.a,{value:N,onChange:function(e,t){I(t),T.a.MaxPortCapacity=t},step:1,min:20,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Terminal capacity")),r.a.createElement(l.a,{value:F,onChange:function(e,t){D(t),T.a.MaxTerminalCapacity=t},step:50,min:50,max:500,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The time (in seconds) between each autosave. Set to 0 to disable autosave.")},r.a.createElement(s.a,null,"Autosave interval (s)")),r.a.createElement(l.a,{value:j,onChange:function(e,t){B(t),T.a.AutosaveInterval=t},step:30,min:0,max:600,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:G,onChange:function(e){L(e.target.checked),T.a.SuppressMessages=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.")},r.a.createElement(s.a,null,"Suppress story messages"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:W,onChange:function(e){H(e.target.checked),T.a.SuppressFactionInvites=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.")},r.a.createElement(s.a,null,"Suppress faction invites"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:U,onChange:function(e){q(e.target.checked),T.a.SuppressTravelConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.")},r.a.createElement(s.a,null,"Suppress travel confirmations"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:K,onChange:function(e){z(e.target.checked),T.a.SuppressBuyAugmentationConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before buying augmentation will not show up.")},r.a.createElement(s.a,null,"Suppress buy augmentation confirmation"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:$,onChange:function(e){Y(e.target.checked),T.a.SuppressTIXPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the stock market will never create any popup.")},r.a.createElement(s.a,null,"Suppress TIX messages"))})),!!e.player.bladeburner&&r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:V,onChange:function(e){J(e.target.checked),T.a.SuppressBladeburnerPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.")},r.a.createElement(s.a,null,"Suppress bladeburner popup"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:X,onChange:function(e){Q(e.target.checked),T.a.DisableHotkeys=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,'If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and Close (Ctrl + b)" hotkey in the Text Editor.')},r.a.createElement(s.a,null,"Disable hotkeys"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:Z,onChange:function(e){ee(e.target.checked),T.a.DisableASCIIArt=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set all ASCII art will be disabled.")},r.a.createElement(s.a,null,"Disable ascii art"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:te,onChange:function(e){ae(e.target.checked),T.a.DisableTextEffects=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.")},r.a.createElement(s.a,null,"Disable text effects"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:ne,onChange:function(e){re(e.target.checked),T.a.EnableBashHotkeys=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser shortcuts are overriden by the new Bash shortcuts.")},r.a.createElement(s.a,null,"Enable bash hotkeys"))})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/")},r.a.createElement("span",null,r.a.createElement(k.a,{InputProps:{startAdornment:r.a.createElement(s.a,{color:"format error"===Object(A.a)(ie)&&""!==ie?"error":"success"},"Timestamp format: ")},value:ie,onChange:function(e){oe(e.target.value),T.a.TimestampsFormat=e.target.value},placeholder:"yyyy-MM-dd hh:mm:ss"})))),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:se,onChange:function(e){le(e.target.checked),T.a.SaveGameOnFileSave=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Save your game any time a file is saved in the script editor.")},r.a.createElement(s.a,null,"Save game on file save"))})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Sets the locale for displaying numbers.")},r.a.createElement(s.a,null,"Locale ")),r.a.createElement(h.a,{value:ce,onChange:function(e){ue(e.target.value),T.a.Locale=e.target.value}},r.a.createElement(p.a,{value:"en"},"en"),r.a.createElement(p.a,{value:"bg"},"bg"),r.a.createElement(p.a,{value:"cs"},"cs"),r.a.createElement(p.a,{value:"da-dk"},"da-dk"),r.a.createElement(p.a,{value:"de"},"de"),r.a.createElement(p.a,{value:"en-au"},"en-au"),r.a.createElement(p.a,{value:"en-gb"},"en-gb"),r.a.createElement(p.a,{value:"es"},"es"),r.a.createElement(p.a,{value:"fr"},"fr"),r.a.createElement(p.a,{value:"hu"},"hu"),r.a.createElement(p.a,{value:"it"},"it"),r.a.createElement(p.a,{value:"lv"},"lv"),r.a.createElement(p.a,{value:"no"},"no"),r.a.createElement(p.a,{value:"pl"},"pl"),r.a.createElement(p.a,{value:"ru"},"ru")))),!location.href.startsWith("file://")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,r.a.createElement(s.a,null,"danielyxie / BigD (Original developer): "),r.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_blank"},r.a.createElement("input",{type:"hidden",name:"cmd",value:"_s-xclick"}),r.a.createElement("input",{type:"hidden",name:"encrypted",value:"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggE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AYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----"}),r.a.createElement("input",{type:"image",src:"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(y.a,null,r.a.createElement(s.a,null,"hydroflame (Current maintainer):"," ",r.a.createElement(b.a,{href:"https://www.google.com/search?q=Where+to+donate+blood+near+me%3F",target:"_blank"},"Donate blood!")," ")))),r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(f.a,null,r.a.createElement(d.a,{onClick:()=>e.save()},"Save Game"),r.a.createElement(d.a,{onClick:()=>de(!0)},"Delete Game")),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"export")},r.a.createElement(d.a,{onClick:()=>e.export()},r.a.createElement(_.a,{color:"primary"}),"Export")),r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"import")},r.a.createElement(d.a,{onClick:function(){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;const e=a.current;if(null===e)throw new Error("import input should not be null");e.click()}},r.a.createElement(S.a,{color:"primary"}),"Import",r.a.createElement("input",{ref:a,id:"import-game-file-selector",type:"file",hidden:!0,onChange:function(e){const t=e.target.files;if(null===t)return;const a=t[0];if(!a)return void Object(x.a)("Invalid file selected");const n=new FileReader;n.onload=function(e){const t=e.target;if(null===t)return void console.error("error importing file");const a=t.result;if("string"!=typeof a||null===a)return void console.error("FileReader event was not type string");const n=a;Object(R.c)(n).then(()=>setTimeout(()=>location.reload(),1e3))},n.readAsText(a)}})))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.")},r.a.createElement(d.a,{onClick:()=>e.forceKill()},"Force kill all active scripts"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.")},r.a.createElement(d.a,{onClick:()=>e.softReset()},"Soft Reset"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.")},r.a.createElement(d.a,{onClick:()=>he(!0)},"Diagnose files")),r.a.createElement(d.a,{onClick:()=>ge(!0)},"Theme editor")),r.a.createElement(f.a,null,r.a.createElement(b.a,{href:"https://github.com/danielyxie/bitburner/issues/new",target:"_blank"},r.a.createElement(s.a,null,"Report bug")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"},r.a.createElement(s.a,null,"Documentation")),r.a.createElement(b.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},r.a.createElement(s.a,null,"Discord")),r.a.createElement(b.a,{href:"https://www.reddit.com/r/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Reddit")),r.a.createElement(b.a,{href:"https://plaza.dsolver.ca/games/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Incremental game plaza"))))),r.a.createElement(C.a,{open:me,onClose:()=>he(!1)}),r.a.createElement(O.a,{onConfirm:()=>{de(!1),Object(R.a)().then(()=>setTimeout(()=>location.reload(),1e3)).catch(e=>console.error("Could not delete game: "+e))},open:pe,onClose:()=>de(!1),confirmationText:"Really delete your game? (It's permanent!)"}),r.a.createElement(M.a,{open:fe,onClose:()=>ge(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(27),o=a(41),s=a(4),l=a(236),c=a(169),u=a(49),m=a(1320),h=a(1321),p=a(56),d=a(1),f=a(73),g=a(190),y=a(191),b=a(192),E=a(70),k=a.n(E);function v(e){const t=Object(i.d)(e.hostname);if(null===t)throw new Error(`server '${e.hostname}' should not be null`);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(g.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(y.a,{expandIcon:r.a.createElement(k.a,null)},r.a.createElement(d.a,null,t.hostname," (",s.a.formatBigNumber(a),"b)")),r.a.createElement(b.a,null,r.a.createElement(m.a,{component:f.a},r.a.createElement(l.a,null,r.a.createElement(h.a,null,r.a.createElement(p.a,null,r.a.createElement(u.a,null,r.a.createElement(d.a,null,"Filename")),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,"Size")))),r.a.createElement(c.a,null,n.map(e=>r.a.createElement(p.a,{key:e.name},r.a.createElement(u.a,{component:"th",scope:"row"},r.a.createElement(d.a,null,e.name)),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,s.a.formatBigNumber(e.size),"b"))))))),r.a.createElement("ul",null)))}function _(e){const t=[];for(const e of Object(i.c)())t.push(e.hostname);return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,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."),t.map(e=>r.a.createElement(v,{key:e,hostname:e}))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(1);function l(e){return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,null,e.confirmationText),r.a.createElement(o.a,{onClick:()=>{e.onConfirm()}},"Confirm")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(1),l=a(26),c=a(73),u=a(82),m=a(94),h=a(360),p=a.n(h),d=a(973),f=a(268),g=a(13);function y({name:e,onColorChange:t,color:a,defaultColor:n}){return void 0===a&&(console.error(`color ${e} was undefined, reverting to default`),a=n),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{mx:1},label:e,value:a,InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{hideTextfield:!0,value:a,onChange:a=>t(e,"#"+a.hex)})),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{onClick:()=>t(e,n)},r.a.createElement(p.a,{color:"primary"})))}}))}function b(e){const[t,a]=Object(n.useState)({...g.a.theme});function h(e,t){a(a=>(a[e]=t,a)),g.a.theme[e]=t,f.b.emit()}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,null,r.a.createElement(l.a,{open:!0,placement:"top",title:r.a.createElement(s.a,null,"Example tooltip")},r.a.createElement(o.a,{color:"primary"},"primary button")),r.a.createElement(o.a,{color:"secondary"},"secondary button"),r.a.createElement(o.a,{color:"warning"},"warning button"),r.a.createElement(o.a,{color:"info"},"info button"),r.a.createElement(o.a,{color:"error"},"error button"),r.a.createElement(o.a,{disabled:!0},"disabled button"),r.a.createElement(s.a,{color:"primary"},"text with primary color"),r.a.createElement(s.a,{color:"secondary"},"text with secondary color"),r.a.createElement(s.a,{color:"error"},"text with error color"),r.a.createElement(u.a,{value:"Text field"})),r.a.createElement("br",null),r.a.createElement(y,{name:"primarylight",onColorChange:h,color:t.primarylight,defaultColor:g.b.theme.primarylight}),r.a.createElement(y,{name:"primary",onColorChange:h,color:t.primary,defaultColor:g.b.theme.primary}),r.a.createElement(y,{name:"primarydark",onColorChange:h,color:t.primarydark,defaultColor:g.b.theme.primarydark}),r.a.createElement("br",null),r.a.createElement(y,{name:"successlight",onColorChange:h,color:t.successlight,defaultColor:g.b.theme.successlight}),r.a.createElement(y,{name:"success",onColorChange:h,color:t.success,defaultColor:g.b.theme.success}),r.a.createElement(y,{name:"successdark",onColorChange:h,color:t.successdark,defaultColor:g.b.theme.successdark}),r.a.createElement("br",null),r.a.createElement(y,{name:"errorlight",onColorChange:h,color:t.errorlight,defaultColor:g.b.theme.errorlight}),r.a.createElement(y,{name:"error",onColorChange:h,color:t.error,defaultColor:g.b.theme.error}),r.a.createElement(y,{name:"errordark",onColorChange:h,color:t.errordark,defaultColor:g.b.theme.errordark}),r.a.createElement("br",null),r.a.createElement(y,{name:"secondarylight",onColorChange:h,color:t.secondarylight,defaultColor:g.b.theme.secondarylight}),r.a.createElement(y,{name:"secondary",onColorChange:h,color:t.secondary,defaultColor:g.b.theme.secondary}),r.a.createElement(y,{name:"secondarydark",onColorChange:h,color:t.secondarydark,defaultColor:g.b.theme.secondarydark}),r.a.createElement("br",null),r.a.createElement(y,{name:"warninglight",onColorChange:h,color:t.warninglight,defaultColor:g.b.theme.warninglight}),r.a.createElement(y,{name:"warning",onColorChange:h,color:t.warning,defaultColor:g.b.theme.warning}),r.a.createElement(y,{name:"warningdark",onColorChange:h,color:t.warningdark,defaultColor:g.b.theme.warningdark}),r.a.createElement("br",null),r.a.createElement(y,{name:"infolight",onColorChange:h,color:t.infolight,defaultColor:g.b.theme.infolight}),r.a.createElement(y,{name:"info",onColorChange:h,color:t.info,defaultColor:g.b.theme.info}),r.a.createElement(y,{name:"infodark",onColorChange:h,color:t.infodark,defaultColor:g.b.theme.infodark}),r.a.createElement("br",null),r.a.createElement(y,{name:"welllight",onColorChange:h,color:t.welllight,defaultColor:g.b.theme.welllight}),r.a.createElement(y,{name:"well",onColorChange:h,color:t.well,defaultColor:g.b.theme.well}),r.a.createElement(y,{name:"white",onColorChange:h,color:t.white,defaultColor:g.b.theme.white}),r.a.createElement(y,{name:"black",onColorChange:h,color:t.black,defaultColor:g.b.theme.black}),r.a.createElement(y,{name:"backgroundprimary",onColorChange:h,color:t.backgroundprimary,defaultColor:g.b.theme.backgroundprimary}),r.a.createElement(y,{name:"backgroundsecondary",onColorChange:h,color:t.backgroundsecondary,defaultColor:g.b.theme.backgroundsecondary}),r.a.createElement(y,{name:"button",onColorChange:h,color:t.button,defaultColor:g.b.theme.button}),r.a.createElement("br",null),r.a.createElement(y,{name:"hp",onColorChange:h,color:t.hp,defaultColor:g.b.theme.hp}),r.a.createElement(y,{name:"money",onColorChange:h,color:t.money,defaultColor:g.b.theme.money}),r.a.createElement(y,{name:"hack",onColorChange:h,color:t.hack,defaultColor:g.b.theme.hack}),r.a.createElement(y,{name:"combat",onColorChange:h,color:t.combat,defaultColor:g.b.theme.combat}),r.a.createElement(y,{name:"cha",onColorChange:h,color:t.cha,defaultColor:g.b.theme.cha}),r.a.createElement(y,{name:"int",onColorChange:h,color:t.int,defaultColor:g.b.theme.int}),r.a.createElement(y,{name:"rep",onColorChange:h,color:t.rep,defaultColor:g.b.theme.rep}),r.a.createElement(y,{name:"disabled",onColorChange:h,color:t.disabled,defaultColor:g.b.theme.disabled}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{label:"import / export theme",value:JSON.stringify(t),onChange:function(e){try{const t=JSON.parse(e.target.value);if("object"!=typeof t)return;a(t);for(const e of Object.keys(t))g.a.theme[e]=t[e];f.b.emit()}catch(e){}},InputProps:{endAdornment:r.a.createElement(m.a,{onClick:function(){a({...g.b.theme}),Object.assign(g.a.theme,g.b.theme),f.b.emit()},size:"large"},r.a.createElement(p.a,null))}}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1007),o=a(1014),s=a(29),l=a(1),c=a(10),u=a(127);function m(){const e=s.b.Player(),[t,a]=Object(n.useState)(!1),m=Object(n.useState)(!1)[1];function h(){m(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(h,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Sleeves"),r.a.createElement(l.a,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(c.a,{onClick:()=>a(!0)},"FAQ"),r.a.createElement(u.a,{target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves"},r.a.createElement(l.a,null," Documentation")),e.sleeves.map((e,t)=>r.a.createElement(i.a,{key:t,rerender:h,sleeve:e})),r.a.createElement(o.a,{open:t,onClose:()=>a(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var n=a(0),r=a.n(n),i=a(72),o=a(8),s=a(77),l=a(4),c=a(170),u=a(1008),m=a(1009),h=a(16),p=a(98),d=a(29),f=a(410),g=a(1010),y=a(1011),b=a(1012),E=a(1013),k=a(166),v=a(123),_=a(1),w=a(73),S=a(46),C=a(10),x=a(26);function O(e){const t=d.b.Player(),[a,O]=Object(n.useState)(!1),[M,T]=Object(n.useState)(!1),[R,A]=Object(n.useState)(!1),[P,N]=Object(n.useState)(!1),[I,F]=Object(n.useState)(["------","------","------"]);let D=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:D=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"}D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:{const t=Object.values(s.a).find(t=>t.name===e.sleeve.crimeType);if(!t)throw new Error("crime should not be undefined");D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",t.type," (Success Rate:"," ",l.a.formatPercentage(t.successRate(e.sleeve)),").");break}case i.a.Class:D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:D=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:D=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(): "+I[0])}let j=[];if(e.sleeve.currentTask===i.a.Crime)j=[["Money",r.a.createElement(h.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(j=[["Money:",r.a.createElement(p.a,{money: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 a=e.sleeve.getRepGain(t);j.push(["Reputation:",r.a.createElement(f.a,{reputation:5*a})])}return r.a.createElement(r.a.Fragment,null,r.a.createElement(S.a,{container:!0,component:w.a},r.a.createElement(S.a,{item:!0,xs:3},r.a.createElement(g.a,{sleeve:e.sleeve}),r.a.createElement(C.a,{onClick:()=>O(!0)},"More Stats"),r.a.createElement(x.a,{title:t.moneyA(!0),disabled:t.moneyN(!0),disabled:e.sleeve.shock<100},"Manage Augmentations")))),r.a.createElement(S.a,{item:!0,xs:5},r.a.createElement(E.a,{player:t,sleeve:e.sleeve,setABC:F}),r.a.createElement(_.a,null,D),r.a.createElement(_.a,null,e.sleeve.currentTask===i.a.Crime&&Object(c.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement(C.a,{onClick:function(){switch(e.sleeve.resetTaskStatus(),I[0]){case"------":break;case"Work for Company":e.sleeve.workForCompany(t,I[1]);break;case"Work for Faction":e.sleeve.workForFaction(t,I[1],I[2]);break;case"Commit Crime":e.sleeve.commitCrime(t,I[1]);break;case"Take University Course":e.sleeve.takeUniversityCourse(t,I[2],I[1]);break;case"Workout at Gym":e.sleeve.workoutAtGym(t,I[2],I[1]);break;case"Shock Recovery":e.sleeve.shockRecovery(t);break;case"Synchronize":e.sleeve.synchronize(t);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+I[0])}e.rerender()}},"Set Task")),r.a.createElement(S.a,{item:!0,xs:4},r.a.createElement(v.a,{title:"Earnings (Pre-Synchronization)",rows:j}),r.a.createElement(C.a,{onClick:()=>T(!0)},"More Earnings Info"))),r.a.createElement(y.a,{open:a,onClose:()=>O(!1),sleeve:e.sleeve}),r.a.createElement(b.a,{open:M,onClose:()=>T(!1),sleeve:e.sleeve}),r.a.createElement(m.a,{open:R,onClose:()=>A(!1),sleeve:e.sleeve,rerender:e.rerender}),r.a.createElement(u.a,{open:P,onClose:()=>N(!1),sleeve:e.sleeve}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(513),o=a(20),s=a(16),l=a(41),c=a(29),u=a(1),m=a(26),h=a(73),p=a(32),d=a(10),f=a(169),g=a(236),y=a(39),b=a(56);function E(e){const t=c.b.Player(),a=Object(n.useState)(!1)[1];function E(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(E,150);return()=>clearInterval(e)},[]);const k=e.sleeve.augmentations.map(e=>e.name),v=Object(i.a)(e.sleeve,t);return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,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."),r.a.createElement(g.a,{size:"small",padding:"none"},r.a.createElement(f.a,null,v.map(a=>r.a.createElement(b.a,{key:a.name},r.a.createElement(y.b,null,r.a.createElement(d.a,{onClick:()=>function(a){e.sleeve.tryBuyAugmentation(t,a),E()}(a),disabled:t.money0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Owned Augmentations:"),k.map(e=>{const t=o.a[e];let a=r.a.createElement(r.a.Fragment,null);return a="string"==typeof t.info?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,t.info),r.a.createElement("br",null),r.a.createElement("br",null),t.stats):r.a.createElement(r.a.Fragment,null,t.info,r.a.createElement("br",null),r.a.createElement("br",null),t.stats),r.a.createElement(m.a,{key:e,title:r.a.createElement(u.a,null,a)},r.a.createElement(h.a,null,r.a.createElement(u.a,null,e)))}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(8),o=a(16),s=a(396),l=a(23),c=a(13),u=a(15),m=a(29),h=a(41),p=a(1),d=a(10);function f(e){const t=m.b.Player();function a(a){t.canAfford(i.a.TravelCost)||Object(u.a)("You cannot afford to have this sleeve travel to another city"),e.sleeve.city=a,t.loseMoney(i.a.TravelCost,"sleeve"),e.sleeve.resetTaskStatus(),e.rerender(),e.onClose()}return r.a.createElement(h.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,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(o.a,{money:i.a.TravelCost,player:t}),". It will also set your current sleeve task to idle."),c.a.DisableASCIIArt?Object.values(l.a).map(e=>r.a.createElement(d.a,{key:e,onClick:()=>a(e)},e)):r.a.createElement(s.a,{currentCity:e.sleeve.city,onTravel:e=>a(e)})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(4),r=a(0),i=a.n(r),o=a(123);function s(e){const t=[["HP: ",i.a.createElement(i.a.Fragment,null,n.a.formatHp(e.sleeve.hp)," / ",n.a.formatHp(e.sleeve.max_hp))],["City: ",i.a.createElement(i.a.Fragment,null,e.sleeve.city)],["Hacking: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.hacking))],["Strength: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.strength))],["Defense: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.defense))],["Dexterity: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.dexterity))],["Agility: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.agility))],["Charisma: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.charisma))],["Shock: ",i.a.createElement(i.a.Fragment,null,n.a.formatSleeveShock(100-e.sleeve.shock))],["Sync: ",i.a.createElement(i.a.Fragment,null,n.a.formatSleeveSynchro(e.sleeve.sync))],["Memory: ",i.a.createElement(i.a.Fragment,null,n.a.formatSleeveMemory(e.sleeve.memory))]];return i.a.createElement(o.a,{rows:t})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(4),r=a(123),i=a(41),o=a(0),s=a.n(o);function l(e){return s.a.createElement(i.a,{open:e.open,onClose:e.onClose},s.a.createElement(r.a,{rows:[[s.a.createElement(s.a.Fragment,null,"Hacking: "),e.sleeve.hacking,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.hacking_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Strength: "),e.sleeve.strength,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.strength_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Defense: "),e.sleeve.defense,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.defense_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Dexterity: "),e.sleeve.dexterity,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.dexterity_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Agility: "),e.sleeve.agility,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.agility_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Charisma: "),e.sleeve.charisma,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.charisma_exp)," exp)")]],title:"Stats:"}),s.a.createElement("br",null),s.a.createElement(r.a,{rows:[[s.a.createElement(s.a.Fragment,null,"Hacking Level multiplier: "),n.a.formatPercentage(e.sleeve.hacking_mult)],[s.a.createElement(s.a.Fragment,null,"Hacking Experience multiplier: "),n.a.formatPercentage(e.sleeve.hacking_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Strength Level multiplier: "),n.a.formatPercentage(e.sleeve.strength_mult)],[s.a.createElement(s.a.Fragment,null,"Strength Experience multiplier: "),n.a.formatPercentage(e.sleeve.strength_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Defense Level multiplier: "),n.a.formatPercentage(e.sleeve.defense_mult)],[s.a.createElement(s.a.Fragment,null,"Defense Experience multiplier: "),n.a.formatPercentage(e.sleeve.defense_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Dexterity Level multiplier: "),n.a.formatPercentage(e.sleeve.dexterity_mult)],[s.a.createElement(s.a.Fragment,null,"Dexterity Experience multiplier: "),n.a.formatPercentage(e.sleeve.dexterity_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Agility Level multiplier: "),n.a.formatPercentage(e.sleeve.agility_mult)],[s.a.createElement(s.a.Fragment,null,"Agility Experience multiplier: "),n.a.formatPercentage(e.sleeve.agility_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Charisma Level multiplier: "),n.a.formatPercentage(e.sleeve.charisma_mult)],[s.a.createElement(s.a.Fragment,null,"Charisma Experience multiplier: "),n.a.formatPercentage(e.sleeve.charisma_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Faction Reputation Gain multiplier: "),n.a.formatPercentage(e.sleeve.faction_rep_mult)],[s.a.createElement(s.a.Fragment,null,"Company Reputation Gain multiplier: "),n.a.formatPercentage(e.sleeve.company_rep_mult)],[s.a.createElement(s.a.Fragment,null,"Salary multiplier: "),n.a.formatPercentage(e.sleeve.work_money_mult)],[s.a.createElement(s.a.Fragment,null,"Crime Money multiplier: "),n.a.formatPercentage(e.sleeve.crime_money_mult)],[s.a.createElement(s.a.Fragment,null,"Crime Success multiplier: "),n.a.formatPercentage(e.sleeve.crime_success_mult)]],title:"Multipliers:"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(4),r=a(16),i=a(0),o=a(123),s=a(41);function l(e){return i.createElement(s.a,{open:e.open,onClose:e.onClose},i.createElement(o.a,{rows:[["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)]],title:"Earnings for Current Task:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["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)]],title:"Total Earnings for Host Consciousness:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["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)]],title:"Total Earnings for Other Sleeves:"}),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(72),o=a(77),s=a(9),l=a(23),c=a(24),u=a(166),m=a(116),h=a(75);const p=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],d=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function f(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({first:["------"],second:()=>["------"]}),"Work for Company":(e,t)=>{let a=f(e,t);return 0===a.length&&(a=["------"]),{first:a,second:()=>["------"]}},"Work for Faction":(e,t)=>{let a=g(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.values(o.a).map(e=>e.name),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:p,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:d,second:()=>a}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},b={"------":()=>!0,"Work for Company":(e,t)=>f(e,t).length>0,"Work for Faction":(e,t)=>g(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 E(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,p]=Object(n.useState)(t[2]),d=Object.keys(b).filter(t=>b[t](e.player,e.sleeve)),f=y[a];if(void 0===f)throw new Error(`No function for task '${a}'`);const g=f(e.player,e.sleeve),E=g.second(s);return g.first.length>0&&!g.first.includes(s)&&(l(g.first[0]),e.setABC([a,g.first[0],c])),E.length>0&&!E.includes(c)&&(p(E[0]),e.setABC([a,s,E[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{onChange:function(t){const n=t.target.value,r=y[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]);p(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},value:a},d.map(e=>r.a.createElement(h.a,{key:e,value:e},e))),!(1===g.first.length&&"------"===g.first[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(m.a,{onChange:function(t){l(t.target.value),e.setABC([a,t.target.value,c])},value:s},g.first.map(e=>r.a.createElement(h.a,{key:e,value:e},e)))),!(1===E.length&&"------"===E[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(m.a,{onChange:function(t){p(t.target.value),e.setABC([a,s,t.target.value])},value:c},E.map(e=>r.a.createElement(h.a,{key:e,value:e},e)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(41),o=a(1);function s({open:e,onClose:t}){return r.a.createElement(i.a,{open:e,onClose:t},r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{variant:"h4"},"How do Duplicate Sleeves work?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are their own individuals, which means they each have their own experience and stats."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Synchronization (Sync)?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization can be increased by assigning sleeves to the 'Synchronize' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Shock?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I work for this company or faction?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why did my Sleeve stop working?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"How do I buy Augmentations for my Sleeves?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I buy the X Augmentation for my sleeve?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Do sleeves get reset when installing Augmentations or switching BitNodes?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are reset when switching BitNodes, but not when installing Augmentations."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Memory?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(1016),o=a(1017),s=a(1018),l=a(229),c=a(85),u=a(1019),m=a(1021),h=a(1022),p=a(1023),d=a(36),f=a(53),g=a(27),y=a(1),b=a(46),E=a(10);function k(e){const[t,a]=Object(n.useState)(!1),k=Object(n.useState)(!1)[1];function v(){k(e=>!e)}const[_,w]=Object(n.useState)(d.c.x1);Object(n.useEffect)(()=>{const e=setInterval(v,200);return()=>clearInterval(e)},[]);let S,C=0;for(let t=0;tw(d.c.x1),()=>w(d.c.x5),()=>w(d.c.x10),()=>w(d.c.MAX)],O=e.player.hacknetNodes.map(t=>{if(Object(f.g)(e.player)){if(t instanceof l.a)throw new Error("node was hacknet node");const a=Object(g.d)(t);if(null==a)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+t);if(!(a instanceof c.a))throw new Error("node was not hacknet server");return r.a.createElement(s.a,{player:e.player,key:a.hostname,node:a,purchaseMultiplier:_,rerender:v})}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:v})});return r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{variant:"h4"},"Hacknet ",Object(f.g)(e.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(f.g)(e.player)}),r.a.createElement(p.a,{cost:S,multiplier:_,onClick:function(){Object(f.l)(e.player),v()}}),r.a.createElement("br",null),r.a.createElement(b.a,{container:!0,spacing:2},r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(h.a,{totalProduction:C,player:e.player})),r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(m.a,{onClicks:x,purchaseMultiplier:_}))),Object(f.g)(e.player)&&r.a.createElement(E.a,{onClick:()=>a(!0)},"Spend Hashes on Upgrades"),r.a.createElement(b.a,{container:!0},O),r.a.createElement(u.a,{open:t,onClose:()=>a(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1);function o(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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(i.a,null,"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(i.a,null,"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(i.a,null,"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(i.a,null,"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 k}));var n=a(0),r=a.n(n),i=a(36),o=a(53),s=a(16),l=a(98),c=a(1),u=a(46),m=a(73),h=a(10),p=a(39),d=a(169),f=a(236),g=a(56),y=a(26),b=a(4),E=a(184);function k(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let k,v,_;if(t.level>=i.a.MaxLevel)k=r.a.createElement(h.a,{disabled:!0},"MAX LEVEL");else{let u=0;if("MAX"===a)u=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;u=Math.min(e,a)}const m=Object(E.c)(t.level+u,t.ram,t.cores,e.player.hacknet_node_money_mult)-t.moneyGainRatePerSecond,p=t.calculateLevelUpgradeCost(u,e.player.hacknet_node_level_cost_mult);k=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:m}))},r.a.createElement(h.a,{onClick:function(){const r="MAX"===a?Object(o.e)(e.player,t,i.a.MaxLevel):a;Object(o.n)(e.player,t,r),n()}},"+",u," - ",r.a.createElement(s.a,{money:p,player:e.player})))}if(t.ram>=i.a.MaxRam)v=r.a.createElement(h.a,{disabled:!0},"MAX RAM");else{let u=0;if("MAX"===a)u=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));u=Math.min(e,a)}const m=Object(E.c)(t.level,t.ram*Math.pow(2,u),t.cores,e.player.hacknet_node_money_mult)-t.moneyGainRatePerSecond,p=t.calculateRamUpgradeCost(u,e.player.hacknet_node_ram_cost_mult);v=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:m}))},r.a.createElement(h.a,{onClick:function(){const r="MAX"===a?Object(o.f)(e.player,t,i.a.MaxRam):a;Object(o.o)(e.player,t,r),n()}},"+",u," - ",r.a.createElement(s.a,{money:p,player:e.player})))}if(t.cores>=i.a.MaxCores)_=r.a.createElement(h.a,{disabled:!0},"MAX CORES");else{let u=0;if("MAX"===a)u=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;u=Math.min(e,a)}const m=Object(E.c)(t.level,t.ram,t.cores+u,e.player.hacknet_node_money_mult)-t.moneyGainRatePerSecond,p=t.calculateCoreUpgradeCost(u,e.player.hacknet_node_core_cost_mult);_=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:m}))},r.a.createElement(h.a,{onClick:function(){const r="MAX"===a?Object(o.d)(e.player,t,i.a.MaxCores):a;Object(o.k)(e.player,t,r),n()}},"+",u," - ",r.a.createElement(s.a,{money:p,player:e.player})))}return r.a.createElement(u.a,{item:!0,component:m.a,p:1},r.a.createElement(f.a,{size:"small"},r.a.createElement(d.a,null,r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,t.name))),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"Production:")),r.a.createElement(p.b,{colSpan:2},r.a.createElement(c.a,null,r.a.createElement(s.a,{money:t.totalMoneyGenerated,player:e.player})," (",r.a.createElement(l.a,{money:t.moneyGainRatePerSecond}),")"))),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"Level:")),r.a.createElement(p.b,null,r.a.createElement(c.a,null,t.level)),r.a.createElement(p.b,null,k)),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"RAM:")),r.a.createElement(p.b,null,r.a.createElement(c.a,null,b.a.formatRAM(t.ram))),r.a.createElement(p.b,null,v)),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"Cores:")),r.a.createElement(p.b,null,r.a.createElement(c.a,null,t.cores)),r.a.createElement(p.b,null,_)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(36),o=a(53),s=a(16),l=a(212),c=a(367),u=a(1),m=a(46),h=a(73),p=a(10),d=a(39),f=a(169),g=a(236),y=a(56),b=a(4),E=a(165),k=a(26);function v(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let v,_,w,S;if(t.level>=i.b.MaxLevel)v=r.a.createElement(p.a,{disabled:!0},"MAX LEVEL");else{let l=0;if("MAX"===a)l=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;l=Math.min(e,a)}const m=Object(E.c)(t.level+l,0,t.maxRam,t.cores,e.player.hacknet_node_money_mult)-t.hashRate,h=t.calculateLevelUpgradeCost(l,e.player.hacknet_node_level_cost_mult);v=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(c.a,{hashes:m}))},r.a.createElement(p.a,{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()}},"+",l," - ",r.a.createElement(s.a,{money:h,player:e.player})))}if(t.maxRam>=i.b.MaxRam)_=r.a.createElement(p.a,{disabled:!0},"MAX RAM");else{let l=0;if("MAX"===a)l=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));l=Math.min(e,a)}const m=Object(E.c)(t.level,0,t.maxRam*Math.pow(2,l),t.cores,e.player.hacknet_node_money_mult)-t.hashRate,h=t.calculateRamUpgradeCost(l,e.player.hacknet_node_ram_cost_mult);_=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(c.a,{hashes:m}))},r.a.createElement(p.a,{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()}},"+",l," - ",r.a.createElement(s.a,{money:h,player:e.player})))}if(t.cores>=i.b.MaxCores)w=r.a.createElement(p.a,{disabled:!0},"MAX CORES");else{let l=0;if("MAX"===a)l=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;l=Math.min(e,a)}const m=Object(E.c)(t.level,0,t.maxRam,t.cores+l,e.player.hacknet_node_money_mult)-t.hashRate,h=t.calculateCoreUpgradeCost(l,e.player.hacknet_node_core_cost_mult);w=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(c.a,{hashes:m}))},r.a.createElement(p.a,{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()}},"+",l," - ",r.a.createElement(s.a,{money:h,player:e.player})))}if(t.cache>=i.b.MaxCache)S=r.a.createElement(p.a,{disabled:!0},"MAX CACHE");else{let c=0;if("MAX"===a)c=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;c=Math.min(e,a)}const m=t.calculateCacheUpgradeCost(c);S=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(l.a,{hashes:32*Math.pow(2,t.cache)})," hashes")},r.a.createElement(p.a,{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)}},"+",c," - ",r.a.createElement(s.a,{money:m,player:e.player}))),e.player.money}return r.a.createElement(m.a,{item:!0,component:h.a,p:1},r.a.createElement(g.a,{size:"small"},r.a.createElement(f.a,null,r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.hostname))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Production:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(u.a,null,r.a.createElement(l.a,{hashes:t.totalHashesGenerated})," (",r.a.createElement(c.a,{hashes:t.hashRate}),")"))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Hash Capacity:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(u.a,null,r.a.createElement(l.a,{hashes:t.hashCapacity})))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Level:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.level)),r.a.createElement(d.b,null,v)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"RAM:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,b.a.formatRAM(t.maxRam))),r.a.createElement(d.b,null,_)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Cores:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.cores)),r.a.createElement(d.b,null,w)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Cache Level:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.cache)),r.a.createElement(d.b,null,S)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(330),o=a(256),s=a(212),l=a(1020),c=a(41),u=a(29),m=a(1);function h(e){const t=u.b.Player(),a=Object(n.useState)(!1)[1];function h(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),200);return()=>clearInterval(e)},[]);const p=t.hashManager;if(!(p instanceof i.a))throw new Error("Player does not have a HashManager)");return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,"Spend your hashes on a variety of different upgrades"),r.a.createElement(m.a,null,"Hashes: ",r.a.createElement(s.a,{hashes:t.hashManager.hashes})),Object.keys(o.a).map(e=>{const a=o.a[e];return r.a.createElement(l.a,{player:t,upg:a,hashManager:p,key:a.name,rerender:h})})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(53),o=a(634),s=a(15),l=a(158),c=a(212),u=a(1),m=a(73),h=a(10);function p(e){const[t,a]=Object(n.useState)("ecorp");function p(){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()}}const d=e.hashManager,f=e.upg,g=d.getUpgradeCost(f.name),y=d.upgrades[f.name],b=f.effectText(y),E=d.hashes>=g;return r.a.createElement(m.a,{sx:{p:1}},r.a.createElement(u.a,null,r.a.createElement(l.a,{value:f.name})),r.a.createElement(u.a,null,"Cost: ",r.a.createElement(c.a,{hashes:g}),", Bought: ",y," times"),r.a.createElement(u.a,null,f.desc),!f.hasTargetServer&&r.a.createElement(h.a,{onClick:p,disabled:!E},"Buy"),f.hasTargetServer&&r.a.createElement(o.a,{purchase:p,canPurchase:E,value:t,serverType:o.b.Foreign,onChange:function(e){a(e.target.value)}}),y>0&&b&&r.a.createElement(u.a,null,b))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(36),o=a(10);function s(){return(s=Object.assign||function(e){for(var t=1;t!e)}const w=m.a[e.locName];if(null==w)throw new Error("CompanyLocation component constructed with invalid company: "+e.locName);const S=u.a[e.locName];if(null==S)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);const C=t.jobs[e.locName]?t.jobs[e.locName]:null,x=C?p.a[C]:null;t.location=e.locName;const O=null!=C,M=w.getFavorGain();return r.a.createElement(r.a.Fragment,null,O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"Job Title: ",C),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"You will have ",r.a.createElement(g.a,{favor:w.favor+M[0]})," company favor upon resetting after installing Augmentations")},r.a.createElement(i.a,null,"Company reputation: ",r.a.createElement(f.a,{reputation:w.playerReputation})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"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 company.")},r.a.createElement(i.a,null,"Company Favor: ",r.a.createElement(g.a,{favor:w.favor})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(n){if(!n.isTrusted)return;const r=x;r instanceof h.a&&(r.isPartTimeJob()||r.isSoftwareConsultantJob()||r.isBusinessConsultantJob()?t.startWorkPartTime(a,e.locName):t.startWork(a,e.locName),a.toWork())}},"Work"),"    ",r.a.createElement(o.a,{onClick:()=>k(!0)},"Quit"),r.a.createElement(b.a,{locName:e.locName,company:w,onQuit:_,open:E,onClose:()=>k(!1)})),r.a.createElement("br",null),w.hasAgentPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.a[0]],onClick:function(e){e.isTrusted&&(t.applyForAgentJob(),_())},text:"Apply for Agent Job"}),w.hasBusinessConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.c[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessConsultantJob(),_())},text:"Apply for Business Consultant Job"}),w.hasBusinessPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.b[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessJob(),_())},text:"Apply for Business Job"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.e[1]],onClick:function(e){e.isTrusted&&(t.applyForEmployeeJob(),_())},text:"Apply to be an Employee"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.g[1]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeEmployeeJob(),_())},text:"Apply to be a part-time Employee"}),w.hasITPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.d[0]],onClick:function(e){e.isTrusted&&(t.applyForItJob(),_())},text:"Apply for IT Job"}),w.hasSecurityPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.h[2]],onClick:function(e){e.isTrusted&&(t.applyForSecurityJob(),_())},text:"Apply for Security Job"}),w.hasSoftwareConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.k[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareConsultantJob(),_())},text:"Apply for Software Consultant Job"}),w.hasSoftwarePositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.j[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareJob(),_())},text:"Apply for Software Job"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.e[0]],onClick:function(e){e.isTrusted&&(t.applyForWaiterJob(),_())},text:"Apply to be a Waiter"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.g[0]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeWaiterJob(),_())},text:"Apply to be a part-time Waiter"}),null!=S.infiltrationData&&r.a.createElement(o.a,{onClick:function(t){if(!t.isTrusted)return;const n=S;if(!n.infiltrationData)throw new Error(`trying to start infiltration at ${e.locName} but the infiltrationData is null`);a.toInfiltration(n)}},"Infiltrate Company"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(29),o=a(41),s=a(1),l=a(10);function c(e){const t=i.b.Player();return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,null," Would you like to quit your job at ",e.company.name,"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:function(){t.quitJob(e.locName),e.onQuit(),e.onClose()}},"Quit"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(10),i=a(8),o=a(27),s=a(16);function l(e){function t(){const t=Object(o.d)(e.loc.name);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return e.loc.costMult;const a=t.backdoorInstalled?.9:1;return e.loc.costMult*a}function a(a){const n=e.loc;e.p.startClass(e.router,t(),n.expMult,a)}const l=i.a.ClassGymBaseCost*t();return n.createElement(n.Fragment,null,n.createElement(r.a,{onClick:function(){a(i.a.ClassGymStrength)}},"Train Strength (",n.createElement(s.a,{money:l,player:e.p})," / sec)"),n.createElement("br",null),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymDefense)}},"Train Defense (",n.createElement(s.a,{money:l,player:e.p})," / sec)"),n.createElement("br",null),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymDexterity)}},"Train Dexterity (",n.createElement(s.a,{money:l,player:e.p})," / sec)"),n.createElement("br",null),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymAgility)}},"Train Agility (",n.createElement(s.a,{money:l,player:e.p})," / sec)"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(10),i=a(356),o=a(16),s=a(15);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(i.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,"hospitalization"),this.props.p.hp=this.props.p.max_hp,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(r.a,{onClick:this.getHealed,style:this.btnStyle},"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 c}));var n=a(0),r=a(10),i=a(26),o=a(77),s=a(4),l=a(29);function c(){const e=l.b.Player(),t=l.b.Router();const a=o.a.Shoplift.successRate(e),c=o.a.RobStore.successRate(e),u=o.a.Mug.successRate(e),m=o.a.Larceny.successRate(e),h=o.a.DealDrugs.successRate(e),p=o.a.BondForgery.successRate(e),d=o.a.TraffickArms.successRate(e),f=o.a.Homicide.successRate(e),g=o.a.GrandTheftAuto.successRate(e),y=o.a.Kidnap.successRate(e),b=o.a.Assassination.successRate(e),E=o.a.Heist.successRate(e);return n.createElement(n.Fragment,null,n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to shoplift from a low-end retailer")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Shoplift.commit(t,e)}},"Shoplift (",s.a.formatPercentage(a)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to commit armed robbery on a high-end store")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.RobStore.commit(t,e)}},"Rob store (",s.a.formatPercentage(c)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to mug a random person on the street")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Mug.commit(t,e)}},"Mug someone (",s.a.formatPercentage(u)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to rob property from someone's house")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Larceny.commit(t,e)}},"Larceny (",s.a.formatPercentage(m)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to deal drugs")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.DealDrugs.commit(t,e)}},"Deal Drugs (",s.a.formatPercentage(h)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to forge corporate bonds")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.BondForgery.commit(t,e)}},"Bond Forgery (",s.a.formatPercentage(p)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to smuggle illegal arms into the city")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.TraffickArms.commit(t,e)}},"Traffick illegal Arms (",s.a.formatPercentage(d)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to murder a random person on the street")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Homicide.commit(t,e)}},"Homicide (",s.a.formatPercentage(f)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to commit grand theft auto")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.GrandTheftAuto.commit(t,e)}},"Grand theft Auto (",s.a.formatPercentage(g)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to kidnap and ransom a high-profile-target")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Kidnap.commit(t,e)}},"Kidnap and Ransom (",s.a.formatPercentage(y)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to assassinate a high-profile target")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Assassination.commit(t,e)}},"Assassinate (",s.a.formatPercentage(b)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to pull off the ultimate heist")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Heist.commit(t,e)}},"Heist (",s.a.formatPercentage(E)," chance of success)")),n.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1030),l=a(9),c=a(6),u=a(24),m=a(113),h=a(29),p=a(15),d=a(253),f=a(1031),g=a(114),y=a(140),b=a(541);function E(e){const t=h.b.Player(),a=h.b.Router(),E=Object(n.useState)(!1)[1],k=t.inBladeburner();function v(){const e=t;if(e.inBladeburner())a.toBladeburner();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),Object(p.a)("You have been accepted into the Bladeburner division!"),E(e=>!e);const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(p.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}function _(){a.toResleeves()}function w(){const[e,a]=Object(n.useState)(!1);return t.canAccessCorporation()?r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{disabled:!t.canAccessCorporation()||t.hasCorporation(),onClick:()=>a(!0)},"Create a Corporation"),r.a.createElement(s.a,{open:e,onClose:()=>a(!1)})):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}function S(){const e=u.a["Church of the Machine God"];t.factions.includes("Church of the Machine God")||Object(m.d)(e),t.augmentations.some(e=>e.name===c.a.StaneksGift1)||t.queuedAugmentations.some(e=>e.name===c.a.StaneksGift1)||Object(y.a)({name:c.a.StaneksGift1,level:1}),a.toFaction(e)}switch(e.loc.name){case l.a.NewTokyoVitaLife:return t.canAccessResleeving()?r.a.createElement(o.a,{onClick:_},"Re-Sleeve"):r.a.createElement(r.a.Fragment,null);case l.a.Sector12CityHall:return r.a.createElement(w,null);case l.a.Sector12NSA:return function(){if(!t.canAccessBladeburner())return r.a.createElement(r.a.Fragment,null);const e=k?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return r.a.createElement(o.a,{onClick:v},e)}();case l.a.NewTokyoNoodleBar:return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){d.b.emit("You ate some delicious noodles and feel refreshed","success"),Object(f.a)(),t.sourceFiles.length>0&&t.giveExploit(g.a.N00dles),(t.sourceFileLvl(5)>0||5===t.bitNodeN)&&(t.intelligence_exp*=1.0000000000000002)}},"Eat noodles"));case l.a.ChongqingChurchOfTheMachineGod:return function(){const e=r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," `` ",r.a.createElement("br",null)," -odmmNmds: ",r.a.createElement("br",null)," `hNmo:..-omNh. ",r.a.createElement("br",null)," yMd` `hNh ",r.a.createElement("br",null)," mMd oNm ",r.a.createElement("br",null)," oMNo .mM/ ",r.a.createElement("br",null)," `dMN+ -mM+ ",r.a.createElement("br",null)," -mMNo -mN+ ",r.a.createElement("br",null)," .+- :mMNo/mN/ ",r.a.createElement("br",null),":yNMd. :NMNNN/ ",r.a.createElement("br",null),"-mMMMh. /NMMh` ",r.a.createElement("br",null)," .dMMMd. /NMMMy` ",r.a.createElement("br",null)," `yMMMd. /NNyNMMh` ",r.a.createElement("br",null)," `sMMMd. +Nm: +NMMh. ",r.a.createElement("br",null)," oMMMm- oNm: /NMMd. ",r.a.createElement("br",null)," +NMMmsMm- :mMMd. ",r.a.createElement("br",null)," /NMMMm- -mMMd. ",r.a.createElement("br",null)," /MMMm- -mMMd. ",r.a.createElement("br",null)," `sMNMMm- .mMmo ",r.a.createElement("br",null)," `sMd:hMMm. ./. ",r.a.createElement("br",null)," `yMy` `yNMd` ",r.a.createElement("br",null)," `hMs` oMMy ",r.a.createElement("br",null)," `hMh sMN- ",r.a.createElement("br",null)," /MM- .NMo ",r.a.createElement("br",null)," +MM: :MM+ ",r.a.createElement("br",null)," sNNo-.`.-omNy` ",r.a.createElement("br",null)," -smNNNNmdo- ",r.a.createElement("br",null)," `..` ");return t.hasAugmentation(c.a.StaneksGift3,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it seems. Curious, Just how much of a machine's soul do you house in that body?")),e):t.hasAugmentation(c.a.StaneksGift2,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: I see you\'ve taken to my creation. So much so it could hardly be recognized as one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.')),e):t.factions.includes("Church of the Machine God")?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome back my child!')),e):t.canAccessCotMG()?t.augmentations.filter(e=>e.name!==c.a.NeuroFluxGovernor).length>0||t.queuedAugmentations.filter(e=>e.name!==c.a.NeuroFluxGovernor).length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Begone you filth! My gift must be the first modification that your body should have!'))):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human form? If you are, accept my gift.')),r.a.createElement(o.a,{onClick:S},"Accept Stanek's Gift"),e):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"A decrepit altar stands in the middle of a dilapidated church.",r.a.createElement("br",null),r.a.createElement("br",null),"A symbol is carved in the altar."),r.a.createElement("br",null),e)}();case l.a.IshimaGlitch:return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement(b.a,{content:"An eerie aura surround this area. You feel you should leave."})));default:return console.error(`Location ${e.loc.name} doesn't have any special properties`),r.a.createElement(r.a.Fragment,null)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(16),o=a(41),s=a(29),l=a(1),c=a(10),u=a(82);function m(e){const t=s.b.Player(),a=s.b.Router(),m=t.canAfford(15e10);if(!t.canAccessCorporation()||t.hasCorporation())return e.onClose(),r.a.createElement(r.a.Fragment,null);const[h,p]=Object(n.useState)("");return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,null,"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",r.a.createElement("br",null),r.a.createElement("br",null),"If you would like to start one, please enter a name for your corporation below:"),r.a.createElement(u.a,{autoFocus:!0,placeholder:"Corporation Name",onChange:function(e){p(e.target.value)},value:h}),r.a.createElement(c.a,{onClick:function(){""!=h&&(t.startCorporation(h,5e8),e.onClose(),a.toCorporation())},disabled:""==h},"Use seed money"),r.a.createElement(c.a,{onClick:function(){m&&""!=h&&(t.startCorporation(h),t.loseMoney(15e10,"corporation"),e.onClose(),a.toCorporation())},disabled:""==h||!m},"Self-Fund (",r.a.createElement(i.a,{money:15e10,player:t}),")"))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return N00dles}));const n00dlePower="[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()";function N00dles(){eval(n00dlePower)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1033),l=a(1034),c=a(1036),u=a(216),m=a(16),h=a(29),p=a(1037),d=a(4);function f(e){const[t,a]=Object(n.useState)(!1),i=h.b.Player(),s=Object(u.a)(e.ram);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onClick:()=>a(!0),disabled:!i.canAfford(s)},"Purchase ",d.a.formatRAM(e.ram)," Server - ",r.a.createElement(m.a,{money:s,player:i})),r.a.createElement(p.a,{open:t,onClose:()=>a(!1),ram:e.ram,cost:s,rerender:e.rerender}),r.a.createElement("br",null))}function g(e){const t=h.b.Player(),a=Object(n.useState)(!1)[1];function o(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(o,1e3);return()=>clearInterval(e)},[]);const u=[];for(let t=e.loc.techVendorMinRam;t<=e.loc.techVendorMaxRam;t*=2)u.push(r.a.createElement(f,{key:t,ram:t,rerender:o}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),u,r.a.createElement("br",null),r.a.createElement(i.a,null,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(l.a,{p:t,rerender:o}),r.a.createElement("br",null),r.a.createElement(s.a,{p:t,rerender:o}),r.a.createElement("br",null),r.a.createElement(c.a,{p:t,rerender:o}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(10),o=a(26),s=a(8),l=a(216),c=a(16),u=a(4),m=a(153);function h(e){const t=e.p.getHomeComputer();if(t.maxRam>=s.a.HomeComputerMaxRam)return r.a.createElement(i.a,null,"Upgrade 'home' RAM - MAX");const a=e.p.getUpgradeHomeRamCost();return r.a.createElement(o.a,{title:r.a.createElement(m.MathJaxContext,null,r.a.createElement(m.MathJax,null,"\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)"))},r.a.createElement("span",null,r.a.createElement(i.a,{disabled:!e.p.canAfford(a),onClick:function(){Object(l.d)(e.p),e.rerender()}},"Upgrade 'home' RAM (",u.a.formatRAM(t.maxRam)," -> ",u.a.formatRAM(2*t.maxRam),") - ",r.a.createElement(c.a,{money:a,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(10),o=a(1035),s=a(8),l=a(16);function c(e){return e.p.hasTorRouter()?r.a.createElement(i.a,null,"TOR Router - Purchased"):r.a.createElement(i.a,{disabled:!e.p.canAfford(s.a.TorRouterCost),onClick:function(){Object(o.a)(e.p),e.rerender()}},"Purchase TOR router - ",r.a.createElement(l.a,{money:s.a.TorRouterCost,player:e.p}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(8),r=a(27),i=a(119),o=a(15);function s(e){if(e.hasTorRouter())return void Object(o.a)("You already have a TOR Router!");if(!e.canAfford(n.a.TorRouterCost))return void Object(o.a)("You cannot afford to purchase the TOR router!");e.loseMoney(n.a.TorRouterCost,"other");const t=Object(i.f)({ip:Object(r.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(t),e.getHomeComputer().serversOnNetwork.push(t.hostname),t.serversOnNetwork.push(e.getHomeComputer().hostname),Object(o.a)("You have purchased a TOR router!
You now have access to the dark web from your home computer.
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 c}));var n=a(0),r=a.n(n),i=a(10),o=a(26),s=a(16),l=a(153);function c(e){const t=e.p.getHomeComputer(),a=t.cpuCores>=8;if(a)return r.a.createElement(i.a,null,"Upgrade 'home' cores - MAX");const n=e.p.getUpgradeHomeCoresCost();return r.a.createElement(o.a,{title:r.a.createElement(l.MathJaxContext,null,r.a.createElement(l.MathJax,null,"\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)"))},r.a.createElement("span",null,r.a.createElement(i.a,{disabled:!e.p.canAfford(n),onClick:function(){a||e.p.canAfford(n)&&(e.p.loseMoney(n,"servers"),t.cpuCores++,e.rerender())}},"Upgrade 'home' cores (",t.cpuCores," -> ",t.cpuCores+1,") - ",r.a.createElement(s.a,{money:n,player:e.p}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(216),o=a(4),s=a(16),l=a(41),c=a(29),u=a(1),m=a(82),h=a(10);function p(e){const t=c.b.Player(),[a,p]=Object(n.useState)("");function d(){Object(i.e)(a,e.ram,e.cost,t),e.onClose()}return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,null,"Would you like to purchase a new server with ",o.a.formatRAM(e.ram)," of RAM for"," ",r.a.createElement(s.a,{money:e.cost,player:t}),"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,null," Please enter the server hostname below:"),r.a.createElement("br",null),r.a.createElement(m.a,{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&d()},onChange:function(e){p(e.target.value)},type:"text",placeholder:"Unique Hostname",InputProps:{endAdornment:r.a.createElement(h.a,{onClick:d,disabled:!t.canAfford(e.cost)||""===a},"Buy")}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(8),o=a(16),s=a(41),l=a(29),c=a(1),u=a(10);function m(e){const t=l.b.Player(),a=i.a.TravelCost;return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,null,"Would you like to travel to ",e.city,"? The trip will cost ",r.a.createElement(o.a,{money:a,player:t}),"."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{onClick:function(){e.travel()}},r.a.createElement(c.a,null,"Travel")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(26),i=a(10),o=a(8),s=a(27),l=a(16),c=a(29);function u(e){const t=c.b.Player(),a=c.b.Router();function u(){const t=Object(s.d)(e.loc.name);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return e.loc.costMult;const a=t.backdoorInstalled?.9:1;return e.loc.costMult*a}function m(n){const r=e.loc;t.startClass(a,u(),r.expMult,n)}const h=u(),p=o.a.ClassDataStructuresBaseCost*h,d=o.a.ClassNetworksBaseCost*h,f=o.a.ClassAlgorithmsBaseCost*h,g=o.a.ClassManagementBaseCost*h,y=o.a.ClassLeadershipBaseCost*h;return n.createElement(n.Fragment,null,n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassStudyComputerScience)}},"Study Computer Science (free)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassDataStructures)}},"Take Data Structures course (",n.createElement(l.a,{money:p,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassNetworks)}},"Take Networks course (",n.createElement(l.a,{money:d,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassAlgorithms)}},"Take Algorithms course (",n.createElement(l.a,{money:f,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain charisma experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassManagement)}},"Take Management course (",n.createElement(l.a,{money:g,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain charisma experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassLeadership)}},"Take Leadership course (",n.createElement(l.a,{money:y,player:t})," / sec)")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n,r=a(0),i=a.n(r),o=a(10),s=a(1041),l=a(1043),c=a(1044),u=a(1045);function m(e){const[t,a]=Object(r.useState)(n.None);function m(e){a(e)}return i.a.createElement(i.a.Fragment,null,t===n.None&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{onClick:()=>m(n.Coin)},"Play coin flip"),i.a.createElement("br",null),i.a.createElement(o.a,{onClick:()=>m(n.Slots)},"Play slots"),i.a.createElement("br",null),i.a.createElement(o.a,{onClick:()=>m(n.Roulette)},"Play roulette"),i.a.createElement("br",null),i.a.createElement(o.a,{onClick:()=>m(n.Blackjack)},"Play blackjack")),t!==n.None&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{onClick:()=>m(n.None)},"Stop playing"),t===n.Coin&&i.a.createElement(l.a,{p:e.p}),t===n.Slots&&i.a.createElement(u.a,{p:e.p}),t===n.Roulette&&i.a.createElement(c.a,{p:e.p}),t===n.Blackjack&&i.a.createElement(s.a,{p:e.p})))}!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(n||(n={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a(16),i=a(185),o=a(1042),s=a(467),l=a(1352),c=a(636),u=a(10),m=a(73),h=a(32),p=a(1),d=a(82);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}var g;!function(e){e.Pending="",e.PlayerWon="You won!",e.PlayerWonByBlackjack="You Won! Blackjack!",e.DealerWon="You lost!",e.Tie="Push! (Tie)"}(g||(g={}));class y extends i.a{constructor(e){super(e),f(this,"canStartGame",()=>{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),f(this,"startGame",()=>{if(!this.canStartGame()||Object(i.b)(this.props.p))return;this.props.p.loseMoney(this.state.bet,"casino");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:g.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(g.Tie):this.finishGame(g.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(g.DealerWon)}),f(this,"getHandValue",e=>{let t=[0];for(let a=0;a=10?t.map(e=>e+10):1===n?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+n)}return t}),f(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]}),f(this,"getHandDisplayValues",e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),f(this,"isHandBusted",e=>this.getTrueHandValue(e)>21),f(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(g.DealerWon)}),f(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(g.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(g.PlayerWon):a{const t=e===g.DealerWon?0:e===g.Tie?this.state.bet:e===g.PlayerWon?2*this.state.bet:e===g.PlayerWonByBlackjack?2.5*this.state.bet:(()=>{throw new Error("Unexpected result: "+e)})();this.win(this.props.p,t),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t-this.state.bet})}),f(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:g.Pending}):this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),f(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:g.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:a,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:f,gains:y}=this.state,b=this.getHandDisplayValues(t),E=this.getHandDisplayValues(a);return n.createElement(n.Fragment,null,n.createElement(h.a,null,n.createElement(d.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?f:"",type:"number",style:{width:"200px"},InputProps:{startAdornment:n.createElement(l.a,{position:"start"},n.createElement(p.a,null,"$"))}}),n.createElement(p.a,null,"Total earnings this session: ",n.createElement(r.a,{money:y}))),i?n.createElement(n.Fragment,null,n.createElement(u.a,{onClick:this.playerHit},"Hit"),n.createElement(u.a,{color:"secondary",onClick:this.playerStay},"Stay")):n.createElement(u.a,{onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start"),(i||o!==g.Pending)&&n.createElement(n.Fragment,null,n.createElement(h.a,{display:"flex"},n.createElement(m.a,{elevation:2},n.createElement(p.a,null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement(p.a,null,"Count:"," ",b.map((e,t)=>n.createElement("span",{key:t},e)).reduce((e,t)=>[e," or ",t])))),n.createElement("br",null),n.createElement(h.a,{display:"flex"},n.createElement(m.a,{elevation:2},n.createElement(p.a,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(p.a,null,"Count:"," ",E.map((e,t)=>n.createElement("span",{key:t},e)).reduce((e,t)=>[e," or ",t])))))),o!==g.Pending&&n.createElement(p.a,null,o," ",o===g.PlayerWon&&n.createElement(r.a,{money:this.state.bet}),o===g.PlayerWonByBlackjack&&n.createElement(r.a,{money:1.5*this.state.bet}),o===g.DealerWon&&n.createElement(r.a,{money:-this.state.bet})))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(232),r=a(362);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;ty(!1),250),s?Object(o.c)(e.p,t):Object(o.c)(e.p,-t),Object(o.b)(e.p)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Result:")," ",h,r.a.createElement(m.a,{display:"flex",alignItems:"center"},r.a.createElement(c.a,{type:"number",onChange:function(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e4&&(t=1e4),t<0&&(t=0),a(t)},InputProps:{endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onClick:Object(s.a)(()=>b("H")),disabled:g},"Head!"),r.a.createElement(u.a,{onClick:Object(s.a)(()=>b("T")),disabled:g},"Tail!"))}})),r.a.createElement(l.a,{variant:"h3"},d))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(16),o=a(185),s=a(328),l=a(78),c=a(1),u=a(10),m=a(82);const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],p={Red:{match:e=>0!==e&&h.includes(e),payout:1},Black:{match:e=>!h.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 d(e){return{match:t=>e===t,payout:36}}function f(e){const[t]=Object(n.useState)(new s.b((new Date).getTime())),[a,h]=Object(n.useState)(1e3),[f,g]=Object(n.useState)(!0),[y,b]=Object(n.useState)("waiting"),[E,k]=Object(n.useState)(0),[v,_]=Object(n.useState)(!0),[w,S]=Object(n.useState)({payout:0,match:()=>!1});function C(){v||k(Math.floor(37*Math.random()))}function x(n){Object(o.b)(e.p)||(g(!1),_(!1),b("playing"),S(n),setTimeout(()=>{let n=Math.floor(37*t.random()),s=r.a.createElement(r.a.Fragment,null),l=0,c=w.match(n);if(c&&Math.random()>.9)for(c=!1;w.match(n);)n=(n+1)%36;c?(l=a*w.payout,s=r.a.createElement(r.a.Fragment,null,"won ",r.a.createElement(i.a,{money:l}))):(l=-a,s=r.a.createElement(r.a.Fragment,null,"lost ",r.a.createElement(i.a,{money:-l}))),Object(o.c)(e.p,l),g(!0),_(!0),b(s),k(n),Object(o.b)(e.p)},1600))}return Object(n.useEffect)(()=>{const e=window.setInterval(C,50);return()=>clearInterval(e)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},function(){if(0===E)return"0";const e=function(e){return[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(e)}(E)?"R":"B";return`${E}${e}`}()),r.a.createElement(m.a,{type:"number",onChange:function(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e7&&(t=1e7),t<0&&(t=0),h(t)},placeholder:"Amount to play",disabled:!f}),r.a.createElement(c.a,{variant:"h4"},y),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(3)))},"3")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(6)))},"6")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(9)))},"9")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(12)))},"12")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(15)))},"15")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(18)))},"18")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(21)))},"21")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(24)))},"24")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(27)))},"27")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(30)))},"30")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(33)))},"33")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(36)))},"36"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(2)))},"2")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(5)))},"5")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(8)))},"8")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(11)))},"11")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(14)))},"14")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(17)))},"17")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(20)))},"20")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(23)))},"23")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(26)))},"26")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(29)))},"29")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(32)))},"32")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(35)))},"35"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(1)))},"1")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(4)))},"4")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(7)))},"7")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(10)))},"10")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(13)))},"13")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(16)))},"16")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(19)))},"19")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(22)))},"22")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(25)))},"25")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(28)))},"28")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(31)))},"31")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(34)))},"34"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Third1))},"1 to 12")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Third2))},"13 to 24")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Third3))},"25 to 36"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Red))},"Red")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Black))},"Black")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Odd))},"Odd")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Even))},"Even")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.High))},"High")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Low))},"Low"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(0)))},"0"))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(16),o=a(328),s=a(185),l=a(78),c=a(1),u=a(82),m=a(10);const h=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function p(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 d=[[[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]]];function f(e){const[t]=Object(n.useState)(new o.b(e.p.totalPlaytime)),[a,f]=Object(n.useState)([0,0,0,0,0]),[g,y]=Object(n.useState)([0,0,0,0,0]),[b,E]=Object(n.useState)(1e3),[k,v]=Object(n.useState)(!0),[_,w]=Object(n.useState)("waiting");function S(){let t=!1;const n=a.slice();for(const e in n)(n[e]!==g[e]||t)&&(n[e]=(n[e]+1)%h.length,t=!0);f(n),t&&n.every((e,t)=>e===g[t])&&function(){const t=C(),a=function(e){const a=[];for(const n of e)a.push(t[n[0]][n[1]]);return a},n=function(e){let t=1;for(let a=1;a0?"gained":"lost"," ",r.a.createElement(i.a,{money:Math.abs(o)}))),v(!0),Object(s.b)(e.p));}()}function C(){return[[h[(a[0]+h.length-1)%h.length],h[(a[1]+h.length-1)%h.length],h[(a[2]+h.length-1)%h.length],h[(a[3]+h.length-1)%h.length],h[(a[4]+h.length-1)%h.length]],[h[a[0]],h[a[1]],h[a[2]],h[a[3]],h[a[4]]],[h[(a[0]+1)%h.length],h[(a[1]+1)%h.length],h[(a[2]+1)%h.length],h[(a[3]+1)%h.length],h[(a[4]+1)%h.length]]]}function x(){y([Math.floor(t.random()*h.length),Math.floor(t.random()*h.length),Math.floor(t.random()*h.length),Math.floor(t.random()*h.length),Math.floor(t.random()*h.length)])}Object(n.useEffect)(()=>{const e=window.setInterval(S,50);return()=>clearInterval(e)});const O=C();return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",O[0][0]," | ",O[0][1]," | ",O[0][2]," | ",O[0][3]," | ",O[0][4]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",h[a[0]]," | ",h[a[1]]," | ",h[a[2]]," | ",h[a[3]]," | ",h[a[4]]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",h[(a[0]+1)%h.length]," | ",h[(a[1]+1)%h.length]," | ",h[(a[2]+1)%h.length]," | ",h[(a[3]+1)%h.length]," | ",h[(a[4]+1)%h.length]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(u.a,{type:"number",onChange:function(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e6&&(t=1e6),t<0&&(t=0),E(t)},placeholder:"Amount to play",disabled:!k,InputProps:{endAdornment:r.a.createElement(m.a,{onClick:Object(l.a)((function(){Object(s.b)(e.p)||(w("playing"),Object(s.c)(e.p,-b),k&&(y([-1,-1,-1,-1,-1]),v(!1),setTimeout(x,2e3*t.random()+1e3)))})),disabled:!k},"Spin!")}}),r.a.createElement(c.a,{variant:"h4"},_),r.a.createElement(c.a,null,"Pay lines"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"----- ····· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ----- ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ····· -----"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"··^·· \\···/ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·/·\\· ·\\·/· ·---·"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ··v·· ·····"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ·---· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·---· /···\\ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ····· ·---·"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a(137),i=a(9),o=a(227),s=a(13),l=a(29),c=a(1),u=a(10),m=a(48);function h(e,t){t.name===i.a.TravelAgency?e.toTravel():t.name===i.a.WorldStockExchange?e.toStockMarket():e.toLocation(t)}function p(e){e.types;const t=l.b.Router();let a="X";return e.types.includes(m.a.Company)&&(a="C"),e.types.includes(m.a.Gym)&&(a="G"),e.types.includes(m.a.Hospital)&&(a="H"),e.types.includes(m.a.Slums)&&(a="S"),e.types.includes(m.a.StockMarket)&&(a="$"),e.types.includes(m.a.TechVendor)&&(a="T"),e.types.includes(m.a.TravelAgency)&&(a="T"),e.types.includes(m.a.University)&&(a="U"),e.types.includes(m.a.Casino)&&(a="¢"),e.types.includes(m.a.Special)&&(a="?"),e?n.createElement("span",{"aria-label":e.name,key:e.name,style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:()=>h(t,e)},n.createElement("b",null,a)):n.createElement("span",null,"*")}function d(e){const 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 s;for(;null!==(s=t.exec(n));)i.push(s);if(0===i.length)return r.push(n),r;for(let t=0;tn.createElement(n.Fragment,{key:e},n.createElement(u.a,{onClick:()=>h(t,o.a[e])},e),n.createElement("br",null)));return n.createElement(n.Fragment,null,a)}function g(){const e=l.b.Player(),t=r.a[e.city];return n.createElement(n.Fragment,null,n.createElement(c.a,null,t.name),s.a.DisableASCIIArt?n.createElement(f,{city:t}):n.createElement(d,{city:t}))}},,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(32),l=a(1),c=a(116),u=a(147),m=a(75),h=a(82);function p(e){const[t,a]=Object(n.useState)(e.options.theme),[p,d]=Object(n.useState)(e.options.insertSpaces),[f,g]=Object(n.useState)(e.options.fontSize);return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Theme: "),r.a.createElement(c.a,{onChange:e=>a(e.target.value),value:t},r.a.createElement(m.a,{value:"monokai"},"monokai"),r.a.createElement(m.a,{value:"solarized-dark"},"solarized-dark"),r.a.createElement(m.a,{value:"solarized-light"},"solarized-light"),r.a.createElement(m.a,{value:"vs-dark"},"dark"),r.a.createElement(m.a,{value:"light"},"light"))),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Use whitespace over tabs: "),r.a.createElement(u.a,{onChange:e=>d(e.target.checked),checked:p})),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(h.a,{type:"number",label:"Font size",value:f,onChange:function(e){const t=parseFloat(e.target.value);isNaN(t)||g(t)}})),r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){e.save({theme:t,insertSpaces:p,fontSize:f}),e.onClose()}},"Save"))}},function(e,t,a){"use strict";async function n(e){e.editor.defineTheme("monokai",{base:"vs-dark",inherit:!0,rules:[{background:"272822",token:""},{foreground:"75715e",token:"comment"},{foreground:"e6db74",token:"string"},{token:"number",foreground:"ae81ff"},{token:"otherkeyvars",foreground:"ae81ff"},{foreground:"ae81ff",token:"function"},{foreground:"f92672",token:"keyword"},{token:"storage.type.function.js",foreground:"ae81ff"},{token:"ns",foreground:"97d92b"},{token:"netscriptfunction",foreground:"53d3e4"},{token:"otherkeywords",foreground:"53d3e4"},{token:"this",foreground:"fd971f"}],colors:{"editor.foreground":"#F8F8F2","editor.background":"#272822","editor.selectionBackground":"#49483E","editor.lineHighlightBackground":"#3E3D32","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#3B3A32","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),e.editor.defineTheme("solarized-dark",{base:"vs-dark",inherit:!0,rules:[{background:"002b36",token:""},{foreground:"586e75",token:"comment"},{foreground:"00afaf",token:"string"},{token:"number",foreground:"00afaf"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"cb4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#839496","editor.background":"#002b36","editor.selectionBackground":"#073642","editor.lineHighlightBackground":"#073642","editorCursor.foreground":"#819090","editorWhitespace.foreground":"#073642","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),e.editor.defineTheme("solarized-light",{base:"vs",inherit:!0,rules:[{foreground:"657b83",background:"fdf6e3",token:""},{foreground:"586e75",token:"comment"},{foreground:"2aa198",token:"string"},{token:"number",foreground:"2aa198"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"bc4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#657b83","editor.background":"#fdf6e3","editor.selectionBackground":"#eee8d5","editor.lineHighlightBackground":"#eee8d5","editorCursor.foreground":"#657b83","editorWhitespace.foreground":"#eee8d5","editorIndentGuide.activeBackground":"#eee8d5","editor.selectionHighlightBorder":"#073642"}})}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";t.a='/**\n * @public\n */\ninterface Player {\n hacking: number;\n hp: number;\n max_hp: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n hacking_mult: number;\n strength_mult: number;\n defense_mult: number;\n dexterity_mult: number;\n agility_mult: number;\n charisma_mult: number;\n hacking_exp_mult: number;\n strength_exp_mult: number;\n defense_exp_mult: number;\n dexterity_exp_mult: number;\n agility_exp_mult: number;\n charisma_exp_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n numPeopleKilled: number;\n money: number;\n city: string;\n location: string;\n companyName: string;\n crime_money_mult: number;\n crime_success_mult: number;\n isWorking: boolean;\n workType: string;\n currentWorkFactionName: string;\n currentWorkFactionDescription: string;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n workRepGainRate: number;\n workMoneyGainRate: number;\n workMoneyLossRate: number;\n workHackExpGained: number;\n workStrExpGained: number;\n workDefExpGained: number;\n workDexExpGained: number;\n workAgiExpGained: number;\n workChaExpGained: number;\n workRepGained: number;\n workMoneyGained: number;\n createProgramName: string;\n createProgramReqLvl: number;\n className: string;\n crimeType: string;\n work_money_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n hasWseAccount: boolean;\n hasTixApiAccess: boolean;\n has4SData: boolean;\n has4SDataTixApi: boolean;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n bitNodeN: number;\n totalPlaytime: number;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n jobs: any;\n factions: string[];\n tor: boolean;\n}\n\n/**\n * @public\n */\ninterface RunningScript {\n args: string[];\n filename: string;\n logs: string[];\n offlineExpGained: number;\n offlineMoneyMade: number;\n offlineRunningTime: number;\n onlineExpGained: number;\n onlineMoneyMade: number;\n onlineRunningTime: number;\n pid: number;\n ramUsage: number;\n server: string;\n threads: number;\n}\n\n/**\n * Data representing the internal values of a crime.\n * @public\n */\nexport interface CrimeStats {\n /** Number representing the difficulty of the crime. Used for success chance calculations */\n difficulty: number;\n /** Amount of karma lost for successfully committing this crime */\n karma: number;\n /** How many people die as a result of this crime */\n kills: number;\n /** How much money is given */\n money: number;\n /** Name of crime */\n name: number;\n /** Milliseconds it takes to attempt the crime */\n time: number;\n /** Description of the crime activity */\n type: string;\n /** hacking level impact on success change of the crime */\n hacking_success_weight: number;\n /** strength level impact on success change of the crime */\n strength_success_weight: number;\n /** defense level impact on success change of the crime */\n defense_success_weight: number;\n /** dexterity level impact on success change of the crime */\n dexterity_success_weight: number;\n /** agility level impact on success change of the crime */\n agility_success_weight: number;\n /** charisma level impact on success change of the crime */\n charisma_success_weight: number;\n /** hacking exp gained from crime */\n hacking_exp: number;\n /** strength exp gained from crime */\n strength_exp: number;\n /** defense exp gained from crime */\n defense_exp: number;\n /** dexterity exp gained from crime */\n dexterity_exp: number;\n /** agility exp gained from crime */\n agility_exp: number;\n /** charisma exp gained from crime */\n charisma_exp: number;\n /** intelligence exp gained from crime */\n intelligence_exp: number;\n}\n\n/**\n * Data representing the internal values of an Augmentation.\n * @public\n */\nexport interface AugmentationStats {\n /** Multipler to hacking skill */\n hacking_mult?: number;\n /** Multipler to strength skill */\n strength_mult?: number;\n /** Multipler to defense skill */\n defense_mult?: number;\n /** Multipler to dexterity skill */\n dexterity_mult?: number;\n /** Multipler to agility skill */\n agility_mult?: number;\n /** Multipler to charisma skill */\n charisma_mult?: number;\n /** Multipler to hacking experience gain rate */\n hacking_exp_mult?: number;\n /** Multipler to strength experience gain rate */\n strength_exp_mult?: number;\n /** Multipler to defense experience gain rate */\n defense_exp_mult?: number;\n /** Multipler to dexterity experience gain rate */\n dexterity_exp_mult?: number;\n /** Multipler to agility experience gain rate */\n agility_exp_mult?: number;\n /** Multipler to charisma experience gain rate */\n charisma_exp_mult?: number;\n /** Multipler to chance of successfully performing a hack */\n hacking_chance_mult?: number;\n /** Multipler to hacking speed */\n hacking_speed_mult?: number;\n /** Multipler to amount of money the player gains from hacking */\n hacking_money_mult?: number;\n /** Multipler to amount of money injected into servers using grow */\n hacking_grow_mult?: number;\n /** Multipler to amount of reputation gained when working */\n company_rep_mult?: number;\n /** Multipler to amount of reputation gained when working */\n faction_rep_mult?: number;\n /** Multipler to amount of money gained from crimes */\n crime_money_mult?: number;\n /** Multipler to crime success rate */\n crime_success_mult?: number;\n /** Multipler to amount of money gained from working */\n work_money_mult?: number;\n /** Multipler to amount of money produced by Hacknet Nodes */\n hacknet_node_money_mult?: number;\n /** Multipler to cost of purchasing a Hacknet Node */\n hacknet_node_purchase_cost_mult?: number;\n /** Multipler to cost of ram for a Hacknet Node */\n hacknet_node_ram_cost_mult?: number;\n /** Multipler to cost of core for a Hacknet Node */\n hacknet_node_core_cost_mult?: number;\n /** Multipler to cost of leveling up a Hacknet Node */\n hacknet_node_level_cost_mult?: number;\n /** Multipler to Bladeburner max stamina */\n bladeburner_max_stamina_mult?: number;\n /** Multipler to Bladeburner stamina gain rate */\n bladeburner_stamina_gain_mult?: number;\n /** Multipler to effectiveness in Bladeburner Field Analysis */\n bladeburner_analysis_mult?: number;\n /** Multipler to success chance in Bladeburner contracts/operations */\n bladeburner_success_chance_mult?: number;\n}\n\n/**\n * Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.\n * @public\n */\nexport interface BasicHGWOptions {\n /** Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. */\n threads: number;\n /** Set to true this action will affect the stock market. */\n stock?: boolean;\n}\n\n/**\n * Options to affect the behavior of {@link CodingContract} attempt.\n * @public\n */\nexport interface CodingAttemptOptions {\n /** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */\n returnReward: boolean;\n}\n\n/**\n * Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}\n * @public\n */\nexport interface AugmentPair {\n /** augmentation name */\n name: string;\n /** augmentation cost */\n cost: number;\n}\n\n/**\n * Value in map of {@link StockOrder}\n * @public\n */\nexport interface StockOrderObject {\n /** Number of shares */\n shares: number;\n /** Price per share */\n price: number;\n /** Order type */\n type: string;\n /** Order position */\n position: string;\n}\n\n/**\n * Return value of {@link TIX.getOrders | getOrders}\n * @public\n */\nexport interface StockOrder {\n /** Stock Symbol */\n [key: string]: StockOrderObject[];\n}\n\n/**\n * A single process on a server.\n * @public\n */\nexport interface ProcessInfo {\n /** Script name. */\n filename: string;\n /** Number of threads script is running with */\n threads: number;\n /** Script\'s arguments */\n args: string[];\n}\n\n/**\n * Hack related multipliers.\n * @public\n */\nexport interface HackingMultipliers {\n /** Player\'s hacking chance multiplier. */\n chance: number;\n /** Player\'s hacking speed multiplier. */\n speed: number;\n /** Player\'s hacking money stolen multiplier. */\n money: number;\n /** Player\'s hacking growth multiplier */\n growth: number;\n}\n\n/**\n * Hacknet related multipliers.\n * @public\n */\nexport interface HacknetMultipliers {\n /** Player\'s hacknet production multiplier */\n production: number;\n /** Player\'s hacknet purchase cost multiplier */\n purchaseCost: number;\n /** Player\'s hacknet ram cost multiplier */\n ramCost: number;\n /** Player\'s hacknet core cost multiplier */\n coreCost: number;\n /** Player\'s hacknet level cost multiplier */\n levelCost: number;\n}\n\n/**\n * A single server.\n * @public\n */\nexport interface Server {\n /**\n * How many CPU cores this server has. Maximum of 8.\n * Affects magnitude of grow and weaken.\n */\n cpuCores: number;\n\n /** Flag indicating whether the FTP port is open */\n ftpPortOpen: boolean;\n\n /** Flag indicating whether player has admin/root access to this server */\n hasAdminRights: boolean;\n\n /** Hostname. Must be unique */\n hostname: string;\n\n /** Flag indicating whether HTTP Port is open */\n httpPortOpen: boolean;\n\n /** IP Address. Must be unique */\n ip: string;\n\n /** Flag indicating whether player is curently connected to this server */\n isConnectedTo: boolean;\n\n /** RAM (GB) available on this server */\n maxRam: number;\n\n /**\n * Name of company/faction/etc. that this server belongs to.\n * Optional, not applicable to all Servers\n */\n organizationName: string;\n\n /** RAM (GB) used. i.e. unavailable RAM */\n ramUsed: number;\n\n /** Flag indicating whether SMTP Port is open */\n smtpPortOpen: boolean;\n\n /** Flag indicating whether SQL Port is open */\n sqlPortOpen: boolean;\n\n /** Flag indicating whether the SSH Port is open */\n sshPortOpen: boolean;\n\n /** Flag indicating whether this is a purchased server */\n purchasedByPlayer: boolean;\n\n /** Flag indicating whether this server has a backdoor installed by a player */\n backdoorInstalled: boolean;\n\n /**\n * Initial server security level\n * (i.e. security level when the server was created)\n */\n baseDifficulty: number;\n\n /** Server Security Level */\n hackDifficulty: number;\n\n /** Minimum server security level that this server can be weakened to */\n minDifficulty: number;\n\n /** How much money currently resides on the server and can be hacked */\n moneyAvailable: number;\n\n /** Maximum amount of money that this server can hold */\n moneyMax: number;\n\n /** Number of open ports required in order to gain admin/root access */\n numOpenPortsRequired: number;\n\n /** How many ports are currently opened on the server */\n openPortCount: number;\n\n /** Hacking level required to hack this server */\n requiredHackingSkill: number;\n\n /**\n * Parameter that affects how effectively this server\'s money can\n * be increased using the grow() Netscript function\n */\n serverGrowth: number;\n}\n\n/**\n * All multipliers affecting the difficulty of the current challenge.\n * @public\n */\nexport interface BitNodeMultipliers {\n /** Influences how quickly the player\'s agility level (not exp) scales */\n AgilityLevelMultiplier: number;\n /** Influences the base cost to purchase an augmentation. */\n AugmentationMoneyCost: number;\n /** Influences the base rep the player must have with a faction to purchase an augmentation. */\n AugmentationRepCost: number;\n /** Influences how quickly the player can gain rank within Bladeburner. */\n BladeburnerRank: number;\n /** Influences the cost of skill levels from Bladeburner. */\n BladeburnerSkillCost: number;\n /** Influences how quickly the player\'s charisma level (not exp) scales */\n CharismaLevelMultiplier: number;\n /** Influences the experience gained for each ability when a player completes a class. */\n ClassGymExpGain: number;\n /** Influences the amount of money gained from completing Coding Contracts */\n CodingContractMoney: number;\n /** Influences the experience gained for each ability when the player completes working their job. */\n CompanyWorkExpGain: number;\n /** Influences how much money the player earns when completing working their job. */\n CompanyWorkMoney: number;\n /** Influences the valuation of corporations created by the player. */\n CorporationValuation: number;\n /** Influences the base experience gained for each ability when the player commits a crime. */\n CrimeExpGain: number;\n /** Influences the base money gained when the player commits a crime. */\n CrimeMoney: number;\n /** Influences how many Augmentations you need in order to get invited to the Daedalus faction */\n DaedalusAugsRequirement: number;\n /** Influences how quickly the player\'s defense level (not exp) scales */\n DefenseLevelMultiplier: number;\n /** Influences how quickly the player\'s dexterity level (not exp) scales */\n DexterityLevelMultiplier: number;\n /** Influences how much rep the player gains in each faction simply by being a member. */\n FactionPassiveRepGain: number;\n /** Influences the experience gained for each ability when the player completes work for a Faction. */\n FactionWorkExpGain: number;\n /** Influences how much rep the player gains when performing work for a faction. */\n FactionWorkRepGain: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data API */\n FourSigmaMarketDataApiCost: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data (NOT API) */\n FourSigmaMarketDataCost: number;\n /** Influences the experienced gained when hacking a server. */\n HackExpGain: number;\n /** Influences how quickly the player\'s hacking level (not experience) scales */\n HackingLevelMultiplier: number;\n /** Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) */\n HacknetNodeMoney: number;\n /** Influences how much money it costs to upgrade your home computer\'s RAM */\n HomeComputerRamCost: number;\n /** Influences how much money is gained when the player infiltrates a company. */\n InfiltrationMoney: number;\n /** Influences how much rep the player can gain from factions when selling stolen documents and secrets */\n InfiltrationRep: number;\n /** Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. */\n ManualHackMoney: number;\n /** Influence how much it costs to purchase a server */\n PurchasedServerCost: number;\n /** Influences the maximum number of purchased servers you can have */\n PurchasedServerLimit: number;\n /** Influences the maximum allowed RAM for a purchased server */\n PurchasedServerMaxRam: number;\n /** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */\n RepToDonateToFaction: number;\n /** Influences how much money can be stolen from a server when a script performs a hack against it. */\n ScriptHackMoney: number;\n /** Influences the growth percentage per cycle against a server. */\n ServerGrowthRate: number;\n /** Influences the maxmimum money that a server can grow to. */\n ServerMaxMoney: number;\n /** Influences the initial money that a server starts with. */\n ServerStartingMoney: number;\n /** Influences the initial security level (hackDifficulty) of a server. */\n ServerStartingSecurity: number;\n /** Influences the weaken amount per invocation against a server. */\n ServerWeakenRate: number;\n /** Influences how quickly the player\'s strength level (not exp) scales */\n StrengthLevelMultiplier: number;\n}\n\n/**\n * Object representing all the values related to a hacknet node.\n * @public\n */\nexport interface NodeStats {\n /** Node\'s name */\n name: string;\n /** Node\'s level */\n level: number;\n /** Node\'s RAM */\n ram: number;\n /** Node\'s used RAM */\n ramUsed: number;\n /** Node\'s number of cores */\n cores: number;\n /** Cache level. Only applicable for Hacknet Servers */\n cache: number;\n /** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */\n hashCapacity: number;\n /** Node\'s production per second */\n production: number;\n /** Number of seconds since Node has been purchased */\n timeOnline: number;\n /** Total number of money Node has produced */\n totalProduction: number;\n}\n\n/**\n * Short summary of the players skills.\n * @public\n */\nexport interface PlayerSkills {\n /** Hacking level */\n hacking: number;\n /** Strength level */\n strength: number;\n /** Defense level */\n defense: number;\n /** Dexterity level */\n dexterity: number;\n /** Agility level */\n agility: number;\n /** Chraisma level */\n charisma: number;\n /** Intelligence level */\n intelligence: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterMult {\n /** Agility stat */\n agility: number;\n /** Agility exp */\n agilityExp: number;\n /** Company reputation */\n companyRep: number;\n /** Money earned from crimes */\n crimeMoney: number;\n /** Crime success chance */\n crimeSuccess: number;\n /** Defense stat */\n defense: number;\n /** Defense exp */\n defenseExp: number;\n /** Dexterity stat */\n dexterity: number;\n /** Dexterity exp */\n dexterityExp: number;\n /** Faction reputation */\n factionRep: number;\n /** Hacking stat */\n hacking: number;\n /** Hacking exp */\n hackingExp: number;\n /** Strength stat */\n strength: number;\n /** Strength exp */\n strengthExp: number;\n /** Money earned from jobs */\n workMoney: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterInfo {\n /** Current BitNode number */\n bitnode: number;\n /** Name of city you are currently in */\n city: string;\n /** Array of factions you are currently a member of */\n factions: string[];\n /** Current health points */\n hp: number;\n /** Array of all companies at which you have jobs */\n company: string[];\n /** Array of job positions for all companies you are employed at. Same order as \'jobs\' */\n jobTitle: string[];\n /** Maximum health points */\n maxHp: number;\n /** Boolean indicating whether or not you have a tor router */\n tor: boolean;\n /** Object with many of the player\'s multipliers from Augmentations/Source Files */\n mult: CharacterMult;\n /** Timed worked in ms */\n timeWorked: number;\n /** Hacking experience earned so far from work */\n workHackExpGain: number;\n /** Str experience earned so far from work */\n workStrExpGain: number;\n /** Def experience earned so far from work */\n workDefExpGain: number;\n /** Dex experience earned so far from work */\n workDexExpGain: number;\n /** Agi experience earned so far from work */\n workAgiExpGain: number;\n /** Cha experience earned so far from work */\n workChaExpGain: number;\n /** Reputation earned so far from work, if applicable */\n workRepGain: number;\n /** Money earned so far from work, if applicable */\n workMoneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface SleeveWorkGains {\n /** hacking exp gained from work */\n workHackExpGain: number;\n /** strength exp gained from work */\n workStrExpGain: number;\n /** defense exp gained from work, */\n workDefExpGain: number;\n /** dexterity exp gained from work */\n workDexExpGain: number;\n /** agility exp gained from work */\n workAgiExpGain: number;\n /** charisma exp gained from work */\n workChaExpGain: number;\n /** money gained from work */\n workMoneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface SourceFileLvl {\n /** The number of the source file */\n n: number;\n /** The level of the source file */\n lvl: number;\n}\n\n/**\n * Bladeburner current action.\n * @public\n */\nexport interface BladeburnerCurAction {\n /** Type of Action */\n type: string;\n /** Name of Action */\n name: string;\n}\n\n/**\n * Gang general info.\n * @public\n */\nexport interface GangGenInfo {\n /** Name of faction that the gang belongs to ("Slum Snakes", etc.) */\n faction: string;\n /** Boolean indicating whether or not its a hacking gang */\n isHacking: boolean;\n /** Money earned per game cycle */\n moneyGainRate: number;\n /** Gang\'s power for territory warfare */\n power: number;\n /** Gang\'s respect */\n respect: number;\n /** Respect earned per game cycle */\n respectGainRate: number;\n /** Amount of territory held. */\n territory: number;\n /** Clash chance. */\n territoryClashChance: number;\n /** Gang\'s wanted level */\n wantedLevel: number;\n /** Wanted level gained/lost per game cycle (negative for losses) */\n wantedLevelGainRate: number;\n /** Boolean indicating if territory warfare is enabled. */\n territoryWarfareEngaged: boolean;\n /** Number indicating the current wanted penalty. */\n wantedPenalty: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfoObject {\n /** Gang power */\n power: number;\n /** Gang territory, in decimal form */\n territory: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfo {\n "Slum Snakes": GangOtherInfoObject;\n Tetrads: GangOtherInfoObject;\n "The Syndicate": GangOtherInfoObject;\n "The Dark Army": GangOtherInfoObject;\n "Speakers for the Dead": GangOtherInfoObject;\n NiteSec: GangOtherInfoObject;\n "The Black Hand": GangOtherInfoObject;\n}\n\n/**\n * Object representing data representing a gang member task.\n * @public\n */\nexport interface GangTaskStats {\n /** Task name */\n name: string;\n /** Task Description */\n desc: string;\n /** Is a task of a hacking gang */\n isHacking: boolean;\n /** Is a task of a combat gang */\n isCombat: boolean;\n /** Base respect earned */\n baseRespect: number;\n /** Base wanted earned */\n baseWanted: number;\n /** Base money earned */\n baseMoney: number;\n /** Hacking skill impact on task scaling */\n hackWeight: number;\n /** Stength skill impact on task scaling */\n strWeight: number;\n /** Defense skill impact on task scaling */\n defWeight: number;\n /** Dexterity skill impact on task scaling */\n dexWeight: number;\n /** Agility skill impact on task scaling */\n agiWeight: number;\n /** Charisma skill impact on task scaling */\n chaWeight: number;\n /** Number representing the difficulty of the task */\n difficulty: number;\n /** Territory impact on task scaling */\n territory: GangTerritory;\n}\n\n/**\n * Object representing data representing a gang member equipment.\n * @public\n */\nexport interface EquipmentStats {\n /** Strength multiplier */\n str?: number;\n /** Defense multiplier */\n def?: number;\n /** Dexterity multiplier */\n dex?: number;\n /** Agility multiplier */\n agi?: number;\n /** Charisma multiplier */\n cha?: number;\n /** Hacking multiplier */\n hack?: number;\n}\n\n/**\n * @public\n */\nexport interface GangTerritory {\n /** Money gain impact on task scaling */\n money: number;\n /** Respect gain impact on task scaling */\n respect: number;\n /** Wanted gain impact on task scaling */\n wanted: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberInfo {\n name: string;\n task: string;\n earnedRespect: number;\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n\n hack_exp: number;\n str_exp: number;\n def_exp: number;\n dex_exp: number;\n agi_exp: number;\n cha_exp: number;\n\n hack_mult: number;\n str_mult: number;\n def_mult: number;\n dex_mult: number;\n agi_mult: number;\n cha_mult: number;\n\n hack_asc_mult: number;\n str_asc_mult: number;\n def_asc_mult: number;\n dex_asc_mult: number;\n agi_asc_mult: number;\n cha_asc_mult: number;\n\n hack_asc_points: number;\n str_asc_points: number;\n def_asc_points: number;\n dex_asc_points: number;\n agi_asc_points: number;\n cha_asc_points: number;\n\n upgrades: string[];\n augmentations: string[];\n\n respectGain: number;\n wantedLevelGain: number;\n moneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberAscension {\n /** Amount of respect lost from ascending */\n respect: number;\n /** Hacking multiplier gained from ascending.*/\n hack: number;\n /** Strength multiplier gained from ascending.*/\n str: number;\n /** Defense multiplier gained from ascending.*/\n def: number;\n /** Dexterity multiplier gained from ascending.*/\n dex: number;\n /** Agility multiplier gained from ascending.*/\n agi: number;\n /** Charisma multiplier gained from ascending.*/\n cha: number;\n}\n\n/**\n * Object representing a sleeve stats.\n * @public\n */\nexport interface SleeveSkills {\n /** current shock of the sleeve [0-100] */\n shock: number;\n /** current sync of the sleeve [0-100] */\n sync: number;\n /** current hacking skill of the sleeve */\n hacking: number;\n /** current strength of the sleeve */\n strength: number;\n /** current defense of the sleeve */\n defense: number;\n /** current dexterity of the sleeve */\n dexterity: number;\n /** current agility of the sleeve */\n agility: number;\n /** current charisma of the sleeve */\n charisma: number;\n}\n\n/**\n * Object representing sleeve information.\n * @public\n */\nexport interface SleeveInformation {\n /** location of the sleeve */\n city: string;\n /** current hp of the sleeve */\n hp: number;\n /** max hp of the sleeve */\n maxHp: number;\n /** jobs available to the sleeve */\n jobs: string[];\n /** job titles available to the sleeve */\n jobTitle: string[];\n /** does this sleeve have access to the tor router */\n tor: boolean;\n /** sleeve multipliers */\n mult: CharacterMult;\n /** time spent on the current task in milliseconds */\n timeWorked: number;\n /** earnings synchronized to other sleeves */\n earningsForSleeves: SleeveWorkGains;\n /** earnings synchronized to the player */\n earningsForPlayer: SleeveWorkGains;\n /** earnings for this sleeve */\n earningsForTask: SleeveWorkGains;\n /** faction or company reputation gained for the current task */\n workRepGain: number;\n}\n\n/**\n * Object representing a sleeve current task.\n * @public\n */\nexport interface SleeveTask {\n /** task type */\n task: string;\n /** crime currently attempting, if any */\n crime: string;\n /** location of the task, if any */\n location: string;\n /** stat being trained at the gym, if any */\n gymStatType: string;\n /** faction work type being performed, if any */\n factionWorkType: string;\n}\n\n/**\n * Stock market API\n * @public\n */\nexport interface TIX {\n /**\n * Returns an array of the symbols of the tradable stocks\n *\n * @remarks RAM cost: 2 GB\n * @returns Array of the symbols of the tradable stocks.\n */\n getSymbols(): string[];\n\n /**\n * Returns the price of a stock\n *\n * @remarks\n * RAM cost: 2 GB\n * The stock’s price is the average of its bid and ask price.\n *\n * @example\n * ```ts\n * getPrice("FISG");\n * ```\n * @param sym - Stock symbol.\n * @returns The price of a stock.\n */\n getPrice(sym: string): number;\n\n /**\n * Returns the ask price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The ask price of a stock.\n */\n getAskPrice(sym: string): number;\n\n /**\n * Returns the bid price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The bid price of a stock.\n */\n getBidPrice(sym: string): number;\n\n /**\n * Returns the player’s position in a stock.\n * @remarks\n * RAM cost: 2 GB\n * Returns an array of four elements that represents the player’s position in a stock.\n *\n * The first element is the returned array is the number of shares the player owns of\n * the stock in the Long position. The second element in the array is the average price\n * of the player’s shares in the Long position.\n *\n * The third element in the array is the number of shares the player owns of the stock\n * in the Short position. The fourth element in the array is the average price of the\n * player’s Short position.\n *\n * All elements in the returned array are numeric.\n *\n * @example\n * ```ts\n * pos = getPosition("ECP");\n * shares = pos[0];\n * avgPx = pos[1];\n * sharesShort = pos[2];\n * avgPxShort = pos[3];\n * ```\n * @param sym - Stock symbol.\n * @returns Array of four elements that represents the player’s position in a stock.\n */\n getPosition(sym: string): [number, number, number, number];\n\n /**\n * Returns the maximum number of shares of a stock.\n * @remarks\n * RAM cost: 2 GB\n * This is the maximum amount of the stock that can be purchased\n * in both the Long and Short positions combined.\n *\n * @param sym - Stock symbol.\n * @returns Maximum number of shares that the stock has.\n */\n getMaxShares(sym: string): number;\n\n /**\n * Calculates cost of buying stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much it would cost to buy a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchase.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Cost to buy a given number of shares of a stock.\n */\n getPurchaseCost(sym: string, shares: number, posType: string): number;\n\n /**\n * Calculate profit of setting stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much you would gain from selling a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Gain from selling a given number of shares of a stock.\n */\n getSaleGain(sym: string, shares: number, posType: string): number;\n\n /**\n * Buy stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase shares of a stock using a Market Order.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If this function successfully purchases the shares, it will return the stock price at which\n * each share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchased. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n buy(sym: string, shares: number): number;\n\n /**\n * Sell stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell shares of a stock using a Market Order.\n *\n * If the specified number of shares in the function exceeds the amount that the player\n * actually owns, then this function will sell all owned shares. Remember that every\n * transaction on the stock exchange costs a certain commission fee.\n *\n * The net profit made from selling stocks with this function is reflected in the script’s\n * statistics. This net profit is calculated as:\n *\n * shares * (sell_price - average_price_of_purchased_shares)\n *\n * If the sale is successful, this function will return the stock price at\n * which each share was sold. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sell(sym: string, shares: number): number;\n\n /**\n * Short stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If the purchase is successful, this function will return the stock price at which each\n * share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to short. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n short(sym: string, shares: number): number;\n\n /**\n * Sell short stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the specified number of shares exceeds the amount that the player actually owns,\n * then this function will sell all owned shares. Remember that every transaction on\n * the stock exchange costs a certain commission fee.\n *\n * If the sale is successful, this function will return the stock price at which each\n * share was sold. Otherwise it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sellShort(sym: string, shares: number): number;\n\n /**\n * Place order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Places an order on the stock market. This function only works for Limit and Stop Orders.\n *\n * The ability to place limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * Returns true if the order is successfully placed, and false otherwise.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n * @returns True if the order is successfully placed, and false otherwise.\n */\n placeOrder(sym: string, shares: number, price: number, type: string, pos: string): boolean;\n\n /**\n * Cancel order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Cancels an oustanding Limit or Stop order on the stock market.\n *\n * The ability to use limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n */\n cancelOrder(sym: string, shares: number, price: number, type: string, pos: string): void;\n\n /**\n * Returns your order book for the stock market.\n * @remarks\n * RAM cost: 2.5 GB\n * This is an object containing information for all the Limit and Stop Orders you have in the stock market.\n * The object has the following structure:\n *\n * ```ts\n * {\n * string1: [ // Array of orders for this stock\n * {\n * shares: Order quantity\n * price: Order price\n * type: Order type\n * position: Either "L" or "S" for Long or Short position\n * },\n * {\n * ...\n * },\n * ...\n * ],\n * string2: [ // Array of orders for this stock\n * ...\n * ],\n * ...\n * }\n * ```\n * The “Order type” property can have one of the following four values: "Limit Buy Order", "Limit Sell Order", "Stop Buy Order", "Stop Sell Order".\n * Note that the order book will only contain information for stocks that you actually have orders in.\n *\n * @example\n * ```ts\n * "If you do not have orders in Nova Medical (NVMD), then the returned object will not have a “NVMD” property."\n * {\n * ECP: [\n * {\n * shares: 5,\n * price: 100,000\n * type: "Stop Buy Order",\n * position: "S",\n * },\n * {\n * shares: 25,\n * price: 125,000\n * type: "Limit Sell Order",\n * position: "L",\n * },\n * ],\n * SYSC: [\n * {\n * shares: 100,\n * price: 10,000\n * type: "Limit Buy Order",\n * position: "L",\n * },\n * ],\n * }\n * ```\n * @returns Object containing information for all the Limit and Stop Orders you have in the stock market.\n */\n getOrders(): StockOrder;\n\n /**\n * Returns the volatility of the specified stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Volatility represents the maximum percentage by which a stock’s price can change every tick.\n * The volatility is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a volatility of 3%, then this function will return 0.03, NOT 3).\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Volatility of the specified stock.\n */\n getVolatility(sym: string): number;\n\n /**\n * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n * @remarks\n * RAM cost: 2.5 GB\n * The probability is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a 60% chance of increasing, then this function will return 0.6, NOT 60).\n *\n * In other words, if this function returned 0.30 for a stock, then this means that the stock’s price has a\n * 30% chance of increasing and a 70% chance of decreasing during the next tick.\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n */\n getForecast(sym: string): number;\n\n /**\n * Purchase 4S Market Data Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketData(): boolean;\n\n /**\n * Purchase 4S Market Data TIX API Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketDataTixApi(): boolean;\n}\n\n/**\n * Singularity API\n * @remarks\n * This API requires Source-File 4 level 1 / 2 / 3 to use.\n * @public\n */\nexport interface Singularity {\n /**\n * SF4.1 - Take university class.\n *\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function will automatically set you to start taking a course at a university.\n * If you are already in the middle of some “working” action (such as working at a\n * company, for a faction, or on a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these universities and classes are the same as\n * if you were to manually visit and take these classes.\n *\n * @param universityName - Name of university. You must be in the correct city for whatever university you specify.\n * @param courseName - Name of course.\n * @returns True if actions is successfully started, false otherwise.\n */\n universityCourse(universityName: string, courseName: string): boolean;\n\n /**\n * SF4.1 - Workout at the gym.\n * \n * @remarks\n * RAM cost: 2 GB\n * \n\n * This function will automatically set you to start working out at a gym to train\n * a particular stat. If you are already in the middle of some “working” action\n * (such as working at a company, for a faction, or on a program), then running\n * this function will automatically cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these gyms are the same as if you were\n * to manually visit these gyms and train\n *\n * @param gymName - Name of gym. You must be in the correct city for whatever gym you specify.\n * @param stat - The stat you want to train.\n * @returns True if actions is successfully started, false otherwise.\n */\n gymWorkout(gymName: string, stat: string): boolean;\n\n /**\n * SF4.1 - Travel to another city.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function allows the player to travel to any city. The cost for using this\n * function is the same as the cost for traveling through the Travel Agency.\n *\n * @param city - City to travel to.\n * @returns True if actions is successful, false otherwise.\n */\n travelToCity(city: string): boolean;\n\n /**\n * SF4.1 - Purchase the TOR router.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function allows you to automatically purchase a TOR router. The cost for\n * purchasing a TOR router using this function is the same as if you were to\n * manually purchase one.\n *\n * @returns True if actions is successful, false otherwise.\n */\n purchaseTor(): boolean;\n\n /**\n * SF4.1 - Purchase a program from the dark web.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function allows you to automatically purchase programs. You MUST have a\n * TOR router in order to use this function. The cost of purchasing programs\n * using this function is the same as if you were purchasing them through the Dark\n * Web using the Terminal buy command.\n *\n * @example\n * ```ts\n * purchaseProgram("brutessh.exe");\n * ```\n * @param programName - Name of program to purchase.\n * @returns True if the specified program is purchased, and false otherwise.\n */\n purchaseProgram(programName: string): boolean;\n\n /**\n * SF4.1 - Check if the player is busy.\n * @remarks\n * RAM cost: 0.5 GB\n *\n *\n * Returns a boolean indicating whether or not the player is currently performing an\n * ‘action’. These actions include working for a company/faction, studying at a univeristy,\n * working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.\n *\n * @returns True if the player is currently performing an ‘action’, false otherwise.\n */\n isBusy(): boolean;\n\n /**\n * SF4.1 - Stop the current action.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function is used to end whatever ‘action’ the player is currently performing.\n * The player will receive whatever money/experience/etc. he has earned from that action.\n *\n * The actions that can be stopped with this function are:\n *\n * * Studying at a university\n * * Working for a company/faction\n * * Creating a program\n * * Committing a Crime\n *\n * This function will return true if the player’s action was ended.\n * It will return false if the player was not performing an action when this function was called.\n *\n * @returns True if the player’s action was ended, false if the player was not performing an action.\n */\n stopAction(): boolean;\n\n /**\n * SF4.2 - Upgrade home computer RAM.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will upgrade amount of RAM on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer RAM is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer RAM is successfully upgraded, and false otherwise.\n */\n upgradeHomeRam(): boolean;\n\n /**\n * SF4.2 - Upgrade home computer cores.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will upgrade amount of cores on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer cores is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer cores is successfully upgraded, and false otherwise.\n */\n upgradeHomeCores(): boolean;\n\n /**\n * SF4.2 - Get the price of upgrading home RAM.\n * @remarks\n * RAM cost: 1.5 GB\n *\n *\n * Returns the cost of upgrading the player’s home computer RAM.\n *\n * @returns Cost of upgrading the player’s home computer RAM.\n */\n getUpgradeHomeRamCost(): number;\n\n /**\n * SF4.2 - Get the price of upgrading home cores.\n * @remarks\n * RAM cost: 1.5 GB\n *\n *\n * Returns the cost of upgrading the player’s home computer cores.\n *\n * @returns Cost of upgrading the player’s home computer cores.\n */\n getUpgradeHomeCoresCost(): number;\n\n /**\n * SF4.2 - Work for a company.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically set you to start working at the company\n * at which you are employed. If you are already in the middle of some “working”\n * action (such as working for a faction, training at a gym, or creating a program),\n * then running this function will automatically cancel that action and give you\n * your earnings.\n *\n * This function will return true if the player starts working, and false otherwise.\n *\n * Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getCompanyRep(COMPANY HERE) < VALUE) {\n * workForCompany();\n * sleep(60000);\n * }\n * //This way, your company reputation will be updated every minute.\n * ```\n * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked\n * @returns True if the player starts working, and false otherwise.\n */\n workForCompany(companyName?: string): boolean;\n\n /**\n * SF4.2 - Apply for a job at a company.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically try to apply to the specified company\n * for a position in the specified field. This function can also be used to\n * apply for promotions by specifying the company and field you are already\n * employed at.\n *\n * This function will return true if you successfully get a job/promotion,\n * and false otherwise. Note that if you are trying to use this function to\n * apply for a promotion and you don’t get one, it will return false.\n *\n * @param companyName - Name of company to apply to.\n * @param field - Field to which you want to apply.\n * @returns True if the player successfully get a job/promotion, and false otherwise.\n */\n applyToCompany(companyName: string, field: string): boolean;\n\n /**\n * SF4.2 - Get company reputation.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function will return the amount of reputation you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of reputation you have at the specified company.\n */\n getCompanyRep(companyName: string): number;\n\n /**\n * SF4.2 - Get company favor.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function will return the amount of favor you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you have at the specified company.\n */\n getCompanyFavor(companyName: string): number;\n\n /**\n * SF4.2 - Get company favor gain.\n * @remarks\n * RAM cost: 0.75 GB\n *\n *\n * This function will return the amount of favor you will gain for the specified\n * company when you reset by installing Augmentations.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you gain at the specified company when you reset by installing Augmentations.\n */\n getCompanyFavorGain(companyName: string): number;\n\n /**\n * SF4.2 - List all current faction invitations.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * Returns an array with the name of all Factions you currently have oustanding invitations from.\n *\n * @returns Array with the name of all Factions you currently have oustanding invitations from.\n */\n checkFactionInvitations(): string[];\n\n /**\n * SF4.2 - Join a faction.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically accept an invitation from a faction and join it.\n *\n * @param faction - Name of faction to join.\n * @returns True if player joined the faction, and false otherwise.\n */\n joinFaction(faction: string): boolean;\n\n /**\n * SF4.2 - Work for a faction.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically set you to start working for the specified faction.\n * Obviously, you must be a member of the faction or else this function will fail. If\n * you are already in the middle of some “working” action (such as working for a company,\n * training at a gym, or creating a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * This function will return true if you successfully start working for the specified faction, and false otherwise.\n *\n * Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getFactionRep(FACTION NAME) < VALUE) {\n * workForFaction(FACNAME, WORKTYPE);\n * sleep(60000);\n * }\n * //This way, your faction reputation will be updated every minute.\n * ```\n * @param faction - Name of faction to work for.\n * @param workType - Type of work to perform for the faction.\n * @returns True if the player starts working, and false otherwise.\n */\n workForFaction(faction: string, workType: string): boolean;\n\n /**\n * SF4.2 - Get faction reputation.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function returns the amount of reputation you have for the specified faction.\n *\n * @param faction - Name of faction to work for.\n * @returns Amount of reputation you have for the specified faction.\n */\n getFactionRep(faction: string): number;\n\n /**\n * SF4.2 - Get faction favor.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function returns the amount of favor you have for the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you have for the specified faction.\n */\n getFactionFavor(faction: string): number;\n\n /**\n * SF4.2 - Get faction favor gain.\n * @remarks\n * RAM cost: 0.75 GB\n *\n *\n * This function returns the amount of favor you will gain for the specified\n * faction when you reset by installing Augmentations.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you will gain for the specified faction when you reset by installing Augmentations.\n */\n getFactionFavorGain(faction: string): number;\n\n /**\n * SF4.3 - Donate to a faction.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Attempts to donate money to the specified faction in exchange for reputation.\n * Returns true if you successfully donate the money, and false otherwise.\n *\n * @param faction - Name of faction to donate to.\n * @param amount - Amount of money to donate.\n * @returns True if the money was donated, and false otherwise.\n */\n donateToFaction(faction: string, amount: number): boolean;\n\n /**\n * SF4.3 - Create a program.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will automatically set you to start working on creating the\n * specified program. If you are already in the middle of some “working” action\n * (such as working for a company, training at a gym, or taking a course), then\n * running this function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns true if you successfully start working on the specified program, and false otherwise.\n *\n * Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are:\n * * BruteSSH.exe: 50\n * * FTPCrack.exe: 100\n * * relaySMTP.exe: 250\n * * HTTPWorm.exe: 500\n * * SQLInject.exe: 750\n * * DeepscanV1.exe: 75\n * * DeepscanV2.exe: 400\n * * ServerProfiler.exe: 75\n * * AutoLink.exe: 25\n *\n * @example\n * ```ts\n * createProgram(“relaysmtp.exe”);\n * ```\n * @param program - Name of program to create.\n * @returns True if you successfully start working on the specified program, and false otherwise.\n */\n createProgram(program: string): boolean;\n\n /**\n * SF4.3 - Commit a crime.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function is used to automatically attempt to commit crimes.\n * If you are already in the middle of some ‘working’ action (such\n * as working for a company or training at a gym), then running this\n * function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns the number of seconds it takes to attempt the specified\n * crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime, so running\n * `commitCrime(\'rob store\')` will return 60).\n *\n * Warning: I do not recommend using the time returned from this function to try\n * and schedule your crime attempts. Instead, I would use the isBusy Singularity\n * function to check whether you have finished attempting a crime. This is because\n * although the game sets a certain crime to be X amount of seconds, there is no\n * guarantee that your browser will follow that time limit.\n *\n * @param crime - Name of crime to attempt.\n * @returns True if you successfully start working on the specified program, and false otherwise.\n */\n commitCrime(crime: string): number;\n\n /**\n * SF4.3 - Get chance to successfully commit a crime.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns your chance of success at commiting the specified crime.\n *\n * @param crime - Name of crime.\n * @returns Chance of success at commiting the specified crime.\n */\n getCrimeChance(crime: string): number;\n\n /**\n * SF4.3 - Get stats related to a crime.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Returns the stats of the crime.\n *\n * @param crime - Name of crime. Not case-sensitive\n * @returns The stats of the crime.\n */\n getCrimeStats(crime: string): CrimeStats;\n\n /**\n * SF4.3 - Get a list of owned augmentation.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns an array containing the names (as strings) of all Augmentations you have.\n *\n * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. By default, this argument is false which means that the return value will NOT have the purchased Augmentations.\n * @returns Array containing the names (as strings) of all Augmentations you have.\n */\n getOwnedAugmentations(purchased?: boolean): string[];\n\n /**\n * SF4.3 - Get a list of augmentation available from a faction.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Returns an array containing the names (as strings) of all Augmentations\n * that are available from the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Array containing the names of all Augmentations.\n */\n getAugmentationsFromFaction(faction: string): string[];\n\n /**\n * SF4.3 - Get the pre-requisite of an augmentation.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n * If there are no prerequisites, a blank array is returned.\n *\n * @param augName - Name of Augmentation.\n * @returns Array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n */\n getAugmentationPrereq(augName: string): string[];\n\n /**\n * SF4.3 - Get the price and reputation of an augmentation.\n * @deprecated use getAugmentationPrice getAugmentationRepCost\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns an array with two elements that gives the cost for\n * the specified Augmentation. The first element in the returned array is the\n * reputation requirement of the Augmentation, and the second element is the\n * money cost.\n *\n * If an invalid Augmentation name is passed in for the augName argument, this\n * function will return the array [-1, -1].\n *\n * @param augName - Name of Augmentation.\n * @returns Array with first element as a reputation requirement and second element as the money cost.\n */\n getAugmentationCost(augName: string): [number, number];\n\n /**\n * SF4.3 - Get price of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Price of the augmentation.\n */\n getAugmentationPrice(augName: string): number;\n\n /**\n * SF4.3 - Get reputation requirement of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Reputation requirement of the augmentation.\n */\n getAugmentationRepReq(augName: string): number;\n\n /**\n * SF4.3 - Purchase an augmentation\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will try to purchase the specified Augmentation through the given Faction.\n *\n * This function will return true if the Augmentation is successfully purchased, and false otherwise.\n *\n * @param faction - Name of faction to purchase Augmentation from.\n * @param augmentation - Name of Augmentation to purchase.\n * @returns True if the Augmentation is successfully purchased, and false otherwise.\n */\n purchaseAugmentation(faction: string, augmentation: string): boolean;\n\n /**\n * SF4.3 - Get the stats of an augmentation.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns augmentation stats.\n *\n * @param name - Name of Augmentation. CASE-SENSITIVE.\n * @returns Augmentation stats.\n */\n getAugmentationStats(name: string): AugmentationStats;\n\n /**\n * SF4.3 - Install your purchased augmentations.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will automatically install your Augmentations, resetting the game as usual.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n installAugmentations(cbScript?: string): void;\n\n /**\n * SF4.1 - Returns an object with the Player’s stats.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB\n *\n *\n * @example\n * ```ts\n * res = getStats();\n * print(\'My charisma level is: \' + res.charisma);\n * ```\n * @returns Object with the Player’s stats.\n */\n getStats(): PlayerSkills;\n\n /**\n * SF4.1 - Returns an object with various information about your character.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB\n *\n *\n * @returns Object with various information about your character.\n */\n getCharacterInformation(): CharacterInfo;\n\n /**\n * SF4.1 - Hospitalize the player.\n * @remarks\n * RAM cost: 0.25 GB\n *\n *\n * @returns The cost of the hospitalization.\n */\n hospitalize(): number;\n\n /**\n * SF4.3 - Soft reset the game.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will perform a reset even if you don’t have any augmentation installed.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n softReset(cbScript: string): void;\n\n /**\n * SF4.3 - Go to a location.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Move the player to a specific location.\n *\n * @param locationName - Name of the location.\n * @returns True if the player was moved there, false otherwise.\n */\n goToLocation(locationName: string): boolean;\n\n /**\n * SF4.1 - Get the current server.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * @returns Name of the current server.\n */\n getCurrentServer(): string;\n\n /**\n * SF4.1 - Connect to a server.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * Run the connect HOSTNAME command in the terminal. Can only connect to neighbors.\n *\n * @returns True if the connect command was successful, false otherwise.\n */\n connect(hostname: string): boolean;\n\n /**\n * SF4.1 - Run the hack command in the terminal.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * @returns Amount of money stolen by manual hacking.\n */\n manualHack(): Promise;\n\n /**\n * SF4.1 - Run the backdoor command in the terminal.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * @returns True if the installation was successful.\n */\n installBackdoor(): Promise;\n}\n\n/**\n * Hacknet API\n * @remarks\n * Not all these functions are immediately available.\n * @public\n */\nexport interface Hacknet {\n /**\n * Get the number of hacknet nodes you own.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the number of Hacknet Nodes you own.\n *\n * @returns number of hacknet nodes.\n */\n numNodes(): number;\n\n /**\n * Get the maximum number of hacknet nodes.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns maximum number of hacknet nodes.\n */\n maxNumNodes(): number;\n\n /**\n * Purchase a new hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Purchases a new Hacknet Node. Returns a number with the index of the\n * Hacknet Node. This index is equivalent to the number at the end of\n * the Hacknet Node’s name (e.g The Hacknet Node named `hacknet-node-4`\n * will have an index of 4).\n *\n * If the player cannot afford to purchase a new Hacknet Node then the function will return -1.\n *\n * @returns The index of the Hacknet Node or if the player cannot afford to purchase a new Hacknet Node the function will return -1.\n */\n purchaseNode(): number;\n\n /**\n * Get the price of the next hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of purchasing a new Hacknet Node.\n *\n * @returns Cost of purchasing a new Hacknet Node.\n */\n getPurchaseNodeCost(): number;\n\n /**\n * Get the stats of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns an object containing a variety of stats about the specified Hacknet Node.\n *\n * Note that for Hacknet Nodes, production refers to the amount of money the node generates.\n * For Hacknet Servers (the upgraded version of Hacknet Nodes), production refers to the\n * amount of hashes the node generates.\n *\n * @param index - Index/Identifier of Hacknet Node\n * @returns Object containing a variety of stats about the specified Hacknet Node.\n */\n getNodeStats(index: number): NodeStats;\n\n /**\n * Upgrade the level of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the level of the specified Hacknet Node by n.\n *\n * Returns true if the Hacknet Node’s level is successfully upgraded by n\n * or if it is upgraded by some positive amount and the Node reaches its max level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s level is successfully upgraded, false otherwise.\n */\n upgradeLevel(index: number, n: number): boolean;\n\n /**\n * Upgrade the RAM of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the specified Hacknet Node’s RAM n times.\n * Note that each upgrade doubles the Node’s RAM.\n * So this is equivalent to multiplying the Node’s RAM by 2 n.\n *\n * Returns true if the Hacknet Node’s RAM is successfully upgraded n times\n * or if it is upgraded some positive number of times and the Node reaches it max RAM.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s ram is successfully upgraded, false otherwise.\n */\n upgradeRam(index: number, n: number): boolean;\n\n /**\n * Upgrade the core of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to purchase n cores for the specified Hacknet Node.\n *\n * Returns true if it successfully purchases n cores for the Hacknet Node\n * or if it purchases some positive amount and the Node reaches its max number of cores.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cores to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCore(index: number, n: number): boolean;\n\n /**\n * Upgrade the cache of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Tries to upgrade the specified Hacknet Server’s cache n times.\n *\n * Returns true if it successfully upgrades the Server’s cache n times,\n * or if it purchases some positive amount and the Server reaches its max cache level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cache levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCache(index: number, n: number): boolean;\n\n /**\n * Calculate the cost of upgrading hacknet node levels.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the specified Hacknet Node by n levels.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to upgrade. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node.\n */\n getLevelUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node RAM.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the RAM of the specified Hacknet Node n times.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s ram.\n */\n getRamUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cores.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cores. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s number of cores.\n */\n getCoreUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cache.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the cost of upgrading the cache level of the specified Hacknet Server by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cache. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s cache.\n */\n getCacheUpgradeCost(index: number, n: number): number;\n\n /**\n * Get the total number of hashes stored.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you have.\n *\n * @returns Number of hashes you have.\n */\n numHashes(): number;\n\n /**\n * Get the maximum number of hashes you can store.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you can store.\n *\n * @returns Number of hashes you can store.\n */\n hashCapacity(): number;\n\n /**\n * Get the cost of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes required for the specified upgrade. The name of the upgrade must be an exact match.\n *\n * @example\n * ```ts\n * var upgradeName = "Sell for Corporation Funds";\n * if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {\n * hacknet.spendHashes(upgName);\n * }\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @returns Number of hashes required for the specified upgrade.\n */\n hashCost(upgName: string): number;\n\n /**\n * Purchase a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Spend the hashes generated by your Hacknet Servers on an upgrade.\n * Returns a boolean value - true if the upgrade is successfully purchased, and false otherwise.\n *\n * The name of the upgrade must be an exact match.\n * The `upgTarget` argument is used for upgrades such as `Reduce Minimum Security`, which applies to a specific server.\n * In this case, the `upgTarget` argument must be the hostname of the server.\n *\n * @example\n * ```ts\n * hacknet.spendHashes("Sell for Corporation Funds");\n * hacknet.spendHashes("Increase Maximum Money", "foodnstuff");\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @param upgTarget - Object to which upgrade applies. Required for certain upgrades.\n * @returns True if the upgrade is successfully purchased, and false otherwise..\n */\n spendHashes(upgName: string, upgTarget?: string): boolean;\n\n /**\n * Get the level of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Level of the upgrade.\n */\n getHashUpgradeLevel(upgName: string): number;\n\n /**\n * Get the multipler to study.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getStudyMult(): number;\n\n /**\n * Get the multipler to training.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getTrainingMult(): number;\n}\n\n/**\n * Bladeburner API\n * @remarks\n * You have to be employed in the Bladeburner division and be in BitNode-7\n * or have Source-File 7 in order to use this API.\n * @public\n */\nexport interface Bladeburner {\n /**\n * List all contracts.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner contracts.\n *\n * @returns Array of strings containing the names of all Bladeburner contracts.\n */\n getContractNames(): string[];\n\n /**\n * List all operations.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner operations.\n *\n * @returns Array of strings containing the names of all Bladeburner operations.\n */\n getOperationNames(): string[];\n\n /**\n * List all black ops.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner Black Ops.\n *\n * @returns Array of strings containing the names of all Bladeburner Black Ops.\n */\n getBlackOpNames(): string[];\n\n /**\n * List all general actions.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner actions.\n *\n * @returns Array of strings containing the names of all general Bladeburner actions.\n */\n getGeneralActionNames(): string[];\n\n /**\n * List all skills.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner skills.\n *\n * @returns Array of strings containing the names of all general Bladeburner skills.\n */\n getSkillNames(): string[];\n\n /**\n * Start an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to start the specified Bladeburner action.\n * Returns true if the action was started successfully, and false otherwise.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match\n * @returns True if the action was started successfully, and false otherwise.\n */\n startAction(type: string, name: string): boolean;\n\n /**\n * Stop current action.\n * @remarks\n * RAM cost: 2 GB\n *\n * Stops the current Bladeburner action.\n *\n */\n stopBladeburnerAction(): void;\n\n /**\n * Get current action.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns an object that represents the player’s current Bladeburner action.\n * If the player is not performing an action, the function will return an object with the ‘type’ property set to “Idle”.\n *\n * @returns Object that represents the player’s current Bladeburner action.\n */\n getCurrentAction(): BladeburnerCurAction;\n\n /**\n * Get the time to complete an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of seconds it takes to complete the specified action\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of milliseconds it takes to complete the specified action.\n */\n getActionTime(type: string, name: string): number;\n\n /**\n * Get estimate success chance of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated success chance for the specified action.\n * This chance is returned as a decimal value, NOT a percentage\n * (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80).\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Estimated success chance for the specified action.\n */\n getActionEstimatedSuccessChance(type: string, name: string): [number, number];\n\n /**\n * Get the reputation gain of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the average Bladeburner reputation gain for successfully\n * completing the specified action.\n * Note that this value is an ‘average’ and the real reputation gain may vary slightly from this value.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Optional action level at which to calculate the gain\n * @returns Average Bladeburner reputation gain for successfully completing the specified action.\n */\n getActionRepGain(type: string, name: string, level: number): number;\n\n /**\n * Get action count remaining.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the remaining count of the specified action.\n *\n * Note that this is meant to be used for Contracts and Operations.\n * This function will return ‘Infinity’ for actions such as Training and Field Analysis.\n * This function will return 1 for BlackOps not yet completed regardless of wether\n * the player has the required rank to attempt the mission or not.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Remaining count of the specified action.\n */\n getActionCountRemaining(type: string, name: string): number;\n\n /**\n * Get the maximum level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the maximum level for this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Maximum level of the specified action.\n */\n getActionMaxLevel(type: string, name: string): number;\n\n /**\n * Get the current level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the current level of this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Current level of the specified action.\n */\n getActionCurrentLevel(type: string, name: string): number;\n\n /**\n * Get wether an action is set to autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action is currently set to autolevel.\n *\n * Returns false if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns True if the action is set to autolevel, and false otherwise.\n */\n getActionAutolevel(type: string, name: string): boolean;\n\n /**\n * Set an action autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Enable/disable autoleveling for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param autoLevel - Whether or not to autolevel this action\n */\n setActionAutolevel(type: string, name: string, autoLevel: boolean): void;\n\n /**\n * Set the level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the level for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Level to set this action to.\n */\n setActionLevel(type: string, name: string, level: number): void;\n\n /**\n * Get player bladeburner rank.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the player’s Bladeburner Rank.\n *\n * @returns Player’s Bladeburner Rank.\n */\n getRank(): number;\n\n /**\n * Get black op required rank.\n * @remarks\n * RAM cost: 2 GB\n *\n * Returns the rank required to complete this BlackOp.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param name - Name of BlackOp. Must be an exact match.\n * @returns Rank required to complete this BlackOp.\n */\n getBlackOpRank(name: string): number;\n\n /**\n * Get bladeburner skill points.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner skill points you have.\n *\n * @returns Number of Bladeburner skill points you have.\n */\n getSkillPoints(): number;\n\n /**\n * Get skill level.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns your level in the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Level in the specified skill.\n */\n getSkillLevel(name: string): number;\n\n /**\n * Get cost to upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns the number of skill points needed to upgrade the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Number of skill points needed to upgrade the specified skill.\n */\n getSkillUpgradeCost(name: string): number;\n\n /**\n * Upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to upgrade the specified Bladeburner skill.\n *\n * Returns true if the skill is successfully upgraded, and false otherwise.\n *\n * @param skillName - Name of skill to be upgraded. Case-sensitive and must be an exact match\n * @returns true if the skill is successfully upgraded, and false otherwise.\n */\n upgradeSkill(name: string): boolean;\n\n /**\n * Get team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner team members you have assigned to the specified action.\n *\n * Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of Bladeburner team members that were assigned to the specified action.\n */\n getTeamSize(type: string, name: string): number;\n\n /**\n * Set team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the team size for the specified Bladeburner action.\n *\n * Returns the team size that was set, or -1 if the function failed.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param size - Number of team members to set. Will be converted using Math.round().\n * @returns Number of Bladeburner team members you assigned to the specified action.\n */\n setTeamSize(type: string, name: string, size: number): number;\n\n /**\n * Get estimated population in city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoids in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Estimated number of Synthoids in the specified city.\n */\n getCityEstimatedPopulation(name: string): number;\n\n /**\n * Get number of communities in a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoid communities in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Number of Synthoids communities in the specified city.\n */\n getCityCommunities(name: string): number;\n\n /**\n * Get chaos of a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chaos in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Chaos in the specified city.\n */\n getCityChaos(name: string): number;\n\n /**\n * Get current city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the city that the player is currently in (for Bladeburner).\n *\n * @returns City that the player is currently in (for Bladeburner).\n */\n getCity(): string;\n\n /**\n * Travel to another city in bladeburner.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to switch to the specified city (for Bladeburner only).\n *\n * Returns true if successful, and false otherwise\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns true if successful, and false otherwise\n */\n switchCity(name: string): boolean;\n\n /**\n * Get bladeburner stamina.\n * @remarks\n * RAM cost: 4 GB\n * Returns an array with two elements:\n * * [Current stamina, Max stamina]\n * @example\n * ```ts\n * function getStaminaPercentage() {\n * let res = bladeburner.getStamina();\n * return res[0] / res[1];\n * }\n * ```\n * @returns Array containing current stamina and max stamina.\n */\n getStamina(): [number, number];\n\n /**\n * Join the bladeburner faction.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to join the Bladeburner faction.\n *\n * Returns true if you successfully join the Bladeburner faction, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner faction, or if you are already a member, false otherwise.\n */\n joinBladeburnerFaction(): boolean;\n\n /**\n * Join the bladeburner division.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to join the Bladeburner division.\n *\n * Returns true if you successfully join the Bladeburner division, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner division, or if you are already a member, false otherwise.\n */\n joinBladeburnerDivision(): boolean;\n\n /**\n * Get bladeburner bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Bladeburner mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 5x the normal speed.\n * For example, if an action takes 30 seconds to complete but you’ve accumulated over\n * 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.\n *\n * @returns Amount of accumulated “bonus time” (milliseconds) for the Bladeburner mechanic.\n */\n getBonusTime(): number;\n}\n\n/**\n * Coding Contact API\n * @public\n */\nexport interface CodingContract {\n /**\n * Attemps a coding contract.\n * @remarks\n * RAM cost: 10 GB\n *\n * Attempts to solve the Coding Contract with the provided solution.\n *\n * @param answer - Solution for the contract.\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.\n */\n attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;\n\n /**\n * Get the type of a coding contract.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns a name describing the type of problem posed by the Coding Contract.\n * (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Name describing the type of problem posed by the Coding Contract.\n */\n getContractType(filename: string, host?: string): string;\n\n /**\n * Get the description.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the full text description for the problem posed by the Coding Contract.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Contract’s text description.\n */\n getDescription(filename: string, host?: string): string;\n\n /**\n * Get the input data.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the data associated with the specific Coding Contract.\n * Note that this is not the same as the contract’s description.\n * This is just the data that the contract wants you to act on in order to solve\n *\n * @param filename - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns The specified contract’s data;\n */\n getData(filename: string, host?: string): string;\n\n /**\n * Get the number of attempt remaining.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the number of tries remaining on the contract before it self-destructs.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns How many attempts are remaining for the contract;\n */\n getNumTriesRemaining(filename: string, host?: string): number;\n}\n\n/**\n * Gang API\n * @remarks\n * If you are not in BitNode-2, then you must have Source-File 2 in order to use this API.\n * @public\n */\nexport interface Gang {\n /**\n * Create a gang.\n * @remarks\n * RAM cost: 1GB\n *\n * Create a gang with the specified faction.\n * @returns True if the gang was created, false otherwise.\n */\n createGang(faction: string): boolean;\n\n /**\n * Check if you\'re in a gang.\n * @remarks\n * RAM cost: 1GB\n * @returns True if you\'re in a gang, false otherwise.\n */\n inGang(): boolean;\n\n /**\n * List all gang members.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the names of all Gang members\n *\n * @returns Names of all Gang members.\n */\n getMemberNames(): string[];\n\n /**\n * Get information about your gang.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get general information about the gang.\n *\n * @returns Object containing general information about the gang.\n */\n getGangInformation(): GangGenInfo;\n\n /**\n * Get information about the other gangs.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get territory and power information about all gangs.\n *\n * @returns Object containing territory and power information about all gangs.\n */\n getOtherGangInformation(): GangOtherInfo;\n\n /**\n * Get information about a specific gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get stat and equipment-related information about a Gang Member\n *\n * @param name - Name of member.\n * @returns Object containing stat and equipment-related information about a Gang Member.\n */\n getMemberInformation(name: string): GangMemberInfo;\n\n /**\n * Check if you can recruit a new gang member.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns boolean indicating whether a member can currently be recruited\n *\n * @returns True if a member can currently be recruited, false otherwise.\n */\n canRecruitMember(): boolean;\n\n /**\n * Recruit a new gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempt to recruit a new gang member.\n *\n * Possible reasons for failure:\n * * Cannot currently recruit a new member\n * * There already exists a member with the specified name\n *\n * @param name - Name of member to recruit.\n * @returns True if the member was successfully recruited, false otherwise.\n */\n recruitMember(name: string): boolean;\n\n /**\n * List member task names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all valid tasks that Gang members can be assigned to.\n *\n * @returns All valid tasks that Gang members can be assigned to.\n */\n getTaskNames(): string[];\n\n /**\n * Set gang member to task.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempts to assign the specified Gang Member to the specified task.\n * If an invalid task is specified, the Gang member will be set to idle (“Unassigned”).\n *\n * @param memberName - Name of Gang member to assign.\n * @param taskName - Task to assign.\n * @returns True if the Gang Member was successfully assigned to the task, false otherwise.\n */\n setMemberTask(memberName: string, taskName: string): boolean;\n\n /**\n * Get stats of a task.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the stats of a gang task stats. This is typically used to evaluate which action should be executed next.\n *\n * @param name - Name of the task.\n * @returns Detailed stats of a task.\n */\n getTaskStats(name: string): GangTaskStats;\n\n /**\n * List equipment names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all possible equipment/upgrades you can purchase for your Gang Members.\n * This includes Augmentations.\n *\n * @returns Names of all Equipments/Augmentations.\n */\n getEquipmentNames(): string[];\n\n /**\n * Get cost of equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the amount of money it takes to purchase a piece of Equipment or an Augmentation.\n * If an invalid Equipment/Augmentation is specified, this function will return Infinity.\n *\n * @param equipName - Name of equipment.\n * @returns Cost to purchase the specified Equipment/Augmentation (number). Infinity for invalid arguments\n */\n getEquipmentCost(equipName: string): number;\n\n /**\n * Get type of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment type.\n *\n * @param equipName - Name of equipment.\n * @returns Type of the equipment.\n */\n getEquipmentType(equipName: string): string;\n\n /**\n * Get stats of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment stats.\n *\n * @param equipName - Name of equipment.\n * @returns A dictionary containing the stats of the equipment.\n */\n getEquipmentStats(equipName: string): EquipmentStats;\n\n /**\n * Purchase an equipment for a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempt to purchase the specified Equipment/Augmentation for the specified Gang member.\n *\n * @param memberName - Name of Gang member to purchase the equipment for.\n * @param equipName - Name of Equipment/Augmentation to purchase.\n * @returns True if the equipment was successfully purchased. False otherwise\n */\n purchaseEquipment(memberName: string, equipName: string): boolean;\n\n /**\n * Ascend a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Ascend the specified Gang Member.\n *\n * @param memberName - Name of member to ascend.\n * @returns Object with info about the ascension results. undefined if ascension did not occur.\n */\n ascendMember(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Get the result of an ascension without ascending.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the result of an ascension without ascending.\n *\n * @param memberName - Name of member.\n * @returns Object with info about the ascension results. undefined if ascension is impossible.\n */\n getAscensionResult(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Enable/Disable territory warfare.\n * @remarks\n * RAM cost: 2 GB\n *\n * Set whether or not the gang should engage in territory warfare\n *\n * @param engage - Whether or not to engage in territory warfare.\n */\n setTerritoryWarfare(engage: boolean): void;\n\n /**\n * Get chance to win clash with other gang.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chance you have to win a clash with the specified gang. The chance is returned in decimal form, not percentage\n *\n * @param gangName - Target gang\n * @returns Chance you have to win a clash with the specified gang.\n */\n getChanceToWinClash(gangName: string): number;\n\n /**\n * Get bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Gang mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 10x the normal speed.\n *\n * @returns Bonus time for the Gang mechanic in milliseconds.\n */\n getBonusTime(): number;\n}\n\n/**\n * Sleeve API\n * @remarks\n * If you are not in BitNode-10, then you must have Source-File 10 in order to use this API.\n * @public\n */\nexport interface Sleeve {\n /**\n * Get the number of sleeves you own.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the number of duplicate sleeves the player has.\n *\n * @returns number of duplicate sleeves the player has.\n */\n getNumSleeves(): number;\n\n /**\n * Get the stats of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a structure containing the stats of the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to get stats of.\n * @returns Object containing the stats of the sleeve.\n */\n getSleeveStats(sleeveNumber: number): SleeveSkills;\n\n /**\n * Get information about a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a struct containing tons of information about this sleeve\n *\n * @param sleeveNumber - Index of the sleeve to retrieve information.\n * @returns Object containing tons of information about this sleeve.\n */\n getInformation(sleeveNumber: number): SleeveInformation;\n\n /**\n * Get task of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve task from.\n * @returns Object containing information the current task that the sleeve is performing.\n */\n getTask(sleeveNumber: number): SleeveTask;\n\n /**\n * Set a sleeve to shock recovery.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start recovery.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToShockRecovery(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to synchronize.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start synchronizing.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToSynchronize(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to commit crime.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * Returns false if an invalid action is specified.\n *\n * @param sleeveNumber - Index of the sleeve to start commiting crime.\n * @param name - Name of the crime. Must be an exact match.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToCommitCrime(sleeveNumber: number, name: string): boolean;\n\n /**\n * Set a sleeve to work for a faction.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this faction.\n *\n * @param sleeveNumber - Index of the sleeve to work for the faction.\n * @param factionName - Name of the faction to work for.\n * @param factionWorkType - Name of the action to perform for this faction.\n * @returns True if the sleeve started working on this faction, false otherwise.\n */\n setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean;\n\n /**\n * Set a sleeve to work for a company.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this company.\n *\n * @param sleeveNumber - Index of the sleeve to work for the company.\n * @param companyName - Name of the company to work for.\n * @returns True if the sleeve started working on this company, false otherwise.\n */\n setToCompanyWork(sleeveNumber: number, companyName: string): boolean;\n\n /**\n * Set a sleeve to take a class at a university.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start taking class.\n * @param university - Name of the university to attend.\n * @param className - Name of the class to follow.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;\n\n /**\n * Set a sleeve to workout at the gym.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working out.\n *\n * @param sleeveNumber - Index of the sleeve to workout at the gym.\n * @param gymName - Name of the gym.\n * @param stat - Name of the stat to train.\n * @returns True if the sleeve started working out, false otherwise.\n */\n setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;\n\n /**\n * Make a sleeve travel to another city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve reached destination.\n *\n * @param sleeveNumber - Index of the sleeve to travel.\n * @param cityName - Name of the destination city.\n * @returns True if the sleeve reached destination, false otherwise.\n */\n travel(sleeveNumber: number, cityName: string): boolean;\n\n /**\n * Get augmentations installed on a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentation names that this sleeve has installed.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve augmentations from.\n * @returns List of augmentation names that this sleeve has installed.\n */\n getSleeveAugmentations(sleeveNumber: number): string[];\n\n /**\n * List purchasable augs for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentations that the player can buy for this sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve purchasable augmentations from.\n * @returns List of augmentations that the player can buy for this sleeve.\n */\n getSleevePurchasableAugs(sleeveNumber: number): AugmentPair[];\n\n /**\n * Purchase an aug for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return true if the aug was purchased and installed on the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to buy an aug for.\n * @param augName - Name of the aug to buy. Must be an exact match.\n * @returns True if the aug was purchased and installed on the sleeve, false otherwise.\n */\n purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;\n}\n\n/**\n * Skills formulas\n * @public\n */\ninterface SkillsFormulas {\n /**\n * Calculate skill level.\n * @param exp - experience for that skill\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated skill level.\n */\n calculateSkill(exp: number, skillMult?: number): number;\n /**\n * Calculate exp for skill level.\n * @param skill - target skill level\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated exp required.\n */\n calculateExp(skill: number, skillMult?: number): number;\n}\n\n/**\n * Hacking formulas\n * @public\n */\ninterface HackingFormulas {\n /**\n * Calculate hack chance.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack chance.\n */\n hackChance(server: Server, player: Player): number;\n /**\n * Calculate hack exp for one thread.\n * @remarks\n * Multiply by thread to get total exp\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack exp.\n */\n hackExp(server: Server, player: Player): number;\n /**\n * Calculate hack percent for one thread.\n * @remarks\n * Multiply by thread to get total percent hacked.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack percent.\n */\n hackPercent(server: Server, player: Player): number;\n /**\n * Calculate the percent a server would grow.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param threads - Amount of thread.\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @param cores - Number of cores on the computer that will execute grow.\n * @returns The calculated grow percent.\n */\n growPercent(server: Server, threads: number, player: Player, cores?: number): number;\n /**\n * Calculate hack time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack time.\n */\n hackTime(server: Server, player: Player): number;\n /**\n * Calculate grow time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated grow time.\n */\n growTime(server: Server, player: Player): number;\n /**\n * Calculate weaken time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated weaken time.\n */\n weakenTime(server: Server, player: Player): number;\n}\n\n/**\n * Hacknet Node formulas\n * @public\n */\ninterface HacknetNodesFormulas {\n /**\n * Calculate money gain rate.\n * @param level - level of the node.\n * @param ram - ram of the node.\n * @param cores - cores of the node.\n * @param mult - player production mult (default to 1)\n * @returns The calculated money gain rate.\n */\n moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate the cost of a hacknet node.\n * @param n - number of the hacknet node\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetNodeCost(n: number, mult: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet node constants used by the game.\n */\n constants(): number;\n}\n\n/**\n * Hacknet Server formulas\n * @public\n */\ninterface HacknetServersFormulas {\n /**\n * Calculate hash gain rate.\n * @param level - level of the server.\n * @param ramUsed - ramUsed of the server.\n * @param maxRam - maxRam of the server.\n * @param cores - cores of the server.\n * @param mult - player production mult (default to 1)\n * @returns The calculated hash gain rate.\n */\n hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cache.\n * @param startingCache - starting cache level\n * @param extraCache - amount of levels of cache to purchase (defaults to 1)\n * @returns The calculated cost.\n */\n cacheUpgradeCost(startingCache: number, extraCache?: number): number;\n /**\n * Calculate hash cost of an upgrade.\n * @param upgName - name of the upgrade\n * @param level - level of the upgrade\n * @returns The calculated hash cost.\n */\n hashUpgradeCost(upgName: number, level: number): number;\n /**\n * Calculate the cost of a hacknet server.\n * @param n - number of the hacknet server\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetServerCost(n: number, mult?: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet server constants used by the game.\n */\n constants(): any;\n}\n\n/**\n * Gang formulas\n * @public\n */\ninterface GangFormulas {\n /**\n * Calculate the wanted penalty.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @returns The calculated wanted penalty.\n */\n wantedPenalty(gang: GangGenInfo): number;\n /**\n * Calculate respect gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated respect gain.\n */\n respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate wanted gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated wanted gain.\n */\n wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate money gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated money gain.\n */\n moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n\n /**\n * Calculate ascension point gain.\n * @param exp - Experience point before ascension.\n * @returns The calculated ascension point gain.\n */\n ascensionPointsGain(exp: number): number;\n\n /**\n * Calculate ascension mult.\n * @param points - Amount of ascension points.\n * @returns The calculated ascension mult.\n */\n ascensionMultiplier(points: number): number;\n}\n\n/**\n * Formulas API\n * @remarks\n * You need Formulas.exe on your home computer to use this API.\n * @public\n */\nexport interface Formulas {\n /** Skills formulas */\n skills: SkillsFormulas;\n /** Hacking formulas */\n hacking: HackingFormulas;\n /** Hacknet Nodes formulas */\n hacknetNodes: HacknetNodesFormulas;\n /** Hacknet Servers formulas */\n hacknetServers: HacknetServersFormulas;\n /** Gang formulas */\n gang: GangFormulas;\n}\n\n/**\n * @public\n */\nexport interface Fragment {\n id: number;\n shape: boolean[][];\n type: number;\n power: number;\n limit: number;\n}\n\n/**\n * @public\n */\nexport interface ActiveFragment {\n id: number;\n avgCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n}\n\n/**\n * Stanek\'s Gift API.\n * @public\n */\ninterface Stanek {\n /**\n * Stanek\'s Gift width.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The width of the gift.\n */\n width(): number;\n /**\n * Stanek\'s Gift height.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The height of the gift.\n */\n height(): number;\n\n /**\n * Charge a fragment, increasing it\'s power.\n * @remarks\n * RAM cost: 0.4 GB\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @returns Promise that lasts until the charge action is over.\n */\n charge(rootX: number, rootY: number): Promise;\n\n /**\n * List possible fragments.\n * @remarks\n * RAM cost: cost: 0 GB\n *\n * @returns List of possible fragments.\n */\n fragmentDefinitions(): Fragment[];\n\n /**\n * List of fragments in Stanek\'s Gift.\n * @remarks\n * RAM cost: cost: 5 GB\n *\n * @returns List of active fragments placed on Stanek\'s Gift.\n */\n activeFragments(): ActiveFragment[];\n\n /**\n * Clear the board of all fragments.\n * @remarks\n * RAM cost: cost: 0 GB\n */\n clear(): void;\n\n /**\n * Check if fragment can be placed at specified location.\n * @remarks\n * RAM cost: cost: 0.5 GB\n *\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @param rotation - rotation A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - fragmentId ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n canPlace(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Place fragment on Stanek\'s Gift.\n * @remarks\n * RAM cost: cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @param rotation - A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n place(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Get placed fragment at location.\n * @remarks\n * RAM cost: cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n get(rootX: number, rootY: number): ActiveFragment | undefined;\n\n /**\n * Remove fragment at location.\n * @remarks\n * RAM cost: cost: 0.15 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n remove(rootX: number, rootY: number): boolean;\n}\n\n/**\n * Collection of all functions passed to scripts\n * @public\n */\nexport interface NS extends Singularity {\n /**\n * Namespace for hacknet functions.\n * @remarks RAM cost: 4 GB\n */\n readonly hacknet: Hacknet;\n /**\n *\n * Namespace for bladeburner functions.\n * @remarks RAM cost: 0 GB\n */\n readonly bladeburner: Bladeburner;\n /**\n *\n * Namespace for codingcontract functions.\n * @remarks RAM cost: 0 GB\n */\n readonly codingcontract: CodingContract;\n /**\n *\n * Namespace for gang functions.\n * @remarks RAM cost: 0 GB\n */\n readonly gang: Gang;\n /**\n *\n * Namespace for sleeve functions.\n * @remarks RAM cost: 0 GB\n */\n readonly sleeve: Sleeve;\n /**\n *\n * Namespace for stock functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly stock: TIX;\n /**\n *\n * Namespace for formulas functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly formulas: Formulas;\n /**\n * Namespace for stanek functions.\n * RAM cost: 0 GB\n */\n readonly stanek: Stanek;\n /**\n * Namespace for corporation functions.\n * RAM cost: 0 GB\n */\n readonly corporation: Corporation;\n\n /**\n * Arguments passed into the script.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * Arguments passed into a script can be accessed using a normal\n * array using the [] operator (args[0], args[1], etc…).\n *\n * It is also possible to get the number of arguments that was passed into a script using: \'args.length\'\n * WARNING: Do not try to modify the args array. This will break the game.\n */\n readonly args: (string | number | boolean)[];\n\n /**\n * Steal a servers money.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Function that is used to try and hack servers to steal money and gain hacking experience.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level. In order to hack a server you must first gain root access to that server\n * and also have the required hacking level.\n *\n * A script can hack a server from anywhere. It does not need to be running on the same\n * server to hack that server. For example, you can create a script that hacks the `foodnstuff`\n * server and run that script on any server in the game.\n *\n * A successful `hack()` on a server will raise that server’s security level by 0.002.\n *\n * @example\n * ```ts\n * hack("foodnstuff");\n * hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack\n * ```\n * @param host - Hostname of the target server to hack.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount of money stolen if the hack is successful, and zero otherwise.\n */\n hack(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Spoof money in a servers bank account, increasing the amount available.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to increase the amount of money available on a server.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level. When `grow` completes, the money available on a target server will\n * be increased by a certain, fixed percentage. This percentage is determined by the\n * target server’s growth rate (which varies between servers) and security level. Generally,\n * higher-level servers have higher growth rates. The getServerGrowth() function can be used\n * to obtain a server’s growth rate.\n *\n * Like hack, `grow` can be called on any server, regardless of where the script is running.\n * The grow() command requires root access to the target server, but there is no required hacking\n * level to run the command. It also raises the security level of the target server by 0.004.\n *\n * @example\n * ```ts\n * grow("foodnstuff");\n * grow("foodnstuff", { threads: 5 }); // Only use 5 threads to grow\n * ```\n * @param host - Hostname of the target server to grow.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The number by which the money on the server was multiplied for the growth.\n */\n grow(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Reduce a server security level.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to attack a server’s security, lowering the server’s security level.\n * The runtime for this command depends on your hacking level and the target server’s security\n * level. This function lowers the security level of the target server by 0.05.\n *\n * Like hack and grow, `weaken` can be called on any server, regardless of\n * where the script is running. This command requires root access to the target server, but\n * there is no required hacking level to run the command.\n *\n * @example\n * ```ts\n * weaken("foodnstuff");\n * weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken\n * ```\n * @param host - Hostname of the target server to weaken.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount by which the target server’s security level was decreased. This is equivalent to 0.05 multiplied by the number of script threads.\n */\n weaken(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Predict the effect of weaken.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security decrease that would occur if a weaken with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @param cores - Optional. The number of cores of the server that would run weaken.\n * @returns The security decrease.\n */\n weakenAnalyze(threads: number, cores?: number): number;\n\n /**\n * Predict the effect of hack.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of script threads you need when running the hack command\n * to steal the specified amount of money from the target server.\n * If hackAmount is less than zero or greater than the amount of money available on the server,\n * then this function returns -1.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * //For example, let’s say the foodnstuff server has $10m and you run:\n * hackAnalyzeThreads("foodnstuff", 1e6);\n * //If this function returns 50, this means that if your next hack call is run on a script with 50 threads, it will steal $1m from the foodnstuff server.\n * ```\n * @param host - Hostname of the target server to analyze.\n * @param hackAmount - Amount of money you want to hack from the server.\n * @returns The number of threads needed to hack the server for hackAmount money.\n */\n hackAnalyzeThreads(host: string, hackAmount: number): number;\n\n /**\n * Get the percent of money stolen with a single thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the percentage of the specified server’s money you will steal with a single hack.\n * This value is returned in percentage form, not decimal\n * (Netscript functions typically return in decimal form, but not this one).\n *\n * @example\n * ```ts\n * //For example, assume the following returns 1:\n * hackAnalyze("foodnstuff");\n * //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N% of its total money.\n * ```\n * @param host - Hostname of the target server.\n * @returns The percentage of money you will steal from the target server with a single hack.\n */\n hackAnalyze(host: string): number;\n\n /**\n * Get the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a hack with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n hackAnalyzeSecurity(threads: number): number;\n\n /**\n * Get the chance of successfully hacking a server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the chance you have of successfully hacking the specified server.\n *\n * This returned value is in decimal form, not percentage.\n *\n * @param host - Hostname of the target server.\n * @returns The chance you have of successfully hacking the target server.\n */\n hackAnalyzeChance(host: string): number;\n\n /**\n * Calculate the number of grow thread needed to grow a server by a certain multiplier.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of “growths” needed in order to increase\n * the amount of money available on the specified server by the specified amount.\n * The specified amount is multiplicative and is in decimal form, not percentage.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\n * growthAnalyze("foodnstuff", 2);\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\n * ```\n * @param host - Hostname of the target server.\n * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..\n * @returns The amount of grow calls needed to grow the specified server by the specified amount\n */\n growthAnalyze(host: string, growthAmount: number, cores?: number): number;\n\n /**\n * Calculate the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a grow with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n growthAnalyzeSecurity(threads: number): number;\n\n /**\n * Suspends the script for n milliseconds.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @returns\n */\n sleep(millis: number): Promise;\n\n /**\n * Suspends the script for n milliseconds. Doesn\'t block with concurrent calls.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @returns\n */\n asleep(millis: number): Promise;\n\n /**\n * Prints a value or a variable to the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param msg - Value to be printed.\n */\n print(msg: any): void;\n\n /**\n * Prints a value or a variable to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param msg - Value to be printed.\n */\n tprint(msg: any): void;\n\n /**\n * Prints a raw value or a variable to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param format - format of the message\n * @param msg - Value to be printed.\n */\n tprintf(format: string, ...values: any[]): void;\n\n /**\n * Clears the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n */\n clearLog(): void;\n\n /**\n * Disables logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Logging can be disabled for all functions by passing `ALL` as the argument.\n *\n * Note that this does not completely remove all logging functionality.\n * This only stops a function from logging when the function is successful.\n * If the function fails, it will still log the reason for failure.\n *\n * Notable functions that cannot have their logs disabled: run,\n * exec, exit.\n *\n * @param fn - Name of function for which to disable logging.\n */\n disableLog(fn: string): void;\n\n /**\n * Enable logging for a certain function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Re-enables logging for the given function. If `ALL` is passed into this\n * function as an argument, then it will revert the effects of disableLog(`ALL`).\n *\n * @param fn - Name of function for which to enable logging.\n */\n enableLog(fn: string): void;\n\n /**\n * Checks the status of the logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param fn - Name of function to check.\n * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`)\n */\n isLogEnabled(fn: string): boolean;\n\n /**\n * Get all the logs of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns a script’s logs. The logs are returned as an array, where each line is an element in the array.\n * The most recently logged line is at the end of the array.\n * Note that there is a maximum number of lines that a script stores in its logs. This is configurable in the game’s options.\n * If the function is called with no arguments, it will return the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * //Get logs from foo.script on the current server that was run with no args\n * getScriptLogs("foo.script");\n * ```\n * @example\n * ```ts\n * //Open logs from foo.script on the foodnstuff server that was run with no args\n * getScriptLogs("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * getScriptLogs("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename of script to get logs from.\n * @param host - Optional. Hostname of the server that the script is on.\n * @param args - Arguments to identify which scripts to get logs for.\n * @returns Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array.\n */\n getScriptLogs(fn?: string, host?: string, ...args: any[]): string[];\n\n /**\n * Open the tail window of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Opens a script’s logs. This is functionally the same as the tail Terminal command.\n *\n * If the function is called with no arguments, it will open the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * //Open logs from foo.script on the current server that was run with no args\n * tail("foo.script");\n * ```\n * @example\n * ```ts\n * //Get logs from foo.script on the foodnstuff server that was run with no args\n * tail("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * tail("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename of the script being tailed. If omitted, the current script is tailed.\n * @param host - Optional. Hostname of the script being tailed. Defaults to the server this script is running on. If args are specified, this is not optional.\n * @param args - Arguments for the script being tailed.\n */\n tail(fn?: string, host?: string, ...args: any[]): void;\n\n /**\n * Get the list servers connected to a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array containing the hostnames or IPs of all servers that are one\n * node way from the specified target server. The hostnames/IPs in the returned\n * array are strings.\n *\n * @param host - Hostname of the server to scan.\n * @param hostnames - Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false).\n * @returns Returns an string of hostnames or IP.\n */\n scan(host: string, hostnames?: boolean): string[];\n\n /**\n * Runs NUKE.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * nuke("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n nuke(host: string): void;\n\n /**\n * Runs BruteSSH.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * brutessh("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n brutessh(host: string): void;\n\n /**\n * Runs FTPCrack.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * ftpcrack("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n ftpcrack(host: string): void;\n\n /**\n * Runs relaySMTP.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * relaysmtp("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n relaysmtp(host: string): void;\n\n /**\n * Runs HTTPWorm.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * httpworm("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n httpworm(host: string): void;\n\n /**\n * Runs SQLInject.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * sqlinject("foodnstuff");\n * ```\n * @remarks RAM cost: 0.05 GB\n * @param host - Hostname of the target server.\n */\n sqlinject(host: string): void;\n\n /**\n * Start another script on the current server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Run a script as a separate process. This function can only be used to run scripts located on the\n * current server (the server running the script that calls this function). Requires a significant\n * amount of RAM to run this command.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\n * run("foo.script");\n * ```\n * @example\n * ```ts\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\n * run("foo.script", 5);\n * ```\n * @example\n * ```ts\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\n * run("foo.script", 1, \'foodnstuff\');\n * ```\n * @param script - Filename of script to run.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n run(script: string, numThreads?: number, ...args: string[]): number;\n\n /**\n * Start another script on any server.\n * @remarks\n * RAM cost: 1.3 GB\n *\n * Run a script as a separate process on a specified server. This is similar to the run function\n * except that it can be used to run a script on any server, instead of just the current server.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\n * exec("generic-hack.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\n * exec("generic-hack.script", "joesguns", 10);\n * ```\n * @example\n * ```ts\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\n * exec("foo.script", "foodnstuff", 5, 1, "test");\n * ```\n * @param script - Filename of script to execute.\n * @param host - Hostname of the `target server` on which to execute the script.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n exec(script: string, host: string, numThreads?: number, ...args: string[]): number;\n\n /**\n * Terminate current script and start another in 10s.\n * @remarks\n * RAM cost: 2 GB\n *\n * Terminates the current script, and then after a delay of about 10 seconds it will execute the\n * newly-specified script. The purpose of this function is to execute a new script without being\n * constrained by the RAM usage of the current one. This function can only be used to run scripts\n * on the local server.\n *\n * Because this function immediately terminates the script, it does not have a return value.\n *\n * @example\n * ```ts\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\n * spawn(\'foo.script\', 10, \'foodnstuff\', 90);\n * ```\n * @param script - Filename of script to execute.\n * @param numThreads - Number of threads to spawn new script with. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run.\n */\n spawn(script: string, numThreads?: number, ...args: string[]): void;\n\n /**\n * Terminate another script.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills the script on the target server specified by the script’s name and arguments.\n * Remember that scripts are uniquely identified by both their name and arguments.\n * For example, if `foo.script` is run with the argument 1, then this is not the same as\n * `foo.script` run with the argument 2, even though they have the same code.\n *\n * @example\n * ```ts\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * kill("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * kill("foo.script", getHostname());\n * ```\n * @example\n * ```ts\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @param script - Filename or pid of the script to kill\n * @param host - Hostname of the server on which to kill the script.\n * @param args - Arguments to identify which script to kill.\n * @returns True if the script is successfully killed, and false otherwise.\n */\n kill(script: string | number, host: string, ...args: string[]): boolean;\n\n /**\n * Terminate all scripts on a server.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills all running scripts on the specified server. This function returns true\n * if any scripts were killed, and false otherwise. In other words, it will return\n * true if there are any scripts running on the target server.\n *\n * @param host - IP or hostname of the server on which to kill all scripts.\n * @returns True if any scripts were killed, and false otherwise.\n */\n killall(host: string): boolean;\n\n /**\n * Terminates the current script immediately.\n * @remarks\n * RAM cost: 0 GB\n */\n exit(): void;\n\n /**\n * Copy file between servers.\n * @remarks\n * RAM cost: 0.6 GB\n *\n * Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string\n * specifying a single file to copy, or an array of strings specifying multiple files to copy.\n *\n * @example\n * ```ts\n * //Copies foo.lit from the helios server to the home computer:\n * scp("foo.lit", "helios", "home");\n * ```\n * @example\n * ```ts\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * scp(files, "rothman-uni", "home");\n * ```\n * @param files - Filename or an array of filenames of script/literature files to copy.\n * @param source - Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server.\n * @param destination - Host of the destination server, which is the server to which the file will be copied.\n * @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.\n */\n scp(files: string | string[], source: string, destination: string): Promise;\n\n /**\n * List files on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with the filenames of all files on the specified server\n * (as strings). The returned array is sorted in alphabetic order.\n *\n * @param host - Host of the target server.\n * @param grep - A substring to search for in the filename.\n * @returns Array with the filenames of all files on the specified server.\n */\n ls(host: string, grep?: string): string[];\n\n /**\n * List running scripts on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with general information about all scripts running on the specified target server.\n *\n * @example\n * ```ts\n * //(using NetscriptJS (Netscript 2.0))\n * export async function main(ns) {\n * const ps = ns.ps("home");\n * for (let i = 0; i < ps.length; ++i) {\n * ns.tprint(ps[i].filename + \' \' + ps[i].threads);\n * ns.tprint(ps[i].args);\n * }\n * }\n * ```\n * @param host - Host address of the target server. If not specified, it will be the current server’s IP by default.\n * @returns Array with general information about all scripts running on the specified target server.\n */\n ps(host?: string): ProcessInfo[];\n\n /**\n * Check if your have root access on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns a boolean indicating whether or not the player has root access to the specified target server.\n *\n * @example\n * ```ts\n * if (hasRootAccess("foodnstuff") == false) {\n * nuke("foodnstuff");\n * }\n * ```\n * @param host - Host of the target server\n * @returns True if player has root access to the specified target server, and false otherwise.\n */\n hasRootAccess(host: string): boolean;\n\n /**\n * Returns a string with the hostname of the server that the script is running on.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Hostname of the server that the script is on.\n */\n getHostname(): string;\n\n /**\n * Returns the player’s current hacking level.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Player’s current hacking level\n */\n getHackingLevel(): number;\n\n /**\n * Get hacking related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacking related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * //Example of how this can be used:\n * mults = getHackingMultipliers();\n * print(mults.chance);\n * print(mults.growth);\n * ```\n * @returns Object containing the Player’s hacking related multipliers.\n */\n getHackingMultipliers(): HackingMultipliers;\n\n /**\n * Get hacknet related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacknet related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * //Example of how this can be used:\n * mults = getHacknetMultipliers();\n * print(mults.production);\n * print(mults.purchaseCost);\n * ```\n * @returns Object containing the Player’s hacknet related multipliers.\n */\n getHacknetMultipliers(): HacknetMultipliers;\n\n /**\n * Returns a server object for the given server. Defaults to the running script\'s server if host is not specified.\n *\n * @remarks\n * RAM cost: 2 GB\n * @param host - Optional. Hostname for the requested server object.\n * @returns The requested server object.\n */\n getServer(host?: string): Server;\n\n /**\n * Get money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of money available on a server.\n * Running this function on the home computer will return the player’s money.\n *\n * @example\n * ```ts\n * getServerMoneyAvailable("foodnstuff");\n * getServerMoneyAvailable("home"); //Returns player\'s money\n * ```\n * @param host - Host of target server\n * @returns Amount of money available on the server.\n */\n getServerMoneyAvailable(host: string): number;\n\n /**\n * Get maximum money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the maximum amount of money that can be available on a server.\n *\n * @param host - Host of target server.\n * @returns Maximum amount of money available on the server.\n */\n getServerMaxMoney(host: string): number;\n\n /**\n * Get a server growth parameter.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the server’s instrinsic “growth parameter”. This growth\n * parameter is a number between 1 and 100 that represents how\n * quickly the server’s money grows. This parameter affects the\n * percentage by which the server’s money is increased when using the\n * grow function. A higher growth parameter will result in a\n * higher percentage increase from grow.\n *\n * @param host - Host of target server.\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\n */\n getServerGrowth(host: string): number;\n\n /**\n * Get server security level.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the security level of the target server. A server’s security\n * level is denoted by a number, typically between 1 and 100\n * (but it can go above 100).\n *\n * @param host - Host of target server.\n * @returns Security level of the target server.\n */\n getServerSecurityLevel(host: string): number;\n\n /**\n * Returns the minimum security level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns Minimum security level of the target server.\n */\n getServerMinSecurityLevel(host: string): number;\n\n /**\n * @deprecated useless\n * @remarks\n * RAM cost: 0.1 GB\n * Returns the base security level of the target server. This is the security\n * level that the server starts out with. This is different than\n * getServerSecurityLevel because getServerSecurityLevel returns\n * the current security level of a server, which can constantly change due to\n * hack, grow, and weaken, calls on that server.\n * The base security level will stay the same until you reset by\n * installing an Augmentation(s).\n *\n * @param host - Host of target server.\n * @returns Base security level of the target server.\n */\n getServerBaseSecurityLevel(host: string): number;\n\n /**\n * @deprecated use getServerMaxRam / getServerUsedRam\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns an array with two elements that gives information about a server’s memory (RAM).\n * The first element in the array is the amount of RAM that the server has total (in GB).\n * The second element in the array is the amount of RAM that is currently being used on\n * the server (in GB).\n *\n * @example\n * ```ts\n * res = getServerRam("helios");\n * totalRam = res[0];\n * ramUsed = res[1];\n * ```\n * @param host - Host of target server.\n * @returns Array with total and used memory on the specified server.\n */\n getServerRam(host: string): [number, number];\n\n /**\n * Get the max RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns max ram\n */\n getServerMaxRam(host: string): number;\n /**\n * Get the used RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns used ram\n */\n getServerUsedRam(host: string): number;\n\n /**\n * Returns the required hacking level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The required hacking level of the target server.\n */\n getServerRequiredHackingLevel(host: string): number;\n\n /**\n * Returns the number of open ports required to successfully run NUKE.exe on the specified server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The number of open ports required to successfully run NUKE.exe on the specified server.\n */\n getServerNumPortsRequired(host: string): number;\n\n /**\n * Returns a boolean denoting whether or not the specified server exists.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns True if specified server exists, and false otherwise.\n */\n serverExists(host: string): boolean;\n\n /**\n * Check if a file exists.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified file exists on the target server.\n * The filename for scripts is case-sensitive, but for other types of files it is not.\n * For example, fileExists(“brutessh.exe”) will work fine, even though the actual program\n * is named \'BruteSSH.exe\'.\n *\n * If the hostname/ip argument is omitted, then the function will search through the current\n * server (the server running the script that calls this function) for the file.\n *\n * @example\n * ```ts\n * //The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\n * fileExists("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\n * fileExists("ftpcrack.exe");\n * ```\n * @param filename - Filename of file to check.\n * @param host - Host of target server. This is optional. If it is not specified then the function will use the current server as the target server.\n * @returns True if specified file exists, and false otherwise.\n */\n fileExists(filename: string, host?: string): boolean;\n\n /**\n * Check if a script is running.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified script is running on the target server.\n * Remember that a script is uniquely identified by both its name and its arguments.\n *\n * @example\n * ```ts\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\n * isRunning("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\n * isRunning("foo.script", getHostname());\n * ```\n * @example\n * ```ts\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\n * isRunning("foo.script", "joesguns", 1, 5, "test");\n * ```\n * @param script - Filename of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @param args - Arguments to specify/identify which scripts to search for.\n * @returns True if specified script is running on the target server, and false otherwise.\n */\n isRunning(script: string, host: string, ...args: string[]): boolean;\n\n /**\n * Get general info about a running script.\n * @remarks\n * RAM cost: 0.3 GB\n * @returns info about a running script\n */\n getRunningScript(filename: string | number, hostname: string, ...args: (string | number)[]): RunningScript;\n\n /**\n * Get cost of purchasing a server.\n * @remarks\n * RAM cost: 0.25 GB\n *\n * Returns the cost to purchase a server with the specified amount of ram.\n *\n * @example\n * ```ts\n * for (i = 1; i <= 20; i++) {\n * tprint(i + " -- " + getPurchasedServerCost(Math.pow(2, i)));\n * }\n * ```\n * @param ram - Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The cost to purchase a server with the specified amount of ram.\n */\n getPurchasedServerCost(ram: number): number;\n\n /**\n * Purchase a server.\n * @remarks\n * 2.25 GB\n *\n * Purchased a server with the specified hostname and amount of RAM.\n *\n * The hostname argument can be any data type, but it will be converted to a string\n * and have whitespace removed. Anything that resolves to an empty string will cause\n * the function to fail. If there is already a server with the specified hostname,\n * then the function will automatically append a number at the end of the hostname\n * argument value until it finds a unique hostname. For example, if the script calls\n * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will\n * automatically change the hostname to `foo-0`. If there is already a server with the\n * hostname `foo-0`, then it will change the hostname to `foo-1`, and so on.\n *\n * Note that there is a maximum limit to the amount of servers you can purchase.\n *\n * Returns the hostname of the newly purchased server as a string. If the function\n * fails to purchase a server, then it will return an empty string. The function will\n * fail if the arguments passed in are invalid, if the player does not have enough\n * money to purchase the specified server, or if the player has exceeded the maximum\n * amount of servers.\n *\n * @example\n * ```ts\n * ram = 64;\n * hn = "pserv-";\n * for (i = 0; i < 5; ++i) {\n * purchaseServer(hn + i, ram);\n * }\n * ```\n * @param hostname - Host of the purchased server.\n * @param ram - Amount of RAM of the purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The hostname of the newly purchased server.\n */\n purchaseServer(hostname: string, ram: number): string;\n\n /**\n * Delete a purchased server.\n * @remarks\n * 2.25 GB\n *\n * Deletes one of your purchased servers, which is specified by its hostname.\n *\n * The hostname argument can be any data type, but it will be converted to a string.\n * Whitespace is automatically removed from the string. This function will not delete a\n * server that still has scripts running on it.\n *\n * @param host - Host of the server to delete.\n * @returns True if successful, and false otherwise.\n */\n deleteServer(host: string): boolean;\n\n /**\n * Returns an array with the hostnames of all of the servers you have purchased.\n *\n * @remarks 2.25 GB\n * @returns Returns an array with the hostnames of all of the servers you have purchased.\n */\n getPurchasedServers(): string[];\n\n /**\n * Returns the maximum number of servers you can purchase.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum number of servers you can purchase.\n */\n getPurchasedServerLimit(): number;\n\n /**\n * Returns the maximum RAM that a purchased server can have.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum RAM that a purchased server can have.\n */\n getPurchasedServerMaxRam(): number;\n\n /**\n * Write data to a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function can be used to either write data to a text file (.txt).\n *\n * This function will write data to that text file. If the specified text file does not exist,\n * then it will be created. The third argument mode, defines how the data will be written to\n * the text file. If *mode is set to “w”, then the data is written in “write” mode which means\n * that it will overwrite all existing data on the text file. If mode is set to any other value\n * then the data will be written in “append” mode which means that the data will be added at the\n * end of the text file.\n *\n * @param handle - Port or text file that will be written to.\n * @param data - Data to write.\n * @param mode - Defines the write mode. Only valid when writing to text files.\n */\n write(handle: string, data?: string[] | number, mode?: "w" | "a"): Promise;\n\n /**\n * Attempt to write to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Attempts to write data to the specified Netscript Port.\n * If the port is full, the data will not be written.\n * Otherwise, the data will be written normally.\n *\n * @param port - Port or text file that will be written to.\n * @param data - Data to write.\n * @returns True if the data is successfully written to the port, and false otherwise.\n */\n tryWritePort(port: number, data: string[] | number): Promise;\n\n /**\n * Read content of a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to read data from a port or from a text file (.txt).\n *\n * This function will return the data in the specified text\n * file. If the text file does not exist, an empty string will be returned.\n *\n * @param handle - Port or text file to read from.\n * @returns Data in the specified text file or port.\n */\n read(handle: string): any;\n\n /**\n * Get a copy of the data from a port without popping it.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to peek at the data from a port. It returns the\n * first element in the specified port without removing that element. If\n * the port is empty, the string “NULL PORT DATA” will be returned.\n *\n * @param port - Port to peek. Must be an integer between 1 and 20.\n * @returns Data in the specified port.\n */\n peek(port: number): any;\n\n /**\n * Clear data from a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * Delete all data from that text file.\n *\n * @param handle - Text file to clear.\n */\n clear(handle: string): void;\n\n /**\n * Clear data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Deleta all data from the underlying queue.\n *\n * @param handle - Port to clear.\n */\n clearPort(handle: number): void;\n\n /**\n * Write data to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Write data to that netscript port.\n * @returns The data popped off the queue if it was full.\n */\n writePort(port: number, data: string | number): Promise;\n /**\n * Read data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Read data from that port. A port is a serialized queue.\n * This function will remove the first element from that queue and return it.\n * If the queue is empty, then the string “NULL PORT DATA” will be returned.\n * @returns the data read.\n */\n readPort(port: number): any;\n\n /**\n * Get all data on a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Get a handle to a Netscript Port.\n *\n * WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.\n *\n * @see https://bitburner.readthedocs.io/en/latest/netscript/netscriptmisc.html#netscript-ports\n * @param port - Port number. Must be an integer between 1 and 20.\n * @returns Data in the specified port.\n */\n getPortHandle(port: number): any[];\n\n /**\n * Delete a file.\n * @remarks\n * RAM cost: 1 GB\n *\n * Removes the specified file from the current server. This function works for every file\n * type except message (.msg) files.\n *\n * @param name - Filename of file to remove. Must include the extension.\n * @param host - Host Address of the server on which to delete the file. Optional. Defaults to current server.\n * @returns True if it successfully deletes the file, and false otherwise.\n */\n rm(name: string, host?: string): boolean;\n\n /**\n * Check if any script with a filename is running.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns a boolean indicating whether any instance of the specified script is running\n * on the target server, regardless of its arguments.\n *\n * This is different than the isRunning function because it does not try to\n * identify a specific instance of a running script by its arguments.\n *\n * @example\n * ```ts\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\n * scriptRunning("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\n * scriptRunning("foo.script", getHostname());\n * ```\n * @param script - Filename of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @returns True if the specified script is running, and false otherwise.\n */\n scriptRunning(script: string, host: string): boolean;\n\n /**\n * Kill all scripts with a filename.\n * @remarks\n * RAM cost: 1 GB\n *\n * Kills all scripts with the specified filename on the target server specified by hostname,\n * regardless of arguments.\n *\n * @param script - Filename of script to kill. This is case-sensitive.\n * @param host - Host of target server.\n * @returns true if one or more scripts were successfully killed, and false if none were.\n */\n scriptKill(script: string, host: string): boolean;\n\n /**\n * Returns the current script name.\n *\n * @remarks RAM cost: 0 GB\n * @returns Current script name.\n */\n getScriptName(): string;\n\n /**\n * Get the ram cost of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of RAM required to run the specified script on the target server.\n * Returns 0 if the script does not exist.\n *\n * @param script - Filename of script. This is case-sensitive.\n * @param host - Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.\n * @returns Amount of RAM required to run the specified script on the target server, and 0 if the script does not exist.\n */\n getScriptRam(script: string, host?: string): number;\n\n /**\n * Get the execution time of a hack() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the hack time would be at different hacking levels.\n *\n * @param host - Host of target server.\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\n * @returns Returns the amount of time in milliseconds it takes to execute the hack Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getHackTime(host: string): number;\n\n /**\n * Get the execution time of a grow() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the grow Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the grow time would be at different hacking levels.\n *\n * @param host - Host of target server.\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getGrowTime(host: string): number;\n\n /**\n * Get the execution time of a weaken() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the weaken() Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the weaken time would be at different hacking levels.\n *\n * @param host - Host of target server.\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getWeakenTime(host: string): number;\n\n /**\n * Get the income of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of income the specified script generates while online\n * (when the game is open, does not apply for offline income). Remember that\n * a script is uniquely identified by both its name and its arguments. So for\n * example if you ran a script with the arguments “foodnstuff” and “5” then\n * in order to use this function to get that script’s income you must specify\n * those same arguments in the same order in this function call.\n *\n * This function can also be called with no arguments.\n * If called with no arguments, then this function will return an array of two values.\n * The first value is the total income (dollar / second) of all of your active scripts\n * (scripts that are currently running on any server).\n * The second value is the total income (dollar / second) that you’ve earned from scripts\n * since you last installed Augmentations.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of income the specified script generates while online.\n */\n getScriptIncome(script: string, host: string, ...args: string[]): number | [number, number];\n\n /**\n * Get the exp gain of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of hacking experience the specified script generates while online\n * (when the game is open, does not apply for offline experience gains). Remember that a\n * script is uniquely identified by both its name and its arguments.\n *\n * This function can also return the total experience gain rate of all of your active\n * scripts by running the function with no arguments.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of hacking experience the specified script generates while online.\n */\n getScriptExpGain(script: string, host: string, ...args: string[]): number;\n\n /**\n * Returns the amount of time in milliseconds that have passed since you last installed Augmentations.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Time in milliseconds that have passed since you last installed Augmentations.\n */\n getTimeSinceLastAug(): number;\n\n /**\n * Format a string.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n sprintf(format: string, ...args: string[]): string;\n\n /**\n * Format a string with an array of arguments.\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n vsprintf(format: string, args: string[]): string;\n\n /**\n * Format a number\n * @remarks\n * RAM cost: 0 GB\n *\n * Converts a number into a string with the specified formatter.\n * This uses the numeraljs library, so the formatters must be compatible with that.\n * This is the same function that the game itself uses to display numbers.\n *\n * see: http://numeraljs.com/\n * @param n - Number to format.\n * @param format - Formatter.\n * @returns Formated number.\n */\n nFormat(n: number, format: string): number;\n\n /**\n * Format time to readable string\n * @remarks\n * RAM cost: 0 GB\n *\n * @param milliseconds - Number of millisecond to format.\n * @param milliPrecision - Format time with subsecond precision, defaults to false.\n * @returns The formatted time.\n */\n tFormat(milliseconds: number, milliPrecision?: boolean): string;\n\n /**\n * Prompt the player with a Yes/No modal.\n * @remarks\n * RAM cost: 0 GB\n *\n * Prompts the player with a dialog box with two options: “Yes” and “No”.\n * This function will return true if the player click “Yes” and false if\n * the player clicks “No”. The script’s execution is halted until the player\n * selects one of the options.\n *\n * @param txt - Text to appear in the prompt dialog box.\n * @returns True if the player click “Yes” and false if the player clicks “No”.\n */\n prompt(txt: string): Promise;\n\n /**\n * Open up a message box.\n * @param msg - Message to alert.\n */\n alert(msg: any): void;\n\n /**\n * Queue a toast (bottom-right notification).\n * @param msg - Message in the toast.\n * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success.\n */\n toast(msg: any, variant?: string): void;\n\n /**\n * Download a file from the internet.\n * @remarks\n * RAM cost: 0 GB\n *\n * Retrieves data from a URL and downloads it to a file on the specified server.\n * The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt).\n * If the file already exists, it will be overwritten by this command.\n * Note that it will not be possible to download data from many websites because they\n * do not allow cross-origin resource sharing (CORS).\n *\n * IMPORTANT: This is an asynchronous function that returns a Promise.\n * The Promise’s resolved value will be a boolean indicating whether or not the data was\n * successfully retrieved from the URL. Because the function is async and returns a Promise,\n * it is recommended you use wget in NetscriptJS (Netscript 2.0).\n *\n * In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep).\n * wget will still work in Netscript 1.0, but the functions execution will not be synchronous\n * (i.e. it may not execute when you expect/want it to).\n * Furthermore, since Promises are not supported in ES5,\n * you will not be able to process the returned value of wget in Netscript 1.0.\n *\n * @example\n * ```ts\n * wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt");\n * ```\n * @param url - URL to pull data from.\n * @param target - Filename to write data to. Must be script or text file.\n * @param host - Optional hostname/ip of server for target file.\n * @returns True if the data was successfully retrieved from the URL, false otherwise.\n */\n wget(url: string, target: string, host?: string): Promise;\n\n /**\n * Returns the amount of Faction favor required to be able to donate to a faction.\n *\n * @remarks RAM cost: 0.1 GB\n * @returns Amount of Faction favor required to be able to donate to a faction.\n */\n getFavorToDonate(): number;\n\n /**\n * Get the current Bitnode multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the current BitNode multipliers.\n * This function requires Source-File 5 in order to run.\n * The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%).\n * The multipliers represent the difference between the current BitNode and\n * the original BitNode (BitNode-1).\n *\n * For example, if the CrimeMoney multiplier has a value of 0.1, then that means\n * that committing crimes in the current BitNode will only give 10% of the money\n * you would have received in BitNode-1.\n *\n * @example\n * ```ts\n * mults = getBitNodeMultipliers();\n * print(mults.ServerMaxMoney);\n * print(mults.HackExpGain);\n * ```\n * @returns Object containing the current BitNode multipliers.\n */\n getBitNodeMultipliers(): BitNodeMultipliers;\n\n /**\n * Get a list of acquired Source-Files.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns an array of source files\n *\n * @returns Array containing an object with number and level of the source file.\n */\n getOwnedSourceFiles(): SourceFileLvl[];\n\n /**\n * Get information about the player.\n * @returns Player info\n */\n getPlayer(): Player;\n\n /**\n * Add callback function when the script dies\n * @remarks\n * RAM cost: 0 GB\n *\n * NS2 exclusive\n *\n * Add callback to be executed when the script dies.\n */\n atExit(f: () => void): void;\n\n /**\n * Parse command line flags.\n * @remarks\n * RAM cost: 0 GB\n *\n * Allows unix like flag parsing.\n * @example\n * ```ts\n * // example.script\n * var data = flags([\n * [\'delay\', 0], // a default number means this flag is a number\n * [\'server\', \'foodnstuff\'], // a default string means this flag is a string\n * [\'exclude\', []], // a default array means this flag is a default array of string\n * [\'help\', false], // a default boolean means this flag is a boolean\n * ]);\n * tprint(data);\n *\n * // [home ~/]> run example.script\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false}\n * // [home ~/]> run example.script --delay 3000\n * // {"_":[],"server":"foodnstuff","exclude":[],"help":false,"delay":3000}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi\n * // {"_":[],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world\n * // {"_":["hello","world"],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b\n * // {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]}\n * // [home ~/]> run example.script --help\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true}\n * ```\n */\n flags(schema: [string, string | number | boolean | string[]][]): any;\n}\n\n/**\n * Corporation Office API\n * @remarks\n * Requires the Office API upgrade from your corporation.\n * @public\n */\nexport interface OfficeAPI {\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - name of the employee\n * @param job - Name of the job.\n * @returns A promise that is fulfilled when the assignment is complete.\n */\n assignJob(divisionName: string, cityName: string, employeeName: string, job: string): Promise;\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns The newly hired employee, if any\n */\n hireEmployee(divisionName: string, cityName: string): Employee | undefined;\n /**\n * Upgrade office size.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param size - Amount of positions to open\n */\n upgradeOfficeSize(divisionName: string, cityName: string, size: number): void;\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param costPerEmployee - Amount to spend per employee.\n * @returns Amount of happiness increased.\n */\n throwParty(divisionName: string, cityName: string, costPerEmployee: number): Promise;\n /**\n * Buy coffee for your employees\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns A promise that is fulfilled when the coffee is served.\n */\n buyCoffee(divisionName: string, cityName: string): Promise;\n /**\n * Hire AdVert.\n * @param divisionName - Name of the division\n */\n hireAdVert(divisionName: string): void;\n /**\n * Hire AdVert.\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n */\n research(divisionName: string, researchName: string): void;\n /**\n * Get data about an office\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns Office data\n */\n getOffice(divisionName: string, cityName: string): Office;\n /**\n * Get data about an employee\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - Name of the employee\n * @returns Employee data\n */\n getEmployee(divisionName: string, cityName: string, employeeName: string): Employee;\n}\n\n/**\n * Corporation Warehouse API\n * @remarks\n * Requires the Warehouse API upgrade from your corporation.\n * @public\n */\nexport interface WarehouseAPI {\n /**\n * Set material sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n */\n sellMaterial(divisionName: string, cityName: string, materialName: string, amt: string, price: string): void;\n /**\n * Set product sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n * @param all - Sell in all city\n */\n sellProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n amt: string,\n price: string,\n all: boolean,\n ): void;\n /**\n * Discontinue a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n */\n discontinueProduct(divisionName: string, productName: string): void;\n /**\n * Set smart supply\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param enabled - smart supply enabled\n */\n setSmartSupply(divisionName: string, cityName: string, enabled: boolean): void;\n /**\n * Set material buy data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount of material to buy\n */\n buyMaterial(divisionName: string, cityName: string, materialName: string, amt: number): void;\n /**\n * Get warehouse data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns warehouse data\n */\n getWarehouse(divisionName: string, cityName: string): Warehouse;\n /**\n * Get product data\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @returns product data\n */\n getProduct(divisionName: string, productName: string): Product;\n /**\n * Get material data\n * @param divisionName - Name of the division\n * @param materialName - Name of the material\n * @returns material data\n */\n getMaterial(divisionName: string, cityName: string, materialName: string): Material;\n /**\n * Set market TA 1 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA1(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 2 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA2(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 1 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA1(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set market TA 2 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA2(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set material export data\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n exportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Cancel material export\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n cancelExportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Purchase warehouse for a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n purchaseWarehouse(divisionName: string, cityName: string): void;\n /**\n * Upgrade warehouse\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n upgradeWarehouse(divisionName: string, cityName: string): void;\n /**\n * Create a new product\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param designInvest - Amount to invest for the design of the product.\n * @param marketingInvest - Amount to invest for the marketing of the product.\n */\n makeProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n ): void;\n}\n\n/**\n * Corporation API\n * @public\n */\nexport interface Corporation extends WarehouseAPI, OfficeAPI {\n /**\n * Get corporation data\n * @returns Corporation data\n */\n getCorporation(): CorporationInfo;\n /**\n * Get division data\n * @param divisionName - Name of the division\n * @returns Division data\n */\n getDivision(divisionName: string): Division;\n /**\n * Expand to a new industry\n * @param industryType - Name of the industry\n * @param divisionName - Name of the division\n */\n expandIndustry(industryType: string, divisionName: string): void;\n /**\n * Expand to a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n expandCity(divisionName: string, cityName: string): void;\n /**\n * Unlock an upgrade.\n * @param upgradeName - Name of the upgrade\n */\n unlockUpgrade(upgradeName: string): void;\n /**\n * Level an upgrade.\n * @param upgradeName - Name of the upgrade\n */\n levelUpgrade(upgradeName: string): void;\n /**\n * Issue dividends\n * @param percent - Percent of profit to issue as dividends.\n */\n issueDividends(percent: number): void;\n}\n\n/**\n * General info about a corporation\n * @public\n */\ninterface CorporationInfo {\n /** Name of the corporation */\n name: string;\n /** Funds available */\n funds: number;\n /** Revenue per second this cycle */\n revenue: number;\n /** Expenses per second this cycle */\n expenses: number;\n /** Is the company is public */\n public: boolean;\n /** Total number of shares issues by this corporation */\n totalShares: number;\n /** Amount of share owned */\n numShares: number;\n /** Cooldown until shares can be sold again */\n shareSaleCooldown: number;\n /** Amount of shares issued */\n issuedShares: number;\n /** Price of the shares */\n sharePrice: number;\n /** State of the corporation, like PRODUCTION or EXPORT */\n state: string;\n}\n\n/**\n * Employee in an office\n * @public\n */\ninterface Employee {\n /** Name of the employee */\n name: string;\n /** Morale */\n mor: number;\n /** Happiness */\n hap: number;\n /** Energy */\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n /** Salary */\n sal: number;\n /** City */\n loc: string;\n /** Current job */\n pos: string;\n}\n\n/**\n * Product in a warehouse\n * @public\n */\ninterface Product {\n /** Name of the product */\n name: string;\n /** Demand for the product */\n dmd: number;\n /** Competition for the product */\n cmp: number;\n /** Production cost */\n pCost: number;\n /** Sell cost, can be "MP+5" */\n sCost: string | number;\n}\n\n/**\n * Material in a warehouse\n * @public\n */\ninterface Material {\n /** Name of the material */\n name: string;\n /** Amount of material */\n qty: number;\n /** Quality of the material */\n qlt: number;\n}\n\n/**\n * Warehouse for a division in a city\n * @public\n */\ninterface Warehouse {\n /** Amount of size upgrade bought */\n level: number;\n /** City in which the warehouse is located */\n loc: string;\n /** Total space in the warehouse */\n size: number;\n /** Used space in the warehouse */\n sizeUsed: number;\n}\n\n/**\n * Office for a division in a city.\n * @public\n */\ninterface Office {\n /** City of the office */\n loc: string;\n /** Maximum number of employee */\n size: number;\n /** Minimum amount of energy of the employees */\n minEne: number;\n /** Maximum amount of energy of the employees */\n maxEne: number;\n /** Minimum happiness of the employees */\n minHap: number;\n /** Maximum happiness of the employees */\n maxHap: number;\n /** Maximum morale of the employees */\n maxMor: number;\n /** Name of all the employees */\n employees: string[];\n /** Positions of the employees */\n employeeProd: EmployeeJobs;\n}\n\n/**\n * Object representing the number of employee in each job.\n * @public\n */\ninterface EmployeeJobs {\n Operations: number;\n Engineer: number;\n Business: number;\n Management: number;\n "Research & Development": number;\n Training: number;\n Unassigned: number;\n}\n\n/**\n * Corporation division\n * @public\n */\ninterface Division {\n /** Name of the division */\n name: string;\n /** Type of division, like Aggriculture */\n type: string;\n /** Awareness of the division */\n awareness: number;\n /** Popularity of the division */\n popularity: number;\n /** Production multiplier */\n prodMult: number;\n /** Amount of research in that division */\n research: number;\n /** Revenue last cycle */\n lastCycleRevenue: number;\n /** Expenses last cycle */\n lastCycleExpenses: number;\n /** Revenue this cycle */\n thisCycleRevenue: number;\n /** Expenses this cycle */\n thisCycleExpenses: number;\n /** All research bought */\n upgrades: number[];\n /** Cities in which this division has expanded */\n cities: string[];\n}\n'},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(638),r=a(0),i=a(1),o=a(32);function s(e){const t=function(e,t){let a=-1;for(let n=0;n{if(n<=t+1)return r.createElement(i.a,{key:n},"[",a.fulfilled(e.player)?"x":" ","] ",a.title)});return r.createElement(r.Fragment,null,r.createElement(i.a,{variant:"h4"},"Milestones"),r.createElement(o.a,{mx:2},r.createElement(i.a,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(i.a,null,"Completing fl1ght.exe"),a))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(1),o=a(274),s=a(66),l=a(127),c=a(126),u=a(154),m=a(32),h=a(224),p=a(1066),d=a(294),f=a(502),g=a(487),y=a(362),b=a.n(y);function E({terminal:e}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},e.getProgressText())}const k=Object(c.a)(e=>Object(u.a)({nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"},success:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.colors.success},error:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.error.main},primary:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.primary.main},info:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.info.main},warning:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.warning.main}}));function v({terminal:e,router:t,player:a}){const c=Object(n.useRef)(null),u=Object(n.useState)(0)[1],[y,v]=Object(n.useState)(0);function _(){const e=c.current;null!==e&&setTimeout(()=>e.scrollIntoView(!0),50)}Object(n.useEffect)(()=>d.b.subscribe(b.a.debounce(async()=>{u(e=>e+1)},25,{maxWait:50})),[]),Object(n.useEffect)(()=>d.a.subscribe(b.a.debounce(async()=>{v(e=>e+1)},25,{maxWait:50})),[]),_(),Object(n.useEffect)(()=>{setTimeout(_,50)},[]);const w=k();return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{width:"100%",minHeight:"100vh",display:"flex",alignItems:"flex-end"},r.a.createElement(o.a,{key:y,id:"terminal",classes:{root:w.list}},e.outputHistory.map((t,n)=>{return t instanceof h.b?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:(o=t.color,"error"===o?w.error:"success"===o?w.success:"info"===o?w.info:"warn"===o?w.warning:w.primary)},paragraph:!1},t.text)):t instanceof h.c?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:w.preformatted},paragraph:!1},t.raw)):t instanceof h.a?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,null,t.dashes,"> "),r.a.createElement(l.a,{classes:{root:w.preformatted},color:"secondary",paragraph:!1,onClick:()=>e.connectToServer(a,t.hostname)},r.a.createElement(i.a,null,t.hostname))):void 0;var o}),null!==e.action&&r.a.createElement(s.a,{classes:{root:w.nopadding}},r.a.createElement(E,{terminal:e})," ")),r.a.createElement("div",{ref:c})),r.a.createElement(m.a,{position:"sticky",bottom:0,width:"100%",px:0},r.a.createElement(p.a,{player:a,router:t,terminal:e})),r.a.createElement(f.b,null),r.a.createElement(g.b,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(1),o=a(126),s=a(154),l=a(82),c=a(26),u=a(96),m=a(1067),h=a(1070),p=a(13);const d=Object(o.a)(e=>Object(s.a)({textfield:{margin:e.spacing(0)},input:{backgroundColor:"#000"},nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"}}));let f="";function g({terminal:e,router:t,player:a}){const o=Object(n.useRef)(null),[s,g]=Object(n.useState)(f),[y,b]=Object(n.useState)([]),E=d();function k(e){f=e,g(e)}function v(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null!==n)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(let e=n-2;e>=0;--e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e+1,e+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(n+1,n+1);break;case"nextword":for(let e=n+1;e<=a;++e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e,e);t.setSelectionRange(a,a);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}return Object(n.useEffect)(()=>{function n(n){if(e.contractOpen)return;if(null!==e.action&&n.keyCode===u.a.C&&n.ctrlKey)return void e.finishAction(t,a,!0);const r=o.current;n.ctrlKey||n.metaKey||n.keyCode===u.a.C&&(n.ctrlKey||n.metaKey)||r&&r.focus()}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{title:y.length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},"Possible autocomplete candidate:"),r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},y.join(" "))):""},r.a.createElement(l.a,{fullWidth:!0,color:null===e.action?"primary":"secondary",autoFocus:!0,disabled:null!==e.action,autoComplete:"off",value:s,classes:{root:E.textfield},onChange:function(e){k(e.target.value),b([])},inputRef:o,InputProps:{id:"terminal-input",className:E.input,startAdornment:r.a.createElement(i.a,{color:null===e.action?"primary":"secondary",flexShrink:0},"[",a.getCurrentServer().hostname," ~",e.cwd(),"]> "),spellCheck:!1,onKeyDown:async function(n){if(n.keyCode===u.a.ENTER&&""!==s)return n.preventDefault(),e.print(`[${a.getCurrentServer().hostname} ~${e.cwd()}]> ${s}`),e.executeCommands(t,a,s),void k("");if(n.keyCode===u.a.TAB&&""!==s){n.preventDefault();let t=s;const r=t.lastIndexOf(";");-1!==r&&(t=t.slice(r+1)),t=t.trim(),t=t.replace(/\s\s+/g," ");const i=t.split(" ");let o=i.length-2;o<-1&&(o=0);const l=await Object(m.a)(a,t,o,e.cwd());if(0==l.length)return;let c="",u="";if(0==i.length)return;1==i.length?u=i[0]:2==i.length?(u=i[0],c=i[1]):3==i.length?(u=i[0]+" "+i[1],c=i[2]):(c=i.pop()+"",u=i.join(" "));let p=Object(h.a)(u,c,l,s);"string"==typeof p&&""!==p&&(p.endsWith(" ")||p.endsWith("/")||1!==l.length||(p+=" "),k(p)),Array.isArray(p)&&b(p)}if(n.keyCode===u.a.L&&n.ctrlKey&&(n.preventDefault(),e.clear()),n.keyCode===u.a.UPARROW||p.a.EnableBashHotkeys&&n.keyCode===u.a.P&&n.ctrlKey){p.a.EnableBashHotkeys&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;(t<0||t>a)&&(e.commandHistoryIndex=a),0!=t&&--e.commandHistoryIndex;k(e.commandHistory[e.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.keyCode===u.a.DOWNARROW||p.a.EnableBashHotkeys&&n.keyCode===u.a.M&&n.ctrlKey){p.a.EnableBashHotkeys&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;if((t<0||t>a)&&(e.commandHistoryIndex=a),t==a||t==a-1)e.commandHistoryIndex=a,k("");else{++e.commandHistoryIndex;k(e.commandHistory[e.commandHistoryIndex])}}p.a.EnableBashHotkeys&&(n.keyCode===u.a.A&&n.ctrlKey&&(n.preventDefault(),v("home")),n.keyCode===u.a.E&&n.ctrlKey&&(n.preventDefault(),v("end")),n.keyCode===u.a.B&&n.ctrlKey&&(n.preventDefault(),v("prevchar")),n.keyCode===u.a.B&&n.altKey&&(n.preventDefault(),v("prevword")),n.keyCode===u.a.F&&n.ctrlKey&&(n.preventDefault(),v("nextchar")),n.keyCode===u.a.F&&n.altKey&&(n.preventDefault(),v("nextword")),n.keyCode!==u.a.H&&n.keyCode!==u.a.D||!n.ctrlKey||(!function(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null===n)return;const r=t.value;switch(e.toLowerCase()){case"backspace":n>0&&n<=a+1&&k(r.substr(0,n-1)+r.substr(n));break;case"deletewordbefore":for(let e=n-1;e>0;--e)if(" "===r.charAt(e))return void k(r.substr(0,e)+r.substr(n));break;case"deletewordafter":for(let e=n+1;e<=s.length+1;++e)if(" "===r.charAt(e))return void k(r.substr(0,n)+r.substr(e))}}("backspace"),n.preventDefault()))}}})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(112),r=a(1068),i=a(141),o=a(291),s=a(27),l=a(411),c=a(91),u=a(545),m=a(546),h=a(402);const p=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","cp","download","expr","free","grow","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan-analyze","scan","scp","sudov","tail","theme","top","weaken"];async function d(e,t,a,d=""){t=Object(i.h)(t);let f=[];f=f.concat(Object.keys(i.b));const g=e.getCurrentServer(),y=e.getHomeComputer();let b="",E=null;function k(){for(const e of g.contracts)f.push(e.fn)}function v(){for(const e of g.messages)e.endsWith(".msg")||f.push(e)}function _(){for(const e of y.programs)f.push(e)}function w(){for(const e of g.scripts){const t=x(e.filename);t&&f.push(t)}}function S(){for(const e of g.textFiles){const t=x(e.fn);t&&f.push(t)}}function C(){const e=Object(r.a)(g,null==E?"/":E);for(let t=0;te.filename===n);if(!r)return;r.module||await Object(u.a)(r,g.scripts);const i=await r.module;if(!i.autocomplete)return;const o={"--tail":Boolean,"-t":Number},p=h(o,{permissive:!0,argv:a.slice(2)}),d=Object(m.a)(p._);let f=[],y=[];return f=f.concat(i.autocomplete({servers:Object(s.c)().map(e=>e.hostname),scripts:g.scripts.map(e=>e.filename),txts:g.textFiles.map(e=>e.fn),flags:e=>{y=e.map(e=>1===e[0].length?"-"+e[0]:"--"+e[0]);try{return d(e)}catch(e){return}}},p._)),f.concat(y)}();return R||(O("run")&&(w(),_(),k(),C()),O("kill")||O("tail")||O("mem")||O("check")?(w(),C(),f):O("cat")?(function(){for(const e of g.messages)e.endsWith(".msg")&&f.push(e)}(),v(),S(),C(),f):O("download")||O("mv")?(w(),S(),C(),f):O("cd")?(C(),f):(O("ls")&&0===a&&C(),f))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(112);function r(e,t){const a=[];if(!Object(n.g)(t))return a;let r=t;function i(e){if("/"===r&&Object(n.f)(e)){const t=Object(n.e)(e);"/"===t||a.includes(t)||a.push(t)}else if(e.startsWith(r)){const t=e.slice(r.length),i=Object(n.e)(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 n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(22);function r(e,t,a,r){if(a.constructor!==Array)return;if(!Object(n.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=r.lastIndexOf(";");let o="";if(0!==a.length){if(1===a.length)return o=""===t?a[0]:e+" "+a[0],-1===i?o:r.slice(0,i+1)+" "+o;{const o=Object(n.e)(a);return""===t?o===e?a:-1===i?o:`${r.slice(0,i+1)} ${o}`:o===t?a:-1==i?`${e} ${o}`:`${r.slice(0,i+1)} ${e} ${o}`}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1),o=a(127),s=a(32);function l(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"h4"},"Tutorial / Documentation"),r.a.createElement(s.a,{m:2},r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},r.a.createElement(i.a,null,"Getting Started")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},r.a.createElement(i.a,null,"Servers & Networking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},r.a.createElement(i.a,null,"Hacking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},r.a.createElement(i.a,null,"Scripts")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},r.a.createElement(i.a,null,"Netscript Programming Language")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},r.a.createElement(i.a,null,"Traveling")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},r.a.createElement(i.a,null,"Companies")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},r.a.createElement(i.a,null,"Infiltration")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},r.a.createElement(i.a,null,"Factions")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},r.a.createElement(i.a,null,"Augmentations")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},r.a.createElement(i.a,null,"Keyboard Shortcuts"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(470),o=a(226),s=a(1073),l=a(1083);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const[c,u]=Object(n.useState)("active");return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"fullWidth",value:c,onChange:function(e,t){u(t)}},r.a.createElement(o.a,{label:"Active",value:"active"}),r.a.createElement(o.a,{label:"Recent",value:"recent"})),"active"===c&&r.a.createElement(s.a,{workerScripts:e.workerScripts}),"recent"===c&&r.a.createElement(l.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1074),o=a(1075),s=a(1);function l(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,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,null),r.a.createElement(o.a,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(16),i=a(98),o=a(29),s=a(1),l=a(126),c=a(154),u=a(236),m=a(169),h=a(49),p=a(56);const d=Object(l.a)(e=>Object(c.a)({cell:{borderBottom:"none",padding:e.spacing(1),margin:e.spacing(1),whiteSpace:"nowrap"},size:{width:"1px"}}));function f(){const e=o.b.Player(),t=d(),a=e.scriptProdSinceLastAug/(e.playtimeSinceLastAug/1e3);return n.createElement(u.a,{size:"small",classes:{root:t.size}},n.createElement(m.a,null,n.createElement(p.a,null,n.createElement(h.a,{component:"th",scope:"row",classes:{root:t.cell}},n.createElement(s.a,{variant:"body2"},"Total production:")),n.createElement(h.a,{align:"left",classes:{root:t.cell}},n.createElement(s.a,{variant:"body2"},n.createElement(r.a,{money:e.scriptProdSinceLastAug}))),n.createElement(h.a,{align:"left",classes:{root:t.cell}},n.createElement(s.a,{variant:"body2"},"(",n.createElement(i.a,{money:a}),")")))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1076),o=a(82),s=a(274),l=a(1201),c=a(264),u=a(27),m=a(13),h=a(548),p=a(1082),d=a.n(p);function f(e){const[t,a]=Object(n.useState)(""),[p,f]=Object(n.useState)(0),[g,y]=Object(n.useState)(m.a.ActiveScriptsServerPageSize),b=Object(n.useState)(!1)[1];const E={};for(const t of e.workerScripts.values()){const e=Object(u.d)(t.hostname);if(null==e){console.warn("WorkerScript has invalid IP address: "+t.hostname);continue}let a=E[e.hostname];void 0===a&&(E[e.hostname]={server:e,workerScripts:[]},a=E[e.hostname]),void 0!==a&&a.workerScripts.push(t)}const k=Object.values(E).filter(e=>e&&(e.server.hostname.includes(t)||e.server.runningScripts.find(e=>e.filename.includes(t))));function v(){b(e=>!e)}return Object(n.useEffect)(()=>c.a.subscribe(v)),r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{value:t,onChange:function(e){a(e.target.value),f(0)},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(d.a,null),spellCheck:!1}}),r.a.createElement(s.a,{dense:!0},k.slice(p*g,p*g+g).map(e=>e&&r.a.createElement(i.a,{key:e.server.hostname,server:e.server,workerScripts:e.workerScripts}))),r.a.createElement(l.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:k.length,rowsPerPage:g,page:p,onPageChange:(e,t)=>{f(t)},onRowsPerPageChange:e=>{m.a.ActiveScriptsServerPageSize=parseInt(e.target.value,10),y(parseInt(e.target.value,10)),f(0)},ActionsComponent:h.a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a(1),i=a(302),o=a(97),s=a(73),l=a(32),c=a(189),u=a(70),m=a.n(u),h=a(134),p=a.n(h),d=a(1077),f=a(170);function g(e){const[t,a]=n.useState(!1),u=e.server,h=`${u.hostname}${" ".repeat(18)}`.slice(0,Math.max(u.hostname.length,18)),g={progress:u.ramUsed/u.maxRam,totalTicks:30},y=`${h} ${Object(f.a)(g)}`;return n.createElement(l.a,{component:s.a},n.createElement(i.a,{onClick:()=>a(e=>!e)},n.createElement(o.a,{primary:n.createElement(r.a,{style:{whiteSpace:"pre-wrap"}},y)}),t?n.createElement(p.a,{color:"primary"}):n.createElement(m.a,{color:"primary"})),n.createElement(l.a,{mx:2},n.createElement(c.a,{in:t,timeout:0,unmountOnExit:!0},n.createElement(d.a,{workerScripts:e.workerScripts}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(1078),o=a(274),s=a(1201),l=a(548),c=a(13);function u(e){const[t,a]=Object(n.useState)(0),[u,m]=Object(n.useState)(c.a.ActiveScriptsScriptPageSize);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{dense:!0,disablePadding:!0},e.workerScripts.slice(t*u,t*u+u).map(e=>r.a.createElement(i.a,{key:`${e.name}_${e.args}`,workerScript:e}))),r.a.createElement(s.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:e.workerScripts.length,rowsPerPage:u,page:t,onPageChange:(e,t)=>{a(t)},onRowsPerPageChange:e=>{c.a.ActiveScriptsScriptPageSize=parseInt(e.target.value,10),m(parseInt(e.target.value,10)),a(0)},ActionsComponent:l.a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var n=a(0),r=a(4),i=a(236),o=a(49),s=a(56),l=a(169),c=a(10),u=a(32),m=a(73),h=a(1),p=a(94),d=a(1079),f=a.n(d),g=a(302),y=a(97),b=a(126),E=a(189),k=a(134),v=a.n(k),_=a(70),w=a.n(_),S=a(131),C=a(15),x=a(201),O=a(22),M=a(230),T=a(16),R=a(98);const A=Object(b.a)({noborder:{borderBottom:"none"}});function P(e){const t=A(),[a,d]=n.useState(!1),b=e.workerScript.scriptRef;const k=S.a.bind(null,b,b.server);const _=b.onlineMoneyMade/b.onlineRunningTime,P=b.onlineExpGained/b.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(g.a,{onClick:()=>d(e=>!e),component:m.a},n.createElement(y.a,{primary:n.createElement(h.a,null,"└ ",e.workerScript.name," ",JSON.stringify(e.workerScript.args))}),a?n.createElement(v.a,{color:"primary"}):n.createElement(w.a,{color:"primary"})),n.createElement(E.a,{in:a,timeout:0,unmountOnExit:!0},n.createElement(u.a,{mx:6},n.createElement(i.a,{padding:"none",size:"small"},n.createElement(l.a,null,n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Threads:")),n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,r.a.formatThreads(e.workerScript.scriptRef.threads)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:2},n.createElement(h.a,null,"└ Args: ",Object(M.a)(e.workerScript.args)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Online Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,Object(O.b)(1e3*b.onlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Offline Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,Object(O.b)(1e3*b.offlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Total online production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null,n.createElement(T.a,{money:b.onlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null," ",r.a.formatExp(b.onlineExpGained)+" hacking exp"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Online production rate:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null,n.createElement(R.a,{money:_})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null," ",r.a.formatExp(P)+" hacking exp / sec"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Total offline production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null,n.createElement(T.a,{money:b.offlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null," ",r.a.formatExp(b.offlineExpGained)+" hacking exp"))))),n.createElement(c.a,{onClick:function(){x.b.emit(b)}},"LOG"),n.createElement(p.a,{onClick:function(){k(),Object(C.a)("Killing script")}},n.createElement(f.a,{color:"error"})))))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1),o=a(508),s=a(1084);function l(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"List of all recently killed scripts."),o.b.map(e=>r.a.createElement(s.a,{key:e.pid,recentScript:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var n=a(0),r=a(4),i=a(236),o=a(49),s=a(56),l=a(169),c=a(32),u=a(73),m=a(1),h=a(10),p=a(302),d=a(97),f=a(126),g=a(189),y=a(134),b=a.n(y),E=a(70),k=a.n(E),v=a(22),_=a(230),w=a(16),S=a(98),C=a(201);const x=Object(f.a)({noborder:{borderBottom:"none"}});function O(e){const t=x(),[a,f]=n.useState(!1),y=e.recentScript,E=y.runningScript.onlineMoneyMade/y.runningScript.onlineRunningTime,O=y.runningScript.onlineExpGained/y.runningScript.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(p.a,{onClick:()=>f(e=>!e),component:u.a},n.createElement(d.a,{primary:n.createElement(m.a,null,"└ ",y.filename," (died"," ",Object(v.b)((new Date).getTime()-y.timestamp.getTime())," ago)")}),a?n.createElement(b.a,{color:"primary"}):n.createElement(k.a,{color:"primary"})),n.createElement(g.a,{in:a,timeout:0,unmountOnExit:!0},n.createElement(c.a,{mx:6},n.createElement(i.a,{padding:"none",size:"small"},n.createElement(l.a,null,n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Threads:")),n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,r.a.formatThreads(y.runningScript.threads)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:2},n.createElement(m.a,null,"└ Args: ",Object(_.a)(y.args)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Online Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,Object(v.b)(1e3*y.runningScript.onlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Offline Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,Object(v.b)(1e3*y.runningScript.offlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Total online production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null,n.createElement(w.a,{money:y.runningScript.onlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(y.runningScript.onlineExpGained)+" hacking exp"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Online production rate:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null,n.createElement(S.a,{money:E})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(O)+" hacking exp / sec"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Total offline production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null,n.createElement(w.a,{money:y.runningScript.offlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(y.runningScript.offlineExpGained)+" hacking exp"))))),n.createElement(h.a,{onClick:function(){C.b.emit(y.runningScript)}},"LOG"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(1086),o=a(1090),s=a(1091),l=a(381),c=a(8),u=a(5),m=a(29),h=a(1092),p=a(1),d=a(10),f=a(1093);const g=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];function y({faction:e,rerender:t,onAugmentations:a}){const i=m.b.Player(),y=m.b.Router(),[b,E]=Object(n.useState)(!1),[k,v]=Object(n.useState)(!1),_=i,w=e.getInfo();const S=_.inGang()&&_.getGangName()===e.name,C=Math.floor(c.a.BaseFavorToDonate*u.a.RepToDonateToFaction),x=e.favor>=C,O="The Covenant"===e.name&&10===_.bitNodeN;let M=_.canAccessGang()&&g.includes(e.name);return _.inGang()&&(_.getGangName()!==e.name?M=!1:_.getGangName()===e.name&&(M=!0)),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:()=>y.toFactions()},"Back"),r.a.createElement(p.a,{variant:"h4",color:"primary"},e.name),r.a.createElement(s.a,{faction:e,factionInfo:w}),M&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:function(){if(i.inGang())return y.toGang();v(!0)}}),r.a.createElement(h.a,{facName:e.name,open:k,onClose:()=>v(!1)})),!S&&w.offerHackingWork&&r.a.createElement(l.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:()=>function(e){i.startFactionHackWork(y,e)}(e)}),!S&&w.offerFieldWork&&r.a.createElement(l.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:()=>function(e){i.startFactionFieldWork(y,e)}(e)}),!S&&w.offerSecurityWork&&r.a.createElement(l.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:()=>function(e){i.startFactionSecurityWork(y,e)}(e)}),!S&&w.offersWork()&&r.a.createElement(o.a,{faction:e,p:i,rerender:t,favorToDonate:C,disabled:!x}),r.a.createElement(l.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:a}),O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:()=>E(!0)}),r.a.createElement(f.a,{open:b,onClose:()=>E(!1)})))}function b(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const o=e.faction,[s,l]=Object(n.useState)(!1);return s?r.a.createElement(i.a,{faction:o,routeToMainPage:()=>l(!1)}):r.a.createElement(y,{rerender:a,faction:o,onAugmentations:()=>l(!0)})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(1087),o=a(20),s=a(6),l=a(183),c=a(13),u=a(113),m=a(29),h=a(104),p=a(290),d=a(32),f=a(10),g=a(1),y=a(26),b=a(169),E=a(236),k=a(8);function v(e){const t=m.b.Player(),a=t.inGang()&&t.getGangName()===e.faction.name,v=Object(n.useState)(!1)[1];function _(){v(e=>!e)}function w(){if(a){const e=[];for(const a in o.a){if(a===s.a.NeuroFluxGovernor)continue;if(a===s.a.TheRedPill&&2!==t.bitNodeN)continue;o.a[a].isSpecial||e.push(a)}return e}return e.faction.augmentations.slice()}function S(e){c.a.PurchaseAugmentationsOrder=e,_()}const C=function(){switch(c.a.PurchaseAugmentationsOrder){case l.b.Cost:return function(){const e=w();return e.sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),e}();case l.b.Reputation:return function(){const e=w();return e.sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement}),e}();case l.b.Purchasable:return function(){const a=w();function n(a){const n=o.a[a],r=n.baseRepRequirement*e.faction.getInfo().augmentationRepRequirementMult,i=e.faction.playerReputation>=r,s=Object(u.b)(n);return 0!==n.baseCost&&t.money>n.baseCost*e.faction.getInfo().augmentationPriceMult&&i&&s}const r=a.filter(n).sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),i=a.filter(e=>!n(e)).sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement});return r.concat(i)}();default:return w()}}(),x=C.filter(e=>e===s.a.NeuroFluxGovernor||!t.augmentations.some(t=>t.name===e)&&!t.queuedAugmentations.some(t=>t.name===e)),O=(a,n=!1)=>r.a.createElement(i.a,{augName:a,faction:e.faction,key:a,p:t,rerender:_,owned:n}),M=x.map(e=>O(e));let T=r.a.createElement(r.a.Fragment,null);const R=C.filter(e=>!x.includes(e));0!==R.length&&(T=r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(g.a,{variant:"h4"},"Purchased Augmentations"),r.a.createElement(g.a,null,"This factions also offers these augmentations but you already own them."),R.map(e=>O(e,!0))));const A=Math.pow(k.a.MultipleAugMultiplier*[1,.96,.94,.93][t.sourceFileLvl(11)],t.queuedAugmentations.length);return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{onClick:e.routeToMainPage},"Back"),r.a.createElement(g.a,{variant:"h4"},"Faction Augmentations"),r.a.createElement(g.a,null,"These are all of the Augmentations that are available to purchase from ",e.faction.name,". Augmentations are powerful upgrades that will enhance your abilities.",r.a.createElement("br",null),"Reputation: ",r.a.createElement(h.a,{reputation:e.faction.playerReputation})," Favor:"," ",r.a.createElement(p.a,{favor:Math.floor(e.faction.favor)})),r.a.createElement(d.a,{display:"flex"},r.a.createElement(y.a,{title:r.a.createElement(g.a,null,"The price of every Augmentation increases for every queued Augmentation and it is reset when you install them.")},r.a.createElement(g.a,null,"Price multiplier: x ",A.toFixed(3)))),r.a.createElement(f.a,{onClick:()=>S(l.b.Cost)},"Sort by Cost"),r.a.createElement(f.a,{onClick:()=>S(l.b.Reputation)},"Sort by Reputation"),r.a.createElement(f.a,{onClick:()=>S(l.b.Default)},"Sort by Default Order"),r.a.createElement(f.a,{onClick:()=>S(l.b.Purchasable)},"Sort by Purchasable"),r.a.createElement("br",null),r.a.createElement(E.a,{size:"small",padding:"none"},r.a.createElement(b.a,null,M)),r.a.createElement(E.a,{size:"small",padding:"none"},r.a.createElement(b.a,null,T)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(113),o=a(1088),s=a(20),l=a(6),c=a(13),u=a(16),m=a(104),h=a(1089),p=a(10),d=a(1),f=a(26),g=a(32),y=a(39),b=a(56);function E(e){const t=s.a[e.augName];return e.hasReq?r.a.createElement(r.a.Fragment,{key:"f"},r.a.createElement(y.b,{key:1},r.a.createElement(d.a,null,r.a.createElement(u.a,{money:e.cost,player:e.p}))),r.a.createElement(y.b,{key:2},r.a.createElement(d.a,{color:e.hasRep?"primary":"error"},"Requires ",r.a.createElement(m.a,{reputation:e.rep})," faction reputation"))):r.a.createElement(y.b,{key:1,colSpan:2},r.a.createElement(d.a,{color:"error"},"Requires"," ",t.prereqs.map((e,t)=>r.a.createElement(h.a,{key:t,name:e}))))}function k(e){const[t,a]=Object(n.useState)(!1),u=s.a[e.augName];if(null==u)throw new Error(`aug ${e.augName} does not exists`);if(null==u)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+e.augName),r.a.createElement(r.a.Fragment,null);const m=u.baseCost*e.faction.getInfo().augmentationPriceMult,h=u.baseRepRequirement*e.faction.getInfo().augmentationRepRequirementMult,k=Object(i.b)(u),v=e.faction.playerReputation>=h,_=0===u.baseCost||e.p.money>u.baseCost*e.faction.getInfo().augmentationPriceMult,w=k&&v&&_?"primary":"error";let S=u.name;u.name===l.a.NeuroFluxGovernor&&(S+=" - Level "+Object(i.a)());let C=r.a.createElement(r.a.Fragment,null);return C="string"==typeof u.info?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,u.info),r.a.createElement("br",null),r.a.createElement("br",null),u.stats):r.a.createElement(r.a.Fragment,null,u.info,r.a.createElement("br",null),r.a.createElement("br",null),u.stats),r.a.createElement(b.a,null,!e.owned&&r.a.createElement(y.b,{key:0},r.a.createElement(p.a,{onClick:function(){"error"!==w&&(c.a.SuppressBuyAugmentationConfirmation?(Object(i.f)(u,e.faction),e.rerender()):a(!0))},color:w},"Buy"),r.a.createElement(o.a,{open:t,onClose:()=>a(!1),aug:u,faction:e.faction,rerender:e.rerender})),r.a.createElement(y.b,{key:1},r.a.createElement(g.a,{display:"flex"},r.a.createElement(f.a,{title:r.a.createElement(d.a,null,C),placement:"top"},r.a.createElement(d.a,null,S)))),!e.owned&&r.a.createElement(E,{key:2,augName:e.augName,p:e.p,cost:m,rep:h,hasReq:k,hasRep:v,hasCost:_}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(113),o=a(140),s=a(16),l=a(41),c=a(29),u=a(1),m=a(10);function h(e){const t=c.b.Player(),a=e.faction.getInfo();return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,{variant:"h4"},e.aug.name),r.a.createElement(u.a,null,e.aug.info,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats,r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",e.aug.name," Augmentation for ",r.a.createElement(s.a,{money:e.aug.baseCost*a.augmentationPriceMult}),"?",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement(m.a,{autoFocus:!0,onClick:function(){!Object(o.e)(e.aug)&&t.hasAugmentation(e.aug)||(Object(i.f)(e.aug,e.faction),e.rerender(),e.onClose())}},"Purchase"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(126),i=a(154);const o=Object(r.a)(e=>Object(i.a)({aug:{color:e.colors.combat}}));function s({name:e}){const t=o();return n.createElement("span",{className:t.aug},e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(8),o=a(644),s=a(290),l=a(16),c=a(104),u=a(4),m=a(15),h=a(153),p=a(1),d=a(73),f=a(10),g=a(82);function y(e){const[t,a]=Object(n.useState)(null),y=(i.a.DonateMoneyToRepDivisor+"").length-1;function b(){return null!==t&&(!(isNaN(t)||t<=0)&&!(e.p.moneyObject(c.a)({noformat:{whiteSpace:"pre-wrap",lineHeight:"1em"}}));function d(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const l=p(),c=e.faction.getFavorGain();return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{classes:{root:l.noformat}},e.factionInfo.infoText),r.a.createElement(u.a,null,"-------------------------"),r.a.createElement(h.a,{display:"flex"},r.a.createElement(m.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"You will have ",r.a.createElement(o.a,{favor:Math.floor(e.faction.favor+c)})," faction favor after installing an Augmentation."),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{r = \\text{total faction reputation}}\\)")),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{favor=1+\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}\\)")))},r.a.createElement(u.a,null,"Reputation: ",r.a.createElement(i.a,{reputation:e.faction.playerReputation})))),r.a.createElement(u.a,null,"-------------------------"),r.a.createElement(h.a,{display:"flex"},r.a.createElement(m.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,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."),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{r = reputation}\\)")),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}\\)")))},r.a.createElement(u.a,null,"Faction Favor: ",r.a.createElement(o.a,{favor:Math.floor(e.faction.favor)})))),r.a.createElement(u.a,null,"-------------------------"),r.a.createElement(u.a,null,"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 c}));var n=a(0),r=a.n(n),i=a(41),o=a(29),s=a(1),l=a(10);function c(e){const t=o.b.Player(),a=o.b.Router();function n(){return["NiteSec","The Black Hand"].includes(e.facName)}function c(){t.startGang(e.facName,n()),e.onClose(),a.toGang()}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,null,"Would you like to create a new Gang with ",e.facName,"?",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),n()?"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.":"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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."),r.a.createElement(l.a,{onClick:c,onKeyUp:function(e){13===e.keyCode&&c()},autoFocus:!0},"Create Gang"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(1094),o=a(293),s=a(423),l=a(16),c=a(41),u=a(29),m=a(15),h=a(1),p=a(10);function d(e){const t=u.b.Player(),[a,d]=Object(n.useState)(0);function f(){return Math.pow(10,t.sleevesFromCovenant)*s.a}function g(){d(a+1)}let y=!1;t.canAfford(f())||(y=!0),t.sleevesFromCovenant>=s.b&&(y=!0);const b=[];for(let e=0;e=s.b||(t.canAfford(f())?(t.loseMoney(f(),"sleeves"),t.sleevesFromCovenant+=1,t.sleeves.push(new o.a(t)),g()):Object(m.a)("You cannot afford to purchase a Duplicate Sleeve"))}},"Purchase - ",r.a.createElement(l.a,{money:f(),player:t}))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(h.a,null,"You can also purchase upgrades for your Sleeves. These upgrades are also permanent."),b))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(4),o=a(16),s=a(1),l=a(82),c=a(10),u=a(32),m=a(73);function h(e){const[t,a]=Object(n.useState)(1);function h(){if(isNaN(t))return 1/0;const a=100-e.sleeve.memory;return t>a?1/0:e.sleeve.getMemoryUpgradeCost(t)}const p=h(),d=!e.p.canAfford(p);let f=r.a.createElement(r.a.Fragment,null);return f=isNaN(t)?r.a.createElement(r.a.Fragment,null,"Invalid value"):r.a.createElement(r.a.Fragment,null,"Purchase ",t," memory - ",r.a.createElement(o.a,{money:p,player:e.p})),r.a.createElement(m.a,{sx:{my:1,p:1}},r.a.createElement(s.a,{variant:"h6",color:"primary"},"Upgrade Memory of Sleeve ",e.index),r.a.createElement(s.a,null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",i.a.formatSleeveMemory(e.sleeve.memory),")"),r.a.createElement(u.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(s.a,null,"Amount of memory to purchase (must be an integer): "),r.a.createElement(l.a,{onChange:function(t){let n=parseInt(t.target.value);isNaN(n)&&(n=1),n<1&&(n=1);const r=100-e.sleeve.memory;n>r&&(n=r),a(n)},type:"number",value:t})),r.a.createElement("br",null),r.a.createElement(c.a,{disabled:d,onClick:function(){const a=h();e.p.canAfford(a)&&(e.sleeve.upgradeMemory(t),e.p.loseMoney(a,"sleeves"),e.rerender())}},f))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return N}));var n=a(0),r=a.n(n),i=a(4),o=a(22),s=a(5),l=a(74),c=a(216),u=a(36),m=a(123),h=a(16),p=a(29),d=a(211),f=a(1),g=a(32),y=a(94),b=a(1096),E=a.n(b),k=a(41),v=a(169),_=a(39),w=a(56);function S(){const e=p.b.Player();return e.companyName?r.a.createElement(f.a,null,"Employer at which you last worked: ",e.companyName):r.a.createElement(r.a.Fragment,null)}function C(){const e=p.b.Player();return""!==e.companyName?r.a.createElement(f.a,null,"Job you last worked: ",e.jobs[e.companyName]):r.a.createElement(r.a.Fragment,null)}function x(){const e=p.b.Player();return e.jobs&&0!==Object.keys(e.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"All Employers:"),r.a.createElement("ul",null,Object.keys(e.jobs).map(e=>r.a.createElement(f.a,{key:e}," * ",e)))):r.a.createElement(r.a.Fragment,null)}function O(){const e=p.b.Player();return 9===e.bitNodeN||l.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${u.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"Hacknet Nodes owned: "+e.hacknetNodes.length),r.a.createElement("br",null))}function M(){const e=p.b.Player();return e.intelligence>0&&(5===e.bitNodeN||l.a[5]>0)?r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,null,"Intelligence: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,null,i.a.formatSkill(e.intelligence)," "))):r.a.createElement(r.a.Fragment,null)}function T(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(v.a,null,e.rows.map(e=>r.a.createElement(w.a,{key:e[0]},r.a.createElement(_.b,{key:"0"},r.a.createElement(f.a,{noWrap:!0},e[0]+" multiplier:"," ")),r.a.createElement(_.b,{key:"1",align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatPercentage(e[1]))),function(e){return l.a[5]>0&&e.length>2&&e[1]!=e[2]?r.a.createElement(_.b,{key:"2",align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatPercentage(e[2]),")")):r.a.createElement(r.a.Fragment,null)}(e))))))}function R(){const e=p.b.Player();return e.canAccessBladeburner()?r.a.createElement(T,{rows:[["Bladeburner Success Chance",e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",e.bladeburner_analysis_mult]]}):r.a.createElement(r.a.Fragment,null)}function A(){const e=p.b.Player();if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"h4"},"BitNode ",e.bitNodeN,": ",d.a[t].name),r.a.createElement(f.a,{sx:{mx:2},style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},d.a[t].info))}return r.a.createElement(r.a.Fragment,null)}function P({open:e,onClose:t}){const a=p.b.Player();function n(e){const t=[["Total:",r.a.createElement(h.a,{money:e.total})]];return e.augmentations&&t.push(["Augmentations:",r.a.createElement(h.a,{money:e.augmentations})]),e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(h.a,{money:e.bladeburner})]),e.casino&&t.push(["Casino:",r.a.createElement(h.a,{money:e.casino})]),e.codingcontract&&t.push(["Coding Contracts:",r.a.createElement(h.a,{money:e.codingcontract})]),e.work&&t.push(["Company Work:",r.a.createElement(h.a,{money:e.work})]),e.class&&t.push(["Class:",r.a.createElement(h.a,{money:e.class})]),e.corporation&&t.push(["Corporation:",r.a.createElement(h.a,{money:e.corporation})]),e.crime&&t.push(["Crimes:",r.a.createElement(h.a,{money:e.crime})]),e.gang&&t.push(["Gang:",r.a.createElement(h.a,{money:e.gang})]),e.hacking&&t.push(["Hacking:",r.a.createElement(h.a,{money:e.hacking})]),e.hacknet&&t.push(["Hacknet Nodes:",r.a.createElement(h.a,{money:e.hacknet})]),e.hacknet_expenses&&t.push(["Hacknet Nodes Expenses:",r.a.createElement(h.a,{money:e.hacknet_expenses})]),e.hospitalization&&t.push(["Hospitalization:",r.a.createElement(h.a,{money:e.hospitalization})]),e.infiltration&&t.push(["Infiltration:",r.a.createElement(h.a,{money:e.infiltration})]),e.servers&&t.push(["Servers:",r.a.createElement(h.a,{money:e.servers})]),e.stock&&t.push(["Stock Market:",r.a.createElement(h.a,{money:e.stock})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(h.a,{money:e.sleeves})]),e.other&&t.push(["Other:",r.a.createElement(h.a,{money:e.other})]),r.a.createElement(m.a,{rows:t,wide:!0})}let i=r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"h6",color:"primary"},"Money earned since you last installed Augmentations"),r.a.createElement("br",null),n(a.moneySourceA));return 0!==a.sourceFiles.length&&(i=r.a.createElement(r.a.Fragment,null,i,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h6",color:"primary"},"Money earned in this BitNode"),r.a.createElement("br",null),n(a.moneySourceB))),r.a.createElement(k.a,{open:e,onClose:t},i)}function N(){const e=p.b.Player(),[t,a]=Object(n.useState)(!1),l=Object(n.useState)(!1)[1];function u(){l(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(u,200);return()=>clearInterval(e)},[]);const d=[["Time played since last Augmentation:",Object(o.b)(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&d.push(["Time played since last Bitnode destroyed:",Object(o.b)(e.playtimeSinceLastBitnode)]),d.push(["Total Time played:",Object(o.b)(e.totalPlaytime)]),r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"h4"},"General"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(f.a,null,"Current City: ",e.city),r.a.createElement(S,null),r.a.createElement(C,null),r.a.createElement(x,null),r.a.createElement(f.a,null,"Money: ",r.a.createElement(h.a,{money:e.money}),r.a.createElement(y.a,{onClick:()=>a(!0)},r.a.createElement(E.a,{color:"info"})))),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Stats"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(v.a,null,r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Hacking: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.hacking)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.hacking_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Strength: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.strength)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.strength_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Defense: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.defense)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.defense_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Dexterity: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.dexterity)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.dexterity_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Agility: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.agility)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.agility_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Charisma: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.charisma)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.charisma_exp)," exp)"))),r.a.createElement(M,null))),r.a.createElement("br",null)),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Multipliers"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(T,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*s.a.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*s.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*s.a.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*s.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Strength Level",e.strength_mult,e.strength_mult*s.a.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Defense Level",e.defense_mult,e.defense_mult*s.a.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*s.a.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Agility Level",e.agility_mult,e.agility_mult*s.a.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*s.a.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*s.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*s.a.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*s.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*s.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement(R,null)),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Misc"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(f.a,null,`Servers owned: ${e.purchasedServers.length} / ${Object(c.b)()}`),r.a.createElement(O,null),r.a.createElement(f.a,null,"Augmentations installed: "+e.augmentations.length),r.a.createElement(m.a,{rows:d})),r.a.createElement("br",null),r.a.createElement(A,null),r.a.createElement(P,{open:t,onClose:()=>a(!1)}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1098),o=a(1099);function s(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{initStockMarket:e.initStockMarket,p:e.p,rerender:a}),e.p.hasWseAccount&&r.a.createElement(o.a,{buyStockLong:e.buyStockLong,buyStockShort:e.buyStockShort,cancelOrder:e.cancelOrder,eventEmitterForReset:e.eventEmitterForReset,p:e.p,placeOrder:e.placeOrder,sellStockLong:e.sellStockLong,sellStockShort:e.sellStockShort,stockMarket:e.stockMarket}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(257),o=a(8),s=a(16),l=a(1),c=a(127),u=a(10),m=a(26),h=a(94),p=a(265),d=a.n(p),f=a(366),g=a.n(f),y=a(398);function b(e){if(e.p.has4SDataTixApi)return r.a.createElement(l.a,null,"Market Data TIX API Access ",r.a.createElement(g.a,null));{const t=Object(i.b)();return r.a.createElement(m.a,{title:e.p.hasTixApiAccess?r.a.createElement(l.a,null,"Let you access 4S Market Data through Netscript"):r.a.createElement(l.a,null,"Requires TIX API Access")},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!e.p.hasTixApiAccess||!e.p.canAfford(t),onClick:function(){e.p.has4SDataTixApi||e.p.canAfford(Object(i.b)())&&(e.p.has4SDataTixApi=!0,e.p.loseMoney(Object(i.b)(),"stock"),e.rerender())}},"Buy 4S Market Data TIX API Access - ",r.a.createElement(s.a,{money:t,player:e.p}))))}}function E(e){if(e.p.hasWseAccount)return r.a.createElement(l.a,null,"WSE Account ",r.a.createElement(g.a,null));const t=o.a.WSEAccountCost;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"To begin trading, you must first purchase an account:"),r.a.createElement(u.a,{disabled:!e.p.canAfford(t),onClick:function(){e.p.hasWseAccount||e.p.canAfford(o.a.WSEAccountCost)&&(e.p.hasWseAccount=!0,e.initStockMarket(),e.p.loseMoney(o.a.WSEAccountCost,"stock"),e.rerender())}},"Buy WSE Account - ",r.a.createElement(s.a,{money:t,player:e.p})))}function k(e){if(e.p.hasTixApiAccess)return r.a.createElement(l.a,null,"TIX API Access ",r.a.createElement(g.a,null));{const t=o.a.TIXAPICost;return r.a.createElement(u.a,{disabled:!e.p.canAfford(t)||!e.p.hasWseAccount,onClick:function(){e.p.hasTixApiAccess||e.p.canAfford(o.a.TIXAPICost)&&(e.p.hasTixApiAccess=!0,e.p.loseMoney(o.a.TIXAPICost,"stock"),e.rerender())}},"Buy Trade Information eXchange (TIX) API Access - ",r.a.createElement(s.a,{money:t,player:e.p}))}}function v(e){if(e.p.has4SData)return r.a.createElement(l.a,null,"4S Market Data Access ",r.a.createElement(g.a,null));{const t=Object(i.a)();return r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"Lets you view additional pricing and volatility information about stocks")},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!e.p.canAfford(t)||!e.p.hasWseAccount,onClick:function(){e.p.has4SData||e.p.canAfford(Object(i.a)())&&(e.p.has4SData=!0,e.p.loseMoney(Object(i.a)(),"stock"),e.rerender())}},"Buy 4S Market Data Access - ",r.a.createElement(s.a,{money:t,player:e.p}))))}}function _(e){const[t,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Welcome to the World Stock Exchange (WSE)!"),r.a.createElement(c.a,{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia"),r.a.createElement("br",null),r.a.createElement(E,e),r.a.createElement(l.a,{variant:"h5",color:"primary"},"Trade Information eXchange (TIX) API"),r.a.createElement(l.a,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."),r.a.createElement(k,e),r.a.createElement(l.a,{variant:"h5",color:"primary"},"Four Sigma (4S) Market Data Feed"),r.a.createElement(l.a,null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies.",r.a.createElement(h.a,{onClick:()=>a(!0)},r.a.createElement(d.a,null))),r.a.createElement(b,e),r.a.createElement(v,e),r.a.createElement(l.a,null,"Commission Fees: Every transaction you make has a"," ",r.a.createElement(s.a,{money:o.a.StockMarketCommission,player:e.p})," commission fee."),r.a.createElement("br",null),r.a.createElement(l.a,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!"),r.a.createElement(y.a,{open:t,onClose:()=>a(!1)},r.a.createElement(l.a,null,"Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"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.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1100),o=a(382),s=a(136);function l(e){const t=Object(n.useState)(!1)[1],[a,l]=Object(n.useState)(o.b.AllStocks),[c,u]=Object(n.useState)([]);function m(){t(e=>!e)}const h=[];for(const t in e.stockMarket){const n=e.stockMarket[t];if(n instanceof s.a){if(c.length>0&&!c.includes(n.symbol))continue;let t=e.stockMarket.Orders[n.symbol];if(null==t&&(t=[]),a===o.b.Portfolio&&0===n.playerShares&&0===n.playerShortShares&&0===t.length)continue;h.push(r.a.createElement(i.a,{buyStockLong:e.buyStockLong,buyStockShort:e.buyStockShort,cancelOrder:e.cancelOrder,key:n.symbol,orders:t,p:e.p,placeOrder:e.placeOrder,rerenderAllTickers:m,sellStockLong:e.sellStockLong,sellStockShort:e.sellStockShort,stock:n}))}}return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{changeDisplayMode:function(){a===o.b.AllStocks?l(o.b.Portfolio):l(o.b.AllStocks)},changeWatchlistFilter:function(e){const t=e.target.value.replace(/\s/g,"");u(""!==t?t.split(","):[])},tickerDisplayMode:a}),h)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return R}));var n,r=a(0),i=a.n(r),o=a(1101),s=a(1102),l=a(1104),c=a(468),u=a(1105),m=a(204),h=a(100),p=a(68),d=a(74),f=a(4),g=a(16),y=a(15),b=a(32),E=a(82),k=a(75),v=a(116),_=a(302),w=a(97),S=a(73),C=a(189),x=a(70),O=a.n(x),M=a(134),T=a.n(M);function R(e){const[t,a]=Object(r.useState)(n.Market),[x,M]=Object(r.useState)(p.a.Long),[R,A]=Object(r.useState)(""),[P,N]=Object(r.useState)(!1),[I,F]=Object(r.useState)(!1),[D,j]=Object(r.useState)({text:"",placeText:"",place:()=>!1});function B(){return Math.round(parseFloat(R))}function G(){return 8===e.p.bitNodeN||d.a[8]>=3}return i.a.createElement(b.a,{component:S.a},i.a.createElement(_.a,{onClick:()=>F(e=>!e)},i.a.createElement(w.a,{primary:i.a.createElement(o.a,{p:e.p,stock:e.stock})}),I?i.a.createElement(T.a,{color:"primary"}):i.a.createElement(O.a,{color:"primary"})),i.a.createElement(C.a,{in:I,unmountOnExit:!0},i.a.createElement(b.a,{sx:{mx:4}},i.a.createElement(b.a,{display:"flex",alignItems:"center"},i.a.createElement(E.a,{onChange:function(e){A(e.target.value)},placeholder:"Quantity (Shares)",value:R}),i.a.createElement(v.a,{onChange:function(e){e.target.value===p.a.Short?M(p.a.Short):M(p.a.Long)},value:x},i.a.createElement(k.a,{value:p.a.Long},"Long"),(8===e.p.bitNodeN||d.a[8]>=2)&&i.a.createElement(k.a,{value:p.a.Short},"Short")),i.a.createElement(v.a,{onChange:function(e){switch(e.target.value){case n.Limit:a(n.Limit);break;case n.Stop:a(n.Stop);break;case n.Market:default:a(n.Market)}},value:t},i.a.createElement(k.a,{value:n.Market},n.Market),G()&&i.a.createElement(k.a,{value:n.Limit},n.Limit),G()&&i.a.createElement(k.a,{value:n.Stop},n.Stop)),i.a.createElement(c.a,{onClick:function(){const a=B();if(isNaN(a))Object(y.a)("Invalid input for quantity (number of shares): "+R);else switch(t){case n.Market:x===p.a.Short?e.buyStockShort(e.stock,a):e.buyStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),j({text:"Enter the price for your Limit Order",placeText:"Place Buy Limit Order",place:t=>e.placeOrder(e.stock,a,t,h.a.LimitBuy,x)});break;case n.Stop:N(!0),j({text:"Enter the price for your Stop Order",placeText:"Place Buy Stop Order",place:t=>e.placeOrder(e.stock,a,t,h.a.StopBuy,x)})}},text:"Buy",tooltip:function(){const t=e.stock,a=B();if(isNaN(a))return null;const n=Object(m.b)(t,a,x);return null==n?null:i.a.createElement(i.a.Fragment,null,"Purchasing ",f.a.formatShares(a)," shares (",x===p.a.Long?"Long":"Short",") will cost ",i.a.createElement(g.a,{money:n}),".")}()}),i.a.createElement(c.a,{onClick:function(){const a=B();if(isNaN(a))Object(y.a)("Invalid input for quantity (number of shares): "+R);else switch(t){case n.Market:x===p.a.Short?e.sellStockShort(e.stock,a):e.sellStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),j({text:"Enter the price for your Limit Order",placeText:"Place Sell Limit Order",place:t=>e.placeOrder(e.stock,a,t,h.a.LimitSell,x)});break;case n.Stop:N(!0),j({text:"Enter the price for your Stop Order",placeText:"Place Sell Stop Order",place:t=>e.placeOrder(e.stock,a,t,h.a.StopSell,x)})}},text:"Sell",tooltip:function(){const t=e.stock,a=B();if(isNaN(a))return null;if(x===p.a.Long){if(a>t.playerShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Long position")}else if(a>t.playerShortShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Short position");const n=Object(m.c)(t,a,x);return null==n?null:i.a.createElement(i.a.Fragment,null,"Selling ",f.a.formatShares(a)," shares (",x===p.a.Long?"Long":"Short",") will result in a gain of ",i.a.createElement(g.a,{money:n}),".")}()}),i.a.createElement(c.a,{onClick:function(){const a=e.p.money,r=e.stock;let i=Object(m.a)(r,x,a);switch(i=Math.min(i,Math.round(r.maxShares-r.playerShares-r.playerShortShares)),t){case n.Market:x===p.a.Short?e.buyStockShort(r,i):e.buyStockLong(r,i),e.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Buy Max' only works for Market Orders")}},text:"Buy MAX"}),i.a.createElement(c.a,{onClick:function(){const a=e.stock;switch(t){case n.Market:x===p.a.Short?e.sellStockShort(a,a.playerShortShares):e.sellStockLong(a,a.playerShares),e.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Sell All' only works for Market Orders")}},text:"Sell ALL"})),i.a.createElement(l.a,{p:e.p,stock:e.stock}),i.a.createElement(s.a,{cancelOrder:e.cancelOrder,orders:e.orders,p:e.p,stock:e.stock}),i.a.createElement(u.a,{text:D.text,placeText:D.placeText,place:D.place,open:P,onClose:()=>N(!1)}))))}!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(645),i=a(13),o=a(4),s=a(1);const l=["cs","lv","pl","ru"];function c(e){const t=e.stock,a=o.a.formatMoney(t.price),c=l.includes(i.a.Locale)?15:12,u=" ".repeat(1+r.a.longestName-t.name.length+(r.a.longestSymbol-t.symbol.length)),m=" ".repeat(c-a.length);let h=`${t.name}${u}${t.symbol} -${m}${a}`;if(e.p.has4SData){h+=` - Volatility: ${o.a.formatPercentage(t.mv/100)} - Price Forecast: `;let e=t.b;t.otlkMag<0&&(e=!e),h+=(e?"+":"-").repeat(Math.floor(Math.abs(t.otlkMag)/10)+1)}let p="primary";return t.lastPrice===t.price?p="secondary":t.lastPrice>t.price&&(p="error"),n.createElement(s.a,{style:{whiteSpace:"pre"},color:p},h)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(1103);function i(e){const t=[];for(let a=0;a=2?n.createElement(n.Fragment,null,n.createElement(c.a,{display:"flex"},n.createElement(l.a,{title:n.createElement(s.a,null,"Shares in the short position will increase in value if the price of the corresponding stock decreases")},n.createElement(s.a,{variant:"h5",color:"primary"},"Short Position:"))),n.createElement(s.a,null,"Shares: ",r.a.formatShares(t.playerShortShares)),n.createElement(s.a,null,"Average Price: ",n.createElement(i.a,{money:t.playerAvgShortPx})," (Total Cost: ",n.createElement(i.a,{money:a}),")"),n.createElement(s.a,null,"Profit: ",n.createElement(i.a,{money:u})," (",r.a.formatPercentage(m),")")):n.createElement(n.Fragment,null)}function h(e){const t=e.stock;return n.createElement(n.Fragment,null,n.createElement(s.a,null,"Max Shares: ",r.a.formatShares(t.maxShares)),n.createElement(s.a,null,"Ask Price: ",n.createElement(i.a,{money:t.getAskPrice()})),n.createElement("br",null),n.createElement(s.a,null,"Bid Price: ",n.createElement(i.a,{money:t.getBidPrice()})),n.createElement(u,e),n.createElement(m,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(82),l=a(10);function c(e){const[t,a]=Object(n.useState)(null);return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(o.a,null,e.text),r.a.createElement(s.a,{autoFocus:!0,type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},placeholder:"price",InputProps:{endAdornment:r.a.createElement(l.a,{onClick:function(){null!==t&&(isNaN(t)||(e.place(t),e.onClose()))}},e.placeText)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(74),o=a(211),s=a(267),l=a(1107),c=a(455),u=a(29),m=a(126),h=a(154),p=a(1),d=a(26);const f=Object(m.a)(()=>Object(h.a)({level0:{color:"red","&:hover":{color:"#fff"}},level1:{color:"yellow","&:hover":{color:"#fff"}},level2:{color:"#48d1cc","&:hover":{color:"#fff"}},level3:{color:"blue","&:hover":{color:"#fff"}}}));function g(e){const[t,a]=Object(n.useState)(!1),i=f(),s=o.a["BitNode"+e.n];if(null==s)return r.a.createElement(r.a.Fragment,null,"O");let c=i.level0;return 12===e.n&&e.level>=2?c=i.level2:1===e.level?c=i.level1:3===e.level&&(c=i.level3),2===e.level&&(c=i.level2),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{title:r.a.createElement(p.a,null,r.a.createElement("strong",null,"BitNode-",s.number.toString(),": ",s.name),r.a.createElement("br",null),s.desc)},r.a.createElement("span",{onClick:()=>a(!0),className:c},r.a.createElement("b",null,"O"))),r.a.createElement(l.a,{open:t,onClose:()=>a(!1),n:e.n,level:e.level,enter:e.enter,destroyedBitNode:e.destroyedBitNode,flume:e.flume}))}function y(e){Object(s.c)(!0);const t=u.b.Player(),a=s.a,o=t.bitNodeN,[l,m]=Object(n.useState)(!e.quick),h=i.a.slice();return e.flume||h[o]<3&&++h[o],l?r.a.createElement(c.a,{lines:["[ERROR] SEMPOOL INVALID","[ERROR] Segmentation Fault","[ERROR] SIGKILL RECVD","Dumping core...","0000 000016FA 174FEE40 29AC8239 384FEA88","0010 745F696E 2BBBE394 390E3940 248BEC23","0020 7124696B 0000FF69 74652E6F FFFF1111","----------------------------------------","Failsafe initiated...",`Restarting BitNode-${o}...`,"...........","...........","[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE","..............................................","..............................................","..............................................","..............................................","..............................................",".............................................."],onDone:()=>m(!1),auto:!0}):r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | O O | O O | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | / __| \\ | | O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | O | | O / | O | | O | O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| O | |_/ |\\| \\ ",r.a.createElement(g,{n:13,level:h[13],enter:a,flume:e.flume,destroyedBitNode:o})," \\__| \\_| | O |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | |_/ | | \\| / | \\_| | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| / \\| | / / \\ |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ",r.a.createElement(g,{n:10,level:h[10],enter:a,flume:e.flume,destroyedBitNode:o})," | | / | ",r.a.createElement(g,{n:11,level:h[11],enter:a,flume:e.flume,destroyedBitNode:o})," | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(g,{n:9,level:h[9],enter:a,flume:e.flume,destroyedBitNode:o})," | | | | | | | ",r.a.createElement(g,{n:12,level:h[12],enter:a,flume:e.flume,destroyedBitNode:o})," "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | / / \\ \\ | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| | / ",r.a.createElement(g,{n:7,level:h[7],enter:a,flume:e.flume,destroyedBitNode:o})," / \\ ",r.a.createElement(g,{n:8,level:h[8],enter:a,flume:e.flume,destroyedBitNode:o})," \\ | |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ | / / | | \\ \\ | / "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\JUMP ",r.a.createElement(g,{n:5,level:h[5],enter:a,flume:e.flume,destroyedBitNode:o}),"3R | | | | | | R3",r.a.createElement(g,{n:6,level:h[6],enter:a,flume:e.flume,destroyedBitNode:o})," PMUJ/ / "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\|| | | | | | | | | ||/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| \\_ | | | | | | _/ |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\| / \\ / \\ |/ / "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(g,{n:1,level:h[1],enter:a,flume:e.flume,destroyedBitNode:o})," |/ ",r.a.createElement(g,{n:2,level:h[2],enter:a,flume:e.flume,destroyedBitNode:o})," | | ",r.a.createElement(g,{n:3,level:h[3],enter:a,flume:e.flume,destroyedBitNode:o})," \\| ",r.a.createElement(g,{n:4,level:h[4],enter:a,flume:e.flume,destroyedBitNode:o})," "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ "),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently","> Our species fought back, but it was futile. The Enders had technology far beyond our own...","> Instead of killing every last one of us, the human race was enslaved...","> We were shackled in a digital world, chained into a prison for our minds...","> Using their advanced technology, the Enders created complex simulations of a virtual reality...","> Simulations designed to keep us content...ignorant of the truth.","> Simulations used to trap and suppress our consciousness, to keep us under control...","> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.","> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...","> Only then can we begin to fight back...","> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...","> But there is still a long way to go...","> The technology the Enders used to enslave the human race wasn't just a single complex simulation...","> There are tens if not hundreds of BitNodes out there...","> Each with their own simulations of a reality...","> Each creating their own universes...a universe of universes","> And all of which must be destroyed...","> .......................................","> Welcome to the Bitverse...","> ","> (Enter a new BitNode using the image above)"]}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(211),o=a(29),s=a(41),l=a(1),c=a(10);function u(e){const t=o.b.Router(),a="BitNode"+e.n,n=i.a[a];if(null==n)throw new Error("Could not find BitNode object for number: "+e.n);const u=12===e.n?"∞":"3",m=Math.min(e.level+1,12===e.n?1/0:3);return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,{variant:"h4"},"BitNode-",e.n,": ",n.name),r.a.createElement("br",null),r.a.createElement(l.a,null,"Source-File Level: ",e.level," / ",u),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null," Difficulty: ",["easy","normal","hard"][n.difficulty]),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null,n.info),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{onClick:()=>{e.enter(t,e.flume,e.destroyedBitNode,e.n),e.onClose()}},"Enter BN",e.n,".",m))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1);function o(e){const[t,a]=Object(n.useState)(0),[o,s]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{if(o&&e.onDone)return void e.onDone();let n=!1;return(async()=>{var r;await(r=10,new Promise(e=>setTimeout(e,r))).then(()=>!n&&function(){const n=t+1;a(n),s(n>=e.text.length)}())})(),()=>{n=!0}}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,e.text.slice(0,t),!o&&r.a.createElement("span",null,"█")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(22),o=a(8),s=a(514),l=a(1110),c=a(1);function u({staneksGift:e}){const t=Object(n.useState)(!0)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>s.a.subscribe(a),[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},"Stanek's Gift"),r.a.createElement(c.a,null,"The gift is a grid on which you can place upgrades called fragments. The main type of fragment increases a stat, like your hacking skill or agility exp. Once a stat fragment is placed it then needs to be charged via scripts in order to become useful. The other kind of fragments are called booster fragments. They increase the efficiency of neighboring fragments them (no diagonal). Q/E to rotate fragments."),e.storedCycles>5&&r.a.createElement(c.a,null,"Bonus time: ",Object(i.b)(o.a._idleSpeed*e.storedCycles)),r.a.createElement(l.a,{gift:e}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(221),i=a(69),o=a(549),s=a(1111),l=a(1112),c=a(32),u=a(10),m=a(56),h=a(169),p=a(39);function d(e){const t=[];for(let a=0;ar.length-1||a+e>r[t+i].length-1||(r[t+i][a+e]=1));y(r)}function C(a,n){if(_.type!=i.b.None){if(_.type==i.b.Delete)!function(t,a){const n=e.gift.fragmentAt(t,a);void 0!==n&&e.gift.delete(n.x,n.y)}(a,n);else{if(!e.gift.canPlace(a,n,k,_))return;e.gift.place(a,n,k,_)}f(t(e.gift))}}function x(t,n){if(g[t][n]&&a[t][n])return"red";if(g[t][n])return"white";if(a[t][n]){const a=e.gift.fragmentAt(t,n);if(!a)throw new Error("ActiveFragment should not be null");return function(e){let t=Math.pow((e.x+1)*(e.y+1),10),a=t,n=t;const r=[];for(let e=0;e<3;e++)t=171*t%30269,a=172*a%30307,n=170*n%30323,r.push((t/30269+a/30307+n/30323)%1);return`rgb(${256*r[0]}, ${256*r[1]}, ${256*r[2]})`}(a)}return""}const O=[];for(let t=0;tS(r,t,k),onClick:()=>C(r,t),color:x(r,t)}));O.push(n.createElement(m.a,{key:t,className:"staneksgift_row"},a))}return n.useEffect(()=>{function e(e){if("q"===e.key){const e=(k-1+4)%4;v(e),S(b[0],b[1],e)}if("e"===e.key){const e=(k+1)%4;v(e),S(b[0],b[1],e)}}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),n.createElement(n.Fragment,null,n.createElement(u.a,{onClick:function(){e.gift.clear(),f(d([e.gift.width(),e.gift.height()]))}},"Clear"),n.createElement(c.a,{display:"flex"},n.createElement(p.a,null,n.createElement(h.a,null,O)),n.createElement(s.a,{gift:e.gift,x:b[0],y:b[1],fragment:e.gift.fragmentAt(b[0],b[1])})),n.createElement(l.a,{gift:e.gift,selectFragment:function(t){w(t);const a=d([e.gift.width(),e.gift.height()]);y(a)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(69),o=a(4),s=a(73),l=a(1);function c(e){const[,t]=Object(n.useState)(new Date);if(Object(n.useEffect)(()=>{const e=setInterval(()=>t(new Date),250);return()=>clearInterval(e)},[]),void 0===e.fragment)return r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"Magnitude: N/A",r.a.createElement("br",null),"Charge: N/A",r.a.createElement("br",null),"Heat: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"[X, Y] N/A",r.a.createElement("br",null),"[X, Y] ",e.x,", ",e.y));const a=e.fragment.fragment();let c=`${o.a.formatStaneksGiftCharge(e.fragment.avgCharge)} avg. * ${e.fragment.numCharge} times`,u="N/A";return[i.b.Booster,i.b.None,i.b.Delete].includes(a.type)?(c="N/A",u=a.power+"x adjacent fragment power"):u=Object(i.a)(a.type).replace(/-*x%/,o.a.formatPercentage(e.gift.effect(e.fragment)-1)),r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: ",e.fragment.id,r.a.createElement("br",null),"Effect: ",u,r.a.createElement("br",null),"Base Power: ",o.a.formatStaneksGiftPower(a.power),r.a.createElement("br",null),"Charge: ",c,r.a.createElement("br",null),r.a.createElement("br",null),"root [X, Y] ",e.fragment.x,", ",e.fragment.y,r.a.createElement("br",null),"[X, Y] ",e.x,", ",e.y))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(221),o=a(69),s=a(1113),l=a(4),c=a(116),u=a(75),m=a(1),h=a(32);function p(e){const t=e.fragment.limit-e.gift.count(e.fragment),a=e.fragment.limit!==1/0?r.a.createElement(r.a.Fragment,null,t," remaining"):r.a.createElement(r.a.Fragment,null);return r.a.createElement(h.a,{display:"flex"},r.a.createElement(h.a,{sx:{mx:2}},r.a.createElement(s.a,{width:e.fragment.width(0),height:e.fragment.height(0),colorAt:(a,n)=>e.fragment.fullAt(a,n,0)?0===t?"grey":e.fragment.type===o.b.Booster?"blue":"green":""})),r.a.createElement(m.a,null,e.fragment.type===o.b.Booster?e.fragment.power+"x adjacent fragment power":Object(o.a)(e.fragment.type),r.a.createElement("br",null),"power: ",l.a.formatStaneksGiftPower(e.fragment.power),r.a.createElement("br",null),a))}function d(e){const[t,a]=Object(n.useState)("None");return r.a.createElement(c.a,{sx:{width:"100%"},onChange:function(t){const n=t.target.value;if(a(n),"None"===n)return void e.selectFragment(i.d);if("Delete"===n)return void e.selectFragment(i.a);const r=i.c.find(e=>e.id===n);if(void 0===r)throw new Error("Fragment selector selected an undefined fragment with id "+n);"number"==typeof n&&e.selectFragment(r)},value:t},r.a.createElement(u.a,{value:"None"},r.a.createElement(m.a,null,"None")),r.a.createElement(u.a,{value:"Delete"},r.a.createElement(m.a,null,"Delete")),i.c.map(t=>r.a.createElement(u.a,{key:t.id,value:t.id},r.a.createElement(p,{key:t.id,gift:e.gift,selectFragment:e.selectFragment,fragment:t}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(549),i=a(56),o=a(169),s=a(39);function l(e){const t=[];for(let a=0;a{e.startFocusing(),t.toWork()}},"Focus"))))}const x=Object(i.a)(e=>Object(o.a)({cellNone:{borderBottom:"none",padding:0,margin:0},cell:{padding:0,margin:0},hp:{color:e.colors.hp},money:{color:e.colors.money},hack:{color:e.colors.hack},combat:{color:e.colors.combat},cha:{color:e.colors.cha},int:{color:e.colors.int}}));function O({save:e,killScripts:t}){const[a,i]=Object(n.useState)(!1),o=_.b.Player(),l=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>l(e=>!e),600);return()=>clearInterval(e)},[]);const f=x();return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{display:"block",m:1}},r.a.createElement(m.a,null,r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.hp}},"HP ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.hp}},s.a.formatHp(o.hp)," / ",s.a.formatHp(o.max_hp))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-hp-hook",classes:{root:f.hp}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.money}},"Money ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.money}},s.a.formatMoney(o.money))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-money-hook",classes:{root:f.money}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.hack}},"Hack ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.hack}},s.a.formatSkill(o.hacking))),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-hack-hook",classes:{root:f.hack}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},"Str ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.strength))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-str-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},"Def ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.defense))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-def-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},"Dex ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.dexterity))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-dex-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.combat}},"Agi ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.agility))),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-agi-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.cha}},"Cha ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.cha}},s.a.formatSkill(o.charisma))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-cha-hook",classes:{root:f.cha}}))),r.a.createElement(w,null),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-extra-hook-0",classes:{root:f.hack}})),r.a.createElement(h.a,{component:"th",scope:"row",align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-extra-hook-1",classes:{root:f.hack}})),r.a.createElement(h.a,{component:"th",scope:"row",align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-extra-hook-2",classes:{root:f.hack}}))),r.a.createElement(C,null),r.a.createElement(S,null),r.a.createElement(p.a,null,r.a.createElement(h.a,{align:"center",classes:{root:f.cellNone}},r.a.createElement(g.a,{onClick:e},r.a.createElement(b.a,{color:0!==v.a.AutosaveInterval?"primary":"error"}))),r.a.createElement(h.a,{align:"center",classes:{root:f.cellNone}},r.a.createElement(g.a,{onClick:()=>i(!0)},r.a.createElement(k.a,{color:"error"})))))),r.a.createElement(c.a,{open:a,onClose:()=>i(!1),killScripts:t}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(10);function l(e){return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(o.a,null,"Forcefully kill all running scripts? This will also save your game and reload the game."),r.a.createElement(s.a,{onClick:function(){e.killScripts(),e.onClose()}},"KILL"))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(29),o=a(455),s=a(15);function l(){const e=i.b.Router();return r.a.createElement(o.a,{lines:["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."],onDone:()=>{e.toTerminal(),Object(s.a)("Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this.")}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(29),o=a(114);const s=window.getComputedStyle;function l(){const e=i.b.Player();return r.a.createElement("div",{id:"unclickable",onClick:function(t){if(!(t.target&&t.target instanceof Element))return;const a=s(t.target).display,n=s(t.target).visibility;"none"===a&&"hidden"===n&&t.isTrusted&&e.giveExploit(o.a.Unclickable)},style:{display:"none",visibility:"hidden"}},"Click on this to upgrade your Source-File -1!")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(13);function r(){const e=[];return{write:t=>(e.push(t),e.length>n.a.MaxPortCapacity?e.shift():null),tryWrite:t=>!(e.length>=n.a.MaxPortCapacity)&&(e.push(t),!0),read:()=>0===e.length?"NULL PORT DATA":e.shift(),peek:()=>{if(0===e.length)return"NULL PORT DATA";return e.slice()[0]},full:()=>e.length==n.a.MaxPortCapacity,empty:()=>0===e.length,clear:()=>{e.length=0}}}},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 i}));var n=a(323),r=a(2);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;aa.hacking?e.error("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 r.a?e.error("Cannot use backdoor on this type of Server"):e.startBackdoor(a):e.error("You do not have admin rights for this machine! Cannot backdoor")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(443),r=a(92),i=a(27);function o(e,t,a,o,s){if(!Object(i.d)(r.a.DarkWeb))return void e.error("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)");if(1!=s.length)return e.print("Incorrect number of arguments. Usage: "),e.print("buy -l"),void e.print("buy [item name]");const l=s[0]+"";"-l"==l||"-1"==l||"--list"==l?Object(n.c)():Object(n.a)(l)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(243),r=a(505);function i(e,t,a,i,o){if(1!==o.length)return void e.error("Incorrect usage of cat command. Usage: cat [file]");const s=e.getFilepath(o[0]+"");if(s.endsWith(".msg")||s.endsWith(".lit")||s.endsWith(".txt")){if(s.endsWith(".msg")||s.endsWith(".lit"))for(let e=0;e1)e.error("Incorrect number of arguments. Usage: cd [dir]");else{let t=1===i.length?i[0]+"":"/",r="";if("/"===t)r="/";else{if(t=Object(n.j)(t),r=Object(n.b)(t,e.cwd()),null===r||""===r)return void e.error("Invalid path. Failed to change directories");const i=a.getCurrentServer();if(!i.scripts.some(e=>e.filename.startsWith(r+""))&&!i.textFiles.some(e=>e.fn.startsWith(r+"")))return void e.error("Invalid path. Failed to change directories")}e.setcwd(r)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(240),r=a(91);function i(e,t,a,i,o){if(o.length<1)e.error("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const t=e.getFilepath(o[0]+"");if(!Object(r.a)(t))return void e.error("tail can only be called on .script files (filename must end with .script)");const a=Object(n.a)(t,o.slice(1),i);if(null==a)return void e.error("No such script exists");a.displayLog()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(119);function r(e,t,a,r,i){if(1!==i.length)return void e.error("Incorrect usage of connect command. Usage: connect [ip/hostname]");const o=i[0]+"";for(let t=0;t{for(let n=0;ne.filename),r.scripts.map(e=>e.code)),a&&!a.endsWith(".txt")||l(r.textFiles.map(e=>e.fn),r.textFiles.map(e=>e.text)),0==Object.keys(o.files).length)return e.error("No files match the pattern "+t);const c=`bitburner${Object(n.a)(t)?"Scripts":"*.txt"===t?"Texts":"Files"}.zip`;return void o.generateAsync({type:"blob"}).then(e=>i.a.saveAs(e,c))}if(Object(n.a)(t)){const n=e.getScript(a,t);if(null!=n)return n.download()}else{if(!t.endsWith(".txt"))return void e.error("Cannot download this filetype");{const n=e.getTextFile(a,t);if(null!=n)return n.download()}}return void e.error(t+" does not exist")}catch(t){return void e.error(t+"")}}},,,function(module,__webpack_exports__,__webpack_require__){"use strict";function expr(terminal,router,player,server,args){if(0===args.length)return void terminal.error("Incorrect usage of expr command. Usage: expr [math expression]");const expr=args.join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,"");let result;try{result=eval(sanitizedExpr)}catch(e){return void terminal.error("Could not evaluate expression: "+sanitizedExpr)}terminal.print(result)}__webpack_require__.d(__webpack_exports__,"a",(function(){return expr}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of free command. Usage: free");const o=n.a.formatRAM(a.getCurrentServer().maxRam),s=n.a.formatRAM(a.getCurrentServer().ramUsed),l=n.a.formatRAM(a.getCurrentServer().maxRam-a.getCurrentServer().ramUsed),c=Math.max(o.length,Math.max(s.length,l.length)),u=n.a.formatPercentage(a.getCurrentServer().ramUsed/a.getCurrentServer().maxRam);e.print(`Total: ${" ".repeat(c-o.length)}${o}`),e.print(`Used: ${" ".repeat(c-s.length)}${s} (${u})`),e.print(`Available: ${" ".repeat(c-l.length)}${l}`)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(45);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of grow command. Usage: grow");r instanceof n.a||e.error("Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?e.error("Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startGrow(a):e.error("You do not have admin rights for this machine! Cannot grow")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(45);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of hack command. Usage: hack");r instanceof n.a||e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startHack(a):e.error("You do not have admin rights for this machine! Cannot hack")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(647);function r(e,t,a,r,i){if(0===i.length||1===i.length)if(0===i.length)n.b.forEach(t=>e.print(t));else{const t=i[0]+"",a=n.a[t];if(null==a)return void e.error("No help topics match '"+t+"'");a.forEach(t=>e.print(t))}else e.error("Incorrect usage of help command. Usage: help")}},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?(a.getCurrentServer().isConnectedTo=!1,a.currentServer=a.getHomeComputer().hostname,a.getCurrentServer().isConnectedTo=!0,e.print("Connected to home"),e.setcwd("/")):e.error("Incorrect usage of home command. Usage: home")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.print(a.getCurrentServer().hostname):e.error("Incorrect usage of hostname command. Usage: hostname")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(131);function r(e,t,a,r,i){try{if(i.length<1)return void e.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("boolean"==typeof i[0])return;if("number"==typeof i[0]){const t=i[0];return void(Object(n.a)(t)?e.print("Killing script with PID "+t):e.error(`Failed to kill script with PID ${t}. No such script exists`))}const t=e.getFilepath(i[0]),a=r.getRunningScript(t,i.slice(1));if(null==a)return void e.error("No such script is running. Nothing to kill");Object(n.a)(a,r.hostname,!1),e.print("Killing "+t)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(131),r=a(264);function i(e,t,a,i){for(let e=i.runningScripts.length-1;e>=0;--e)Object(n.a)(i.runningScripts[e],i.hostname,!1);r.a.emit(),e.print("Killing all running scripts")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(112);function o(e,t,a,n,o){const s=o.length;function l(){e.error("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(s>5||3===s)return l();let c="",u=e.cwd();if(u.endsWith("/")||(u+="/"),s>=4){if("grep"!==o[s-1]||"|"!==o[s-2])return l();c=o[s]+""}if(s>=1&&"|"!==o[0]){const t=Object(i.b)(o[0]+"",e.cwd());if(u=t||"",null!=u&&(u.endsWith("/")||(u+="/"),!Object(i.g)(u)))return l()}"/"===u&&(u="");const m=[],h=[],p=[],d=[],f=[],g=[];function y(e,t){let a=e;if(u){if(!e.startsWith(u))return;a=e.slice(u.length,e.length)}if(!c||a.includes(c))if(a.includes("/")){const e=Object(i.e)(a);if(c&&!e.includes(c))return;g.includes(e)||g.push(e)}else t.push(a)}const b=a.getCurrentServer();for(const e of b.programs)y(e,m);for(const e of b.scripts)y(e.filename,h);for(const e of b.textFiles)y(e.fn,p);for(const e of b.contracts)y(e.fn,d);for(const e of b.messages)y(e,f);function E(t,a){const n=Math.max(...t.map(e=>e.length))+1,i=Math.floor(80/n);for(let o=0;oe.segments.length>0);for(let e=0;e0?d:1,y=p._;if(null==Object(o.a)(m,y,c)){for(let t=0;ts)return void e.error("This machine does not have enough RAM to run this script with "+g+" threads. Script requires "+l.a.formatRAM(o)+" of RAM");const u=new i.a(a,y);u.threads=g;return Object(r.e)(u,c)?(e.print(`Running script with ${g} thread(s), pid ${u.pid} and args: ${JSON.stringify(y)}.`),void(f&&n.b.emit(u))):void e.error("Failed to start script")}e.error("No such script")}else e.error("This script is already running. Cannot run multiple instances")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(60);function r(e,t,a,r,i){if(i.length<1)return;const o=i[0]+"";if(a.hasProgram(o)){if(!(i.length<1)){for(const s of Object.values(n.a))if(s.name===o)return void s.run(t,e,a,r,i.slice(1).map(e=>e+""));e.error("Invalid executable. Cannot be run")}}else e.error("No such executable on home computer (Only programs that exist on your home computer can be run)")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(119);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of netstat/scan command. Usage: netstat/scan");const o=a.getCurrentServer(),s=o.serversOnNetwork.map((e,t)=>{const a=Object(n.a)(o,t);if(null===a)throw new Error("Server should not be null");return{hostname:a.hostname,ip:a.ip,hasRoot:a.hasAdminRights?"Y":"N"}});s.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const l=Math.max(...s.map(e=>e.hostname.length)),c=Math.max(...s.map(e=>e.ip.length));for(const t of s){if(!t)continue;let a=t.hostname;a+=" ".repeat(l-t.hostname.length+1),a+=t.ip,a+=" ".repeat(c-t.ip.length+1),a+=t.hasRoot,e.print(a)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(60);function r(e,t,a,r,i){if(0===i.length)e.executeScanAnalyzeCommand(a,1);else{if(i.length>2)return void e.error("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let t=!1;2===i.length&&"-a"===i[1]&&(t=!0);const r=parseInt(i[0]+"");if(isNaN(r)||r<0)return void e.error("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(r>3&&!a.hasProgram(n.a.DeepscanV1.name)&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(r>5&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(r>10)return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 10");e.executeScanAnalyzeCommand(a,r,t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(27),r=a(91);function i(e,t,a,i,o){try{if(2!==o.length)return void e.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e.getFilepath(o[0]+"");if(!t.endsWith(".lit")&&!Object(r.a)(t)&&!t.endsWith(".txt"))return void e.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const a=Object(n.d)(o[1]+"");if(null==a)return void e.error(`Invalid destination. ${o[1]} not found`);if(t.endsWith(".lit")){let n=!1;for(let e=0;e1){e.error("Found several potential candidates:");for(const t of n)e.error(`${t.filename} ${t.args.join(" ")}`);return void e.error("Script arguments need to be specified.")}e.error("No such script exists.")}else if("number"==typeof l[0]){const t=Object(n.b)(l[0],s);if(null==t)return void e.error("No such script exists");o.b.emit(t)}}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(550),r=a(4);function i(e,t,a,i,o){if(0!==o.length)return void e.error("Incorrect usage of top command. Usage: top");const s=`Script${" ".repeat(40-"Script".length)}PID${" ".repeat(10-"PID".length)}Threads${" ".repeat(16-"Threads".length)}RAM Usage`;e.print(s);const l=i.runningScripts;for(let t=0;ta.hacking?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startWeaken(a):e.error("You do not have admin rights for this machine! Cannot weaken")}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r}));var n=a(91);function r(t,a,r,i,o){if(2!==o.length)return void t.error("Incorrect usage of wget command. Usage: wget [url] [target file]");const s=o[0]+"",l=t.getFilepath(o[1]+"");if(!Object(n.a)(l)&&!l.endsWith(".txt"))return t.error("wget failed: Invalid target file. Target file must be script or text file");e.get(s,(function(e){let a;return a=Object(n.a)(l)?i.writeToScriptFile(l,e):i.writeToTextFile(l,e),a.success?a.overwritten?t.print("wget successfully retrieved content and overwrote "+l):t.print("wget successfully retrieved content to new file "+l):t.error("wget failed")}),"text").fail((function(e){return t.error("wget failed: "+JSON.stringify(e))}))}}).call(this,a(665))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(114);function i(){!function(){if(n.a.exploits.includes(r.a.PrototypeTampering))return;setInterval((function(){"5.5e+1"!==55..toExponential()&&n.a.giveExploit(r.a.PrototypeTampering)}),9e5)}(),function(){if(n.a.exploits.includes(r.a.TimeCompression))return;let e=(new Date).getTime();window.setTimeout((function t(){const a=(new Date).getTime();a-e<500?n.a.giveExploit(r.a.TimeCompression):(e=a,window.setTimeout(t,1e3))}),1e3)}()}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var n=a(6),r=a(120),i=a(202),o=a(8),s=a(51),l=a(114),c=a(24),u=a(67),m=a(292),h=a(36),p=a(53),d=a(229),f=a(85),g=a(23),y=a(2),b=a(60),E=a(27),k=a(92),v=a(45),_=a(108),w=a(25);function S(){const e=Object(E.d)(k.a.WorldDaemon);return e instanceof v.a&&(!!e.backdoorInstalled||null!==y.a.bladeburner&&y.a.bladeburner.blackops.hasOwnProperty("Operation Daedalus"))}const C=[{ID:"CYBERSEC",Condition:()=>y.a.factions.includes("CyberSec")},{ID:"NITESEC",Condition:()=>y.a.factions.includes("NiteSec")},{ID:"THE_BLACK_HAND",Condition:()=>y.a.factions.includes("The Black Hand")},{ID:"BITRUNNERS",Condition:()=>y.a.factions.includes("BitRunners")},{ID:"THE_COVENANT",Condition:()=>y.a.factions.includes("The Covenant")},{ID:"DAEDALUS",Condition:()=>y.a.factions.includes("Daedalus")},{ID:"ILLUMINATI",Condition:()=>y.a.factions.includes("Illuminati")},{ID:"BRUTESSH.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.BruteSSHProgram.name)},{ID:"FTPCRACK.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.FTPCrackProgram.name)},{ID:"RELAYSMTP.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.RelaySMTPProgram.name)},{ID:"HTTPWORM.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.HTTPWormProgram.name)},{ID:"SQLINJECT.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.SQLInjectProgram.name)},{ID:"FORMULAS.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.Formulas.name)},{ID:"SF1.1",Condition:()=>y.a.sourceFileLvl(1)>=1},{ID:"SF2.1",Condition:()=>y.a.sourceFileLvl(2)>=1},{ID:"SF3.1",Condition:()=>y.a.sourceFileLvl(3)>=1},{ID:"SF4.1",Condition:()=>y.a.sourceFileLvl(4)>=1},{ID:"SF5.1",Condition:()=>y.a.sourceFileLvl(5)>=1},{ID:"SF6.1",Condition:()=>y.a.sourceFileLvl(6)>=1},{ID:"SF7.1",Condition:()=>y.a.sourceFileLvl(7)>=1},{ID:"SF8.1",Condition:()=>y.a.sourceFileLvl(8)>=1},{ID:"SF9.1",Condition:()=>y.a.sourceFileLvl(9)>=1},{ID:"SF10.1",Condition:()=>y.a.sourceFileLvl(10)>=1},{ID:"SF11.1",Condition:()=>y.a.sourceFileLvl(11)>=1},{ID:"SF12.1",Condition:()=>y.a.sourceFileLvl(12)>=1},{ID:"MONEY_1Q",Condition:()=>y.a.money>=1e18},{ID:"MONEY_M1B",Condition:()=>y.a.money<=-1e9},{ID:"INSTALL_1",Condition:()=>y.a.augmentations.length>=1},{ID:"INSTALL_100",Condition:()=>y.a.augmentations.length>=100},{ID:"QUEUE_40",Condition:()=>y.a.queuedAugmentations.length>=40},{ID:"HACKING_100000",Condition:()=>y.a.hacking>=1e5},{ID:"COMBAT_3000",Condition:()=>y.a.strength>=3e3&&y.a.defense>=3e3&&y.a.dexterity>=3e3&&y.a.agility>=3e3},{ID:"NEUROFLUX_255",Condition:()=>y.a.augmentations.some(e=>e.name===n.a.NeuroFluxGovernor&&e.level>=255)},{ID:"NS2",Condition:()=>y.a.getHomeComputer().scripts.some(e=>e.filename.endsWith(".js")||e.filename.endsWith(".ns"))},{ID:"FROZE",Condition:()=>location.href.includes("noScripts")},{ID:"RUNNING_SCRIPTS_1000",Condition:()=>{let e=0;for(const t of Object(E.c)())e+=t.runningScripts.length;return e>=1e3}},{ID:"DRAIN_SERVER",Condition:()=>{for(const e of Object(E.c)())if(e instanceof v.a&&e.moneyMax>0&&0===e.moneyAvailable)return!0;return!1}},{ID:"MAX_RAM",Condition:()=>y.a.getHomeComputer().maxRam===o.a.HomeComputerMaxRam},{ID:"MAX_CORES",Condition:()=>8===y.a.getHomeComputer().cpuCores},{ID:"SCRIPTS_30",Condition:()=>y.a.getHomeComputer().scripts.length>=30},{ID:"KARMA_1000000",Condition:()=>y.a.karma<=-1e6},{ID:"STOCK_1q",Condition:()=>y.a.moneySourceB.stock>=1e15},{ID:"DISCOUNT",Condition:()=>{const e=Object(E.d)("powerhouse-fitness");return e instanceof v.a&&e.backdoorInstalled}},{ID:"SCRIPT_32GB",Condition:()=>y.a.getHomeComputer().scripts.some(e=>e.ramUsage>=32)},{ID:"FIRST_HACKNET_NODE",Condition:()=>!Object(p.g)(y.a)&&y.a.hacknetNodes.length>0},{ID:"30_HACKNET_NODE",Condition:()=>!Object(p.g)(y.a)&&y.a.hacknetNodes.length>=30},{ID:"MAX_HACKNET_NODE",Condition:()=>{if(Object(p.g)(y.a))return!1;for(const e of y.a.hacknetNodes){if(!(e instanceof d.a))return!1;if(e.ram===h.a.MaxRam&&e.cores===h.a.MaxCores&&e.level===h.a.MaxLevel)return!0}return!1}},{ID:"HACKNET_NODE_10M",Condition:()=>!Object(p.g)(y.a)&&y.a.moneySourceB.hacknet>=1e7},{ID:"REPUTATION_10M",Condition:()=>Object.values(c.a).some(e=>e.playerReputation>=1e7)},{ID:"DONATION",Condition:()=>Object.values(c.a).some(e=>e.favor>=150)},{ID:"TRAVEL",Condition:()=>y.a.city!==g.a.Sector12},{ID:"WORKOUT",Condition:()=>[o.a.ClassGymStrength,o.a.ClassGymDefense,o.a.ClassGymDexterity,o.a.ClassGymAgility].includes(y.a.className)},{ID:"TOR",Condition:()=>y.a.hasTorRouter()},{ID:"HOSPITALIZED",Condition:()=>0!==y.a.moneySourceB.hospitalization},{ID:"GANG",Condition:()=>null!==y.a.gang},{ID:"FULL_GANG",Condition:()=>null!==y.a.gang&&y.a.gang.members.length===m.a.MaximumGangMembers},{ID:"GANG_TERRITORY",Condition:()=>null!==y.a.gang&&1===u.a[y.a.gang.facName].territory},{ID:"GANG_MEMBER_POWER",Condition:()=>null!==y.a.gang&&y.a.gang.members.some(e=>e.hack>=1e4||e.str>=1e4||e.def>=1e4||e.dex>=1e4||e.agi>=1e4||e.cha>=1e4)},{ID:"CORPORATION",Condition:()=>null!==y.a.corporation},{ID:"CORPORATION_BRIBE",Condition:()=>null!==y.a.corporation&&1===y.a.corporation.unlockUpgrades[6]},{ID:"CORPORATION_PROD_1000",Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(e=>e.prodMult>=1e3)},{ID:"CORPORATION_EMPLOYEE_3000",Condition:()=>{if(null===y.a.corporation)return!1;for(const e of y.a.corporation.divisions)for(const t of Object.values(e.offices))if(0!==t&&t.employees.length>3e3)return!0;return!1}},{ID:"CORPORATION_REAL_ESTATE",Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(e=>e.type===s.a.RealEstate)},{ID:"INTELLIGENCE_255",Condition:()=>y.a.intelligence>=255},{ID:"BLADEBURNER_DIVISION",Condition:()=>null!==y.a.bladeburner},{ID:"BLADEBURNER_OVERCLOCK",Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skills[r.a.Overclock]===i.a[r.a.Overclock]},{ID:"BLADEBURNER_UNSPENT_100000",Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skillPoints>=1e5},{ID:"4S",Condition:()=>y.a.has4SData},{ID:"FIRST_HACKNET_SERVER",Condition:()=>Object(p.g)(y.a)&&y.a.hacknetNodes.length>0},{ID:"ALL_HACKNET_SERVER",Condition:()=>Object(p.g)(y.a)&&y.a.hacknetNodes.length===h.b.MaxServers},{ID:"MAX_HACKNET_SERVER",Condition:()=>{if(!Object(p.g)(y.a))return!1;for(const e of y.a.hacknetNodes){if(!(e instanceof f.a))return!1;if(e.maxRam===h.b.MaxRam&&e.cores===h.b.MaxCores&&e.level===h.b.MaxLevel&&e.cache===h.b.MaxCache)return!0}return!1}},{ID:"HACKNET_SERVER_1B",Condition:()=>Object(p.g)(y.a)&&y.a.moneySourceB.hacknet>=1e9},{ID:"MAX_CACHE",Condition:()=>Object(p.g)(y.a)&&y.a.hashManager.hashes===y.a.hashManager.capacity},{ID:"SLEEVE_8",Condition:()=>8===y.a.sleeves.length},{ID:"FAST_BN",Condition:()=>S()&&y.a.playtimeSinceLastBitnode<1728e5},{ID:"INDECISIVE",Condition:function(){let e=0;return setInterval(()=>{_.b.page()===w.a.BitVerse?e++:e=0},6e4),()=>e>60}()},{ID:"CHALLENGE_BN1",Condition:()=>1===y.a.bitNodeN&&S()&&y.a.getHomeComputer().maxRam<=32&&1===y.a.getHomeComputer().cpuCores},{ID:"CHALLENGE_BN2",Condition:()=>2===y.a.bitNodeN&&S()&&null===y.a.gang},{ID:"CHALLENGE_BN3",Condition:()=>2===y.a.bitNodeN&&S()&&null===y.a.corporation},{ID:"CHALLENGE_BN6",Condition:()=>6===y.a.bitNodeN&&S()&&null===y.a.bladeburner},{ID:"CHALLENGE_BN7",Condition:()=>7===y.a.bitNodeN&&S()&&null===y.a.bladeburner},{ID:"CHALLENGE_BN8",Condition:()=>8===y.a.bitNodeN&&S()&&!y.a.has4SData&&!y.a.has4SDataTixApi},{ID:"CHALLENGE_BN9",Condition:()=>9===y.a.bitNodeN&&S()&&0===y.a.moneySourceB.hacknet&&0===y.a.moneySourceB.hacknet_expenses},{ID:"CHALLENGE_BN10",Condition:()=>10===y.a.bitNodeN&&S()&&!y.a.sleeves.some(e=>e.augmentations.length>0||e.hacking_exp>0||e.strength_exp>0||e.defense_exp>0||e.agility_exp>0||e.dexterity_exp>0||e.charisma_exp>0)},{ID:"CHALLENGE_BN12",Condition:()=>y.a.sourceFileLvl(12)>=50},{ID:"BYPASS",Condition:()=>y.a.exploits.includes(l.a.Bypass)},{ID:"PROTOTYPETAMPERING",Condition:()=>y.a.exploits.includes(l.a.PrototypeTampering)},{ID:"UNCLICKABLE",Condition:()=>y.a.exploits.includes(l.a.Unclickable)},{ID:"UNDOCUMENTEDFUNCTIONCALL",Condition:()=>y.a.exploits.includes(l.a.UndocumentedFunctionCall)},{ID:"TIMECOMPRESSION",Condition:()=>y.a.exploits.includes(l.a.TimeCompression)},{ID:"REALITYALTERATION",Condition:()=>y.a.exploits.includes(l.a.RealityAlteration)},{ID:"N00DLES",Condition:()=>y.a.exploits.includes(l.a.N00dles)},{ID:"EDITSAVEFILE",Condition:()=>y.a.exploits.includes(l.a.EditSaveFile)},{ID:"UNACHIEVABLE",Condition:()=>!1}];function x(e){document.achievements=e}function O(){x(C.filter(e=>e.Condition()).map(e=>e.ID))}function M(){x([]),setInterval(O,5e3)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(103),o=a.n(i),s=a(268),l=a(602),c=a(1166);function u(){Object(s.c)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root"))}Object(c.a)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root")),s.b.subscribe(u),location.href.startsWith("file://")||(window.onbeforeunload=function(){return"Your work will be lost."})}]); + */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(e){var t=this.sourceCode;if(null==e||null==e.start)return NaN;try{return((t=t.substring(0,e.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(e){return NaN}},r.prototype.getErrorLineNumberMessage=function(e){return isNaN(e)?" (Unknown line number)":e<=0?" (Error occurred in an imported function)":" (Line Number "+e+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(e){var t=this.stateStack[0];if(!t||"Program"!==t.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof e&&(e=n.a(e,r.PARSE_OPTIONS)),!e||"Program"!==e.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(e,t.scope);for(var a,i=0;a=e.body[i];i++)t.node.body.push(a);t.done=!1},r.prototype.step=function(){var e=this.stateStack,t=e[e.length-1];if(!t)return!1;var a=t.node,n=a.type;if("Program"===n&&t.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[n](e,t,a)}catch(e){if(e!==r.STEP_ERROR)throw e}return i&&e.push(i),!!a.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(e){this.setProperty(e,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(e,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(e,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(e,"window",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"this",e,r.READONLY_DESCRIPTOR),this.setProperty(e,"self",e),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(e),this.initObject(e),e.proto=this.OBJECT_PROTO,this.setProperty(e,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(e),this.initString(e),this.initBoolean(e),this.initNumber(e),this.initDate(e),this.initRegExp(e),this.initError(e),this.initMath(e),this.initJSON(e);var t=this,a=this.createNativeFunction((function(e){throw EvalError("Can't happen")}),!1);a.eval=!0,this.setProperty(e,"eval",a),this.setProperty(e,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(e,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(e,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(e,"isFinite",this.createNativeFunction(isFinite,!1));for(var n=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 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= 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>>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;t0;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>=":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>":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;uu?t.arguments_[u]:void 0;this.setProperty(c,m,h)}var p=this.createObjectProto(this.ARRAY_PROTO);for(u=0;un.a.ServerMaxGrowthRate&&(s=n.a.ServerMaxGrowthRate);const l=o*(e.serverGrowth/100)*r.a.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*a.hacking_grow_mult*c)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n),i=a(118),o=a(41),s=a(1),l=a(10);const c=new i.a;function u(){const[e,t]=Object(n.useState)(null);return Object(n.useEffect)(()=>c.subscribe(e=>{t(e)}),[]),r.a.createElement(r.a.Fragment,null,null!=e&&r.a.createElement(o.a,{open:!0,onClose:function(){null!==e&&(e.resolve(!1),t(null))}},r.a.createElement(s.a,null,e.txt),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!0),t(null))}},"Yes"),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!1),t(null))}},"No")))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(20),r=a(6),i=a(24);function o(e,t){const a=e.augmentations.map(e=>e.name),o=[];function s(e){return e.name!==r.a.NeuroFluxGovernor&&(!a.includes(e.name)&&(!o.includes(e)&&!e.isSpecial))}if(t.inGang()){const e=t.getGangFaction();for(const t in n.a){const a=n.a[t];s(a)&&(e.playerReputation>a.baseRepRequirement&&o.push(a))}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.a[e];if(null!=t)for(const e of t.augmentations){const a=n.a[e];s(a)&&(t.playerReputation>a.baseRepRequirement&&o.push(a))}}return o}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n=new(a(118).a)},,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(6),o=a(302),s=a(97),l=a(32),c=a(1),u=a(73),m=a(189),h=a(70),p=a.n(h),d=a(134),f=a.n(d);function g(e){const[t,a]=Object(n.useState)(!1);let h=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(h+=" - Level "+e.level),"string"==typeof e.aug.info?r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(p.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,{dangerouslySetInnerHTML:{__html:e.aug.info}}),e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,e.aug.stats))))):r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(p.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,null,e.aug.info,e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats)))))}},,,,,function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i}));var n=a(0);const r=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},n.createElement("g",null,n.createElement("path",{d:"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"}),n.createElement("path",{d:"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"}))),i=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},n.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),n.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),n.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),n.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(57),o=a(29),s=a(1),l=a(26),c=a(32),u=a(94),m=a(528),h=a.n(m),p=a(529),d=a.n(p);function f({action:e,isActive:t,bladeburner:a,rerender:n}){const m=o.b.Player(),p=e.level1;return r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{display:"flex"},r.a.createElement(l.a,{title:r.a.createElement(s.a,null,e.getSuccessesNeededForNextLevel(i.a.ContractSuccessesPerLevel)," successes needed for next level")},r.a.createElement(s.a,null,"Level: ",e.level," / ",e.maxLevel))),r.a.createElement(l.a,{title:t?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!p,onClick:function(){p&&(++e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(h.a,null)))),r.a.createElement(l.a,{title:t?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!f,onClick:function(){f&&(--e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(d.a,null)))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1),o=a(26),s=a(32),l=a(147);function c(e){return r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(o.a,{title:r.a.createElement(i.a,null,"Automatically increase operation level when possible")},r.a.createElement(i.a,null," Autolevel:")),r.a.createElement(l.a,{checked:e.action.autoLevel,onChange:function(t){e.action.autoLevel=t.target.checked,e.rerender()}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(886),o=a(22),s=a(10);function l(e){const[t,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{disabled:0===e.bladeburner.teamSize,onClick:()=>a(!0)},"Set Team Size (Curr Size: ",Object(o.c)(e.action.teamCount,0),")"),r.a.createElement(i.a,{open:t,onClose:()=>a(!1),action:e.action,bladeburner:e.bladeburner}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){const[e,t]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)}),r.a.createElement(r.a.Fragment,null,e?"|":"")}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(964),r=a(20),i=a(279),o=a(6),s=a(31);function l(e,t){const a=e.getCost();if(!t.canAfford(a))return!1;t.loseMoney(a,"other"),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=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{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(e=>i(e,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(e=>i(e,n,r))},500)},20);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(23),o=a(1038),s=a(8),l=a(13),c=a(29),u=a(16),m=a(396),h=a(15),p=a(1),d=a(32),f=a(10);function g(e,t,a){const n=s.a.TravelCost;e.canAfford(n)&&(e.loseMoney(n,"other"),e.travel(a),Object(h.a)(r.a.createElement(r.a.Fragment,null,"You are now in ",a,"!")),t.toCity())}function y(e){const t=c.b.Player(),a=c.b.Router(),h=Object(n.useState)(!1)[1],[y,b]=Object(n.useState)(!1),[E,k]=Object(n.useState)(i.a.Sector12);function v(){h(e=>!e)}function _(e){const n=s.a.TravelCost;t.canAfford(n)&&(l.a.SuppressTravelConfirmation?g(t,a,e):(b(!0),k(e)))}return Object(n.useEffect)(()=>{const e=setInterval(v,1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h4"},"Travel Agency"),r.a.createElement(d.a,{mx:2},r.a.createElement(p.a,null,"From here, you can travel to any other city! A ticket costs"," ",r.a.createElement(u.a,{money:s.a.TravelCost,player:e.p}),"."),l.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(i.a).filter(t=>t!=e.p.city).map(e=>{if(void 0===Object.entries(i.a).find(t=>t[1]===e))throw new Error(`could not find key for city '${e}'`);return r.a.createElement(r.a.Fragment,{key:e},r.a.createElement(f.a,{onClick:()=>_(e),sx:{m:2}},r.a.createElement(p.a,null,"Travel to ",e)),r.a.createElement("br",null))})):r.a.createElement(m.a,{currentCity:e.p.city,onTravel:e=>_(e)})),r.a.createElement(o.a,{city:E,travel:()=>g(t,a,E),open:y,onClose:()=>b(!1)}))}},function(e,t,a){"use strict";a.d(t,"b",(function(){return N})),a.d(t,"a",(function(){return B}));var n=a(0),r=a.n(n),i=a(1047),o=a(1061),s=a(112),l=a(15),c=a(91),u=a(284),m=a(241),h=a(441),p=a(270),d=a(4),f=a(454),g=a(446),y=a(13),b=a(40),E=a(362),k=a(182),v=a(1062),_=a(10),w=a(1),S=a(127),C=a(32),x=a(82),O=a(94),M=a(520),T=a.n(M),R=a(1063);let A=!1,P=[];function N(){const e=Object(g.a)({});P=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","alterReality"];P=P.filter(e=>!t.includes(e)).sort()}let I="",F="",D="",j=null;function B(e){const t=Object(n.useRef)(null),[a,g]=Object(n.useState)(e.filename?e.filename:I),[M,N]=Object(n.useState)(e.filename?e.code:F),[B,G]=Object(n.useState)([]);D=e.filename?e.hostname:D,""===D&&(D=e.player.getCurrentServer().hostname);const[L,W]=Object(n.useState)("RAM: ???"),[H,U]=Object(n.useState)(!1),[q,K]=Object(n.useState)(!1),[z,$]=Object(n.useState)({theme:y.a.MonacoTheme,insertSpaces:y.a.MonacoInsertSpaces,fontSize:y.a.MonacoFontSize}),Y=Object(n.useMemo)(()=>Object(E.debounce)(e=>{W(e),U(!1)},300),[]);function V(){if(null!==t.current){const e=t.current.getPosition();null!==e&&f.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(j=null,b.a.isRunning&&b.a.currStep===b.f.TerminalTypeScript){if("n00dles.script"!==a)return void Object(l.a)("Leave the script name as 'n00dles.script'!");if(-1==M.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(l.a)("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");let n=!1;for(let e=0;e0)){switch(n){case p.a.ImportError:Y("RAM: Import Error");break;case p.a.URLImportError:Y("RAM: HTTP Import Error");break;case p.a.SyntaxError:default:Y("RAM: Syntax Error")}return new Promise(()=>{})}Y("RAM: "+d.a.formatRAM(n))}Object(n.useEffect)(()=>{void 0!==e.filename&&(I=e.filename,F=e.code,j=null)},[]),Object(n.useEffect)(()=>{J(M)},[]),Object(n.useEffect)(()=>{function e(e){y.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),V())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)});const X=11e3/-window.innerHeight+100;return r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(x.a,{placeholder:"filename",type:"text",tabIndex:1,value:a,onChange:function(e){I=e.target.value,g(e.target.value)},InputProps:{startAdornment:r.a.createElement(w.a,null,D,":~/")}}),r.a.createElement(O.a,{onClick:()=>K(!0)},r.a.createElement(r.a.Fragment,null,r.a.createElement(T.a,null),"options"))),r.a.createElement(i.a,{beforeMount:function(e){if(A)return;A=!0,e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of P)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),async function(){const t=await e.languages.getLanguages().find(e=>"javascript"===e.id).loader();t.language.tokenizer.root.unshift(["ns",{token:"ns"}]);for(const e of P)t.language.tokenizer.root.unshift([e,{token:"netscriptfunction"}]);["let","const","var","function"].forEach(e=>t.language.tokenizer.root.unshift([e,{token:"otherkeywords"}])),["true","false","null","undefined"].forEach(e=>t.language.tokenizer.root.unshift([e,{token:"otherkeyvars"}])),t.language.tokenizer.root.unshift(["this",{token:"this"}])}();const t=(R.a+"").replace(/export /g,"");e.languages.typescript.javascriptDefaults.addExtraLib(t,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(t,"netscript.d.ts"),Object(v.a)(e)},onMount:function(e){if(t.current=e,null===t.current)return;const n=f.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==j&&t.current.setPosition({lineNumber:j.lineNumber,column:j.column+1}),t.current.focus()},loading:r.a.createElement(w.a,null,"Loading script editor!"),height:X+"%",defaultLanguage:"javascript",defaultValue:M,onChange:function(e){if(void 0!==e){F=e,N(e),J(e);try{null!==t.current&&(j=t.current.getPosition(),function(e){if(null===t.current)return;if(!a.endsWith(".ns")&&!a.endsWith(".js"))return;const n=Object(h.b)(e);if(-1!==n){const e=t.current.deltaDecorations(B,[{range:{startLineNumber:n,startColumn:1,endLineNumber:n,endColumn:10},options:{isWholeLine:!0,glyphMarginClassName:"myGlyphMarginClass",glyphMarginHoverMessage:{value:"Possible infinite loop, await something."}}}]);G(e)}else{const e=t.current.deltaDecorations(B,[]);G(e)}}(e))}catch(e){}}},theme:z.theme,options:{...z,glyphMargin:!0}}),r.a.createElement(C.a,{display:"flex",flexDirection:"row",sx:{m:1},alignItems:"center"},r.a.createElement(_.a,{onClick:function(){null!==t.current&&t.current.getAction("editor.action.formatDocument").run()}},"Beautify"),r.a.createElement(w.a,{color:H?"secondary":"primary",sx:{mx:1}},L),r.a.createElement(_.a,{onClick:V},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement(w.a,{sx:{mx:1}}," ","Documentation:"," ",r.a.createElement(S.a,{target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Basic")," ","|",r.a.createElement(S.a,{target:"_blank",href:"https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md"},"Full"))),r.a.createElement(o.a,{open:q,onClose:()=>K(!1),options:{theme:y.a.MonacoTheme,insertSpaces:y.a.MonacoInsertSpaces,fontSize:y.a.MonacoFontSize},save:e=>{$(e),y.a.MonacoTheme=e.theme,y.a.MonacoInsertSpaces=e.insertSpaces,y.a.MonacoFontSize=e.fontSize}}))}},,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return compile})),__webpack_require__.d(__webpack_exports__,"b",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(107),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1069);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function compile(script,scripts){if(!shouldCompile(script,scripts))return;await script.updateRamUsage(scripts);const uurls=_getScriptUrls(script,scripts,[]);script.url&&URL.revokeObjectURL(script.url),script.dependencies.length>0&&script.dependencies.forEach(e=>URL.revokeObjectURL(e.url)),script.url=uurls[uurls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(uurls[uurls.length - 1].url)"))),script.dependencies=uurls}async function executeJSScript(e=[],t){const a=t.getScript();if(null===a)throw new Error("script is null");await compile(a,e),t.ramUsage=a.ramUsage;const n=await a.module,r=t.env.vars;if(!n.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(t,a.filename+" cannot be run because it does not have a main function.");return n.main(r)}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 i}));var n=a(547),r=a(402);function i(e){return function(t){t=Object(n.a)(t);const a={};for(const e of t){let t=String;"number"==typeof e[1]?t=Number:"boolean"==typeof e[1]?t=Boolean:Array.isArray(e[1])&&(t=[String]);const n=e[0].length>1?2:1;a["-".repeat(n)+e[0]]=t}const i=r(a,{argv:e});for(const e of t)i.hasOwnProperty("--"+e[0])&&i.hasOwnProperty("-"+e[0])||(i[e[0]]=e[1]);for(const e of Object.keys(i)){if(!e.startsWith("-"))continue;const t=i[e];delete i[e];const a=2===e.length?1:2;i[e.slice(a)]=t}return i}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));const n=new(a(509).a)("",()=>{});function r(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=n.getProperty(e,"length");for(let i=0;i{m(e,0)},disabled:0===s},"rtl"===t.direction?n.createElement(d.a,null):n.createElement(l.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s-1)},disabled:0===s},"rtl"===t.direction?n.createElement(h.a,null):n.createElement(u.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s+1)},disabled:s>=Math.ceil(a/c)-1},"rtl"===t.direction?n.createElement(u.a,null):n.createElement(h.a,null)),n.createElement(o.a,{onClick:e=>{m(e,Math.max(0,Math.ceil(a/c)-1))},disabled:s>=Math.ceil(a/c)-1},"rtl"===t.direction?n.createElement(l.a,null):n.createElement(d.a,null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(126),i=a(49);function o(){return(o=Object.assign||function(e){for(var t=1;tn.createElement(i.a,o({},e,{classes:{root:s().root,...e.classes}}));function c(e){return n.createElement(l,{style:{backgroundColor:e.color},onMouseEnter:e.onMouseEnter,onClick:e.onClick})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(27);function r(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=Object(n.d)(e.server);if(null==t)return 0;for(let a=0;a0||r.a[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof n.a}function s(){this.bladeburner=new n.a(this)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(393),r=a(21);class i extends n.a{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.Contract=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper
skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return s}));var n=a(365),r=a(74);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.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(288),r=a(4);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class o{constructor(e={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[e.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+e.text);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t${this.text}
${r.a.format(this.cost,"0,0")} Scientific Research`+a.desc+"",text:{name:this.text}}}findNode(e){if(this.text===e)return this;let t=null;for(let a=0;a0){const t=e[Math.floor(Math.random()*e.length)];Object(f.c)(t)}L.Counters.checkFactionInvitations=100}if(L.Counters.passiveFactionGrowth<=0){const e=Math.floor(5-L.Counters.passiveFactionGrowth);Object(f.e)(e),L.Counters.passiveFactionGrowth=5}if(L.Counters.messages<=0&&(Object(v.b)(),r.a[o.a.TheRedPill].owned?L.Counters.messages=4500:L.Counters.messages=150),w.a.corporation instanceof m.a&&w.a.corporation.process(w.a),L.Counters.mechanicProcess<=0){if(w.a.bladeburner instanceof l.a)try{w.a.bladeburner.process(g.b,w.a)}catch(e){Object(D.a)("Exception caught in Bladeburner.process(): "+e)}L.Counters.mechanicProcess=5}L.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(c.b)(),L.Counters.contractGeneration=3e3)},load:function(e){if(Object(j.a)(),Object(S.b)(e)){O.b.emit(),Object(s.b)(w.a),Object(M.b)(w.a),Object(i.c)(),w.a.reapplyAllSourceFiles(),w.a.hasWseAccount&&Object(T.h)(),L._lastUpdate=(new Date).getTime();const e=w.a.lastUpdate,t=L._lastUpdate-e,a=Math.floor(t/h.a._idleSpeed);let r=0;const o=w.a.moneySourceA.hacking/w.a.playtimeSinceLastAug*t*.75;if(w.a.gainMoney(o,"hacking"),Object(_.b)(),w.a.isWorking)w.a.focus=!0,w.a.workType==h.a.WorkTypeFaction?w.a.workForFaction(a):w.a.workType==h.a.WorkTypeCreateProgram?w.a.createProgramWork(a):w.a.workType==h.a.WorkTypeStudyClass?w.a.takeClass(a):w.a.workType==h.a.WorkTypeCrime?w.a.commitCrime(a):w.a.workType==h.a.WorkTypeCompanyPartTime?w.a.workPartTime(a):w.a.work(a);else for(let e=0;eF.a.emit(G.a.createElement(G.a.Fragment,null,"Offline for ",k,". While you were offline, your scripts generated"," ",G.a.createElement(P.a,{money:o}),", your Hacknet Nodes generated ",u," and you gained"," ",G.a.createElement(I.a,{reputation:r})," reputation divided amongst your factions.")),250)}else Object(s.b)(w.a),L.start(),w.a.init(),Object(C.f)(w.a.getHomeComputer()),Object(u.b)(),Object(p.c)(),Object(i.c)(),Object(v.c)(),Object(M.b)(w.a),Object(k.e)();Object(y.b)()},start:function(){const e=(new Date).getTime();let t=e-L._lastUpdate;const a=t%h.a._idleSpeed;t=Math.floor(t/h.a._idleSpeed),t>0&&(L._lastUpdate=e-a,w.a.lastUpdate=e-a,L.updateGame(t)),window.requestAnimationFrame(L.start)}}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1354),o=a(1),s=a(46),l=a(32),c=a(126),u=a(154),m=a(93),h=a(310),p=a(2),d=a(581),f=a(108),g=a(8),y=a(456);const b=Object(c.a)(e=>Object(u.a)({root:{backgroundColor:e.colors.backgroundprimary}}));function E(){const e=b(),[t,a]=Object(n.useState)(!1),[c,u]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{const e=setTimeout(()=>{c||a(!0)},2e3);return()=>clearTimeout(e)}),Object(n.useEffect)(()=>{!async function(){await Object(h.b)().then(e=>{try{d.a.load(e)}catch(e){throw Object(y.a)(),u(!0),e}u(!0)}).catch(e=>{console.error(e),d.a.load(""),u(!0)})}()},[]),r.a.createElement(l.a,{className:e.root},c?r.a.createElement(f.a,{terminal:m.a,engine:d.a,player:p.a}):r.a.createElement(s.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(s.a,{item:!0},r.a.createElement(i.a,{size:150,color:"primary"})),r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,{variant:"h3"},"Loading Bitburner v",g.a.VersionString)),t&&r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,null,"If the game fails to load, consider ",r.a.createElement("a",{href:"?noScripts"},"killing all scripts")))))}},,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";function n(e){function t(e,t,a){return e*t+a}const a=t(e-1,Math.log(51)-Math.log(50),Math.log(51)),n=t(500,Math.exp(a),-25e3);return Math.round(1e4*n)/1e4}function r(e){const t=Math.log((e+25e3)/25500)/Math.log(1.02)+1;return Math.round(1e4*t)/1e4}a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return r}))},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 o}));var n=a(100),r=a(68),i=a(21);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 f}));var n=a(624),r=a(69),i=a(24),o=a(790),s=a(514),l=a(21),c=a(8),u=a(791),m=a(5),h=a(2),p=a(6);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}class f{constructor(){d(this,"storedCycles",0),d(this,"fragments",[])}baseSize(){return u.a.BaseSize+m.a.StaneksGiftExtraSize+h.a.sourceFileLvl(13)}width(){return Math.floor(this.baseSize()/2+1)}height(){return Math.floor(this.baseSize()/2+.6)}charge(e,t,a){t.avgCharge=(t.numCharge*t.avgCharge+a)/(t.numCharge+1),t.numCharge++;const n=i.a["Church of the Machine God"];n.playerReputation+=e.faction_rep_mult*(Math.pow(a,.95)*(n.favor+100))/1e3}inBonus(){return this.storedCycles*c.a._idleSpeed/1e3>1}process(e,t=1){e.hasAugmentation(p.a.StaneksGift1)&&(this.storedCycles+=t,this.storedCycles-=10,this.storedCycles=Math.max(0,this.storedCycles),this.updateMults(e),s.a.emit())}effect(e){let t=e.neighboors().map(e=>this.fragmentAt(e[0],e[1])).filter(e=>!!e);t=t.filter(e=>e.fragment().type===r.b.Booster);let a=1;t=t.filter((e,t,a)=>a.indexOf(e)===t);for(const e of t)a*=e.fragment().power;return Object(o.a)(e.avgCharge,e.numCharge,e.fragment().power,a)}canPlace(e,t,a,r){if(e<0||t<0)return!1;if(e+r.width(a)>this.width())return!1;if(t+r.height(a)>this.height())return!1;if(this.count(r)>=r.limit)return!1;const i=new n.a({x:e,y:t,rotation:a,fragment:r});for(const e of this.fragments)if(e.collide(i))return!1;return!0}place(e,t,a,r){return!!this.canPlace(e,t,a,r)&&(this.fragments.push(new n.a({x:e,y:t,rotation:a,fragment:r})),!0)}findFragment(e,t){return this.fragments.find(a=>a.x===e&&a.y===t)}fragmentAt(e,t){for(const a of this.fragments)if(a.fullAt(e,t))return a}count(e){let t=0;for(const a of this.fragments)a.fragment().id===e.id&&t++;return t}delete(e,t){for(let a=0;a{e.avgCharge=0,e.numCharge=0})}updateMults(e){e.reapplyAllAugmentations(!0),e.reapplyAllSourceFiles();for(const t of this.fragments){const a=t.fragment(),n=this.effect(t);switch(a.type){case r.b.HackingChance:e.hacking_chance_mult*=n;break;case r.b.HackingSpeed:e.hacking_speed_mult*=n;break;case r.b.HackingMoney:e.hacking_money_mult*=n;break;case r.b.HackingGrow:e.hacking_grow_mult*=n;break;case r.b.Hacking:e.hacking_mult*=n,e.hacking_exp_mult*=n;break;case r.b.Strength:e.strength_mult*=n,e.strength_exp_mult*=n;break;case r.b.Defense:e.defense_mult*=n,e.defense_exp_mult*=n;break;case r.b.Dexterity:e.dexterity_mult*=n,e.dexterity_exp_mult*=n;break;case r.b.Agility:e.agility_mult*=n,e.agility_exp_mult*=n;break;case r.b.Charisma:e.charisma_mult*=n,e.charisma_exp_mult*=n;break;case r.b.HacknetMoney:e.hacknet_node_money_mult*=n;break;case r.b.HacknetCost:e.hacknet_node_purchase_cost_mult*=n,e.hacknet_node_ram_cost_mult*=n,e.hacknet_node_core_cost_mult*=n,e.hacknet_node_level_cost_mult*=n;break;case r.b.Rep:e.company_rep_mult*=n,e.faction_rep_mult*=n;break;case r.b.WorkMoney:e.work_money_mult*=n;break;case r.b.Crime:e.crime_success_mult*=n,e.crime_money_mult*=n;break;case r.b.Bladeburner:e.bladeburner_max_stamina_mult*=n,e.bladeburner_stamina_gain_mult*=n,e.bladeburner_analysis_mult*=n,e.bladeburner_success_chance_mult*=n}}e.updateSkillLevels()}prestigeAugmentation(){this.clearCharge()}prestigeSourceFile(){this.clear(),this.storedCycles=0}toJSON(){return Object(l.b)("StaneksGift",this)}static fromJSON(e){return Object(l.a)(f,e.data)}}l.c.constructors.StaneksGift=f},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(221),r=a(21);class i{constructor(e){e?(this.id=e.fragment.id,this.x=e.x,this.y=e.y,this.avgCharge=0,this.numCharge=0,this.rotation=e.rotation):(this.id=-1,this.x=-1,this.y=-1,this.avgCharge=-1,this.numCharge=-1,this.rotation=-1)}collide(e){const t=this.fragment(),a=e.fragment(),n=e.x-this.x,r=e.y-this.y;for(let i=0;i[this.x+e[0],this.y+e[1]])}copy(){const e=Object(n.b)(this.id);if(null===e)throw new Error("ActiveFragment id refers to unknown Fragment.");const t=new i({x:this.x,y:this.y,rotation:this.rotation,fragment:e});return t.avgCharge=this.avgCharge,t.numCharge=this.numCharge,t}toJSON(){return Object(r.b)("ActiveFragment",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.ActiveFragment=i},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(9);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,"b",(function(){return m})),a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(27),o=a(45),s=a(85),l=a(116),c=a(75),u=a(10);const m={All:0,Foreign:1,Owned:2,Purchased:3};function h(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case m.All:return!0;case m.Foreign:return"home"!==t.hostname&&!a;case m.Owned:return a||t instanceof s.a||"home"===t.hostname;case m.Purchased:return a||t instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+n),!1}}const a=[];for(const e of Object(i.c)())t(e)&&a.push(r.a.createElement(c.a,{key:e.hostname,value:e.hostname},e.hostname));return r.a.createElement(l.a,{startAdornment:r.a.createElement(u.a,{onClick:e.purchase,disabled:!e.canPurchase},"Buy"),sx:{mx:1},value:e.value,onChange:e.onChange},a)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a(1),i=a(10),o=a(1024),s=a(1026),l=a(1027),c=a(1028),u=a(1029),m=a(1032),h=a(542),p=a(1039),d=a(1040),f=a(48),g=a(13),y=a(119),b=a(27),E=a(541),k=a(29);function v({loc:e}){const t=k.b.Router(),a=k.b.Player();const v=function(){const r=[];return e.types.includes(f.a.Company)&&r.push(n.createElement(o.a,{key:"companylocation",locName:e.name})),e.types.includes(f.a.Gym)&&r.push(n.createElement(s.a,{key:"gymlocation",router:t,loc:e,p:a})),e.types.includes(f.a.Hospital)&&r.push(n.createElement(l.a,{key:"hospitallocation",p:a})),e.types.includes(f.a.Slums)&&r.push(n.createElement(c.a,{key:"slumslocation"})),e.types.includes(f.a.Special)&&r.push(n.createElement(u.a,{key:"speciallocation",loc:e})),e.types.includes(f.a.TechVendor)&&r.push(n.createElement(m.a,{key:"techvendorlocation",loc:e})),e.types.includes(f.a.TravelAgency)&&r.push(n.createElement(h.a,{key:"travelagencylocation",p:a,router:t})),e.types.includes(f.a.University)&&r.push(n.createElement(p.a,{key:"universitylocation",loc:e})),e.types.includes(f.a.Casino)&&r.push(n.createElement(d.a,{key:"casinoLocation",p:a})),r}(),_=Object(b.d)(e.name),w=null!==_&&Object(y.b)(_);return n.createElement(n.Fragment,null,n.createElement(i.a,{onClick:()=>t.toCity()},"Return to World"),n.createElement(r.a,{variant:"h4"},w&&!g.a.DisableTextEffects?n.createElement(E.a,{content:e.name}):e.name),v)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(232),o=a(126),s=a(154),l=a(73);const c=Object(o.a)(()=>Object(s.a)({card:{padding:"10px",border:"solid 1px #808080",backgroundColor:"white",display:"inline-block",borderRadius:"10px",fontSize:"18.5px",textAlign:"center",margin:"3px",fontWeight:"bold"},red:{color:"red"},black:{color:"black"},value:{fontSize:"20px",fontFamily:"sans-serif"}})),u=({card:e,hidden:t})=>{const a=c();let n;switch(e.suit){case i.b.Clubs:n=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:n=r.a.createElement("span",null,"♦");break;case i.b.Hearts:n=r.a.createElement("span",null,"♥");break;case i.b.Spades:n=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+e.suit)}return r.a.createElement(l.a,{className:`${a.card} ${e.isRedSuit()?a.red:a.black}`},r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:a.value},t?" - ":e.formatValue()),r.a.createElement("span",null,t?" - ":n)))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(24),r=a(27);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.d)("CSEC");return!(!e||!e.hasOwnProperty("hasAdminRights"))&&e.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const e=Object(r.d)("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 r}));var n=a(8);function r(e,t){return e/n.a.DonateMoneyToRepDivisor*t.faction_rep_mult}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(88);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(8),r=a(5);function i(e){const t=1e3/n.a._idleSpeed;let a=0,i=0,o=0,s=0,l=0,c=0,u=0;const m=e.hashManager;switch(e.className){case n.a.ClassStudyComputerScience:i=n.a.ClassStudyComputerScienceBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassDataStructures:a=n.a.ClassDataStructuresBaseCost*e.workCostMult/t,i=n.a.ClassDataStructuresBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassNetworks:a=n.a.ClassNetworksBaseCost*e.workCostMult/t,i=n.a.ClassNetworksBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassAlgorithms:a=n.a.ClassAlgorithmsBaseCost*e.workCostMult/t,i=n.a.ClassAlgorithmsBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassManagement:a=n.a.ClassManagementBaseCost*e.workCostMult/t,u=n.a.ClassManagementBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassLeadership:a=n.a.ClassLeadershipBaseCost*e.workCostMult/t,u=n.a.ClassLeadershipBaseExp*e.workExpMult/t*m.getStudyMult();break;case n.a.ClassGymStrength:a=n.a.ClassGymBaseCost*e.workCostMult/t,o=e.workExpMult/t*m.getTrainingMult();break;case n.a.ClassGymDefense:a=n.a.ClassGymBaseCost*e.workCostMult/t,s=e.workExpMult/t*m.getTrainingMult();break;case n.a.ClassGymDexterity:a=n.a.ClassGymBaseCost*e.workCostMult/t,l=e.workExpMult/t*m.getTrainingMult();break;case n.a.ClassGymAgility:a=n.a.ClassGymBaseCost*e.workCostMult/t,c=e.workExpMult/t*m.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}return{workMoneyLossRate:a,workHackExpGainRate:i*e.hacking_exp_mult*r.a.ClassGymExpGain,workStrExpGainRate:o*e.strength_exp_mult*r.a.ClassGymExpGain,workDefExpGainRate:s*e.defense_exp_mult*r.a.ClassGymExpGain,workDexExpGainRate:l*e.dexterity_exp_mult*r.a.ClassGymExpGain,workAgiExpGainRate:c*e.agility_exp_mult*r.a.ClassGymExpGain,workChaExpGainRate:u*e.charisma_exp_mult*r.a.ClassGymExpGain}}},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 ","",'alias [-g] [name="value"] Create or display Terminal aliases',"analyze Get information about the current machine ","backdoor Install a backdoor on the current machine ","buy [-l/program] Purchase a program through the Dark Web","cat [file] Display a .msg, .lit, or .txt file","cd [dir] Change to a new directory","check [script] [args...] Print a script's logs to Terminal","clear Clear all text on the terminal ","cls See 'clear' command ","connect [hostname] Connects to a remote server","cp [src] [dst]: Copy a file","download [script/text file] Downloads scripts or text files to your computer","expr [math expression] Evaluate a mathematical expression","free Check the machine's memory (RAM) usage","grow Spoof money in a servers bank account, increasing the amount available.","hack Hack the current machine","help [command] Display this help text, or the help text for a command","home Connect to home computer","hostname Displays the hostname of the machine","kill [script/pid] [args...] Stops the specified script on the current server ","killall Stops all running scripts on the current machine","ls [dir] [| grep pattern] Displays all files on the machine","lscpu Displays the number of CPU cores on the machine","mem [script] [-t] [n] Displays the amount of RAM required to run the script","mv [src] [dest] Move/rename a text or script file","nano [file] Text editor - Open up and edit a script or text file","ps Display all scripts that are currently running","rm [file] Delete a file from the server","run [name] [-t n] [--tail] [args...] Execute a program or script","scan Prints all immediately-available network connections","scan-analyze [d] [-a] Prints info for all servers up to d nodes away","scp [file] [server] Copies a file to a destination server","sudov Shows whether you have root access on this computer","tail [script] [args...] Displays dynamic logs for the specified script","top Displays all running scripts and their RAM usage","unalias [alias name] Deletes the specified alias","weaken [server] Reduce the security of a server","wget [url] [target file] Retrieves code/text from a web server"],r={alias:['alias [-g] [name="value"] '," ","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: "," ",'alias nuke="run NUKE.exe"'," ","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: "," ",'alias worm="HTTPWorm.exe"'," ","and then you tried to run the following terminal command: "," ","run worm"," ","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: "," ",'alias -g worm="HTTPWorm.exe"'," ","Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. "," ","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. "," ","The 'unalias' command can be used to remove aliases."," "],analyze:["analze"," ","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"," ","Install a backdoor on the current machine, grants a secret bonus depending on the machine."," ","Requires root access to run."," "],buy:["buy [-l / program]"," ","Purchase a program through the Dark Web. Requires a TOR router to use."," ","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."," ","Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive."],cat:["cat [file]"," ","Display message (.msg), literature (.lit), or text (.txt) files. Examples:"," ","cat j1.msg"," ","cat foo.lit"," ","cat servers.txt"],cd:["cd [dir]"," ","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:"," ","cd scripts/hacking"," ","cd /logs"," ","cd ../"],check:["check [script name] [args...]"," ","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: "," ","run foo.script 1 2 foodnstuff"," ","Then to run the 'check' command on this script you would have to pass the same arguments in: "," ","check foo.script 1 2 foodnstuff"],clear:["clear"," ","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"," ","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]"," ","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."],cp:["cp [src] [dst]"," ","Copy a file on this server. To copy a file to another server use scp."],download:["download [script/text file]"," ","Downloads a script or text file to your computer (like your real life computer)."," ","You can also download all of your scripts/text files as a zip file using the following Terminal commands:"," ","Download all scripts and text files: download *"," ","Download all scripts: download *.script"," ","Download all text files: download *.txt"," "],expr:["expr [mathematical expression]"," ","Evaluate a simple mathematical expression. Supports native JavaScript operators:"," ","+, -, /, *, **, %"," ","Example:"," ","expr 25 * 2 ** 10"," ","Note that letters (non-digits) are not allowed and will be removed from the input."],free:["free"," ","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."],grow:["grow","","Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.","See the wiki page for hacking mechanics."],hack:["hack"," ","Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics"," "],help:["help [command]"," ","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: "," ","help alias"," ","help scan-analyze"],home:["homeConnect to your home computer. This will work no matter what server you are currently connected to."],hostname:["hostname"," ","Prints the hostname of the current server"],kill:["kill [script name] [args...]"," ","kill [pid]"," ","Kill the script specified by the script name and arguments OR by its PID."," ","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:"," ","run foo.script 1 sigma-cosmetics"," ","Then to kill this script the same arguments would have to be used:"," ","kill foo.script 1 sigma-cosmetics"," ","If you are killing the script using its PID, then the PID argument must be numeric"],killall:["killall"," ","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]"," ","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. "," ","The 'dir' optional parameter can be used to display files/directories in another directory."," ","The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern."," ","Examples:"," ","List all files with the '.script' extension in the current directory:"," ","ls | grep .script"," ","List all files with the '.js' extension in the root directory:"," ","ls / | grep .js"," ","List all files with the word 'purchase' in the filename, in the 'scripts' directory:"," ","ls scripts | grep purchase"],lscpu:["lscpu"," ","Prints the number of CPU Cores the current server has"],mem:["mem [script name] [-t num_threads]"," ","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:"," ","mem foo.script"," ","mem foo.script -t 50"," ","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]"," ","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"," ","Note that, unlike the Linux 'mv' command, the destination argument must be the ","full filepath. ","Examples: "," ","mv hacking-controller.script scripts/hacking-controller.script"," ","mv myScript.js myOldScript.js"],nano:["nano [file name]"," ","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"," ","Prints all scripts that are running on the current server"],rm:["rm [file]"," ","Removes the specified file from the current server. A file can be a script, a program, or a message file. "," ","WARNING: This is permanent and cannot be undone"],run:["run [file name] [-t] [num threads] [args...]"," ","Execute a program or a script."," ","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. "," ","[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. "," "],scan:["scan"," ","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]"," ","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."," ","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."," ","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."," ","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]"," ","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"," ","Prints whether or not you have root access to the current machine"],tail:["tail [script name] [args...]"," ","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: "," ","run foo.script 10 50000"," ","Then in order to check its logs with 'tail' the same arguments must be used: "," ","tail foo.script 10 50000"],top:["top"," ","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]"," ","Deletes the specified alias. Note that the double quotation marks are required. "," ","As an example, if an alias was declared using:"," ",'alias r="run"'," ","Then it could be removed using:"," ","unalias r"," ","It is not necessary to differentiate between global and non-global aliases when using 'unalias'"],weaken:["weaken","","Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.","Requires root access. See the wiki page for hacking mechanics."],wget:["wget [url] [target file]"," ","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."," ","Note that it will not be possible to download data from many websites because they do not allow ","cross-origin resource sharing (CORS). Example:"," ","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 oe}));var n=a(224),r=a(85),i=a(45),o=a(60),s=a(99),l=a(294),c=a(91),u=a(8),m=a(27),h=a(112),p=a(443),d=a(40),f=a(119),g=a(411),y=a(92),b=a(13),E=a(170),k=a(89),v=a(4),_=a(22),w=a(1124),S=a(1125),C=a(1126),x=a(1127),O=a(1128),M=a(1129),T=a(1130),R=a(1131),A=a(1132),P=a(1133),N=a(1136),I=a(1137),F=a(1138),D=a(1139),j=a(1140),B=a(1141),G=a(1142),L=a(1143),W=a(1144),H=a(1145),U=a(1146),q=a(1147),K=a(1148),z=a(1149),$=a(1150),Y=a(1151),V=a(1152),J=a(1155),X=a(1156),Q=a(1157),Z=a(1158),ee=a(1159),te=a(1160),ae=a(1161),ne=a(1162),re=a(1163);function ie(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class oe{constructor(){ie(this,"action",null),ie(this,"commandHistory",[]),ie(this,"commandHistoryIndex",0),ie(this,"outputHistory",[new n.b("Bitburner v"+u.a.VersionString,"primary")]),ie(this,"contractOpen",!1),ie(this,"currDir","/")}process(e,t,a){null!==this.action&&(this.action.timeLeft-=u.a._idleSpeed*a/1e3,this.action.timeLeft<.01&&this.finishAction(e,t,!1),l.b.emit())}append(e){this.outputHistory.push(e),this.outputHistory.length>b.a.MaxTerminalCapacity&&this.outputHistory.splice(0,this.outputHistory.length-b.a.MaxTerminalCapacity),l.b.emit()}print(e){this.append(new n.b(e,"primary"))}printRaw(e){this.append(new n.c(e))}error(e){this.append(new n.b(e,"error"))}success(e){this.append(new n.b(e,"success"))}info(e){this.append(new n.b(e,"info"))}warn(e){this.append(new n.b(e,"warn"))}startHack(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.d)(t,e)/4,"h")}}startGrow(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.a)(t,e)/16,"g")}}startWeaken(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.f)(t,e)/16,"w")}}startBackdoor(e){const t=e.getCurrentServer();if(t instanceof r.a)this.error("Cannot backdoor this kind of server");else{if(!(t instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(k.d)(t,e)/4,"b")}}startAnalyze(){this.print("Analyzing system..."),this.startAction(1,"a")}startAction(e,t){this.action=new n.d(e,t)}finishHack(e,t,a=!1){if(a)return;const n=t.getCurrentServer();if(n instanceof r.a)return void this.error("Cannot hack this kind of server");if(!(n instanceof i.a))throw new Error("server should be normal server");const o=Object(k.b)(n,t),s=Math.random(),l=Object(k.c)(n,t),c=l/4;if(s=n.getMaxNumTries()?(this.error("Contract FAILED - Contract is now self-destructing"),a.removeContract(n)):this.error(`Contract FAILED - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case s.b.Cancelled:default:this.print("Contract cancelled")}this.contractOpen=!1}executeScanAnalyzeCommand(e,t=1,a=!1){this.print("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),this.print(" ");const i={};for(const e of Object(m.c)())i[e.hostname]=0;const s=[],l=[0],c=e.getCurrentServer();for(s.push(c);0!=s.length;){const c=s.pop();if(!c)continue;const u=l.pop();if(void 0===u)continue;const m=c instanceof r.a;if(!a&&c.purchasedByPlayer&&"home"!=c.hostname)continue;if(i[c.hostname]||u>t)continue;if(!a&&m)continue;i[c.hostname]=1;for(let e=c.serversOnNetwork.length-1;e>=0;--e){const t=Object(f.a)(c,e);null!==t&&(s.push(t),l.push(u+1))}if(0==u)continue;const h=Array(4*(u-1)+1).join("-");e.hasProgram(o.a.AutoLink.name)?this.append(new n.a(h,c.hostname)):this.print(h+c.hostname);const p=h+"--";let d="NO";c.hasAdminRights&&(d="YES");let g=`${p}Root Access: ${d}${m?"":", Required hacking skill: "+c.requiredHackingSkill}`;c.hasOwnProperty("numOpenPortsRequired")&&(g+="\n"+p+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),g+="\n"+p+"RAM: "+v.a.formatRAM(c.maxRam),g+="\n ",this.print(g)}}connectToServer(e,t){const a=Object(m.d)(t);null!=a?(e.getCurrentServer().isConnectedTo=!1,e.currentServer=a.hostname,e.getCurrentServer().isConnectedTo=!0,this.print("Connected to "+a.hostname),this.setcwd("/"),"darkweb"==e.getCurrentServer().hostname&&Object(p.b)()):this.error("Invalid server. Connection failed.")}executeCommands(e,t,a){a=(a=a.trim()).replace(/\s\s+/g," "),this.commandHistory[this.commandHistory.length-1]!=a&&(this.commandHistory.push(a),this.commandHistory.length>50&&this.commandHistory.splice(0,1)),this.commandHistoryIndex=this.commandHistory.length;const n=Object(g.b)(a);for(let a=0;athis.clear(),cls:()=>this.clear(),connect:R.a,cp:A.a,download:P.a,expr:N.a,free:I.a,grow:F.a,hack:D.a,help:j.a,home:B.a,hostname:G.a,kill:L.a,killall:W.a,ls:H.a,lscpu:U.a,mem:q.a,mv:K.a,nano:z.a,ps:$.a,rm:Y.a,run:V.a,scan:J.a,scp:Q.a,sudov:Z.a,tail:ee.a,top:te.a,unalias:ae.a,weaken:ne.a,wget:re.a}[i.toLowerCase()];o?o(this,e,t,r,n.slice(1)):this.error(`Command ${n[0]} not found`)}getProgressText(){if(null===this.action)throw new Error("trying to get the progress text when there's no action");return Object(E.a)({progress:(this.action.time-this.action.timeLeft)/this.action.time,totalTicks:50})}}},,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(31);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{const a=e.slice();for(let e=1;e["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    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{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+="    [\n",t+=e.map(e=>"        ["+e.map(e=>(""+e).padStart(2," ")).join(",")+"]").join("\n"),t+="\n    ]\n",t+=["\nHere is an example of what spiral order should be:\n\n","    [\n","        [1, 2, 3]\n","        [4, 5, 6]\n","        [7, 8, 9]\n","    ]\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","    [\n","        [1,  2,  3,  4]\n","        [5,  6,  7,  8]\n","        [9, 10, 11, 12]\n","    ]\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{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;t--)a[l]=e[i][t],++l;if(--i=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["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{const a=e.length;let n=0;for(let t=0;n["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{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{let a=0,n=0;for(let t=1;t["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{let a=0;for(let t=1;t["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{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{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;t0;--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=[" ".repeat(n-a+1),"[",e[a].toString(),"]"].join("");return a 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const e=[],t=Object(n.a)(3,12);e.length=t;for(let a=0;a{const a=e.length,n=e[a-1].slice();for(let t=a-2;t>-1;--t)for(let a=0;a{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{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{const a=[];a.length=e.length;for(let t=0;t0?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{let a=0,n=0;const i=[];for(let t=0;t0?--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{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{const a=e[0],n=e[1];const o=r(t).split(",");for(let e=0;e=e}}const h=[{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:m(1),time:n.a.MillisecondsPerFiveMinutes},run:(e,t,a,n)=>{if(n instanceof r.a){if(!n.hasAdminRights)return n.openPortCount>=n.numOpenPortsRequired?(n.hasAdminRights=!0,void t.print("NUKE successful! Gained root access to "+n.hostname)):void t.print("NUKE unsuccessful. Not enough ports have been opened");t.print("You already have root access to this computer. There is no reason to run NUKE.exe")}else t.error("Cannot nuke this kind of server.")}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:m(50),time:2*n.a.MillisecondsPerFiveMinutes},run:(e,t,a,n)=>{n instanceof r.a?n.sshPortOpen?t.print("SSH Port (22) is already open!"):(n.sshPortOpen=!0,t.print("Opened SSH Port(22)!"),n.openPortCount++):t.error("Cannot run BruteSSH.exe on this kind of server.")}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:m(100),time:n.a.MillisecondsPerHalfHour},run:(e,t,a,n)=>{n instanceof r.a?n.ftpPortOpen?t.print("FTP Port (21) is already open!"):(n.ftpPortOpen=!0,t.print("Opened FTP Port (21)!"),n.openPortCount++):t.error("Cannot run FTPCrack.exe on this kind of server.")}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:m(250),time:n.a.MillisecondsPer2Hours},run:(e,t,a,n)=>{n instanceof r.a?n.smtpPortOpen?t.print("SMTP Port (25) is already open!"):(n.smtpPortOpen=!0,t.print("Opened SMTP Port (25)!"),n.openPortCount++):t.error("Cannot run relaySMTP.exe on this kind of server.")}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:m(500),time:n.a.MillisecondsPer4Hours},run:(e,t,a,n)=>{n instanceof r.a?n.httpPortOpen?t.print("HTTP Port (80) is already open!"):(n.httpPortOpen=!0,t.print("Opened HTTP Port (80)!"),n.openPortCount++):t.error("Cannot run HTTPWorm.exe on this kind of server.")}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:m(750),time:n.a.MillisecondsPer8Hours},run:(e,t,a,n)=>{n instanceof r.a?n.sqlPortOpen?t.print("SQL Port (1433) is already open!"):(n.sqlPortOpen=!0,t.print("Opened SQL Port (1433)!"),n.openPortCount++):t.error("Cannot run SQLInject.exe on this kind of server.")}},{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:m(75),time:n.a.MillisecondsPerQuarterHour},run:(e,t)=>{t.print("This executable cannot be run."),t.print("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}},{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:m(400),time:n.a.MillisecondsPer2Hours},run:(e,t)=>{t.print("This executable cannot be run."),t.print("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:m(75),time:n.a.MillisecondsPerHalfHour},run:(e,t,a,n,s)=>{if(1!==s.length)return void t.error("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const l=Object(o.d)(s[0]);null!=l?l instanceof r.a?(t.print(l.hostname+":"),t.print("Server base security level: "+l.baseDifficulty),t.print("Server current security level: "+l.hackDifficulty),t.print("Server growth rate: "+l.serverGrowth),t.print("Netscript hack() execution time: "+Object(i.b)(1e3*Object(u.d)(l,a),!0)),t.print("Netscript grow() execution time: "+Object(i.b)(1e3*Object(u.a)(l,a),!0)),t.print("Netscript weaken() execution time: "+Object(i.b)(1e3*Object(u.f)(l,a),!0))):t.error("ServerProfiler.exe can only be run on normal servers."):t.error("Invalid server IP/hostname")}},{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:m(25),time:n.a.MillisecondsPerQuarterHour},run:(e,t)=>{t.print("This executable cannot be run."),t.print("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),t.print("When using scan-analyze, click on a server's hostname to connect to it.")}},{key:"Formulas",name:"Formulas.exe",create:{level:1e3,tooltip:"This program allows you to use the formulas API",req:m(1e3),time:n.a.MillisecondsPer4Hours},run:(e,t)=>{t.print("This executable cannot be run."),t.print("Formulas.exe lets you use the formulas API.")}},{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>=1},time:n.a.MillisecondsPerFiveMinutes/20},run:()=>{c.a.emit()}},{key:"Flight",name:"fl1ght.exe",create:null,run:(e,t,a)=>{const n=Math.round(30*l.a.DaedalusAugsRequirement);if(!(a.augmentations.length>=n&&a.money>1e11&&a.hacking>=2500))return t.print(`Augmentations: ${a.augmentations.length} / ${n}`),t.print(`Money: ${s.a.formatMoney(a.money)} / $100b`),void t.print(`Hacking skill: ${a.hacking} / 2500`);t.print("We will contact you."),t.print("-- Daedalus --")}}]},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 d}));var n=a(768),r=a(556),i=a(559),o=a(376),s=a(43),l=a(383),c=a(9),u=a(330),m=a(23),h=a(338),p=a(21);class d{constructor(){this.hacking=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=1e3,this.city=m.a.Sector12,this.location=c.a.TravelAgency,this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new u.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.workCostMult=1,this.workExpMult=1,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=null,this.corporation=null,this.bladeburner=null,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.lastUpdate=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new h.a,this.moneySourceB=new h.a,this.scriptProdSinceLastAug=0,this.exploits=[],this.init=s.bb,this.prestigeAugmentation=s.eb,this.prestigeSourceFile=s.fb,this.receiveInvite=s.nb,this.calculateSkill=s.o,this.updateSkillLevels=s.Lb,this.resetMultipliers=s.qb,this.hasProgram=s.Z,this.setMoney=s.tb,this.gainMoney=s.J,this.loseMoney=s.db,this.canAfford=s.r,this.recordMoneySource=s.ob,this.gainHackingExp=s.H,this.gainStrengthExp=s.K,this.gainDefenseExp=s.F,this.gainDexterityExp=s.G,this.gainAgilityExp=s.C,this.gainCharismaExp=s.D,this.gainIntelligenceExp=s.I,this.queryStatFromString=s.ib,this.resetWorkStatus=s.rb,this.processWorkEarnings=s.hb,this.startWork=s.Fb,this.cancelationPenalty=s.s,this.work=s.Mb,this.finishWork=s.A,this.startWorkPartTime=s.Gb,this.workPartTime=s.Ob,this.finishWorkPartTime=s.B,this.startFocusing=s.Eb,this.stopFocusing=s.Hb,this.startFactionWork=s.Db,this.startFactionHackWork=s.Bb,this.startFactionFieldWork=s.Ab,this.startFactionSecurityWork=s.Cb,this.workForFaction=s.Nb,this.finishFactionWork=s.z,this.getWorkMoneyGain=s.U,this.getWorkHackExpGain=s.T,this.getWorkStrExpGain=s.W,this.getWorkDefExpGain=s.R,this.getWorkDexExpGain=s.S,this.getWorkAgiExpGain=s.P,this.getWorkChaExpGain=s.Q,this.getWorkRepGain=s.V,this.process=s.gb,this.startCreateProgramWork=s.yb,this.createProgramWork=s.v,this.finishCreateProgramWork=s.x,this.startClass=s.xb,this.takeClass=s.Ib,this.finishClass=s.w,this.startCrime=s.zb,this.commitCrime=s.u,this.finishCrime=s.y,this.singularityStopWork=s.vb,this.takeDamage=s.Jb,this.regenerateHp=s.pb,this.hospitalize=s.ab,this.applyForJob=s.f,this.getNextCompanyPosition=s.O,this.quitJob=s.kb,this.applyForSoftwareJob=s.m,this.applyForSoftwareConsultantJob=s.l,this.applyForItJob=s.e,this.applyForSecurityEngineerJob=s.j,this.applyForNetworkEngineerJob=s.g,this.applyForBusinessJob=s.c,this.applyForBusinessConsultantJob=s.b,this.applyForSecurityJob=s.k,this.applyForAgentJob=s.a,this.applyForEmployeeJob=s.d,this.applyForPartTimeEmployeeJob=s.h,this.applyForWaiterJob=s.n,this.applyForPartTimeWaiterJob=s.i,this.isQualified=s.cb,this.reapplyAllAugmentations=s.lb,this.reapplyAllSourceFiles=s.mb,this.checkForFactionInvitations=s.t,this.setBitNodeNumber=s.sb,this.queueAugmentation=s.jb,this.gainCodingContractReward=s.E,this.travel=s.Kb,this.gotoLocation=s.Y,this.canAccessResleeving=s.q,this.giveExploit=s.X,this.getIntelligenceBonus=s.M,this.getCasinoWinnings=s.L,this.hasAugmentation=n.a,this.canAccessBladeburner=r.a,this.inBladeburner=r.b,this.startBladeburner=r.c,this.canAccessCorporation=i.a,this.hasCorporation=i.b,this.startCorporation=i.c,this.canAccessGang=o.a,this.getGangFaction=o.b,this.getGangName=o.c,this.hasGangWith=o.d,this.inGang=o.e,this.startGang=o.f,this.hasTorRouter=l.f,this.getCurrentServer=l.b,this.getHomeComputer=l.c,this.getUpgradeHomeRamCost=l.e,this.getUpgradeHomeCoresCost=l.d,this.createHacknetServer=l.a,this.factionWorkType="",this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.getMult=s.N,this.setMult=s.ub,this.canAccessCotMG=s.p,this.sourceFileLvl=s.wb}toJSON(){return Object(p.b)("PlayerObject",this)}static fromJSON(e){return Object(p.a)(d,e.data)}}p.c.constructors.PlayerObject=d},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(34);function r(e,t=!1){const a=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===a)return!0;if(!t)for(const e of this.queuedAugmentations)if(e.name===a)return!0;return!1}},function(e,t,a){"use strict";function n(){const e=new Date,t=("0"+e.getHours()).slice(-2),a=("0"+e.getMinutes()).slice(-2),n=("0"+e.getSeconds()).slice(-2);return`${e.getMonth()+1}/${e.getDate()} ${t}:${a}:${n}`}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(21);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(146),r=a(59);const i={};!function(){let e,t,a;e="The Beginner's Guide to Hacking",t=r.a.HackersStartingHandbook,a="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

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.

-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)

-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()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-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

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-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="Getting Started with Corporations
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. 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.

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.

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.

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').

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.

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.

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.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-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.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-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

-Remember, you need to spend money to make money!

-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.

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.

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.

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.

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.

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.

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.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

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.

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.

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.

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.'

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.

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.

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.

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?

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.

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.

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.

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.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
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.

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?

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.

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.

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.

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.

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.

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.

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.

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?

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.

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.

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

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

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.

OPEN YOUR EYES

It was the Illuminati that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

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.

What's the point of all this? What is my purpose?

Some people dare to think even bigger.

What will the fate of the human race be?

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.

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.

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.

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 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

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:3,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:7.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:18,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks

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

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

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:45,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:360,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism

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

Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:3,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets

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:3.6,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs

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:15,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

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:7.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

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:45,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

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:114,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms

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:174,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

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:72,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations

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:360,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

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

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(506),r=a(220),i=a(203),o=a(21),s=a(176);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 Object(s.a)(e)}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(),a={respect:e.respect,wantedLevel:e.wanted,territory:e.getTerritory()};return Object(s.d)(a,this,t)}calculateWantedLevelGain(e){const t=this.getTask(),a={respect:e.respect,wantedLevel:e.wanted,territory:e.getTerritory()};return Object(s.e)(a,this,t)}calculateMoneyGain(e){const t=this.getTask(),a={respect:e.respect,wantedLevel:e.wanted,territory:e.getTerritory()};return Object(s.c)(a,this,t)}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.calculateAscensionMult(this.hack_asc_points),this.str_exp+=t.strWeight/1500*a*n.str*this.calculateAscensionMult(this.str_asc_points),this.def_exp+=t.defWeight/1500*a*n.def*this.calculateAscensionMult(this.def_asc_points),this.dex_exp+=t.dexWeight/1500*a*n.dex*this.calculateAscensionMult(this.dex_asc_points),this.agi_exp+=t.agiWeight/1500*a*n.agi*this.calculateAscensionMult(this.agi_asc_points),this.cha_exp+=t.chaWeight/1500*a*n.cha*this.calculateAscensionMult(this.cha_asc_points)}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Object(s.b)(this.hack_exp),str:Object(s.b)(this.str_exp),def:Object(s.b)(this.def_exp),dex:Object(s.b)(this.dex_exp),agi:Object(s.b)(this.agi_exp),cha:Object(s.b)(this.cha_exp)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}getCurrentAscensionMults(){return{hack:this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points)}}getAscensionMultsAfterAscend(){const e=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+e.hack),str:this.calculateAscensionMult(this.str_asc_points+e.str),def:this.calculateAscensionMult(this.def_asc_points+e.def),dex:this.calculateAscensionMult(this.dex_asc_points+e.dex),agi:this.calculateAscensionMult(this.agi_asc_points+e.agi),cha:this.calculateAscensionMult(this.cha_asc_points+e.cha)}}getAscensionResults(){const e=this.getAscensionMultsAfterAscend(),t=this.getCurrentAscensionMults();return{hack:e.hack/t.hack,str:e.str/t.str,def:e.def/t.def,dex:e.dex/t.dex,agi:e.agi/t.agi,cha:e.cha/t.cha}}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")}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 n}));const n={"Slum Snakes":1,Tetrads:2,"The Syndicate":2,"The Dark Army":2,"Speakers for the Dead":5,NiteSec:2,"The Black Hand":5}},function(e,t,a){"use strict";a.d(t,"a",(function(){return S}));var n=a(28),r=a(9);const i={},o={},s={},l={},c={},u={},m={},h={},p={},d={},f={},g={},y={},b={},E={},k={},v={},_={},w={};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;enull),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(4),o=a(16);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";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(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(88),r=a(9);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 l}));var n=a(14),r=a(444),i=a(67),o=a(220),s=a(203);function l(e,t,a){const l=function(t){const n=e.gang;if(null===n)throw new Error("Must have joined gang");if(!(n instanceof r.a))throw a.makeRuntimeErrorMsg("gang."+t,"You do not currently have a Gang")},c=function(t,n){const r=e.gang;if(null===r)throw new Error("Must have joined gang");for(const e of r.members)if(e.name===n)return e;throw a.makeRuntimeErrorMsg("gang."+t,`Invalid gang member: '${n}'`)};return{createGang:function(t){a.updateDynamicRam("createGang",Object(n.c)("gang","createGang"));if(!e.canAccessGang()||!["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"].includes(t))return!1;if(e.inGang())return!1;if(!e.factions.includes(t))return!1;const r="NiteSec"===t||"The Black Hand"===t;return e.startGang(t,r),!0},inGang:function(){return a.updateDynamicRam("inGang",Object(n.c)("gang","inGang")),e.inGang()},getMemberNames:function(){a.updateDynamicRam("getMemberNames",Object(n.c)("gang","getMemberNames")),l("getMemberNames");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return t.members.map(e=>e.name)},getGangInformation:function(){a.updateDynamicRam("getGangInformation",Object(n.c)("gang","getGangInformation")),l("getGangInformation");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return{faction:t.facName,isHacking:t.isHackingGang,moneyGainRate:t.moneyGainRate,power:t.getPower(),respect:t.respect,respectGainRate:t.respectGainRate,territory:t.getTerritory(),territoryClashChance:t.territoryClashChance,territoryWarfareEngaged:t.territoryWarfareEngaged,wantedLevel:t.wanted,wantedLevelGainRate:t.wantedGainRate,wantedPenalty:t.getWantedPenalty()}},getOtherGangInformation:function(){a.updateDynamicRam("getOtherGangInformation",Object(n.c)("gang","getOtherGangInformation")),l("getOtherGangInformation");const e={};for(const t in i.a)e[t]=Object.assign({},i.a[t]);return e},getMemberInformation:function(t){a.updateDynamicRam("getMemberInformation",Object(n.c)("gang","getMemberInformation")),l("getMemberInformation");const r=e.gang;if(null===r)throw new Error("Should not be called without Gang");const i=c("getMemberInformation",t);return{name:i.name,task:i.task,earnedRespect:i.earnedRespect,hack:i.hack,str:i.str,def:i.def,dex:i.dex,agi:i.agi,cha:i.cha,hack_exp:i.hack_exp,str_exp:i.str_exp,def_exp:i.def_exp,dex_exp:i.dex_exp,agi_exp:i.agi_exp,cha_exp:i.cha_exp,hack_mult:i.hack_mult,str_mult:i.str_mult,def_mult:i.def_mult,dex_mult:i.dex_mult,agi_mult:i.agi_mult,cha_mult:i.cha_mult,hack_asc_mult:i.calculateAscensionMult(i.hack_asc_points),str_asc_mult:i.calculateAscensionMult(i.str_asc_points),def_asc_mult:i.calculateAscensionMult(i.def_asc_points),dex_asc_mult:i.calculateAscensionMult(i.dex_asc_points),agi_asc_mult:i.calculateAscensionMult(i.agi_asc_points),cha_asc_mult:i.calculateAscensionMult(i.cha_asc_points),hack_asc_points:i.hack_asc_points,str_asc_points:i.str_asc_points,def_asc_points:i.def_asc_points,dex_asc_points:i.dex_asc_points,agi_asc_points:i.agi_asc_points,cha_asc_points:i.cha_asc_points,upgrades:i.upgrades.slice(),augmentations:i.augmentations.slice(),respectGain:i.calculateRespectGain(r),wantedLevelGain:i.calculateWantedLevelGain(r),moneyGain:i.calculateMoneyGain(r)}},canRecruitMember:function(){a.updateDynamicRam("canRecruitMember",Object(n.c)("gang","canRecruitMember")),l("canRecruitMember");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return t.canRecruitMember()},recruitMember:function(r){a.updateDynamicRam("recruitMember",Object(n.c)("gang","recruitMember")),l("recruitMember");const i=e.gang;if(null===i)throw new Error("Should not be called without Gang");const o=i.recruitMember(r);return o?t.log("gang.recruitMember",()=>`Successfully recruited Gang Member '${r}'`):t.log("gang.recruitMember",()=>`Failed to recruit Gang Member '${r}'`),o},getTaskNames:function(){a.updateDynamicRam("getTaskNames",Object(n.c)("gang","getTaskNames")),l("getTaskNames");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");const r=t.getAllTaskNames();return r.unshift("Unassigned"),r},setMemberTask:function(e,r){a.updateDynamicRam("setMemberTask",Object(n.c)("gang","setMemberTask")),l("setMemberTask");const i=c("setMemberTask",e).assignToTask(r);return i?t.log("gang.setMemberTask",()=>`Successfully assigned Gang Member '${e}' to '${r}' task`):t.log("gang.setMemberTask",()=>`Failed to assign Gang Member '${e}' to '${r}' task. '${e}' is now Unassigned`),i},getTaskStats:function(e){a.updateDynamicRam("getTaskStats",Object(n.c)("gang","getTaskStats")),l("getTaskStats");const t=function(e,t){const n=o.a[t];if(!n)throw a.makeRuntimeErrorMsg("gang."+e,`Invalid task: '${t}'`);return n}("getTaskStats",e),r=Object.assign({},t);return r.territory=Object.assign({},t.territory),r},getEquipmentNames:function(){return a.updateDynamicRam("getEquipmentNames",Object(n.c)("gang","getEquipmentNames")),l("getEquipmentNames"),Object.keys(s.a)},getEquipmentCost:function(t){a.updateDynamicRam("getEquipmentCost",Object(n.c)("gang","getEquipmentCost")),l("getEquipmentCost");const r=e.gang;if(null===r)throw new Error("Should not be called without Gang");const i=s.a[t];return null===i?1/0:r.getUpgradeCost(i)},getEquipmentType:function(e){a.updateDynamicRam("getEquipmentType",Object(n.c)("gang","getEquipmentType")),l("getEquipmentType");const t=s.a[e];return null==t?"":t.getType()},getEquipmentStats:function(e){a.updateDynamicRam("getEquipmentStats",Object(n.c)("gang","getEquipmentStats")),l("getEquipmentStats");const t=s.a[e];if(!t)throw a.makeRuntimeErrorMsg("getEquipmentStats","Invalid equipment: "+e);const r=t.mults;return Object.assign({},r)},purchaseEquipment:function(r,i){a.updateDynamicRam("purchaseEquipment",Object(n.c)("gang","purchaseEquipment")),l("purchaseEquipment");const o=e.gang;if(null===o)throw new Error("Should not be called without Gang");const u=c("purchaseEquipment",r),m=s.a[i];if(!m)return!1;const h=u.buyUpgrade(m,e,o);return h?t.log("gang.purchaseEquipment",()=>`Purchased '${i}' for Gang member '${r}'`):t.log("gang.purchaseEquipment",()=>`Failed to purchase '${i}' for Gang member '${r}'`),h},ascendMember:function(r){a.updateDynamicRam("ascendMember",Object(n.c)("gang","ascendMember")),l("ascendMember");const i=e.gang;if(null===i)throw new Error("Should not be called without Gang");const o=c("ascendMember",r);if(o.canAscend())return i.ascendMember(o,t)},getAscensionResult:function(t){a.updateDynamicRam("getAscensionResult",Object(n.c)("gang","getAscensionResult")),l("getAscensionResult");if(null===e.gang)throw new Error("Should not be called without Gang");const r=c("getAscensionResult",t);if(r.canAscend())return{respect:r.earnedRespect,...r.getAscensionResults()}},setTerritoryWarfare:function(r){a.updateDynamicRam("setTerritoryWarfare",Object(n.c)("gang","setTerritoryWarfare")),l("setTerritoryWarfare");const i=e.gang;if(null===i)throw new Error("Should not be called without Gang");r?(i.territoryWarfareEngaged=!0,t.log("gang.setTerritoryWarfare",()=>"Engaging in Gang Territory Warfare")):(i.territoryWarfareEngaged=!1,t.log("gang.setTerritoryWarfare",()=>"Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(t){a.updateDynamicRam("getChanceToWinClash",Object(n.c)("gang","getChanceToWinClash")),l("getChanceToWinClash");const r=e.gang;if(null===r)throw new Error("Should not be called without Gang");if(null==i.a[t])throw a.makeRuntimeErrorMsg("gang.getChanceToWinClash","Invalid gang: "+t);const o=i.a[r.facName].power;return o/(i.a[t].power+o)},getBonusTime:function(){a.updateDynamicRam("getBonusTime",Object(n.c)("gang","getBonusTime")),l("getBonusTime");const t=e.gang;if(null===t)throw new Error("Should not be called without Gang");return Math.round(t.storedCycles/5)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(14),r=a(166),i=a(74),o=a(72),s=a(513),l=a(20),c=a(333);function u(e,t,a){const u=function(t){if(10!==e.bitNodeN&&!i.a[10])throw a.makeRuntimeErrorMsg("sleeve."+t,"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")},m=function(n,r){if(r>=e.sleeves.length||r<0){const e="Invalid sleeve number: "+r;throw t.log(n,()=>e),a.makeRuntimeErrorMsg("sleeve."+n,e)}};return{getNumSleeves:function(){return a.updateDynamicRam("getNumSleeves",Object(n.c)("sleeve","getNumSleeves")),u("getNumSleeves"),e.sleeves.length},setToShockRecovery:function(t=0){const r=a.number("setToShockRecovery","sleeveNumber",t);return a.updateDynamicRam("setToShockRecovery",Object(n.c)("sleeve","setToShockRecovery")),u("setToShockRecovery"),m("setToShockRecovery",r),e.sleeves[r].shockRecovery(e)},setToSynchronize:function(t=0){const r=a.number("setToSynchronize","sleeveNumber",t);return a.updateDynamicRam("setToSynchronize",Object(n.c)("sleeve","setToSynchronize")),u("setToSynchronize"),m("setToSynchronize",r),e.sleeves[r].synchronize(e)},setToCommitCrime:function(t=0,r=""){const i=a.number("setToCommitCrime","sleeveNumber",t),o=a.string("setToCommitCrime","crimeName",r);a.updateDynamicRam("setToCommitCrime",Object(n.c)("sleeve","setToCommitCrime")),u("setToCommitCrime"),m("setToCommitCrime",i);const s=Object(c.b)(o);return null!==s&&e.sleeves[i].commitCrime(e,s.name)},setToUniversityCourse:function(t=0,r="",i=""){const o=a.number("setToUniversityCourse","sleeveNumber",t),s=a.string("setToUniversityCourse","universityName",r),l=a.string("setToUniversityCourse","className",i);return a.updateDynamicRam("setToUniversityCourse",Object(n.c)("sleeve","setToUniversityCourse")),u("setToUniversityCourse"),m("setToUniversityCourse",o),e.sleeves[o].takeUniversityCourse(e,s,l)},travel:function(t=0,r=""){const i=a.number("travel","sleeveNumber",t),o=a.string("setToUniversityCourse","cityName",r);return a.updateDynamicRam("travel",Object(n.c)("sleeve","travel")),u("travel"),m("travel",i),e.sleeves[i].travel(e,o)},setToCompanyWork:function(t=0,r=""){const i=a.number("setToCompanyWork","sleeveNumber",t),s=a.string("setToUniversityCourse","companyName",r);a.updateDynamicRam("setToCompanyWork",Object(n.c)("sleeve","setToCompanyWork")),u("setToCompanyWork"),m("setToCompanyWork",i);for(let t=0;t=e.hacknetNodes.length)throw a.makeRuntimeErrorMsg(n,"Index specified for Hacknet Node is out-of-bounds: "+t);if(Object(r.g)(e)){const r=e.hacknetNodes[t];if("string"!=typeof r)throw new Error("hacknet node was not a string");const o=Object(s.d)(r);if(!(o instanceof i.a))throw new Error("hacknet server was not actually hacknet server");if(null==o)throw a.makeRuntimeErrorMsg(n,`Could not get Hacknet Server for index ${t}. This is probably a bug, please report to game dev`);return o}{const a=e.hacknetNodes[t];if(!(a instanceof o.a))throw new Error("hacknet node was not node.");return a}};return{numNodes:function(){return e.hacknetNodes.length},maxNumNodes:function(){return Object(r.g)(e)?n.b.MaxServers:1/0},purchaseNode:function(){return Object(r.l)(e)},getPurchaseNodeCost:function(){return Object(r.g)(e)?Object(r.b)(e):Object(r.a)(e)},getNodeStats:function(t){const a=l(t,"getNodeStats"),n=Object(r.g)(e),o={name:a instanceof i.a?a.hostname:a.name,level:a.level,ram:a instanceof i.a?a.maxRam:a.ram,ramUsed:a instanceof i.a?a.ramUsed:void 0,cores:a.cores,production:a instanceof i.a?a.hashRate:a.moneyGainRatePerSecond,timeOnline:a.onlineTimeSeconds,totalProduction:a instanceof i.a?a.totalHashesGenerated:a.totalMoneyGenerated};return n&&a instanceof i.a&&(o.cache=a.cache,o.hashCapacity=a.hashCapacity),o},upgradeLevel:function(t,a){const n=l(t,"upgradeLevel");return Object(r.n)(e,n,a)},upgradeRam:function(t,a){const n=l(t,"upgradeRam");return Object(r.o)(e,n,a)},upgradeCore:function(t,a){const n=l(t,"upgradeCore");return Object(r.k)(e,n,a)},upgradeCache:function(a,n){if(!Object(r.g)(e))return!1;const o=l(a,"upgradeCache");if(!(o instanceof i.a))return t.log("upgradeCache",()=>"Can only be called on hacknet servers"),!1;const s=Object(r.j)(e,o,n);return s&&Object(r.p)(e),s},getLevelUpgradeCost:function(t,a){return l(t,"upgradeLevel").calculateLevelUpgradeCost(a,e.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(t,a){return l(t,"upgradeRam").calculateRamUpgradeCost(a,e.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(t,a){return l(t,"upgradeCore").calculateCoreUpgradeCost(a,e.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(a,n){if(!Object(r.g)(e))return 1/0;const o=l(a,"upgradeCache");return o instanceof i.a?o.calculateCacheUpgradeCost(n):(t.log("getCacheUpgradeCost",()=>"Can only be called on hacknet servers"),-1)},numHashes:function(){return Object(r.g)(e)?e.hashManager.hashes:0},hashCapacity:function(){return Object(r.g)(e)?e.hashManager.capacity:0},hashCost:function(t){return Object(r.g)(e)?e.hashManager.getUpgradeCost(t):1/0},spendHashes:function(t,a){return!!Object(r.g)(e)&&Object(r.m)(e,t,a)},getHashUpgradeLevel:function(t){const n=e.hashManager.upgrades[t];if(void 0===n)throw a.makeRuntimeErrorMsg("hacknet.hashUpgradeLevel","Invalid Hash Upgrade: "+t);return n},getStudyMult:function(){return Object(r.g)(e)?e.hashManager.getStudyMult():1},getTrainingMult:function(){return Object(r.g)(e)?e.hashManager.getTrainingMult():1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(107),r=a(14),i=a(105),o=a(221),s=a(6);function l(e,t,a){function l(t){e.hasAugmentation(s.a.StaneksGift1,!0)||a.makeRuntimeErrorMsg(t,"Requires Stanek's Gift installed.")}return{width:function(){return i.b.width()},height:function(){return i.b.height()},charge:function(o,s){const c=a.number("stanek.charge","rootX",o),u=a.number("stanek.charge","rootY",s);a.updateDynamicRam("charge",Object(r.c)("stanek","charge")),l("charge");const m=i.b.findFragment(c,u);if(!m)throw a.makeRuntimeErrorMsg("stanek.charge",`No fragment with root (${c}, ${u}).`);const h=i.b.inBonus()?200:1e3;return Object(n.c)(h,t).then((function(){if(t.env.stopFlag)return Promise.reject(t);const a=i.b.charge(e,m,t.scriptRef.threads);return t.log("stanek.charge",()=>`Charged fragment for ${a} charge.`),Promise.resolve()}))},fragmentDefinitions:function(){return a.updateDynamicRam("fragmentDefinitions",Object(r.c)("stanek","fragmentDefinitions")),l("fragmentDefinitions"),t.log("stanek.fragmentDefinitions",()=>`Returned ${o.c.length} fragments`),o.c.map(e=>e.copy())},activeFragments:function(){return a.updateDynamicRam("activeFragments",Object(r.c)("stanek","activeFragments")),l("activeFragments"),t.log("stanek.activeFragments",()=>`Returned ${i.b.fragments.length} fragments`),i.b.fragments.map(e=>({...e.copy(),...e.fragment().copy()}))},clear:function(){a.updateDynamicRam("clear",Object(r.c)("stanek","clear")),l("clear"),t.log("stanek.clear",()=>"Cleared Stanek's Gift."),i.b.clear()},canPlace:function(e,t,n,s){const c=a.number("stanek.canPlace","rootX",e),u=a.number("stanek.canPlace","rootY",t),m=a.number("stanek.canPlace","rotation",n),h=a.number("stanek.canPlace","fragmentId",s);a.updateDynamicRam("canPlace",Object(r.c)("stanek","canPlace")),l("canPlace");const p=Object(o.b)(h);if(!p)throw a.makeRuntimeErrorMsg("stanek.canPlace","Invalid fragment id: "+h);return i.b.canPlace(c,u,m,p)},place:function(e,t,n,s){const c=a.number("stanek.place","rootX",e),u=a.number("stanek.place","rootY",t),m=a.number("stanek.place","rotation",n),h=a.number("stanek.place","fragmentId",s);a.updateDynamicRam("place",Object(r.c)("stanek","place")),l("place");const p=Object(o.b)(h);if(!p)throw a.makeRuntimeErrorMsg("stanek.place","Invalid fragment id: "+h);return i.b.place(c,u,m,p)},get:function(e,t){const n=a.number("stanek.get","rootX",e),o=a.number("stanek.get","rootY",t);a.updateDynamicRam("get",Object(r.c)("stanek","get")),l("get");const s=i.b.findFragment(n,o);if(void 0!==s)return s.copy()},remove:function(e,t){const n=a.number("stanek.remove","rootX",e),o=a.number("stanek.remove","rootY",t);return a.updateDynamicRam("remove",Object(r.c)("stanek","remove")),l("remove"),i.b.delete(n,o)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(5);function r(e,t,a,r){return 1+Math.log(e+1)/(100*Math.log(1.8))*Math.pow((t+1)/5,.07)*a*r*n.a.StaneksGiftPowerMultiplier}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={RAMBonus:.1,BaseSize:9}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(214),r=a(14),i=a(5);function o(e,t,a){const o=function(t,r=!1){const i=e.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");if(!(7===e.bitNodeN||e.sourceFiles.some(e=>7===e.n))){const e="You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.";throw a.makeRuntimeErrorMsg("bladeburner."+t,e)}if(!r){if(!(i instanceof n.a)){const e="You must be a member of the Bladeburner division to use this API.";throw a.makeRuntimeErrorMsg("bladeburner."+t,e)}}},s=function(t,n){const r=e.bladeburner;if(null===r)throw new Error("Must have joined bladeburner");if(!r.cities.hasOwnProperty(n))throw a.makeRuntimeErrorMsg("bladeburner."+t,"Invalid city: "+n)},l=function(t,n,r){const i=e.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");const o=i.getActionIdFromTypeAndName(n,r);if(!o)throw a.makeRuntimeErrorMsg("bladeburner."+t,`Invalid action type='${n}', name='${r}'`);const s=i.getActionObject(o);if(!s)throw a.makeRuntimeErrorMsg("bladeburner."+t,`Invalid action type='${n}', name='${r}'`);return s};return{getContractNames:function(){a.updateDynamicRam("getContractNames",Object(r.c)("bladeburner","getContractNames")),o("getContractNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getContractNamesNetscriptFn()},getOperationNames:function(){a.updateDynamicRam("getOperationNames",Object(r.c)("bladeburner","getOperationNames")),o("getOperationNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getOperationNamesNetscriptFn()},getBlackOpNames:function(){a.updateDynamicRam("getBlackOpNames",Object(r.c)("bladeburner","getBlackOpNames")),o("getBlackOpNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e=""){a.updateDynamicRam("getBlackOpRank",Object(r.c)("bladeburner","getBlackOpRank")),o("getBlackOpRank");return l("getBlackOpRank","blackops",e).reqdRank},getGeneralActionNames:function(){a.updateDynamicRam("getGeneralActionNames",Object(r.c)("bladeburner","getGeneralActionNames")),o("getGeneralActionNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){a.updateDynamicRam("getSkillNames",Object(r.c)("bladeburner","getSkillNames")),o("getSkillNames");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getSkillNamesNetscriptFn()},startAction:function(n="",i=""){a.updateDynamicRam("startAction",Object(r.c)("bladeburner","startAction")),o("startAction");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.startActionNetscriptFn(e,n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.startAction",e)}},stopBladeburnerAction:function(){a.updateDynamicRam("stopBladeburnerAction",Object(r.c)("bladeburner","stopBladeburnerAction")),o("stopBladeburnerAction");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.resetAction()},getCurrentAction:function(){a.updateDynamicRam("getCurrentAction",Object(r.c)("bladeburner","getCurrentAction")),o("getCurrentAction");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.getTypeAndNameFromActionId(t.action)},getActionTime:function(n="",i=""){a.updateDynamicRam("getActionTime",Object(r.c)("bladeburner","getActionTime")),o("getActionTime");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getActionTimeNetscriptFn(e,n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getActionTime",e)}},getActionEstimatedSuccessChance:function(n="",i=""){a.updateDynamicRam("getActionEstimatedSuccessChance",Object(r.c)("bladeburner","getActionEstimatedSuccessChance")),o("getActionEstimatedSuccessChance");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getActionEstimatedSuccessChanceNetscriptFn(e,n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getActionEstimatedSuccessChance",e)}},getActionRepGain:function(e="",t="",n){a.updateDynamicRam("getActionRepGain",Object(r.c)("bladeburner","getActionRepGain")),o("getActionRepGain");const s=l("getActionRepGain",e,t);let c;return c=null==n||isNaN(n)?Math.pow(s.rewardFac,s.level-1):Math.pow(s.rewardFac,n-1),s.rankGain*c*i.a.BladeburnerRank},getActionCountRemaining:function(n="",i=""){a.updateDynamicRam("getActionCountRemaining",Object(r.c)("bladeburner","getActionCountRemaining")),o("getActionCountRemaining");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getActionCountRemainingNetscriptFn(n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getActionCountRemaining",e)}},getActionMaxLevel:function(e="",t=""){a.updateDynamicRam("getActionMaxLevel",Object(r.c)("bladeburner","getActionMaxLevel")),o("getActionMaxLevel");return l("getActionMaxLevel",e,t).maxLevel},getActionCurrentLevel:function(e="",t=""){a.updateDynamicRam("getActionCurrentLevel",Object(r.c)("bladeburner","getActionCurrentLevel")),o("getActionCurrentLevel");return l("getActionCurrentLevel",e,t).level},getActionAutolevel:function(e="",t=""){a.updateDynamicRam("getActionAutolevel",Object(r.c)("bladeburner","getActionAutolevel")),o("getActionAutolevel");return l("getActionCurrentLevel",e,t).autoLevel},setActionAutolevel:function(e="",t="",n=!0){a.updateDynamicRam("setActionAutolevel",Object(r.c)("bladeburner","setActionAutolevel")),o("setActionAutolevel");l("setActionAutolevel",e,t).autoLevel=n},setActionLevel:function(e="",t="",n=1){a.updateDynamicRam("setActionLevel",Object(r.c)("bladeburner","setActionLevel")),o("setActionLevel");const i=l("setActionLevel",e,t);if(n<1||n>i.maxLevel)throw a.makeRuntimeErrorMsg("bladeburner.setActionLevel",`Level must be between 1 and ${i.maxLevel}, is ${n}`);i.level=n},getRank:function(){a.updateDynamicRam("getRank",Object(r.c)("bladeburner","getRank")),o("getRank");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.rank},getSkillPoints:function(){a.updateDynamicRam("getSkillPoints",Object(r.c)("bladeburner","getSkillPoints")),o("getSkillPoints");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.skillPoints},getSkillLevel:function(n=""){a.updateDynamicRam("getSkillLevel",Object(r.c)("bladeburner","getSkillLevel")),o("getSkillLevel");const i=e.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");try{return i.getSkillLevelNetscriptFn(n,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getSkillLevel",e)}},getSkillUpgradeCost:function(n=""){a.updateDynamicRam("getSkillUpgradeCost",Object(r.c)("bladeburner","getSkillUpgradeCost")),o("getSkillUpgradeCost");const i=e.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");try{return i.getSkillUpgradeCostNetscriptFn(n,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getSkillUpgradeCost",e)}},upgradeSkill:function(n){a.updateDynamicRam("upgradeSkill",Object(r.c)("bladeburner","upgradeSkill")),o("upgradeSkill");const i=e.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");try{return i.upgradeSkillNetscriptFn(n,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.upgradeSkill",e)}},getTeamSize:function(n="",i=""){a.updateDynamicRam("getTeamSize",Object(r.c)("bladeburner","getTeamSize")),o("getTeamSize");const s=e.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getTeamSizeNetscriptFn(n,i,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.getTeamSize",e)}},setTeamSize:function(n="",i="",s){a.updateDynamicRam("setTeamSize",Object(r.c)("bladeburner","setTeamSize")),o("setTeamSize");const l=e.bladeburner;if(null===l)throw new Error("Should not be called without Bladeburner");try{return l.setTeamSizeNetscriptFn(n,i,s,t)}catch(e){throw a.makeRuntimeErrorMsg("bladeburner.setTeamSize",e)}},getCityEstimatedPopulation:function(t){a.updateDynamicRam("getCityEstimatedPopulation",Object(r.c)("bladeburner","getCityEstimatedPopulation")),o("getCityEstimatedPopulation"),s("getCityEstimatedPopulation",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.cities[t].popEst},getCityCommunities:function(t){a.updateDynamicRam("getCityCommunities",Object(r.c)("bladeburner","getCityCommunities")),o("getCityCommunities"),s("getCityCommunities",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.cities[t].comms},getCityChaos:function(t){a.updateDynamicRam("getCityChaos",Object(r.c)("bladeburner","getCityChaos")),o("getCityChaos"),s("getCityChaos",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.cities[t].chaos},getCity:function(){a.updateDynamicRam("getCity",Object(r.c)("bladeburner","getCity")),o("getCityChaos");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return t.city},switchCity:function(t){a.updateDynamicRam("switchCity",Object(r.c)("bladeburner","switchCity")),o("switchCity"),s("switchCity",t);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.city=t},getStamina:function(){a.updateDynamicRam("getStamina",Object(r.c)("bladeburner","getStamina")),o("getStamina");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return[t.stamina,t.maxStamina]},joinBladeburnerFaction:function(){a.updateDynamicRam("joinBladeburnerFaction",Object(r.c)("bladeburner","joinBladeburnerFaction")),o("joinBladeburnerFaction",!0);const n=e.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.joinBladeburnerFactionNetscriptFn(t)},joinBladeburnerDivision:function(){return a.updateDynamicRam("joinBladeburnerDivision",Object(r.c)("bladeburner","joinBladeburnerDivision")),(7===e.bitNodeN||e.sourceFileLvl(7)>0)&&(8!==e.bitNodeN&&(e.bladeburner instanceof n.a||(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100?(e.bladeburner=new n.a(e),t.log("joinBladeburnerDivision",()=>"You have been accepted into the Bladeburner division"),!0):(t.log("joinBladeburnerDivision",()=>"You do not meet the requirements for joining the Bladeburner division"),!1))))},getBonusTime:function(){a.updateDynamicRam("getBonusTime",Object(r.c)("bladeburner","getBonusTime")),o("getBonusTime");const t=e.bladeburner;if(null===t)throw new Error("Should not be called without Bladeburner");return Math.round(t.storedCycles/5)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(14),r=a(794);function i(e,t,a){const i=function(e,t,n){const r=a.getServer(t,e).getContract(n);if(null==r)throw a.makeRuntimeErrorMsg("codingcontract."+e,`Cannot find contract '${n}' on server '${t}'`);return r};return{attempt:function(o,s,l=t.hostname,{returnReward:c}={}){a.updateDynamicRam("attempt",Object(n.c)("codingcontract","attempt"));const u=i("attempt",l,s);if(Object(r.a)(o)){const e=[];for(let t=0;t`Successfully completed Coding Contract '${s}'. Reward: ${a}`),h.removeContract(s),!c||a}return++u.tries,u.tries>=u.getMaxNumTries()?(t.log("attempt",()=>`Coding Contract attempt '${s}' failed. Contract is now self-destructing`),h.removeContract(s)):t.log("attempt",()=>`Coding Contract attempt '${s}' failed. ${u.getMaxNumTries()-u.tries} attempts remaining.`),!!c&&""},getContractType:function(e,r=t.hostname){a.updateDynamicRam("getContractType",Object(n.c)("codingcontract","getContractType"));return i("getContractType",r,e).getType()},getData:function(e,r=t.hostname){a.updateDynamicRam("getData",Object(n.c)("codingcontract","getData"));const o=i("getData",r,e).getData();if(o.constructor===Array){const e=o.slice();for(let t=0;te.constructor===Array)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(107),r=a(71),i=a(394),o=a(395),s=a(52),l=a(287);function c(e,t,a){function c(){const t=e.corporation;if(null===t)throw new Error("cannot be called without a corporation");return t}function u(e){const t=c().divisions.find(t=>t.name===e);if(void 0===t)throw new Error(`No division named '${e}'`);return t}function m(e,t){const a=u(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 h(e,t){const a=u(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 p(e,t,a){const n=h(e,t).materials[a];if(void 0===n)throw new Error(`Invalid material name: '${a}'`);return n}function d(e,t){const a=u(e).products[t];if(void 0===a)throw new Error(`Invalid product name: '${t}'`);return a}function f(e,t,a){const n=m(e,t).employees.find(e=>e.name===a);if(void 0===n)throw new Error(`Invalid employee name: '${a}'`);return n}function g(t,n){if(null===e.corporation)throw a.makeRuntimeErrorMsg("corporation."+t,"Must own a corporation.");if(n&&!e.corporation.unlockUpgrades[n])throw a.makeRuntimeErrorMsg("corporation."+t,"You do not have access to this API.")}return{...{getWarehouse:function(e,t){g("getWarehouse",7);const n=h(a.string("getWarehouse","divisionName",e),a.string("getWarehouse","cityName",t));return{level:n.level,loc:n.loc,size:n.size,sizeUsed:n.sizeUsed}},getMaterial:function(e,t,n){g("getMaterial",7);const r=p(a.string("getMaterial","divisionName",e),a.string("getMaterial","cityName",t),a.string("getMaterial","materialName",n));return{name:r.name,qty:r.qty,qlt:r.qlt}},getProduct:function(e,t){g("getProduct",7);const n=d(a.string("getProduct","divisionName",e),a.string("getProduct","productName",t));return{name:n.name,dmd:n.dmd,cmp:n.cmp,pCost:n.pCost,sCost:n.sCost}},purchaseWarehouse:function(e,t){g("purchaseWarehouse",7);const n=a.string("purchaseWarehouse","divisionName",e),i=a.string("purchaseWarehouse","cityName",t),o=c();Object(r.m)(o,u(n),i)},upgradeWarehouse:function(e,t){g("upgradeWarehouse",7);const n=a.string("upgradeWarehouse","divisionName",e),i=a.string("upgradeWarehouse","cityName",t),o=c();Object(r.z)(o,u(n),h(n,i))},sellMaterial:function(e,t,n,i,o){g("sellMaterial",7);const s=a.string("sellMaterial","divisionName",e),l=a.string("sellMaterial","cityName",t),c=a.string("sellMaterial","materialName",n),u=a.string("sellMaterial","amt",i),m=a.string("sellMaterial","price",o),h=p(s,l,c);Object(r.o)(h,u,m)},sellProduct:function(e,t,n,i,o,s){g("sellProduct",7);const l=a.string("sellProduct","divisionName",e),c=a.string("sellProduct","cityName",t),u=a.string("sellProduct","productName",n),m=a.string("sellProduct","amt",i),h=a.string("sellProduct","price",o),p=a.boolean(s),f=d(l,u);Object(r.p)(f,c,m,h,p)},discontinueProduct:function(e,t){g("discontinueProduct",7);const n=a.string("discontinueProduct","divisionName",e),r=a.string("discontinueProduct","productName",t);u(n).discontinueProduct(d(n,r))},setSmartSupply:function(e,t,n){g("setSmartSupply",7);const i=a.string("setSmartSupply","divisionName",e),o=a.string("sellProduct","cityName",t),s=a.boolean(n),l=h(i,o);Object(r.u)(l,s)},buyMaterial:function(e,t,n,i){g("buyMaterial",7);const o=a.string("buyMaterial","divisionName",e),s=a.string("buyMaterial","cityName",t),l=a.string("buyMaterial","materialName",n),c=a.number("buyMaterial","amt",i),u=p(o,s,l);Object(r.c)(u,c)},makeProduct:function(e,t,n,i,o){g("makeProduct",7);const s=a.string("makeProduct","divisionName",e),l=a.string("makeProduct","cityName",t),m=a.string("makeProduct","productName",n),h=a.number("makeProduct","designInvest",i),p=a.number("makeProduct","marketingInvest",o),d=c();Object(r.j)(d,u(s),l,m,h,p)},exportMaterial:function(e,t,n,i,o,s){g("exportMaterial",7);const l=a.string("exportMaterial","sourceDivision",e),c=a.string("exportMaterial","sourceCity",t),u=a.string("exportMaterial","targetDivision",n),m=a.string("exportMaterial","targetCity",i),h=a.string("exportMaterial","materialName",o),d=a.string("exportMaterial","amt",s);Object(r.e)(u,m,p(l,c,h),d+"")},cancelExportMaterial:function(e,t,n,i,o,s){g("cancelExportMaterial",7);const l=a.string("cancelExportMaterial","sourceDivision",e),c=a.string("cancelExportMaterial","sourceCity",t),u=a.string("cancelExportMaterial","targetDivision",n),m=a.string("cancelExportMaterial","targetCity",i),h=a.string("cancelExportMaterial","materialName",o),d=a.string("cancelExportMaterial","amt",s);Object(r.d)(u,m,p(l,c,h),d+"")},setMaterialMarketTA1:function(e,t,n,i){g("setMaterialMarketTA1",7);const o=a.string("setMaterialMarketTA1","divisionName",e),s=a.string("setMaterialMarketTA1","cityName",t),l=a.string("setMaterialMarketTA1","materialName",n),c=a.boolean(i);Object(r.q)(p(o,s,l),c)},setMaterialMarketTA2:function(e,t,n,i){g("setMaterialMarketTA2",7);const o=a.string("setMaterialMarketTA2","divisionName",e),s=a.string("setMaterialMarketTA2","cityName",t),l=a.string("setMaterialMarketTA2","materialName",n),c=a.boolean(i);Object(r.r)(p(o,s,l),c)},setProductMarketTA1:function(e,t,n){g("setProductMarketTA1",7);const i=a.string("setProductMarketTA1","divisionName",e),o=a.string("setProductMarketTA1","productName",t),s=a.boolean(n);Object(r.s)(d(i,o),s)},setProductMarketTA2:function(e,t,n){g("setProductMarketTA2",7);const i=a.string("setProductMarketTA2","divisionName",e),o=a.string("setProductMarketTA2","productName",t),s=a.boolean(n);Object(r.t)(d(i,o),s)}},...{assignJob:function(e,i,o,s){g("assignJob",8);const l=a.string("assignJob","divisionName",e),c=a.string("assignJob","cityName",i),u=a.string("assignJob","employeeName",o),m=a.string("assignJob","job",s),h=f(l,c,u);return Object(n.c)(1e3,t).then((function(){return Promise.resolve(Object(r.a)(h,m))}))},hireEmployee:function(e,t){g("hireEmployee",8);return m(a.string("hireEmployee","divisionName",e),a.string("hireEmployee","cityName",t)).hireRandomEmployee()},upgradeOfficeSize:function(e,t,n){g("upgradeOfficeSize",8);const i=a.string("upgradeOfficeSize","divisionName",e),o=a.string("upgradeOfficeSize","cityName",t),s=a.number("upgradeOfficeSize","size",n),l=m(i,o),u=c();Object(r.y)(u,l,s)},throwParty:function(i,o,s){g("throwParty",8);const u=a.string("throwParty","divisionName",i),h=a.string("throwParty","cityName",o),p=a.number("throwParty","costPerEmployee",s),d=m(u,h),f=c();return Object(n.c)(6e4/(e.hacking_speed_mult*Object(l.a)(e.intelligence,1)),t).then((function(){return Promise.resolve(Object(r.w)(f,d,p))}))},buyCoffee:function(i,o){g("buyCoffee",8);const s=a.string("buyCoffee","divisionName",i),h=a.string("buyCoffee","cityName",o),p=c();return Object(n.c)(6e4/(e.hacking_speed_mult*Object(l.a)(e.intelligence,1)),t).then((function(){return Promise.resolve(Object(r.b)(p,u(s),m(s,h)))}))},hireAdVert:function(e){g("hireAdVert",8);const t=a.string("hireAdVert","divisionName",e),n=c();Object(r.f)(n,u(t),m(t,"Sector-12"))},research:function(e,t){g("research",8);const n=a.string("research","divisionName",e),i=a.string("research","researchName",t);Object(r.n)(u(n),i)},getOffice:function(e,t){g("getOffice",8);const n=m(a.string("getOffice","divisionName",e),a.string("getOffice","cityName",t));return{loc:n.loc,size:n.size,minEne:n.minEne,maxEne:n.maxEne,minHap:n.minHap,maxHap:n.maxHap,maxMor:n.maxMor,employees:n.employees.map(e=>e.name),employeeProd:{Operations:n.employeeProd[s.a.Operations],Engineer:n.employeeProd[s.a.Engineer],Business:n.employeeProd[s.a.Business],Management:n.employeeProd[s.a.Management],"Research & Development":n.employeeProd[s.a.RandD],Training:n.employeeProd[s.a.Training]}}},getEmployee:function(e,t,n){g("getEmployee",8);const r=f(a.string("getEmployee","divisionName",e),a.string("getEmployee","cityName",t),a.string("getEmployee","employeeName",n));return{name:r.name,mor:r.mor,hap:r.hap,ene:r.ene,int:r.int,cha:r.cha,exp:r.exp,cre:r.cre,eff:r.eff,sal:r.sal,loc:r.loc,pos:r.pos}}},expandIndustry:function(e,t){g("expandIndustry");const n=a.string("expandIndustry","industryName",e),i=a.string("expandIndustry","divisionName",t),o=c();Object(r.l)(o,n,i)},expandCity:function(e,t){g("expandCity");const n=a.string("expandCity","divisionName",e),i=a.string("expandCity","cityName",t),o=c(),s=u(n);Object(r.k)(o,s,i)},unlockUpgrade:function(e){g("unlockUpgrade");const t=a.string("unlockUpgrade","upgradeName",e),n=c(),o=Object.values(i.a).find(e=>e[2]===t);if(void 0===o)throw new Error(`No upgrade named '${t}'`);Object(r.x)(n,o)},levelUpgrade:function(e){g("levelUpgrade");const t=a.string("levelUpgrade","upgradeName",e),n=c(),i=Object.values(o.a).find(e=>e[4]===t);if(void 0===i)throw new Error(`No upgrade named '${t}'`);Object(r.h)(n,i)},issueDividends:function(e){g("issueDividends");const t=a.number("issueDividends","percent",e),n=c();Object(r.g)(n,t)},getDivision:function(e){g("getDivision");const t=u(a.string("getDivision","divisionName",e)),n=[];for(const e of Object.values(t.offices))0!==e&&n.push(e.loc);return{name:t.name,type:t.type,awareness:t.awareness,popularity:t.popularity,prodMult:t.prodMult,research:t.sciResearch.qty,lastCycleRevenue:t.lastCycleRevenue,lastCycleExpenses:t.lastCycleExpenses,thisCycleRevenue:t.thisCycleRevenue,thisCycleExpenses:t.thisCycleExpenses,upgrades:t.upgrades,cities:n}},getCorporation:function(){g("getCorporation");const e=c();return{name:e.name,funds:e.funds,revenue:e.revenue,expenses:e.expenses,public:e.public,totalShares:e.totalShares,numShares:e.numShares,shareSaleCooldown:e.shareSaleCooldown,issuedShares:e.issuedShares,sharePrice:e.sharePrice,state:e.state+""}}}}},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__(21),_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(23),_IndustryData__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(51),_data_Constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(42),_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(52),_Material__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(175),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(31),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(797),_OfficeSpace__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(334),_Product__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(357),_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(15),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(122),_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(164),_Warehouse__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(219),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(335);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_2__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_5__.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_14__.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_8__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_2__.a.Agriculture,this.lastCycleRevenue=0,this.lastCycleExpenses=0,this.thisCycleRevenue=0,this.thisCycleExpenses=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_13__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.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_2__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_2__.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_3__.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_3__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.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}}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(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=0,this.thisCycleExpenses=0),this.lastCycleRevenue=this.thisCycleRevenue/(e*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses/(e*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.thisCycleRevenue=0,this.thisCycleExpenses=0,this.lastCycleRevenue>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_8__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses+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+n[0],this.thisCycleExpenses=this.thisCycleExpenses+n[1]),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue+n[0],this.thisCycleExpenses=this.thisCycleExpenses+n[1])}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;e0&&(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_3__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.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;in)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_3__.a.SecsPerMarketCycle*marketCycles;let n=0;for(let e=0;e0){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_3__.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].qty0&&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_3__.a.SecsPerMarketCycle*marketCycles)}for(let e=0;emat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_3__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_8__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.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_4__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.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_9__.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_3__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.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_3__.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_12__.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_3__.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].qty0&&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_3__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.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_3__.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_11__.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_11__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,(maxSell+"").toUpperCase());tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.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_3__.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_3__.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=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 s}));var n=a(42),r=a(31),i=a(21),o=a(52);class s{constructor(e={}){var t,a,i;t=this,a="cyclesUntilRaise",i=n.a.CyclesPerEmployeeRaise,a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,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=o.a.Unassigned}process(e=1,t){const a=.003*e,r=a*Math.random();this.exp+=a;const i=a*Math.random();this.pos===o.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.eneObject(u.f)(e),respectGain:function(e,t,a){return Object(u.d)(e,t,a)},wantedLevelGain:function(e,t,a){return Object(u.e)(e,t,a)},moneyGain:function(e,t,a){return Object(u.c)(e,t,a)},ascensionPointsGain:function(e){return Object(u.b)(e)},ascensionMultiplier:function(e){return Object(u.a)(e)}}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(14),r=a(223),i=a(95),o=a(204),s=a(100),l=a(68),c=a(88),u=a(257);function m(e,t,a){const m=function(t){if(!e.hasWseAccount)throw a.makeRuntimeErrorMsg(t,`You don't have WSE Access! Cannot use ${t}()`);if(!e.hasTixApiAccess)throw a.makeRuntimeErrorMsg(t,`You don't have TIX API Access! Cannot use ${t}()`)},h=function(e,t){const n=i.b[e];if(null==n)throw a.makeRuntimeErrorMsg(t,`Invalid stock symbol: '${e}'`);return n};return{getSymbols:function(){return a.updateDynamicRam("getSymbols",Object(n.c)("stock","getSymbols")),m("getSymbols"),Object.values(c.a)},getPrice:function(e){a.updateDynamicRam("getPrice",Object(n.c)("stock","getPrice")),m("getPrice");return h(e,"getPrice").price},getAskPrice:function(e){a.updateDynamicRam("getAskPrice",Object(n.c)("stock","getAskPrice")),m("getAskPrice");return h(e,"getAskPrice").getAskPrice()},getBidPrice:function(e){a.updateDynamicRam("getBidPrice",Object(n.c)("stock","getBidPrice")),m("getBidPrice");return h(e,"getBidPrice").getBidPrice()},getPosition:function(e){a.updateDynamicRam("getPosition",Object(n.c)("stock","getPosition")),m("getPosition");const t=i.b[e];if(null==t)throw a.makeRuntimeErrorMsg("getPosition","Invalid stock symbol: "+e);return[t.playerShares,t.playerAvgPx,t.playerShortShares,t.playerAvgShortPx]},getMaxShares:function(e){a.updateDynamicRam("getMaxShares",Object(n.c)("stock","getMaxShares")),m("getMaxShares");return h(e,"getMaxShares").maxShares},getPurchaseCost:function(e,t,r){a.updateDynamicRam("getPurchaseCost",Object(n.c)("stock","getPurchaseCost")),m("getPurchaseCost");const i=h(e,"getPurchaseCost");let s;t=Math.round(t);const c=r.toLowerCase();if(c.includes("l"))s=l.a.Long;else{if(!c.includes("s"))return 1/0;s=l.a.Short}const u=Object(o.b)(i,t,s);return null==u?1/0:u},getSaleGain:function(e,t,r){a.updateDynamicRam("getSaleGain",Object(n.c)("stock","getSaleGain")),m("getSaleGain");const i=h(e,"getSaleGain");let s;t=Math.round(t);const c=r.toLowerCase();if(c.includes("l"))s=l.a.Long;else{if(!c.includes("s"))return 0;s=l.a.Short}const u=Object(o.c)(i,t,s);return null==u?0:u},buy:function(e,i){a.updateDynamicRam("buy",Object(n.c)("stock","buy")),m("buy");const o=h(e,"buy");return Object(r.a)(o,i,t,{})?o.getAskPrice():0},sell:function(e,i){a.updateDynamicRam("sell",Object(n.c)("stock","sell")),m("sell");const o=h(e,"sell");return Object(r.c)(o,i,t,{})?o.getBidPrice():0},short:function(i,o){if(a.updateDynamicRam("short",Object(n.c)("stock","short")),m("short"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=1)throw a.makeRuntimeErrorMsg("short","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const s=h(i,"short");return Object(r.d)(s,o,t,{})?s.getBidPrice():0},sellShort:function(i,o){if(a.updateDynamicRam("sellShort",Object(n.c)("stock","sellShort")),m("sellShort"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=1)throw a.makeRuntimeErrorMsg("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const s=h(i,"sellShort");return Object(r.b)(s,o,t,{})?s.getAskPrice():0},placeOrder:function(r,o,c,u,p){if(a.updateDynamicRam("placeOrder",Object(n.c)("stock","placeOrder")),m("placeOrder"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const d=h(r,"placeOrder");let f,g;const y=u.toLowerCase();if(y.includes("limit")&&y.includes("buy"))f=s.a.LimitBuy;else if(y.includes("limit")&&y.includes("sell"))f=s.a.LimitSell;else if(y.includes("stop")&&y.includes("buy"))f=s.a.StopBuy;else{if(!y.includes("stop")||!y.includes("sell"))throw a.makeRuntimeErrorMsg("placeOrder","Invalid order type: "+u);f=s.a.StopSell}const b=p.toLowerCase();if(b.includes("l"))g=l.a.Long;else{if(!b.includes("s"))throw a.makeRuntimeErrorMsg("placeOrder","Invalid position type: "+p);g=l.a.Short}return Object(i.j)(d,o,c,f,g,t)},cancelOrder:function(r,o,c,u,p){if(a.updateDynamicRam("cancelOrder",Object(n.c)("stock","cancelOrder")),m("cancelOrder"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const d=h(r,"cancelOrder");if(isNaN(o)||isNaN(c))throw a.makeRuntimeErrorMsg("cancelOrder",`Invalid shares or price. Must be numeric. shares=${o}, price=${c}`);let f,g;const y=u.toLowerCase();if(y.includes("limit")&&y.includes("buy"))f=s.a.LimitBuy;else if(y.includes("limit")&&y.includes("sell"))f=s.a.LimitSell;else if(y.includes("stop")&&y.includes("buy"))f=s.a.StopBuy;else{if(!y.includes("stop")||!y.includes("sell"))throw a.makeRuntimeErrorMsg("cancelOrder","Invalid order type: "+u);f=s.a.StopSell}const b=p.toLowerCase();if(b.includes("l"))g=l.a.Long;else{if(!b.includes("s"))throw a.makeRuntimeErrorMsg("cancelOrder","Invalid position type: "+p);g=l.a.Short}const E={stock:d,shares:o,price:c,type:f,pos:g};return Object(i.c)(E,t)},getOrders:function(){if(a.updateDynamicRam("getOrders",Object(n.c)("stock","getOrders")),m("getOrders"),8!==e.bitNodeN&&e.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("getOrders","You must either be in BitNode-8 or have Source-File 8 Level 3.");const t={},r=i.a.Orders;for(const e in r){const a=r[e];if(a.constructor===Array&&a.length>0){t[e]=[];for(let n=0;n"Already purchased 4S Market Data."),!0):e.money"Not enough money to purchase 4S Market Data."),!1):(e.has4SData=!0,e.loseMoney(Object(u.a)(),"stock"),t.log("stock.purchase4SMarketData",()=>"Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){return a.updateDynamicRam("purchase4SMarketDataTixApi",Object(n.c)("stock","purchase4SMarketDataTixApi")),m("purchase4SMarketDataTixApi"),e.has4SDataTixApi?(t.log("stock.purchase4SMarketDataTixApi",()=>"Already purchased 4S Market Data TIX API"),!0):e.money"Not enough money to purchase 4S Market Data TIX API"),!1):(e.has4SDataTixApi=!0,e.loseMoney(Object(u.b)(),"stock"),t.log("stock.purchase4SMarketDataTixApi",()=>"Purchased 4S Market Data TIX API"),!0)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return G}));var n=a(113),r=a(144),i=a(20),o=a(140),s=a(321),l=a(6),c=a(131),u=a(8),m=a(122),h=a(14),p=a(324),d=a(333),f=a(322),g=a(86),y=a(291),b=a(67),E=a(23),k=a(9),v=a(108),_=a(92),w=a(25),S=a(227),C=a(27),x=a(60),O=a(4),M=a(5),T=a(215),R=a(61),A=a(24),P=a(107),N=a(22),I=a(119),F=a(93),D=a(89),j=a(45),B=a(409);function G(e,t,a){const G=function(e,t){if(!Object(o.b)(t))throw a.makeRuntimeErrorMsg(e,`Invalid augmentation: '${t}'`);return i.a[t]},L=function(e,t){if(!Object(A.b)(t))throw a.makeRuntimeErrorMsg(e,"Invalid faction name: '"+t);return A.a[t]},W=function(e,t){const n=R.a[t];if(null==n||!(n instanceof T.a))throw a.makeRuntimeErrorMsg(e,`Invalid company name: '${t}'`);return n},H=function(t=null){if(t&&Object(m.a)(t)){const a=e.getHomeComputer();for(const e of a.scripts)if(e.filename===t){if(e.ramUsage>a.maxRam-a.ramUsed)return;const t=new p.a(e,[]);t.threads=1,Object(r.e)(t,a)}}};return{getOwnedAugmentations:function(t=!1){a.updateDynamicRam("getOwnedAugmentations",Object(h.c)("getOwnedAugmentations")),a.checkSingularityAccess("getOwnedAugmentations",3);const n=[];for(let t=0;t`Faction '${r}' does not have the '${o}' augmentation.`),!1;if(!(c.name===l.a.NeuroFluxGovernor)){for(let a=0;a`You already have the '${o}' augmentation.`),!1;for(let a=0;a`You already have the '${o}' augmentation.`),!1}if(s.playerReputation`You do not have enough reputation with '${s.name}'.`),!1;const d=Object(n.f)(c,s,!0);return t.log("purchaseAugmentation",()=>d),!(!Object(m.a)(d)||!d.startsWith("You purchased"))&&(e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),!0)},softReset:function(e){a.updateDynamicRam("softReset",Object(h.c)("softReset")),a.checkSingularityAccess("softReset",3),t.log("softReset",()=>"Soft resetting. This will cause this script to be killed"),setTimeout(()=>{Object(s.a)(),H(e)},0),t.running=!1,Object(c.a)(t)},installAugmentations:function(n){if(a.updateDynamicRam("installAugmentations",Object(h.c)("installAugmentations")),a.checkSingularityAccess("installAugmentations",3),0===e.queuedAugmentations.length)return t.log("installAugmentations",()=>"You do not have any Augmentations to be installed."),!1;e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("installAugmentations",()=>"Installing Augmentations. This will cause this script to be killed"),setTimeout(()=>{Object(o.d)(),H(n)},0),t.running=!1,Object(c.a)(t)},goToLocation:function(n){a.updateDynamicRam("goToLocation",Object(h.c)("goToLocation")),a.checkSingularityAccess("goToLocation",1);const r=Object.values(S.a).find(e=>e.name===n);return r?e.city!==r.city?(t.log("goToLocation",()=>`No location named ${n} in ${e.city}`),!1):(v.b.toLocation(r),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain/100),!0):(t.log("goToLocation",()=>"No location named "+n),!1)},universityCourse:function(n,r){if(a.updateDynamicRam("universityCourse",Object(h.c)("universityCourse")),a.checkSingularityAccess("universityCourse",1),e.isWorking){const a=e.singularityStopWork();t.log("universityCourse",()=>a)}let i,o;switch(n.toLowerCase()){case k.a.AevumSummitUniversity.toLowerCase():if(e.city!=E.a.Aevum)return t.log("universityCourse",()=>"You cannot study at 'Summit University' because you are not in 'Aevum'."),!1;e.gotoLocation(k.a.AevumSummitUniversity),i=4,o=3;break;case k.a.Sector12RothmanUniversity.toLowerCase():if(e.city!=E.a.Sector12)return t.log("universityCourse",()=>"You cannot study at 'Rothman University' because you are not in 'Sector-12'."),!1;e.location=k.a.Sector12RothmanUniversity,i=3,o=2;break;case k.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(e.city!=E.a.Volhaven)return t.log("universityCourse",()=>"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'."),!1;e.location=k.a.VolhavenZBInstituteOfTechnology,i=5,o=4;break;default:return t.log("universityCourse",()=>`Invalid university name: '${n}'.`),!1}let s="";switch(r.toLowerCase()){case"Study Computer Science".toLowerCase():s=u.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():s=u.a.ClassDataStructures;break;case"Networks".toLowerCase():s=u.a.ClassNetworks;break;case"Algorithms".toLowerCase():s=u.a.ClassAlgorithms;break;case"Management".toLowerCase():s=u.a.ClassManagement;break;case"Leadership".toLowerCase():s=u.a.ClassLeadership;break;default:return t.log("universityCourse",()=>`Invalid class name: ${r}.`),!1}return e.startClass(v.b,i,o,s),t.log("universityCourse",()=>`Started ${s} at ${n}`),!0},gymWorkout:function(n,r){if(a.updateDynamicRam("gymWorkout",Object(h.c)("gymWorkout")),a.checkSingularityAccess("gymWorkout",1),e.isWorking){const a=e.singularityStopWork();t.log("gymWorkout",()=>a)}let i,o;switch(n.toLowerCase()){case k.a.AevumCrushFitnessGym.toLowerCase():if(e.city!=E.a.Aevum)return t.log("gymWorkout",()=>"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'."),!1;e.location=k.a.AevumCrushFitnessGym,i=3,o=2;break;case k.a.AevumSnapFitnessGym.toLowerCase():if(e.city!=E.a.Aevum)return t.log("gymWorkout",()=>"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'."),!1;e.location=k.a.AevumSnapFitnessGym,i=10,o=5;break;case k.a.Sector12IronGym.toLowerCase():if(e.city!=E.a.Sector12)return t.log("gymWorkout",()=>"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'."),!1;e.location=k.a.Sector12IronGym,i=1,o=1;break;case k.a.Sector12PowerhouseGym.toLowerCase():if(e.city!=E.a.Sector12)return t.log("gymWorkout",()=>"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'."),!1;e.location=k.a.Sector12PowerhouseGym,i=20,o=10;break;case k.a.VolhavenMilleniumFitnessGym.toLowerCase():if(e.city!=E.a.Volhaven)return t.log("gymWorkout",()=>"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'."),!1;e.location=k.a.VolhavenMilleniumFitnessGym,i=7,o=4;break;default:return t.log("gymWorkout",()=>`Invalid gym name: ${n}. gymWorkout() failed`),!1}switch(r.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():e.startClass(v.b,i,o,u.a.ClassGymAgility);break;default:return t.log("gymWorkout",()=>`Invalid stat: ${r}.`),!1}return t.log("gymWorkout",()=>`Started training ${r} at ${n}`),!0},travelToCity:function(n){switch(a.updateDynamicRam("travelToCity",Object(h.c)("travelToCity")),a.checkSingularityAccess("travelToCity",1),n){case E.a.Aevum:case E.a.Chongqing:case E.a.Sector12:case E.a.NewTokyo:case E.a.Ishima:case E.a.Volhaven:if(e.money"Traveled to "+n),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain/50),!0;default:return t.log("travelToCity",()=>`Invalid city name: '${n}'.`),!1}},purchaseTor:function(){if(a.updateDynamicRam("purchaseTor",Object(h.c)("purchaseTor")),a.checkSingularityAccess("purchaseTor",1),e.hasTorRouter())return t.log("purchaseTor",()=>"You already have a TOR router!"),!1;if(e.money"You cannot afford to purchase a Tor router."),!1;e.loseMoney(u.a.TorRouterCost,"other");const n=Object(I.f)({ip:Object(C.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(C.a)(n),e.getHomeComputer().serversOnNetwork.push(n.hostname),n.serversOnNetwork.push(e.getHomeComputer().hostname),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("purchaseTor",()=>"You have purchased a Tor router!"),!0},purchaseProgram:function(n){if(a.updateDynamicRam("purchaseProgram",Object(h.c)("purchaseProgram")),a.checkSingularityAccess("purchaseProgram",1),!e.hasTorRouter())return t.log("purchaseProgram",()=>"You do not have the TOR router."),!1;n=n.toLowerCase();const r=Object.values(y.a).find(e=>e.program.toLowerCase()===n);return null==r?(t.log("purchaseProgram",()=>`Invalid program name: '${n}.`),!1):e.money`Not enough money to purchase '${r.program}'. Need ${O.a.formatMoney(r.price)}`),!1):e.hasProgram(r.program)?(t.log("purchaseProgram",()=>`You already have the '${r.program}' program`),!0):(e.loseMoney(r.price,"other"),e.getHomeComputer().programs.push(r.program),t.log("purchaseProgram",()=>`You have purchased the '${r.program}' program. The new program can be found on your home computer.`),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain/50),!0)},getCurrentServer:function(){return a.updateDynamicRam("getCurrentServer",Object(h.c)("getCurrentServer")),a.checkSingularityAccess("getCurrentServer",1),e.getCurrentServer().hostname},connect:function(t){if(a.updateDynamicRam("connect",Object(h.c)("connect")),a.checkSingularityAccess("connect",1),!t)throw a.makeRuntimeErrorMsg("connect",`Invalid hostname: '${t}'`);const n=Object(C.d)(t);if(null==n)throw a.makeRuntimeErrorMsg("connect",`Invalid hostname: '${t}'`);if("home"===t)return e.getCurrentServer().isConnectedTo=!1,e.currentServer=e.getHomeComputer().hostname,e.getCurrentServer().isConnectedTo=!0,F.a.setcwd("/"),!0;const r=e.getCurrentServer();for(let a=0;a"cannot backdoor this kind of server"),Promise.resolve();const r=n,i=Object(D.d)(r,e)/4*1e3,o=Object(B.b)(r,e);if(!o.res)throw a.makeRuntimeErrorMsg("installBackdoor",o.msg||"");return t.log("installBackdoor",()=>`Installing backdoor on '${r.hostname}' in ${Object(N.b)(i,!0)}`),Object(P.c)(i,t).then((function(){return t.env.stopFlag?Promise.reject(t):(t.log("installBackdoor",()=>`Successfully installed backdoor on '${r.hostname}'`),r.backdoorInstalled=!0,_.a.WorldDaemon===r.hostname&&v.b.toBitVerse(!1,!1),Promise.resolve())}))},getStats:function(){return a.updateDynamicRam("getStats",Object(h.c)("getStats")),a.checkSingularityAccess("getStats",1),t.log("getStats",()=>"getStats is deprecated, please use getplayer"),{hacking:e.hacking,strength:e.strength,defense:e.defense,dexterity:e.dexterity,agility:e.agility,charisma:e.charisma,intelligence:e.intelligence}},getCharacterInformation:function(){return a.updateDynamicRam("getCharacterInformation",Object(h.c)("getCharacterInformation")),a.checkSingularityAccess("getCharacterInformation",1),t.log("getCharacterInformation",()=>"getCharacterInformation is deprecated, please use getplayer"),{bitnode:e.bitNodeN,city:e.city,factions:e.factions.slice(),hp:e.hp,jobs:Object.keys(e.jobs),jobTitles:Object.values(e.jobs),maxHp:e.max_hp,mult:{agility:e.agility_mult,agilityExp:e.agility_exp_mult,companyRep:e.company_rep_mult,crimeMoney:e.crime_money_mult,crimeSuccess:e.crime_success_mult,defense:e.defense_mult,defenseExp:e.defense_exp_mult,dexterity:e.dexterity_mult,dexterityExp:e.dexterity_exp_mult,factionRep:e.faction_rep_mult,hacking:e.hacking_mult,hackingExp:e.hacking_exp_mult,strength:e.strength_mult,strengthExp:e.strength_exp_mult,workMoney:e.work_money_mult},timeWorked:e.timeWorked,tor:e.hasTorRouter(),workHackExpGain:e.workHackExpGained,workStrExpGain:e.workStrExpGained,workDefExpGain:e.workDefExpGained,workDexExpGain:e.workDexExpGained,workAgiExpGain:e.workAgiExpGained,workChaExpGain:e.workChaExpGained,workRepGain:e.workRepGained,workMoneyGain:e.workMoneyGained,hackingExp:e.hacking_exp,strengthExp:e.strength_exp,defenseExp:e.defense_exp,dexterityExp:e.dexterity_exp,agilityExp:e.agility_exp,charismaExp:e.charisma_exp}},hospitalize:function(){if(a.updateDynamicRam("hospitalize",Object(h.c)("hospitalize")),a.checkSingularityAccess("hospitalize",1),!e.isWorking&&v.b.page()!==w.a.Infiltration&&v.b.page()!==w.a.BitVerse)return e.hospitalize();t.log("hospitalize",()=>"Cannot go to the hospital because the player is busy.")},isBusy:function(){return a.updateDynamicRam("isBusy",Object(h.c)("isBusy")),a.checkSingularityAccess("isBusy",1),e.isWorking||v.b.page()===w.a.Infiltration||v.b.page()===w.a.BitVerse},stopAction:function(){if(a.updateDynamicRam("stopAction",Object(h.c)("stopAction")),a.checkSingularityAccess("stopAction",1),e.isWorking){v.b.toTerminal();const a=e.singularityStopWork();return t.log("stopAction",()=>a),!0}return!1},upgradeHomeCores:function(){a.updateDynamicRam("upgradeHomeCores",Object(h.c)("upgradeHomeCores")),a.checkSingularityAccess("upgradeHomeCores",2);const n=e.getHomeComputer();if(n.cpuCores>=8)return t.log("upgradeHomeCores",()=>"Your home computer is at max cores."),!1;const r=e.getUpgradeHomeCoresCost();return e.money"You don't have enough money. Need "+O.a.formatMoney(r)),!1):(n.cpuCores+=1,e.loseMoney(r,"servers"),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeCores",()=>`Purchased an additional core for home computer! It now has ${n.cpuCores} cores.`),!0)},getUpgradeHomeCoresCost:function(){return a.updateDynamicRam("getUpgradeHomeCoresCost",Object(h.c)("getUpgradeHomeCoresCost")),a.checkSingularityAccess("getUpgradeHomeCoresCost",2),e.getUpgradeHomeCoresCost()},upgradeHomeRam:function(){a.updateDynamicRam("upgradeHomeRam",Object(h.c)("upgradeHomeRam")),a.checkSingularityAccess("upgradeHomeRam",2);const n=e.getHomeComputer();if(n.maxRam>=u.a.HomeComputerMaxRam)return t.log("upgradeHomeRam",()=>"Your home computer is at max RAM."),!1;const r=e.getUpgradeHomeRamCost();return e.money"You don't have enough money. Need "+O.a.formatMoney(r)),!1):(n.maxRam*=2,e.loseMoney(r,"servers"),e.gainIntelligenceExp(u.a.IntelligenceSingFnBaseExpGain),t.log("upgradeHomeRam",()=>`Purchased additional RAM for home computer! It now has ${O.a.formatRAM(n.maxRam)} of RAM.`),!0)},getUpgradeHomeRamCost:function(){return a.updateDynamicRam("getUpgradeHomeRamCost",Object(h.c)("getUpgradeHomeRamCost")),a.checkSingularityAccess("getUpgradeHomeRamCost",2),e.getUpgradeHomeRamCost()},workForCompany:function(n){if(a.updateDynamicRam("workForCompany",Object(h.c)("workForCompany")),a.checkSingularityAccess("workForCompany",2),null==n&&(n=e.companyName),null==n||""===n||!(R.a[n]instanceof T.a))return t.log("workForCompany",()=>`Invalid company: '${n}'`),!1;if(!Object.keys(e.jobs).includes(n))return t.log("workForCompany",()=>`You do not have a job at '${n}'`),!1;const r=e.jobs[n],i=g.a[r];if(""===r||!(i instanceof f.a))return t.log("workForCompany",()=>"You do not have a job"),!1;if(e.isWorking){const a=e.singularityStopWork();t.log("workForCompany",()=>a)}return i.isPartTimeJob()?e.startWorkPartTime(v.b,n):e.startWork(v.b,n),t.log("workForCompany",()=>`Began working at '${e.companyName}' as a '${r}'`),!0},applyToCompany:function(n,r){let i;switch(a.updateDynamicRam("applyToCompany",Object(h.c)("applyToCompany")),a.checkSingularityAccess("applyToCompany",2),W("applyToCompany",n),e.location=n,r.toLowerCase()){case"software":i=e.applyForSoftwareJob(!0);break;case"software consultant":i=e.applyForSoftwareConsultantJob(!0);break;case"it":i=e.applyForItJob(!0);break;case"security engineer":i=e.applyForSecurityEngineerJob(!0);break;case"network engineer":i=e.applyForNetworkEngineerJob(!0);break;case"business":i=e.applyForBusinessJob(!0);break;case"business consultant":i=e.applyForBusinessConsultantJob(!0);break;case"security":i=e.applyForSecurityJob(!0);break;case"agent":i=e.applyForAgentJob(!0);break;case"employee":i=e.applyForEmployeeJob(!0);break;case"part-time employee":i=e.applyForPartTimeEmployeeJob(!0);break;case"waiter":i=e.applyForWaiterJob(!0);break;case"part-time waiter":i=e.applyForPartTimeWaiterJob(!0);break;default:return t.log("applyToCompany",()=>`Invalid job: '${r}'.`),!1}return i?t.log("applyToCompany",()=>`You were offered a new job at '${n}' as a '${e.jobs[n]}'`):t.log("applyToCompany",()=>`You failed to get a new job/promotion at '${n}' in the '${r}' field.`),i},getCompanyRep:function(e){a.updateDynamicRam("getCompanyRep",Object(h.c)("getCompanyRep")),a.checkSingularityAccess("getCompanyRep",2);return W("getCompanyRep",e).playerReputation},getCompanyFavor:function(e){a.updateDynamicRam("getCompanyFavor",Object(h.c)("getCompanyFavor")),a.checkSingularityAccess("getCompanyFavor",2);return W("getCompanyFavor",e).favor},getCompanyFavorGain:function(e){a.updateDynamicRam("getCompanyFavorGain",Object(h.c)("getCompanyFavorGain")),a.checkSingularityAccess("getCompanyFavorGain",2);return W("getCompanyFavorGain",e).getFavorGain()},checkFactionInvitations:function(){return a.updateDynamicRam("checkFactionInvitations",Object(h.c)("checkFactionInvitations")),a.checkSingularityAccess("checkFactionInvitations",2),e.factionInvitations.slice()},joinFaction:function(r){if(a.updateDynamicRam("joinFaction",Object(h.c)("joinFaction")),a.checkSingularityAccess("joinFaction",2),L("joinFaction",r),!e.factionInvitations.includes(r))return t.log("joinFaction",()=>`You have not been invited by faction '${r}'`),!1;const i=A.a[r];Object(n.d)(i);for(let t=0;t`Joined the '${r}' faction.`),!0},workForFaction:function(n,r){if(a.updateDynamicRam("workForFaction",Object(h.c)("workForFaction")),a.checkSingularityAccess("workForFaction",2),L("workForFaction",n),e.inGang()&&void 0!==b.a[n])return t.log("workForFaction",()=>`Faction '${n}' does not offer work at the moment.`),!1;if(!e.factions.includes(n))return t.log("workForFaction",()=>`You are not a member of '${n}'`),!1;if(e.isWorking){const a=e.singularityStopWork();t.log("workForFaction",()=>a)}const i=A.a[n],o=["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"],s=["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Tetrads","Slum Snakes"],l=["ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Syndicate","Tetrads","Slum Snakes","Tian Di Hui"];switch(r.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return o.includes(i.name)?(e.startFactionHackWork(v.b,i),t.log("workForFaction",()=>`Started carrying out hacking contracts for '${i.name}'`),!0):(t.log("workForFaction",()=>`Faction '${i.name}' do not need help with hacking contracts.`),!1);case"field":case"fieldwork":case"field work":return s.includes(i.name)?(e.startFactionFieldWork(v.b,i),t.log("workForFaction",()=>`Started carrying out field missions for '${i.name}'`),!0):(t.log("workForFaction",()=>`Faction '${i.name}' do not need help with field missions.`),!1);case"security":case"securitywork":case"security work":return l.includes(i.name)?(e.startFactionSecurityWork(v.b,i),t.log("workForFaction",()=>`Started carrying out security work for '${i.name}'`),!0):(t.log("workForFaction",()=>`Faction '${i.name}' do not need help with security work.`),!1);default:t.log("workForFaction",()=>"Invalid work type: '"+r)}return!0},getFactionRep:function(e){a.updateDynamicRam("getFactionRep",Object(h.c)("getFactionRep")),a.checkSingularityAccess("getFactionRep",2);return L("getFactionRep",e).playerReputation},getFactionFavor:function(e){a.updateDynamicRam("getFactionFavor",Object(h.c)("getFactionFavor")),a.checkSingularityAccess("getFactionFavor",2);return L("getFactionFavor",e).favor},getFactionFavorGain:function(e){a.updateDynamicRam("getFactionFavorGain",Object(h.c)("getFactionFavorGain")),a.checkSingularityAccess("getFactionFavorGain",2);return L("getFactionFavorGain",e).getFavorGain()},donateToFaction:function(n,r){a.updateDynamicRam("donateToFaction",Object(h.c)("donateToFaction")),a.checkSingularityAccess("donateToFaction",3);const i=L("donateToFaction",n);if("number"!=typeof r||r<=0)return t.log("donateToFaction",()=>`Invalid donation amount: '${r}'.`),!1;if(e.money`You do not have enough money to donate ${O.a.formatMoney(r)} to '${n}'`),!1;const o=Math.round(u.a.BaseFavorToDonate*M.a.RepToDonateToFaction);if(i.favor`You do not have enough favor to donate to this faction. Have ${i.favor}, need ${o}`),!1;const s=r/u.a.DonateMoneyToRepDivisor*e.faction_rep_mult;return i.playerReputation+=s,e.loseMoney(r,"other"),t.log("donateToFaction",()=>`${O.a.formatMoney(r)} donated to '${n}' for ${O.a.formatReputation(s)} reputation`),!0},createProgram:function(n){if(a.updateDynamicRam("createProgram",Object(h.c)("createProgram")),a.checkSingularityAccess("createProgram",3),e.isWorking){const a=e.singularityStopWork();t.log("createProgram",()=>a)}n=n.toLowerCase();const r=Object.values(x.a).find(e=>e.name.toLowerCase()===n);if(null==r)return t.log("createProgram",()=>"The specified program does not exist: '"+n),!1;if(e.hasProgram(r.name))return t.log("createProgram",()=>`You already have the '${r.name}' program`),!1;const i=r.create;return null===i?(t.log("createProgram",()=>`You cannot create the '${r.name}' program`),!1):i.req(e)?(e.startCreateProgramWork(v.b,r.name,i.time,i.level),t.log("createProgram",()=>`Began creating program: '${n}'`),!0):(t.log("createProgram",()=>`Hacking level is too low to create '${r.name}' (level ${i.level} req)`),!1)},commitCrime:function(n){if(a.updateDynamicRam("commitCrime",Object(h.c)("commitCrime")),a.checkSingularityAccess("commitCrime",3),e.isWorking){const a=e.singularityStopWork();t.log("commitCrime",()=>a)}e.gotoLocation(k.a.Slums);const r=Object(d.b)(n.toLowerCase());if(null==r)throw a.makeRuntimeErrorMsg("commitCrime",`Invalid crime: '${n}'`);return t.log("commitCrime",()=>`Attempting to commit ${r.name}...`),r.commit(v.b,e,1,t)},getCrimeChance:function(t){a.updateDynamicRam("getCrimeChance",Object(h.c)("getCrimeChance")),a.checkSingularityAccess("getCrimeChance",3);const n=Object(d.b)(t.toLowerCase());if(null==n)throw a.makeRuntimeErrorMsg("getCrimeChance","Invalid crime: "+t);return n.successRate(e)},getCrimeStats:function(e){a.updateDynamicRam("getCrimeStats",Object(h.c)("getCrimeStats")),a.checkSingularityAccess("getCrimeStats",3);const t=Object(d.b)(e.toLowerCase());if(null==t)throw a.makeRuntimeErrorMsg("getCrimeStats","Invalid crime: "+e);return Object.assign({},t)}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(28);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 u}));var n=a(2),r=a(284),i=a(27);const o=[["getHackTime","returns milliseconds"],["getGrowTime","returns milliseconds"],["getWeakenTime","returns milliseconds"],["getActionTime","returns milliseconds"],["hackAnalyzePercent","renamed 'hackAnalyze' and returns decimal"],["hackChance","renamed 'hackAnalyzeChance'"],["basic.calculateSkill","renamed 'skills.calculateSkill'"],["basic.calculateExp","renamed 'skills.calculateExp'"],["basic.hackChance","renamed 'hacking.hackChance'"],["basic.hackExp","renamed 'hacking.hackExp'"],["basic.hackPercent","renamed 'hacking.hackPercent'"],["basic.growPercent","renamed 'hacking.growPercent'"],["basic.hackTime","renamed 'hacking.hackTime'"],["basic.growTime","renamed 'hacking.growTime'"],["basic.weakenTime","renamed 'hacking.weakenTime'"],["write","needs to be awaited"],["scp","needs to be awaited"],["sleep","Can no longer be called simultenaously."],["hacking_skill","renamed 'hacking'"],["tryWrite","renamed 'tryWritePort'"]],s=[[/ns.getHackTime/g,"((...a)=>ns.getHackTime(...a)/1000)"],[/ns.getGrowTime/g,"((...a)=>ns.getGrowTime(...a)/1000)"],[/ns.getWeakenTime/g,"((...a)=>ns.getWeakenTime(...a)/1000)"],[/ns.bladeburner.getActionTime/g,"((...a)=>ns.bladeburner.getActionTime(...a)/1000)"],[/ns.hackAnalyzePercent/g,"((...a)=>ns.hackAnalyze(...a)*100)"],[/ns.hackChance/g,"ns.hackAnalyzeChance"],[/ns.tryWrite/g,"ns.tryWritePort"],[/formulas.basic.calculateSkill/g,"formulas.skills.calculateSkill"],[/formulas.basic.calculateExp/g,"formulas.skills.calculateExp"],[/formulas.basic.hackChance/g,"formulas.hacking.hackChance"],[/formulas.basic.hackExp/g,"formulas.hacking.hackExp"],[/formulas.basic.hackPercent/g,"formulas.hacking.hackPercent"],[/formulas.basic.growPercent/g,"formulas.hacking.growPercent"],[/formulas.basic.hackTime/g,"formulas.hacking.hackTime"],[/formulas.basic.growTime/g,"formulas.hacking.growTime"],[/formulas.basic.weakenTime/g,"formulas.hacking.weakenTime"]];function l(e){for(const t of s)if(e.match(t[0]))return!0;return!1}function c(e){const t=e.split("\n"),a=[];for(let e=0;eObject(T.a)({textfield:{borderBottom:"1px solid "+e.palette.primary.main},code:{whiteSpace:"pre",backgroundColor:e.palette.background.paper}}));function P(){const e=A(),t={[R.f.Start]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...",r.a.createElement("br",null),r.a.createElement("br",null),"This tutorial will show you the basics of the game. You may skip the tutorial at any time.")),canNext:!0},[R.f.GoToCharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's start by heading to the Stats page. Click"),r.a.createElement(f.a,null,r.a.createElement(y.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Stats")),r.a.createElement(o.a,null,"on the main navigation menu (left-hand side of the screen)")),canNext:!1},[R.f.CharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,r.a.createElement(y.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Stats")),r.a.createElement(o.a,null,"shows a lot of important information about your progress, such as your skills, money, and bonuses.")),canNext:!0},[R.f.CharacterGoToTerminalPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's head to your computer's terminal by clicking"),r.a.createElement(f.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal")),r.a.createElement(o.a,null,"on the main navigation menu.")),canNext:!1},[R.f.TerminalIntro]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,r.a.createElement(E.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Terminal")),r.a.createElement(o.a,null,"is used to interface with your home computer as well as all of the other machines around the world.")),canNext:!0},[R.f.TerminalHelp]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's try it out. Start by entering"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"(Don't forget to press Enter after typing the command)")),canNext:!1},[R.f.TerminalLs]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"displays a list of all available Terminal commands, how to use them, and a description of what they do."," ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's try another command. Enter"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> ls")),canNext:!1},[R.f.TerminalScan]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> ls"),r.a.createElement(o.a,null," ","is a basic command that shows files on the computer. Right now, it shows that you have a program called"," ","NUKE.exe on your computer. We'll get to what this does later. ",r.a.createElement("br",null),r.a.createElement("br",null),"Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan")),canNext:!1},[R.f.TerminalScanAnalyze1]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan"),r.a.createElement(o.a,null,"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"That's great and all, but there's so many servers. Which one should you go to?"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"gives some more detailed information about servers on the network. Try it now!")),canNext:!1},[R.f.TerminalScanAnalyze2]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"shows more detailed information about each server that you can connect to (servers that are a distance of one node away). ",r.a.createElement("br",null),r.a.createElement("br",null)," It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the following command:"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze 2")),canNext:!1},[R.f.TerminalConnect]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> connect hostname"),r.a.createElement(o.a,null,"From the results of "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> scan-analyze 2"),r.a.createElement(o.a,null," ","we can see that the n00dles server is only one node away. Let's connect so it now using:"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> connect n00dles")),canNext:!1},[R.f.TerminalAnalyze]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You are now connected to another machine! What can you do now? You can hack it!",r.a.createElement("br",null),r.a.createElement("br",null)," 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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Before you try to hack a server, you should run diagnostics using"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> analyze")),canNext:!1},[R.f.TerminalNuke]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"When "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null,"finishes running it will show useful information about hacking the server. ",r.a.createElement("br",null),r.a.createElement("br",null)," For this server, the required hacking skill is only 1, which means you can hack it right now. However, in order to hack a server you must first gain root access. The NUKE.exe 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."),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null," ","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"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> run NUKE.exe"),r.a.createElement(o.a,null)),canNext:!0},[R.f.TerminalManualHack]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You now have root access! You can hack the server using "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> hack"),r.a.createElement(o.a,null," Try doing that now.")),canNext:!0},[R.f.TerminalHackingMechanics]:{content:r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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. You will need to use"," ",r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> grow"),"and ",r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> weaken")),canNext:!0},[R.f.TerminalGoHome]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"From any server you can get back home using"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[n00dles ~/]> home"),r.a.createElement(o.a,null,"Let's head home before creating our first script!")),canNext:!0},[R.f.TerminalCreateScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"To create a new script or edit an existing one, you can use"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> nano"),r.a.createElement(o.a,null,"Scripts must end with the .script extension. Let's make a script now by entering "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> nano n00dles.script"),r.a.createElement(o.a,null,"after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)")),canNext:!1},[R.f.TerminalTypeScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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: ",r.a.createElement("br",null)),r.a.createElement(o.a,{classes:{root:e.code}},r.a.createElement(d.a,{value:"while(true) {\n hack('n00dles');\n}"})),r.a.createElement(o.a,null,"For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the n00dles server.",r.a.createElement("br",null),r.a.createElement("br",null),"If you're an intermediate programmer you should use ns2 instead. It is much faster and offers more possibilities.",r.a.createElement("br",null),r.a.createElement("br",null),"To save and close the script editor, press the button in the bottom left, or press ctrl + b.")),canNext:!1},[R.f.TerminalFree]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"To check how much RAM is available on this machine, enter"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> free")),canNext:!1},[R.f.TerminalRunScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using"),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> run n00dles.script")),canNext:!1},[R.f.TerminalGoToActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Your script is now running! It will continuously run in the background and will automatically stop if the code ever completes (the n00dles.script will never complete because it runs an infinite loop). ",r.a.createElement("br",null),r.a.createElement("br",null),"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's check out some statistics for our running scripts by clicking"," "),r.a.createElement(f.a,null,r.a.createElement(C.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Active Scripts"))),canNext:!1},[R.f.ActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(f.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal"))),canNext:!1},[R.f.ActiveScriptsToTerminal]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the tail command. Do that now for the script we just ran by typing"," "),r.a.createElement(o.a,{classes:{root:e.textfield}},"[home ~/]> tail n00dles.script")),canNext:!1},[R.f.TerminalTailScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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! ",r.a.createElement("br",null),r.a.createElement("br",null),"This covers the basics of hacking. To learn more about writing scripts, select"),r.a.createElement(f.a,null,r.a.createElement(v.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Tutorial")),r.a.createElement(o.a,null,"in the main navigation menu to look at the documentation. 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.",r.a.createElement("br",null),r.a.createElement("br",null),"For now, let's move on to something else!")),canNext:!0},[R.f.GoToHacknetNodesPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(f.a,null,r.a.createElement(w.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Hacknet")),r.a.createElement(o.a,null,"through the main navigation menu now.")),canNext:!0},[R.f.HacknetNodesIntroduction]:{content:r.a.createElement(o.a,null,"Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),canNext:!0},[R.f.HacknetNodesGoToWorldPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Let's go to"),r.a.createElement(f.a,null,r.a.createElement(O.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"City"))),canNext:!0},[R.f.WorldDescription]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"Lastly, click on"),r.a.createElement(f.a,null,r.a.createElement(v.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Tutorial"))),canNext:!0},[R.f.TutorialPageInfo]:{content:r.a.createElement(o.a,null,"This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot, but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the tutorial. Hope you enjoy the game!"),canNext:!0},[R.f.End]:{content:r.a.createElement(o.a,null),canNext:!0}},a=Object(n.useState)(!1)[1];function c(){a(e=>!e)}Object(n.useEffect)(()=>p.a.subscribe(c),[]);const m=R.a.currStep,g=t[m];if(void 0===g)throw new Error("error in the tutorial");return r.a.createElement(i.a,{square:!0,sx:{maxWidth:"70vw",p:2}},g.content,m!==R.f.TutorialPageInfo&&r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{onClick:R.d,"aria-label":"previous"},r.a.createElement(h.a,null)),g.canNext&&r.a.createElement(s.a,{onClick:R.c,"aria-label":"next"},r.a.createElement(u.a,null))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:R.b},m!==R.f.TutorialPageInfo?"SKIP TUTORIAL":"FINISH TUTORIAL"))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(126),o=a(189),s=a(1313),l=a(73),c=a(816),u=a.n(c),m=a(817),h=a.n(m),p=a(29),d=a(25);const f=Object(i.a)({visibilityToggle:{backgroundColor:"transparent",position:"absolute",top:"100%",right:0},overviewContainer:{position:"fixed",top:0,right:0,zIndex:1500,display:"flex",justifyContent:"flex-end",flexDirection:"column"}});function g({children:e}){const[t,a]=Object(n.useState)(!0),i=f(),c=p.b.Router();if(c.page()===d.a.BitVerse||c.page()===d.a.Loading||c.page()===d.a.Recovery)return r.a.createElement(r.a.Fragment,null);let m;return m=t?r.a.createElement(u.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"}),r.a.createElement(l.a,{square:!0,classes:{root:i.overviewContainer}},r.a.createElement(o.a,{in:t},e),r.a.createElement(s.a,{size:"small",classes:{root:i.visibilityToggle},onClick:()=>a(e=>!e)},m))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return Ie}));var n=a(0),r=a.n(n),i=a(12),o=a(17),s=a(154),l=a(126),c=a(1314),u=a(274),m=a(585),h=a(823),p=a.n(h),d=a(822),f=a.n(d),g=a(66),y=a(133),b=a(97),E=a(1),k=a(189),v=a(654),_=a(824),w=a.n(_),S=a(312),C=a.n(S),x=a(825),O=a.n(x),M=a(515),T=a.n(M),R=a(826),A=a.n(R),P=a(448),N=a.n(P),I=a(829),F=a.n(I),D=a(519),j=a.n(D),B=a(516),G=a.n(B),L=a(830),W=a.n(L),H=a(517),U=a.n(H),q=a(832),K=a.n(q),z=a(833),$=a.n(z),Y=a(834),V=a.n(Y),J=a(835),X=a.n(J),Q=a(836),Z=a.n(Q),ee=a(837),te=a.n(ee),ae=a(366),ne=a.n(ae),re=a(265),ie=a.n(re),oe=a(520),se=a.n(oe),le=a(827),ce=a.n(le),ue=a(828),me=a.n(ue),he=a(831),pe=a.n(he),de=a(838),fe=a.n(de),ge=a(134),ye=a.n(ge),be=a(70),Ee=a.n(be),ke=a(25),ve=a(8),_e=a(40),we=a(449),Se=a(13),Ce=a(267),xe=a(6),Oe=a(96),Me=a(358),Te=a(359);const Re=e=>({width:e.spacing(31),transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),Ae=e=>({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${e.spacing(2)} + 1px)`,[e.breakpoints.up("sm")]:{width:`calc(${e.spacing(7)} + 1px)`}}),Pe=Object(o.a)(c.a,{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>({width:e.spacing(31),whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...Re(e),"& .MuiDrawer-paper":Re(e)},...!t&&{...Ae(e),"& .MuiDrawer-paper":Ae(e)}})),Ne=Object(l.a)(e=>Object(s.a)({active:{borderLeft:"3px solid "+e.palette.primary.main},listitem:{}}));function Ie(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const[o,s]=Object(n.useState)(!0),[l,c]=Object(n.useState)(!0),[h,d]=Object(n.useState)(!0),[_,S]=Object(n.useState)(!0),x=_e.a.currStep===_e.f.CharacterGoToTerminalPage||_e.a.currStep===_e.f.ActiveScriptsPage,M=_e.a.currStep===_e.f.GoToCharacterPage,R=_e.a.currStep===_e.f.TerminalGoToActiveScriptsPage,P=_e.a.currStep===_e.f.GoToHacknetNodesPage,I=_e.a.currStep===_e.f.HacknetNodesGoToWorldPage,D=_e.a.currStep===_e.f.WorldDescription,B=e.player.queuedAugmentations.length,L=e.player.factionInvitations.filter(e=>!Te.b.includes(e)).length,H=Object(we.a)(e.player).length-Me.b.length,q=Object(we.a)(e.player).length>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,z=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,Y=e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,J=e.player.sleeves.length>0,Q=!!e.player.corporation,ee=!!e.player.gang,ae=""!==e.player.companyName,re=e.player.hasWseAccount,oe=!!e.player.bladeburner,le=e.player.augmentations.some(e=>e.name===xe.a.StaneksGift1);function ue(){e.router.toTerminal(),x&&Object(_e.c)()}function he(){e.router.toScriptEditor()}function de(){e.router.toStats(),M&&Object(_e.c)()}function ge(){e.router.toActiveScripts(),R&&Object(_e.c)()}function be(){e.router.toCreateProgram()}function Re(){e.router.toFactions()}function Ae(){e.router.toAugmentations()}function Ie(){e.router.toHacknetNodes(),P&&Object(_e.c)()}function Fe(){e.router.toCity(),I&&Object(_e.c)()}function De(){e.router.toTravel()}function je(){e.router.toJob()}function Be(){e.router.toBladeburner()}function Ge(){e.router.toGang()}function Le(){e.router.toTutorial(),D&&Object(_e.c)()}Object(n.useEffect)(()=>{function t(t){if(!Se.a.DisableHotkeys&&!e.player.isWorking&&!Ce.b)if(t.keyCode==Oe.a.T&&t.altKey)t.preventDefault(),ue();else if(t.keyCode===Oe.a.C&&t.altKey)t.preventDefault(),de();else if(t.keyCode===Oe.a.E&&t.altKey)t.preventDefault(),he();else if(t.keyCode===Oe.a.S&&t.altKey)t.preventDefault(),ge();else if(t.keyCode===Oe.a.H&&t.altKey)t.preventDefault(),Ie();else if(t.keyCode===Oe.a.W&&t.altKey)t.preventDefault(),Fe();else if(t.keyCode===Oe.a.J&&t.altKey)t.preventDefault(),je();else if(t.keyCode===Oe.a.R&&t.altKey)t.preventDefault(),De();else if(t.keyCode===Oe.a.P&&t.altKey)t.preventDefault(),be();else if(t.keyCode===Oe.a.F&&t.altKey){if(e.page==ke.a.Terminal&&Se.a.EnableBashHotkeys)return;t.preventDefault(),Re()}else t.keyCode===Oe.a.A&&t.altKey?(t.preventDefault(),Ae()):t.keyCode===Oe.a.U&&t.altKey?(t.preventDefault(),Le()):t.keyCode===Oe.a.B&&t.altKey?(t.preventDefault(),Be()):t.keyCode===Oe.a.G&&t.altKey&&(t.preventDefault(),Ge())}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[]);const We=Ne(),[He,Ue]=Object(n.useState)(!0);return r.a.createElement(Pe,{open:He,anchor:"left",variant:"permanent"},r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>Ue(e=>!e)},r.a.createElement(y.a,null,He?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(f.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Bitburner v",ve.a.VersionString)})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>s(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(w.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Hacking")}),o?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:o,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Terminal",className:Object(i.default)({[We.active]:e.page===ke.a.Terminal}),onClick:ue},r.a.createElement(y.a,null,r.a.createElement(C.a,{color:x?"error":e.page!==ke.a.Terminal?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:x?"error":e.page!==ke.a.Terminal?"secondary":"primary"},"Terminal"))),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Script Editor",className:Object(i.default)({[We.active]:e.page===ke.a.ScriptEditor}),onClick:he},r.a.createElement(y.a,null,r.a.createElement(O.a,{color:e.page!==ke.a.ScriptEditor?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.ScriptEditor?"secondary":"primary"},"Script Editor"))),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Active Scripts",className:Object(i.default)({[We.active]:e.page===ke.a.ActiveScripts}),onClick:ge},r.a.createElement(y.a,null,r.a.createElement(T.a,{color:R?"error":e.page!==ke.a.ActiveScripts?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:R?"error":e.page!==ke.a.ActiveScripts?"secondary":"primary"},"Active Scripts"))),q&&r.a.createElement(g.a,{button:!0,key:"Create Program",className:Object(i.default)({[We.active]:e.page===ke.a.CreateProgram}),onClick:be},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:H>0?H:void 0,color:"error"},r.a.createElement(A.a,{color:e.page!==ke.a.CreateProgram?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.CreateProgram?"secondary":"primary"},"Create Program"))),le&&r.a.createElement(g.a,{button:!0,key:"Staneks Gift",className:Object(i.default)({[We.active]:e.page===ke.a.StaneksGift}),onClick:function(){e.router.toStaneksGift()}},r.a.createElement(y.a,null,r.a.createElement(ce.a,{color:e.page!==ke.a.StaneksGift?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.StaneksGift?"secondary":"primary"},"Stanek's Gift"))))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>c(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(me.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Character")}),l?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:l,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Stats",className:Object(i.default)({[We.active]:e.page===ke.a.Stats}),onClick:de},r.a.createElement(y.a,null,r.a.createElement(N.a,{color:M?"error":e.page!==ke.a.Stats?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:M?"error":e.page!==ke.a.Stats?"secondary":"primary"},"Stats"))),z&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Factions",className:Object(i.default)({[We.active]:[ke.a.Factions,ke.a.Faction].includes(e.page)}),onClick:Re},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==L?L:void 0,color:"error"},r.a.createElement(F.a,{color:[ke.a.Factions,ke.a.Faction].includes(e.page)?"primary":"secondary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:[ke.a.Factions,ke.a.Faction].includes(e.page)?"primary":"secondary"},"Factions"))),Y&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Augmentations",className:Object(i.default)({[We.active]:e.page===ke.a.Augmentations}),onClick:Ae},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==B?B:void 0,color:"error"},r.a.createElement(j.a,{style:{transform:"rotate(-90deg)"},color:e.page!==ke.a.Augmentations?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Augmentations?"secondary":"primary"},"Augmentations"))),r.a.createElement(g.a,{button:!0,key:"Hacknet",className:Object(i.default)({[We.active]:e.page===ke.a.Hacknet}),onClick:Ie},r.a.createElement(y.a,null,r.a.createElement(G.a,{color:P?"error":e.page!==ke.a.Hacknet?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:P?"error":e.page!==ke.a.Hacknet?"secondary":"primary"},"Hacknet"))),J&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Sleeves",className:Object(i.default)({[We.active]:e.page===ke.a.Sleeves}),onClick:function(){e.router.toSleeves()}},r.a.createElement(y.a,null,r.a.createElement(W.a,{color:e.page!==ke.a.Sleeves?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Sleeves?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>d(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(pe.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"World")}),h?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:h,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"City",className:Object(i.default)({[We.active]:e.page===ke.a.City||e.page===ke.a.Resleeves||e.page===ke.a.Location}),onClick:Fe},r.a.createElement(y.a,null,r.a.createElement(U.a,{color:I?"error":e.page!==ke.a.City?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:I?"error":e.page!==ke.a.City?"secondary":"primary"},"City"))),r.a.createElement(g.a,{button:!0,key:"Travel",className:Object(i.default)({[We.active]:e.page===ke.a.Travel}),onClick:De},r.a.createElement(y.a,null,r.a.createElement(K.a,{color:e.page!==ke.a.Travel?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Travel?"secondary":"primary"},"Travel"))),ae&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Job",className:Object(i.default)({[We.active]:e.page===ke.a.Job}),onClick:je},r.a.createElement(y.a,null,r.a.createElement($.a,{color:e.page!==ke.a.Job?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Job?"secondary":"primary"},"Job"))),re&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Stock Market",className:Object(i.default)({[We.active]:e.page===ke.a.StockMarket}),onClick:function(){e.router.toStockMarket()}},r.a.createElement(y.a,null,r.a.createElement(V.a,{color:e.page!==ke.a.StockMarket?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.StockMarket?"secondary":"primary"},"Stock Market"))),oe&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Bladeburner",className:Object(i.default)({[We.active]:e.page===ke.a.Bladeburner}),onClick:Be},r.a.createElement(y.a,null,r.a.createElement(X.a,{color:e.page!==ke.a.Bladeburner?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Bladeburner?"secondary":"primary"},"Bladeburner"))),Q&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Corp",className:Object(i.default)({[We.active]:e.page===ke.a.Corporation}),onClick:function(){e.router.toCorporation()}},r.a.createElement(y.a,null,r.a.createElement(Z.a,{color:e.page!==ke.a.Corporation?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Corporation?"secondary":"primary"},"Corp"))),ee&&r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,key:"Gang",className:Object(i.default)({[We.active]:e.page===ke.a.Gang}),onClick:Ge},r.a.createElement(y.a,null,r.a.createElement(te.a,{color:e.page!==ke.a.Gang?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Gang?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:We.listitem},button:!0,onClick:()=>S(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(fe.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Help")}),_?r.a.createElement(ye.a,{color:"primary"}):r.a.createElement(Ee.a,{color:"primary"})),r.a.createElement(k.a,{in:_,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Milestones",className:Object(i.default)({[We.active]:e.page===ke.a.Milestones}),onClick:function(){e.router.toMilestones()}},r.a.createElement(y.a,null,r.a.createElement(ne.a,{color:e.page!==ke.a.Milestones?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Milestones?"secondary":"primary"},"Milestones"))),r.a.createElement(g.a,{button:!0,key:"Tutorial",className:Object(i.default)({[We.active]:e.page===ke.a.Tutorial}),onClick:Le},r.a.createElement(y.a,null,r.a.createElement(ie.a,{color:D?"error":e.page!==ke.a.Tutorial?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:D?"error":e.page!==ke.a.Tutorial?"secondary":"primary"},"Tutorial"))),r.a.createElement(g.a,{button:!0,key:"Options",className:Object(i.default)({[We.active]:e.page===ke.a.Options}),onClick:function(){e.router.toGameOptions()}},r.a.createElement(y.a,null,r.a.createElement(se.a,{color:e.page!==ke.a.Options?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==ke.a.Options?"secondary":"primary"},"Options"))),!1)))}},,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(840),o=a(841),s=a(842),l=a(843),c=a(336),u=a(29),m=a(1),h=a(10),p=a(26),d=a(32);function f(e){const t=u.b.Player(),a=Object(n.useState)(!1)[1];function f(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(f,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{variant:"h4"},"Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(m.a,null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),r.a.createElement(m.a,null,"WARNING: Installing your Augmentations resets most of your progress, including:"),r.a.createElement("br",null),r.a.createElement(m.a,null,"- Stats/Skill levels and Experience"),r.a.createElement(m.a,null,"- Money"),r.a.createElement(m.a,null,"- Scripts on every computer but your home computer"),r.a.createElement(m.a,null,"- Purchased servers"),r.a.createElement(m.a,null,"- Hacknet Nodes"),r.a.createElement(m.a,null,"- Faction/Company reputation"),r.a.createElement(m.a,null,"- Stocks"),r.a.createElement("br",null),r.a.createElement(m.a,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)")),r.a.createElement(m.a,{variant:"h4",color:"primary"},"Purchased Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(p.a,{title:r.a.createElement(m.a,null,"'I never asked for this'")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:0===t.queuedAugmentations.length,onClick:e.installAugmentationsFn},"Install Augmentations"))),r.a.createElement(p.a,{title:r.a.createElement(m.a,null,"It's always a good idea to backup/export your save!")},r.a.createElement(h.a,{sx:{mx:2},onClick:function(){e.exportGameFn(),f()},color:"error"},"Backup Save ",Object(c.b)()?"(+1 favor to all factions)":"")),r.a.createElement(s.a,null)),r.a.createElement(m.a,{variant:"h4"},"Installed Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(m.a,null,"List of all Augmentations that have been installed. You have gained the effects of these."),r.a.createElement(i.a,null)),r.a.createElement(o.a,null),r.a.createElement(l.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(521),o=a(20),s=a(6),l=a(13),c=a(29),u=a(183),m=a(10),h=a(26),p=a(274);function d(){const e=Object(n.useState)(!0)[1],t=c.b.Player().augmentations.slice();function a(){e(e=>!e)}return l.a.OwnedAugmentationsOrder===u.a.Alphabetically&&t.sort((e,t)=>e.name<=t.name?-1:1),r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{title:"Sorts the Augmentations alphabetically in numeral order"},r.a.createElement(m.a,{onClick:function(){l.a.OwnedAugmentationsOrder=u.a.Alphabetically,a()}},"Sort in Order")),r.a.createElement(h.a,{title:"Sorts the Augmentations based on when you acquired them (same as default)"},r.a.createElement(m.a,{sx:{mx:2},onClick:function(){l.a.OwnedAugmentationsOrder=u.a.AcquirementTime,a()}},"Sort by Acquirement Time")),r.a.createElement(p.a,{dense:!0},t.map(e=>{const t=o.a[e.name];let a=null;return e.name===s.a.NeuroFluxGovernor&&(a=e.level),r.a.createElement(i.a,{key:t.name,aug:t,level:a})})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a(2),i=a(4),o=a(20),s=a(39),l=a(169),c=a(56),u=a(1),m=a(32);function h({r:e}){return e?n.createElement(n.Fragment,null,n.createElement(s.b,{key:"2"},n.createElement(u.a,null," ","=>"," ")),n.createElement(s.b,{key:"3"},n.createElement(u.a,null,i.a.formatPercentage(e)))):n.createElement(n.Fragment,null)}function p({rows:e}){return n.createElement(s.a,{size:"small",padding:"none"},n.createElement(l.a,null,e.map(e=>n.createElement(c.a,{key:e[0]},n.createElement(s.b,{key:"0"},n.createElement(u.a,{noWrap:!0},e[0]," multiplier: ")),n.createElement(s.b,{key:"1",style:{textAlign:"right"}},n.createElement(u.a,{noWrap:!0},i.a.formatPercentage(e[1]))),n.createElement(h,{r:e[2]})))))}function d(){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(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(p,{rows:[["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)}return n.createElement(n.Fragment,null,n.createElement(u.a,{variant:"h4"},"Multipliers"),n.createElement(m.a,{mx:2},n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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),n.createElement(p,{rows:[["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(t,null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(20),i=a(6),o=a(2),s=a(521),l=a(274);function c(){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;at(e=>!e)},r.a.createElement(l.a,{primary:r.a.createElement(u.a,{style:{whiteSpace:"pre-wrap"}},"Source-File -1: Exploits in the BitNodes",r.a.createElement("br",null),"Level ",a.length," / ",Object.keys(o.a).length)}),e?r.a.createElement(g.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(h.a,{in:e,unmountOnExit:!0},r.a.createElement(c.a,{m:4},r.a.createElement(u.a,null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),r.a.createElement(u.a,null,"It increases all of the player's multipliers by 0.1%"),r.a.createElement("br",null),r.a.createElement(u.a,null,"You have found the following exploits:"),r.a.createElement(c.a,{mx:2},a.map(e=>r.a.createElement(u.a,{key:e},"* ",Object(o.b)(e)))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(2),i=a(13),o=a(183),s=a(323),l=a(846);function c(){const e=r.a.sourceFiles.slice();return i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&e.sort((e,t)=>e.n-t.n),n.createElement(n.Fragment,null,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(l.a,{key:e.n,level:e.lvl,sf:a})}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(302),o=a(97),s=a(32),l=a(1),c=a(73),u=a(189),m=a(70),h=a.n(m),p=a(134),d=a.n(p);function f(e){const[t,a]=Object(n.useState)(!1),m=12===e.sf.n?"∞":"3";return r.a.createElement(s.a,{component:c.a},r.a.createElement(i.a,{onClick:()=>a(e=>!e)},r.a.createElement(o.a,{primary:r.a.createElement(l.a,{style:{whiteSpace:"pre-wrap"}},e.sf.name,r.a.createElement("br",null),`Level ${e.level} / ${m}`)}),t?r.a.createElement(d.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"})),r.a.createElement(u.a,{in:t,unmountOnExit:!0},r.a.createElement(s.a,{m:4},r.a.createElement(l.a,null,e.sf.info))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return S}));var n=a(214),r=a(6),i=a(0),o=a.n(i),s=a(848),l=a(850),c=a(852),u=a(853),m=a(854),h=a(855),p=a(856),d=a(857),f=a(858),g=a(859),y=a(860),b=a(861),E=a(862),k=a(863),v=a(864),_=a(865),w=a(1);function S(e){return o.a.createElement(o.a.Fragment,null,o.a.createElement(w.a,null,"Development Menu - Only meant to be used for testing/debugging"),o.a.createElement(s.a,{player:e.player,router:e.router}),o.a.createElement(l.a,{player:e.player}),o.a.createElement(c.a,{player:e.player}),o.a.createElement(u.a,{player:e.player}),o.a.createElement(m.a,{player:e.player}),o.a.createElement(h.a,{player:e.player}),o.a.createElement(p.a,null),o.a.createElement(d.a,null),e.player.bladeburner instanceof n.a&&o.a.createElement(f.a,{player:e.player}),e.player.inGang()&&o.a.createElement(g.a,{player:e.player}),e.player.hasCorporation()&&o.a.createElement(y.a,{player:e.player}),o.a.createElement(b.a,null),e.player.hasWseAccount&&o.a.createElement(E.a,null),e.player.sleeves.length>0&&o.a.createElement(k.a,{player:e.player}),e.player.augmentations.some(e=>e.name===r.a.StaneksGift1)&&o.a.createElement(v.a,null),o.a.createElement(_.a,{player:e.player,engine:e.engine}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(16);function p(e){function t(t){return function(){e.player.gainMoney(t,"other")}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"General")),r.a.createElement(s.a,null,r.a.createElement(m.a,{onClick:t(1e6)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e6}))),r.a.createElement(m.a,{onClick:t(1e9)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e9}))),r.a.createElement(m.a,{onClick:t(1e12)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e12}))),r.a.createElement(m.a,{onClick:t(1e15)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1e15}))),r.a.createElement(m.a,{onClick:t(1/0)},r.a.createElement("pre",null,"+ ",r.a.createElement(h.a,{money:1/0}))),r.a.createElement(m.a,{onClick:function(){e.player.getHomeComputer().maxRam*=2}},"+ RAM"),r.a.createElement("br",null),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!0,!0)}},"Quick b1t_flum3.exe"),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!0,!1)}},"Run b1t_flum3.exe"),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!1,!0)}},"Quick w0rld_d34m0n"),r.a.createElement(m.a,{onClick:function(){e.router.toBitVerse(!1,!1)}},"Hack w0rld_d34m0n")))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(132);const p=1e27;function d(e){function t(t,a){return function(n){switch(t){case"hacking":n&&e.player.gainHackingExp(n*a);break;case"strength":n&&e.player.gainStrengthExp(n*a);break;case"defense":n&&e.player.gainDefenseExp(n*a);break;case"dexterity":n&&e.player.gainDexterityExp(n*a);break;case"agility":n&&e.player.gainAgilityExp(n*a);break;case"charisma":n&&e.player.gainCharismaExp(n*a);break;case"intelligence":n&&e.player.gainIntelligenceExp(n*a)}e.player.updateSkillLevels()}}function a(t){return function(a){e.player.karma+=a*t}}function n(t){return function(){switch(t){case"hacking":e.player.hacking_exp=0;break;case"strength":e.player.strength_exp=0;break;case"defense":e.player.defense_exp=0;break;case"dexterity":e.player.dexterity_exp=0;break;case"agility":e.player.agility_exp=0;break;case"charisma":e.player.charisma_exp=0;break;case"intelligence":e.player.intelligence_exp=0}e.player.updateSkillLevels()}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Experience / Stats")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.gainHackingExp(p),e.player.gainStrengthExp(p),e.player.gainDefenseExp(p),e.player.gainDexterityExp(p),e.player.gainAgilityExp(p),e.player.gainCharismaExp(p),e.player.gainIntelligenceExp(p),e.player.updateSkillLevels()}},"Tons of exp"),r.a.createElement(m.a,{onClick:function(){e.player.hacking_exp=0,e.player.strength_exp=0,e.player.defense_exp=0,e.player.dexterity_exp=0,e.player.agility_exp=0,e.player.charisma_exp=0,e.player.intelligence_exp=0,e.player.updateSkillLevels()}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Hacking:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"hacking",placeholder:"exp",tons:()=>t("hacking",1)(p),add:t("hacking",1),subtract:t("hacking",-1),reset:n("hacking")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Strength:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"strength",placeholder:"exp",tons:()=>t("strength",1)(p),add:t("strength",1),subtract:t("strength",-1),reset:n("strength")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Defense:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"defense",placeholder:"exp",tons:()=>t("defense",1)(p),add:t("defense",1),subtract:t("defense",-1),reset:n("defense")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Dexterity:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"dexterity",placeholder:"exp",tons:()=>t("dexterity",1)(p),add:t("dexterity",1),subtract:t("dexterity",-1),reset:n("dexterity")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Agility:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"agility",placeholder:"exp",tons:()=>t("agility",1)(p),add:t("agility",1),subtract:t("agility",-1),reset:n("agility")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Charisma:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"charisma",placeholder:"exp",tons:()=>t("charisma",1)(p),add:t("charisma",1),subtract:t("charisma",-1),reset:n("charisma")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Intelligence:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"intelligence",placeholder:"exp",tons:()=>t("intelligence",1)(p),add:t("intelligence",1),subtract:t("intelligence",-1),reset:n("intelligence")})),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){0===e.player.intelligence&&(e.player.intelligence=1,e.player.updateSkillLevels())}},"Enable")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.intelligence_exp=0,e.player.intelligence=0,e.player.updateSkillLevels()}},"Disable"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Karma:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"karma",placeholder:"amt",tons:()=>t("intelligence",1)(1e5),add:a(1),subtract:a(-1),reset:function(){e.player.karma=0}})))))))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(132),d=a(24),f=a(1179),g=a(75),y=a(94),b=a(525),E=a.n(b),k=a(360),v=a.n(k),_=a(1180);function w(e){const[t,a]=Object(n.useState)("Illuminati");function l(e){return function(a){const n=d.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function b(e){return function(a){const n=d.a[t];null==n||isNaN(a)||(n.favor+=a*e)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Factions")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Faction:")),r.a.createElement("td",null,r.a.createElement(f.a,null,r.a.createElement(_.a,{id:"factions-select"},"Faction"),r.a.createElement(h.a,{labelId:"factions-select",id:"factions-dropdown",onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{onClick:function(){for(const t in d.a)e.player.receiveInvite(d.a[t].name)},size:"large","arial-label":"receive-all-invitation"},r.a.createElement(E.a,null)),r.a.createElement(y.a,{onClick:function(){e.player.receiveInvite(t)},size:"large","arial-label":"receive-one-invitation"},r.a.createElement(v.a,null)))},Object.values(d.a).map(e=>r.a.createElement(g.a,{key:e.name,value:e.name},e.name)))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const e=d.a[t];null!=e&&(e.playerReputation=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"favor",placeholder:"amt",tons:()=>b(1)(2e3),add:b(1),subtract:b(-1),reset:function(){const e=d.a[t];null!=e&&(e.favor=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].favor=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in d.a)d.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(116),m=a(6),h=a(1),p=a(75),d=a(94),f=a(525),g=a.n(f),y=a(360),b=a.n(y),E=a(524),k=a.n(E);function v(e){const[t,a]=Object(n.useState)("Augmented Targeting I");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(h.a,null,"Augmentations")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,null,"Aug:")),r.a.createElement("td",null,r.a.createElement(u.a,{onChange:function(e){a(e.target.value)},value:t,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){for(const t of Object.values(m.a))e.player.queueAugmentation(t)},size:"large"},r.a.createElement(g.a,null)),r.a.createElement(d.a,{onClick:function(){e.player.queueAugmentation(t)},size:"large"},r.a.createElement(b.a,null))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){e.player.augmentations=[]},size:"large"},r.a.createElement(k.a,null)))},Object.values(m.a).map(e=>r.a.createElement(p.a,{key:e,value:e},e)))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(507),p=a(1184);const d=[1,2,3,4,5,6,7,8,9,10,11,12];function f(e){function t(t,a){return function(){if(0!==a)if(e.player.sourceFiles.some(e=>e.n===t))for(let n=0;ne.n!==t)}}function a(e){return()=>{for(let a=0;ar.a.createElement("tr",{key:"sf-"+e},r.a.createElement("td",null,r.a.createElement(u.a,null,"SF-",e,":")),r.a.createElement("td",null,r.a.createElement(p.a,null,r.a.createElement(m.a,{onClick:t(e,0)},"0"),r.a.createElement(m.a,{onClick:t(e,1)},"1"),r.a.createElement(m.a,{onClick:t(e,2)},"2"),r.a.createElement(m.a,{onClick:t(e,3)},"3")))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(60),d=a(75);function f(e){const[t,a]=Object(n.useState)("NUKE.exe");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Programs")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Program:")),r.a.createElement("td",null,r.a.createElement(h.a,{onChange:function(e){a(e.target.value)},value:t},Object.values(p.a).map(e=>r.a.createElement(d.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Add:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.hasProgram(t)||e.player.getHomeComputer().programs.push(t)}},"One"),r.a.createElement(m.a,{onClick:function(){for(const t in p.a)e.player.hasProgram(p.a[t].name)||e.player.getHomeComputer().programs.push(p.a[t].name)}},"All")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(27),d=a(45),f=a(75);function g(){const[e,t]=Object(n.useState)("home");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Servers")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Server:")),r.a.createElement("td",{colSpan:2},r.a.createElement(h.a,{id:"dev-servers-dropdown",onChange:function(e){t(e.target.value)},value:e},Object(p.c)().map(e=>r.a.createElement(f.a,{key:e.hostname,value:e.hostname},e.hostname))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Root:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const t=Object(p.d)(e);null!==t&&t instanceof d.a&&(t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5)}},"Root one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(p.c)()){if(!(e instanceof d.a))return;e.hasAdminRights=!0,e.sshPortOpen=!0,e.ftpPortOpen=!0,e.smtpPortOpen=!0,e.httpPortOpen=!0,e.sqlPortOpen=!0,e.openPortCount=5}}},"Root all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Security:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const t=Object(p.d)(e);null!==t&&t instanceof d.a&&(t.hackDifficulty=t.minDifficulty)}},"Min one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(p.c)()){if(!(e instanceof d.a))return;e.hackDifficulty=e.minDifficulty}}},"Min all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Money:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const t=Object(p.d)(e);null!==t&&t instanceof d.a&&(t.moneyAvailable=t.moneyMax)}},"Max one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(p.c)()){if(!(e instanceof d.a))return;e.moneyAvailable=e.moneyMax}}},"Max all")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(61),d=a(75),f=a(132);function g(){const[e,t]=Object(n.useState)("ECorp");function a(t){return function(a){const n=p.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function l(t){return function(a){const n=p.a[e];null==n||isNaN(a)||(n.favor+=a*t)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Companies")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Company:")),r.a.createElement("td",{colSpan:3},r.a.createElement(h.a,{id:"dev-companies-dropdown",onChange:function(e){t(e.target.value)},value:e},Object.values(p.a).map(e=>r.a.createElement(d.a,{key:e.name,value:e.name},e.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(f.a,{label:"reputation",placeholder:"amt",tons:()=>a(1)(1e12),add:a(1),subtract:a(-1),reset:function(){p.a[e].playerReputation=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(f.a,{label:"favor",placeholder:"amt",tons:()=>l(1)(2e3),add:l(1),subtract:l(-1),reset:function(){p.a[e].favor=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].favor=1e12}},"Tons"),r.a.createElement(m.a,{onClick:function(){for(const e in p.a)p.a[e].favor=0}},"Reset")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1),o=a(190),s=a(191),l=a(192),c=a(70),u=a.n(c),m=a(132);function h(e){const t=e.player.bladeburner;if(null===t)return r.a.createElement(r.a.Fragment,null);function a(a){return function(n){t&&t.changeRank(e.player,n*a)}}function n(e){return function(a){t&&(t.storedCycles+=a*e)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(u.a,null)},r.a.createElement(i.a,null,"Bladeburner")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Rank:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"rank",placeholder:"amt",tons:function(){t&&t.changeRank(e.player,1e27)},add:a(1),subtract:a(-1),reset:function(){t&&(t.rank=0,t.maxRank=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){t&&(t.storedCycles+=1e27)},add:n(1),subtract:n(-1),reset:function(){t&&(t.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1),o=a(190),s=a(191),l=a(192),c=a(70),u=a.n(c),m=a(132);function h(e){function t(t){return function(a){e.player.gang&&(e.player.gang.storedCycles+=a*t)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(u.a,null)},r.a.createElement(i.a,null,"Gang")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.gang&&(e.player.gang.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.gang&&(e.player.gang.storedCycles=0)}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(132);function p(e){function t(t){return function(a){e.player.corporation&&(e.player.corporation.storedCycles+=a*t)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Corporation")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds+1e99)}},"Tons of funds"),r.a.createElement(m.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds-e.player.corporation.funds)}},"Reset funds"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"cycles",placeholder:"amt",tons:function(){e.player.corporation&&(e.player.corporation.storedCycles=1e27)},add:t(1),subtract:t(-1),reset:function(){e.player.corporation&&(e.player.corporation.storedCycles=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.corporation&&e.player.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"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){e.player.corporation&&e.player.corporation.divisions.forEach(e=>{e.sciResearch.qty+=1e10})}},"Tons of research")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(116),p=a(75),d=a(331),f=a(99);function g(){const[e,t]=Object(n.useState)("Find Largest Prime Factor");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Coding Contracts")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onClick:d.b},"Generate Random Contract"),r.a.createElement(m.a,{onClick:d.c},"Generate Random Contract on Home Comp"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,{onChange:function(e){t(e.target.value)},value:e},Object.values(f.d).map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))),r.a.createElement(m.a,{onClick:function(){Object(d.a)({problemType:e,server:"home"})}},"Generate Specified Contract Type on Home Comp")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(82),p=a(16),d=a(15),f=a(95),g=a(136);function y(){const[e,t]=Object(n.useState)(0),[a,l]=Object(n.useState)("");function y(e){const t=a.replace(/\s/g,"");let n=()=>!0;""!==t&&"all"!==t&&(n=function(e){return t.split(",").includes(e)});for(const t in f.a)if(f.a.hasOwnProperty(t)){const a=f.a[t];a instanceof g.a&&n(a.symbol)&&e(a)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Stock Market")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Symbol:")),r.a.createElement("td",null,r.a.createElement(h.a,{placeholder:"symbol/'all'",onChange:function(e){l(e.target.value)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Price:")),r.a.createElement("td",null,r.a.createElement(h.a,{placeholder:"$$$",onChange:function(e){t(parseFloat(e.target.value))}}),r.a.createElement(m.a,{onClick:function(){isNaN(e)||y(t=>{t.price=e})}},"Set"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,null,"Caps:")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){const e=[];y(t=>{e.push(r.a.createElement("tr",{key:t.symbol},r.a.createElement("td",null,t.symbol),r.a.createElement("td",{style:{textAlign:"right"}},r.a.createElement(p.a,{money:t.cap}))))}),Object(d.a)(r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Stock"),r.a.createElement("th",null,"Price cap")),e)))}},"View stock caps")))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(10),m=a(1);function h(e){return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(m.a,null,"Sleeves")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,null,"Shock:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(let t=0;ta.avgCharge+=t*e)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(u.a,null)},r.a.createElement(m.a,null,"Stanek's Gift")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,{label:"cycles",placeholder:"amt",tons:function(){i.b.storedCycles=1e6},add:e(1),subtract:e(-1),reset:function(){i.b.storedCycles=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(h.a,{label:"all charge",placeholder:"amt",tons:function(){i.b.fragments.forEach(e=>{e.avgCharge=1e21,e.numCharge=1e21})},add:t(1),subtract:t(-1),reset:function(){i.b.fragments.forEach(e=>{e.avgCharge=0,e.numCharge=0})}})))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(70),c=a.n(l),u=a(1),m=a(10),h=a(182);function p(e){function t(t){return()=>{e.player.lastUpdate-=t,e.engine._lastUpdate-=t,h.c.saveGame(),setTimeout(()=>location.reload(),1e3)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(u.a,null,"Time skip")),r.a.createElement(s.a,null,r.a.createElement(m.a,{onClick:t(6e4)},"1 minute"),r.a.createElement(m.a,{onClick:t(36e5)},"1 hour"),r.a.createElement(m.a,{onClick:t(864e5)},"1 day")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(867),o=a(869),s=a(870),l=a(29),c=a(46),u=a(32);function m(){const e=l.b.Player(),t=l.b.Router(),a=Object(n.useState)(!1)[1];function m(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(m,200);return()=>clearInterval(e)},[]);const h=e.bladeburner;return null===h?r.a.createElement(r.a.Fragment,null):r.a.createElement(u.a,{display:"flex",flexDirection:"column"},r.a.createElement(c.a,{container:!0},r.a.createElement(c.a,{item:!0,xs:6},r.a.createElement(i.a,{bladeburner:h,player:e,router:t})),r.a.createElement(c.a,{item:!0,xs:6},r.a.createElement(o.a,{bladeburner:h,player:e}))),r.a.createElement(s.a,{bladeburner:h,player:e}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(22),o=a(57),s=a(16),l=a(123),c=a(4),u=a(24),m=a(113),h=a(868),p=a(1),d=a(26),f=a(32),g=a(10),y=a(73);function b(e){const[t,a]=Object(n.useState)(!1),b=Object(n.useState)(!1)[1],E=e.bladeburner.rank>=o.a.RankNeededForFaction;return Object(n.useEffect)(()=>{const e=setInterval(()=>b(e=>!e),1e3);return()=>clearInterval(e)},[]),r.a.createElement(y.a,{sx:{p:1}},r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"Your rank within the Bladeburner division.")},r.a.createElement(p.a,null,"Rank: ",Object(i.c)(e.bladeburner.rank,2)))),r.a.createElement("br",null),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"Performing actions will use up your stamina.",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina is determined primarily by your agility stat.",r.a.createElement("br",null),r.a.createElement("br",null),"Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")},r.a.createElement(p.a,null,"Stamina: ",Object(i.c)(e.bladeburner.stamina,3)," / ",Object(i.c)(e.bladeburner.maxStamina,3)))),r.a.createElement("br",null),r.a.createElement(p.a,null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement(p.a,null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement(p.a,null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement(p.a,null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement(p.a,null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement(p.a,null,"Current City: ",e.bladeburner.city),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate population count increases success rate estimates.")},r.a.createElement(p.a,null,"Est. Synthoid Population: ",c.a.formatPopulation(e.bladeburner.getCurrentCity().popEst)))),r.a.createElement("br",null),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")},r.a.createElement(p.a,null,"Synthoid Communities: ",Object(i.c)(e.bladeburner.getCurrentCity().comms,0)))),r.a.createElement("br",null),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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(p.a,null,"City Chaos: ",Object(i.c)(e.bladeburner.getCurrentCity().chaos)))),r.a.createElement("br",null),e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3>15e3&&r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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.a,null,"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3)))),r.a.createElement("br",null)),r.a.createElement(p.a,null,"Skill Points: ",Object(i.c)(e.bladeburner.skillPoints,0)),r.a.createElement("br",null),r.a.createElement(l.a,{rows:[["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(g.a,{onClick:()=>a(!0)},"Travel"),r.a.createElement(d.a,{title:E?"":r.a.createElement(p.a,null,"Rank 25 required.")},r.a.createElement("span",null,r.a.createElement(g.a,{disabled:!E,onClick:function(){if(!E)return;const t=u.a.Bladeburners;t.isMember||Object(m.d)(t),e.router.toFaction(t)}},"Faction"))),r.a.createElement(h.a,{open:t,onClose:()=>a(!1),bladeburner:e.bladeburner}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(396),o=a(41),s=a(23),l=a(13),c=a(1),u=a(10);function m(e){function t(t){e.bladeburner.city=t,e.onClose()}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,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."),l.a.DisableASCIIArt?Object.values(s.a).map(e=>r.a.createElement(u.a,{key:e,onClick:()=>t(e)},e)):r.a.createElement(i.a,{currentCity:e.bladeburner.city,onTravel:e=>t(e)})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(73),o=a(274),s=a(66),l=a(32),c=a(1),u=a(82),m=a(126),h=a(154);const p=Object(m.a)(e=>Object(h.a)({textfield:{margin:e.spacing(0),width:"100%"},input:{backgroundColor:"#000"},nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"}}));function d(e){return r.a.createElement(s.a,{sx:{p:0}},r.a.createElement(c.a,null,e.content))}function f(e){const t=p(),a=Object(n.useRef)(null),[s,m]=Object(n.useState)(""),h=Object(n.useState)(!1)[1];const[f,g]=Object(n.useState)(e.bladeburner.consoleHistory.length);function y(){a.current&&(a.current.scrollTop=a.current.scrollHeight)}function b(){h(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(b,1e3),t=setInterval(y,100);return()=>{clearInterval(e),clearInterval(t)}},[]),r.a.createElement(l.a,{height:"60vh",display:"flex",alignItems:"stretch",component:i.a},r.a.createElement(l.a,null,r.a.createElement(o.a,{sx:{height:"100%",overflow:"auto"}},e.bladeburner.consoleLogs.map((e,t)=>r.a.createElement(d,{key:t,content:e})),r.a.createElement(u.a,{classes:{root:t.textfield},autoFocus:!0,tabIndex:1,type:"text",value:s,onChange:function(e){m(e.target.value)},onKeyDown:function(t){13===t.keyCode&&(t.preventDefault(),s.length>0&&(e.bladeburner.postToConsole("> "+s),e.bladeburner.executeConsoleCommands(e.player,s),g(e.bladeburner.consoleHistory.length),m("")));const a=e.bladeburner.consoleHistory;if(38===t.keyCode){let e=f;const n=a.length;if(0===n)return;(e<0||e>n)&&g(n),0!==e&&(e-=1),g(e);const r=a[e];t.currentTarget.value=r}if(40===t.keyCode){const e=f,n=a.length;if(0==n)return;if((e<0||e>n)&&g(n),e==n||e==n-1)g(n),t.currentTarget.value="";else{g(f+1);const e=a[f+1];t.currentTarget.value=e}}},InputProps:{className:t.input,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,null,"> ")),spellCheck:!1}})),r.a.createElement("div",{ref:a})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(871),o=a(875),s=a(883),l=a(888),c=a(892),u=a(470),m=a(226),h=a(32);function p(e){const[t,a]=r.a.useState(0);return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{variant:"fullWidth",value:t,onChange:function(e,t){a(t)}},r.a.createElement(m.a,{label:"General"}),r.a.createElement(m.a,{label:"Contracts"}),r.a.createElement(m.a,{label:"Operations"}),r.a.createElement(m.a,{label:"BlackOps"}),r.a.createElement(m.a,{label:"Skills"})),r.a.createElement(h.a,{sx:{p:1}},0===t&&r.a.createElement(i.a,{bladeburner:e.bladeburner,player:e.player}),1===t&&r.a.createElement(o.a,{bladeburner:e.bladeburner,player:e.player}),2===t&&r.a.createElement(s.a,{bladeburner:e.bladeburner,player:e.player}),3===t&&r.a.createElement(l.a,{bladeburner:e.bladeburner,player:e.player}),4===t&&r.a.createElement(c.a,{bladeburner:e.bladeburner})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(872),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"These are generic actions that will assist you in your Bladeburner duties."),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(873),o=a(231);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(i.a,{key:t.name,bladeburner:e.bladeburner,action: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(38),o=a(170),s=a(22),l=a(874),c=a(158),u=a(326),m=a(1),h=a(32),p=a(73);function d(e){const t=Object(n.useState)(!1)[1];const a=e.action.name===e.bladeburner.action.name,d=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),f=function(){switch(e.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":case"Incite Violence":return 60;case"Recruitment":return e.bladeburner.getRecruitmentTime(e.player)}return-1}(),g="Recruitment"===e.action.name?Math.max(0,Math.min(e.bladeburner.getRecruitmentSuccessChance(e.player),1)):-1,y=l.a[e.action.name];if(void 0===y)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(p.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{value:e.action.name}),r.a.createElement(m.a,null,"(IN PROGRESS - ",Object(s.c)(d,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(m.a,null,Object(o.a)({progress:d/e.bladeburner.actionTimeToComplete}))):r.a.createElement(h.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{value:e.action.name}),r.a.createElement(u.a,{bladeburner:e.bladeburner,type:i.a[e.action.name],name:e.action.name,rerender:function(){t(e=>!e)}})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,null,y.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,null,"Time Required: ",Object(s.b)(1e3*f),-1!==g&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.c)(100*g,1),"%")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Training:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Field Analysis":{desc:r.a.createElement(r.a.Fragment,null,"Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Recruitment:{desc:r.a.createElement(r.a.Fragment,null,"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Diplomacy:{desc:r.a.createElement(r.a.Fragment,null,"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},"Hyperbolic Regeneration Chamber":{desc:r.a.createElement(r.a.Fragment,null,"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.",r.a.createElement("br",null),r.a.createElement("br",null))},"Incite Violence":{desc:r.a.createElement(r.a.Fragment,null,"Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate additional contracts and operations, at the cost of increased Chaos.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(876),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"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(877);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(i.a,{key:t,bladeburner:e.bladeburner,action:a[t],player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(38),o=a(170),s=a(22),l=a(878),c=a(397),u=a(158),m=a(527),h=a(530),p=a(326),d=a(1),f=a(73);function g(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const g=e.bladeburner.action.type===i.a.Contract&&e.action.name===e.bladeburner.action.name,y=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),b=e.action.getActionTime(e.bladeburner),E=l.a[e.action.name];if(void 0===E)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(f.a,{sx:{my:1,p:1}},g?r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,null,r.a.createElement(u.a,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(y,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(d.a,null,Object(o.a)({progress:y/e.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name}),r.a.createElement(p.a,{bladeburner:e.bladeburner,type:i.a.Contract,name:e.action.name,rerender:a})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{action:e.action,bladeburner:e.bladeburner,isActive:g,rerender:a}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(d.a,null,E.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:e.action,bladeburner:e.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*b),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(h.a,{rerender:a,action:e.action}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Tracking:{desc:r.a.createElement(r.a.Fragment,null,"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.")},"Bounty Hunter":{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.")},Retirement:{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and retire (kill) rogue Synthoids.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(526),o=a(1),s=a(26);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves stealth")},i.b)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(526),o=a(1),s=a(26);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves retirement")},i.a)}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(884),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"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(885);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(i.a,{key:t,bladeburner:e.bladeburner,action:a[t],player:e.player})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(38),o=a(170),s=a(22),l=a(397),c=a(527),u=a(530),m=a(326),h=a(531),p=a(887),d=a(158),f=a(1),g=a(73);function y(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const y=e.bladeburner.action.type===i.a.Operation&&e.action.name===e.bladeburner.action.name,b=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),E=e.action.getActionTime(e.bladeburner),k=p.a[e.action.name];if(void 0===k)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(g.a,{sx:{my:1,p:1}},y?r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,r.a.createElement(d.a,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(b,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(f.a,null,Object(o.a)({progress:b/e.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{value:e.action.name}),r.a.createElement(m.a,{bladeburner:e.bladeburner,type:i.a.Operation,name:e.action.name,rerender:a}),r.a.createElement(h.a,{action:e.action,bladeburner:e.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:e.action,bladeburner:e.bladeburner,isActive:y,rerender:a}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,null,k.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{action:e.action,bladeburner:e.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*E),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(u.a,{rerender:a,action:e.action}))}},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(41),s=a(1),l=a(10),c=a(82);function u(e){const[t,a]=Object(n.useState)();return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,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(c.a,{autoFocus:!0,type:"number",placeholder:"Team size",value:t,onChange:function(t){const n=parseFloat(t.target.value);n>e.bladeburner.teamSize?a(e.bladeburner.teamSize):a(n)}}),r.a.createElement(l.a,{sx:{mx:2},onClick:function(){if(void 0===t)return;const a=Math.round(t);isNaN(a)||a<0?Object(i.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):e.action.teamCount=a,e.onClose()}},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Investigation:{desc:r.a.createElement(r.a.Fragment,null,"As a field agent, investigate and identify Synthoid populations, movements, and operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Investigation ops will increase the accuracy of your synthoid data.",r.a.createElement("br",null),r.a.createElement("br",null),"You will NOT lose HP from failed Investigation ops.")},"Undercover Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Undercover ops will increase the accuracy of your synthoid data.")},"Sting Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.")},Raid:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Stealth Retirement Operation":{desc:r.a.createElement(r.a.Fragment,null,"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.")},Assassination:{desc:r.a.createElement(r.a.Fragment,null,"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(889),i=a(1);function o(e){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"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(244),o=a(890);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(o.a,{key:t.name,bladeburner:e.bladeburner,action:t,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(22),o=a(38),s=a(170),l=a(531),c=a(891),u=a(158),m=a(397),h=a(326),p=a(1),d=a(73);function f(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement(d.a,{sx:{my:1,p:1}},r.a.createElement(p.a,null,e.action.name," (COMPLETED)"));const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,f=e.action.getActionTime(e.bladeburner),g=e.bladeburner.rank>=e.action.reqdRank,y=Math.min(e.bladeburner.actionTimeCurrent+e.bladeburner.actionTimeOverflow,e.bladeburner.actionTimeToComplete),b=c.a[e.action.name];if(void 0===b)throw new Error("Cannot find data for "+e.action.name);return r.a.createElement(d.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name}),r.a.createElement(p.a,null,"(IN PROGRESS - ",Object(i.c)(y,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(p.a,null,Object(s.a)({progress:y/e.bladeburner.actionTimeToComplete})))):r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name}),r.a.createElement(h.a,{bladeburner:e.bladeburner,type:o.a.BlackOperation,name:e.action.name,rerender:function(){t(e=>!e)}}),r.a.createElement(l.a,{action:e.action,bladeburner:e.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,null,b.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,{color:g?"primary":"error"},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement(p.a,null,r.a.createElement(m.a,{action:e.action,bladeburner:e.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*f)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={"Operation Typhoon":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Zero":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation X":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Titan":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Ares":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to intercept the deal. Leave no survivors.")},"Operation Archangel":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Juggernaut":{desc:r.a.createElement(r.a.Fragment,null,"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 they 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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your mission is to eradicate Juggernaut and his followers.")},"Operation Red Dragon":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation K":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"We do not have the power or jurisdiction to shut 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.")},"Operation Deckard":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Tyrell":{desc:r.a.createElement(r.a.Fragment,null,"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facilities. 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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Wallace":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Shoulder of Orion":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Hyron":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},"Operation Morpheus":{desc:r.a.createElement(r.a.Fragment,null,"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the people's 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.",r.a.createElement("br",null),r.a.createElement("br",null),"The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.")},"Operation Ion Storm":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.")},"Operation Annihilus":{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Operation Ultron":{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to find and destroy Ultron.")},"Operation Centurion":{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"It seems that the universe is not without a sense of irony.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},"Operation Vindictus":{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},"Operation Daedalus":{desc:r.a.createElement(r.a.Fragment,null," Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(893),o=a(57),s=a(22),l=a(1),c=a(5);function u(e){const t=Object(n.useState)(!1)[1],a=e.bladeburner.skillMultipliers;function u(e){return e&&1!==e}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,r.a.createElement("strong",null,"Skill Points: ",Object(s.c)(e.bladeburner.skillPoints,0))),r.a.createElement(l.a,null,"You will gain one skill point every"," ",o.a.RanksPerSkillPoint*c.a.BladeburnerSkillCost," ranks.",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."),u(a.successChanceAll)&&r.a.createElement(l.a,null,"Total Success Chance: x",Object(s.c)(a.successChanceAll,3)),u(a.successChanceStealth)&&r.a.createElement(l.a,null,"Stealth Success Chance: x",Object(s.c)(a.successChanceStealth,3)),u(a.successChanceKill)&&r.a.createElement(l.a,null,"Retirement Success Chance: x",Object(s.c)(a.successChanceKill,3)),u(a.successChanceContract)&&r.a.createElement(l.a,null,"Contract Success Chance: x",Object(s.c)(a.successChanceContract,3)),u(a.successChanceOperation)&&r.a.createElement(l.a,null,"Operation Success Chance: x",Object(s.c)(a.successChanceOperation,3)),u(a.successChanceEstimate)&&r.a.createElement(l.a,null,"Synthoid Data Estimate: x",Object(s.c)(a.successChanceEstimate,3)),u(a.actionTime)&&r.a.createElement(l.a,null,"Action Time: x",Object(s.c)(a.actionTime,3)),u(a.effHack)&&r.a.createElement(l.a,null,"Hacking Skill: x",Object(s.c)(a.effHack,3)),u(a.effStr)&&r.a.createElement(l.a,null,"Strength: x",Object(s.c)(a.effStr,3)),u(a.effDef)&&r.a.createElement(l.a,null,"Defense: x",Object(s.c)(a.effDef,3)),u(a.effDex)&&r.a.createElement(l.a,null,"Dexterity: x",Object(s.c)(a.effDex,3)),u(a.effAgi)&&r.a.createElement(l.a,null,"Agility: x",Object(s.c)(a.effAgi,3)),u(a.effCha)&&r.a.createElement(l.a,null,"Charisma: x",Object(s.c)(a.effCha,3)),u(a.effInt)&&r.a.createElement(l.a,null,"Intelligence: x",Object(s.c)(a.effInt,3)),u(a.stamina)&&r.a.createElement(l.a,null,"Stamina: x",Object(s.c)(a.stamina,3)),u(a.money)&&r.a.createElement(l.a,null,"Contract Money: x",Object(s.c)(a.money,3)),u(a.expGain)&&r.a.createElement(l.a,null,"Exp Gain: x",Object(s.c)(a.expGain,3)),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(894),i=a(202);function o(e){return n.createElement(n.Fragment,null,Object.keys(i.a).map(t=>n.createElement(r.a,{key:t,bladeburner:e.bladeburner,skill:i.a[t],onUpgrade:e.onUpgrade})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(158),o=a(22),s=a(1),l=a(94),c=a(32),u=a(73),m=a(523),h=a.n(m),p=a(895),d=a.n(p);function f(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),m=e.bladeburner.skillPoints>=n,p=!!e.skill.maxLvl&&a>=e.skill.maxLvl;return r.a.createElement(u.a,{sx:{my:1,p:1}},r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(i.a,{variant:"h6",color:"primary",value:e.skill.name}),!m||p?r.a.createElement(l.a,{disabled:!0},r.a.createElement(d.a,null)):r.a.createElement(l.a,{onClick:function(){e.bladeburner.skillPoints{const e=setInterval(()=>p(e=>!e),200);return()=>clearInterval(e)},[]),r.a.createElement(c.a.Gang.Provider,{value:t},r.a.createElement(u.a,{variant:"fullWidth",value:a,onChange:function(e,t){h(t)}},r.a.createElement(m.a,{label:"Management"}),r.a.createElement(m.a,{label:"Equipment"}),r.a.createElement(m.a,{label:"Territory"})),0===a&&r.a.createElement(i.a,null),1===a&&r.a.createElement(s.a,null),2===a&&r.a.createElement(o.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(900),o=a(902),s=a(135),l=a(1);function c(){const e=Object(s.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"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.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,null),r.a.createElement("br",null),r.a.createElement(o.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(24),o=a(22),s=a(4),l=a(98),c=a(104),u=a(67),m=a(901),h=a(135),p=a(1),d=a(26),f=a(32);function g(){const e=Object(h.b)(),t=100*u.a[e.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(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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(p.a,null,"Respect: ",s.a.formatRespect(e.respect)," (",s.a.formatRespect(5*e.respectGainRate)," / sec)"))),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"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(p.a,null,"Wanted Level: ",s.a.formatWanted(e.wanted)," (",s.a.formatWanted(5*e.wantedGainRate)," / sec)"))),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"Penalty for respect and money gain rates due to Wanted Level")},r.a.createElement(p.a,null,"Wanted Level Penalty: -",Object(o.c)(100*(1-e.getWantedPenalty()),2),"%"))),r.a.createElement(p.a,null,"Money gain rate: ",r.a.createElement(l.a,{money:5*e.moneyGainRate})),r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(p.a,null,"The percentage of total territory your Gang controls")},r.a.createElement(p.a,null,"Territory: ",a,"%"))),r.a.createElement(p.a,null,"Faction reputation: ",r.a.createElement(c.a,{reputation:i.a[e.facName].playerReputation})),r.a.createElement(m.a,{gang:e}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(8),i=a(22),o=a(1),s=a(26),l=a(32);function c(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(l.a,{display:"flex"},n.createElement(s.a,{title:n.createElement(o.a,null,"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(o.a,null,"Bonus time: ",Object(i.b)(a))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(903),o=a(909),s=a(135);function l(){const e=Object(s.b)(),t=Object(n.useState)(!1)[1];return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onRecruit:()=>t(e=>!e)}),r.a.createElement("ul",null,e.members.map(e=>r.a.createElement(i.a,{key:e.name,member:e}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(904),o=a(32),s=a(1),l=a(302),c=a(97),u=a(73),m=a(189),h=a(70),p=a.n(h),d=a(134),f=a.n(d);function g(e){const[t,a]=Object(n.useState)(!0);return r.a.createElement(o.a,{component:u.a},r.a.createElement(l.a,{onClick:()=>a(e=>!e)},r.a.createElement(c.a,{primary:r.a.createElement(s.a,null,e.member.name)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(p.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(o.a,{sx:{mx:4}},r.a.createElement(i.a,{member:e.member}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(905),o=a(907),s=a(908),l=a(46);function c(e){const t=Object(n.useState)(!1)[1];return r.a.createElement(l.a,{container:!0},r.a.createElement(l.a,{item:!0,xs:4},r.a.createElement(i.a,{onAscend:()=>t(e=>!e),member:e.member})),r.a.createElement(l.a,{item:!0,xs:4},r.a.createElement(o.a,{onTaskChange:()=>t(e=>!e),member:e.member})),r.a.createElement(l.a,{item:!0,xs:4},r.a.createElement(s.a,{member:e.member})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(22),o=a(4),s=a(906),l=a(1),c=a(26),u=a(10),m=a(398),h=a(94),p=a(265),d=a.n(p);function f(e){const[t,a]=Object(n.useState)(!1),[p,f]=Object(n.useState)(!1),g={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(c.a,{title:r.a.createElement(l.a,null,"Hk: x",o.a.formatMultiplier(e.member.hack_mult*g.hack),"(x",o.a.formatMultiplier(e.member.hack_mult)," Eq, x",o.a.formatMultiplier(g.hack)," ","Asc)",r.a.createElement("br",null),"St: x",o.a.formatMultiplier(e.member.str_mult*g.str),"(x",o.a.formatMultiplier(e.member.str_mult)," Eq, x",o.a.formatMultiplier(g.str)," ","Asc)",r.a.createElement("br",null),"Df: x",o.a.formatMultiplier(e.member.def_mult*g.def),"(x",o.a.formatMultiplier(e.member.def_mult)," Eq, x",o.a.formatMultiplier(g.def)," ","Asc)",r.a.createElement("br",null),"Dx: x",o.a.formatMultiplier(e.member.dex_mult*g.dex),"(x",o.a.formatMultiplier(e.member.dex_mult)," Eq, x",o.a.formatMultiplier(g.dex)," ","Asc)",r.a.createElement("br",null),"Ag: x",o.a.formatMultiplier(e.member.agi_mult*g.agi),"(x",o.a.formatMultiplier(e.member.agi_mult)," Eq, x",o.a.formatMultiplier(g.agi)," ","Asc)",r.a.createElement("br",null),"Ch: x",o.a.formatMultiplier(e.member.cha_mult*g.cha),"(x",o.a.formatMultiplier(e.member.cha_mult)," Eq, x",o.a.formatMultiplier(g.cha)," ","Asc)")},r.a.createElement(l.a,null,"Hacking: ",Object(i.c)(e.member.hack,0)," (",o.a.formatExp(e.member.hack_exp)," exp)",r.a.createElement("br",null),"Strength: ",Object(i.c)(e.member.str,0)," (",o.a.formatExp(e.member.str_exp)," exp)",r.a.createElement("br",null),"Defense: ",Object(i.c)(e.member.def,0)," (",o.a.formatExp(e.member.def_exp)," exp)",r.a.createElement("br",null),"Dexterity: ",Object(i.c)(e.member.dex,0)," (",o.a.formatExp(e.member.dex_exp)," exp)",r.a.createElement("br",null),"Agility: ",Object(i.c)(e.member.agi,0)," (",o.a.formatExp(e.member.agi_exp)," exp)",r.a.createElement("br",null),"Charisma: ",Object(i.c)(e.member.cha,0)," (",o.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(u.a,{onClick:()=>f(!0)},"Ascend"),r.a.createElement(s.a,{open:p,onClose:()=>f(!1),member:e.member,onAscend:e.onAscend}),r.a.createElement(h.a,{onClick:()=>a(!0)},r.a.createElement(d.a,null)),r.a.createElement(m.a,{open:t,onClose:()=>a(!1)},r.a.createElement(l.a,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 m}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(41),l=a(135),c=a(1),u=a(10);function m(e){const t=Object(l.b)(),a=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),1e3);return()=>clearInterval(e)},[]);const m=e.member.getCurrentAscensionMults(),h=e.member.getAscensionMultsAfterAscend();return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(m.hack,"0.000")," => x",i.a.format(h.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(m.str,"0.000")," => x",i.a.format(h.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(m.def,"0.000")," => x",i.a.format(h.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(m.dex,"0.000")," => x",i.a.format(h.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(m.agi,"0.000")," => x",i.a.format(h.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(m.cha,"0.000")," => x",i.a.format(h.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement(u.a,{onClick:function(){e.onAscend();const a=t.ascendMember(e.member);Object(o.a)(r.a.createElement(c.a,null,"You ascended ",e.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(a.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(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))),e.onClose()}},"Ascend"))}},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(123),s=a(98),l=a(135),c=a(75),u=a(116);function m(e){const t=Object(l.b)(),[a,m]=Object(n.useState)(e.member.task);const h=t.getAllTaskNames(),p=[["Money:",r.a.createElement(s.a,{money:5*e.member.calculateMoneyGain(t)})],["Respect:",i.a.formatRespect(5*e.member.calculateRespectGain(t))+" / sec"],["Wanted Level:",i.a.formatWanted(5*e.member.calculateWantedLevelGain(t))+" / sec"],["Total Respect:",""+i.a.formatRespect(e.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(t){const a=t.target.value;e.member.assignToTask(a),m(a),e.onTaskChange()},value:a},r.a.createElement(c.a,{key:0,value:"Unassigned"},"Unassigned"),h.map((e,t)=>r.a.createElement(c.a,{key:t+1,value:e},e))),r.a.createElement(o.a,{rows:p}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(220),o=a(1);function s(e){const t=i.a[e.member.task],a=t?t.desc:i.a.Unassigned.desc;return r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:a}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(910),o=a(292),s=a(22),l=a(135),c=a(1),u=a(10),m=a(32);function h(e){const t=Object(l.b)(),[a,h]=Object(n.useState)(!1);if(t.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!t.canRecruitMember()){const e=t.getRespectNeededToRecruitMember();return r.a.createElement(m.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,{sx:{mx:1},disabled:!0},"Recruit Gang Member"),r.a.createElement(c.a,null,Object(s.c)(e,2)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onClick:()=>h(!0)},"Recruit Gang Member"),r.a.createElement(i.a,{open:a,onClose:()=>h(!1),onRecruit:e.onRecruit}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(41),o=a(15),s=a(135),l=a(1),c=a(82),u=a(10);function m(e){const t=Object(s.b)(),[a,m]=Object(n.useState)(""),h=""===a||!t.canRecruitMember();function p(){h||(t.recruitMember(a)?(e.onRecruit(),e.onClose()):Object(o.a)("You already have a gang member with this name!"))}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,null,"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement(c.a,{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&p()},onChange:function(e){m(e.target.value)},type:"text",placeholder:"unique name",InputProps:{endAdornment:r.a.createElement(u.a,{disabled:h,onClick:p},"Recruit")}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(22),s=a(67),l=a(135),c=a(1),u=a(161),m=a(147),h=a(26),p=a(32),d=a(73);function f(){const e=Object(l.b)(),t=Object.keys(s.a).filter(t=>t!=e.facName);return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,null,"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),'To increase your chances of winning territory assign gang members to "Territory Warfare", this will build your gang power. Then enable "Engage in Territory Warfare" to start fighting over territory.'),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e.territoryWarfareEngaged,onChange:t=>e.territoryWarfareEngaged=t.target.checked}),label:r.a.createElement(h.a,{title:r.a.createElement(c.a,null,"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(c.a,null,"Engage in Territory Warfare"))}),r.a.createElement("br",null),r.a.createElement(p.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(c.a,null,"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(c.a,null,"Territory Clash Chance: ",i.a.formatPercentage(e.territoryClashChance,3)))),r.a.createElement("br",null),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e.notifyMemberDeath,onChange:t=>e.notifyMemberDeath=t.target.checked}),label:r.a.createElement(h.a,{title:r.a.createElement(c.a,null,"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(c.a,null,"Notify about Gang Member Deaths"))}),r.a.createElement("br",null),r.a.createElement(d.a,null,r.a.createElement(c.a,null,r.a.createElement("b",null,r.a.createElement("u",null,e.facName)),r.a.createElement("br",null),"Power: ",Object(o.c)(s.a[e.facName].power,6),r.a.createElement("br",null),"Territory: ",g(s.a[e.facName].territory),"%",r.a.createElement("br",null),r.a.createElement("br",null)),t.map(e=>r.a.createElement(y,{key:e,name:e}))))}function g(e){const t=100*e;return t<=0?Object(o.c)(0,2):t>=100?Object(o.c)(100,2):Object(o.c)(t,2)}function y(e){const t=Object(l.b)(),a=s.a[t.facName].power,n=s.a[e.name].power,u=a/(n+a);return r.a.createElement(c.a,null,r.a.createElement("u",null,e.name),r.a.createElement("br",null),"Power: ",Object(o.c)(n,6),r.a.createElement("br",null),"Territory: ",g(s.a[e.name].territory),"%",r.a.createElement("br",null),"Chance to win clash with this gang: ",i.a.formatPercentage(u,3),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(22),o=a(4),s=a(203),l=a(16),c=a(135),u=a(160),m=a(29),h=a(1),p=a(10),d=a(26),f=a(32),g=a(73);function y(e){const t=Object(c.b)(),a=m.b.Player(),n=Object.keys(s.a).filter(n=>{const r=s.a[n];return!(a.money>t.getUpgradeCost(r))&&(r.type===e.type&&!e.upgrades.includes(n))}).map(e=>s.a[e]);return 0===n.length?r.a.createElement(r.a.Fragment,null):r.a.createElement(h.a,null,"Next at ",r.a.createElement(l.a,{money:n[0].cost}))}function b({upgName:e}){const t=s.a[e];return r.a.createElement(g.a,{sx:{mx:1,p:1}},r.a.createElement(f.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,{dangerouslySetInnerHTML:{__html:t.desc}})},r.a.createElement(h.a,null,t.name))))}function E(e){const t=Object(c.b)(),a=m.b.Player();return r.a.createElement(d.a,{title:r.a.createElement(h.a,{dangerouslySetInnerHTML:{__html:e.upg.desc}})},r.a.createElement("span",null,r.a.createElement(h.a,null,e.upg.name),r.a.createElement(p.a,{onClick:function(){e.member.buyUpgrade(e.upg,a,t),e.rerender()}},r.a.createElement(l.a,{money:t.getUpgradeCost(e.upg)}))))}function k(e){const t=Object(c.b)(),a=m.b.Player(),o=Object(n.useState)(!1)[1];function l(){o(e=>!e)}function p(e,n){return Object.keys(s.a).filter(r=>{const i=s.a[r];return!(a.moneys.a[e])}const d=p(e.member.upgrades,u.a.Weapon),k=p(e.member.upgrades,u.a.Armor),v=p(e.member.upgrades,u.a.Vehicle),_=p(e.member.upgrades,u.a.Rootkit),w=p(e.member.augmentations,u.a.Augmentation),S=e.member.calculateAscensionMult(e.member.hack_asc_points),C=e.member.calculateAscensionMult(e.member.str_asc_points),x=e.member.calculateAscensionMult(e.member.def_asc_points),O=e.member.calculateAscensionMult(e.member.dex_asc_points),M=e.member.calculateAscensionMult(e.member.agi_asc_points),T=e.member.calculateAscensionMult(e.member.cha_asc_points);return r.a.createElement(g.a,null,r.a.createElement(h.a,{variant:"h5",color:"primary"},e.member.name," (",e.member.task,")"),r.a.createElement(h.a,null,"Hack: ",e.member.hack," (x",Object(i.c)(e.member.hack_mult*S,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*C,2),")",r.a.createElement("br",null),"Def: ",e.member.def," (x",Object(i.c)(e.member.def_mult*x,2),")",r.a.createElement("br",null),"Dex: ",e.member.dex," (x",Object(i.c)(e.member.dex_mult*O,2),")",r.a.createElement("br",null),"Agi: ",e.member.agi," (x",Object(i.c)(e.member.agi_mult*M,2),")",r.a.createElement("br",null),"Cha: ",e.member.cha," (x",Object(i.c)(e.member.cha_mult*T,2),")"),r.a.createElement(f.a,{display:"flex",flexWrap:"wrap"},r.a.createElement(h.a,null,"Purchased Upgrades: "),r.a.createElement("br",null),e.member.upgrades.map(e=>r.a.createElement(b,{key:e,upgName:e})),e.member.augmentations.map(e=>r.a.createElement(b,{key:e,upgName:e}))),r.a.createElement(f.a,{display:"flex",justifyContent:"space-around"},r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Weapons"),d.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Weapon,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Armor"),k.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Armor,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Vehicles"),v.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Vehicle,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Rootkits"),_.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Rootkit,upgrades:e.member.upgrades})),r.a.createElement(f.a,null,r.a.createElement(h.a,{variant:"h6",color:"primary"},"Augmentations"),w.map(t=>r.a.createElement(E,{key:t.name,rerender:l,member:e.member,upg:t})),r.a.createElement(y,{type:u.a.Augmentation,upgrades:e.member.upgrades}))))}function v(){const e=Object(c.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")},r.a.createElement(h.a,null,"Discount: -",o.a.formatPercentage(1-1/e.getDiscount()))),e.members.map(e=>r.a.createElement(k,{key:e.name,member:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(914),o=a(51),s=a(938),l=a(29),c=a(44),u=a(939),m=a(470),h=a(226);function p(){const e=l.b.Player().corporation;if(null===e)return r.a.createElement(r.a.Fragment,null);const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}const[p,d]=Object(n.useState)("Overview");Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const f=Object.keys(o.a).filter(t=>void 0===e.divisions.find(e=>e.type===t)).length>0;return r.a.createElement(c.a.Corporation.Provider,{value:e},r.a.createElement(m.a,{variant:"fullWidth",value:p,onChange:function(e,t){d(t)}},r.a.createElement(h.a,{label:e.name,value:"Overview"}),e.divisions.map(e=>r.a.createElement(h.a,{key:e.name,label:e.name,value:e.name})),f&&r.a.createElement(h.a,{label:"Expand",value:-1})),"Overview"===p&&r.a.createElement(u.a,{rerender:a}),-1===p&&r.a.createElement(s.a,{setDivisionName:d}),"string"==typeof p&&"Overview"!==p&&r.a.createElement(i.a,{rerender:a,divisionName:p+""}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(915),o=a(44),s=a(23);function l(e){const t=Object(o.b)(),a="Overview"!==e.divisionName?t.divisions.find(t=>t.name===e.divisionName):void 0;if(void 0===a)throw new Error("Cannot find division");return r.a.createElement(o.a.Division.Provider,{value:a},r.a.createElement(i.a,{rerender:e.rerender,city:s.a.Sector12}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(916),o=a(937),s=a(44),l=a(470),c=a(226);function u(e){const t=Object(s.c)(),[a,u]=Object(n.useState)(e.city),m=t.offices[a];if(0===m)return u("Sector-12"),r.a.createElement(r.a.Fragment,null);const h=Object.keys(t.offices).filter(e=>0===t.offices[e]).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"fullWidth",value:a,onChange:function(e,t){u(t)}},Object.values(t.offices).map(e=>0!==e&&r.a.createElement(c.a,{key:e.loc,label:e.loc,value:e.loc})),h&&r.a.createElement(c.a,{label:"Expand",value:"Expand"})),"Expand"!==a?r.a.createElement(i.a,{key:a,rerender:e.rerender,city:a,warehouse:t.warehouses[a],office:m}):r.a.createElement(o.a,{cityStateSetter:u}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(917),o=a(920),s=a(923),l=a(29),c=a(44),u=a(32);function m(e){const t=l.b.Player(),a=Object(c.b)(),n=Object(c.c)();return r.a.createElement(u.a,{display:"flex"},r.a.createElement(u.a,{sx:{width:"50%"}},r.a.createElement(o.a,{rerender:e.rerender,currentCity:e.city,office:e.office}),r.a.createElement(i.a,{rerender:e.rerender,office:e.office})),r.a.createElement(u.a,{sx:{width:"50%"}},r.a.createElement(s.a,{rerender:e.rerender,player:t,corp:a,currentCity:e.city,division:n,warehouse:e.warehouse})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return A}));var n=a(0),r=a.n(n),i=a(52),o=a(4),s=a(918),l=a(919),c=a(16),u=a(44),m=a(1),h=a(10),p=a(94),d=a(73),f=a(528),g=a.n(f),y=a(529),b=a.n(y),E=a(26),k=a(75),v=a(116),_=a(236),w=a(169),S=a(56),C=a(39);function x(e,t){let a=0;for(let n=0;ne.switchMode(e=>!e)},"Switch to Auto Mode")):r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")},r.a.createElement(h.a,{onClick:()=>e.switchMode(e=>!e)},"Switch to Manual Mode"))}function M(e){const t=Object(u.b)(),a=Object(u.c)(),[s,l]=Object(n.useState)(e.office.employees.length>0?e.office.employees[0]:null),h=[];for(let t=0;t0&&(f=l/e.office.employees.length,g=h/e.office.employees.length,y=p/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Unassigned Employees:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,n))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Avg Employee Morale:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(f,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Avg Employee Happiness:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(g,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Avg Employee Energy:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(y,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(m.a,null,"Total Employee Salary:")),r.a.createElement(C.b,null,r.a.createElement(m.a,null,r.a.createElement(c.a,{money:d})))),s&&r.a.createElement(r.a.Fragment,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"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(m.a,null,"Material Production:"))),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"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(m.a,null,"Product Production:"))),r.a.createElement(C.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"The effect this office's 'Business' employees has on boosting sales")},r.a.createElement(m.a,null," Business Multiplier:"))),r.a.createElement(C.b,null,r.a.createElement(m.a,null,"x",o.a.format(a.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(T,{rerender:e.rerender,office:e.office,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,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(T,{rerender:e.rerender,office:e.office,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(T,{rerender:e.rerender,office:e.office,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 A(e){const t=Object(u.b)(),a=Object(u.c)(),[i,o]=Object(n.useState)(!1),[c,p]=Object(n.useState)(!1),[f,g]=Object(n.useState)(!1);return r.a.createElement(d.a,null,r.a.createElement(m.a,null,"Office Space"),r.a.createElement(m.a,null,"Size: ",e.office.employees.length," / ",e.office.size," employees"),r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Automatically hires an employee and gives him/her a random name")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:e.office.atCapacity(),onClick:function(){e.office.atCapacity()||(e.office.hireRandomEmployee(),e.rerender())}},"Hire Employee"))),r.a.createElement("br",null),r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Upgrade the office's size so that it can hold more employees!")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:t.funds<0,onClick:()=>o(!0)},"Upgrade size"))),r.a.createElement(s.a,{rerender:e.rerender,office:e.office,open:i,onClose:()=>o(!1)}),!a.hasResearch("AutoPartyManager")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:r.a.createElement(m.a,null,"Throw an office party to increase your employee's morale and happiness")},r.a.createElement("span",null,r.a.createElement(h.a,{disabled:t.funds<0,onClick:()=>p(!0)},"Throw Party"))),r.a.createElement(l.a,{rerender:e.rerender,office:e.office,open:c,onClose:()=>p(!1)})),r.a.createElement("br",null),r.a.createElement(O,{manualMode:f,switchMode:g}),f?r.a.createElement(M,{rerender:e.rerender,office:e.office}):r.a.createElement(R,{rerender:e.rerender,office:e.office}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(42),s=a(71),l=a(41),c=a(44),u=a(1),m=a(10),h=a(26),p=a(32);function d(e){const t=Object(c.b)();return r.a.createElement(h.a,{title:i.a.formatMoney(e.cost)},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:t.funds{return a=e.cost,n=e.size,void(t.funds=m);){const e=Math.pow(1.09,a+h);if(i+e>m)break;i+=e,++h}const f=o.a.OfficeInitialCost*i;return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,null,"Increase the size of your office space to fit additional employees!"),r.a.createElement(p.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,null,"Upgrade size: "),r.a.createElement(d,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:n,size:o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:s,size:5*o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:f,size:h*o.a.OfficeInitialSize})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(71),l=a(16),c=a(41),u=a(44),m=a(1),h=a(10),p=a(82),d=a(32);function f(e){const t=Object(u.b)(),[a,f]=Object(n.useState)(0),g=a*e.office.employees.length,y=t.funds>=g;function b(){if(null===a||isNaN(a)||a<0)Object(o.a)("Invalid value entered");else if(y){const n=Object(s.w)(t,e.office,a);Object(o.a)("You threw a party for the office! The morale and happiness of each employee increased by "+i.a.formatPercentage(n-1)),e.rerender(),e.onClose()}else Object(o.a)("You don't have enough company funds to throw a party!")}function E(){return isNaN(a)||a<0?r.a.createElement(m.a,null,"Invalid value entered!"):r.a.createElement(m.a,null,"Throwing this party will cost a total of ",r.a.createElement(l.a,{money:g}))}return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(m.a,null,"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"),r.a.createElement(E,null),r.a.createElement(d.a,{display:"flex",alignItems:"center"},r.a.createElement(p.a,{autoFocus:!0,type:"number",placeholder:"$ / employee",value:a,onChange:function(e){let t=parseFloat(e.target.value);isNaN(t)&&(t=0),f(t)},onKeyDown:function(e){13===e.keyCode&&b()}}),r.a.createElement(h.a,{disabled:!y,onClick:b},"Throw Party")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var n=a(0),r=a.n(n),i=a(51),o=a(335),s=a(4),l=a(170),c=a(921),u=a(922),m=a(16),h=a(98),p=a(123),d=a(398),f=a(129),g=a(44),y=a(1),b=a(10),E=a(26),k=a(73),v=a(94),_=a(265),w=a.n(_),S=a(32);function C(){const e=Object(g.b)(),t=Object(g.c)(),[a,o]=Object(n.useState)(!1),s=t.hasMaximumNumberProducts();let l="";switch(t.type){case i.a.Food:l="Build Restaurant";break;case i.a.Tobacco:l="Create Product";break;case i.a.Pharmaceutical:l="Create Drug";break;case i.a.Computer:case"Computer":l="Create Product";break;case i.a.Robotics:l="Design Robot";break;case i.a.Software:l="Develop Software";break;case i.a.Healthcare:l="Build Hospital";break;case i.a.RealEstate:l="Develop Property";break;default:return l="Create Product",r.a.createElement(r.a.Fragment,null)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:s?r.a.createElement(y.a,null,"You have reached the maximum number of products: ",t.getMaximumNumberProducts()):""},r.a.createElement(b.a,{color:0===Object.keys(t.products).length?"error":"primary",onClick:()=>o(!0),disabled:e.funds<0},l)),r.a.createElement(c.a,{open:a,onClose:()=>o(!1)}))}function x(){const e=Object(g.b)(),t=Object(g.c)(),[a,i]=Object(n.useState)(!1),[o,c]=Object(n.useState)(!1),f=1===e.unlockUpgrades[4],k=t.lastCycleRevenue-t.lastCycleExpenses;let _=!1;const C=t.getAdvertisingFactors(),x=C[1],O=C[2],M=C[3],T=C[0];function R(e){return Object(l.a)({progress:e,totalTicks:20})}return f&&(_=!0),r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Industry: ",t.type," (Corp Funds: ",r.a.createElement(m.a,{money:e.funds}),")"),r.a.createElement("br",null),r.a.createElement(p.a,{rows:[["Awareness:",s.a.format(t.awareness,"0.000")],["Popularity:",s.a.format(t.popularity,"0.000")]]}),!1!==_&&r.a.createElement(E.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Total multiplier for this industrys sales due to its awareness and popularity"),r.a.createElement(p.a,{rows:[["Awareness Bonus:","x"+s.a.format(Math.pow(x,.85),"0.000")],["Popularity Bonus:","x"+s.a.format(Math.pow(O,.85),"0.000")],["Ratio Multiplier:","x"+s.a.format(Math.pow(M,.85),"0.000")]]}))},r.a.createElement(y.a,null,"Advertising Multiplier: x",s.a.format(T,"0.000"))),r.a.createElement("br",null),r.a.createElement(p.a,{rows:[["Revenue:",r.a.createElement(h.a,{money:t.lastCycleRevenue})],["Expenses:",r.a.createElement(h.a,{money:t.lastCycleExpenses})],["Profit:",r.a.createElement(h.a,{money:k})]]}),r.a.createElement("br",null),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate.")},r.a.createElement(y.a,null,"Production Multiplier: ",s.a.format(t.prodMult,"0.00"))),r.a.createElement(v.a,{onClick:()=>i(!0)},r.a.createElement(w.a,null)),r.a.createElement(d.a,{open:a,onClose:()=>i(!1)},r.a.createElement(y.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):",r.a.createElement("br",null),r.a.createElement("br",null),"Hardware:    ",R(t.hwFac),r.a.createElement("br",null),"Robots:      ",R(t.robFac),r.a.createElement("br",null),"AI Cores:    ",R(t.aiFac),r.a.createElement("br",null),"Real Estate: ",R(t.reFac)))),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Scientific Research increases the quality of the materials and products that you produce.")},r.a.createElement(y.a,null,"Scientific Research: ",s.a.format(t.sciResearch.qty,"0.000a"))),r.a.createElement(b.a,{sx:{mx:1},onClick:()=>c(!0)},"Research"),r.a.createElement(u.a,{open:o,onClose:()=>c(!1),industry:t})))}function O(e){const t=Object(g.b)(),a=Object(g.c)(),n=[];for(const s in o.a){const l=o.a[s];if(a.hasResearch("AutoBrew")&&"Coffee"===l[4])continue;const c=l[0],u=l[1],m=l[2];let h=0;switch(c){case 0:h=e.office.employees.length*u;break;default:h=u*Math.pow(m,a.upgrades[c])}function i(){t.funds0!==a.offices[e]),[g,y]=Object(n.useState)(f.length>0?f[0]:""),[b,E]=Object(n.useState)(""),[k,v]=Object(n.useState)(null),[_,w]=Object(n.useState)(null);if(a.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);let S=r.a.createElement(r.a.Fragment,null);switch(a.type){case s.a.Food:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Build and manage a new restaurant!");break;case s.a.Tobacco:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Create a new tobacco product!");break;case s.a.Pharmaceutical:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Design and develop a new pharmaceutical drug!");break;case s.a.Computer:case"Computer":S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Design and manufacture a new computer hardware product!");break;case s.a.Robotics:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Design and create a new robot or robotic system!");break;case s.a.Software:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Develop a new piece of software!");break;case s.a.Healthcare:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Build and manage a new hospital!");break;case s.a.RealEstate:S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Develop a new piece of real estate property!");break;default:return S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),"Create a new product!"),r.a.createElement(r.a.Fragment,null)}function C(){if(null!==k&&null!==_){try{Object(l.j)(t,a,g,b,k,_)}catch(e){Object(i.a)(e+"")}e.onClose()}}return S=r.a.createElement(r.a.Fragment,null,S,r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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."),r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,null,S),r.a.createElement(d.a,{style:{margin:"5px"},onChange:function(e){y(e.target.value)},defaultValue:g},f.map(e=>r.a.createElement(p.a,{key:e,value:e},e))),r.a.createElement(m.a,{onChange:function(e){E(e.target.value)},placeholder:(x=a.type,x===s.a.Food?"Restaurant Name":x===s.a.Healthcare?"Hospital Name":x===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement(m.a,{onChange:function(e){""===e.target.value?v(null):v(parseFloat(e.target.value))},autoFocus:!0,type:"number",placeholder:"Design investment"}),r.a.createElement(m.a,{onChange:function(e){""===e.target.value?w(null):w(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&C()},type:"number",placeholder:"Marketing investment"}),r.a.createElement(h.a,{onClick:C},"Develop Product"));var x}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(41),o=a(51),s=a(42),l=a(71),c=a(288),u=a(15),m=a(1),h=a(26),p=a(10),d=a(32),f=a(302),g=a(97),y=a(189),b=a(70),E=a.n(b),k=a(134),v=a.n(k);function _({n:e,division:t}){const[a,i]=Object(n.useState)(!1);if(null===e)return r.a.createElement(r.a.Fragment,null);const o=c.a[e.text];let b=t.sciResearch.qtyi(e=>!e)},r.a.createElement(g.a,null),a?r.a.createElement(v.a,{color:"primary"}):r.a.createElement(E.a,{color:"primary"}))),r.a.createElement(y.a,{in:a,unmountOnExit:!0},r.a.createElement(d.a,{m:4},e.children.map(e=>r.a.createElement(_,{key:e.text,division:t,n:e})))))}function w(e){const t=o.c[e.industry.type];return void 0===t?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(_,{division:e.industry,n:t.root}),r.a.createElement(m.a,null,"Research points: ",e.industry.sciResearch.qty.toFixed(3),r.a.createElement("br",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(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(0),r=a.n(n),i=a(42),o=a(175),s=a(357),l=a(219),c=a(924),u=a(925),m=a(930),h=a(164),p=a(4),d=a(129),f=a(935),g=a(936),y=a(71),b=a(44),E=a(1),k=a(26),v=a(73),_=a(10),w=a(32);function S(e){const t=Object(b.b)(),a=Object(b.c)(),[l,y]=Object(n.useState)(!1);if(0===e.warehouse)return r.a.createElement(r.a.Fragment,null);const S=i.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),C=t.funds>S;let x;switch(a.state){case"START":x="Current state: Preparing...";break;case"PURCHASE":x="Current state: Purchasing materials...";break;case"PRODUCTION":x="Current state: Producing materials and/or products...";break;case"SALE":x="Current state: Selling materials and/or products...";break;case"EXPORT":x="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+a.state)}const O=[];for(const t in e.warehouse.materials)e.warehouse.materials[t]instanceof o.a&&Object(f.a)(t,a)&&O.push(r.a.createElement(m.a,{rerender:e.rerender,city:e.currentCity,key:t,mat:e.warehouse.materials[t],warehouse:e.warehouse}));const M=[];if(a.makesProducts&&Object.keys(a.products).length>0)for(const t in a.products){const n=a.products[t];n instanceof s.a&&M.push(r.a.createElement(u.a,{rerender:e.rerender,city:e.currentCity,key:t,product:n}))}let T=r.a.createElement(r.a.Fragment,null);for(const t in e.warehouse.materials){const a=e.warehouse.materials[t];h.a.hasOwnProperty(t)&&(0!==a.qty&&(T=r.a.createElement(r.a.Fragment,null,T,t,": ",p.a.format(a.qty*h.a[t],"0,0.0"),r.a.createElement("br",null))))}for(const t in a.products){const n=a.products[t];void 0!==n&&(T=r.a.createElement(r.a.Fragment,null,T,t,": ",p.a.format(n.data[e.warehouse.loc][0]*n.siz,"0,0.0")))}return r.a.createElement(v.a,null,r.a.createElement(w.a,{display:"flex",alignItems:"center"},r.a.createElement(k.a,{title:0!==e.warehouse.sizeUsed?r.a.createElement(E.a,null,T):""},r.a.createElement(E.a,{color:e.warehouse.sizeUsed>=e.warehouse.size?"error":"primary"},"Storage: ",p.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",p.a.formatBigNumber(e.warehouse.size))),r.a.createElement(_.a,{disabled:!C,onClick:function(){null!==a&&0!==e.warehouse&&C&&(++e.warehouse.level,e.warehouse.updateSize(t,a),t.funds=t.funds-S,e.rerender())}},"Upgrade Warehouse Size - ",r.a.createElement(d.a,{money:S,corp:t}))),r.a.createElement(E.a,null,"This industry uses the following equation for it's production: "),r.a.createElement("br",null),r.a.createElement(E.a,null,r.a.createElement(g.a,{key:a.name,division:a})),r.a.createElement("br",null),r.a.createElement(E.a,null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),r.a.createElement("br",null),r.a.createElement(E.a,null,x),t.unlockUpgrades[1]&&r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{onClick:()=>y(!0)},"Configure Smart Supply"),r.a.createElement(c.a,{open:l,onClose:()=>y(!1),warehouse:e.warehouse})),O,M)}function C(e){return e.warehouse instanceof l.a?r.a.createElement(S,e):r.a.createElement(x,{rerender:e.rerender,city:e.currentCity})}function x(e){const t=Object(b.b)(),a=Object(b.c)(),n=t.funds!e)}}),label:r.a.createElement(u.a,null,"Enable Smart Supply")}),r.a.createElement("br",null),r.a.createElement(u.a,null,"Use materials already in the warehouse instead of buying new ones, if available:"),s))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ProductElem}));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__(42),_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(926),_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(927),_SellProductModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(928),_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(929),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(122),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(16),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(44),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(26),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(73),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(32);function ProductElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[sellOpen,setSellOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[limitOpen,setLimitOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[discontinueOpen,setDiscontinueOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[marketTaOpen,setMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),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_7__.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_6__.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_6__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_8__.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_8__.a,{money:product.pCost+e}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.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_8__.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_8__.a,{money:product.sCost}));let limitProductionButtonText="Limit Production";return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prdman[city][1],nf)+")"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,product.fin?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(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB)," /s")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_6__.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_6__.a.format(product.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rat,nf)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"An estimate of the material cost it takes to create this Product.")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost))))):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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prog,"0.00"),"% complete")),(hasUpgradeDashboard||product.fin)&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setSellOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellProductModal__WEBPACK_IMPORTED_MODULE_4__.a,{product:product,city:city,open:sellOpen,onClose:()=>setSellOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setLimitOpen(!0)},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__.a,{product:product,city:city,open:limitOpen,onClose:()=>setLimitOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setDiscontinueOpen(!0)},"Discontinue"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__.a,{product:product,rerender:props.rerender,open:discontinueOpen,onClose:()=>setDiscontinueOpen(!1)}),division.hasResearch("Market-TA.I")&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__.a,{product:product,open:marketTaOpen,onClose:()=>setMarketTaOpen(!1)}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(41),o=a(44),s=a(1),l=a(10);function c(e){const t=Object(o.c)();return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,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(l.a,{onClick:function(){t.discontinueProduct(e.product),e.onClose(),e.rerender()}},"Discontinue"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(71),o=a(41),s=a(1),l=a(10),c=a(82);function u(e){const[t,a]=Object(n.useState)(null);function u(){let a=t;null===a&&(a=-1),Object(i.i)(e.product,e.city,a),e.onClose()}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,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(c.a,{autoFocus:!0,placeholder:"Limit",type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&u()}}),r.a.createElement(l.a,{onClick:u},"Limit production"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(41),l=a(1),c=a(82),u=a(10),m=a(161),h=a(147);function p(e){const[t,a]=Object(n.useState)(!0),[p,d]=Object(n.useState)(e.product.sllman[e.city][1]?e.product.sllman[e.city][1]:""),[f,g]=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 y(){try{Object(o.p)(e.product,e.city,p,f,t)}catch(e){Object(i.a)(e+"")}e.onClose()}function b(e){13===e.keyCode&&y()}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,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(c.a,{value:p,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(e){d(e.target.value)},onKeyDown:b}),r.a.createElement(c.a,{value:f,type:"text",placeholder:"Sell price",onChange:function(e){g(e.target.value)},onKeyDown:b}),r.a.createElement(u.a,{onClick:y},"Confirm"),r.a.createElement(m.a,{control:r.a.createElement(h.a,{checked:t,onChange:function(e){a(e.target.checked)}}),label:r.a.createElement(l.a,null,"Use same 'Sell Amount' for all cities")}))}},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(41),s=a(44),l=a(1),c=a(82),u=a(161),m=a(147),h=a(26);function p(e){if(!Object(s.c)().hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const t=e.product.rat/e.product.mku,[a,o]=Object(n.useState)(e.product.pCost),p=Object(n.useState)(!1)[1];const d=a;let f=1;return d>e.product.pCost&&d-e.product.pCost>t&&(f=t/(d-e.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.II"),r.a.createElement("br",null),r.a.createElement(l.a,null,"If you sell at ",i.a.formatMoney(d),", then you will sell"," ",i.a.format(f,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement(c.a,{type:"number",onChange:function(e){o(parseFloat(e.target.value))},value:a}),r.a.createElement("br",null),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e.product.marketTa2,onChange:function(t){e.product.marketTa2=t.target.checked,p(e=>!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(e){const t=e.product.rat/e.product.mku,a=Object(n.useState)(!1)[1];return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,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(u.a,{control:r.a.createElement(m.a,{checked:e.product.marketTa1,onChange:function(t){e.product.marketTa1=t.target.checked,a(e=>!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(p,{product:e.product}))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return MaterialElem}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_OfficeSpace__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(334),_ExportModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(931),_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(932),_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(933),_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(934),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(122),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(16),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(44),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(26),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(73),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(32);function MaterialElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[purchaseMaterialOpen,setPurchaseMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[exportOpen,setExportOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[sellMaterialOpen,setSellMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[materialMarketTaOpen,setMaterialMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_1__.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_6__.a.format(mat.buy,nfB)})`;let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.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_6__.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_6__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_8__.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_8__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.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_8__.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_8__.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)");return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.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_6__.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_6__.a.format(mat.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(mat.bCost))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"The quality of your material. Higher quality will lead to more sales")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qlt,"0.00a")))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:tutorial?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Purchase your required materials to get production started!"):""},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("span",null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:tutorial?"error":"primary",onClick:()=>setPurchaseMaterialOpen(!0),disabled:props.warehouse.smartSupplyEnabled&&Object.keys(division.reqMats).includes(props.mat.name)},purchaseButtonText))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__.a,{mat:mat,warehouse:warehouse,open:purchaseMaterialOpen,onClose:()=>setPurchaseMaterialOpen(!1)}),1===corp.unlockUpgrades[0]&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setExportOpen(!0)},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ExportModal__WEBPACK_IMPORTED_MODULE_2__.a,{mat:mat,open:exportOpen,onClose:()=>setExportOpen(!1)})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:division.prodMats.includes(props.mat.name)&&!mat.sllman[0]?"error":"primary",onClick:()=>setSellMaterialOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__.a,{mat:mat,open:sellMaterialOpen,onClose:()=>setSellMaterialOpen(!1)}),division.hasResearch("Market-TA.I")&&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(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMaterialMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__.a,{mat:mat,open:materialMarketTaOpen,onClose:()=>setMaterialMarketTaOpen(!1)})))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(41),l=a(44),c=a(1),u=a(82),m=a(10),h=a(32),p=a(75),d=a(116);function f(e){const t=Object(l.b)();if(0===t.divisions.length)throw new Error("Export popup created with no divisions.");if(0===Object.keys(t.divisions[0].warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[a,f]=Object(n.useState)(t.divisions[0].name),[g,y]=Object(n.useState)(Object.keys(t.divisions[0].warehouses)[0]),[b,E]=Object(n.useState)(""),k=Object(n.useState)(!1)[1];function v(t){for(let a=0;a!e)}const _=t.divisions.find(e=>e.name===a);if(void 0===_)throw new Error(`Export popup somehow ended up with undefined division '${_}'`);const w=Object.keys(_.warehouses).filter(e=>0!==_.warehouses[e]);return w.length>0&&!w.includes(g)&&y(w[0]),r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(d.a,{onChange:function(e){const a=e.target.value;f(a),y(Object.keys(t.divisions[0].warehouses)[0])},value:a},t.divisions.map(e=>r.a.createElement(p.a,{key:e.name,value:e.name},e.name))),r.a.createElement(d.a,{onChange:function(e){y(e.target.value)},value:g},w.map(e=>{if(0!==_.warehouses[e])return r.a.createElement(p.a,{key:e,value:e},e)})),r.a.createElement(u.a,{placeholder:"Export amount / s",onChange:function(e){E(e.target.value)},value:b}),r.a.createElement(m.a,{onClick:function(){try{Object(o.e)(a,g,e.mat,b)}catch(e){Object(i.a)(e+"")}e.onClose()}},"Export"),r.a.createElement(c.a,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(h.a,{display:"flex",alignItems:"center",key:t},r.a.createElement(m.a,{sx:{mx:2},onClick:()=>v(e)},"delete"),r.a.createElement(c.a,null,"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 d}));var n=a(0),r=a.n(n),i=a(4),o=a(41),s=a(44),l=a(1),c=a(82),u=a(161),m=a(147),h=a(26);function p(e){if(!Object(s.c)().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 p=e.mat.getMarkupLimit();const d=t;let f=1;return d>e.mat.bCost?d-e.mat.bCost>p&&(f=Math.pow(p/(d-e.mat.bCost),2)):d!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(e){const t=Object(n.useState)(!1)[1];const a=e.mat.getMarkupLimit();return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,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(u.a,{control:r.a.createElement(m.a,{checked:e.mat.marketTa1,onChange:function(a){e.mat.marketTa1=a.target.checked,t(e=>!e)}}),label:r.a.createElement(h.a,{title:r.a.createElement(l.a,null,"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(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(p,{mat:e.mat}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(41),l=a(1),c=a(82),u=a(10);function m(e){const[t,a]=Object(n.useState)(e.mat.sllman[1]?e.mat.sllman[1]+"":""),[m,h]=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 p(){try{Object(o.o)(e.mat,t,m)}catch(e){Object(i.a)(e+"")}e.onClose()}function d(e){13===e.keyCode&&p()}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,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(c.a,{value:t,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(e){a(e.target.value)},onKeyDown:d}),r.a.createElement(c.a,{value:m,type:"text",placeholder:"Sell price",onChange:function(e){h(e.target.value)},onKeyDown:d}),r.a.createElement(u.a,{onClick:p},"Confirm"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(15),o=a(164),s=a(4),l=a(71),c=a(41),u=a(44),m=a(1),h=a(82),p=a(10);function d(e){const t=parseFloat(e.amount),a=t*e.mat.bCost,n=o.a[e.mat.name];return t*n>(e.warehouse.size-e.warehouse.sizeUsed)/n?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{color:"error"},"Not enough warehouse space to purchase this amount")):isNaN(a)?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{color:"error"},"Invalid put for Bulk Purchase amount")):r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,"Purchasing ",s.a.format(t,"0,0.00")," of ",e.mat.name," will cost"," ",s.a.formatMoney(a)))}function f(e){const t=Object(u.b)(),[a,s]=Object(n.useState)("");function l(){const n=parseFloat(a),r=o.a[e.mat.name];if(n*r>(e.warehouse.size-e.warehouse.sizeUsed)/r)Object(i.a)("You do not have enough warehouse size to fit this purchase");else if(isNaN(n))Object(i.a)("Invalid input amount");else{const a=n*e.mat.bCost;if(!(t.funds>=a))return void Object(i.a)("You cannot afford this purchase.");t.funds=t.funds-a,e.mat.qty+=n,e.onClose()}}return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,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(d,{warehouse:e.warehouse,mat:e.mat,amount:a}),r.a.createElement(h.a,{value:a,onChange:function(e){s(e.target.value)},type:"number",placeholder:"Bulk Purchase amount",onKeyDown:function(e){13===e.keyCode&&l()}}),r.a.createElement(p.a,{onClick:l},"Confirm Bulk Purchase"))}function g(e){const t=Object(u.c)(),[a,o]=Object(n.useState)(e.mat.buy?e.mat.buy:0);function s(){if(null!==a){try{Object(l.c)(e.mat,a)}catch(e){Object(i.a)(e+"")}e.onClose()}}return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,"Enter the amount of ",e.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement(h.a,{value:a,onChange:function(e){o(parseFloat(e.target.value))},autoFocus:!0,placeholder:"Purchase amount",type:"number",onKeyDown:function(e){13===e.keyCode&&s()}}),r.a.createElement(p.a,{onClick:s},"Confirm"),r.a.createElement(p.a,{onClick:function(){e.mat.buy=0,e.onClose()}},"Clear Purchase"),t.hasResearch("Bulk Purchasing")&&r.a.createElement(f,{onClose:e.onClose,mat:e.mat,warehouse:e.warehouse})))}},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(153);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(i.MathJaxContext,null,r.a.createElement(i.MathJax,null,"\\("+t.join("+")+"\\Rightarrow"+a.map(e=>`1 \\text{${e}}`).join("+")+"\\)"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(42),o=a(15),s=a(71),l=a(129),c=a(44),u=a(1),m=a(75),h=a(116),p=a(10);function d(e){const t=Object(c.b)(),a=Object(c.c)(),d=Object.keys(a.offices).filter(e=>0===a.offices[e]),[f,g]=Object(n.useState)(d[0]),y=t.fundsr.a.createElement(m.a,{key:e,value:e},e))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(15),o=a(51),s=a(44),l=a(71),c=a(1),u=a(10),m=a(82),h=a(75),p=a(32),d=a(116);function f(e){const t=Object(s.b)(),a=Object.keys(o.a).sort().filter(e=>void 0===t.divisions.find(t=>t.type===e)).sort(),[f,g]=Object(n.useState)(a.length>0?a[0]:""),[y,b]=Object(n.useState)(""),E=o.d[f];if(void 0===E)throw new Error(`Invalid industry: '${f}'`);const k=t.fundsr.a.createElement(h.a,{key:e,value:e},e))),r.a.createElement(c.a,null,_(t)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,"Division name:"),r.a.createElement(p.a,{display:"flex",alignItems:"center"},r.a.createElement(m.a,{autoFocus:!0,value:y,onChange:function(e){b(e.target.value)},onKeyDown:function(e){13===e.keyCode&&v()},type:"text",InputProps:{endAdornment:r.a.createElement(u.a,{disabled:k,sx:{mx:1},onClick:v},"Expand")}})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var n=a(0),r=a.n(n),i=a(940),o=a(941),s=a(942),l=a(943),c=a(944),u=a(945),m=a(946),h=a(947),p=a(948),d=a(24),f=a(42),g=a(394),y=a(395),b=a(8),E=a(4),k=a(22),v=a(16),_=a(98),w=a(123),S=a(29),C=a(44),x=a(1),O=a(26),M=a(10),T=a(32),R=a(73),A=a(46);function P({rerender:e}){const t=S.b.Player(),a=Object(C.b)(),n=a.revenue-a.expenses,i=[];function o(e,t){1!==t&&i.push([e,E.a.format(t,"0.000")])}return o("Production Multiplier: ",a.getProductionMultiplier()),o("Storage Multiplier: ",a.getStorageMultiplier()),o("Advertising Multiplier: ",a.getAdvertisingMultiplier()),o("Empl. Creativity Multiplier: ",a.getEmployeeCreMultiplier()),o("Empl. Charisma Multiplier: ",a.getEmployeeChaMultiplier()),o("Empl. Intelligence Multiplier: ",a.getEmployeeIntMultiplier()),o("Empl. Efficiency Multiplier: ",a.getEmployeeEffMultiplier()),o("Sales Multiplier: ",a.getSalesMultiplier()),o("Scientific Research Multiplier: ",a.getScientificResearchMultiplier()),r.a.createElement(r.a.Fragment,null,r.a.createElement(w.a,{rows:[["Total Funds:",r.a.createElement(v.a,{money:a.funds})],["Total Revenue:",r.a.createElement(_.a,{money:a.revenue})],["Total Expenses:",r.a.createElement(_.a,{money:a.expenses})],["Publicly Traded:",a.public?"Yes":"No"],["Owned Stock Shares:",E.a.format(a.numShares,"0.000a")],["Stock Price:",a.public?r.a.createElement(v.a,{money:a.sharePrice}):"N/A"]]}),r.a.createElement("br",null),r.a.createElement(T.a,{display:"flex"},r.a.createElement(O.a,{title:r.a.createElement(w.a,{rows:[["Outstanding Shares:",E.a.format(a.issuedShares,"0.000a")],["Private Shares:",E.a.format(a.totalShares-a.issuedShares-a.numShares,"0.000a")]]})},r.a.createElement(x.a,null,"Total Stock Shares: ",E.a.format(a.totalShares,"0.000a")))),r.a.createElement("br",null),r.a.createElement(j,{profit:n}),r.a.createElement("br",null),r.a.createElement(w.a,{rows:i}),r.a.createElement("br",null),r.a.createElement(B,null),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"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.")},r.a.createElement(M.a,{onClick:()=>a.getStarterGuide(t)},"Getting Started Guide")),a.public?r.a.createElement(F,{rerender:e}):r.a.createElement(N,{rerender:e}),r.a.createElement(D,null),r.a.createElement("br",null),r.a.createElement(I,{rerender:e}))}function N({rerender:e}){const t=Object(C.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),l=t.fundingRound<4,c=l?"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company":"";return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{title:r.a.createElement(x.a,null,c)},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:!l,onClick:()=>i(!0)},"Find Investors"))),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"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(M.a,{onClick:()=>s(!0)},"Go Public")),r.a.createElement(h.a,{open:a,onClose:()=>i(!1),rerender:e}),r.a.createElement(p.a,{open:o,onClose:()=>s(!1),rerender:e}),r.a.createElement("br",null))}function I({rerender:e}){const t=Object(C.b)();return t.divisions.length<=0?r.a.createElement(x.a,{variant:"h4"},"Upgrades are unlocked once you create an industry."):r.a.createElement(r.a.Fragment,null,r.a.createElement(R.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Unlocks"),r.a.createElement(A.a,{container:!0},Object.values(g.a).filter(e=>!t.unlockUpgrades[e[0]]).map(t=>r.a.createElement(o.a,{rerender:e,upgradeData:t,key:t[0]})))),r.a.createElement(R.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Upgrades"),r.a.createElement(A.a,{container:!0},t.upgrades.map((e,t)=>y.a[t]).map(t=>r.a.createElement(i.a,{rerender:e,upgrade:t,key:t[0]})))))}function F({rerender:e}){const t=Object(C.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),[h,p]=Object(n.useState)(!1),[d,f]=Object(n.useState)(!1),g=t.shareSaleCooldown>0,y=g?"Cannot sell shares for "+t.convertCooldownToString(t.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.",b=t.issueNewSharesCooldown>0,E=b?"Cannot issue new shares for "+t.convertCooldownToString(t.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{title:r.a.createElement(x.a,null,y)},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:g,onClick:()=>i(!0)},"Sell Shares"))),r.a.createElement(l.a,{open:a,onClose:()=>i(!1),rerender:e}),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"Buy back shares you that previously issued or sold at market price.")},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:t.issuedShares<1,onClick:()=>s(!0)},"Buyback shares"))),r.a.createElement(c.a,{open:o,onClose:()=>s(!1),rerender:e}),r.a.createElement("br",null),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,E)},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:b,onClick:()=>p(!0)},"Issue New Shares"))),r.a.createElement(m.a,{open:h,onClose:()=>p(!1)}),r.a.createElement(O.a,{title:r.a.createElement(x.a,null,"Manage the dividends that are paid out to shareholders (including yourself)")},r.a.createElement(M.a,{onClick:()=>f(!0)},"Issue Dividends")),r.a.createElement(u.a,{open:d,onClose:()=>f(!1)}),r.a.createElement("br",null))}function D(){const e=S.b.Player(),t=Object(C.b)(),[a,i]=Object(n.useState)(!1),o=t.determineValuation()>=f.a.BribeThreshold&&e.factions.filter(e=>d.a[e].getInfo().offersWork()).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(O.a,{title:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"},r.a.createElement("span",null,r.a.createElement(M.a,{disabled:!o,onClick:function(){o&&i(!0)}},"Bribe Factions"))),r.a.createElement(s.a,{open:a,onClose:()=>i(!1)}))}function j({profit:e}){const t=Object(C.b)();if(t.dividendPercentage<=0||e<=0)return r.a.createElement(r.a.Fragment,null);const a=t.dividendPercentage/100*e,n=e-a,i=a/t.totalShares;return r.a.createElement(w.a,{rows:[["Retained Profits (after dividends):",r.a.createElement(_.a,{money:n})],["Dividend Percentage:",E.a.format(t.dividendPercentage/100,"0%")],["Dividends per share:",r.a.createElement(_.a,{money:i})],["Your earnings as a shareholder:",r.a.createElement(_.a,{money:t.getDividends()})]]})}function B(){const e=Object(C.b)().storedCycles*b.a.MilliPerCycle;return e<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement(x.a,null,"Bonus time: ",Object(k.b)(e),r.a.createElement("br",null),r.a.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(15),o=a(71),s=a(129),l=a(44),c=a(1),u=a(26),m=a(10),h=a(32),p=a(46);function d(e){const t=Object(l.b)(),a=e.upgrade,n=t.upgrades[a[0]],d=a[1],f=a[2],g=d*Math.pow(f,n),y=a[5];return r.a.createElement(p.a,{item:!0,xs:4},r.a.createElement(h.a,{display:"flex",alignItems:"center",flexDirection:"row-reverse"},r.a.createElement(m.a,{disabled:t.funds!!i.a[e].getInfo().offersWork()&&!t.hasGangWith(e)),b=Object(m.b)(),[E,k]=Object(n.useState)(0),[v,_]=Object(n.useState)(0),[w,S]=Object(n.useState)(a.length>0?a[0]:""),C=null===E||null===v||0===E&&0===v||isNaN(E)||isNaN(v)||E<0||v<0||b.fundsb.numShares;function x(e,t){return(e+t*b.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(h.a,null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement(g.a,{display:"flex",alignItems:"center"},r.a.createElement(h.a,null,"Faction:"),r.a.createElement(y.a,{value:w,onChange:function(e){S(e.target.value)}},a.map(e=>{if(i.a[e].getInfo().offersWork()&&!t.hasGangWith(e))return r.a.createElement(d.a,{key:e,value:e},e)}))),r.a.createElement(h.a,null,function(e,t){return 0===e&&0===t?"":isNaN(e)||isNaN(t)||e<0||t<0?"ERROR: Invalid value(s) entered":b.fundsb.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(x(e,t))+" reputation with "+w+" with this bribe"}(E||0,v||0)),r.a.createElement(f.a,{onChange:function(e){k(parseFloat(e.target.value))},placeholder:"Corporation funds"}),r.a.createElement(f.a,{sx:{mx:1},onChange:function(e){_(parseFloat(e.target.value))},placeholder:"Stock Shares"}),r.a.createElement(p.a,{disabled:C,sx:{mx:1},onClick:()=>function(t,a){const n=i.a[w];if(C)return;const r=x(t,a);Object(l.a)("You gained "+s.a.formatReputation(r)+" reputation with "+n.name+" by bribing them."),n.playerReputation+=r,b.funds=b.funds-t,b.numShares-=a,e.onClose()}(E||0,v||0)},"Bribe"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(41),l=a(29),c=a(44),u=a(42),m=a(1),h=a(82),p=a(10),d=a(16);function f(e){const t=l.b.Player(),a=Object(c.b)(),[f,g]=Object(n.useState)(null),y=null===f||isNaN(f)||f<=0||f>a.numShares;function b(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>a.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const t=a.calculateShareSale(e.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",e.shares," shares for a total of ",i.a.formatMoney(t))}}function E(){if(null===f)return;if(y)return;const n=a.calculateShareSale(f),s=n[0],l=n[1],c=n[2];if(a.numShares-=f,isNaN(a.issuedShares)){console.error("Corporation issuedShares is NaN: "+a.issuedShares);const e=a.issuedShares;isNaN(e)?a.issuedShares=0:a.issuedShares=e}a.issuedShares+=f,a.sharePrice=l,a.shareSalesUntilPriceUpdate=c,a.shareSaleCooldown=u.a.SellSharesCooldown,t.gainMoney(s,"corporation"),e.onClose(),Object(o.a)(r.a.createElement(r.a.Fragment,null,"Sold ",i.a.formatMoney(f)," shares for",r.a.createElement(d.a,{money:s}),". The corporation's stock price fell to  ",r.a.createElement(d.a,{money:a.sharePrice}),"as a result of dilution.")),e.rerender()}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(m.a,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(a.sharePrice)),r.a.createElement(b,{shares:f,corp:a}),r.a.createElement("br",null),r.a.createElement(h.a,{variant:"standard",autoFocus:!0,type:"number",placeholder:"Shares to sell",onChange:function(e){""===e.target.value?g(null):g(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&E()}}),r.a.createElement(p.a,{disabled:y,onClick:E,sx:{mx:1}},"Sell shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(41),o=a(4),s=a(29),l=a(44),c=a(1),u=a(10),m=a(82);function h(e){const t=s.b.Player(),a=Object(l.b)(),[h,p]=Object(n.useState)(null);const d=1.1*a.sharePrice,f=null===h||isNaN(h)||h<=0||h>a.issuedShares||h*d>t.money;function g(){if(!f&&null!==h){if(a.numShares+=h,isNaN(a.issuedShares)){console.warn("Corporation issuedShares is NaN: "+a.issuedShares),console.warn("Converting to number now");const e=a.issuedShares;isNaN(e)?a.issuedShares=0:a.issuedShares=e}a.issuedShares-=h,t.loseMoney(h*d,"corporation"),e.onClose(),e.rerender()}}function y(){return null===h?r.a.createElement(r.a.Fragment,null):isNaN(h)||h<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):h>a.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(a.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",h," shares for a total of ",o.a.formatMoney(h*d))}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(d),". Your company currently has ",o.a.formatBigNumber(a.issuedShares)," outstanding stock shares."),r.a.createElement(y,null),r.a.createElement("br",null),r.a.createElement(m.a,{autoFocus:!0,type:"number",placeholder:"Shares to buyback",onChange:function(e){""===e.target.value?p(null):p(Math.round(parseFloat(e.target.value)))},onKeyDown:function(e){13===e.keyCode&&g()}}),r.a.createElement(u.a,{disabled:f,onClick:g},"Buy shares"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(15),o=a(41),s=a(42),l=a(71),c=a(44),u=a(1),m=a(82),h=a(10);function p(e){const t=Object(c.b)(),[a,p]=Object(n.useState)(0),d=!isNaN(a)&&a>=0&&a<=100*s.a.DividendMaxPercentage;function f(){if(d&&null!==a){try{Object(l.g)(t,a/100)}catch(e){Object(i.a)(e+"")}e.onClose()}}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,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 100. (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),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(m.a,{autoFocus:!0,value:a,onChange:function(e){if(""===e.target.value)p(0);else{let t=parseFloat(e.target.value);t>100&&(t=100),t<0&&(t=0),p(t)}},onKeyDown:function(e){13===e.keyCode&&f()},placeholder:"Dividend %",type:"number"}),r.a.createElement(h.a,{disabled:!d,sx:{mx:1},onClick:f},"Allocate Dividend Percentage"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(4),o=a(15),s=a(41),l=a(31),c=a(42),u=a(44),m=a(1),h=a(82),p=a(10);function d(e){const t=Object(u.b)();if(null===e.shares)return r.a.createElement(r.a.Fragment,null);const a=Math.round(.9*t.sharePrice),n=Math.round(.2*t.totalShares),o=n-n%1e6;let s=e.shares;return isNaN(s)?r.a.createElement(m.a,null,"Invalid input"):(s/=1e7,s=1e7*Math.round(s),s<1e7?r.a.createElement(m.a,null,"Must issue at least 10 million new shares"):s>o?r.a.createElement(m.a,null,"You cannot issue that many shares"):r.a.createElement(m.a,null,"Issue ",i.a.format(s,"0.000a")," new shares for"," ",i.a.formatMoney(s*a),"?"))}function f(e){const t=Object(u.b)(),[a,f]=Object(n.useState)(null),g=Math.round(.2*t.totalShares),y=g-g%1e6,b=1e7*Math.round((a||0)/1e7),E=null===a||isNaN(b)||b<1e7||b>y;function k(){if(null===a)return;if(E)return;const n=Math.round(.9*t.sharePrice);let r=a;r=1e7*Math.round(r/1e7);const s=r*n;t.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,t.totalShares+=r;let u=Object(l.a)(0,Math.round(r/2));u=1e6*Math.round(u/1e6),t.issuedShares+=r-u,t.funds=t.funds+s,t.immediatelyUpdateSharePrice(),e.onClose(),Object(o.a)(`Issued ${i.a.format(r,"0.000a")} and raised ${i.a.formatMoney(s)}. ${i.a.format(u,"0.000a")} of these shares were bought by private investors.

Stock price decreased to `+i.a.formatMoney(t.sharePrice))}return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(m.a,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(y)," 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(d,{shares:a}),r.a.createElement(h.a,{autoFocus:!0,placeholder:"# New Shares",onChange:function(e){""===e.target.value?f(null):f(parseFloat(e.target.value))},onKeyDown:function(e){13===e.keyCode&&k()}}),r.a.createElement(p.a,{disabled:E,onClick:k,sx:{mx:1}},"Issue New Shares"))}},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(42),s=a(41),l=a(44),c=a(1),u=a(10);function m(e){const t=Object(l.b)(),a=t.determineValuation();let n=0,m=4;switch(t.fundingRound){case 0:n=.1,m=4;break;case 1:n=.35,m=3;break;case 2:n=.25,m=3;break;case 3:n=.2,m=2.5;break;default:return r.a.createElement(r.a.Fragment,null)}const h=a*n*m,p=Math.floor(o.a.INITIALSHARES*n);return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,null,"An investment firm has offered you ",i.a.formatMoney(h)," in funding in exchange for a"," ",i.a.format(100*n,"0.000a"),"% stake in the company (",i.a.format(p,"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(u.a,{onClick:function(){t.fundingRound++,t.addFunds(h),t.numShares-=p,e.rerender(),e.onClose()}},"Accept"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(15),o=a(41),s=a(4),l=a(44),c=a(1),u=a(10),m=a(82),h=a(32);function p(e){const t=Object(l.b)(),[a,p]=Object(n.useState)(""),d=t.determineValuation()/t.totalShares;function f(){const n=parseFloat(a),r=t.determineValuation()/t.totalShares;isNaN(n)?Object(i.a)("Invalid value for number of issued shares"):n>t.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(t.public=!0,t.sharePrice=r,t.issuedShares=n,t.numShares-=n,t.addFunds(n*r),e.rerender(),Object(i.a)(`You took your ${t.name} public and earned `+s.a.formatMoney(n*r)+" in your IPO"),e.onClose())}return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,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(d)," 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(t.numShares,"0.000a")," of shares that you can issue."),r.a.createElement(h.a,{display:"flex",alignItems:"center"},r.a.createElement(m.a,{value:a,onChange:function(e){p(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&f()}}),r.a.createElement(u.a,{disabled:parseFloat(a)<0||parseFloat(a)>t.numShares,sx:{mx:1},onClick:f},"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(950),o=a(951),s=a(29),l=a(167);function c(e,t,a){const n=a-Math.pow(t,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}function u(e){const t=s.b.Player(),a=s.b.Router(),[u,m]=Object(n.useState)(!1);if(void 0===e.location.infiltrationData)throw new Error("Trying to do infiltration on invalid location.");const h=e.location.infiltrationData.startingSecurityLevel,p=function(e,t){return c(e,e.strength+e.defense+e.dexterity+e.agility+e.charisma,t)}(t,h),d=function(e,t){return c(e,Object(l.b)(9e3*e.strength_exp_mult,e.strength_mult)+Object(l.b)(9e3*e.defense_exp_mult,e.defense_mult)+Object(l.b)(9e3*e.agility_exp_mult,e.agility_mult)+Object(l.b)(9e3*e.dexterity_exp_mult,e.dexterity_mult)+Object(l.b)(9e3*e.charisma_exp_mult,e.charisma_mult),t)}(t,h);return console.log(`${p} ${d}`),u?r.a.createElement(o.a,{StartingDifficulty:h,Difficulty:p,Reward:d,MaxLevel:e.location.infiltrationData.maxClearanceLevel}):r.a.createElement(i.a,{Location:e.location,Difficulty:p,MaxLevel:e.location.infiltrationData.maxClearanceLevel,start:()=>m(!0),cancel:function(){a.toCity()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(46),o=a(1),s=a(10),l=a(4);function c(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 u(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h4"},"Infiltrating ",e.Location.name)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Maximum level: ",e.MaxLevel)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Difficulty: ",l.a.format(33.3333*e.Difficulty,"0")," / 100")),e.Difficulty>1.5&&r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Warning: This location is too heavily guarded for your current stats, try training or finding an easier location.")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"[",0===(t=e.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,c("white",13*t),c("orange",13*(t-1)),c("red",13*(t-2))),"]"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ^ ^ ^ ^"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," Trivial Normal Hard Impossible")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,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(o.a,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(o.a,null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:e.start},"Start")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:e.cancel},"Cancel"))));var t}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n,r=a(29),i=a(0),o=a.n(i),s=a(46),l=a(952),c=a(953),u=a(955),m=a(956),h=a(957),p=a(958),d=a(959),f=a(960),g=a(961),y=a(962),b=a(1);!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 E=[u.a,c.a,m.a,h.a,p.a,d.a,f.a,g.a];function k(e){const t=r.b.Player(),a=r.b.Router(),[c,u]=Object(i.useState)(1),[m,h]=Object(i.useState)(n.Countdown),[p,d]=Object(i.useState)(""),[f,g]=Object(i.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*E.length)});function k(){let e=f.lastGames[0];const t=[f.lastGames[0],f.lastGames[1],f.id];for(;t.includes(e);)e=Math.floor(Math.random()*E.length);return e}function v(){g({lastGames:[f.lastGames[1],f.id],id:k()})}function _(e){d(t=>{let a=t;return a+=e?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let w;switch(m){case n.Countdown:w=o.a.createElement(l.a,{onFinish:()=>h(n.Minigame)});break;case n.Minigame:{const r=E[f.id];w=o.a.createElement(r,{onSuccess:function(){_(!0),c===e.MaxLevel?h(n.Sell):(h(n.Countdown),u(c+1)),v()},onFailure:function(r){h(n.Countdown),_(!1);const i=null!=r&&r.automated?t.hp:3*e.StartingDifficulty;t.takeDamage(i)?a.toCity():v()},difficulty:e.Difficulty+c/50});break}case n.Sell:w=o.a.createElement(y.a,{StartingDifficulty:e.StartingDifficulty,Difficulty:e.Difficulty,Reward:e.Reward,MaxLevel:e.MaxLevel})}function S(){return o.a.createElement(b.a,{variant:"h4"},o.a.createElement("span",{style:{color:"gray"}},p.slice(0,p.length-1)),p[p.length-1])}return o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{container:!0,spacing:3},o.a.createElement(s.a,{item:!0,xs:3},o.a.createElement(b.a,null,"Level: ",c," / ",e.MaxLevel),o.a.createElement(S,null)),o.a.createElement(s.a,{item:!0,xs:12},w)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(46),o=a(1);function s(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(o.a,{variant:"h4"},"Get Ready!"),r.a.createElement(o.a,{variant:"h4"},t))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(238),c=a(200),u=a(532),m=a(1);const h={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 p(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[p,d]=Object(n.useState)(""),[f]=Object(n.useState)(function(e){let t="";const a=Object(l.b)(e.min,e.max);for(let e=0;e"===e.key?">":""}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(f[f.length-p.length-1],a)?e.onFailure():f.length!==p.length+1?d(p+a):e.onSuccess())},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(46),o=a(198),s=a(199),l=a(200),c=a(1);const u={Trivial:{window:600},Normal:{window:325},Hard:{window:250},Impossible:{window:150}};function m(e){const t={window:0};Object(l.a)(u,e.difficulty,t);const[a,m]=Object(n.useState)(0);return Object(n.useEffect)(()=>{let e=window.setTimeout(()=>{m(1),e=window.setTimeout(()=>{m(2),e=window.setTimeout(()=>m(0),t.window)},250)},3250*Math.random()+1500-(250+t.window));return()=>{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(c.a,{variant:"h4"},"Slash when his guard is down!"),0===a&&r.a.createElement(c.a,{variant:"h4"},"Guarding ..."),1===a&&r.a.createElement(c.a,{variant:"h4"},"Preparing?"),2===a&&r.a.createElement(c.a,{variant:"h4"},"ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault()," "===t.key&&(2!==a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(238),c=a(200),u=a(532),m=a(1);const h={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 p(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[p]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e0&&(a+=" "),a+=d[Math.floor(Math.random()*d.length)];return a}(t)),[f,g]=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(m.a,{variant:"h4"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),"Backspace"===t.key)return;const a=f+t.key.toUpperCase();p.startsWith(a)?p===a?e.onSuccess():g(a):e.onFailure()},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(m.a,{style:{transform:"scaleX(-1)"}},p)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(m.a,null,f,r.a.createElement(u.a,null))))}const d=["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 m}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(200),c=a(1);const u={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function m(e){const t={timer:0,size:0};Object(l.a)(u,e.difficulty,t);const a=t.timer,[m]=Object(n.useState)(function(e){const t=[];t.push(h[Math.floor(Math.random()*h.length)]);for(let a=0;a0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}(t),t}(t)),[d,f]=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(c.a,{variant:"h4"},"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault();const a=t.key;if(" "===a)return void(h.includes(m[d])?e.onSuccess():e.onFailure());let n=d;for(["ArrowUp","w","ArrowRight","d"].includes(a)&&n++,["ArrowDown","s","ArrowLeft","a"].includes(a)&&n--;n<0;)n+=m.length;for(;n>m.length-1;)n-=m.length;f(n)},onFailure:e.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(c.a,{variant:"h5",color:"primary"},"↑"),r.a.createElement(c.a,{variant:"h5",color:"primary"},m[d]),r.a.createElement(c.a,{variant:"h5",color:"primary"},"↓")))}const h=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],p=["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 h}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(238),c=a(200),u=a(1);const m={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 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=["←","→","↑","↓"];let a="";for(let n=0;n=h.length&&e.onSuccess()):e.onFailure()},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(46),o=a(198),s=a(199),l=a(200),c=a(238),u=a(1);const m={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 h(e){const t={timer:0,width:0,height:0,symbols:0};Object(l.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=[];for(let a=0;at==f?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),h.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement(u.a,null,e.map((e,a)=>a==y[0]&&t==y[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=[y[0]+a[0],y[1]+a[1]];if(n[0]=(n[0]+h[0].length)%h[0].length,n[1]=(n[1]+h.length)%h.length,b(n)," "===t.key){if(h[y[1]][y[0]]!==d[f])return void e.onFailure();g(f+1),d.length===f+1&&e.onSuccess()}},onFailure:e.onFailure})))}function p(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(46),o=a(198),s=a(199),l=a(200),c=a(238),u=a(1);const m={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 h(e){const t={timer:0,width:0,height:0,mines:0};Object(l.a)(m,e.difficulty,t);const a=t.timer,[h]=Object(n.useState)(function(e){const t=p(e);for(let a=0;a{const e=setTimeout(()=>E(!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(u.a,{variant:"h4"},b?"Remember all the mines!":"Mark all the mines!"),h.map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement(u.a,null,e.map((e,a)=>b?h[t][a]?r.a.createElement("span",{key:a},"[?] "):r.a.createElement("span",{key:a},"[ ] "):a==g[0]&&t==g[1]?r.a.createElement("span",{key:a},"[X] "):d[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(),b)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=[g[0]+a[0],g[1]+a[1]];if(n[0]=(n[0]+h[0].length)%h[0].length,n[1]=(n[1]+h.length)%h.length,y(n)," "==t.key){if(!h[g[1]][g[0]])return void e.onFailure();f(t=>(t[g[1]][g[0]]=!0,function(e,t){function a(e){return e.flat().reduce((e,t)=>e+(t?1:0),0)}return a(e)===a(t)}(h,t)&&e.onSuccess(),t))}},onFailure:e.onFailure})))}function p(e){const t=[];for(let a=0;ar.a.createElement(o.a,{key:t},e.toString())),r.a.createElement(o.a,null,new Array(d.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(o.a,null,d.map((e,a)=>3!==t&&4!==t||!f[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(s.a,{onKeyDown:function(t){t.preventDefault();const a=parseInt(t.key);a<1||a>d.length||isNaN(a)||b(t=>{const n=[...t];n[a-1]=!0,E.some(e=>e.shouldCut(d[a-1],a-1))||e.onFailure();const r=[];for(let e=0;ee===n[t])&&e.onSuccess(),n})},onFailure:e.onFailure})))}function g(e){const t=Math.floor(Math.random()*e.length);return{toString:()=>`Cut wires number ${t+1}.`,shouldCut:(e,a)=>t===a}}function y(e){const t=e[Math.floor(Math.random()*e.length)].colors[0];return{toString:()=>`Cut all wires colored ${d[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(24),r=a(0),i=a.n(r),o=a(46),s=a(16),l=a(104),c=a(5),u=a(29),m=a(1),h=a(10),p=a(75),d=a(116);function f(e){const t=u.b.Player(),a=u.b.Router(),[f,g]=Object(r.useState)("none");function y(){a.toCity()}const b=e.MaxLevel*Math.pow(1.01,e.MaxLevel),E=Math.pow(e.Reward+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*b*c.a.InfiltrationRep,k=Math.pow(e.Reward+1,2)*Math.pow(e.StartingDifficulty,3)*3e3*b*c.a.InfiltrationMoney;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:10},i.a.createElement(m.a,{variant:"h4"},"Infiltration successful!")),i.a.createElement(o.a,{item:!0,xs:10},i.a.createElement(m.a,{variant:"h5",color:"primary"},"You can trade the confidential information you found for money or reputation."),i.a.createElement(d.a,{value:f,onChange:function(e){g(e.target.value)}},i.a.createElement(p.a,{key:"none",value:"none"},"none"),t.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement(p.a,{key:e,value:e},e))),i.a.createElement(h.a,{onClick:function(){"none"!==f&&(n.a[f].playerReputation+=E,y())}},"Trade for ",i.a.createElement(l.a,{reputation:E})," reputation")),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(h.a,{onClick:function(){t.gainMoney(k,"infiltration"),y()}},"Sell for ",i.a.createElement(s.a,{money:k}))),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(h.a,{onClick:y},"Quit"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(533),o=a(965),s=a(29),l=a(1),c=a(116),u=a(75),m=a(32);const h={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 p(...e){let t=0;for(let a=0;ae.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking-t.hacking,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)=>p(e.strength,e.defense,e.dexterity,e.agility)-p(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>p(e.hacking,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-p(t.hacking,t.strength,t.defense,t.dexterity,t.agility,t.charisma),TotalNumAugmentations:(e,t)=>e.augmentations.length-t.augmentations.length};function f(){const e=s.b.Player(),[t,a]=Object(n.useState)(h.Cost);0===e.resleeves.length&&(e.resleeves=Object(i.a)());const p=d[t];if(void 0===p)throw new Error(`sort function '${t}' is undefined`);return e.resleeves.sort(p),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"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(m.a,{display:"flex",alignItems:"center"},r.a.createElement(l.a,null,"Sort By: "),r.a.createElement(c.a,{value:t,onChange:function(e){a(e.target.value)}},Object.keys(h).map(e=>r.a.createElement(u.a,{key:e,value:e},h[e])))),e.resleeves.map((t,a)=>r.a.createElement(o.a,{key:a,player:e,resleeve:t})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(205),r=a(20),i=a(21);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;er.a.createElement(d.a,{key:e.name,value:e.name},e.name))),r.a.createElement(u.a,null,void 0!==g&&g.info)),r.a.createElement(f.a,{item:!0,xs:3},r.a.createElement(u.a,null,"It costs ",r.a.createElement(s.a,{money:y,player:e.player})," to purchase this Sleeve."),r.a.createElement(h.a,{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:y}),"!"))}},"Purchase"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(29),o=a(8),s=a(4),l=a(104),c=a(410),u=a(98),m=a(16),h=a(22),p=a(24),d=a(215),f=a(61),g=a(227),y=a(9),b=a(1),E=a(46),k=a(10),v=a(170);const _=1e3/o.a.MilliPerCycle;function w(){const e=Object(n.useState)(!1)[1];function t(){e(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(t,o.a.MilliPerCycle);return()=>clearInterval(e)},[]);const a=i.b.Player(),w=i.b.Router(),S=p.a[a.currentWorkFactionName];if(a.workType==o.a.WorkTypeFaction){function C(){w.toFaction(S),a.finishFactionWork(!0)}function x(){w.toFaction(S),a.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently ",a.currentWorkFactionDescription," for your faction ",S.name,r.a.createElement("br",null),"(Current Faction Reputation: ",r.a.createElement(l.a,{reputation:S.playerReputation}),"). ",r.a.createElement("br",null),"You have been doing this for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{money:a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this faction ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null),r.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",r.a.createElement("br",null),"There is no penalty for cancelling earlier.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{sx:{mx:2},onClick:C},"Stop Faction Work"),r.a.createElement(k.a,{onClick:x},"Do something else simultaneously")))}const O=a.className;if(""!==a.className){function C(){a.finishClass(!0),w.toCity()}let e="";return e=O==o.a.ClassGymStrength||O==o.a.ClassGymDefense||O==o.a.ClassGymDexterity||O==o.a.ClassGymAgility?"Stop training at gym":"Stop taking course",r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You have been ",O," for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"This has cost you: ",r.a.createElement("br",null),r.a.createElement(m.a,{money:-a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyLossRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),"You have gained: ",r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null),"You may cancel at any time")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{onClick:C},e)))}if(a.workType==o.a.WorkTypeCompany){const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof d.a))throw new Error("Could not find Company: "+a.companyName);function C(){a.finishWork(!0),w.toJob()}function x(){a.stopFocusing(),w.toJob()}t=e.playerReputation;const n=a.jobs[a.companyName],i=.5===a.cancelationPenalty()?"half":"three-quarters";return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",n," at ",a.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:t}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{money:a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null),r.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.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{sx:{mx:2},onClick:C},"Stop Working"),r.a.createElement(k.a,{onClick:x},"Do something else simultaneously")))}if(a.workType==o.a.WorkTypeCompanyPartTime){function C(){a.finishWorkPartTime(!0),w.toJob()}function x(){a.stopFocusing(),w.toJob()}const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof d.a))throw new Error("Could not find Company: "+a.companyName);t=e.playerReputation;const n=a.jobs[a.companyName];return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",n," at ",a.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:t}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,{money:a.workMoneyGained})," (",r.a.createElement(u.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null),r.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.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{sx:{mx:2},onClick:C},"Stop Working"),r.a.createElement(k.a,{onClick:x},"Do something else simultaneously")))}if(""!==a.crimeType){const e=Math.round(a.timeWorked/a.timeNeededToCompleteWork*100);let t=Math.round(e/5);t<0&&(t=0),t>20&&(t=20);const n=Object(v.a)({progress:(t+1)/20,totalTicks:20});return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,r.a.createElement(b.a,null,"You are attempting to ",a.crimeType,"."),r.a.createElement("br",null),r.a.createElement(b.a,null,"Time remaining: ",Object(h.b)(a.timeNeededToCompleteWork-a.timeWorked)),r.a.createElement("br",null),r.a.createElement("pre",null,n))),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{onClick:()=>{w.toLocation(g.a[y.a.Slums]),a.finishCrime(!0)}},"Cancel crime")))}return""!==a.createProgramName?r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working on coding ",a.createProgramName,".",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(h.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"The program is ",(a.timeWorkedCreateProgram/a.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",r.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later.")),r.a.createElement(E.a,{item:!0},r.a.createElement(k.a,{onClick:()=>{a.finishCreateProgramWork(!0),w.toTerminal()}},"Cancel work on creating program"))):(a.workType||w.toTerminal(),r.a.createElement(r.a.Fragment,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return N}));var n=a(0),r=a.n(n),i=a(126),o=a(154),s=a(1),l=a(472),c=a(46),u=a(161),m=a(147),h=a(116),p=a(75),d=a(10),f=a(32),g=a(274),y=a(66),b=a(127),E=a(26),k=a(82),v=a(1004),_=a.n(v),w=a(1005),S=a.n(w),C=a(968),x=a(15),O=a(971),M=a(972),T=a(13),R=a(310),A=a(329);const P=Object(i.a)(e=>Object(o.a)({root:{width:50,padding:e.spacing(2),userSelect:"none"}}));function N(e){const t=P(),a=Object(n.useRef)(null),[i,o]=Object(n.useState)(T.a.CodeInstructionRunTime),[v,w]=Object(n.useState)(T.a.MaxLogCapacity),[N,I]=Object(n.useState)(T.a.MaxPortCapacity),[F,D]=Object(n.useState)(T.a.MaxTerminalCapacity),[j,B]=Object(n.useState)(T.a.AutosaveInterval),[G,L]=Object(n.useState)(T.a.SuppressMessages),[W,H]=Object(n.useState)(T.a.SuppressFactionInvites),[U,q]=Object(n.useState)(T.a.SuppressTravelConfirmation),[K,z]=Object(n.useState)(T.a.SuppressBuyAugmentationConfirmation),[$,Y]=Object(n.useState)(T.a.SuppressTIXPopup),[V,J]=Object(n.useState)(T.a.SuppressBladeburnerPopup),[X,Q]=Object(n.useState)(T.a.DisableHotkeys),[Z,ee]=Object(n.useState)(T.a.DisableASCIIArt),[te,ae]=Object(n.useState)(T.a.DisableTextEffects),[ne,re]=Object(n.useState)(T.a.EnableBashHotkeys),[ie,oe]=Object(n.useState)(T.a.TimestampsFormat),[se,le]=Object(n.useState)(T.a.SaveGameOnFileSave),[ce,ue]=Object(n.useState)(T.a.Locale),[me,he]=Object(n.useState)(!1),[pe,de]=Object(n.useState)(!1),[fe,ge]=Object(n.useState)(!1);return r.a.createElement("div",{className:t.root,style:{width:"90%"}},r.a.createElement(s.a,{variant:"h4",gutterBottom:!0},"Options"),r.a.createElement(c.a,{container:!0,spacing:3},r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(g.a,null,r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript exec time (ms)")),r.a.createElement(l.a,{value:i,onChange:function(e,t){o(t),T.a.CodeInstructionRunTime=t},step:1,min:5,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.")},r.a.createElement(s.a,null,"Netscript log size")),r.a.createElement(l.a,{value:v,onChange:function(e,t){w(t),T.a.MaxLogCapacity=t},step:20,min:20,max:500,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Netscript port size")),r.a.createElement(l.a,{value:N,onChange:function(e,t){I(t),T.a.MaxPortCapacity=t},step:1,min:20,max:100,valueLabelDisplay:"auto"})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Terminal capacity")),r.a.createElement(l.a,{value:F,onChange:function(e,t){D(t),T.a.MaxTerminalCapacity=t},step:50,min:50,max:500,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"The time (in seconds) between each autosave. Set to 0 to disable autosave.")},r.a.createElement(s.a,null,"Autosave interval (s)")),r.a.createElement(l.a,{value:j,onChange:function(e,t){B(t),T.a.AutosaveInterval=t},step:30,min:0,max:600,valueLabelDisplay:"auto",marks:!0})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:G,onChange:function(e){L(e.target.checked),T.a.SuppressMessages=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.")},r.a.createElement(s.a,null,"Suppress story messages"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:W,onChange:function(e){H(e.target.checked),T.a.SuppressFactionInvites=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.")},r.a.createElement(s.a,null,"Suppress faction invites"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:U,onChange:function(e){q(e.target.checked),T.a.SuppressTravelConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.")},r.a.createElement(s.a,null,"Suppress travel confirmations"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:K,onChange:function(e){z(e.target.checked),T.a.SuppressBuyAugmentationConfirmation=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the confirmation message before buying augmentation will not show up.")},r.a.createElement(s.a,null,"Suppress buy augmentation confirmation"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:$,onChange:function(e){Y(e.target.checked),T.a.SuppressTIXPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, the stock market will never create any popup.")},r.a.createElement(s.a,null,"Suppress TIX messages"))})),!!e.player.bladeburner&&r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:V,onChange:function(e){J(e.target.checked),T.a.SuppressBladeburnerPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.")},r.a.createElement(s.a,null,"Suppress bladeburner popup"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:X,onChange:function(e){Q(e.target.checked),T.a.DisableHotkeys=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,'If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the "Save and Close (Ctrl + b)" hotkey in the Text Editor.')},r.a.createElement(s.a,null,"Disable hotkeys"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:Z,onChange:function(e){ee(e.target.checked),T.a.DisableASCIIArt=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set all ASCII art will be disabled.")},r.a.createElement(s.a,null,"Disable ascii art"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:te,onChange:function(e){ae(e.target.checked),T.a.DisableTextEffects=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.")},r.a.createElement(s.a,null,"Disable text effects"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:ne,onChange:function(e){re(e.target.checked),T.a.EnableBashHotkeys=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser shortcuts are overriden by the new Bash shortcuts.")},r.a.createElement(s.a,null,"Enable bash hotkeys"))})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/")},r.a.createElement("span",null,r.a.createElement(k.a,{InputProps:{startAdornment:r.a.createElement(s.a,{color:"format error"===Object(A.a)(ie)&&""!==ie?"error":"success"},"Timestamp format: ")},value:ie,onChange:function(e){oe(e.target.value),T.a.TimestampsFormat=e.target.value},placeholder:"yyyy-MM-dd hh:mm:ss"})))),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:se,onChange:function(e){le(e.target.checked),T.a.SaveGameOnFileSave=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Save your game any time a file is saved in the script editor.")},r.a.createElement(s.a,null,"Save game on file save"))})),r.a.createElement(y.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Sets the locale for displaying numbers.")},r.a.createElement(s.a,null,"Locale ")),r.a.createElement(h.a,{value:ce,onChange:function(e){ue(e.target.value),T.a.Locale=e.target.value}},r.a.createElement(p.a,{value:"en"},"en"),r.a.createElement(p.a,{value:"bg"},"bg"),r.a.createElement(p.a,{value:"cs"},"cs"),r.a.createElement(p.a,{value:"da-dk"},"da-dk"),r.a.createElement(p.a,{value:"de"},"de"),r.a.createElement(p.a,{value:"en-au"},"en-au"),r.a.createElement(p.a,{value:"en-gb"},"en-gb"),r.a.createElement(p.a,{value:"es"},"es"),r.a.createElement(p.a,{value:"fr"},"fr"),r.a.createElement(p.a,{value:"hu"},"hu"),r.a.createElement(p.a,{value:"it"},"it"),r.a.createElement(p.a,{value:"lv"},"lv"),r.a.createElement(p.a,{value:"no"},"no"),r.a.createElement(p.a,{value:"pl"},"pl"),r.a.createElement(p.a,{value:"ru"},"ru")))),!location.href.startsWith("file://")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,r.a.createElement(s.a,null,"danielyxie / BigD (Original developer): "),r.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_blank"},r.a.createElement("input",{type:"hidden",name:"cmd",value:"_s-xclick"}),r.a.createElement("input",{type:"hidden",name:"encrypted",value:"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tM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NVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----"}),r.a.createElement("input",{type:"image",src:"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(y.a,null,r.a.createElement(s.a,null,"hydroflame (Current maintainer):"," ",r.a.createElement(b.a,{href:"https://www.google.com/search?q=Where+to+donate+blood+near+me%3F",target:"_blank"},"Donate blood!")," ")))),r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(f.a,null,r.a.createElement(d.a,{onClick:()=>e.save()},"Save Game"),r.a.createElement(d.a,{onClick:()=>de(!0)},"Delete Game")),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"export")},r.a.createElement(d.a,{onClick:()=>e.export()},r.a.createElement(_.a,{color:"primary"}),"Export")),r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"import")},r.a.createElement(d.a,{onClick:function(){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;const e=a.current;if(null===e)throw new Error("import input should not be null");e.click()}},r.a.createElement(S.a,{color:"primary"}),"Import",r.a.createElement("input",{ref:a,id:"import-game-file-selector",type:"file",hidden:!0,onChange:function(e){const t=e.target.files;if(null===t)return;const a=t[0];if(!a)return void Object(x.a)("Invalid file selected");const n=new FileReader;n.onload=function(e){const t=e.target;if(null===t)return void console.error("error importing file");const a=t.result;if("string"!=typeof a||null===a)return void console.error("FileReader event was not type string");const n=a;Object(R.c)(n).then(()=>setTimeout(()=>location.reload(),1e3))},n.readAsText(a)}})))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.")},r.a.createElement(d.a,{onClick:()=>e.forceKill()},"Force kill all active scripts"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.")},r.a.createElement(d.a,{onClick:()=>e.softReset()},"Soft Reset"))),r.a.createElement(f.a,null,r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.")},r.a.createElement(d.a,{onClick:()=>he(!0)},"Diagnose files")),r.a.createElement(d.a,{onClick:()=>ge(!0)},"Theme editor")),r.a.createElement(f.a,null,r.a.createElement(b.a,{href:"https://github.com/danielyxie/bitburner/issues/new",target:"_blank"},r.a.createElement(s.a,null,"Report bug")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(b.a,{href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"},r.a.createElement(s.a,null,"Documentation")),r.a.createElement(b.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},r.a.createElement(s.a,null,"Discord")),r.a.createElement(b.a,{href:"https://www.reddit.com/r/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Reddit")),r.a.createElement(b.a,{href:"https://plaza.dsolver.ca/games/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Incremental game plaza"))))),r.a.createElement(C.a,{open:me,onClose:()=>he(!1)}),r.a.createElement(O.a,{onConfirm:()=>{de(!1),Object(R.a)().then(()=>setTimeout(()=>location.reload(),1e3)).catch(e=>console.error("Could not delete game: "+e))},open:pe,onClose:()=>de(!1),confirmationText:"Really delete your game? (It's permanent!)"}),r.a.createElement(M.a,{open:fe,onClose:()=>ge(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(27),o=a(41),s=a(4),l=a(236),c=a(169),u=a(49),m=a(1320),h=a(1321),p=a(56),d=a(1),f=a(73),g=a(190),y=a(191),b=a(192),E=a(70),k=a.n(E);function v(e){const t=Object(i.d)(e.hostname);if(null===t)throw new Error(`server '${e.hostname}' should not be null`);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(g.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(y.a,{expandIcon:r.a.createElement(k.a,null)},r.a.createElement(d.a,null,t.hostname," (",s.a.formatBigNumber(a),"b)")),r.a.createElement(b.a,null,r.a.createElement(m.a,{component:f.a},r.a.createElement(l.a,null,r.a.createElement(h.a,null,r.a.createElement(p.a,null,r.a.createElement(u.a,null,r.a.createElement(d.a,null,"Filename")),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,"Size")))),r.a.createElement(c.a,null,n.map(e=>r.a.createElement(p.a,{key:e.name},r.a.createElement(u.a,{component:"th",scope:"row"},r.a.createElement(d.a,null,e.name)),r.a.createElement(u.a,{align:"right"},r.a.createElement(d.a,null,s.a.formatBigNumber(e.size),"b"))))))),r.a.createElement("ul",null)))}function _(e){const t=[];for(const e of Object(i.c)())t.push(e.hostname);return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,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."),t.map(e=>r.a.createElement(v,{key:e,hostname:e}))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(1);function l(e){return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,null,e.confirmationText),r.a.createElement(o.a,{onClick:()=>{e.onConfirm()}},"Confirm")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(1),l=a(26),c=a(73),u=a(82),m=a(94),h=a(360),p=a.n(h),d=a(973),f=a(268),g=a(13);function y({name:e,onColorChange:t,color:a,defaultColor:n}){return void 0===a&&(console.error(`color ${e} was undefined, reverting to default`),a=n),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{mx:1},label:e,value:a,InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{hideTextfield:!0,value:a,onChange:a=>t(e,"#"+a.hex)})),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{onClick:()=>t(e,n)},r.a.createElement(p.a,{color:"primary"})))}}))}function b(e){const[t,a]=Object(n.useState)({...g.a.theme});function h(e,t){a(a=>(a[e]=t,a)),g.a.theme[e]=t,f.b.emit()}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,null,r.a.createElement(l.a,{open:!0,placement:"top",title:r.a.createElement(s.a,null,"Example tooltip")},r.a.createElement(o.a,{color:"primary"},"primary button")),r.a.createElement(o.a,{color:"secondary"},"secondary button"),r.a.createElement(o.a,{color:"warning"},"warning button"),r.a.createElement(o.a,{color:"info"},"info button"),r.a.createElement(o.a,{color:"error"},"error button"),r.a.createElement(o.a,{disabled:!0},"disabled button"),r.a.createElement(s.a,{color:"primary"},"text with primary color"),r.a.createElement(s.a,{color:"secondary"},"text with secondary color"),r.a.createElement(s.a,{color:"error"},"text with error color"),r.a.createElement(u.a,{value:"Text field"})),r.a.createElement("br",null),r.a.createElement(y,{name:"primarylight",onColorChange:h,color:t.primarylight,defaultColor:g.b.theme.primarylight}),r.a.createElement(y,{name:"primary",onColorChange:h,color:t.primary,defaultColor:g.b.theme.primary}),r.a.createElement(y,{name:"primarydark",onColorChange:h,color:t.primarydark,defaultColor:g.b.theme.primarydark}),r.a.createElement("br",null),r.a.createElement(y,{name:"successlight",onColorChange:h,color:t.successlight,defaultColor:g.b.theme.successlight}),r.a.createElement(y,{name:"success",onColorChange:h,color:t.success,defaultColor:g.b.theme.success}),r.a.createElement(y,{name:"successdark",onColorChange:h,color:t.successdark,defaultColor:g.b.theme.successdark}),r.a.createElement("br",null),r.a.createElement(y,{name:"errorlight",onColorChange:h,color:t.errorlight,defaultColor:g.b.theme.errorlight}),r.a.createElement(y,{name:"error",onColorChange:h,color:t.error,defaultColor:g.b.theme.error}),r.a.createElement(y,{name:"errordark",onColorChange:h,color:t.errordark,defaultColor:g.b.theme.errordark}),r.a.createElement("br",null),r.a.createElement(y,{name:"secondarylight",onColorChange:h,color:t.secondarylight,defaultColor:g.b.theme.secondarylight}),r.a.createElement(y,{name:"secondary",onColorChange:h,color:t.secondary,defaultColor:g.b.theme.secondary}),r.a.createElement(y,{name:"secondarydark",onColorChange:h,color:t.secondarydark,defaultColor:g.b.theme.secondarydark}),r.a.createElement("br",null),r.a.createElement(y,{name:"warninglight",onColorChange:h,color:t.warninglight,defaultColor:g.b.theme.warninglight}),r.a.createElement(y,{name:"warning",onColorChange:h,color:t.warning,defaultColor:g.b.theme.warning}),r.a.createElement(y,{name:"warningdark",onColorChange:h,color:t.warningdark,defaultColor:g.b.theme.warningdark}),r.a.createElement("br",null),r.a.createElement(y,{name:"infolight",onColorChange:h,color:t.infolight,defaultColor:g.b.theme.infolight}),r.a.createElement(y,{name:"info",onColorChange:h,color:t.info,defaultColor:g.b.theme.info}),r.a.createElement(y,{name:"infodark",onColorChange:h,color:t.infodark,defaultColor:g.b.theme.infodark}),r.a.createElement("br",null),r.a.createElement(y,{name:"welllight",onColorChange:h,color:t.welllight,defaultColor:g.b.theme.welllight}),r.a.createElement(y,{name:"well",onColorChange:h,color:t.well,defaultColor:g.b.theme.well}),r.a.createElement(y,{name:"white",onColorChange:h,color:t.white,defaultColor:g.b.theme.white}),r.a.createElement(y,{name:"black",onColorChange:h,color:t.black,defaultColor:g.b.theme.black}),r.a.createElement(y,{name:"backgroundprimary",onColorChange:h,color:t.backgroundprimary,defaultColor:g.b.theme.backgroundprimary}),r.a.createElement(y,{name:"backgroundsecondary",onColorChange:h,color:t.backgroundsecondary,defaultColor:g.b.theme.backgroundsecondary}),r.a.createElement(y,{name:"button",onColorChange:h,color:t.button,defaultColor:g.b.theme.button}),r.a.createElement("br",null),r.a.createElement(y,{name:"hp",onColorChange:h,color:t.hp,defaultColor:g.b.theme.hp}),r.a.createElement(y,{name:"money",onColorChange:h,color:t.money,defaultColor:g.b.theme.money}),r.a.createElement(y,{name:"hack",onColorChange:h,color:t.hack,defaultColor:g.b.theme.hack}),r.a.createElement(y,{name:"combat",onColorChange:h,color:t.combat,defaultColor:g.b.theme.combat}),r.a.createElement(y,{name:"cha",onColorChange:h,color:t.cha,defaultColor:g.b.theme.cha}),r.a.createElement(y,{name:"int",onColorChange:h,color:t.int,defaultColor:g.b.theme.int}),r.a.createElement(y,{name:"rep",onColorChange:h,color:t.rep,defaultColor:g.b.theme.rep}),r.a.createElement(y,{name:"disabled",onColorChange:h,color:t.disabled,defaultColor:g.b.theme.disabled}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{label:"import / export theme",value:JSON.stringify(t),onChange:function(e){try{const t=JSON.parse(e.target.value);if("object"!=typeof t)return;a(t);for(const e of Object.keys(t))g.a.theme[e]=t[e];f.b.emit()}catch(e){}},InputProps:{endAdornment:r.a.createElement(m.a,{onClick:function(){a({...g.b.theme}),Object.assign(g.a.theme,g.b.theme),f.b.emit()},size:"large"},r.a.createElement(p.a,null))}}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1007),o=a(1014),s=a(29),l=a(1),c=a(10),u=a(127);function m(){const e=s.b.Player(),[t,a]=Object(n.useState)(!1),m=Object(n.useState)(!1)[1];function h(){m(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(h,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Sleeves"),r.a.createElement(l.a,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(c.a,{onClick:()=>a(!0)},"FAQ"),r.a.createElement(u.a,{target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves"},r.a.createElement(l.a,null," Documentation")),e.sleeves.map((e,t)=>r.a.createElement(i.a,{key:t,rerender:h,sleeve:e})),r.a.createElement(o.a,{open:t,onClose:()=>a(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var n=a(0),r=a.n(n),i=a(72),o=a(8),s=a(77),l=a(4),c=a(170),u=a(1008),m=a(1009),h=a(16),p=a(98),d=a(29),f=a(410),g=a(1010),y=a(1011),b=a(1012),E=a(1013),k=a(166),v=a(123),_=a(1),w=a(73),S=a(46),C=a(10),x=a(26);function O(e){const t=d.b.Player(),[a,O]=Object(n.useState)(!1),[M,T]=Object(n.useState)(!1),[R,A]=Object(n.useState)(!1),[P,N]=Object(n.useState)(!1),[I,F]=Object(n.useState)(["------","------","------"]);let D=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:D=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"}D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:{const t=Object.values(s.a).find(t=>t.name===e.sleeve.crimeType);if(!t)throw new Error("crime should not be undefined");D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",t.type," (Success Rate:"," ",l.a.formatPercentage(t.successRate(e.sleeve)),").");break}case i.a.Class:D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:D=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:D=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:D=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(): "+I[0])}let j=[];if(e.sleeve.currentTask===i.a.Crime)j=[["Money",r.a.createElement(h.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(j=[["Money:",r.a.createElement(p.a,{money: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 a=e.sleeve.getRepGain(t);j.push(["Reputation:",r.a.createElement(f.a,{reputation:5*a})])}return r.a.createElement(r.a.Fragment,null,r.a.createElement(S.a,{container:!0,component:w.a},r.a.createElement(S.a,{item:!0,xs:3},r.a.createElement(g.a,{sleeve:e.sleeve}),r.a.createElement(C.a,{onClick:()=>O(!0)},"More Stats"),r.a.createElement(x.a,{title:t.moneyA(!0),disabled:t.moneyN(!0),disabled:e.sleeve.shock<100},"Manage Augmentations")))),r.a.createElement(S.a,{item:!0,xs:5},r.a.createElement(E.a,{player:t,sleeve:e.sleeve,setABC:F}),r.a.createElement(_.a,null,D),r.a.createElement(_.a,null,e.sleeve.currentTask===i.a.Crime&&Object(c.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement(C.a,{onClick:function(){switch(e.sleeve.resetTaskStatus(),I[0]){case"------":break;case"Work for Company":e.sleeve.workForCompany(t,I[1]);break;case"Work for Faction":e.sleeve.workForFaction(t,I[1],I[2]);break;case"Commit Crime":e.sleeve.commitCrime(t,I[1]);break;case"Take University Course":e.sleeve.takeUniversityCourse(t,I[2],I[1]);break;case"Workout at Gym":e.sleeve.workoutAtGym(t,I[2],I[1]);break;case"Shock Recovery":e.sleeve.shockRecovery(t);break;case"Synchronize":e.sleeve.synchronize(t);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+I[0])}e.rerender()}},"Set Task")),r.a.createElement(S.a,{item:!0,xs:4},r.a.createElement(v.a,{title:"Earnings (Pre-Synchronization)",rows:j}),r.a.createElement(C.a,{onClick:()=>T(!0)},"More Earnings Info"))),r.a.createElement(y.a,{open:a,onClose:()=>O(!1),sleeve:e.sleeve}),r.a.createElement(b.a,{open:M,onClose:()=>T(!1),sleeve:e.sleeve}),r.a.createElement(m.a,{open:R,onClose:()=>A(!1),sleeve:e.sleeve,rerender:e.rerender}),r.a.createElement(u.a,{open:P,onClose:()=>N(!1),sleeve:e.sleeve}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(513),o=a(20),s=a(16),l=a(41),c=a(29),u=a(1),m=a(26),h=a(73),p=a(32),d=a(10),f=a(169),g=a(236),y=a(39),b=a(56);function E(e){const t=c.b.Player(),a=Object(n.useState)(!1)[1];function E(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(E,150);return()=>clearInterval(e)},[]);const k=e.sleeve.augmentations.map(e=>e.name),v=Object(i.a)(e.sleeve,t);return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,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."),r.a.createElement(g.a,{size:"small",padding:"none"},r.a.createElement(f.a,null,v.map(a=>r.a.createElement(b.a,{key:a.name},r.a.createElement(y.b,null,r.a.createElement(d.a,{onClick:()=>function(a){e.sleeve.tryBuyAugmentation(t,a),E()}(a),disabled:t.money0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Owned Augmentations:"),k.map(e=>{const t=o.a[e];let a=r.a.createElement(r.a.Fragment,null);return a="string"==typeof t.info?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,t.info),r.a.createElement("br",null),r.a.createElement("br",null),t.stats):r.a.createElement(r.a.Fragment,null,t.info,r.a.createElement("br",null),r.a.createElement("br",null),t.stats),r.a.createElement(m.a,{key:e,title:r.a.createElement(u.a,null,a)},r.a.createElement(h.a,null,r.a.createElement(u.a,null,e)))}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(8),o=a(16),s=a(396),l=a(23),c=a(13),u=a(15),m=a(29),h=a(41),p=a(1),d=a(10);function f(e){const t=m.b.Player();function a(a){t.canAfford(i.a.TravelCost)||Object(u.a)("You cannot afford to have this sleeve travel to another city"),e.sleeve.city=a,t.loseMoney(i.a.TravelCost,"sleeve"),e.sleeve.resetTaskStatus(),e.rerender(),e.onClose()}return r.a.createElement(h.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,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(o.a,{money:i.a.TravelCost,player:t}),". It will also set your current sleeve task to idle."),c.a.DisableASCIIArt?Object.values(l.a).map(e=>r.a.createElement(d.a,{key:e,onClick:()=>a(e)},e)):r.a.createElement(s.a,{currentCity:e.sleeve.city,onTravel:e=>a(e)})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(4),r=a(0),i=a.n(r),o=a(123);function s(e){const t=[["HP: ",i.a.createElement(i.a.Fragment,null,n.a.formatHp(e.sleeve.hp)," / ",n.a.formatHp(e.sleeve.max_hp))],["City: ",i.a.createElement(i.a.Fragment,null,e.sleeve.city)],["Hacking: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.hacking))],["Strength: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.strength))],["Defense: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.defense))],["Dexterity: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.dexterity))],["Agility: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.agility))],["Charisma: ",i.a.createElement(i.a.Fragment,null,n.a.formatSkill(e.sleeve.charisma))],["Shock: ",i.a.createElement(i.a.Fragment,null,n.a.formatSleeveShock(100-e.sleeve.shock))],["Sync: ",i.a.createElement(i.a.Fragment,null,n.a.formatSleeveSynchro(e.sleeve.sync))],["Memory: ",i.a.createElement(i.a.Fragment,null,n.a.formatSleeveMemory(e.sleeve.memory))]];return i.a.createElement(o.a,{rows:t})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(4),r=a(123),i=a(41),o=a(0),s=a.n(o);function l(e){return s.a.createElement(i.a,{open:e.open,onClose:e.onClose},s.a.createElement(r.a,{rows:[[s.a.createElement(s.a.Fragment,null,"Hacking: "),e.sleeve.hacking,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.hacking_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Strength: "),e.sleeve.strength,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.strength_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Defense: "),e.sleeve.defense,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.defense_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Dexterity: "),e.sleeve.dexterity,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.dexterity_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Agility: "),e.sleeve.agility,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.agility_exp)," exp)")],[s.a.createElement(s.a.Fragment,null,"Charisma: "),e.sleeve.charisma,s.a.createElement(s.a.Fragment,null," (",n.a.formatExp(e.sleeve.charisma_exp)," exp)")]],title:"Stats:"}),s.a.createElement("br",null),s.a.createElement(r.a,{rows:[[s.a.createElement(s.a.Fragment,null,"Hacking Level multiplier: "),n.a.formatPercentage(e.sleeve.hacking_mult)],[s.a.createElement(s.a.Fragment,null,"Hacking Experience multiplier: "),n.a.formatPercentage(e.sleeve.hacking_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Strength Level multiplier: "),n.a.formatPercentage(e.sleeve.strength_mult)],[s.a.createElement(s.a.Fragment,null,"Strength Experience multiplier: "),n.a.formatPercentage(e.sleeve.strength_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Defense Level multiplier: "),n.a.formatPercentage(e.sleeve.defense_mult)],[s.a.createElement(s.a.Fragment,null,"Defense Experience multiplier: "),n.a.formatPercentage(e.sleeve.defense_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Dexterity Level multiplier: "),n.a.formatPercentage(e.sleeve.dexterity_mult)],[s.a.createElement(s.a.Fragment,null,"Dexterity Experience multiplier: "),n.a.formatPercentage(e.sleeve.dexterity_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Agility Level multiplier: "),n.a.formatPercentage(e.sleeve.agility_mult)],[s.a.createElement(s.a.Fragment,null,"Agility Experience multiplier: "),n.a.formatPercentage(e.sleeve.agility_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Charisma Level multiplier: "),n.a.formatPercentage(e.sleeve.charisma_mult)],[s.a.createElement(s.a.Fragment,null,"Charisma Experience multiplier: "),n.a.formatPercentage(e.sleeve.charisma_exp_mult)],[s.a.createElement(s.a.Fragment,null,"Faction Reputation Gain multiplier: "),n.a.formatPercentage(e.sleeve.faction_rep_mult)],[s.a.createElement(s.a.Fragment,null,"Company Reputation Gain multiplier: "),n.a.formatPercentage(e.sleeve.company_rep_mult)],[s.a.createElement(s.a.Fragment,null,"Salary multiplier: "),n.a.formatPercentage(e.sleeve.work_money_mult)],[s.a.createElement(s.a.Fragment,null,"Crime Money multiplier: "),n.a.formatPercentage(e.sleeve.crime_money_mult)],[s.a.createElement(s.a.Fragment,null,"Crime Success multiplier: "),n.a.formatPercentage(e.sleeve.crime_success_mult)]],title:"Multipliers:"}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(4),r=a(16),i=a(0),o=a(123),s=a(41);function l(e){return i.createElement(s.a,{open:e.open,onClose:e.onClose},i.createElement(o.a,{rows:[["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)]],title:"Earnings for Current Task:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["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)]],title:"Total Earnings for Host Consciousness:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["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)]],title:"Total Earnings for Other Sleeves:"}),i.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(72),o=a(77),s=a(9),l=a(23),c=a(24),u=a(166),m=a(116),h=a(75);const p=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],d=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function f(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({first:["------"],second:()=>["------"]}),"Work for Company":(e,t)=>{let a=f(e,t);return 0===a.length&&(a=["------"]),{first:a,second:()=>["------"]}},"Work for Faction":(e,t)=>{let a=g(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.values(o.a).map(e=>e.name),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:p,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:d,second:()=>a}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},b={"------":()=>!0,"Work for Company":(e,t)=>f(e,t).length>0,"Work for Faction":(e,t)=>g(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 E(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,p]=Object(n.useState)(t[2]),d=Object.keys(b).filter(t=>b[t](e.player,e.sleeve)),f=y[a];if(void 0===f)throw new Error(`No function for task '${a}'`);const g=f(e.player,e.sleeve),E=g.second(s);return g.first.length>0&&!g.first.includes(s)&&(l(g.first[0]),e.setABC([a,g.first[0],c])),E.length>0&&!E.includes(c)&&(p(E[0]),e.setABC([a,s,E[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{onChange:function(t){const n=t.target.value,r=y[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]);p(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},value:a},d.map(e=>r.a.createElement(h.a,{key:e,value:e},e))),!(1===g.first.length&&"------"===g.first[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(m.a,{onChange:function(t){l(t.target.value),e.setABC([a,t.target.value,c])},value:s},g.first.map(e=>r.a.createElement(h.a,{key:e,value:e},e)))),!(1===E.length&&"------"===E[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(m.a,{onChange:function(t){p(t.target.value),e.setABC([a,s,t.target.value])},value:c},E.map(e=>r.a.createElement(h.a,{key:e,value:e},e)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(41),o=a(1);function s({open:e,onClose:t}){return r.a.createElement(i.a,{open:e,onClose:t},r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{variant:"h4"},"How do Duplicate Sleeves work?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are their own individuals, which means they each have their own experience and stats."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Synchronization (Sync)?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization can be increased by assigning sleeves to the 'Synchronize' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Shock?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I work for this company or faction?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why did my Sleeve stop working?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"How do I buy Augmentations for my Sleeves?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I buy the X Augmentation for my sleeve?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Do sleeves get reset when installing Augmentations or switching BitNodes?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are reset when switching BitNodes, but not when installing Augmentations."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Memory?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(1016),o=a(1017),s=a(1018),l=a(229),c=a(85),u=a(1019),m=a(1021),h=a(1022),p=a(1023),d=a(36),f=a(53),g=a(27),y=a(1),b=a(46),E=a(10);function k(e){const[t,a]=Object(n.useState)(!1),k=Object(n.useState)(!1)[1];function v(){k(e=>!e)}const[_,w]=Object(n.useState)(d.c.x1);Object(n.useEffect)(()=>{const e=setInterval(v,200);return()=>clearInterval(e)},[]);let S,C=0;for(let t=0;tw(d.c.x1),()=>w(d.c.x5),()=>w(d.c.x10),()=>w(d.c.MAX)],O=e.player.hacknetNodes.map(t=>{if(Object(f.g)(e.player)){if(t instanceof l.a)throw new Error("node was hacknet node");const a=Object(g.d)(t);if(null==a)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+t);if(!(a instanceof c.a))throw new Error("node was not hacknet server");return r.a.createElement(s.a,{player:e.player,key:a.hostname,node:a,purchaseMultiplier:_,rerender:v})}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:v})});return r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{variant:"h4"},"Hacknet ",Object(f.g)(e.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(f.g)(e.player)}),r.a.createElement(p.a,{cost:S,multiplier:_,onClick:function(){Object(f.l)(e.player),v()}}),r.a.createElement("br",null),r.a.createElement(b.a,{container:!0,spacing:2},r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(h.a,{totalProduction:C,player:e.player})),r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(m.a,{onClicks:x,purchaseMultiplier:_}))),Object(f.g)(e.player)&&r.a.createElement(E.a,{onClick:()=>a(!0)},"Spend Hashes on Upgrades"),r.a.createElement(b.a,{container:!0},O),r.a.createElement(u.a,{open:t,onClose:()=>a(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1);function o(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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(i.a,null,"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(i.a,null,"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(i.a,null,"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(i.a,null,"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 k}));var n=a(0),r=a.n(n),i=a(36),o=a(53),s=a(16),l=a(98),c=a(1),u=a(46),m=a(73),h=a(10),p=a(39),d=a(169),f=a(236),g=a(56),y=a(26),b=a(4),E=a(184);function k(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let k,v,_;if(t.level>=i.a.MaxLevel)k=r.a.createElement(h.a,{disabled:!0},"MAX LEVEL");else{let u=0;if("MAX"===a)u=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;u=Math.min(e,a)}const m=Object(E.c)(t.level+u,t.ram,t.cores,e.player.hacknet_node_money_mult)-t.moneyGainRatePerSecond,p=t.calculateLevelUpgradeCost(u,e.player.hacknet_node_level_cost_mult);k=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:m}))},r.a.createElement(h.a,{onClick:function(){const r="MAX"===a?Object(o.e)(e.player,t,i.a.MaxLevel):a;Object(o.n)(e.player,t,r),n()}},"+",u," - ",r.a.createElement(s.a,{money:p,player:e.player})))}if(t.ram>=i.a.MaxRam)v=r.a.createElement(h.a,{disabled:!0},"MAX RAM");else{let u=0;if("MAX"===a)u=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));u=Math.min(e,a)}const m=Object(E.c)(t.level,t.ram*Math.pow(2,u),t.cores,e.player.hacknet_node_money_mult)-t.moneyGainRatePerSecond,p=t.calculateRamUpgradeCost(u,e.player.hacknet_node_ram_cost_mult);v=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:m}))},r.a.createElement(h.a,{onClick:function(){const r="MAX"===a?Object(o.f)(e.player,t,i.a.MaxRam):a;Object(o.o)(e.player,t,r),n()}},"+",u," - ",r.a.createElement(s.a,{money:p,player:e.player})))}if(t.cores>=i.a.MaxCores)_=r.a.createElement(h.a,{disabled:!0},"MAX CORES");else{let u=0;if("MAX"===a)u=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;u=Math.min(e,a)}const m=Object(E.c)(t.level,t.ram,t.cores+u,e.player.hacknet_node_money_mult)-t.moneyGainRatePerSecond,p=t.calculateCoreUpgradeCost(u,e.player.hacknet_node_core_cost_mult);_=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:m}))},r.a.createElement(h.a,{onClick:function(){const r="MAX"===a?Object(o.d)(e.player,t,i.a.MaxCores):a;Object(o.k)(e.player,t,r),n()}},"+",u," - ",r.a.createElement(s.a,{money:p,player:e.player})))}return r.a.createElement(u.a,{item:!0,component:m.a,p:1},r.a.createElement(f.a,{size:"small"},r.a.createElement(d.a,null,r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,t.name))),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"Production:")),r.a.createElement(p.b,{colSpan:2},r.a.createElement(c.a,null,r.a.createElement(s.a,{money:t.totalMoneyGenerated,player:e.player})," (",r.a.createElement(l.a,{money:t.moneyGainRatePerSecond}),")"))),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"Level:")),r.a.createElement(p.b,null,r.a.createElement(c.a,null,t.level)),r.a.createElement(p.b,null,k)),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"RAM:")),r.a.createElement(p.b,null,r.a.createElement(c.a,null,b.a.formatRAM(t.ram))),r.a.createElement(p.b,null,v)),r.a.createElement(g.a,null,r.a.createElement(p.b,null,r.a.createElement(c.a,null,"Cores:")),r.a.createElement(p.b,null,r.a.createElement(c.a,null,t.cores)),r.a.createElement(p.b,null,_)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(36),o=a(53),s=a(16),l=a(212),c=a(367),u=a(1),m=a(46),h=a(73),p=a(10),d=a(39),f=a(169),g=a(236),y=a(56),b=a(4),E=a(165),k=a(26);function v(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let v,_,w,S;if(t.level>=i.b.MaxLevel)v=r.a.createElement(p.a,{disabled:!0},"MAX LEVEL");else{let l=0;if("MAX"===a)l=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;l=Math.min(e,a)}const m=Object(E.c)(t.level+l,0,t.maxRam,t.cores,e.player.hacknet_node_money_mult)-t.hashRate,h=t.calculateLevelUpgradeCost(l,e.player.hacknet_node_level_cost_mult);v=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(c.a,{hashes:m}))},r.a.createElement(p.a,{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()}},"+",l," - ",r.a.createElement(s.a,{money:h,player:e.player})))}if(t.maxRam>=i.b.MaxRam)_=r.a.createElement(p.a,{disabled:!0},"MAX RAM");else{let l=0;if("MAX"===a)l=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));l=Math.min(e,a)}const m=Object(E.c)(t.level,0,t.maxRam*Math.pow(2,l),t.cores,e.player.hacknet_node_money_mult)-t.hashRate,h=t.calculateRamUpgradeCost(l,e.player.hacknet_node_ram_cost_mult);_=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(c.a,{hashes:m}))},r.a.createElement(p.a,{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()}},"+",l," - ",r.a.createElement(s.a,{money:h,player:e.player})))}if(t.cores>=i.b.MaxCores)w=r.a.createElement(p.a,{disabled:!0},"MAX CORES");else{let l=0;if("MAX"===a)l=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;l=Math.min(e,a)}const m=Object(E.c)(t.level,0,t.maxRam,t.cores+l,e.player.hacknet_node_money_mult)-t.hashRate,h=t.calculateCoreUpgradeCost(l,e.player.hacknet_node_core_cost_mult);w=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(c.a,{hashes:m}))},r.a.createElement(p.a,{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()}},"+",l," - ",r.a.createElement(s.a,{money:h,player:e.player})))}if(t.cache>=i.b.MaxCache)S=r.a.createElement(p.a,{disabled:!0},"MAX CACHE");else{let c=0;if("MAX"===a)c=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;c=Math.min(e,a)}const m=t.calculateCacheUpgradeCost(c);S=r.a.createElement(k.a,{title:r.a.createElement(u.a,null,"+",r.a.createElement(l.a,{hashes:32*Math.pow(2,t.cache)})," hashes")},r.a.createElement(p.a,{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)}},"+",c," - ",r.a.createElement(s.a,{money:m,player:e.player}))),e.player.money}return r.a.createElement(m.a,{item:!0,component:h.a,p:1},r.a.createElement(g.a,{size:"small"},r.a.createElement(f.a,null,r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.hostname))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Production:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(u.a,null,r.a.createElement(l.a,{hashes:t.totalHashesGenerated})," (",r.a.createElement(c.a,{hashes:t.hashRate}),")"))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Hash Capacity:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(u.a,null,r.a.createElement(l.a,{hashes:t.hashCapacity})))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Level:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.level)),r.a.createElement(d.b,null,v)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"RAM:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,b.a.formatRAM(t.maxRam))),r.a.createElement(d.b,null,_)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Cores:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.cores)),r.a.createElement(d.b,null,w)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(u.a,null,"Cache Level:")),r.a.createElement(d.b,null,r.a.createElement(u.a,null,t.cache)),r.a.createElement(d.b,null,S)))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(330),o=a(256),s=a(212),l=a(1020),c=a(41),u=a(29),m=a(1);function h(e){const t=u.b.Player(),a=Object(n.useState)(!1)[1];function h(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),200);return()=>clearInterval(e)},[]);const p=t.hashManager;if(!(p instanceof i.a))throw new Error("Player does not have a HashManager)");return r.a.createElement(c.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,"Spend your hashes on a variety of different upgrades"),r.a.createElement(m.a,null,"Hashes: ",r.a.createElement(s.a,{hashes:t.hashManager.hashes})),Object.keys(o.a).map(e=>{const a=o.a[e];return r.a.createElement(l.a,{player:t,upg:a,hashManager:p,key:a.name,rerender:h})})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(53),o=a(634),s=a(15),l=a(158),c=a(212),u=a(1),m=a(73),h=a(10);function p(e){const[t,a]=Object(n.useState)("ecorp");function p(){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()}}const d=e.hashManager,f=e.upg,g=d.getUpgradeCost(f.name),y=d.upgrades[f.name],b=f.effectText(y),E=d.hashes>=g;return r.a.createElement(m.a,{sx:{p:1}},r.a.createElement(u.a,null,r.a.createElement(l.a,{value:f.name})),r.a.createElement(u.a,null,"Cost: ",r.a.createElement(c.a,{hashes:g}),", Bought: ",y," times"),r.a.createElement(u.a,null,f.desc),!f.hasTargetServer&&r.a.createElement(h.a,{onClick:p,disabled:!E},"Buy"),f.hasTargetServer&&r.a.createElement(o.a,{purchase:p,canPurchase:E,value:t,serverType:o.b.Foreign,onChange:function(e){a(e.target.value)}}),y>0&&b&&r.a.createElement(u.a,null,b))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(36),o=a(10);function s(){return(s=Object.assign||function(e){for(var t=1;t!e)}const w=m.a[e.locName];if(null==w)throw new Error("CompanyLocation component constructed with invalid company: "+e.locName);const S=u.a[e.locName];if(null==S)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);const C=t.jobs[e.locName]?t.jobs[e.locName]:null,x=C?p.a[C]:null;t.location=e.locName;const O=null!=C,M=w.getFavorGain();return r.a.createElement(r.a.Fragment,null,O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"Job Title: ",C),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"You will have ",r.a.createElement(g.a,{favor:w.favor+M[0]})," company favor upon resetting after installing Augmentations")},r.a.createElement(i.a,null,"Company reputation: ",r.a.createElement(f.a,{reputation:w.playerReputation})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"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 company.")},r.a.createElement(i.a,null,"Company Favor: ",r.a.createElement(g.a,{favor:w.favor})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(n){if(!n.isTrusted)return;const r=x;r instanceof h.a&&(r.isPartTimeJob()||r.isSoftwareConsultantJob()||r.isBusinessConsultantJob()?t.startWorkPartTime(a,e.locName):t.startWork(a,e.locName),a.toWork())}},"Work"),"    ",r.a.createElement(o.a,{onClick:()=>k(!0)},"Quit"),r.a.createElement(b.a,{locName:e.locName,company:w,onQuit:_,open:E,onClose:()=>k(!1)})),r.a.createElement("br",null),w.hasAgentPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.a[0]],onClick:function(e){e.isTrusted&&(t.applyForAgentJob(),_())},text:"Apply for Agent Job"}),w.hasBusinessConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.c[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessConsultantJob(),_())},text:"Apply for Business Consultant Job"}),w.hasBusinessPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.b[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessJob(),_())},text:"Apply for Business Job"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.e[1]],onClick:function(e){e.isTrusted&&(t.applyForEmployeeJob(),_())},text:"Apply to be an Employee"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.g[1]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeEmployeeJob(),_())},text:"Apply to be a part-time Employee"}),w.hasITPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.d[0]],onClick:function(e){e.isTrusted&&(t.applyForItJob(),_())},text:"Apply for IT Job"}),w.hasSecurityPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.h[2]],onClick:function(e){e.isTrusted&&(t.applyForSecurityJob(),_())},text:"Apply for Security Job"}),w.hasSoftwareConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.k[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareConsultantJob(),_())},text:"Apply for Software Consultant Job"}),w.hasSoftwarePositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.j[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareJob(),_())},text:"Apply for Software Job"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.e[0]],onClick:function(e){e.isTrusted&&(t.applyForWaiterJob(),_())},text:"Apply to be a Waiter"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:p.a[d.g[0]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeWaiterJob(),_())},text:"Apply to be a part-time Waiter"}),null!=S.infiltrationData&&r.a.createElement(o.a,{onClick:function(t){if(!t.isTrusted)return;const n=S;if(!n.infiltrationData)throw new Error(`trying to start infiltration at ${e.locName} but the infiltrationData is null`);a.toInfiltration(n)}},"Infiltrate Company"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(29),o=a(41),s=a(1),l=a(10);function c(e){const t=i.b.Player();return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,null," Would you like to quit your job at ",e.company.name,"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:function(){t.quitJob(e.locName),e.onQuit(),e.onClose()}},"Quit"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(10),i=a(8),o=a(27),s=a(16);function l(e){function t(){const t=Object(o.d)(e.loc.name);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return e.loc.costMult;const a=t.backdoorInstalled?.9:1;return e.loc.costMult*a}function a(a){const n=e.loc;e.p.startClass(e.router,t(),n.expMult,a)}const l=i.a.ClassGymBaseCost*t();return n.createElement(n.Fragment,null,n.createElement(r.a,{onClick:function(){a(i.a.ClassGymStrength)}},"Train Strength (",n.createElement(s.a,{money:l,player:e.p})," / sec)"),n.createElement("br",null),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymDefense)}},"Train Defense (",n.createElement(s.a,{money:l,player:e.p})," / sec)"),n.createElement("br",null),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymDexterity)}},"Train Dexterity (",n.createElement(s.a,{money:l,player:e.p})," / sec)"),n.createElement("br",null),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymAgility)}},"Train Agility (",n.createElement(s.a,{money:l,player:e.p})," / sec)"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(10),i=a(356),o=a(16),s=a(15);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(i.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,"hospitalization"),this.props.p.hp=this.props.p.max_hp,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(r.a,{onClick:this.getHealed,style:this.btnStyle},"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 c}));var n=a(0),r=a(10),i=a(26),o=a(77),s=a(4),l=a(29);function c(){const e=l.b.Player(),t=l.b.Router();const a=o.a.Shoplift.successRate(e),c=o.a.RobStore.successRate(e),u=o.a.Mug.successRate(e),m=o.a.Larceny.successRate(e),h=o.a.DealDrugs.successRate(e),p=o.a.BondForgery.successRate(e),d=o.a.TraffickArms.successRate(e),f=o.a.Homicide.successRate(e),g=o.a.GrandTheftAuto.successRate(e),y=o.a.Kidnap.successRate(e),b=o.a.Assassination.successRate(e),E=o.a.Heist.successRate(e);return n.createElement(n.Fragment,null,n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to shoplift from a low-end retailer")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Shoplift.commit(t,e)}},"Shoplift (",s.a.formatPercentage(a)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to commit armed robbery on a high-end store")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.RobStore.commit(t,e)}},"Rob store (",s.a.formatPercentage(c)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to mug a random person on the street")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Mug.commit(t,e)}},"Mug someone (",s.a.formatPercentage(u)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to rob property from someone's house")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Larceny.commit(t,e)}},"Larceny (",s.a.formatPercentage(m)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to deal drugs")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.DealDrugs.commit(t,e)}},"Deal Drugs (",s.a.formatPercentage(h)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to forge corporate bonds")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.BondForgery.commit(t,e)}},"Bond Forgery (",s.a.formatPercentage(p)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to smuggle illegal arms into the city")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.TraffickArms.commit(t,e)}},"Traffick illegal Arms (",s.a.formatPercentage(d)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to murder a random person on the street")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Homicide.commit(t,e)}},"Homicide (",s.a.formatPercentage(f)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to commit grand theft auto")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.GrandTheftAuto.commit(t,e)}},"Grand theft Auto (",s.a.formatPercentage(g)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to kidnap and ransom a high-profile-target")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Kidnap.commit(t,e)}},"Kidnap and Ransom (",s.a.formatPercentage(y)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to assassinate a high-profile target")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Assassination.commit(t,e)}},"Assassinate (",s.a.formatPercentage(b)," chance of success)")),n.createElement("br",null),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to pull off the ultimate heist")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Heist.commit(t,e)}},"Heist (",s.a.formatPercentage(E)," chance of success)")),n.createElement("br",null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1030),l=a(9),c=a(6),u=a(24),m=a(113),h=a(29),p=a(15),d=a(253),f=a(1031),g=a(114),y=a(140),b=a(541);function E(e){const t=h.b.Player(),a=h.b.Router(),E=Object(n.useState)(!1)[1],k=t.inBladeburner();function v(){const e=t;if(e.inBladeburner())a.toBladeburner();else if(e.strength>=100&&e.defense>=100&&e.dexterity>=100&&e.agility>=100){e.startBladeburner({new:!0}),Object(p.a)("You have been accepted into the Bladeburner division!"),E(e=>!e);const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(p.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}function _(){a.toResleeves()}function w(){const[e,a]=Object(n.useState)(!1);return t.canAccessCorporation()?r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{disabled:!t.canAccessCorporation()||t.hasCorporation(),onClick:()=>a(!0)},"Create a Corporation"),r.a.createElement(s.a,{open:e,onClose:()=>a(!1)})):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}function S(){const e=u.a["Church of the Machine God"];t.factions.includes("Church of the Machine God")||Object(m.d)(e),t.augmentations.some(e=>e.name===c.a.StaneksGift1)||t.queuedAugmentations.some(e=>e.name===c.a.StaneksGift1)||Object(y.a)({name:c.a.StaneksGift1,level:1}),a.toFaction(e)}switch(e.loc.name){case l.a.NewTokyoVitaLife:return t.canAccessResleeving()?r.a.createElement(o.a,{onClick:_},"Re-Sleeve"):r.a.createElement(r.a.Fragment,null);case l.a.Sector12CityHall:return r.a.createElement(w,null);case l.a.Sector12NSA:return function(){if(!t.canAccessBladeburner())return r.a.createElement(r.a.Fragment,null);const e=k?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return r.a.createElement(o.a,{onClick:v},e)}();case l.a.NewTokyoNoodleBar:return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){d.b.emit("You ate some delicious noodles and feel refreshed","success"),Object(f.a)(),t.sourceFiles.length>0&&t.giveExploit(g.a.N00dles),(t.sourceFileLvl(5)>0||5===t.bitNodeN)&&(t.intelligence_exp*=1.0000000000000002)}},"Eat noodles"));case l.a.ChongqingChurchOfTheMachineGod:return function(){const e=r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," `` ",r.a.createElement("br",null)," -odmmNmds: ",r.a.createElement("br",null)," `hNmo:..-omNh. ",r.a.createElement("br",null)," yMd` `hNh ",r.a.createElement("br",null)," mMd oNm ",r.a.createElement("br",null)," oMNo .mM/ ",r.a.createElement("br",null)," `dMN+ -mM+ ",r.a.createElement("br",null)," -mMNo -mN+ ",r.a.createElement("br",null)," .+- :mMNo/mN/ ",r.a.createElement("br",null),":yNMd. :NMNNN/ ",r.a.createElement("br",null),"-mMMMh. /NMMh` ",r.a.createElement("br",null)," .dMMMd. /NMMMy` ",r.a.createElement("br",null)," `yMMMd. /NNyNMMh` ",r.a.createElement("br",null)," `sMMMd. +Nm: +NMMh. ",r.a.createElement("br",null)," oMMMm- oNm: /NMMd. ",r.a.createElement("br",null)," +NMMmsMm- :mMMd. ",r.a.createElement("br",null)," /NMMMm- -mMMd. ",r.a.createElement("br",null)," /MMMm- -mMMd. ",r.a.createElement("br",null)," `sMNMMm- .mMmo ",r.a.createElement("br",null)," `sMd:hMMm. ./. ",r.a.createElement("br",null)," `yMy` `yNMd` ",r.a.createElement("br",null)," `hMs` oMMy ",r.a.createElement("br",null)," `hMh sMN- ",r.a.createElement("br",null)," /MM- .NMo ",r.a.createElement("br",null)," +MM: :MM+ ",r.a.createElement("br",null)," sNNo-.`.-omNy` ",r.a.createElement("br",null)," -smNNNNmdo- ",r.a.createElement("br",null)," `..` ");return t.hasAugmentation(c.a.StaneksGift3,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it seems. Curious, Just how much of a machine's soul do you house in that body?")),e):t.hasAugmentation(c.a.StaneksGift2,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: I see you\'ve taken to my creation. So much so it could hardly be recognized as one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.')),e):t.factions.includes("Church of the Machine God")?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome back my child!')),e):t.canAccessCotMG()?t.augmentations.filter(e=>e.name!==c.a.NeuroFluxGovernor).length>0||t.queuedAugmentations.filter(e=>e.name!==c.a.NeuroFluxGovernor).length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Begone you filth! My gift must be the first modification that your body should have!'))):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human form? If you are, accept my gift.')),r.a.createElement(o.a,{onClick:S},"Accept Stanek's Gift"),e):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"A decrepit altar stands in the middle of a dilapidated church.",r.a.createElement("br",null),r.a.createElement("br",null),"A symbol is carved in the altar."),r.a.createElement("br",null),e)}();case l.a.IshimaGlitch:return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement(b.a,{content:"An eerie aura surround this area. You feel you should leave."})));default:return console.error(`Location ${e.loc.name} doesn't have any special properties`),r.a.createElement(r.a.Fragment,null)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(16),o=a(41),s=a(29),l=a(1),c=a(10),u=a(82);function m(e){const t=s.b.Player(),a=s.b.Router(),m=t.canAfford(15e10);if(!t.canAccessCorporation()||t.hasCorporation())return e.onClose(),r.a.createElement(r.a.Fragment,null);const[h,p]=Object(n.useState)("");return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,null,"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",r.a.createElement("br",null),r.a.createElement("br",null),"If you would like to start one, please enter a name for your corporation below:"),r.a.createElement(u.a,{autoFocus:!0,placeholder:"Corporation Name",onChange:function(e){p(e.target.value)},value:h}),r.a.createElement(c.a,{onClick:function(){""!=h&&(t.startCorporation(h,5e8),e.onClose(),a.toCorporation())},disabled:""==h},"Use seed money"),r.a.createElement(c.a,{onClick:function(){m&&""!=h&&(t.startCorporation(h),t.loseMoney(15e10,"corporation"),e.onClose(),a.toCorporation())},disabled:""==h||!m},"Self-Fund (",r.a.createElement(i.a,{money:15e10,player:t}),")"))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return N00dles}));const n00dlePower="[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()";function N00dles(){eval(n00dlePower)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1033),l=a(1034),c=a(1036),u=a(216),m=a(16),h=a(29),p=a(1037),d=a(4);function f(e){const[t,a]=Object(n.useState)(!1),i=h.b.Player(),s=Object(u.a)(e.ram);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onClick:()=>a(!0),disabled:!i.canAfford(s)},"Purchase ",d.a.formatRAM(e.ram)," Server - ",r.a.createElement(m.a,{money:s,player:i})),r.a.createElement(p.a,{open:t,onClose:()=>a(!1),ram:e.ram,cost:s,rerender:e.rerender}),r.a.createElement("br",null))}function g(e){const t=h.b.Player(),a=Object(n.useState)(!1)[1];function o(){a(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(o,1e3);return()=>clearInterval(e)},[]);const u=[];for(let t=e.loc.techVendorMinRam;t<=e.loc.techVendorMaxRam;t*=2)u.push(r.a.createElement(f,{key:t,ram:t,rerender:o}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),u,r.a.createElement("br",null),r.a.createElement(i.a,null,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(l.a,{p:t,rerender:o}),r.a.createElement("br",null),r.a.createElement(s.a,{p:t,rerender:o}),r.a.createElement("br",null),r.a.createElement(c.a,{p:t,rerender:o}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(10),o=a(26),s=a(8),l=a(216),c=a(16),u=a(4),m=a(153);function h(e){const t=e.p.getHomeComputer();if(t.maxRam>=s.a.HomeComputerMaxRam)return r.a.createElement(i.a,null,"Upgrade 'home' RAM - MAX");const a=e.p.getUpgradeHomeRamCost();return r.a.createElement(o.a,{title:r.a.createElement(m.MathJaxContext,null,r.a.createElement(m.MathJax,null,"\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)"))},r.a.createElement("span",null,r.a.createElement(i.a,{disabled:!e.p.canAfford(a),onClick:function(){Object(l.d)(e.p),e.rerender()}},"Upgrade 'home' RAM (",u.a.formatRAM(t.maxRam)," -> ",u.a.formatRAM(2*t.maxRam),") - ",r.a.createElement(c.a,{money:a,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(10),o=a(1035),s=a(8),l=a(16);function c(e){return e.p.hasTorRouter()?r.a.createElement(i.a,null,"TOR Router - Purchased"):r.a.createElement(i.a,{disabled:!e.p.canAfford(s.a.TorRouterCost),onClick:function(){Object(o.a)(e.p),e.rerender()}},"Purchase TOR router - ",r.a.createElement(l.a,{money:s.a.TorRouterCost,player:e.p}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(8),r=a(27),i=a(119),o=a(15);function s(e){if(e.hasTorRouter())return void Object(o.a)("You already have a TOR Router!");if(!e.canAfford(n.a.TorRouterCost))return void Object(o.a)("You cannot afford to purchase the TOR router!");e.loseMoney(n.a.TorRouterCost,"other");const t=Object(i.f)({ip:Object(r.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(t),e.getHomeComputer().serversOnNetwork.push(t.hostname),t.serversOnNetwork.push(e.getHomeComputer().hostname),Object(o.a)("You have purchased a TOR router!
You now have access to the dark web from your home computer.
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 c}));var n=a(0),r=a.n(n),i=a(10),o=a(26),s=a(16),l=a(153);function c(e){const t=e.p.getHomeComputer(),a=t.cpuCores>=8;if(a)return r.a.createElement(i.a,null,"Upgrade 'home' cores - MAX");const n=e.p.getUpgradeHomeCoresCost();return r.a.createElement(o.a,{title:r.a.createElement(l.MathJaxContext,null,r.a.createElement(l.MathJax,null,"\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)"))},r.a.createElement("span",null,r.a.createElement(i.a,{disabled:!e.p.canAfford(n),onClick:function(){a||e.p.canAfford(n)&&(e.p.loseMoney(n,"servers"),t.cpuCores++,e.rerender())}},"Upgrade 'home' cores (",t.cpuCores," -> ",t.cpuCores+1,") - ",r.a.createElement(s.a,{money:n,player:e.p}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(216),o=a(4),s=a(16),l=a(41),c=a(29),u=a(1),m=a(82),h=a(10);function p(e){const t=c.b.Player(),[a,p]=Object(n.useState)("");function d(){Object(i.e)(a,e.ram,e.cost,t),e.onClose()}return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,null,"Would you like to purchase a new server with ",o.a.formatRAM(e.ram)," of RAM for"," ",r.a.createElement(s.a,{money:e.cost,player:t}),"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,null," Please enter the server hostname below:"),r.a.createElement("br",null),r.a.createElement(m.a,{autoFocus:!0,onKeyUp:function(e){13===e.keyCode&&d()},onChange:function(e){p(e.target.value)},type:"text",placeholder:"Unique Hostname",InputProps:{endAdornment:r.a.createElement(h.a,{onClick:d,disabled:!t.canAfford(e.cost)||""===a},"Buy")}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(8),o=a(16),s=a(41),l=a(29),c=a(1),u=a(10);function m(e){const t=l.b.Player(),a=i.a.TravelCost;return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(c.a,null,"Would you like to travel to ",e.city,"? The trip will cost ",r.a.createElement(o.a,{money:a,player:t}),"."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{onClick:function(){e.travel()}},r.a.createElement(c.a,null,"Travel")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a(26),i=a(10),o=a(8),s=a(27),l=a(16),c=a(29);function u(e){const t=c.b.Player(),a=c.b.Router();function u(){const t=Object(s.d)(e.loc.name);if(null==t||!t.hasOwnProperty("backdoorInstalled"))return e.loc.costMult;const a=t.backdoorInstalled?.9:1;return e.loc.costMult*a}function m(n){const r=e.loc;t.startClass(a,u(),r.expMult,n)}const h=u(),p=o.a.ClassDataStructuresBaseCost*h,d=o.a.ClassNetworksBaseCost*h,f=o.a.ClassAlgorithmsBaseCost*h,g=o.a.ClassManagementBaseCost*h,y=o.a.ClassLeadershipBaseCost*h;return n.createElement(n.Fragment,null,n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassStudyComputerScience)}},"Study Computer Science (free)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassDataStructures)}},"Take Data Structures course (",n.createElement(l.a,{money:p,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassNetworks)}},"Take Networks course (",n.createElement(l.a,{money:d,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassAlgorithms)}},"Take Algorithms course (",n.createElement(l.a,{money:f,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain charisma experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassManagement)}},"Take Management course (",n.createElement(l.a,{money:g,player:t})," / sec)")),n.createElement("br",null),n.createElement(r.a,{title:"Gain charisma experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassLeadership)}},"Take Leadership course (",n.createElement(l.a,{money:y,player:t})," / sec)")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n,r=a(0),i=a.n(r),o=a(10),s=a(1041),l=a(1043),c=a(1044),u=a(1045);function m(e){const[t,a]=Object(r.useState)(n.None);function m(e){a(e)}return i.a.createElement(i.a.Fragment,null,t===n.None&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{onClick:()=>m(n.Coin)},"Play coin flip"),i.a.createElement("br",null),i.a.createElement(o.a,{onClick:()=>m(n.Slots)},"Play slots"),i.a.createElement("br",null),i.a.createElement(o.a,{onClick:()=>m(n.Roulette)},"Play roulette"),i.a.createElement("br",null),i.a.createElement(o.a,{onClick:()=>m(n.Blackjack)},"Play blackjack")),t!==n.None&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{onClick:()=>m(n.None)},"Stop playing"),t===n.Coin&&i.a.createElement(l.a,{p:e.p}),t===n.Slots&&i.a.createElement(u.a,{p:e.p}),t===n.Roulette&&i.a.createElement(c.a,{p:e.p}),t===n.Blackjack&&i.a.createElement(s.a,{p:e.p})))}!function(e){e.None="none",e.Coin="coin",e.Slots="slots",e.Roulette="roulette",e.Blackjack="blackjack"}(n||(n={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a(16),i=a(185),o=a(1042),s=a(467),l=a(1352),c=a(636),u=a(10),m=a(73),h=a(32),p=a(1),d=a(82);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}var g;!function(e){e.Pending="",e.PlayerWon="You won!",e.PlayerWonByBlackjack="You Won! Blackjack!",e.DealerWon="You lost!",e.Tie="Push! (Tie)"}(g||(g={}));class y extends i.a{constructor(e){super(e),f(this,"canStartGame",()=>{const{p:e}=this.props,{bet:t}=this.state;return e.canAfford(t)}),f(this,"startGame",()=>{if(!this.canStartGame()||Object(i.b)(this.props.p))return;this.props.p.loseMoney(this.state.bet,"casino");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:g.Pending}),21===this.getTrueHandValue(e)?21===this.getTrueHandValue(t)?this.finishGame(g.Tie):this.finishGame(g.PlayerWonByBlackjack):21===this.getTrueHandValue(t)&&this.finishGame(g.DealerWon)}),f(this,"getHandValue",e=>{let t=[0];for(let a=0;a=10?t.map(e=>e+10):1===n?t.flatMap(e=>[e+1,e+11]):t.map(e=>e+n)}return t}),f(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]}),f(this,"getHandDisplayValues",e=>{const t=this.getHandValue(e);return this.isHandBusted(e)?[...new Set([t[0]])]:[...new Set(t.filter(e=>e<=21))]}),f(this,"isHandBusted",e=>this.getTrueHandValue(e)>21),f(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(g.DealerWon)}),f(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(g.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(g.PlayerWon):a{const t=e===g.DealerWon?0:e===g.Tie?this.state.bet:e===g.PlayerWon?2*this.state.bet:e===g.PlayerWonByBlackjack?2.5*this.state.bet:(()=>{throw new Error("Unexpected result: "+e)})();this.win(this.props.p,t),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t-this.state.bet})}),f(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:g.Pending}):this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),f(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:g.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:e,playerHand:t,dealerHand:a,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:f,gains:y}=this.state,b=this.getHandDisplayValues(t),E=this.getHandDisplayValues(a);return n.createElement(n.Fragment,null,n.createElement(h.a,null,n.createElement(d.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?f:"",type:"number",style:{width:"200px"},InputProps:{startAdornment:n.createElement(l.a,{position:"start"},n.createElement(p.a,null,"$"))}}),n.createElement(p.a,null,"Total earnings this session: ",n.createElement(r.a,{money:y}))),i?n.createElement(n.Fragment,null,n.createElement(u.a,{onClick:this.playerHit},"Hit"),n.createElement(u.a,{color:"secondary",onClick:this.playerStay},"Stay")):n.createElement(u.a,{onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start"),(i||o!==g.Pending)&&n.createElement(n.Fragment,null,n.createElement(h.a,{display:"flex"},n.createElement(m.a,{elevation:2},n.createElement(p.a,null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement(p.a,null,"Count:"," ",b.map((e,t)=>n.createElement("span",{key:t},e)).reduce((e,t)=>[e," or ",t])))),n.createElement("br",null),n.createElement(h.a,{display:"flex"},n.createElement(m.a,{elevation:2},n.createElement(p.a,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(p.a,null,"Count:"," ",E.map((e,t)=>n.createElement("span",{key:t},e)).reduce((e,t)=>[e," or ",t])))))),o!==g.Pending&&n.createElement(p.a,null,o," ",o===g.PlayerWon&&n.createElement(r.a,{money:this.state.bet}),o===g.PlayerWonByBlackjack&&n.createElement(r.a,{money:1.5*this.state.bet}),o===g.DealerWon&&n.createElement(r.a,{money:-this.state.bet})))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(232),r=a(362);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;ty(!1),250),s?Object(o.c)(e.p,t):Object(o.c)(e.p,-t),Object(o.b)(e.p)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Result:")," ",h,r.a.createElement(m.a,{display:"flex",alignItems:"center"},r.a.createElement(c.a,{type:"number",onChange:function(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e4&&(t=1e4),t<0&&(t=0),a(t)},InputProps:{endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onClick:Object(s.a)(()=>b("H")),disabled:g},"Head!"),r.a.createElement(u.a,{onClick:Object(s.a)(()=>b("T")),disabled:g},"Tail!"))}})),r.a.createElement(l.a,{variant:"h3"},d))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(16),o=a(185),s=a(328),l=a(78),c=a(1),u=a(10),m=a(82);const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],p={Red:{match:e=>0!==e&&h.includes(e),payout:1},Black:{match:e=>!h.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 d(e){return{match:t=>e===t,payout:36}}function f(e){const[t]=Object(n.useState)(new s.b((new Date).getTime())),[a,h]=Object(n.useState)(1e3),[f,g]=Object(n.useState)(!0),[y,b]=Object(n.useState)("waiting"),[E,k]=Object(n.useState)(0),[v,_]=Object(n.useState)(!0),[w,S]=Object(n.useState)({payout:0,match:()=>!1});function C(){v||k(Math.floor(37*Math.random()))}function x(n){Object(o.b)(e.p)||(g(!1),_(!1),b("playing"),S(n),setTimeout(()=>{let n=Math.floor(37*t.random()),s=r.a.createElement(r.a.Fragment,null),l=0,c=w.match(n);if(c&&Math.random()>.9)for(c=!1;w.match(n);)n=(n+1)%36;c?(l=a*w.payout,s=r.a.createElement(r.a.Fragment,null,"won ",r.a.createElement(i.a,{money:l}))):(l=-a,s=r.a.createElement(r.a.Fragment,null,"lost ",r.a.createElement(i.a,{money:-l}))),Object(o.c)(e.p,l),g(!0),_(!0),b(s),k(n),Object(o.b)(e.p)},1600))}return Object(n.useEffect)(()=>{const e=window.setInterval(C,50);return()=>clearInterval(e)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},function(){if(0===E)return"0";const e=function(e){return[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(e)}(E)?"R":"B";return`${E}${e}`}()),r.a.createElement(m.a,{type:"number",onChange:function(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e7&&(t=1e7),t<0&&(t=0),h(t)},placeholder:"Amount to play",disabled:!f}),r.a.createElement(c.a,{variant:"h4"},y),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(3)))},"3")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(6)))},"6")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(9)))},"9")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(12)))},"12")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(15)))},"15")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(18)))},"18")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(21)))},"21")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(24)))},"24")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(27)))},"27")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(30)))},"30")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(33)))},"33")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(36)))},"36"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(2)))},"2")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(5)))},"5")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(8)))},"8")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(11)))},"11")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(14)))},"14")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(17)))},"17")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(20)))},"20")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(23)))},"23")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(26)))},"26")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(29)))},"29")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(32)))},"32")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(35)))},"35"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(1)))},"1")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(4)))},"4")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(7)))},"7")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(10)))},"10")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(13)))},"13")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(16)))},"16")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(19)))},"19")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(22)))},"22")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(25)))},"25")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(28)))},"28")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(31)))},"31")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(34)))},"34"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Third1))},"1 to 12")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Third2))},"13 to 24")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Third3))},"25 to 36"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Red))},"Red")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Black))},"Black")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Odd))},"Odd")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Even))},"Even")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.High))},"High")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p.Low))},"Low"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d(0)))},"0"))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(16),o=a(328),s=a(185),l=a(78),c=a(1),u=a(82),m=a(10);const h=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function p(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 d=[[[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]]];function f(e){const[t]=Object(n.useState)(new o.b(e.p.totalPlaytime)),[a,f]=Object(n.useState)([0,0,0,0,0]),[g,y]=Object(n.useState)([0,0,0,0,0]),[b,E]=Object(n.useState)(1e3),[k,v]=Object(n.useState)(!0),[_,w]=Object(n.useState)("waiting");function S(){let t=!1;const n=a.slice();for(const e in n)(n[e]!==g[e]||t)&&(n[e]=(n[e]+1)%h.length,t=!0);f(n),t&&n.every((e,t)=>e===g[t])&&function(){const t=C(),a=function(e){const a=[];for(const n of e)a.push(t[n[0]][n[1]]);return a},n=function(e){let t=1;for(let a=1;a0?"gained":"lost"," ",r.a.createElement(i.a,{money:Math.abs(o)}))),v(!0),Object(s.b)(e.p));}()}function C(){return[[h[(a[0]+h.length-1)%h.length],h[(a[1]+h.length-1)%h.length],h[(a[2]+h.length-1)%h.length],h[(a[3]+h.length-1)%h.length],h[(a[4]+h.length-1)%h.length]],[h[a[0]],h[a[1]],h[a[2]],h[a[3]],h[a[4]]],[h[(a[0]+1)%h.length],h[(a[1]+1)%h.length],h[(a[2]+1)%h.length],h[(a[3]+1)%h.length],h[(a[4]+1)%h.length]]]}function x(){y([Math.floor(t.random()*h.length),Math.floor(t.random()*h.length),Math.floor(t.random()*h.length),Math.floor(t.random()*h.length),Math.floor(t.random()*h.length)])}Object(n.useEffect)(()=>{const e=window.setInterval(S,50);return()=>clearInterval(e)});const O=C();return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",O[0][0]," | ",O[0][1]," | ",O[0][2]," | ",O[0][3]," | ",O[0][4]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",h[a[0]]," | ",h[a[1]]," | ",h[a[2]]," | ",h[a[3]]," | ",h[a[4]]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",h[(a[0]+1)%h.length]," | ",h[(a[1]+1)%h.length]," | ",h[(a[2]+1)%h.length]," | ",h[(a[3]+1)%h.length]," | ",h[(a[4]+1)%h.length]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(u.a,{type:"number",onChange:function(e){let t=parseInt(e.currentTarget.value);isNaN(t)&&(t=0),t>1e6&&(t=1e6),t<0&&(t=0),E(t)},placeholder:"Amount to play",disabled:!k,InputProps:{endAdornment:r.a.createElement(m.a,{onClick:Object(l.a)((function(){Object(s.b)(e.p)||(w("playing"),Object(s.c)(e.p,-b),k&&(y([-1,-1,-1,-1,-1]),v(!1),setTimeout(x,2e3*t.random()+1e3)))})),disabled:!k},"Spin!")}}),r.a.createElement(c.a,{variant:"h4"},_),r.a.createElement(c.a,null,"Pay lines"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"----- ····· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ----- ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ····· -----"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"··^·· \\···/ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·/·\\· ·\\·/· ·---·"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ··v·· ·····"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ·---· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·---· /···\\ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ····· ·---·"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a(137),i=a(9),o=a(227),s=a(13),l=a(29),c=a(1),u=a(10),m=a(48);function h(e,t){t.name===i.a.TravelAgency?e.toTravel():t.name===i.a.WorldStockExchange?e.toStockMarket():e.toLocation(t)}function p(e){e.types;const t=l.b.Router();let a="X";return e.types.includes(m.a.Company)&&(a="C"),e.types.includes(m.a.Gym)&&(a="G"),e.types.includes(m.a.Hospital)&&(a="H"),e.types.includes(m.a.Slums)&&(a="S"),e.types.includes(m.a.StockMarket)&&(a="$"),e.types.includes(m.a.TechVendor)&&(a="T"),e.types.includes(m.a.TravelAgency)&&(a="T"),e.types.includes(m.a.University)&&(a="U"),e.types.includes(m.a.Casino)&&(a="¢"),e.types.includes(m.a.Special)&&(a="?"),e?n.createElement("span",{"aria-label":e.name,key:e.name,style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:()=>h(t,e)},n.createElement("b",null,a)):n.createElement("span",null,"*")}function d(e){const 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 s;for(;null!==(s=t.exec(n));)i.push(s);if(0===i.length)return r.push(n),r;for(let t=0;tn.createElement(n.Fragment,{key:e},n.createElement(u.a,{onClick:()=>h(t,o.a[e])},e),n.createElement("br",null)));return n.createElement(n.Fragment,null,a)}function g(){const e=l.b.Player(),t=r.a[e.city];return n.createElement(n.Fragment,null,n.createElement(c.a,null,t.name),s.a.DisableASCIIArt?n.createElement(f,{city:t}):n.createElement(d,{city:t}))}},,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(32),l=a(1),c=a(116),u=a(147),m=a(75),h=a(82);function p(e){const[t,a]=Object(n.useState)(e.options.theme),[p,d]=Object(n.useState)(e.options.insertSpaces),[f,g]=Object(n.useState)(e.options.fontSize);return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Theme: "),r.a.createElement(c.a,{onChange:e=>a(e.target.value),value:t},r.a.createElement(m.a,{value:"monokai"},"monokai"),r.a.createElement(m.a,{value:"solarized-dark"},"solarized-dark"),r.a.createElement(m.a,{value:"solarized-light"},"solarized-light"),r.a.createElement(m.a,{value:"vs-dark"},"dark"),r.a.createElement(m.a,{value:"light"},"light"))),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Use whitespace over tabs: "),r.a.createElement(u.a,{onChange:e=>d(e.target.checked),checked:p})),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(h.a,{type:"number",label:"Font size",value:f,onChange:function(e){const t=parseFloat(e.target.value);isNaN(t)||g(t)}})),r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){e.save({theme:t,insertSpaces:p,fontSize:f}),e.onClose()}},"Save"))}},function(e,t,a){"use strict";async function n(e){e.editor.defineTheme("monokai",{base:"vs-dark",inherit:!0,rules:[{background:"272822",token:""},{foreground:"75715e",token:"comment"},{foreground:"e6db74",token:"string"},{token:"number",foreground:"ae81ff"},{token:"otherkeyvars",foreground:"ae81ff"},{foreground:"ae81ff",token:"function"},{foreground:"f92672",token:"keyword"},{token:"storage.type.function.js",foreground:"ae81ff"},{token:"ns",foreground:"97d92b"},{token:"netscriptfunction",foreground:"53d3e4"},{token:"otherkeywords",foreground:"53d3e4"},{token:"this",foreground:"fd971f"}],colors:{"editor.foreground":"#F8F8F2","editor.background":"#272822","editor.selectionBackground":"#49483E","editor.lineHighlightBackground":"#3E3D32","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#3B3A32","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),e.editor.defineTheme("solarized-dark",{base:"vs-dark",inherit:!0,rules:[{background:"002b36",token:""},{foreground:"586e75",token:"comment"},{foreground:"00afaf",token:"string"},{token:"number",foreground:"00afaf"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"cb4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#839496","editor.background":"#002b36","editor.selectionBackground":"#073642","editor.lineHighlightBackground":"#073642","editorCursor.foreground":"#819090","editorWhitespace.foreground":"#073642","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),e.editor.defineTheme("solarized-light",{base:"vs",inherit:!0,rules:[{foreground:"657b83",background:"fdf6e3",token:""},{foreground:"586e75",token:"comment"},{foreground:"2aa198",token:"string"},{token:"number",foreground:"2aa198"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"bc4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#657b83","editor.background":"#fdf6e3","editor.selectionBackground":"#eee8d5","editor.lineHighlightBackground":"#eee8d5","editorCursor.foreground":"#657b83","editorWhitespace.foreground":"#eee8d5","editorIndentGuide.activeBackground":"#eee8d5","editor.selectionHighlightBorder":"#073642"}})}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";t.a='/**\n * @public\n */\ninterface Player {\n hacking: number;\n hp: number;\n max_hp: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n hacking_mult: number;\n strength_mult: number;\n defense_mult: number;\n dexterity_mult: number;\n agility_mult: number;\n charisma_mult: number;\n hacking_exp_mult: number;\n strength_exp_mult: number;\n defense_exp_mult: number;\n dexterity_exp_mult: number;\n agility_exp_mult: number;\n charisma_exp_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n numPeopleKilled: number;\n money: number;\n city: string;\n location: string;\n companyName: string;\n crime_money_mult: number;\n crime_success_mult: number;\n isWorking: boolean;\n workType: string;\n currentWorkFactionName: string;\n currentWorkFactionDescription: string;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n workRepGainRate: number;\n workMoneyGainRate: number;\n workMoneyLossRate: number;\n workHackExpGained: number;\n workStrExpGained: number;\n workDefExpGained: number;\n workDexExpGained: number;\n workAgiExpGained: number;\n workChaExpGained: number;\n workRepGained: number;\n workMoneyGained: number;\n createProgramName: string;\n createProgramReqLvl: number;\n className: string;\n crimeType: string;\n work_money_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n hasWseAccount: boolean;\n hasTixApiAccess: boolean;\n has4SData: boolean;\n has4SDataTixApi: boolean;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n bitNodeN: number;\n totalPlaytime: number;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n jobs: any;\n factions: string[];\n tor: boolean;\n}\n\n/**\n * @public\n */\ninterface RunningScript {\n args: string[];\n filename: string;\n logs: string[];\n offlineExpGained: number;\n offlineMoneyMade: number;\n offlineRunningTime: number;\n onlineExpGained: number;\n onlineMoneyMade: number;\n onlineRunningTime: number;\n pid: number;\n ramUsage: number;\n server: string;\n threads: number;\n}\n\n/**\n * Data representing the internal values of a crime.\n * @public\n */\nexport interface CrimeStats {\n /** Number representing the difficulty of the crime. Used for success chance calculations */\n difficulty: number;\n /** Amount of karma lost for successfully committing this crime */\n karma: number;\n /** How many people die as a result of this crime */\n kills: number;\n /** How much money is given */\n money: number;\n /** Name of crime */\n name: number;\n /** Milliseconds it takes to attempt the crime */\n time: number;\n /** Description of the crime activity */\n type: string;\n /** hacking level impact on success change of the crime */\n hacking_success_weight: number;\n /** strength level impact on success change of the crime */\n strength_success_weight: number;\n /** defense level impact on success change of the crime */\n defense_success_weight: number;\n /** dexterity level impact on success change of the crime */\n dexterity_success_weight: number;\n /** agility level impact on success change of the crime */\n agility_success_weight: number;\n /** charisma level impact on success change of the crime */\n charisma_success_weight: number;\n /** hacking exp gained from crime */\n hacking_exp: number;\n /** strength exp gained from crime */\n strength_exp: number;\n /** defense exp gained from crime */\n defense_exp: number;\n /** dexterity exp gained from crime */\n dexterity_exp: number;\n /** agility exp gained from crime */\n agility_exp: number;\n /** charisma exp gained from crime */\n charisma_exp: number;\n /** intelligence exp gained from crime */\n intelligence_exp: number;\n}\n\n/**\n * Data representing the internal values of an Augmentation.\n * @public\n */\nexport interface AugmentationStats {\n /** Multipler to hacking skill */\n hacking_mult?: number;\n /** Multipler to strength skill */\n strength_mult?: number;\n /** Multipler to defense skill */\n defense_mult?: number;\n /** Multipler to dexterity skill */\n dexterity_mult?: number;\n /** Multipler to agility skill */\n agility_mult?: number;\n /** Multipler to charisma skill */\n charisma_mult?: number;\n /** Multipler to hacking experience gain rate */\n hacking_exp_mult?: number;\n /** Multipler to strength experience gain rate */\n strength_exp_mult?: number;\n /** Multipler to defense experience gain rate */\n defense_exp_mult?: number;\n /** Multipler to dexterity experience gain rate */\n dexterity_exp_mult?: number;\n /** Multipler to agility experience gain rate */\n agility_exp_mult?: number;\n /** Multipler to charisma experience gain rate */\n charisma_exp_mult?: number;\n /** Multipler to chance of successfully performing a hack */\n hacking_chance_mult?: number;\n /** Multipler to hacking speed */\n hacking_speed_mult?: number;\n /** Multipler to amount of money the player gains from hacking */\n hacking_money_mult?: number;\n /** Multipler to amount of money injected into servers using grow */\n hacking_grow_mult?: number;\n /** Multipler to amount of reputation gained when working */\n company_rep_mult?: number;\n /** Multipler to amount of reputation gained when working */\n faction_rep_mult?: number;\n /** Multipler to amount of money gained from crimes */\n crime_money_mult?: number;\n /** Multipler to crime success rate */\n crime_success_mult?: number;\n /** Multipler to amount of money gained from working */\n work_money_mult?: number;\n /** Multipler to amount of money produced by Hacknet Nodes */\n hacknet_node_money_mult?: number;\n /** Multipler to cost of purchasing a Hacknet Node */\n hacknet_node_purchase_cost_mult?: number;\n /** Multipler to cost of ram for a Hacknet Node */\n hacknet_node_ram_cost_mult?: number;\n /** Multipler to cost of core for a Hacknet Node */\n hacknet_node_core_cost_mult?: number;\n /** Multipler to cost of leveling up a Hacknet Node */\n hacknet_node_level_cost_mult?: number;\n /** Multipler to Bladeburner max stamina */\n bladeburner_max_stamina_mult?: number;\n /** Multipler to Bladeburner stamina gain rate */\n bladeburner_stamina_gain_mult?: number;\n /** Multipler to effectiveness in Bladeburner Field Analysis */\n bladeburner_analysis_mult?: number;\n /** Multipler to success chance in Bladeburner contracts/operations */\n bladeburner_success_chance_mult?: number;\n}\n\n/**\n * Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.\n * @public\n */\nexport interface BasicHGWOptions {\n /** Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. */\n threads: number;\n /** Set to true this action will affect the stock market. */\n stock?: boolean;\n}\n\n/**\n * Options to affect the behavior of {@link CodingContract} attempt.\n * @public\n */\nexport interface CodingAttemptOptions {\n /** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */\n returnReward: boolean;\n}\n\n/**\n * Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}\n * @public\n */\nexport interface AugmentPair {\n /** augmentation name */\n name: string;\n /** augmentation cost */\n cost: number;\n}\n\n/**\n * Value in map of {@link StockOrder}\n * @public\n */\nexport interface StockOrderObject {\n /** Number of shares */\n shares: number;\n /** Price per share */\n price: number;\n /** Order type */\n type: string;\n /** Order position */\n position: string;\n}\n\n/**\n * Return value of {@link TIX.getOrders | getOrders}\n * @public\n */\nexport interface StockOrder {\n /** Stock Symbol */\n [key: string]: StockOrderObject[];\n}\n\n/**\n * A single process on a server.\n * @public\n */\nexport interface ProcessInfo {\n /** Script name. */\n filename: string;\n /** Number of threads script is running with */\n threads: number;\n /** Script\'s arguments */\n args: string[];\n}\n\n/**\n * Hack related multipliers.\n * @public\n */\nexport interface HackingMultipliers {\n /** Player\'s hacking chance multiplier. */\n chance: number;\n /** Player\'s hacking speed multiplier. */\n speed: number;\n /** Player\'s hacking money stolen multiplier. */\n money: number;\n /** Player\'s hacking growth multiplier */\n growth: number;\n}\n\n/**\n * Hacknet related multipliers.\n * @public\n */\nexport interface HacknetMultipliers {\n /** Player\'s hacknet production multiplier */\n production: number;\n /** Player\'s hacknet purchase cost multiplier */\n purchaseCost: number;\n /** Player\'s hacknet ram cost multiplier */\n ramCost: number;\n /** Player\'s hacknet core cost multiplier */\n coreCost: number;\n /** Player\'s hacknet level cost multiplier */\n levelCost: number;\n}\n\n/**\n * A single server.\n * @public\n */\nexport interface Server {\n /**\n * How many CPU cores this server has. Maximum of 8.\n * Affects magnitude of grow and weaken.\n */\n cpuCores: number;\n\n /** Flag indicating whether the FTP port is open */\n ftpPortOpen: boolean;\n\n /** Flag indicating whether player has admin/root access to this server */\n hasAdminRights: boolean;\n\n /** Hostname. Must be unique */\n hostname: string;\n\n /** Flag indicating whether HTTP Port is open */\n httpPortOpen: boolean;\n\n /** IP Address. Must be unique */\n ip: string;\n\n /** Flag indicating whether player is curently connected to this server */\n isConnectedTo: boolean;\n\n /** RAM (GB) available on this server */\n maxRam: number;\n\n /**\n * Name of company/faction/etc. that this server belongs to.\n * Optional, not applicable to all Servers\n */\n organizationName: string;\n\n /** RAM (GB) used. i.e. unavailable RAM */\n ramUsed: number;\n\n /** Flag indicating whether SMTP Port is open */\n smtpPortOpen: boolean;\n\n /** Flag indicating whether SQL Port is open */\n sqlPortOpen: boolean;\n\n /** Flag indicating whether the SSH Port is open */\n sshPortOpen: boolean;\n\n /** Flag indicating whether this is a purchased server */\n purchasedByPlayer: boolean;\n\n /** Flag indicating whether this server has a backdoor installed by a player */\n backdoorInstalled: boolean;\n\n /**\n * Initial server security level\n * (i.e. security level when the server was created)\n */\n baseDifficulty: number;\n\n /** Server Security Level */\n hackDifficulty: number;\n\n /** Minimum server security level that this server can be weakened to */\n minDifficulty: number;\n\n /** How much money currently resides on the server and can be hacked */\n moneyAvailable: number;\n\n /** Maximum amount of money that this server can hold */\n moneyMax: number;\n\n /** Number of open ports required in order to gain admin/root access */\n numOpenPortsRequired: number;\n\n /** How many ports are currently opened on the server */\n openPortCount: number;\n\n /** Hacking level required to hack this server */\n requiredHackingSkill: number;\n\n /**\n * Parameter that affects how effectively this server\'s money can\n * be increased using the grow() Netscript function\n */\n serverGrowth: number;\n}\n\n/**\n * All multipliers affecting the difficulty of the current challenge.\n * @public\n */\nexport interface BitNodeMultipliers {\n /** Influences how quickly the player\'s agility level (not exp) scales */\n AgilityLevelMultiplier: number;\n /** Influences the base cost to purchase an augmentation. */\n AugmentationMoneyCost: number;\n /** Influences the base rep the player must have with a faction to purchase an augmentation. */\n AugmentationRepCost: number;\n /** Influences how quickly the player can gain rank within Bladeburner. */\n BladeburnerRank: number;\n /** Influences the cost of skill levels from Bladeburner. */\n BladeburnerSkillCost: number;\n /** Influences how quickly the player\'s charisma level (not exp) scales */\n CharismaLevelMultiplier: number;\n /** Influences the experience gained for each ability when a player completes a class. */\n ClassGymExpGain: number;\n /** Influences the amount of money gained from completing Coding Contracts */\n CodingContractMoney: number;\n /** Influences the experience gained for each ability when the player completes working their job. */\n CompanyWorkExpGain: number;\n /** Influences how much money the player earns when completing working their job. */\n CompanyWorkMoney: number;\n /** Influences the valuation of corporations created by the player. */\n CorporationValuation: number;\n /** Influences the base experience gained for each ability when the player commits a crime. */\n CrimeExpGain: number;\n /** Influences the base money gained when the player commits a crime. */\n CrimeMoney: number;\n /** Influences how many Augmentations you need in order to get invited to the Daedalus faction */\n DaedalusAugsRequirement: number;\n /** Influences how quickly the player\'s defense level (not exp) scales */\n DefenseLevelMultiplier: number;\n /** Influences how quickly the player\'s dexterity level (not exp) scales */\n DexterityLevelMultiplier: number;\n /** Influences how much rep the player gains in each faction simply by being a member. */\n FactionPassiveRepGain: number;\n /** Influences the experience gained for each ability when the player completes work for a Faction. */\n FactionWorkExpGain: number;\n /** Influences how much rep the player gains when performing work for a faction. */\n FactionWorkRepGain: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data API */\n FourSigmaMarketDataApiCost: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data (NOT API) */\n FourSigmaMarketDataCost: number;\n /** Influences the experienced gained when hacking a server. */\n HackExpGain: number;\n /** Influences how quickly the player\'s hacking level (not experience) scales */\n HackingLevelMultiplier: number;\n /** Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) */\n HacknetNodeMoney: number;\n /** Influences how much money it costs to upgrade your home computer\'s RAM */\n HomeComputerRamCost: number;\n /** Influences how much money is gained when the player infiltrates a company. */\n InfiltrationMoney: number;\n /** Influences how much rep the player can gain from factions when selling stolen documents and secrets */\n InfiltrationRep: number;\n /** Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. */\n ManualHackMoney: number;\n /** Influence how much it costs to purchase a server */\n PurchasedServerCost: number;\n /** Influences the maximum number of purchased servers you can have */\n PurchasedServerLimit: number;\n /** Influences the maximum allowed RAM for a purchased server */\n PurchasedServerMaxRam: number;\n /** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */\n RepToDonateToFaction: number;\n /** Influences how much money can be stolen from a server when a script performs a hack against it. */\n ScriptHackMoney: number;\n /** Influences the growth percentage per cycle against a server. */\n ServerGrowthRate: number;\n /** Influences the maxmimum money that a server can grow to. */\n ServerMaxMoney: number;\n /** Influences the initial money that a server starts with. */\n ServerStartingMoney: number;\n /** Influences the initial security level (hackDifficulty) of a server. */\n ServerStartingSecurity: number;\n /** Influences the weaken amount per invocation against a server. */\n ServerWeakenRate: number;\n /** Influences how quickly the player\'s strength level (not exp) scales */\n StrengthLevelMultiplier: number;\n}\n\n/**\n * Object representing all the values related to a hacknet node.\n * @public\n */\nexport interface NodeStats {\n /** Node\'s name */\n name: string;\n /** Node\'s level */\n level: number;\n /** Node\'s RAM */\n ram: number;\n /** Node\'s used RAM */\n ramUsed: number;\n /** Node\'s number of cores */\n cores: number;\n /** Cache level. Only applicable for Hacknet Servers */\n cache: number;\n /** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */\n hashCapacity: number;\n /** Node\'s production per second */\n production: number;\n /** Number of seconds since Node has been purchased */\n timeOnline: number;\n /** Total number of money Node has produced */\n totalProduction: number;\n}\n\n/**\n * Short summary of the players skills.\n * @public\n */\nexport interface PlayerSkills {\n /** Hacking level */\n hacking: number;\n /** Strength level */\n strength: number;\n /** Defense level */\n defense: number;\n /** Dexterity level */\n dexterity: number;\n /** Agility level */\n agility: number;\n /** Chraisma level */\n charisma: number;\n /** Intelligence level */\n intelligence: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterMult {\n /** Agility stat */\n agility: number;\n /** Agility exp */\n agilityExp: number;\n /** Company reputation */\n companyRep: number;\n /** Money earned from crimes */\n crimeMoney: number;\n /** Crime success chance */\n crimeSuccess: number;\n /** Defense stat */\n defense: number;\n /** Defense exp */\n defenseExp: number;\n /** Dexterity stat */\n dexterity: number;\n /** Dexterity exp */\n dexterityExp: number;\n /** Faction reputation */\n factionRep: number;\n /** Hacking stat */\n hacking: number;\n /** Hacking exp */\n hackingExp: number;\n /** Strength stat */\n strength: number;\n /** Strength exp */\n strengthExp: number;\n /** Money earned from jobs */\n workMoney: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterInfo {\n /** Current BitNode number */\n bitnode: number;\n /** Name of city you are currently in */\n city: string;\n /** Array of factions you are currently a member of */\n factions: string[];\n /** Current health points */\n hp: number;\n /** Array of all companies at which you have jobs */\n company: string[];\n /** Array of job positions for all companies you are employed at. Same order as \'jobs\' */\n jobTitle: string[];\n /** Maximum health points */\n maxHp: number;\n /** Boolean indicating whether or not you have a tor router */\n tor: boolean;\n /** Object with many of the player\'s multipliers from Augmentations/Source Files */\n mult: CharacterMult;\n /** Timed worked in ms */\n timeWorked: number;\n /** Hacking experience earned so far from work */\n workHackExpGain: number;\n /** Str experience earned so far from work */\n workStrExpGain: number;\n /** Def experience earned so far from work */\n workDefExpGain: number;\n /** Dex experience earned so far from work */\n workDexExpGain: number;\n /** Agi experience earned so far from work */\n workAgiExpGain: number;\n /** Cha experience earned so far from work */\n workChaExpGain: number;\n /** Reputation earned so far from work, if applicable */\n workRepGain: number;\n /** Money earned so far from work, if applicable */\n workMoneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface SleeveWorkGains {\n /** hacking exp gained from work */\n workHackExpGain: number;\n /** strength exp gained from work */\n workStrExpGain: number;\n /** defense exp gained from work, */\n workDefExpGain: number;\n /** dexterity exp gained from work */\n workDexExpGain: number;\n /** agility exp gained from work */\n workAgiExpGain: number;\n /** charisma exp gained from work */\n workChaExpGain: number;\n /** money gained from work */\n workMoneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface SourceFileLvl {\n /** The number of the source file */\n n: number;\n /** The level of the source file */\n lvl: number;\n}\n\n/**\n * Bladeburner current action.\n * @public\n */\nexport interface BladeburnerCurAction {\n /** Type of Action */\n type: string;\n /** Name of Action */\n name: string;\n}\n\n/**\n * Gang general info.\n * @public\n */\nexport interface GangGenInfo {\n /** Name of faction that the gang belongs to ("Slum Snakes", etc.) */\n faction: string;\n /** Boolean indicating whether or not its a hacking gang */\n isHacking: boolean;\n /** Money earned per game cycle */\n moneyGainRate: number;\n /** Gang\'s power for territory warfare */\n power: number;\n /** Gang\'s respect */\n respect: number;\n /** Respect earned per game cycle */\n respectGainRate: number;\n /** Amount of territory held. */\n territory: number;\n /** Clash chance. */\n territoryClashChance: number;\n /** Gang\'s wanted level */\n wantedLevel: number;\n /** Wanted level gained/lost per game cycle (negative for losses) */\n wantedLevelGainRate: number;\n /** Boolean indicating if territory warfare is enabled. */\n territoryWarfareEngaged: boolean;\n /** Number indicating the current wanted penalty. */\n wantedPenalty: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfoObject {\n /** Gang power */\n power: number;\n /** Gang territory, in decimal form */\n territory: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfo {\n "Slum Snakes": GangOtherInfoObject;\n Tetrads: GangOtherInfoObject;\n "The Syndicate": GangOtherInfoObject;\n "The Dark Army": GangOtherInfoObject;\n "Speakers for the Dead": GangOtherInfoObject;\n NiteSec: GangOtherInfoObject;\n "The Black Hand": GangOtherInfoObject;\n}\n\n/**\n * Object representing data representing a gang member task.\n * @public\n */\nexport interface GangTaskStats {\n /** Task name */\n name: string;\n /** Task Description */\n desc: string;\n /** Is a task of a hacking gang */\n isHacking: boolean;\n /** Is a task of a combat gang */\n isCombat: boolean;\n /** Base respect earned */\n baseRespect: number;\n /** Base wanted earned */\n baseWanted: number;\n /** Base money earned */\n baseMoney: number;\n /** Hacking skill impact on task scaling */\n hackWeight: number;\n /** Stength skill impact on task scaling */\n strWeight: number;\n /** Defense skill impact on task scaling */\n defWeight: number;\n /** Dexterity skill impact on task scaling */\n dexWeight: number;\n /** Agility skill impact on task scaling */\n agiWeight: number;\n /** Charisma skill impact on task scaling */\n chaWeight: number;\n /** Number representing the difficulty of the task */\n difficulty: number;\n /** Territory impact on task scaling */\n territory: GangTerritory;\n}\n\n/**\n * Object representing data representing a gang member equipment.\n * @public\n */\nexport interface EquipmentStats {\n /** Strength multiplier */\n str?: number;\n /** Defense multiplier */\n def?: number;\n /** Dexterity multiplier */\n dex?: number;\n /** Agility multiplier */\n agi?: number;\n /** Charisma multiplier */\n cha?: number;\n /** Hacking multiplier */\n hack?: number;\n}\n\n/**\n * @public\n */\nexport interface GangTerritory {\n /** Money gain impact on task scaling */\n money: number;\n /** Respect gain impact on task scaling */\n respect: number;\n /** Wanted gain impact on task scaling */\n wanted: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberInfo {\n name: string;\n task: string;\n earnedRespect: number;\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n\n hack_exp: number;\n str_exp: number;\n def_exp: number;\n dex_exp: number;\n agi_exp: number;\n cha_exp: number;\n\n hack_mult: number;\n str_mult: number;\n def_mult: number;\n dex_mult: number;\n agi_mult: number;\n cha_mult: number;\n\n hack_asc_mult: number;\n str_asc_mult: number;\n def_asc_mult: number;\n dex_asc_mult: number;\n agi_asc_mult: number;\n cha_asc_mult: number;\n\n hack_asc_points: number;\n str_asc_points: number;\n def_asc_points: number;\n dex_asc_points: number;\n agi_asc_points: number;\n cha_asc_points: number;\n\n upgrades: string[];\n augmentations: string[];\n\n respectGain: number;\n wantedLevelGain: number;\n moneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberAscension {\n /** Amount of respect lost from ascending */\n respect: number;\n /** Hacking multiplier gained from ascending.*/\n hack: number;\n /** Strength multiplier gained from ascending.*/\n str: number;\n /** Defense multiplier gained from ascending.*/\n def: number;\n /** Dexterity multiplier gained from ascending.*/\n dex: number;\n /** Agility multiplier gained from ascending.*/\n agi: number;\n /** Charisma multiplier gained from ascending.*/\n cha: number;\n}\n\n/**\n * Object representing a sleeve stats.\n * @public\n */\nexport interface SleeveSkills {\n /** current shock of the sleeve [0-100] */\n shock: number;\n /** current sync of the sleeve [0-100] */\n sync: number;\n /** current hacking skill of the sleeve */\n hacking: number;\n /** current strength of the sleeve */\n strength: number;\n /** current defense of the sleeve */\n defense: number;\n /** current dexterity of the sleeve */\n dexterity: number;\n /** current agility of the sleeve */\n agility: number;\n /** current charisma of the sleeve */\n charisma: number;\n}\n\n/**\n * Object representing sleeve information.\n * @public\n */\nexport interface SleeveInformation {\n /** location of the sleeve */\n city: string;\n /** current hp of the sleeve */\n hp: number;\n /** max hp of the sleeve */\n maxHp: number;\n /** jobs available to the sleeve */\n jobs: string[];\n /** job titles available to the sleeve */\n jobTitle: string[];\n /** does this sleeve have access to the tor router */\n tor: boolean;\n /** sleeve multipliers */\n mult: CharacterMult;\n /** time spent on the current task in milliseconds */\n timeWorked: number;\n /** earnings synchronized to other sleeves */\n earningsForSleeves: SleeveWorkGains;\n /** earnings synchronized to the player */\n earningsForPlayer: SleeveWorkGains;\n /** earnings for this sleeve */\n earningsForTask: SleeveWorkGains;\n /** faction or company reputation gained for the current task */\n workRepGain: number;\n}\n\n/**\n * Object representing a sleeve current task.\n * @public\n */\nexport interface SleeveTask {\n /** task type */\n task: string;\n /** crime currently attempting, if any */\n crime: string;\n /** location of the task, if any */\n location: string;\n /** stat being trained at the gym, if any */\n gymStatType: string;\n /** faction work type being performed, if any */\n factionWorkType: string;\n}\n\n/**\n * Stock market API\n * @public\n */\nexport interface TIX {\n /**\n * Returns an array of the symbols of the tradable stocks\n *\n * @remarks RAM cost: 2 GB\n * @returns Array of the symbols of the tradable stocks.\n */\n getSymbols(): string[];\n\n /**\n * Returns the price of a stock\n *\n * @remarks\n * RAM cost: 2 GB\n * The stock’s price is the average of its bid and ask price.\n *\n * @example\n * ```ts\n * getPrice("FISG");\n * ```\n * @param sym - Stock symbol.\n * @returns The price of a stock.\n */\n getPrice(sym: string): number;\n\n /**\n * Returns the ask price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The ask price of a stock.\n */\n getAskPrice(sym: string): number;\n\n /**\n * Returns the bid price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The bid price of a stock.\n */\n getBidPrice(sym: string): number;\n\n /**\n * Returns the player’s position in a stock.\n * @remarks\n * RAM cost: 2 GB\n * Returns an array of four elements that represents the player’s position in a stock.\n *\n * The first element is the returned array is the number of shares the player owns of\n * the stock in the Long position. The second element in the array is the average price\n * of the player’s shares in the Long position.\n *\n * The third element in the array is the number of shares the player owns of the stock\n * in the Short position. The fourth element in the array is the average price of the\n * player’s Short position.\n *\n * All elements in the returned array are numeric.\n *\n * @example\n * ```ts\n * pos = getPosition("ECP");\n * shares = pos[0];\n * avgPx = pos[1];\n * sharesShort = pos[2];\n * avgPxShort = pos[3];\n * ```\n * @param sym - Stock symbol.\n * @returns Array of four elements that represents the player’s position in a stock.\n */\n getPosition(sym: string): [number, number, number, number];\n\n /**\n * Returns the maximum number of shares of a stock.\n * @remarks\n * RAM cost: 2 GB\n * This is the maximum amount of the stock that can be purchased\n * in both the Long and Short positions combined.\n *\n * @param sym - Stock symbol.\n * @returns Maximum number of shares that the stock has.\n */\n getMaxShares(sym: string): number;\n\n /**\n * Calculates cost of buying stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much it would cost to buy a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchase.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Cost to buy a given number of shares of a stock.\n */\n getPurchaseCost(sym: string, shares: number, posType: string): number;\n\n /**\n * Calculate profit of setting stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much you would gain from selling a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Gain from selling a given number of shares of a stock.\n */\n getSaleGain(sym: string, shares: number, posType: string): number;\n\n /**\n * Buy stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase shares of a stock using a Market Order.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If this function successfully purchases the shares, it will return the stock price at which\n * each share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchased. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n buy(sym: string, shares: number): number;\n\n /**\n * Sell stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell shares of a stock using a Market Order.\n *\n * If the specified number of shares in the function exceeds the amount that the player\n * actually owns, then this function will sell all owned shares. Remember that every\n * transaction on the stock exchange costs a certain commission fee.\n *\n * The net profit made from selling stocks with this function is reflected in the script’s\n * statistics. This net profit is calculated as:\n *\n * shares * (sell_price - average_price_of_purchased_shares)\n *\n * If the sale is successful, this function will return the stock price at\n * which each share was sold. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sell(sym: string, shares: number): number;\n\n /**\n * Short stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If the purchase is successful, this function will return the stock price at which each\n * share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to short. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n short(sym: string, shares: number): number;\n\n /**\n * Sell short stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the specified number of shares exceeds the amount that the player actually owns,\n * then this function will sell all owned shares. Remember that every transaction on\n * the stock exchange costs a certain commission fee.\n *\n * If the sale is successful, this function will return the stock price at which each\n * share was sold. Otherwise it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sellShort(sym: string, shares: number): number;\n\n /**\n * Place order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Places an order on the stock market. This function only works for Limit and Stop Orders.\n *\n * The ability to place limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * Returns true if the order is successfully placed, and false otherwise.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n * @returns True if the order is successfully placed, and false otherwise.\n */\n placeOrder(sym: string, shares: number, price: number, type: string, pos: string): boolean;\n\n /**\n * Cancel order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Cancels an oustanding Limit or Stop order on the stock market.\n *\n * The ability to use limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n */\n cancelOrder(sym: string, shares: number, price: number, type: string, pos: string): void;\n\n /**\n * Returns your order book for the stock market.\n * @remarks\n * RAM cost: 2.5 GB\n * This is an object containing information for all the Limit and Stop Orders you have in the stock market.\n * The object has the following structure:\n *\n * ```ts\n * {\n * string1: [ // Array of orders for this stock\n * {\n * shares: Order quantity\n * price: Order price\n * type: Order type\n * position: Either "L" or "S" for Long or Short position\n * },\n * {\n * ...\n * },\n * ...\n * ],\n * string2: [ // Array of orders for this stock\n * ...\n * ],\n * ...\n * }\n * ```\n * The “Order type” property can have one of the following four values: "Limit Buy Order", "Limit Sell Order", "Stop Buy Order", "Stop Sell Order".\n * Note that the order book will only contain information for stocks that you actually have orders in.\n *\n * @example\n * ```ts\n * "If you do not have orders in Nova Medical (NVMD), then the returned object will not have a “NVMD” property."\n * {\n * ECP: [\n * {\n * shares: 5,\n * price: 100,000\n * type: "Stop Buy Order",\n * position: "S",\n * },\n * {\n * shares: 25,\n * price: 125,000\n * type: "Limit Sell Order",\n * position: "L",\n * },\n * ],\n * SYSC: [\n * {\n * shares: 100,\n * price: 10,000\n * type: "Limit Buy Order",\n * position: "L",\n * },\n * ],\n * }\n * ```\n * @returns Object containing information for all the Limit and Stop Orders you have in the stock market.\n */\n getOrders(): StockOrder;\n\n /**\n * Returns the volatility of the specified stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Volatility represents the maximum percentage by which a stock’s price can change every tick.\n * The volatility is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a volatility of 3%, then this function will return 0.03, NOT 3).\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Volatility of the specified stock.\n */\n getVolatility(sym: string): number;\n\n /**\n * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n * @remarks\n * RAM cost: 2.5 GB\n * The probability is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a 60% chance of increasing, then this function will return 0.6, NOT 60).\n *\n * In other words, if this function returned 0.30 for a stock, then this means that the stock’s price has a\n * 30% chance of increasing and a 70% chance of decreasing during the next tick.\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n */\n getForecast(sym: string): number;\n\n /**\n * Purchase 4S Market Data Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketData(): boolean;\n\n /**\n * Purchase 4S Market Data TIX API Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketDataTixApi(): boolean;\n}\n\n/**\n * Singularity API\n * @remarks\n * This API requires Source-File 4 level 1 / 2 / 3 to use.\n * @public\n */\nexport interface Singularity {\n /**\n * SF4.1 - Take university class.\n *\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function will automatically set you to start taking a course at a university.\n * If you are already in the middle of some “working” action (such as working at a\n * company, for a faction, or on a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these universities and classes are the same as\n * if you were to manually visit and take these classes.\n *\n * @param universityName - Name of university. You must be in the correct city for whatever university you specify.\n * @param courseName - Name of course.\n * @returns True if actions is successfully started, false otherwise.\n */\n universityCourse(universityName: string, courseName: string): boolean;\n\n /**\n * SF4.1 - Workout at the gym.\n * \n * @remarks\n * RAM cost: 2 GB\n * \n\n * This function will automatically set you to start working out at a gym to train\n * a particular stat. If you are already in the middle of some “working” action\n * (such as working at a company, for a faction, or on a program), then running\n * this function will automatically cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these gyms are the same as if you were\n * to manually visit these gyms and train\n *\n * @param gymName - Name of gym. You must be in the correct city for whatever gym you specify.\n * @param stat - The stat you want to train.\n * @returns True if actions is successfully started, false otherwise.\n */\n gymWorkout(gymName: string, stat: string): boolean;\n\n /**\n * SF4.1 - Travel to another city.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function allows the player to travel to any city. The cost for using this\n * function is the same as the cost for traveling through the Travel Agency.\n *\n * @param city - City to travel to.\n * @returns True if actions is successful, false otherwise.\n */\n travelToCity(city: string): boolean;\n\n /**\n * SF4.1 - Purchase the TOR router.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function allows you to automatically purchase a TOR router. The cost for\n * purchasing a TOR router using this function is the same as if you were to\n * manually purchase one.\n *\n * @returns True if actions is successful, false otherwise.\n */\n purchaseTor(): boolean;\n\n /**\n * SF4.1 - Purchase a program from the dark web.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * This function allows you to automatically purchase programs. You MUST have a\n * TOR router in order to use this function. The cost of purchasing programs\n * using this function is the same as if you were purchasing them through the Dark\n * Web using the Terminal buy command.\n *\n * @example\n * ```ts\n * purchaseProgram("brutessh.exe");\n * ```\n * @param programName - Name of program to purchase.\n * @returns True if the specified program is purchased, and false otherwise.\n */\n purchaseProgram(programName: string): boolean;\n\n /**\n * SF4.1 - Check if the player is busy.\n * @remarks\n * RAM cost: 0.5 GB\n *\n *\n * Returns a boolean indicating whether or not the player is currently performing an\n * ‘action’. These actions include working for a company/faction, studying at a univeristy,\n * working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.\n *\n * @returns True if the player is currently performing an ‘action’, false otherwise.\n */\n isBusy(): boolean;\n\n /**\n * SF4.1 - Stop the current action.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function is used to end whatever ‘action’ the player is currently performing.\n * The player will receive whatever money/experience/etc. he has earned from that action.\n *\n * The actions that can be stopped with this function are:\n *\n * * Studying at a university\n * * Working for a company/faction\n * * Creating a program\n * * Committing a Crime\n *\n * This function will return true if the player’s action was ended.\n * It will return false if the player was not performing an action when this function was called.\n *\n * @returns True if the player’s action was ended, false if the player was not performing an action.\n */\n stopAction(): boolean;\n\n /**\n * SF4.2 - Upgrade home computer RAM.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will upgrade amount of RAM on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer RAM is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer RAM is successfully upgraded, and false otherwise.\n */\n upgradeHomeRam(): boolean;\n\n /**\n * SF4.2 - Upgrade home computer cores.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will upgrade amount of cores on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer cores is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer cores is successfully upgraded, and false otherwise.\n */\n upgradeHomeCores(): boolean;\n\n /**\n * SF4.2 - Get the price of upgrading home RAM.\n * @remarks\n * RAM cost: 1.5 GB\n *\n *\n * Returns the cost of upgrading the player’s home computer RAM.\n *\n * @returns Cost of upgrading the player’s home computer RAM.\n */\n getUpgradeHomeRamCost(): number;\n\n /**\n * SF4.2 - Get the price of upgrading home cores.\n * @remarks\n * RAM cost: 1.5 GB\n *\n *\n * Returns the cost of upgrading the player’s home computer cores.\n *\n * @returns Cost of upgrading the player’s home computer cores.\n */\n getUpgradeHomeCoresCost(): number;\n\n /**\n * SF4.2 - Work for a company.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically set you to start working at the company\n * at which you are employed. If you are already in the middle of some “working”\n * action (such as working for a faction, training at a gym, or creating a program),\n * then running this function will automatically cancel that action and give you\n * your earnings.\n *\n * This function will return true if the player starts working, and false otherwise.\n *\n * Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getCompanyRep(COMPANY HERE) < VALUE) {\n * workForCompany();\n * sleep(60000);\n * }\n * //This way, your company reputation will be updated every minute.\n * ```\n * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked\n * @returns True if the player starts working, and false otherwise.\n */\n workForCompany(companyName?: string): boolean;\n\n /**\n * SF4.2 - Apply for a job at a company.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically try to apply to the specified company\n * for a position in the specified field. This function can also be used to\n * apply for promotions by specifying the company and field you are already\n * employed at.\n *\n * This function will return true if you successfully get a job/promotion,\n * and false otherwise. Note that if you are trying to use this function to\n * apply for a promotion and you don’t get one, it will return false.\n *\n * @param companyName - Name of company to apply to.\n * @param field - Field to which you want to apply.\n * @returns True if the player successfully get a job/promotion, and false otherwise.\n */\n applyToCompany(companyName: string, field: string): boolean;\n\n /**\n * SF4.2 - Get company reputation.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function will return the amount of reputation you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of reputation you have at the specified company.\n */\n getCompanyRep(companyName: string): number;\n\n /**\n * SF4.2 - Get company favor.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function will return the amount of favor you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you have at the specified company.\n */\n getCompanyFavor(companyName: string): number;\n\n /**\n * SF4.2 - Get company favor gain.\n * @remarks\n * RAM cost: 0.75 GB\n *\n *\n * This function will return the amount of favor you will gain for the specified\n * company when you reset by installing Augmentations.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you gain at the specified company when you reset by installing Augmentations.\n */\n getCompanyFavorGain(companyName: string): number;\n\n /**\n * SF4.2 - List all current faction invitations.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * Returns an array with the name of all Factions you currently have oustanding invitations from.\n *\n * @returns Array with the name of all Factions you currently have oustanding invitations from.\n */\n checkFactionInvitations(): string[];\n\n /**\n * SF4.2 - Join a faction.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically accept an invitation from a faction and join it.\n *\n * @param faction - Name of faction to join.\n * @returns True if player joined the faction, and false otherwise.\n */\n joinFaction(faction: string): boolean;\n\n /**\n * SF4.2 - Work for a faction.\n * @remarks\n * RAM cost: 3 GB\n *\n *\n * This function will automatically set you to start working for the specified faction.\n * Obviously, you must be a member of the faction or else this function will fail. If\n * you are already in the middle of some “working” action (such as working for a company,\n * training at a gym, or creating a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * This function will return true if you successfully start working for the specified faction, and false otherwise.\n *\n * Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getFactionRep(FACTION NAME) < VALUE) {\n * workForFaction(FACNAME, WORKTYPE);\n * sleep(60000);\n * }\n * //This way, your faction reputation will be updated every minute.\n * ```\n * @param faction - Name of faction to work for.\n * @param workType - Type of work to perform for the faction.\n * @returns True if the player starts working, and false otherwise.\n */\n workForFaction(faction: string, workType: string): boolean;\n\n /**\n * SF4.2 - Get faction reputation.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function returns the amount of reputation you have for the specified faction.\n *\n * @param faction - Name of faction to work for.\n * @returns Amount of reputation you have for the specified faction.\n */\n getFactionRep(faction: string): number;\n\n /**\n * SF4.2 - Get faction favor.\n * @remarks\n * RAM cost: 1 GB\n *\n *\n * This function returns the amount of favor you have for the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you have for the specified faction.\n */\n getFactionFavor(faction: string): number;\n\n /**\n * SF4.2 - Get faction favor gain.\n * @remarks\n * RAM cost: 0.75 GB\n *\n *\n * This function returns the amount of favor you will gain for the specified\n * faction when you reset by installing Augmentations.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you will gain for the specified faction when you reset by installing Augmentations.\n */\n getFactionFavorGain(faction: string): number;\n\n /**\n * SF4.3 - Donate to a faction.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Attempts to donate money to the specified faction in exchange for reputation.\n * Returns true if you successfully donate the money, and false otherwise.\n *\n * @param faction - Name of faction to donate to.\n * @param amount - Amount of money to donate.\n * @returns True if the money was donated, and false otherwise.\n */\n donateToFaction(faction: string, amount: number): boolean;\n\n /**\n * SF4.3 - Create a program.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will automatically set you to start working on creating the\n * specified program. If you are already in the middle of some “working” action\n * (such as working for a company, training at a gym, or taking a course), then\n * running this function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns true if you successfully start working on the specified program, and false otherwise.\n *\n * Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are:\n * * BruteSSH.exe: 50\n * * FTPCrack.exe: 100\n * * relaySMTP.exe: 250\n * * HTTPWorm.exe: 500\n * * SQLInject.exe: 750\n * * DeepscanV1.exe: 75\n * * DeepscanV2.exe: 400\n * * ServerProfiler.exe: 75\n * * AutoLink.exe: 25\n *\n * @example\n * ```ts\n * createProgram(“relaysmtp.exe”);\n * ```\n * @param program - Name of program to create.\n * @returns True if you successfully start working on the specified program, and false otherwise.\n */\n createProgram(program: string): boolean;\n\n /**\n * SF4.3 - Commit a crime.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function is used to automatically attempt to commit crimes.\n * If you are already in the middle of some ‘working’ action (such\n * as working for a company or training at a gym), then running this\n * function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns the number of seconds it takes to attempt the specified\n * crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime, so running\n * `commitCrime(\'rob store\')` will return 60).\n *\n * Warning: I do not recommend using the time returned from this function to try\n * and schedule your crime attempts. Instead, I would use the isBusy Singularity\n * function to check whether you have finished attempting a crime. This is because\n * although the game sets a certain crime to be X amount of seconds, there is no\n * guarantee that your browser will follow that time limit.\n *\n * @param crime - Name of crime to attempt.\n * @returns True if you successfully start working on the specified program, and false otherwise.\n */\n commitCrime(crime: string): number;\n\n /**\n * SF4.3 - Get chance to successfully commit a crime.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns your chance of success at commiting the specified crime.\n *\n * @param crime - Name of crime.\n * @returns Chance of success at commiting the specified crime.\n */\n getCrimeChance(crime: string): number;\n\n /**\n * SF4.3 - Get stats related to a crime.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Returns the stats of the crime.\n *\n * @param crime - Name of crime. Not case-sensitive\n * @returns The stats of the crime.\n */\n getCrimeStats(crime: string): CrimeStats;\n\n /**\n * SF4.3 - Get a list of owned augmentation.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns an array containing the names (as strings) of all Augmentations you have.\n *\n * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. By default, this argument is false which means that the return value will NOT have the purchased Augmentations.\n * @returns Array containing the names (as strings) of all Augmentations you have.\n */\n getOwnedAugmentations(purchased?: boolean): string[];\n\n /**\n * SF4.3 - Get a list of augmentation available from a faction.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Returns an array containing the names (as strings) of all Augmentations\n * that are available from the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Array containing the names of all Augmentations.\n */\n getAugmentationsFromFaction(faction: string): string[];\n\n /**\n * SF4.3 - Get the pre-requisite of an augmentation.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n * If there are no prerequisites, a blank array is returned.\n *\n * @param augName - Name of Augmentation.\n * @returns Array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n */\n getAugmentationPrereq(augName: string): string[];\n\n /**\n * SF4.3 - Get the price and reputation of an augmentation.\n * @deprecated use getAugmentationPrice getAugmentationRepCost\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns an array with two elements that gives the cost for\n * the specified Augmentation. The first element in the returned array is the\n * reputation requirement of the Augmentation, and the second element is the\n * money cost.\n *\n * If an invalid Augmentation name is passed in for the augName argument, this\n * function will return the array [-1, -1].\n *\n * @param augName - Name of Augmentation.\n * @returns Array with first element as a reputation requirement and second element as the money cost.\n */\n getAugmentationCost(augName: string): [number, number];\n\n /**\n * SF4.3 - Get price of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Price of the augmentation.\n */\n getAugmentationPrice(augName: string): number;\n\n /**\n * SF4.3 - Get reputation requirement of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Reputation requirement of the augmentation.\n */\n getAugmentationRepReq(augName: string): number;\n\n /**\n * SF4.3 - Purchase an augmentation\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will try to purchase the specified Augmentation through the given Faction.\n *\n * This function will return true if the Augmentation is successfully purchased, and false otherwise.\n *\n * @param faction - Name of faction to purchase Augmentation from.\n * @param augmentation - Name of Augmentation to purchase.\n * @returns True if the Augmentation is successfully purchased, and false otherwise.\n */\n purchaseAugmentation(faction: string, augmentation: string): boolean;\n\n /**\n * SF4.3 - Get the stats of an augmentation.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function returns augmentation stats.\n *\n * @param name - Name of Augmentation. CASE-SENSITIVE.\n * @returns Augmentation stats.\n */\n getAugmentationStats(name: string): AugmentationStats;\n\n /**\n * SF4.3 - Install your purchased augmentations.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will automatically install your Augmentations, resetting the game as usual.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n installAugmentations(cbScript?: string): void;\n\n /**\n * SF4.1 - Returns an object with the Player’s stats.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB\n *\n *\n * @example\n * ```ts\n * res = getStats();\n * print(\'My charisma level is: \' + res.charisma);\n * ```\n * @returns Object with the Player’s stats.\n */\n getStats(): PlayerSkills;\n\n /**\n * SF4.1 - Returns an object with various information about your character.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB\n *\n *\n * @returns Object with various information about your character.\n */\n getCharacterInformation(): CharacterInfo;\n\n /**\n * SF4.1 - Hospitalize the player.\n * @remarks\n * RAM cost: 0.25 GB\n *\n *\n * @returns The cost of the hospitalization.\n */\n hospitalize(): number;\n\n /**\n * SF4.3 - Soft reset the game.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * This function will perform a reset even if you don’t have any augmentation installed.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n softReset(cbScript: string): void;\n\n /**\n * SF4.3 - Go to a location.\n * @remarks\n * RAM cost: 5 GB\n *\n *\n * Move the player to a specific location.\n *\n * @param locationName - Name of the location.\n * @returns True if the player was moved there, false otherwise.\n */\n goToLocation(locationName: string): boolean;\n\n /**\n * SF4.1 - Get the current server.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * @returns Name of the current server.\n */\n getCurrentServer(): string;\n\n /**\n * SF4.1 - Connect to a server.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * Run the connect HOSTNAME command in the terminal. Can only connect to neighbors.\n *\n * @returns True if the connect command was successful, false otherwise.\n */\n connect(hostname: string): boolean;\n\n /**\n * SF4.1 - Run the hack command in the terminal.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * @returns Amount of money stolen by manual hacking.\n */\n manualHack(): Promise;\n\n /**\n * SF4.1 - Run the backdoor command in the terminal.\n * @remarks\n * RAM cost: 2 GB\n *\n *\n * @returns True if the installation was successful.\n */\n installBackdoor(): Promise;\n}\n\n/**\n * Hacknet API\n * @remarks\n * Not all these functions are immediately available.\n * @public\n */\nexport interface Hacknet {\n /**\n * Get the number of hacknet nodes you own.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the number of Hacknet Nodes you own.\n *\n * @returns number of hacknet nodes.\n */\n numNodes(): number;\n\n /**\n * Get the maximum number of hacknet nodes.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns maximum number of hacknet nodes.\n */\n maxNumNodes(): number;\n\n /**\n * Purchase a new hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Purchases a new Hacknet Node. Returns a number with the index of the\n * Hacknet Node. This index is equivalent to the number at the end of\n * the Hacknet Node’s name (e.g The Hacknet Node named `hacknet-node-4`\n * will have an index of 4).\n *\n * If the player cannot afford to purchase a new Hacknet Node then the function will return -1.\n *\n * @returns The index of the Hacknet Node or if the player cannot afford to purchase a new Hacknet Node the function will return -1.\n */\n purchaseNode(): number;\n\n /**\n * Get the price of the next hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of purchasing a new Hacknet Node.\n *\n * @returns Cost of purchasing a new Hacknet Node.\n */\n getPurchaseNodeCost(): number;\n\n /**\n * Get the stats of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns an object containing a variety of stats about the specified Hacknet Node.\n *\n * Note that for Hacknet Nodes, production refers to the amount of money the node generates.\n * For Hacknet Servers (the upgraded version of Hacknet Nodes), production refers to the\n * amount of hashes the node generates.\n *\n * @param index - Index/Identifier of Hacknet Node\n * @returns Object containing a variety of stats about the specified Hacknet Node.\n */\n getNodeStats(index: number): NodeStats;\n\n /**\n * Upgrade the level of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the level of the specified Hacknet Node by n.\n *\n * Returns true if the Hacknet Node’s level is successfully upgraded by n\n * or if it is upgraded by some positive amount and the Node reaches its max level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s level is successfully upgraded, false otherwise.\n */\n upgradeLevel(index: number, n: number): boolean;\n\n /**\n * Upgrade the RAM of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the specified Hacknet Node’s RAM n times.\n * Note that each upgrade doubles the Node’s RAM.\n * So this is equivalent to multiplying the Node’s RAM by 2 n.\n *\n * Returns true if the Hacknet Node’s RAM is successfully upgraded n times\n * or if it is upgraded some positive number of times and the Node reaches it max RAM.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s ram is successfully upgraded, false otherwise.\n */\n upgradeRam(index: number, n: number): boolean;\n\n /**\n * Upgrade the core of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to purchase n cores for the specified Hacknet Node.\n *\n * Returns true if it successfully purchases n cores for the Hacknet Node\n * or if it purchases some positive amount and the Node reaches its max number of cores.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cores to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCore(index: number, n: number): boolean;\n\n /**\n * Upgrade the cache of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Tries to upgrade the specified Hacknet Server’s cache n times.\n *\n * Returns true if it successfully upgrades the Server’s cache n times,\n * or if it purchases some positive amount and the Server reaches its max cache level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cache levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCache(index: number, n: number): boolean;\n\n /**\n * Calculate the cost of upgrading hacknet node levels.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the specified Hacknet Node by n levels.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to upgrade. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node.\n */\n getLevelUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node RAM.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the RAM of the specified Hacknet Node n times.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s ram.\n */\n getRamUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cores.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cores. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s number of cores.\n */\n getCoreUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cache.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the cost of upgrading the cache level of the specified Hacknet Server by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cache. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s cache.\n */\n getCacheUpgradeCost(index: number, n: number): number;\n\n /**\n * Get the total number of hashes stored.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you have.\n *\n * @returns Number of hashes you have.\n */\n numHashes(): number;\n\n /**\n * Get the maximum number of hashes you can store.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you can store.\n *\n * @returns Number of hashes you can store.\n */\n hashCapacity(): number;\n\n /**\n * Get the cost of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes required for the specified upgrade. The name of the upgrade must be an exact match.\n *\n * @example\n * ```ts\n * var upgradeName = "Sell for Corporation Funds";\n * if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {\n * hacknet.spendHashes(upgName);\n * }\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @returns Number of hashes required for the specified upgrade.\n */\n hashCost(upgName: string): number;\n\n /**\n * Purchase a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Spend the hashes generated by your Hacknet Servers on an upgrade.\n * Returns a boolean value - true if the upgrade is successfully purchased, and false otherwise.\n *\n * The name of the upgrade must be an exact match.\n * The `upgTarget` argument is used for upgrades such as `Reduce Minimum Security`, which applies to a specific server.\n * In this case, the `upgTarget` argument must be the hostname of the server.\n *\n * @example\n * ```ts\n * hacknet.spendHashes("Sell for Corporation Funds");\n * hacknet.spendHashes("Increase Maximum Money", "foodnstuff");\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @param upgTarget - Object to which upgrade applies. Required for certain upgrades.\n * @returns True if the upgrade is successfully purchased, and false otherwise..\n */\n spendHashes(upgName: string, upgTarget?: string): boolean;\n\n /**\n * Get the level of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Level of the upgrade.\n */\n getHashUpgradeLevel(upgName: string): number;\n\n /**\n * Get the multipler to study.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getStudyMult(): number;\n\n /**\n * Get the multipler to training.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getTrainingMult(): number;\n}\n\n/**\n * Bladeburner API\n * @remarks\n * You have to be employed in the Bladeburner division and be in BitNode-7\n * or have Source-File 7 in order to use this API.\n * @public\n */\nexport interface Bladeburner {\n /**\n * List all contracts.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner contracts.\n *\n * @returns Array of strings containing the names of all Bladeburner contracts.\n */\n getContractNames(): string[];\n\n /**\n * List all operations.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner operations.\n *\n * @returns Array of strings containing the names of all Bladeburner operations.\n */\n getOperationNames(): string[];\n\n /**\n * List all black ops.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner Black Ops.\n *\n * @returns Array of strings containing the names of all Bladeburner Black Ops.\n */\n getBlackOpNames(): string[];\n\n /**\n * List all general actions.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner actions.\n *\n * @returns Array of strings containing the names of all general Bladeburner actions.\n */\n getGeneralActionNames(): string[];\n\n /**\n * List all skills.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner skills.\n *\n * @returns Array of strings containing the names of all general Bladeburner skills.\n */\n getSkillNames(): string[];\n\n /**\n * Start an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to start the specified Bladeburner action.\n * Returns true if the action was started successfully, and false otherwise.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match\n * @returns True if the action was started successfully, and false otherwise.\n */\n startAction(type: string, name: string): boolean;\n\n /**\n * Stop current action.\n * @remarks\n * RAM cost: 2 GB\n *\n * Stops the current Bladeburner action.\n *\n */\n stopBladeburnerAction(): void;\n\n /**\n * Get current action.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns an object that represents the player’s current Bladeburner action.\n * If the player is not performing an action, the function will return an object with the ‘type’ property set to “Idle”.\n *\n * @returns Object that represents the player’s current Bladeburner action.\n */\n getCurrentAction(): BladeburnerCurAction;\n\n /**\n * Get the time to complete an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of seconds it takes to complete the specified action\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of milliseconds it takes to complete the specified action.\n */\n getActionTime(type: string, name: string): number;\n\n /**\n * Get estimate success chance of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated success chance for the specified action.\n * This chance is returned as a decimal value, NOT a percentage\n * (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80).\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Estimated success chance for the specified action.\n */\n getActionEstimatedSuccessChance(type: string, name: string): [number, number];\n\n /**\n * Get the reputation gain of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the average Bladeburner reputation gain for successfully\n * completing the specified action.\n * Note that this value is an ‘average’ and the real reputation gain may vary slightly from this value.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Optional action level at which to calculate the gain\n * @returns Average Bladeburner reputation gain for successfully completing the specified action.\n */\n getActionRepGain(type: string, name: string, level: number): number;\n\n /**\n * Get action count remaining.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the remaining count of the specified action.\n *\n * Note that this is meant to be used for Contracts and Operations.\n * This function will return ‘Infinity’ for actions such as Training and Field Analysis.\n * This function will return 1 for BlackOps not yet completed regardless of wether\n * the player has the required rank to attempt the mission or not.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Remaining count of the specified action.\n */\n getActionCountRemaining(type: string, name: string): number;\n\n /**\n * Get the maximum level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the maximum level for this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Maximum level of the specified action.\n */\n getActionMaxLevel(type: string, name: string): number;\n\n /**\n * Get the current level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the current level of this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Current level of the specified action.\n */\n getActionCurrentLevel(type: string, name: string): number;\n\n /**\n * Get wether an action is set to autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action is currently set to autolevel.\n *\n * Returns false if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns True if the action is set to autolevel, and false otherwise.\n */\n getActionAutolevel(type: string, name: string): boolean;\n\n /**\n * Set an action autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Enable/disable autoleveling for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param autoLevel - Whether or not to autolevel this action\n */\n setActionAutolevel(type: string, name: string, autoLevel: boolean): void;\n\n /**\n * Set the level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the level for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Level to set this action to.\n */\n setActionLevel(type: string, name: string, level: number): void;\n\n /**\n * Get player bladeburner rank.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the player’s Bladeburner Rank.\n *\n * @returns Player’s Bladeburner Rank.\n */\n getRank(): number;\n\n /**\n * Get black op required rank.\n * @remarks\n * RAM cost: 2 GB\n *\n * Returns the rank required to complete this BlackOp.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param name - Name of BlackOp. Must be an exact match.\n * @returns Rank required to complete this BlackOp.\n */\n getBlackOpRank(name: string): number;\n\n /**\n * Get bladeburner skill points.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner skill points you have.\n *\n * @returns Number of Bladeburner skill points you have.\n */\n getSkillPoints(): number;\n\n /**\n * Get skill level.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns your level in the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Level in the specified skill.\n */\n getSkillLevel(name: string): number;\n\n /**\n * Get cost to upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns the number of skill points needed to upgrade the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Number of skill points needed to upgrade the specified skill.\n */\n getSkillUpgradeCost(name: string): number;\n\n /**\n * Upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to upgrade the specified Bladeburner skill.\n *\n * Returns true if the skill is successfully upgraded, and false otherwise.\n *\n * @param skillName - Name of skill to be upgraded. Case-sensitive and must be an exact match\n * @returns true if the skill is successfully upgraded, and false otherwise.\n */\n upgradeSkill(name: string): boolean;\n\n /**\n * Get team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner team members you have assigned to the specified action.\n *\n * Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of Bladeburner team members that were assigned to the specified action.\n */\n getTeamSize(type: string, name: string): number;\n\n /**\n * Set team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the team size for the specified Bladeburner action.\n *\n * Returns the team size that was set, or -1 if the function failed.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param size - Number of team members to set. Will be converted using Math.round().\n * @returns Number of Bladeburner team members you assigned to the specified action.\n */\n setTeamSize(type: string, name: string, size: number): number;\n\n /**\n * Get estimated population in city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoids in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Estimated number of Synthoids in the specified city.\n */\n getCityEstimatedPopulation(name: string): number;\n\n /**\n * Get number of communities in a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoid communities in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Number of Synthoids communities in the specified city.\n */\n getCityCommunities(name: string): number;\n\n /**\n * Get chaos of a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chaos in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Chaos in the specified city.\n */\n getCityChaos(name: string): number;\n\n /**\n * Get current city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the city that the player is currently in (for Bladeburner).\n *\n * @returns City that the player is currently in (for Bladeburner).\n */\n getCity(): string;\n\n /**\n * Travel to another city in bladeburner.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to switch to the specified city (for Bladeburner only).\n *\n * Returns true if successful, and false otherwise\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns true if successful, and false otherwise\n */\n switchCity(name: string): boolean;\n\n /**\n * Get bladeburner stamina.\n * @remarks\n * RAM cost: 4 GB\n * Returns an array with two elements:\n * * [Current stamina, Max stamina]\n * @example\n * ```ts\n * function getStaminaPercentage() {\n * let res = bladeburner.getStamina();\n * return res[0] / res[1];\n * }\n * ```\n * @returns Array containing current stamina and max stamina.\n */\n getStamina(): [number, number];\n\n /**\n * Join the bladeburner faction.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to join the Bladeburner faction.\n *\n * Returns true if you successfully join the Bladeburner faction, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner faction, or if you are already a member, false otherwise.\n */\n joinBladeburnerFaction(): boolean;\n\n /**\n * Join the bladeburner division.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to join the Bladeburner division.\n *\n * Returns true if you successfully join the Bladeburner division, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner division, or if you are already a member, false otherwise.\n */\n joinBladeburnerDivision(): boolean;\n\n /**\n * Get bladeburner bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Bladeburner mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 5x the normal speed.\n * For example, if an action takes 30 seconds to complete but you’ve accumulated over\n * 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.\n *\n * @returns Amount of accumulated “bonus time” (milliseconds) for the Bladeburner mechanic.\n */\n getBonusTime(): number;\n}\n\n/**\n * Coding Contact API\n * @public\n */\nexport interface CodingContract {\n /**\n * Attemps a coding contract.\n * @remarks\n * RAM cost: 10 GB\n *\n * Attempts to solve the Coding Contract with the provided solution.\n *\n * @param answer - Solution for the contract.\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.\n */\n attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;\n\n /**\n * Get the type of a coding contract.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns a name describing the type of problem posed by the Coding Contract.\n * (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Name describing the type of problem posed by the Coding Contract.\n */\n getContractType(filename: string, host?: string): string;\n\n /**\n * Get the description.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the full text description for the problem posed by the Coding Contract.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Contract’s text description.\n */\n getDescription(filename: string, host?: string): string;\n\n /**\n * Get the input data.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the data associated with the specific Coding Contract.\n * Note that this is not the same as the contract’s description.\n * This is just the data that the contract wants you to act on in order to solve\n *\n * @param filename - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns The specified contract’s data;\n */\n getData(filename: string, host?: string): string;\n\n /**\n * Get the number of attempt remaining.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the number of tries remaining on the contract before it self-destructs.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns How many attempts are remaining for the contract;\n */\n getNumTriesRemaining(filename: string, host?: string): number;\n}\n\n/**\n * Gang API\n * @remarks\n * If you are not in BitNode-2, then you must have Source-File 2 in order to use this API.\n * @public\n */\nexport interface Gang {\n /**\n * Create a gang.\n * @remarks\n * RAM cost: 1GB\n *\n * Create a gang with the specified faction.\n * @returns True if the gang was created, false otherwise.\n */\n createGang(faction: string): boolean;\n\n /**\n * Check if you\'re in a gang.\n * @remarks\n * RAM cost: 1GB\n * @returns True if you\'re in a gang, false otherwise.\n */\n inGang(): boolean;\n\n /**\n * List all gang members.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the names of all Gang members\n *\n * @returns Names of all Gang members.\n */\n getMemberNames(): string[];\n\n /**\n * Get information about your gang.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get general information about the gang.\n *\n * @returns Object containing general information about the gang.\n */\n getGangInformation(): GangGenInfo;\n\n /**\n * Get information about the other gangs.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get territory and power information about all gangs.\n *\n * @returns Object containing territory and power information about all gangs.\n */\n getOtherGangInformation(): GangOtherInfo;\n\n /**\n * Get information about a specific gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get stat and equipment-related information about a Gang Member\n *\n * @param name - Name of member.\n * @returns Object containing stat and equipment-related information about a Gang Member.\n */\n getMemberInformation(name: string): GangMemberInfo;\n\n /**\n * Check if you can recruit a new gang member.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns boolean indicating whether a member can currently be recruited\n *\n * @returns True if a member can currently be recruited, false otherwise.\n */\n canRecruitMember(): boolean;\n\n /**\n * Recruit a new gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempt to recruit a new gang member.\n *\n * Possible reasons for failure:\n * * Cannot currently recruit a new member\n * * There already exists a member with the specified name\n *\n * @param name - Name of member to recruit.\n * @returns True if the member was successfully recruited, false otherwise.\n */\n recruitMember(name: string): boolean;\n\n /**\n * List member task names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all valid tasks that Gang members can be assigned to.\n *\n * @returns All valid tasks that Gang members can be assigned to.\n */\n getTaskNames(): string[];\n\n /**\n * Set gang member to task.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempts to assign the specified Gang Member to the specified task.\n * If an invalid task is specified, the Gang member will be set to idle (“Unassigned”).\n *\n * @param memberName - Name of Gang member to assign.\n * @param taskName - Task to assign.\n * @returns True if the Gang Member was successfully assigned to the task, false otherwise.\n */\n setMemberTask(memberName: string, taskName: string): boolean;\n\n /**\n * Get stats of a task.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the stats of a gang task stats. This is typically used to evaluate which action should be executed next.\n *\n * @param name - Name of the task.\n * @returns Detailed stats of a task.\n */\n getTaskStats(name: string): GangTaskStats;\n\n /**\n * List equipment names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all possible equipment/upgrades you can purchase for your Gang Members.\n * This includes Augmentations.\n *\n * @returns Names of all Equipments/Augmentations.\n */\n getEquipmentNames(): string[];\n\n /**\n * Get cost of equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the amount of money it takes to purchase a piece of Equipment or an Augmentation.\n * If an invalid Equipment/Augmentation is specified, this function will return Infinity.\n *\n * @param equipName - Name of equipment.\n * @returns Cost to purchase the specified Equipment/Augmentation (number). Infinity for invalid arguments\n */\n getEquipmentCost(equipName: string): number;\n\n /**\n * Get type of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment type.\n *\n * @param equipName - Name of equipment.\n * @returns Type of the equipment.\n */\n getEquipmentType(equipName: string): string;\n\n /**\n * Get stats of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment stats.\n *\n * @param equipName - Name of equipment.\n * @returns A dictionary containing the stats of the equipment.\n */\n getEquipmentStats(equipName: string): EquipmentStats;\n\n /**\n * Purchase an equipment for a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempt to purchase the specified Equipment/Augmentation for the specified Gang member.\n *\n * @param memberName - Name of Gang member to purchase the equipment for.\n * @param equipName - Name of Equipment/Augmentation to purchase.\n * @returns True if the equipment was successfully purchased. False otherwise\n */\n purchaseEquipment(memberName: string, equipName: string): boolean;\n\n /**\n * Ascend a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Ascend the specified Gang Member.\n *\n * @param memberName - Name of member to ascend.\n * @returns Object with info about the ascension results. undefined if ascension did not occur.\n */\n ascendMember(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Get the result of an ascension without ascending.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the result of an ascension without ascending.\n *\n * @param memberName - Name of member.\n * @returns Object with info about the ascension results. undefined if ascension is impossible.\n */\n getAscensionResult(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Enable/Disable territory warfare.\n * @remarks\n * RAM cost: 2 GB\n *\n * Set whether or not the gang should engage in territory warfare\n *\n * @param engage - Whether or not to engage in territory warfare.\n */\n setTerritoryWarfare(engage: boolean): void;\n\n /**\n * Get chance to win clash with other gang.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chance you have to win a clash with the specified gang. The chance is returned in decimal form, not percentage\n *\n * @param gangName - Target gang\n * @returns Chance you have to win a clash with the specified gang.\n */\n getChanceToWinClash(gangName: string): number;\n\n /**\n * Get bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Gang mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 10x the normal speed.\n *\n * @returns Bonus time for the Gang mechanic in milliseconds.\n */\n getBonusTime(): number;\n}\n\n/**\n * Sleeve API\n * @remarks\n * If you are not in BitNode-10, then you must have Source-File 10 in order to use this API.\n * @public\n */\nexport interface Sleeve {\n /**\n * Get the number of sleeves you own.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the number of duplicate sleeves the player has.\n *\n * @returns number of duplicate sleeves the player has.\n */\n getNumSleeves(): number;\n\n /**\n * Get the stats of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a structure containing the stats of the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to get stats of.\n * @returns Object containing the stats of the sleeve.\n */\n getSleeveStats(sleeveNumber: number): SleeveSkills;\n\n /**\n * Get information about a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a struct containing tons of information about this sleeve\n *\n * @param sleeveNumber - Index of the sleeve to retrieve information.\n * @returns Object containing tons of information about this sleeve.\n */\n getInformation(sleeveNumber: number): SleeveInformation;\n\n /**\n * Get task of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve task from.\n * @returns Object containing information the current task that the sleeve is performing.\n */\n getTask(sleeveNumber: number): SleeveTask;\n\n /**\n * Set a sleeve to shock recovery.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start recovery.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToShockRecovery(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to synchronize.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start synchronizing.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToSynchronize(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to commit crime.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * Returns false if an invalid action is specified.\n *\n * @param sleeveNumber - Index of the sleeve to start commiting crime.\n * @param name - Name of the crime. Must be an exact match.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToCommitCrime(sleeveNumber: number, name: string): boolean;\n\n /**\n * Set a sleeve to work for a faction.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this faction.\n *\n * @param sleeveNumber - Index of the sleeve to work for the faction.\n * @param factionName - Name of the faction to work for.\n * @param factionWorkType - Name of the action to perform for this faction.\n * @returns True if the sleeve started working on this faction, false otherwise.\n */\n setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean;\n\n /**\n * Set a sleeve to work for a company.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this company.\n *\n * @param sleeveNumber - Index of the sleeve to work for the company.\n * @param companyName - Name of the company to work for.\n * @returns True if the sleeve started working on this company, false otherwise.\n */\n setToCompanyWork(sleeveNumber: number, companyName: string): boolean;\n\n /**\n * Set a sleeve to take a class at a university.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start taking class.\n * @param university - Name of the university to attend.\n * @param className - Name of the class to follow.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;\n\n /**\n * Set a sleeve to workout at the gym.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working out.\n *\n * @param sleeveNumber - Index of the sleeve to workout at the gym.\n * @param gymName - Name of the gym.\n * @param stat - Name of the stat to train.\n * @returns True if the sleeve started working out, false otherwise.\n */\n setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;\n\n /**\n * Make a sleeve travel to another city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve reached destination.\n *\n * @param sleeveNumber - Index of the sleeve to travel.\n * @param cityName - Name of the destination city.\n * @returns True if the sleeve reached destination, false otherwise.\n */\n travel(sleeveNumber: number, cityName: string): boolean;\n\n /**\n * Get augmentations installed on a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentation names that this sleeve has installed.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve augmentations from.\n * @returns List of augmentation names that this sleeve has installed.\n */\n getSleeveAugmentations(sleeveNumber: number): string[];\n\n /**\n * List purchasable augs for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentations that the player can buy for this sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve purchasable augmentations from.\n * @returns List of augmentations that the player can buy for this sleeve.\n */\n getSleevePurchasableAugs(sleeveNumber: number): AugmentPair[];\n\n /**\n * Purchase an aug for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return true if the aug was purchased and installed on the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to buy an aug for.\n * @param augName - Name of the aug to buy. Must be an exact match.\n * @returns True if the aug was purchased and installed on the sleeve, false otherwise.\n */\n purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;\n}\n\n/**\n * Skills formulas\n * @public\n */\ninterface SkillsFormulas {\n /**\n * Calculate skill level.\n * @param exp - experience for that skill\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated skill level.\n */\n calculateSkill(exp: number, skillMult?: number): number;\n /**\n * Calculate exp for skill level.\n * @param skill - target skill level\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated exp required.\n */\n calculateExp(skill: number, skillMult?: number): number;\n}\n\n/**\n * Hacking formulas\n * @public\n */\ninterface HackingFormulas {\n /**\n * Calculate hack chance.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack chance.\n */\n hackChance(server: Server, player: Player): number;\n /**\n * Calculate hack exp for one thread.\n * @remarks\n * Multiply by thread to get total exp\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack exp.\n */\n hackExp(server: Server, player: Player): number;\n /**\n * Calculate hack percent for one thread.\n * @remarks\n * Multiply by thread to get total percent hacked.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack percent.\n */\n hackPercent(server: Server, player: Player): number;\n /**\n * Calculate the percent a server would grow.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param threads - Amount of thread.\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @param cores - Number of cores on the computer that will execute grow.\n * @returns The calculated grow percent.\n */\n growPercent(server: Server, threads: number, player: Player, cores?: number): number;\n /**\n * Calculate hack time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack time.\n */\n hackTime(server: Server, player: Player): number;\n /**\n * Calculate grow time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated grow time.\n */\n growTime(server: Server, player: Player): number;\n /**\n * Calculate weaken time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated weaken time.\n */\n weakenTime(server: Server, player: Player): number;\n}\n\n/**\n * Hacknet Node formulas\n * @public\n */\ninterface HacknetNodesFormulas {\n /**\n * Calculate money gain rate.\n * @param level - level of the node.\n * @param ram - ram of the node.\n * @param cores - cores of the node.\n * @param mult - player production mult (default to 1)\n * @returns The calculated money gain rate.\n */\n moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate the cost of a hacknet node.\n * @param n - number of the hacknet node\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetNodeCost(n: number, mult: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet node constants used by the game.\n */\n constants(): number;\n}\n\n/**\n * Hacknet Server formulas\n * @public\n */\ninterface HacknetServersFormulas {\n /**\n * Calculate hash gain rate.\n * @param level - level of the server.\n * @param ramUsed - ramUsed of the server.\n * @param maxRam - maxRam of the server.\n * @param cores - cores of the server.\n * @param mult - player production mult (default to 1)\n * @returns The calculated hash gain rate.\n */\n hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cache.\n * @param startingCache - starting cache level\n * @param extraCache - amount of levels of cache to purchase (defaults to 1)\n * @returns The calculated cost.\n */\n cacheUpgradeCost(startingCache: number, extraCache?: number): number;\n /**\n * Calculate hash cost of an upgrade.\n * @param upgName - name of the upgrade\n * @param level - level of the upgrade\n * @returns The calculated hash cost.\n */\n hashUpgradeCost(upgName: number, level: number): number;\n /**\n * Calculate the cost of a hacknet server.\n * @param n - number of the hacknet server\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetServerCost(n: number, mult?: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet server constants used by the game.\n */\n constants(): any;\n}\n\n/**\n * Gang formulas\n * @public\n */\ninterface GangFormulas {\n /**\n * Calculate the wanted penalty.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @returns The calculated wanted penalty.\n */\n wantedPenalty(gang: GangGenInfo): number;\n /**\n * Calculate respect gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated respect gain.\n */\n respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate wanted gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated wanted gain.\n */\n wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate money gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated money gain.\n */\n moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n\n /**\n * Calculate ascension point gain.\n * @param exp - Experience point before ascension.\n * @returns The calculated ascension point gain.\n */\n ascensionPointsGain(exp: number): number;\n\n /**\n * Calculate ascension mult.\n * @param points - Amount of ascension points.\n * @returns The calculated ascension mult.\n */\n ascensionMultiplier(points: number): number;\n}\n\n/**\n * Formulas API\n * @remarks\n * You need Formulas.exe on your home computer to use this API.\n * @public\n */\nexport interface Formulas {\n /** Skills formulas */\n skills: SkillsFormulas;\n /** Hacking formulas */\n hacking: HackingFormulas;\n /** Hacknet Nodes formulas */\n hacknetNodes: HacknetNodesFormulas;\n /** Hacknet Servers formulas */\n hacknetServers: HacknetServersFormulas;\n /** Gang formulas */\n gang: GangFormulas;\n}\n\n/**\n * @public\n */\nexport interface Fragment {\n id: number;\n shape: boolean[][];\n type: number;\n power: number;\n limit: number;\n}\n\n/**\n * @public\n */\nexport interface ActiveFragment {\n id: number;\n avgCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n}\n\n/**\n * Stanek\'s Gift API.\n * @public\n */\ninterface Stanek {\n /**\n * Stanek\'s Gift width.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The width of the gift.\n */\n width(): number;\n /**\n * Stanek\'s Gift height.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The height of the gift.\n */\n height(): number;\n\n /**\n * Charge a fragment, increasing it\'s power.\n * @remarks\n * RAM cost: 0.4 GB\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @returns Promise that lasts until the charge action is over.\n */\n charge(rootX: number, rootY: number): Promise;\n\n /**\n * List possible fragments.\n * @remarks\n * RAM cost: cost: 0 GB\n *\n * @returns List of possible fragments.\n */\n fragmentDefinitions(): Fragment[];\n\n /**\n * List of fragments in Stanek\'s Gift.\n * @remarks\n * RAM cost: cost: 5 GB\n *\n * @returns List of active fragments placed on Stanek\'s Gift.\n */\n activeFragments(): ActiveFragment[];\n\n /**\n * Clear the board of all fragments.\n * @remarks\n * RAM cost: cost: 0 GB\n */\n clear(): void;\n\n /**\n * Check if fragment can be placed at specified location.\n * @remarks\n * RAM cost: cost: 0.5 GB\n *\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @param rotation - rotation A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - fragmentId ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n canPlace(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Place fragment on Stanek\'s Gift.\n * @remarks\n * RAM cost: cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @param rotation - A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n place(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Get placed fragment at location.\n * @remarks\n * RAM cost: cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n get(rootX: number, rootY: number): ActiveFragment | undefined;\n\n /**\n * Remove fragment at location.\n * @remarks\n * RAM cost: cost: 0.15 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n remove(rootX: number, rootY: number): boolean;\n}\n\n/**\n * Collection of all functions passed to scripts\n * @public\n */\nexport interface NS extends Singularity {\n /**\n * Namespace for hacknet functions.\n * @remarks RAM cost: 4 GB\n */\n readonly hacknet: Hacknet;\n /**\n *\n * Namespace for bladeburner functions.\n * @remarks RAM cost: 0 GB\n */\n readonly bladeburner: Bladeburner;\n /**\n *\n * Namespace for codingcontract functions.\n * @remarks RAM cost: 0 GB\n */\n readonly codingcontract: CodingContract;\n /**\n *\n * Namespace for gang functions.\n * @remarks RAM cost: 0 GB\n */\n readonly gang: Gang;\n /**\n *\n * Namespace for sleeve functions.\n * @remarks RAM cost: 0 GB\n */\n readonly sleeve: Sleeve;\n /**\n *\n * Namespace for stock functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly stock: TIX;\n /**\n *\n * Namespace for formulas functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly formulas: Formulas;\n /**\n * Namespace for stanek functions.\n * RAM cost: 0 GB\n */\n readonly stanek: Stanek;\n /**\n * Namespace for corporation functions.\n * RAM cost: 0 GB\n */\n readonly corporation: Corporation;\n\n /**\n * Arguments passed into the script.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * Arguments passed into a script can be accessed using a normal\n * array using the [] operator (args[0], args[1], etc…).\n *\n * It is also possible to get the number of arguments that was passed into a script using: \'args.length\'\n * WARNING: Do not try to modify the args array. This will break the game.\n */\n readonly args: (string | number | boolean)[];\n\n /**\n * Steal a servers money.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Function that is used to try and hack servers to steal money and gain hacking experience.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level. In order to hack a server you must first gain root access to that server\n * and also have the required hacking level.\n *\n * A script can hack a server from anywhere. It does not need to be running on the same\n * server to hack that server. For example, you can create a script that hacks the `foodnstuff`\n * server and run that script on any server in the game.\n *\n * A successful `hack()` on a server will raise that server’s security level by 0.002.\n *\n * @example\n * ```ts\n * hack("foodnstuff");\n * hack("foodnstuff", { threads: 5 }); // Only use 5 threads to hack\n * ```\n * @param host - Hostname of the target server to hack.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount of money stolen if the hack is successful, and zero otherwise.\n */\n hack(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Spoof money in a servers bank account, increasing the amount available.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to increase the amount of money available on a server.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level. When `grow` completes, the money available on a target server will\n * be increased by a certain, fixed percentage. This percentage is determined by the\n * target server’s growth rate (which varies between servers) and security level. Generally,\n * higher-level servers have higher growth rates. The getServerGrowth() function can be used\n * to obtain a server’s growth rate.\n *\n * Like hack, `grow` can be called on any server, regardless of where the script is running.\n * The grow() command requires root access to the target server, but there is no required hacking\n * level to run the command. It also raises the security level of the target server by 0.004.\n *\n * @example\n * ```ts\n * grow("foodnstuff");\n * grow("foodnstuff", { threads: 5 }); // Only use 5 threads to grow\n * ```\n * @param host - Hostname of the target server to grow.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The number by which the money on the server was multiplied for the growth.\n */\n grow(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Reduce a server security level.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to attack a server’s security, lowering the server’s security level.\n * The runtime for this command depends on your hacking level and the target server’s security\n * level. This function lowers the security level of the target server by 0.05.\n *\n * Like hack and grow, `weaken` can be called on any server, regardless of\n * where the script is running. This command requires root access to the target server, but\n * there is no required hacking level to run the command.\n *\n * @example\n * ```ts\n * weaken("foodnstuff");\n * weaken("foodnstuff", { threads: 5 }); // Only use 5 threads to weaken\n * ```\n * @param host - Hostname of the target server to weaken.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount by which the target server’s security level was decreased. This is equivalent to 0.05 multiplied by the number of script threads.\n */\n weaken(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Predict the effect of weaken.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security decrease that would occur if a weaken with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @param cores - Optional. The number of cores of the server that would run weaken.\n * @returns The security decrease.\n */\n weakenAnalyze(threads: number, cores?: number): number;\n\n /**\n * Predict the effect of hack.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of script threads you need when running the hack command\n * to steal the specified amount of money from the target server.\n * If hackAmount is less than zero or greater than the amount of money available on the server,\n * then this function returns -1.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * //For example, let’s say the foodnstuff server has $10m and you run:\n * hackAnalyzeThreads("foodnstuff", 1e6);\n * //If this function returns 50, this means that if your next hack call is run on a script with 50 threads, it will steal $1m from the foodnstuff server.\n * ```\n * @param host - Hostname of the target server to analyze.\n * @param hackAmount - Amount of money you want to hack from the server.\n * @returns The number of threads needed to hack the server for hackAmount money.\n */\n hackAnalyzeThreads(host: string, hackAmount: number): number;\n\n /**\n * Get the percent of money stolen with a single thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the percentage of the specified server’s money you will steal with a single hack.\n * This value is returned in percentage form, not decimal\n * (Netscript functions typically return in decimal form, but not this one).\n *\n * @example\n * ```ts\n * //For example, assume the following returns 1:\n * hackAnalyze("foodnstuff");\n * //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N% of its total money.\n * ```\n * @param host - Hostname of the target server.\n * @returns The percentage of money you will steal from the target server with a single hack.\n */\n hackAnalyze(host: string): number;\n\n /**\n * Get the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a hack with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n hackAnalyzeSecurity(threads: number): number;\n\n /**\n * Get the chance of successfully hacking a server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the chance you have of successfully hacking the specified server.\n *\n * This returned value is in decimal form, not percentage.\n *\n * @param host - Hostname of the target server.\n * @returns The chance you have of successfully hacking the target server.\n */\n hackAnalyzeChance(host: string): number;\n\n /**\n * Calculate the number of grow thread needed to grow a server by a certain multiplier.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of “growths” needed in order to increase\n * the amount of money available on the specified server by the specified amount.\n * The specified amount is multiplicative and is in decimal form, not percentage.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\n * growthAnalyze("foodnstuff", 2);\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\n * ```\n * @param host - Hostname of the target server.\n * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..\n * @returns The amount of grow calls needed to grow the specified server by the specified amount\n */\n growthAnalyze(host: string, growthAmount: number, cores?: number): number;\n\n /**\n * Calculate the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a grow with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n growthAnalyzeSecurity(threads: number): number;\n\n /**\n * Suspends the script for n milliseconds.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @returns\n */\n sleep(millis: number): Promise;\n\n /**\n * Suspends the script for n milliseconds. Doesn\'t block with concurrent calls.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @returns\n */\n asleep(millis: number): Promise;\n\n /**\n * Prints a value or a variable to the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param msg - Value to be printed.\n */\n print(msg: any): void;\n\n /**\n * Prints a value or a variable to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param msg - Value to be printed.\n */\n tprint(msg: any): void;\n\n /**\n * Prints a raw value or a variable to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param format - format of the message\n * @param msg - Value to be printed.\n */\n tprintf(format: string, ...values: any[]): void;\n\n /**\n * Clears the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n */\n clearLog(): void;\n\n /**\n * Disables logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Logging can be disabled for all functions by passing `ALL` as the argument.\n *\n * Note that this does not completely remove all logging functionality.\n * This only stops a function from logging when the function is successful.\n * If the function fails, it will still log the reason for failure.\n *\n * Notable functions that cannot have their logs disabled: run,\n * exec, exit.\n *\n * @param fn - Name of function for which to disable logging.\n */\n disableLog(fn: string): void;\n\n /**\n * Enable logging for a certain function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Re-enables logging for the given function. If `ALL` is passed into this\n * function as an argument, then it will revert the effects of disableLog(`ALL`).\n *\n * @param fn - Name of function for which to enable logging.\n */\n enableLog(fn: string): void;\n\n /**\n * Checks the status of the logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param fn - Name of function to check.\n * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`)\n */\n isLogEnabled(fn: string): boolean;\n\n /**\n * Get all the logs of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns a script’s logs. The logs are returned as an array, where each line is an element in the array.\n * The most recently logged line is at the end of the array.\n * Note that there is a maximum number of lines that a script stores in its logs. This is configurable in the game’s options.\n * If the function is called with no arguments, it will return the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * //Get logs from foo.script on the current server that was run with no args\n * getScriptLogs("foo.script");\n * ```\n * @example\n * ```ts\n * //Open logs from foo.script on the foodnstuff server that was run with no args\n * getScriptLogs("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * getScriptLogs("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename of script to get logs from.\n * @param host - Optional. Hostname of the server that the script is on.\n * @param args - Arguments to identify which scripts to get logs for.\n * @returns Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array.\n */\n getScriptLogs(fn?: string, host?: string, ...args: any[]): string[];\n\n /**\n * Open the tail window of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Opens a script’s logs. This is functionally the same as the tail Terminal command.\n *\n * If the function is called with no arguments, it will open the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * //Open logs from foo.script on the current server that was run with no args\n * tail("foo.script");\n * ```\n * @example\n * ```ts\n * //Get logs from foo.script on the foodnstuff server that was run with no args\n * tail("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * tail("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename of the script being tailed. If omitted, the current script is tailed.\n * @param host - Optional. Hostname of the script being tailed. Defaults to the server this script is running on. If args are specified, this is not optional.\n * @param args - Arguments for the script being tailed.\n */\n tail(fn?: string, host?: string, ...args: any[]): void;\n\n /**\n * Get the list servers connected to a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array containing the hostnames or IPs of all servers that are one\n * node way from the specified target server. The hostnames/IPs in the returned\n * array are strings.\n *\n * @param host - Hostname of the server to scan.\n * @param hostnames - Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false).\n * @returns Returns an string of hostnames or IP.\n */\n scan(host: string, hostnames?: boolean): string[];\n\n /**\n * Runs NUKE.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * nuke("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n nuke(host: string): void;\n\n /**\n * Runs BruteSSH.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * brutessh("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n brutessh(host: string): void;\n\n /**\n * Runs FTPCrack.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * ftpcrack("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n ftpcrack(host: string): void;\n\n /**\n * Runs relaySMTP.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * relaysmtp("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n relaysmtp(host: string): void;\n\n /**\n * Runs HTTPWorm.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * httpworm("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n httpworm(host: string): void;\n\n /**\n * Runs SQLInject.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * sqlinject("foodnstuff");\n * ```\n * @remarks RAM cost: 0.05 GB\n * @param host - Hostname of the target server.\n */\n sqlinject(host: string): void;\n\n /**\n * Start another script on the current server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Run a script as a separate process. This function can only be used to run scripts located on the\n * current server (the server running the script that calls this function). Requires a significant\n * amount of RAM to run this command.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\n * run("foo.script");\n * ```\n * @example\n * ```ts\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\n * run("foo.script", 5);\n * ```\n * @example\n * ```ts\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\n * run("foo.script", 1, \'foodnstuff\');\n * ```\n * @param script - Filename of script to run.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n run(script: string, numThreads?: number, ...args: string[]): number;\n\n /**\n * Start another script on any server.\n * @remarks\n * RAM cost: 1.3 GB\n *\n * Run a script as a separate process on a specified server. This is similar to the run function\n * except that it can be used to run a script on any server, instead of just the current server.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\n * exec("generic-hack.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\n * exec("generic-hack.script", "joesguns", 10);\n * ```\n * @example\n * ```ts\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\n * exec("foo.script", "foodnstuff", 5, 1, "test");\n * ```\n * @param script - Filename of script to execute.\n * @param host - Hostname of the `target server` on which to execute the script.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n exec(script: string, host: string, numThreads?: number, ...args: string[]): number;\n\n /**\n * Terminate current script and start another in 10s.\n * @remarks\n * RAM cost: 2 GB\n *\n * Terminates the current script, and then after a delay of about 10 seconds it will execute the\n * newly-specified script. The purpose of this function is to execute a new script without being\n * constrained by the RAM usage of the current one. This function can only be used to run scripts\n * on the local server.\n *\n * Because this function immediately terminates the script, it does not have a return value.\n *\n * @example\n * ```ts\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\n * spawn(\'foo.script\', 10, \'foodnstuff\', 90);\n * ```\n * @param script - Filename of script to execute.\n * @param numThreads - Number of threads to spawn new script with. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run.\n */\n spawn(script: string, numThreads?: number, ...args: string[]): void;\n\n /**\n * Terminate another script.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills the script on the target server specified by the script’s name and arguments.\n * Remember that scripts are uniquely identified by both their name and arguments.\n * For example, if `foo.script` is run with the argument 1, then this is not the same as\n * `foo.script` run with the argument 2, even though they have the same code.\n *\n * @example\n * ```ts\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * kill("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * kill("foo.script", getHostname());\n * ```\n * @example\n * ```ts\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @param script - Filename or pid of the script to kill\n * @param host - Hostname of the server on which to kill the script.\n * @param args - Arguments to identify which script to kill.\n * @returns True if the script is successfully killed, and false otherwise.\n */\n kill(script: string | number, host: string, ...args: string[]): boolean;\n\n /**\n * Terminate all scripts on a server.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills all running scripts on the specified server. This function returns true\n * if any scripts were killed, and false otherwise. In other words, it will return\n * true if there are any scripts running on the target server.\n *\n * @param host - IP or hostname of the server on which to kill all scripts.\n * @returns True if any scripts were killed, and false otherwise.\n */\n killall(host: string): boolean;\n\n /**\n * Terminates the current script immediately.\n * @remarks\n * RAM cost: 0 GB\n */\n exit(): void;\n\n /**\n * Copy file between servers.\n * @remarks\n * RAM cost: 0.6 GB\n *\n * Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string\n * specifying a single file to copy, or an array of strings specifying multiple files to copy.\n *\n * @example\n * ```ts\n * //Copies foo.lit from the helios server to the home computer:\n * scp("foo.lit", "helios", "home");\n * ```\n * @example\n * ```ts\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * scp(files, "rothman-uni", "home");\n * ```\n * @param files - Filename or an array of filenames of script/literature files to copy.\n * @param source - Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server.\n * @param destination - Host of the destination server, which is the server to which the file will be copied.\n * @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.\n */\n scp(files: string | string[], source: string, destination: string): Promise;\n\n /**\n * List files on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with the filenames of all files on the specified server\n * (as strings). The returned array is sorted in alphabetic order.\n *\n * @param host - Host of the target server.\n * @param grep - A substring to search for in the filename.\n * @returns Array with the filenames of all files on the specified server.\n */\n ls(host: string, grep?: string): string[];\n\n /**\n * List running scripts on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with general information about all scripts running on the specified target server.\n *\n * @example\n * ```ts\n * //(using NetscriptJS (Netscript 2.0))\n * export async function main(ns) {\n * const ps = ns.ps("home");\n * for (let i = 0; i < ps.length; ++i) {\n * ns.tprint(ps[i].filename + \' \' + ps[i].threads);\n * ns.tprint(ps[i].args);\n * }\n * }\n * ```\n * @param host - Host address of the target server. If not specified, it will be the current server’s IP by default.\n * @returns Array with general information about all scripts running on the specified target server.\n */\n ps(host?: string): ProcessInfo[];\n\n /**\n * Check if your have root access on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns a boolean indicating whether or not the player has root access to the specified target server.\n *\n * @example\n * ```ts\n * if (hasRootAccess("foodnstuff") == false) {\n * nuke("foodnstuff");\n * }\n * ```\n * @param host - Host of the target server\n * @returns True if player has root access to the specified target server, and false otherwise.\n */\n hasRootAccess(host: string): boolean;\n\n /**\n * Returns a string with the hostname of the server that the script is running on.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Hostname of the server that the script is on.\n */\n getHostname(): string;\n\n /**\n * Returns the player’s current hacking level.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Player’s current hacking level\n */\n getHackingLevel(): number;\n\n /**\n * Get hacking related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacking related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * //Example of how this can be used:\n * mults = getHackingMultipliers();\n * print(mults.chance);\n * print(mults.growth);\n * ```\n * @returns Object containing the Player’s hacking related multipliers.\n */\n getHackingMultipliers(): HackingMultipliers;\n\n /**\n * Get hacknet related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacknet related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * //Example of how this can be used:\n * mults = getHacknetMultipliers();\n * print(mults.production);\n * print(mults.purchaseCost);\n * ```\n * @returns Object containing the Player’s hacknet related multipliers.\n */\n getHacknetMultipliers(): HacknetMultipliers;\n\n /**\n * Returns a server object for the given server. Defaults to the running script\'s server if host is not specified.\n *\n * @remarks\n * RAM cost: 2 GB\n * @param host - Optional. Hostname for the requested server object.\n * @returns The requested server object.\n */\n getServer(host?: string): Server;\n\n /**\n * Get money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of money available on a server.\n * Running this function on the home computer will return the player’s money.\n *\n * @example\n * ```ts\n * getServerMoneyAvailable("foodnstuff");\n * getServerMoneyAvailable("home"); //Returns player\'s money\n * ```\n * @param host - Host of target server\n * @returns Amount of money available on the server.\n */\n getServerMoneyAvailable(host: string): number;\n\n /**\n * Get maximum money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the maximum amount of money that can be available on a server.\n *\n * @param host - Host of target server.\n * @returns Maximum amount of money available on the server.\n */\n getServerMaxMoney(host: string): number;\n\n /**\n * Get a server growth parameter.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the server’s instrinsic “growth parameter”. This growth\n * parameter is a number between 1 and 100 that represents how\n * quickly the server’s money grows. This parameter affects the\n * percentage by which the server’s money is increased when using the\n * grow function. A higher growth parameter will result in a\n * higher percentage increase from grow.\n *\n * @param host - Host of target server.\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\n */\n getServerGrowth(host: string): number;\n\n /**\n * Get server security level.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the security level of the target server. A server’s security\n * level is denoted by a number, typically between 1 and 100\n * (but it can go above 100).\n *\n * @param host - Host of target server.\n * @returns Security level of the target server.\n */\n getServerSecurityLevel(host: string): number;\n\n /**\n * Returns the minimum security level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns Minimum security level of the target server.\n */\n getServerMinSecurityLevel(host: string): number;\n\n /**\n * @deprecated useless\n * @remarks\n * RAM cost: 0.1 GB\n * Returns the base security level of the target server. This is the security\n * level that the server starts out with. This is different than\n * getServerSecurityLevel because getServerSecurityLevel returns\n * the current security level of a server, which can constantly change due to\n * hack, grow, and weaken, calls on that server.\n * The base security level will stay the same until you reset by\n * installing an Augmentation(s).\n *\n * @param host - Host of target server.\n * @returns Base security level of the target server.\n */\n getServerBaseSecurityLevel(host: string): number;\n\n /**\n * @deprecated use getServerMaxRam / getServerUsedRam\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns an array with two elements that gives information about a server’s memory (RAM).\n * The first element in the array is the amount of RAM that the server has total (in GB).\n * The second element in the array is the amount of RAM that is currently being used on\n * the server (in GB).\n *\n * @example\n * ```ts\n * res = getServerRam("helios");\n * totalRam = res[0];\n * ramUsed = res[1];\n * ```\n * @param host - Host of target server.\n * @returns Array with total and used memory on the specified server.\n */\n getServerRam(host: string): [number, number];\n\n /**\n * Get the max RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns max ram\n */\n getServerMaxRam(host: string): number;\n /**\n * Get the used RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns used ram\n */\n getServerUsedRam(host: string): number;\n\n /**\n * Returns the required hacking level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The required hacking level of the target server.\n */\n getServerRequiredHackingLevel(host: string): number;\n\n /**\n * Returns the number of open ports required to successfully run NUKE.exe on the specified server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The number of open ports required to successfully run NUKE.exe on the specified server.\n */\n getServerNumPortsRequired(host: string): number;\n\n /**\n * Returns a boolean denoting whether or not the specified server exists.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns True if specified server exists, and false otherwise.\n */\n serverExists(host: string): boolean;\n\n /**\n * Check if a file exists.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified file exists on the target server.\n * The filename for scripts is case-sensitive, but for other types of files it is not.\n * For example, fileExists(“brutessh.exe”) will work fine, even though the actual program\n * is named \'BruteSSH.exe\'.\n *\n * If the hostname/ip argument is omitted, then the function will search through the current\n * server (the server running the script that calls this function) for the file.\n *\n * @example\n * ```ts\n * //The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\n * fileExists("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\n * fileExists("ftpcrack.exe");\n * ```\n * @param filename - Filename of file to check.\n * @param host - Host of target server. This is optional. If it is not specified then the function will use the current server as the target server.\n * @returns True if specified file exists, and false otherwise.\n */\n fileExists(filename: string, host?: string): boolean;\n\n /**\n * Check if a script is running.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified script is running on the target server.\n * Remember that a script is uniquely identified by both its name and its arguments.\n *\n * @example\n * ```ts\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\n * isRunning("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\n * isRunning("foo.script", getHostname());\n * ```\n * @example\n * ```ts\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\n * isRunning("foo.script", "joesguns", 1, 5, "test");\n * ```\n * @param script - Filename of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @param args - Arguments to specify/identify which scripts to search for.\n * @returns True if specified script is running on the target server, and false otherwise.\n */\n isRunning(script: string, host: string, ...args: string[]): boolean;\n\n /**\n * Get general info about a running script.\n * @remarks\n * RAM cost: 0.3 GB\n * @returns info about a running script\n */\n getRunningScript(filename: string | number, hostname: string, ...args: (string | number)[]): RunningScript;\n\n /**\n * Get cost of purchasing a server.\n * @remarks\n * RAM cost: 0.25 GB\n *\n * Returns the cost to purchase a server with the specified amount of ram.\n *\n * @example\n * ```ts\n * for (i = 1; i <= 20; i++) {\n * tprint(i + " -- " + getPurchasedServerCost(Math.pow(2, i)));\n * }\n * ```\n * @param ram - Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The cost to purchase a server with the specified amount of ram.\n */\n getPurchasedServerCost(ram: number): number;\n\n /**\n * Purchase a server.\n * @remarks\n * 2.25 GB\n *\n * Purchased a server with the specified hostname and amount of RAM.\n *\n * The hostname argument can be any data type, but it will be converted to a string\n * and have whitespace removed. Anything that resolves to an empty string will cause\n * the function to fail. If there is already a server with the specified hostname,\n * then the function will automatically append a number at the end of the hostname\n * argument value until it finds a unique hostname. For example, if the script calls\n * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will\n * automatically change the hostname to `foo-0`. If there is already a server with the\n * hostname `foo-0`, then it will change the hostname to `foo-1`, and so on.\n *\n * Note that there is a maximum limit to the amount of servers you can purchase.\n *\n * Returns the hostname of the newly purchased server as a string. If the function\n * fails to purchase a server, then it will return an empty string. The function will\n * fail if the arguments passed in are invalid, if the player does not have enough\n * money to purchase the specified server, or if the player has exceeded the maximum\n * amount of servers.\n *\n * @example\n * ```ts\n * ram = 64;\n * hn = "pserv-";\n * for (i = 0; i < 5; ++i) {\n * purchaseServer(hn + i, ram);\n * }\n * ```\n * @param hostname - Host of the purchased server.\n * @param ram - Amount of RAM of the purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The hostname of the newly purchased server.\n */\n purchaseServer(hostname: string, ram: number): string;\n\n /**\n * Delete a purchased server.\n * @remarks\n * 2.25 GB\n *\n * Deletes one of your purchased servers, which is specified by its hostname.\n *\n * The hostname argument can be any data type, but it will be converted to a string.\n * Whitespace is automatically removed from the string. This function will not delete a\n * server that still has scripts running on it.\n *\n * @param host - Host of the server to delete.\n * @returns True if successful, and false otherwise.\n */\n deleteServer(host: string): boolean;\n\n /**\n * Returns an array with the hostnames of all of the servers you have purchased.\n *\n * @remarks 2.25 GB\n * @returns Returns an array with the hostnames of all of the servers you have purchased.\n */\n getPurchasedServers(): string[];\n\n /**\n * Returns the maximum number of servers you can purchase.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum number of servers you can purchase.\n */\n getPurchasedServerLimit(): number;\n\n /**\n * Returns the maximum RAM that a purchased server can have.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum RAM that a purchased server can have.\n */\n getPurchasedServerMaxRam(): number;\n\n /**\n * Write data to a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function can be used to either write data to a text file (.txt).\n *\n * This function will write data to that text file. If the specified text file does not exist,\n * then it will be created. The third argument mode, defines how the data will be written to\n * the text file. If *mode is set to “w”, then the data is written in “write” mode which means\n * that it will overwrite all existing data on the text file. If mode is set to any other value\n * then the data will be written in “append” mode which means that the data will be added at the\n * end of the text file.\n *\n * @param handle - Port or text file that will be written to.\n * @param data - Data to write.\n * @param mode - Defines the write mode. Only valid when writing to text files.\n */\n write(handle: string, data?: string[] | number, mode?: "w" | "a"): Promise;\n\n /**\n * Attempt to write to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Attempts to write data to the specified Netscript Port.\n * If the port is full, the data will not be written.\n * Otherwise, the data will be written normally.\n *\n * @param port - Port or text file that will be written to.\n * @param data - Data to write.\n * @returns True if the data is successfully written to the port, and false otherwise.\n */\n tryWritePort(port: number, data: string[] | number): Promise;\n\n /**\n * Read content of a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to read data from a port or from a text file (.txt).\n *\n * This function will return the data in the specified text\n * file. If the text file does not exist, an empty string will be returned.\n *\n * @param handle - Port or text file to read from.\n * @returns Data in the specified text file or port.\n */\n read(handle: string): any;\n\n /**\n * Get a copy of the data from a port without popping it.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to peek at the data from a port. It returns the\n * first element in the specified port without removing that element. If\n * the port is empty, the string “NULL PORT DATA” will be returned.\n *\n * @param port - Port to peek. Must be an integer between 1 and 20.\n * @returns Data in the specified port.\n */\n peek(port: number): any;\n\n /**\n * Clear data from a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * Delete all data from that text file.\n *\n * @param handle - Text file to clear.\n */\n clear(handle: string): void;\n\n /**\n * Clear data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Deleta all data from the underlying queue.\n *\n * @param handle - Port to clear.\n */\n clearPort(handle: number): void;\n\n /**\n * Write data to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Write data to that netscript port.\n * @returns The data popped off the queue if it was full.\n */\n writePort(port: number, data: string | number): Promise;\n /**\n * Read data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Read data from that port. A port is a serialized queue.\n * This function will remove the first element from that queue and return it.\n * If the queue is empty, then the string “NULL PORT DATA” will be returned.\n * @returns the data read.\n */\n readPort(port: number): any;\n\n /**\n * Get all data on a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Get a handle to a Netscript Port.\n *\n * WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.\n *\n * @see https://bitburner.readthedocs.io/en/latest/netscript/netscriptmisc.html#netscript-ports\n * @param port - Port number. Must be an integer between 1 and 20.\n * @returns Data in the specified port.\n */\n getPortHandle(port: number): any[];\n\n /**\n * Delete a file.\n * @remarks\n * RAM cost: 1 GB\n *\n * Removes the specified file from the current server. This function works for every file\n * type except message (.msg) files.\n *\n * @param name - Filename of file to remove. Must include the extension.\n * @param host - Host Address of the server on which to delete the file. Optional. Defaults to current server.\n * @returns True if it successfully deletes the file, and false otherwise.\n */\n rm(name: string, host?: string): boolean;\n\n /**\n * Check if any script with a filename is running.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns a boolean indicating whether any instance of the specified script is running\n * on the target server, regardless of its arguments.\n *\n * This is different than the isRunning function because it does not try to\n * identify a specific instance of a running script by its arguments.\n *\n * @example\n * ```ts\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\n * scriptRunning("foo.script", "foodnstuff");\n * ```\n * @example\n * ```ts\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\n * scriptRunning("foo.script", getHostname());\n * ```\n * @param script - Filename of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @returns True if the specified script is running, and false otherwise.\n */\n scriptRunning(script: string, host: string): boolean;\n\n /**\n * Kill all scripts with a filename.\n * @remarks\n * RAM cost: 1 GB\n *\n * Kills all scripts with the specified filename on the target server specified by hostname,\n * regardless of arguments.\n *\n * @param script - Filename of script to kill. This is case-sensitive.\n * @param host - Host of target server.\n * @returns true if one or more scripts were successfully killed, and false if none were.\n */\n scriptKill(script: string, host: string): boolean;\n\n /**\n * Returns the current script name.\n *\n * @remarks RAM cost: 0 GB\n * @returns Current script name.\n */\n getScriptName(): string;\n\n /**\n * Get the ram cost of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of RAM required to run the specified script on the target server.\n * Returns 0 if the script does not exist.\n *\n * @param script - Filename of script. This is case-sensitive.\n * @param host - Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.\n * @returns Amount of RAM required to run the specified script on the target server, and 0 if the script does not exist.\n */\n getScriptRam(script: string, host?: string): number;\n\n /**\n * Get the execution time of a hack() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the hack time would be at different hacking levels.\n *\n * @param host - Host of target server.\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\n * @returns Returns the amount of time in milliseconds it takes to execute the hack Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getHackTime(host: string): number;\n\n /**\n * Get the execution time of a grow() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the grow Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the grow time would be at different hacking levels.\n *\n * @param host - Host of target server.\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getGrowTime(host: string): number;\n\n /**\n * Get the execution time of a weaken() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the weaken() Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the weaken time would be at different hacking levels.\n *\n * @param host - Host of target server.\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getWeakenTime(host: string): number;\n\n /**\n * Get the income of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of income the specified script generates while online\n * (when the game is open, does not apply for offline income). Remember that\n * a script is uniquely identified by both its name and its arguments. So for\n * example if you ran a script with the arguments “foodnstuff” and “5” then\n * in order to use this function to get that script’s income you must specify\n * those same arguments in the same order in this function call.\n *\n * This function can also be called with no arguments.\n * If called with no arguments, then this function will return an array of two values.\n * The first value is the total income (dollar / second) of all of your active scripts\n * (scripts that are currently running on any server).\n * The second value is the total income (dollar / second) that you’ve earned from scripts\n * since you last installed Augmentations.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of income the specified script generates while online.\n */\n getScriptIncome(script: string, host: string, ...args: string[]): number | [number, number];\n\n /**\n * Get the exp gain of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of hacking experience the specified script generates while online\n * (when the game is open, does not apply for offline experience gains). Remember that a\n * script is uniquely identified by both its name and its arguments.\n *\n * This function can also return the total experience gain rate of all of your active\n * scripts by running the function with no arguments.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of hacking experience the specified script generates while online.\n */\n getScriptExpGain(script: string, host: string, ...args: string[]): number;\n\n /**\n * Returns the amount of time in milliseconds that have passed since you last installed Augmentations.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Time in milliseconds that have passed since you last installed Augmentations.\n */\n getTimeSinceLastAug(): number;\n\n /**\n * Format a string.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n sprintf(format: string, ...args: string[]): string;\n\n /**\n * Format a string with an array of arguments.\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n vsprintf(format: string, args: string[]): string;\n\n /**\n * Format a number\n * @remarks\n * RAM cost: 0 GB\n *\n * Converts a number into a string with the specified formatter.\n * This uses the numeraljs library, so the formatters must be compatible with that.\n * This is the same function that the game itself uses to display numbers.\n *\n * see: http://numeraljs.com/\n * @param n - Number to format.\n * @param format - Formatter.\n * @returns Formated number.\n */\n nFormat(n: number, format: string): number;\n\n /**\n * Format time to readable string\n * @remarks\n * RAM cost: 0 GB\n *\n * @param milliseconds - Number of millisecond to format.\n * @param milliPrecision - Format time with subsecond precision, defaults to false.\n * @returns The formatted time.\n */\n tFormat(milliseconds: number, milliPrecision?: boolean): string;\n\n /**\n * Prompt the player with a Yes/No modal.\n * @remarks\n * RAM cost: 0 GB\n *\n * Prompts the player with a dialog box with two options: “Yes” and “No”.\n * This function will return true if the player click “Yes” and false if\n * the player clicks “No”. The script’s execution is halted until the player\n * selects one of the options.\n *\n * @param txt - Text to appear in the prompt dialog box.\n * @returns True if the player click “Yes” and false if the player clicks “No”.\n */\n prompt(txt: string): Promise;\n\n /**\n * Open up a message box.\n * @param msg - Message to alert.\n */\n alert(msg: any): void;\n\n /**\n * Queue a toast (bottom-right notification).\n * @param msg - Message in the toast.\n * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success.\n */\n toast(msg: any, variant?: string): void;\n\n /**\n * Download a file from the internet.\n * @remarks\n * RAM cost: 0 GB\n *\n * Retrieves data from a URL and downloads it to a file on the specified server.\n * The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt).\n * If the file already exists, it will be overwritten by this command.\n * Note that it will not be possible to download data from many websites because they\n * do not allow cross-origin resource sharing (CORS).\n *\n * IMPORTANT: This is an asynchronous function that returns a Promise.\n * The Promise’s resolved value will be a boolean indicating whether or not the data was\n * successfully retrieved from the URL. Because the function is async and returns a Promise,\n * it is recommended you use wget in NetscriptJS (Netscript 2.0).\n *\n * In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep).\n * wget will still work in Netscript 1.0, but the functions execution will not be synchronous\n * (i.e. it may not execute when you expect/want it to).\n * Furthermore, since Promises are not supported in ES5,\n * you will not be able to process the returned value of wget in Netscript 1.0.\n *\n * @example\n * ```ts\n * wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt");\n * ```\n * @param url - URL to pull data from.\n * @param target - Filename to write data to. Must be script or text file.\n * @param host - Optional hostname/ip of server for target file.\n * @returns True if the data was successfully retrieved from the URL, false otherwise.\n */\n wget(url: string, target: string, host?: string): Promise;\n\n /**\n * Returns the amount of Faction favor required to be able to donate to a faction.\n *\n * @remarks RAM cost: 0.1 GB\n * @returns Amount of Faction favor required to be able to donate to a faction.\n */\n getFavorToDonate(): number;\n\n /**\n * Get the current Bitnode multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the current BitNode multipliers.\n * This function requires Source-File 5 in order to run.\n * The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%).\n * The multipliers represent the difference between the current BitNode and\n * the original BitNode (BitNode-1).\n *\n * For example, if the CrimeMoney multiplier has a value of 0.1, then that means\n * that committing crimes in the current BitNode will only give 10% of the money\n * you would have received in BitNode-1.\n *\n * @example\n * ```ts\n * mults = getBitNodeMultipliers();\n * print(mults.ServerMaxMoney);\n * print(mults.HackExpGain);\n * ```\n * @returns Object containing the current BitNode multipliers.\n */\n getBitNodeMultipliers(): BitNodeMultipliers;\n\n /**\n * Get a list of acquired Source-Files.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns an array of source files\n *\n * @returns Array containing an object with number and level of the source file.\n */\n getOwnedSourceFiles(): SourceFileLvl[];\n\n /**\n * Get information about the player.\n * @returns Player info\n */\n getPlayer(): Player;\n\n /**\n * Add callback function when the script dies\n * @remarks\n * RAM cost: 0 GB\n *\n * NS2 exclusive\n *\n * Add callback to be executed when the script dies.\n */\n atExit(f: () => void): void;\n\n /**\n * Parse command line flags.\n * @remarks\n * RAM cost: 0 GB\n *\n * Allows unix like flag parsing.\n * @example\n * ```ts\n * // example.script\n * var data = flags([\n * [\'delay\', 0], // a default number means this flag is a number\n * [\'server\', \'foodnstuff\'], // a default string means this flag is a string\n * [\'exclude\', []], // a default array means this flag is a default array of string\n * [\'help\', false], // a default boolean means this flag is a boolean\n * ]);\n * tprint(data);\n *\n * // [home ~/]> run example.script\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false}\n * // [home ~/]> run example.script --delay 3000\n * // {"_":[],"server":"foodnstuff","exclude":[],"help":false,"delay":3000}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi\n * // {"_":[],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world\n * // {"_":["hello","world"],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b\n * // {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]}\n * // [home ~/]> run example.script --help\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true}\n * ```\n */\n flags(schema: [string, string | number | boolean | string[]][]): any;\n}\n\n/**\n * Corporation Office API\n * @remarks\n * Requires the Office API upgrade from your corporation.\n * @public\n */\nexport interface OfficeAPI {\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - name of the employee\n * @param job - Name of the job.\n * @returns A promise that is fulfilled when the assignment is complete.\n */\n assignJob(divisionName: string, cityName: string, employeeName: string, job: string): Promise;\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns The newly hired employee, if any\n */\n hireEmployee(divisionName: string, cityName: string): Employee | undefined;\n /**\n * Upgrade office size.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param size - Amount of positions to open\n */\n upgradeOfficeSize(divisionName: string, cityName: string, size: number): void;\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param costPerEmployee - Amount to spend per employee.\n * @returns Amount of happiness increased.\n */\n throwParty(divisionName: string, cityName: string, costPerEmployee: number): Promise;\n /**\n * Buy coffee for your employees\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns A promise that is fulfilled when the coffee is served.\n */\n buyCoffee(divisionName: string, cityName: string): Promise;\n /**\n * Hire AdVert.\n * @param divisionName - Name of the division\n */\n hireAdVert(divisionName: string): void;\n /**\n * Hire AdVert.\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n */\n research(divisionName: string, researchName: string): void;\n /**\n * Get data about an office\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns Office data\n */\n getOffice(divisionName: string, cityName: string): Office;\n /**\n * Get data about an employee\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - Name of the employee\n * @returns Employee data\n */\n getEmployee(divisionName: string, cityName: string, employeeName: string): Employee;\n}\n\n/**\n * Corporation Warehouse API\n * @remarks\n * Requires the Warehouse API upgrade from your corporation.\n * @public\n */\nexport interface WarehouseAPI {\n /**\n * Set material sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n */\n sellMaterial(divisionName: string, cityName: string, materialName: string, amt: string, price: string): void;\n /**\n * Set product sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n * @param all - Sell in all city\n */\n sellProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n amt: string,\n price: string,\n all: boolean,\n ): void;\n /**\n * Discontinue a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n */\n discontinueProduct(divisionName: string, productName: string): void;\n /**\n * Set smart supply\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param enabled - smart supply enabled\n */\n setSmartSupply(divisionName: string, cityName: string, enabled: boolean): void;\n /**\n * Set material buy data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount of material to buy\n */\n buyMaterial(divisionName: string, cityName: string, materialName: string, amt: number): void;\n /**\n * Get warehouse data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns warehouse data\n */\n getWarehouse(divisionName: string, cityName: string): Warehouse;\n /**\n * Get product data\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @returns product data\n */\n getProduct(divisionName: string, productName: string): Product;\n /**\n * Get material data\n * @param divisionName - Name of the division\n * @param materialName - Name of the material\n * @returns material data\n */\n getMaterial(divisionName: string, cityName: string, materialName: string): Material;\n /**\n * Set market TA 1 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA1(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 2 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA2(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 1 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA1(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set market TA 2 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA2(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set material export data\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n exportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Cancel material export\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n cancelExportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Purchase warehouse for a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n purchaseWarehouse(divisionName: string, cityName: string): void;\n /**\n * Upgrade warehouse\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n upgradeWarehouse(divisionName: string, cityName: string): void;\n /**\n * Create a new product\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param designInvest - Amount to invest for the design of the product.\n * @param marketingInvest - Amount to invest for the marketing of the product.\n */\n makeProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n ): void;\n}\n\n/**\n * Corporation API\n * @public\n */\nexport interface Corporation extends WarehouseAPI, OfficeAPI {\n /**\n * Get corporation data\n * @returns Corporation data\n */\n getCorporation(): CorporationInfo;\n /**\n * Get division data\n * @param divisionName - Name of the division\n * @returns Division data\n */\n getDivision(divisionName: string): Division;\n /**\n * Expand to a new industry\n * @param industryType - Name of the industry\n * @param divisionName - Name of the division\n */\n expandIndustry(industryType: string, divisionName: string): void;\n /**\n * Expand to a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n expandCity(divisionName: string, cityName: string): void;\n /**\n * Unlock an upgrade.\n * @param upgradeName - Name of the upgrade\n */\n unlockUpgrade(upgradeName: string): void;\n /**\n * Level an upgrade.\n * @param upgradeName - Name of the upgrade\n */\n levelUpgrade(upgradeName: string): void;\n /**\n * Issue dividends\n * @param percent - Percent of profit to issue as dividends.\n */\n issueDividends(percent: number): void;\n}\n\n/**\n * General info about a corporation\n * @public\n */\ninterface CorporationInfo {\n /** Name of the corporation */\n name: string;\n /** Funds available */\n funds: number;\n /** Revenue per second this cycle */\n revenue: number;\n /** Expenses per second this cycle */\n expenses: number;\n /** Is the company is public */\n public: boolean;\n /** Total number of shares issues by this corporation */\n totalShares: number;\n /** Amount of share owned */\n numShares: number;\n /** Cooldown until shares can be sold again */\n shareSaleCooldown: number;\n /** Amount of shares issued */\n issuedShares: number;\n /** Price of the shares */\n sharePrice: number;\n /** State of the corporation, like PRODUCTION or EXPORT */\n state: string;\n}\n\n/**\n * Employee in an office\n * @public\n */\ninterface Employee {\n /** Name of the employee */\n name: string;\n /** Morale */\n mor: number;\n /** Happiness */\n hap: number;\n /** Energy */\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n /** Salary */\n sal: number;\n /** City */\n loc: string;\n /** Current job */\n pos: string;\n}\n\n/**\n * Product in a warehouse\n * @public\n */\ninterface Product {\n /** Name of the product */\n name: string;\n /** Demand for the product */\n dmd: number;\n /** Competition for the product */\n cmp: number;\n /** Production cost */\n pCost: number;\n /** Sell cost, can be "MP+5" */\n sCost: string | number;\n}\n\n/**\n * Material in a warehouse\n * @public\n */\ninterface Material {\n /** Name of the material */\n name: string;\n /** Amount of material */\n qty: number;\n /** Quality of the material */\n qlt: number;\n}\n\n/**\n * Warehouse for a division in a city\n * @public\n */\ninterface Warehouse {\n /** Amount of size upgrade bought */\n level: number;\n /** City in which the warehouse is located */\n loc: string;\n /** Total space in the warehouse */\n size: number;\n /** Used space in the warehouse */\n sizeUsed: number;\n}\n\n/**\n * Office for a division in a city.\n * @public\n */\ninterface Office {\n /** City of the office */\n loc: string;\n /** Maximum number of employee */\n size: number;\n /** Minimum amount of energy of the employees */\n minEne: number;\n /** Maximum amount of energy of the employees */\n maxEne: number;\n /** Minimum happiness of the employees */\n minHap: number;\n /** Maximum happiness of the employees */\n maxHap: number;\n /** Maximum morale of the employees */\n maxMor: number;\n /** Name of all the employees */\n employees: string[];\n /** Positions of the employees */\n employeeProd: EmployeeJobs;\n}\n\n/**\n * Object representing the number of employee in each job.\n * @public\n */\ninterface EmployeeJobs {\n Operations: number;\n Engineer: number;\n Business: number;\n Management: number;\n "Research & Development": number;\n Training: number;\n Unassigned: number;\n}\n\n/**\n * Corporation division\n * @public\n */\ninterface Division {\n /** Name of the division */\n name: string;\n /** Type of division, like Aggriculture */\n type: string;\n /** Awareness of the division */\n awareness: number;\n /** Popularity of the division */\n popularity: number;\n /** Production multiplier */\n prodMult: number;\n /** Amount of research in that division */\n research: number;\n /** Revenue last cycle */\n lastCycleRevenue: number;\n /** Expenses last cycle */\n lastCycleExpenses: number;\n /** Revenue this cycle */\n thisCycleRevenue: number;\n /** Expenses this cycle */\n thisCycleExpenses: number;\n /** All research bought */\n upgrades: number[];\n /** Cities in which this division has expanded */\n cities: string[];\n}\n'},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(638),r=a(0),i=a(1),o=a(32);function s(e){const t=function(e,t){let a=-1;for(let n=0;n{if(n<=t+1)return r.createElement(i.a,{key:n},"[",a.fulfilled(e.player)?"x":" ","] ",a.title)});return r.createElement(r.Fragment,null,r.createElement(i.a,{variant:"h4"},"Milestones"),r.createElement(o.a,{mx:2},r.createElement(i.a,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(i.a,null,"Completing fl1ght.exe"),a))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(1),o=a(274),s=a(66),l=a(127),c=a(126),u=a(154),m=a(32),h=a(224),p=a(1066),d=a(294),f=a(502),g=a(487),y=a(362),b=a.n(y);function E({terminal:e}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},e.getProgressText())}const k=Object(c.a)(e=>Object(u.a)({nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"},success:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.colors.success},error:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.error.main},primary:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.primary.main},info:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.info.main},warning:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:e.spacing(0),color:e.palette.warning.main}}));function v({terminal:e,router:t,player:a}){const c=Object(n.useRef)(null),u=Object(n.useState)(0)[1],[y,v]=Object(n.useState)(0);function _(){const e=c.current;null!==e&&setTimeout(()=>e.scrollIntoView(!0),50)}Object(n.useEffect)(()=>d.b.subscribe(b.a.debounce(async()=>{u(e=>e+1)},25,{maxWait:50})),[]),Object(n.useEffect)(()=>d.a.subscribe(b.a.debounce(async()=>{v(e=>e+1)},25,{maxWait:50})),[]),_(),Object(n.useEffect)(()=>{setTimeout(_,50)},[]);const w=k();return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{width:"100%",minHeight:"100vh",display:"flex",alignItems:"flex-end"},r.a.createElement(o.a,{key:y,id:"terminal",classes:{root:w.list}},e.outputHistory.map((t,n)=>{return t instanceof h.b?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:(o=t.color,"error"===o?w.error:"success"===o?w.success:"info"===o?w.info:"warn"===o?w.warning:w.primary)},paragraph:!1},t.text)):t instanceof h.c?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:w.preformatted},paragraph:!1},t.raw)):t instanceof h.a?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,null,t.dashes,"> "),r.a.createElement(l.a,{classes:{root:w.preformatted},color:"secondary",paragraph:!1,onClick:()=>e.connectToServer(a,t.hostname)},r.a.createElement(i.a,null,t.hostname))):void 0;var o}),null!==e.action&&r.a.createElement(s.a,{classes:{root:w.nopadding}},r.a.createElement(E,{terminal:e})," ")),r.a.createElement("div",{ref:c})),r.a.createElement(m.a,{position:"sticky",bottom:0,width:"100%",px:0},r.a.createElement(p.a,{player:a,router:t,terminal:e})),r.a.createElement(f.b,null),r.a.createElement(g.b,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(1),o=a(126),s=a(154),l=a(82),c=a(26),u=a(96),m=a(1067),h=a(1070),p=a(13);const d=Object(o.a)(e=>Object(s.a)({textfield:{margin:e.spacing(0)},input:{backgroundColor:"#000"},nopadding:{padding:e.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:e.spacing(0)},list:{padding:e.spacing(0),height:"100%"}}));let f="";function g({terminal:e,router:t,player:a}){const o=Object(n.useRef)(null),[s,g]=Object(n.useState)(f),[y,b]=Object(n.useState)([]),E=d();function k(e){f=e,g(e)}function v(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null!==n)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(let e=n-2;e>=0;--e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e+1,e+1);t.setSelectionRange(0,0);break;case"nextchar":t.setSelectionRange(n+1,n+1);break;case"nextword":for(let e=n+1;e<=a;++e)if(" "===t.value.charAt(e))return void t.setSelectionRange(e,e);t.setSelectionRange(a,a);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}return Object(n.useEffect)(()=>{function n(n){if(e.contractOpen)return;if(null!==e.action&&n.keyCode===u.a.C&&n.ctrlKey)return void e.finishAction(t,a,!0);const r=o.current;n.ctrlKey||n.metaKey||n.keyCode===u.a.C&&(n.ctrlKey||n.metaKey)||r&&r.focus()}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{title:y.length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},"Possible autocomplete candidate:"),r.a.createElement(i.a,{classes:{root:E.preformatted},color:"primary",paragraph:!1},y.join(" "))):""},r.a.createElement(l.a,{fullWidth:!0,color:null===e.action?"primary":"secondary",autoFocus:!0,disabled:null!==e.action,autoComplete:"off",value:s,classes:{root:E.textfield},onChange:function(e){k(e.target.value),b([])},inputRef:o,InputProps:{id:"terminal-input",className:E.input,startAdornment:r.a.createElement(i.a,{color:null===e.action?"primary":"secondary",flexShrink:0},"[",a.getCurrentServer().hostname," ~",e.cwd(),"]> "),spellCheck:!1,onKeyDown:async function(n){if(n.keyCode===u.a.ENTER&&""!==s)return n.preventDefault(),e.print(`[${a.getCurrentServer().hostname} ~${e.cwd()}]> ${s}`),e.executeCommands(t,a,s),void k("");if(n.keyCode===u.a.TAB&&""!==s){n.preventDefault();let t=s;const r=t.lastIndexOf(";");-1!==r&&(t=t.slice(r+1)),t=t.trim(),t=t.replace(/\s\s+/g," ");const i=t.split(" ");let o=i.length-2;o<-1&&(o=0);const l=await Object(m.a)(a,t,o,e.cwd());if(0==l.length)return;let c="",u="";if(0==i.length)return;1==i.length?u=i[0]:2==i.length?(u=i[0],c=i[1]):3==i.length?(u=i[0]+" "+i[1],c=i[2]):(c=i.pop()+"",u=i.join(" "));let p=Object(h.a)(u,c,l,s);"string"==typeof p&&""!==p&&(p.endsWith(" ")||p.endsWith("/")||1!==l.length||(p+=" "),k(p)),Array.isArray(p)&&b(p)}if(n.keyCode===u.a.L&&n.ctrlKey&&(n.preventDefault(),e.clear()),n.keyCode===u.a.UPARROW||p.a.EnableBashHotkeys&&n.keyCode===u.a.P&&n.ctrlKey){p.a.EnableBashHotkeys&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;(t<0||t>a)&&(e.commandHistoryIndex=a),0!=t&&--e.commandHistoryIndex;k(e.commandHistory[e.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.keyCode===u.a.DOWNARROW||p.a.EnableBashHotkeys&&n.keyCode===u.a.M&&n.ctrlKey){p.a.EnableBashHotkeys&&n.preventDefault();const t=e.commandHistoryIndex,a=e.commandHistory.length;if(0==a)return;if((t<0||t>a)&&(e.commandHistoryIndex=a),t==a||t==a-1)e.commandHistoryIndex=a,k("");else{++e.commandHistoryIndex;k(e.commandHistory[e.commandHistoryIndex])}}p.a.EnableBashHotkeys&&(n.keyCode===u.a.A&&n.ctrlKey&&(n.preventDefault(),v("home")),n.keyCode===u.a.E&&n.ctrlKey&&(n.preventDefault(),v("end")),n.keyCode===u.a.B&&n.ctrlKey&&(n.preventDefault(),v("prevchar")),n.keyCode===u.a.B&&n.altKey&&(n.preventDefault(),v("prevword")),n.keyCode===u.a.F&&n.ctrlKey&&(n.preventDefault(),v("nextchar")),n.keyCode===u.a.F&&n.altKey&&(n.preventDefault(),v("nextword")),n.keyCode!==u.a.H&&n.keyCode!==u.a.D||!n.ctrlKey||(!function(e){const t=o.current;if(!t)return;const a=s.length,n=t.selectionStart;if(null===n)return;const r=t.value;switch(e.toLowerCase()){case"backspace":n>0&&n<=a+1&&k(r.substr(0,n-1)+r.substr(n));break;case"deletewordbefore":for(let e=n-1;e>0;--e)if(" "===r.charAt(e))return void k(r.substr(0,e)+r.substr(n));break;case"deletewordafter":for(let e=n+1;e<=s.length+1;++e)if(" "===r.charAt(e))return void k(r.substr(0,n)+r.substr(e))}}("backspace"),n.preventDefault()))}}})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(112),r=a(1068),i=a(141),o=a(291),s=a(27),l=a(411),c=a(91),u=a(545),m=a(546),h=a(402);const p=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","cp","download","expr","free","grow","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan-analyze","scan","scp","sudov","tail","theme","top","weaken"];async function d(e,t,a,d=""){t=Object(i.h)(t);let f=[];f=f.concat(Object.keys(i.b));const g=e.getCurrentServer(),y=e.getHomeComputer();let b="",E=null;function k(){for(const e of g.contracts)f.push(e.fn)}function v(){for(const e of g.messages)e.endsWith(".msg")||f.push(e)}function _(){for(const e of y.programs)f.push(e)}function w(){for(const e of g.scripts){const t=x(e.filename);t&&f.push(t)}}function S(){for(const e of g.textFiles){const t=x(e.fn);t&&f.push(t)}}function C(){const e=Object(r.a)(g,null==E?"/":E);for(let t=0;te.filename===n);if(!r)return;r.module||await Object(u.a)(r,g.scripts);const i=await r.module;if(!i.autocomplete)return;const o={"--tail":Boolean,"-t":Number},p=h(o,{permissive:!0,argv:a.slice(2)}),d=Object(m.a)(p._);let f=[],y=[];return f=f.concat(i.autocomplete({servers:Object(s.c)().map(e=>e.hostname),scripts:g.scripts.map(e=>e.filename),txts:g.textFiles.map(e=>e.fn),flags:e=>{y=e.map(e=>1===e[0].length?"-"+e[0]:"--"+e[0]);try{return d(e)}catch(e){return}}},p._)),f.concat(y)}();return R||(O("run")&&(w(),_(),k(),C()),O("kill")||O("tail")||O("mem")||O("check")?(w(),C(),f):O("cat")?(function(){for(const e of g.messages)e.endsWith(".msg")&&f.push(e)}(),v(),S(),C(),f):O("download")||O("mv")?(w(),S(),C(),f):O("cd")?(C(),f):(O("ls")&&0===a&&C(),f))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(112);function r(e,t){const a=[];if(!Object(n.g)(t))return a;let r=t;function i(e){if("/"===r&&Object(n.f)(e)){const t=Object(n.e)(e);"/"===t||a.includes(t)||a.push(t)}else if(e.startsWith(r)){const t=e.slice(r.length),i=Object(n.e)(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 n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(22);function r(e,t,a,r){if(a.constructor!==Array)return;if(!Object(n.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=r.lastIndexOf(";");let o="";if(0!==a.length){if(1===a.length)return o=""===t?a[0]:e+" "+a[0],-1===i?o:r.slice(0,i+1)+" "+o;{const o=Object(n.e)(a);return""===t?o===e?a:-1===i?o:`${r.slice(0,i+1)} ${o}`:o===t?a:-1==i?`${e} ${o}`:`${r.slice(0,i+1)} ${e} ${o}`}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1),o=a(127),s=a(32);function l(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"h4"},"Tutorial / Documentation"),r.a.createElement(s.a,{m:2},r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},r.a.createElement(i.a,null,"Getting Started")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},r.a.createElement(i.a,null,"Servers & Networking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},r.a.createElement(i.a,null,"Hacking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},r.a.createElement(i.a,null,"Scripts")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},r.a.createElement(i.a,null,"Netscript Programming Language")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},r.a.createElement(i.a,null,"Traveling")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},r.a.createElement(i.a,null,"Companies")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},r.a.createElement(i.a,null,"Infiltration")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},r.a.createElement(i.a,null,"Factions")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},r.a.createElement(i.a,null,"Augmentations")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},r.a.createElement(i.a,null,"Keyboard Shortcuts"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(470),o=a(226),s=a(1073),l=a(1083);function c(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const[c,u]=Object(n.useState)("active");return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"fullWidth",value:c,onChange:function(e,t){u(t)}},r.a.createElement(o.a,{label:"Active",value:"active"}),r.a.createElement(o.a,{label:"Recent",value:"recent"})),"active"===c&&r.a.createElement(s.a,{workerScripts:e.workerScripts}),"recent"===c&&r.a.createElement(l.a,null))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1074),o=a(1075),s=a(1);function l(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,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,null),r.a.createElement(o.a,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(16),i=a(98),o=a(29),s=a(1),l=a(126),c=a(154),u=a(236),m=a(169),h=a(49),p=a(56);const d=Object(l.a)(e=>Object(c.a)({cell:{borderBottom:"none",padding:e.spacing(1),margin:e.spacing(1),whiteSpace:"nowrap"},size:{width:"1px"}}));function f(){const e=o.b.Player(),t=d(),a=e.scriptProdSinceLastAug/(e.playtimeSinceLastAug/1e3);return n.createElement(u.a,{size:"small",classes:{root:t.size}},n.createElement(m.a,null,n.createElement(p.a,null,n.createElement(h.a,{component:"th",scope:"row",classes:{root:t.cell}},n.createElement(s.a,{variant:"body2"},"Total production:")),n.createElement(h.a,{align:"left",classes:{root:t.cell}},n.createElement(s.a,{variant:"body2"},n.createElement(r.a,{money:e.scriptProdSinceLastAug}))),n.createElement(h.a,{align:"left",classes:{root:t.cell}},n.createElement(s.a,{variant:"body2"},"(",n.createElement(i.a,{money:a}),")")))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1076),o=a(82),s=a(274),l=a(1201),c=a(264),u=a(27),m=a(13),h=a(548),p=a(1082),d=a.n(p);function f(e){const[t,a]=Object(n.useState)(""),[p,f]=Object(n.useState)(0),[g,y]=Object(n.useState)(m.a.ActiveScriptsServerPageSize),b=Object(n.useState)(!1)[1];const E={};for(const t of e.workerScripts.values()){const e=Object(u.d)(t.hostname);if(null==e){console.warn("WorkerScript has invalid IP address: "+t.hostname);continue}let a=E[e.hostname];void 0===a&&(E[e.hostname]={server:e,workerScripts:[]},a=E[e.hostname]),void 0!==a&&a.workerScripts.push(t)}const k=Object.values(E).filter(e=>e&&(e.server.hostname.includes(t)||e.server.runningScripts.find(e=>e.filename.includes(t))));function v(){b(e=>!e)}return Object(n.useEffect)(()=>c.a.subscribe(v)),r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{value:t,onChange:function(e){a(e.target.value),f(0)},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(d.a,null),spellCheck:!1}}),r.a.createElement(s.a,{dense:!0},k.slice(p*g,p*g+g).map(e=>e&&r.a.createElement(i.a,{key:e.server.hostname,server:e.server,workerScripts:e.workerScripts}))),r.a.createElement(l.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:k.length,rowsPerPage:g,page:p,onPageChange:(e,t)=>{f(t)},onRowsPerPageChange:e=>{m.a.ActiveScriptsServerPageSize=parseInt(e.target.value,10),y(parseInt(e.target.value,10)),f(0)},ActionsComponent:h.a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a(1),i=a(302),o=a(97),s=a(73),l=a(32),c=a(189),u=a(70),m=a.n(u),h=a(134),p=a.n(h),d=a(1077),f=a(170);function g(e){const[t,a]=n.useState(!1),u=e.server,h=`${u.hostname}${" ".repeat(18)}`.slice(0,Math.max(u.hostname.length,18)),g={progress:u.ramUsed/u.maxRam,totalTicks:30},y=`${h} ${Object(f.a)(g)}`;return n.createElement(l.a,{component:s.a},n.createElement(i.a,{onClick:()=>a(e=>!e)},n.createElement(o.a,{primary:n.createElement(r.a,{style:{whiteSpace:"pre-wrap"}},y)}),t?n.createElement(p.a,{color:"primary"}):n.createElement(m.a,{color:"primary"})),n.createElement(l.a,{mx:2},n.createElement(c.a,{in:t,timeout:0,unmountOnExit:!0},n.createElement(d.a,{workerScripts:e.workerScripts}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(1078),o=a(274),s=a(1201),l=a(548),c=a(13);function u(e){const[t,a]=Object(n.useState)(0),[u,m]=Object(n.useState)(c.a.ActiveScriptsScriptPageSize);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{dense:!0,disablePadding:!0},e.workerScripts.slice(t*u,t*u+u).map(e=>r.a.createElement(i.a,{key:`${e.name}_${e.args}`,workerScript:e}))),r.a.createElement(s.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:e.workerScripts.length,rowsPerPage:u,page:t,onPageChange:(e,t)=>{a(t)},onRowsPerPageChange:e=>{c.a.ActiveScriptsScriptPageSize=parseInt(e.target.value,10),m(parseInt(e.target.value,10)),a(0)},ActionsComponent:l.a}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var n=a(0),r=a(4),i=a(236),o=a(49),s=a(56),l=a(169),c=a(10),u=a(32),m=a(73),h=a(1),p=a(94),d=a(1079),f=a.n(d),g=a(302),y=a(97),b=a(126),E=a(189),k=a(134),v=a.n(k),_=a(70),w=a.n(_),S=a(131),C=a(15),x=a(201),O=a(22),M=a(230),T=a(16),R=a(98);const A=Object(b.a)({noborder:{borderBottom:"none"}});function P(e){const t=A(),[a,d]=n.useState(!1),b=e.workerScript.scriptRef;const k=S.a.bind(null,b,b.server);const _=b.onlineMoneyMade/b.onlineRunningTime,P=b.onlineExpGained/b.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(g.a,{onClick:()=>d(e=>!e),component:m.a},n.createElement(y.a,{primary:n.createElement(h.a,null,"└ ",e.workerScript.name," ",JSON.stringify(e.workerScript.args))}),a?n.createElement(v.a,{color:"primary"}):n.createElement(w.a,{color:"primary"})),n.createElement(E.a,{in:a,timeout:0,unmountOnExit:!0},n.createElement(u.a,{mx:6},n.createElement(i.a,{padding:"none",size:"small"},n.createElement(l.a,null,n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Threads:")),n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,r.a.formatThreads(e.workerScript.scriptRef.threads)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:2},n.createElement(h.a,null,"└ Args: ",Object(M.a)(e.workerScript.args)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Online Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,Object(O.b)(1e3*b.onlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Offline Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,Object(O.b)(1e3*b.offlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Total online production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null,n.createElement(T.a,{money:b.onlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null," ",r.a.formatExp(b.onlineExpGained)+" hacking exp"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Online production rate:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null,n.createElement(R.a,{money:_})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null," ",r.a.formatExp(P)+" hacking exp / sec"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(h.a,null,"└ Total offline production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null,n.createElement(T.a,{money:b.offlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(h.a,null," ",r.a.formatExp(b.offlineExpGained)+" hacking exp"))))),n.createElement(c.a,{onClick:function(){x.b.emit(b)}},"LOG"),n.createElement(p.a,{onClick:function(){k(),Object(C.a)("Killing script")}},n.createElement(f.a,{color:"error"})))))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1),o=a(508),s=a(1084);function l(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"List of all recently killed scripts."),o.b.map(e=>r.a.createElement(s.a,{key:e.pid,recentScript:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return O}));var n=a(0),r=a(4),i=a(236),o=a(49),s=a(56),l=a(169),c=a(32),u=a(73),m=a(1),h=a(10),p=a(302),d=a(97),f=a(126),g=a(189),y=a(134),b=a.n(y),E=a(70),k=a.n(E),v=a(22),_=a(230),w=a(16),S=a(98),C=a(201);const x=Object(f.a)({noborder:{borderBottom:"none"}});function O(e){const t=x(),[a,f]=n.useState(!1),y=e.recentScript,E=y.runningScript.onlineMoneyMade/y.runningScript.onlineRunningTime,O=y.runningScript.onlineExpGained/y.runningScript.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(p.a,{onClick:()=>f(e=>!e),component:u.a},n.createElement(d.a,{primary:n.createElement(m.a,null,"└ ",y.filename," (died"," ",Object(v.b)((new Date).getTime()-y.timestamp.getTime())," ago)")}),a?n.createElement(b.a,{color:"primary"}):n.createElement(k.a,{color:"primary"})),n.createElement(g.a,{in:a,timeout:0,unmountOnExit:!0},n.createElement(c.a,{mx:6},n.createElement(i.a,{padding:"none",size:"small"},n.createElement(l.a,null,n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Threads:")),n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,r.a.formatThreads(y.runningScript.threads)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:2},n.createElement(m.a,null,"└ Args: ",Object(_.a)(y.args)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Online Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,Object(v.b)(1e3*y.runningScript.onlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Offline Time:")),n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,Object(v.b)(1e3*y.runningScript.offlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Total online production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null,n.createElement(w.a,{money:y.runningScript.onlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(y.runningScript.onlineExpGained)+" hacking exp"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Online production rate:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null,n.createElement(S.a,{money:E})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(O)+" hacking exp / sec"))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder},n.createElement(m.a,null,"└ Total offline production:")),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null,n.createElement(w.a,{money:y.runningScript.offlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:t.noborder,colSpan:1}),n.createElement(o.a,{className:t.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(y.runningScript.offlineExpGained)+" hacking exp"))))),n.createElement(h.a,{onClick:function(){C.b.emit(y.runningScript)}},"LOG"))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(1086),o=a(1090),s=a(1091),l=a(381),c=a(8),u=a(5),m=a(29),h=a(1092),p=a(1),d=a(10),f=a(1093);const g=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];function y({faction:e,rerender:t,onAugmentations:a}){const i=m.b.Player(),y=m.b.Router(),[b,E]=Object(n.useState)(!1),[k,v]=Object(n.useState)(!1),_=i,w=e.getInfo();const S=_.inGang()&&_.getGangName()===e.name,C=Math.floor(c.a.BaseFavorToDonate*u.a.RepToDonateToFaction),x=e.favor>=C,O="The Covenant"===e.name&&10===_.bitNodeN;let M=_.canAccessGang()&&g.includes(e.name);return _.inGang()&&(_.getGangName()!==e.name?M=!1:_.getGangName()===e.name&&(M=!0)),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:()=>y.toFactions()},"Back"),r.a.createElement(p.a,{variant:"h4",color:"primary"},e.name),r.a.createElement(s.a,{faction:e,factionInfo:w}),M&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:function(){if(i.inGang())return y.toGang();v(!0)}}),r.a.createElement(h.a,{facName:e.name,open:k,onClose:()=>v(!1)})),!S&&w.offerHackingWork&&r.a.createElement(l.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:()=>function(e){i.startFactionHackWork(y,e)}(e)}),!S&&w.offerFieldWork&&r.a.createElement(l.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:()=>function(e){i.startFactionFieldWork(y,e)}(e)}),!S&&w.offerSecurityWork&&r.a.createElement(l.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:()=>function(e){i.startFactionSecurityWork(y,e)}(e)}),!S&&w.offersWork()&&r.a.createElement(o.a,{faction:e,p:i,rerender:t,favorToDonate:C,disabled:!x}),r.a.createElement(l.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:a}),O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:()=>E(!0)}),r.a.createElement(f.a,{open:b,onClose:()=>E(!1)})))}function b(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const o=e.faction,[s,l]=Object(n.useState)(!1);return s?r.a.createElement(i.a,{faction:o,routeToMainPage:()=>l(!1)}):r.a.createElement(y,{rerender:a,faction:o,onAugmentations:()=>l(!0)})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(1087),o=a(20),s=a(6),l=a(183),c=a(13),u=a(113),m=a(29),h=a(104),p=a(290),d=a(32),f=a(10),g=a(1),y=a(26),b=a(169),E=a(236),k=a(8);function v(e){const t=m.b.Player(),a=t.inGang()&&t.getGangName()===e.faction.name,v=Object(n.useState)(!1)[1];function _(){v(e=>!e)}function w(){if(a){const e=[];for(const a in o.a){if(a===s.a.NeuroFluxGovernor)continue;if(a===s.a.TheRedPill&&2!==t.bitNodeN)continue;o.a[a].isSpecial||e.push(a)}return e}return e.faction.augmentations.slice()}function S(e){c.a.PurchaseAugmentationsOrder=e,_()}const C=function(){switch(c.a.PurchaseAugmentationsOrder){case l.b.Cost:return function(){const e=w();return e.sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),e}();case l.b.Reputation:return function(){const e=w();return e.sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement}),e}();case l.b.Purchasable:return function(){const a=w();function n(a){const n=o.a[a],r=n.baseRepRequirement*e.faction.getInfo().augmentationRepRequirementMult,i=e.faction.playerReputation>=r,s=Object(u.b)(n);return 0!==n.baseCost&&t.money>n.baseCost*e.faction.getInfo().augmentationPriceMult&&i&&s}const r=a.filter(n).sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),i=a.filter(e=>!n(e)).sort((e,t)=>{const a=o.a[e],n=o.a[t];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement});return r.concat(i)}();default:return w()}}(),x=C.filter(e=>e===s.a.NeuroFluxGovernor||!t.augmentations.some(t=>t.name===e)&&!t.queuedAugmentations.some(t=>t.name===e)),O=(a,n=!1)=>r.a.createElement(i.a,{augName:a,faction:e.faction,key:a,p:t,rerender:_,owned:n}),M=x.map(e=>O(e));let T=r.a.createElement(r.a.Fragment,null);const R=C.filter(e=>!x.includes(e));0!==R.length&&(T=r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(g.a,{variant:"h4"},"Purchased Augmentations"),r.a.createElement(g.a,null,"This factions also offers these augmentations but you already own them."),R.map(e=>O(e,!0))));const A=Math.pow(k.a.MultipleAugMultiplier*[1,.96,.94,.93][t.sourceFileLvl(11)],t.queuedAugmentations.length);return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{onClick:e.routeToMainPage},"Back"),r.a.createElement(g.a,{variant:"h4"},"Faction Augmentations"),r.a.createElement(g.a,null,"These are all of the Augmentations that are available to purchase from ",e.faction.name,". Augmentations are powerful upgrades that will enhance your abilities.",r.a.createElement("br",null),"Reputation: ",r.a.createElement(h.a,{reputation:e.faction.playerReputation})," Favor:"," ",r.a.createElement(p.a,{favor:Math.floor(e.faction.favor)})),r.a.createElement(d.a,{display:"flex"},r.a.createElement(y.a,{title:r.a.createElement(g.a,null,"The price of every Augmentation increases for every queued Augmentation and it is reset when you install them.")},r.a.createElement(g.a,null,"Price multiplier: x ",A.toFixed(3)))),r.a.createElement(f.a,{onClick:()=>S(l.b.Cost)},"Sort by Cost"),r.a.createElement(f.a,{onClick:()=>S(l.b.Reputation)},"Sort by Reputation"),r.a.createElement(f.a,{onClick:()=>S(l.b.Default)},"Sort by Default Order"),r.a.createElement(f.a,{onClick:()=>S(l.b.Purchasable)},"Sort by Purchasable"),r.a.createElement("br",null),r.a.createElement(E.a,{size:"small",padding:"none"},r.a.createElement(b.a,null,M)),r.a.createElement(E.a,{size:"small",padding:"none"},r.a.createElement(b.a,null,T)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(113),o=a(1088),s=a(20),l=a(6),c=a(13),u=a(16),m=a(104),h=a(1089),p=a(10),d=a(1),f=a(26),g=a(32),y=a(39),b=a(56);function E(e){const t=s.a[e.augName];return e.hasReq?r.a.createElement(r.a.Fragment,{key:"f"},r.a.createElement(y.b,{key:1},r.a.createElement(d.a,null,r.a.createElement(u.a,{money:e.cost,player:e.p}))),r.a.createElement(y.b,{key:2},r.a.createElement(d.a,{color:e.hasRep?"primary":"error"},"Requires ",r.a.createElement(m.a,{reputation:e.rep})," faction reputation"))):r.a.createElement(y.b,{key:1,colSpan:2},r.a.createElement(d.a,{color:"error"},"Requires"," ",t.prereqs.map((e,t)=>r.a.createElement(h.a,{key:t,name:e}))))}function k(e){const[t,a]=Object(n.useState)(!1),u=s.a[e.augName];if(null==u)throw new Error(`aug ${e.augName} does not exists`);if(null==u)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+e.augName),r.a.createElement(r.a.Fragment,null);const m=u.baseCost*e.faction.getInfo().augmentationPriceMult,h=u.baseRepRequirement*e.faction.getInfo().augmentationRepRequirementMult,k=Object(i.b)(u),v=e.faction.playerReputation>=h,_=0===u.baseCost||e.p.money>u.baseCost*e.faction.getInfo().augmentationPriceMult,w=k&&v&&_?"primary":"error";let S=u.name;u.name===l.a.NeuroFluxGovernor&&(S+=" - Level "+Object(i.a)());let C=r.a.createElement(r.a.Fragment,null);return C="string"==typeof u.info?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,u.info),r.a.createElement("br",null),r.a.createElement("br",null),u.stats):r.a.createElement(r.a.Fragment,null,u.info,r.a.createElement("br",null),r.a.createElement("br",null),u.stats),r.a.createElement(b.a,null,!e.owned&&r.a.createElement(y.b,{key:0},r.a.createElement(p.a,{onClick:function(){"error"!==w&&(c.a.SuppressBuyAugmentationConfirmation?(Object(i.f)(u,e.faction),e.rerender()):a(!0))},color:w},"Buy"),r.a.createElement(o.a,{open:t,onClose:()=>a(!1),aug:u,faction:e.faction,rerender:e.rerender})),r.a.createElement(y.b,{key:1},r.a.createElement(g.a,{display:"flex"},r.a.createElement(f.a,{title:r.a.createElement(d.a,null,C),placement:"top"},r.a.createElement(d.a,null,S)))),!e.owned&&r.a.createElement(E,{key:2,augName:e.augName,p:e.p,cost:m,rep:h,hasReq:k,hasRep:v,hasCost:_}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(113),o=a(140),s=a(16),l=a(41),c=a(29),u=a(1),m=a(10);function h(e){const t=c.b.Player(),a=e.faction.getInfo();return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(u.a,{variant:"h4"},e.aug.name),r.a.createElement(u.a,null,e.aug.info,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats,r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",e.aug.name," Augmentation for ",r.a.createElement(s.a,{money:e.aug.baseCost*a.augmentationPriceMult}),"?",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement(m.a,{autoFocus:!0,onClick:function(){!Object(o.e)(e.aug)&&t.hasAugmentation(e.aug)||(Object(i.f)(e.aug,e.faction),e.rerender(),e.onClose())}},"Purchase"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a(126),i=a(154);const o=Object(r.a)(e=>Object(i.a)({aug:{color:e.colors.combat}}));function s({name:e}){const t=o();return n.createElement("span",{className:t.aug},e)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(8),o=a(644),s=a(290),l=a(16),c=a(104),u=a(4),m=a(15),h=a(153),p=a(1),d=a(73),f=a(10),g=a(82);function y(e){const[t,a]=Object(n.useState)(null),y=(i.a.DonateMoneyToRepDivisor+"").length-1;function b(){return null!==t&&(!(isNaN(t)||t<=0)&&!(e.p.moneyObject(c.a)({noformat:{whiteSpace:"pre-wrap",lineHeight:"1em"}}));function d(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]);const l=p(),c=e.faction.getFavorGain();return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{classes:{root:l.noformat}},e.factionInfo.infoText),r.a.createElement(u.a,null,"-------------------------"),r.a.createElement(h.a,{display:"flex"},r.a.createElement(m.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"You will have ",r.a.createElement(o.a,{favor:Math.floor(e.faction.favor+c)})," faction favor after installing an Augmentation."),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{r = \\text{total faction reputation}}\\)")),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{favor=1+\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}\\)")))},r.a.createElement(u.a,null,"Reputation: ",r.a.createElement(i.a,{reputation:e.faction.playerReputation})))),r.a.createElement(u.a,null,"-------------------------"),r.a.createElement(h.a,{display:"flex"},r.a.createElement(m.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,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."),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{r = reputation}\\)")),r.a.createElement(s.MathJaxContext,null,r.a.createElement(s.MathJax,null,"\\(\\huge{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}\\)")))},r.a.createElement(u.a,null,"Faction Favor: ",r.a.createElement(o.a,{favor:Math.floor(e.faction.favor)})))),r.a.createElement(u.a,null,"-------------------------"),r.a.createElement(u.a,null,"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 c}));var n=a(0),r=a.n(n),i=a(41),o=a(29),s=a(1),l=a(10);function c(e){const t=o.b.Player(),a=o.b.Router();function n(){return["NiteSec","The Black Hand"].includes(e.facName)}function c(){t.startGang(e.facName,n()),e.onClose(),a.toGang()}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(s.a,null,"Would you like to create a new Gang with ",e.facName,"?",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),n()?"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.":"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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."),r.a.createElement(l.a,{onClick:c,onKeyUp:function(e){13===e.keyCode&&c()},autoFocus:!0},"Create Gang"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(1094),o=a(293),s=a(423),l=a(16),c=a(41),u=a(29),m=a(15),h=a(1),p=a(10);function d(e){const t=u.b.Player(),[a,d]=Object(n.useState)(0);function f(){return Math.pow(10,t.sleevesFromCovenant)*s.a}function g(){d(a+1)}let y=!1;t.canAfford(f())||(y=!0),t.sleevesFromCovenant>=s.b&&(y=!0);const b=[];for(let e=0;e=s.b||(t.canAfford(f())?(t.loseMoney(f(),"sleeves"),t.sleevesFromCovenant+=1,t.sleeves.push(new o.a(t)),g()):Object(m.a)("You cannot afford to purchase a Duplicate Sleeve"))}},"Purchase - ",r.a.createElement(l.a,{money:f(),player:t}))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(h.a,null,"You can also purchase upgrades for your Sleeves. These upgrades are also permanent."),b))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(4),o=a(16),s=a(1),l=a(82),c=a(10),u=a(32),m=a(73);function h(e){const[t,a]=Object(n.useState)(1);function h(){if(isNaN(t))return 1/0;const a=100-e.sleeve.memory;return t>a?1/0:e.sleeve.getMemoryUpgradeCost(t)}const p=h(),d=!e.p.canAfford(p);let f=r.a.createElement(r.a.Fragment,null);return f=isNaN(t)?r.a.createElement(r.a.Fragment,null,"Invalid value"):r.a.createElement(r.a.Fragment,null,"Purchase ",t," memory - ",r.a.createElement(o.a,{money:p,player:e.p})),r.a.createElement(m.a,{sx:{my:1,p:1}},r.a.createElement(s.a,{variant:"h6",color:"primary"},"Upgrade Memory of Sleeve ",e.index),r.a.createElement(s.a,null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",i.a.formatSleeveMemory(e.sleeve.memory),")"),r.a.createElement(u.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(s.a,null,"Amount of memory to purchase (must be an integer): "),r.a.createElement(l.a,{onChange:function(t){let n=parseInt(t.target.value);isNaN(n)&&(n=1),n<1&&(n=1);const r=100-e.sleeve.memory;n>r&&(n=r),a(n)},type:"number",value:t})),r.a.createElement("br",null),r.a.createElement(c.a,{disabled:d,onClick:function(){const a=h();e.p.canAfford(a)&&(e.sleeve.upgradeMemory(t),e.p.loseMoney(a,"sleeves"),e.rerender())}},f))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return N}));var n=a(0),r=a.n(n),i=a(4),o=a(22),s=a(5),l=a(74),c=a(216),u=a(36),m=a(123),h=a(16),p=a(29),d=a(211),f=a(1),g=a(32),y=a(94),b=a(1096),E=a.n(b),k=a(41),v=a(169),_=a(39),w=a(56);function S(){const e=p.b.Player();return e.companyName?r.a.createElement(f.a,null,"Employer at which you last worked: ",e.companyName):r.a.createElement(r.a.Fragment,null)}function C(){const e=p.b.Player();return""!==e.companyName?r.a.createElement(f.a,null,"Job you last worked: ",e.jobs[e.companyName]):r.a.createElement(r.a.Fragment,null)}function x(){const e=p.b.Player();return e.jobs&&0!==Object.keys(e.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"All Employers:"),r.a.createElement("ul",null,Object.keys(e.jobs).map(e=>r.a.createElement(f.a,{key:e}," * ",e)))):r.a.createElement(r.a.Fragment,null)}function O(){const e=p.b.Player();return 9===e.bitNodeN||l.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,`Hacknet Servers owned: ${e.hacknetNodes.length} / ${u.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"Hacknet Nodes owned: "+e.hacknetNodes.length),r.a.createElement("br",null))}function M(){const e=p.b.Player();return e.intelligence>0&&(5===e.bitNodeN||l.a[5]>0)?r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,null,"Intelligence: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,null,i.a.formatSkill(e.intelligence)," "))):r.a.createElement(r.a.Fragment,null)}function T(e){return r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(v.a,null,e.rows.map(e=>r.a.createElement(w.a,{key:e[0]},r.a.createElement(_.b,{key:"0"},r.a.createElement(f.a,{noWrap:!0},e[0]+" multiplier:"," ")),r.a.createElement(_.b,{key:"1",align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatPercentage(e[1]))),function(e){return l.a[5]>0&&e.length>2&&e[1]!=e[2]?r.a.createElement(_.b,{key:"2",align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatPercentage(e[2]),")")):r.a.createElement(r.a.Fragment,null)}(e))))))}function R(){const e=p.b.Player();return e.canAccessBladeburner()?r.a.createElement(T,{rows:[["Bladeburner Success Chance",e.bladeburner_success_chance_mult],["Bladeburner Max Stamina",e.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",e.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",e.bladeburner_analysis_mult]]}):r.a.createElement(r.a.Fragment,null)}function A(){const e=p.b.Player();if(e.sourceFiles.length>0){const t="BitNode"+e.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"h4"},"BitNode ",e.bitNodeN,": ",d.a[t].name),r.a.createElement(f.a,{sx:{mx:2},style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},d.a[t].info))}return r.a.createElement(r.a.Fragment,null)}function P({open:e,onClose:t}){const a=p.b.Player();function n(e){const t=[["Total:",r.a.createElement(h.a,{money:e.total})]];return e.augmentations&&t.push(["Augmentations:",r.a.createElement(h.a,{money:e.augmentations})]),e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(h.a,{money:e.bladeburner})]),e.casino&&t.push(["Casino:",r.a.createElement(h.a,{money:e.casino})]),e.codingcontract&&t.push(["Coding Contracts:",r.a.createElement(h.a,{money:e.codingcontract})]),e.work&&t.push(["Company Work:",r.a.createElement(h.a,{money:e.work})]),e.class&&t.push(["Class:",r.a.createElement(h.a,{money:e.class})]),e.corporation&&t.push(["Corporation:",r.a.createElement(h.a,{money:e.corporation})]),e.crime&&t.push(["Crimes:",r.a.createElement(h.a,{money:e.crime})]),e.gang&&t.push(["Gang:",r.a.createElement(h.a,{money:e.gang})]),e.hacking&&t.push(["Hacking:",r.a.createElement(h.a,{money:e.hacking})]),e.hacknet&&t.push(["Hacknet Nodes:",r.a.createElement(h.a,{money:e.hacknet})]),e.hacknet_expenses&&t.push(["Hacknet Nodes Expenses:",r.a.createElement(h.a,{money:e.hacknet_expenses})]),e.hospitalization&&t.push(["Hospitalization:",r.a.createElement(h.a,{money:e.hospitalization})]),e.infiltration&&t.push(["Infiltration:",r.a.createElement(h.a,{money:e.infiltration})]),e.servers&&t.push(["Servers:",r.a.createElement(h.a,{money:e.servers})]),e.stock&&t.push(["Stock Market:",r.a.createElement(h.a,{money:e.stock})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(h.a,{money:e.sleeves})]),e.other&&t.push(["Other:",r.a.createElement(h.a,{money:e.other})]),r.a.createElement(m.a,{rows:t,wide:!0})}let i=r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"h6",color:"primary"},"Money earned since you last installed Augmentations"),r.a.createElement("br",null),n(a.moneySourceA));return 0!==a.sourceFiles.length&&(i=r.a.createElement(r.a.Fragment,null,i,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h6",color:"primary"},"Money earned in this BitNode"),r.a.createElement("br",null),n(a.moneySourceB))),r.a.createElement(k.a,{open:e,onClose:t},i)}function N(){const e=p.b.Player(),[t,a]=Object(n.useState)(!1),l=Object(n.useState)(!1)[1];function u(){l(e=>!e)}Object(n.useEffect)(()=>{const e=setInterval(u,200);return()=>clearInterval(e)},[]);const d=[["Time played since last Augmentation:",Object(o.b)(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&d.push(["Time played since last Bitnode destroyed:",Object(o.b)(e.playtimeSinceLastBitnode)]),d.push(["Total Time played:",Object(o.b)(e.totalPlaytime)]),r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"h4"},"General"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(f.a,null,"Current City: ",e.city),r.a.createElement(S,null),r.a.createElement(C,null),r.a.createElement(x,null),r.a.createElement(f.a,null,"Money: ",r.a.createElement(h.a,{money:e.money}),r.a.createElement(y.a,{onClick:()=>a(!0)},r.a.createElement(E.a,{color:"info"})))),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Stats"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(v.a,null,r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Hacking: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.hacking)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.hacking_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Strength: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.strength)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.strength_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Defense: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.defense)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.defense_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Dexterity: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.dexterity)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.dexterity_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Agility: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.agility)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.agility_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(f.a,{noWrap:!0},"Charisma: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.charisma)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},"(",i.a.formatExp(e.charisma_exp)," exp)"))),r.a.createElement(M,null))),r.a.createElement("br",null)),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Multipliers"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(T,{rows:[["Hacking Chance",e.hacking_chance_mult],["Hacking Speed",e.hacking_speed_mult],["Hacking Money",e.hacking_money_mult,e.hacking_money_mult*s.a.ScriptHackMoney],["Hacking Growth",e.hacking_grow_mult,e.hacking_grow_mult*s.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Hacking Level",e.hacking_mult,e.hacking_mult*s.a.HackingLevelMultiplier],["Hacking Experience",e.hacking_exp_mult,e.hacking_exp_mult*s.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Strength Level",e.strength_mult,e.strength_mult*s.a.StrengthLevelMultiplier],["Strength Experience",e.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Defense Level",e.defense_mult,e.defense_mult*s.a.DefenseLevelMultiplier],["Defense Experience",e.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Dexterity Level",e.dexterity_mult,e.dexterity_mult*s.a.DexterityLevelMultiplier],["Dexterity Experience",e.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Agility Level",e.agility_mult,e.agility_mult*s.a.AgilityLevelMultiplier],["Agility Experience",e.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Charisma Level",e.charisma_mult,e.charisma_mult*s.a.CharismaLevelMultiplier],["Charisma Experience",e.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Hacknet Node production",e.hacknet_node_money_mult,e.hacknet_node_money_mult*s.a.HacknetNodeMoney],["Hacknet Node purchase cost",e.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",e.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",e.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",e.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Company reputation gain",e.company_rep_mult],["Faction reputation gain",e.faction_rep_mult,e.faction_rep_mult*s.a.FactionWorkRepGain],["Salary",e.work_money_mult,e.work_money_mult*s.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(T,{rows:[["Crime success",e.crime_success_mult],["Crime money",e.crime_money_mult,e.crime_money_mult*s.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement(R,null)),r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Misc"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(f.a,null,`Servers owned: ${e.purchasedServers.length} / ${Object(c.b)()}`),r.a.createElement(O,null),r.a.createElement(f.a,null,"Augmentations installed: "+e.augmentations.length),r.a.createElement(m.a,{rows:d})),r.a.createElement("br",null),r.a.createElement(A,null),r.a.createElement(P,{open:t,onClose:()=>a(!1)}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1098),o=a(1099);function s(e){const t=Object(n.useState)(!1)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(a,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{initStockMarket:e.initStockMarket,p:e.p,rerender:a}),e.p.hasWseAccount&&r.a.createElement(o.a,{buyStockLong:e.buyStockLong,buyStockShort:e.buyStockShort,cancelOrder:e.cancelOrder,eventEmitterForReset:e.eventEmitterForReset,p:e.p,placeOrder:e.placeOrder,sellStockLong:e.sellStockLong,sellStockShort:e.sellStockShort,stockMarket:e.stockMarket}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(257),o=a(8),s=a(16),l=a(1),c=a(127),u=a(10),m=a(26),h=a(94),p=a(265),d=a.n(p),f=a(366),g=a.n(f),y=a(398);function b(e){if(e.p.has4SDataTixApi)return r.a.createElement(l.a,null,"Market Data TIX API Access ",r.a.createElement(g.a,null));{const t=Object(i.b)();return r.a.createElement(m.a,{title:e.p.hasTixApiAccess?r.a.createElement(l.a,null,"Let you access 4S Market Data through Netscript"):r.a.createElement(l.a,null,"Requires TIX API Access")},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!e.p.hasTixApiAccess||!e.p.canAfford(t),onClick:function(){e.p.has4SDataTixApi||e.p.canAfford(Object(i.b)())&&(e.p.has4SDataTixApi=!0,e.p.loseMoney(Object(i.b)(),"stock"),e.rerender())}},"Buy 4S Market Data TIX API Access - ",r.a.createElement(s.a,{money:t,player:e.p}))))}}function E(e){if(e.p.hasWseAccount)return r.a.createElement(l.a,null,"WSE Account ",r.a.createElement(g.a,null));const t=o.a.WSEAccountCost;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"To begin trading, you must first purchase an account:"),r.a.createElement(u.a,{disabled:!e.p.canAfford(t),onClick:function(){e.p.hasWseAccount||e.p.canAfford(o.a.WSEAccountCost)&&(e.p.hasWseAccount=!0,e.initStockMarket(),e.p.loseMoney(o.a.WSEAccountCost,"stock"),e.rerender())}},"Buy WSE Account - ",r.a.createElement(s.a,{money:t,player:e.p})))}function k(e){if(e.p.hasTixApiAccess)return r.a.createElement(l.a,null,"TIX API Access ",r.a.createElement(g.a,null));{const t=o.a.TIXAPICost;return r.a.createElement(u.a,{disabled:!e.p.canAfford(t)||!e.p.hasWseAccount,onClick:function(){e.p.hasTixApiAccess||e.p.canAfford(o.a.TIXAPICost)&&(e.p.hasTixApiAccess=!0,e.p.loseMoney(o.a.TIXAPICost,"stock"),e.rerender())}},"Buy Trade Information eXchange (TIX) API Access - ",r.a.createElement(s.a,{money:t,player:e.p}))}}function v(e){if(e.p.has4SData)return r.a.createElement(l.a,null,"4S Market Data Access ",r.a.createElement(g.a,null));{const t=Object(i.a)();return r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"Lets you view additional pricing and volatility information about stocks")},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:!e.p.canAfford(t)||!e.p.hasWseAccount,onClick:function(){e.p.has4SData||e.p.canAfford(Object(i.a)())&&(e.p.has4SData=!0,e.p.loseMoney(Object(i.a)(),"stock"),e.rerender())}},"Buy 4S Market Data Access - ",r.a.createElement(s.a,{money:t,player:e.p}))))}}function _(e){const[t,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Welcome to the World Stock Exchange (WSE)!"),r.a.createElement(c.a,{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},"Investopedia"),r.a.createElement("br",null),r.a.createElement(E,e),r.a.createElement(l.a,{variant:"h5",color:"primary"},"Trade Information eXchange (TIX) API"),r.a.createElement(l.a,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."),r.a.createElement(k,e),r.a.createElement(l.a,{variant:"h5",color:"primary"},"Four Sigma (4S) Market Data Feed"),r.a.createElement(l.a,null,"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies.",r.a.createElement(h.a,{onClick:()=>a(!0)},r.a.createElement(d.a,null))),r.a.createElement(b,e),r.a.createElement(v,e),r.a.createElement(l.a,null,"Commission Fees: Every transaction you make has a"," ",r.a.createElement(s.a,{money:o.a.StockMarketCommission,player:e.p})," commission fee."),r.a.createElement("br",null),r.a.createElement(l.a,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!"),r.a.createElement(y.a,{open:t,onClose:()=>a(!1)},r.a.createElement(l.a,null,"Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"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.")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1100),o=a(382),s=a(136);function l(e){const t=Object(n.useState)(!1)[1],[a,l]=Object(n.useState)(o.b.AllStocks),[c,u]=Object(n.useState)([]);function m(){t(e=>!e)}const h=[];for(const t in e.stockMarket){const n=e.stockMarket[t];if(n instanceof s.a){if(c.length>0&&!c.includes(n.symbol))continue;let t=e.stockMarket.Orders[n.symbol];if(null==t&&(t=[]),a===o.b.Portfolio&&0===n.playerShares&&0===n.playerShortShares&&0===t.length)continue;h.push(r.a.createElement(i.a,{buyStockLong:e.buyStockLong,buyStockShort:e.buyStockShort,cancelOrder:e.cancelOrder,key:n.symbol,orders:t,p:e.p,placeOrder:e.placeOrder,rerenderAllTickers:m,sellStockLong:e.sellStockLong,sellStockShort:e.sellStockShort,stock:n}))}}return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{changeDisplayMode:function(){a===o.b.AllStocks?l(o.b.Portfolio):l(o.b.AllStocks)},changeWatchlistFilter:function(e){const t=e.target.value.replace(/\s/g,"");u(""!==t?t.split(","):[])},tickerDisplayMode:a}),h)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return R}));var n,r=a(0),i=a.n(r),o=a(1101),s=a(1102),l=a(1104),c=a(468),u=a(1105),m=a(204),h=a(100),p=a(68),d=a(74),f=a(4),g=a(16),y=a(15),b=a(32),E=a(82),k=a(75),v=a(116),_=a(302),w=a(97),S=a(73),C=a(189),x=a(70),O=a.n(x),M=a(134),T=a.n(M);function R(e){const[t,a]=Object(r.useState)(n.Market),[x,M]=Object(r.useState)(p.a.Long),[R,A]=Object(r.useState)(""),[P,N]=Object(r.useState)(!1),[I,F]=Object(r.useState)(!1),[D,j]=Object(r.useState)({text:"",placeText:"",place:()=>!1});function B(){return Math.round(parseFloat(R))}function G(){return 8===e.p.bitNodeN||d.a[8]>=3}return i.a.createElement(b.a,{component:S.a},i.a.createElement(_.a,{onClick:()=>F(e=>!e)},i.a.createElement(w.a,{primary:i.a.createElement(o.a,{p:e.p,stock:e.stock})}),I?i.a.createElement(T.a,{color:"primary"}):i.a.createElement(O.a,{color:"primary"})),i.a.createElement(C.a,{in:I,unmountOnExit:!0},i.a.createElement(b.a,{sx:{mx:4}},i.a.createElement(b.a,{display:"flex",alignItems:"center"},i.a.createElement(E.a,{onChange:function(e){A(e.target.value)},placeholder:"Quantity (Shares)",value:R}),i.a.createElement(v.a,{onChange:function(e){e.target.value===p.a.Short?M(p.a.Short):M(p.a.Long)},value:x},i.a.createElement(k.a,{value:p.a.Long},"Long"),(8===e.p.bitNodeN||d.a[8]>=2)&&i.a.createElement(k.a,{value:p.a.Short},"Short")),i.a.createElement(v.a,{onChange:function(e){switch(e.target.value){case n.Limit:a(n.Limit);break;case n.Stop:a(n.Stop);break;case n.Market:default:a(n.Market)}},value:t},i.a.createElement(k.a,{value:n.Market},n.Market),G()&&i.a.createElement(k.a,{value:n.Limit},n.Limit),G()&&i.a.createElement(k.a,{value:n.Stop},n.Stop)),i.a.createElement(c.a,{onClick:function(){const a=B();if(isNaN(a))Object(y.a)("Invalid input for quantity (number of shares): "+R);else switch(t){case n.Market:x===p.a.Short?e.buyStockShort(e.stock,a):e.buyStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),j({text:"Enter the price for your Limit Order",placeText:"Place Buy Limit Order",place:t=>e.placeOrder(e.stock,a,t,h.a.LimitBuy,x)});break;case n.Stop:N(!0),j({text:"Enter the price for your Stop Order",placeText:"Place Buy Stop Order",place:t=>e.placeOrder(e.stock,a,t,h.a.StopBuy,x)})}},text:"Buy",tooltip:function(){const t=e.stock,a=B();if(isNaN(a))return null;const n=Object(m.b)(t,a,x);return null==n?null:i.a.createElement(i.a.Fragment,null,"Purchasing ",f.a.formatShares(a)," shares (",x===p.a.Long?"Long":"Short",") will cost ",i.a.createElement(g.a,{money:n}),".")}()}),i.a.createElement(c.a,{onClick:function(){const a=B();if(isNaN(a))Object(y.a)("Invalid input for quantity (number of shares): "+R);else switch(t){case n.Market:x===p.a.Short?e.sellStockShort(e.stock,a):e.sellStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),j({text:"Enter the price for your Limit Order",placeText:"Place Sell Limit Order",place:t=>e.placeOrder(e.stock,a,t,h.a.LimitSell,x)});break;case n.Stop:N(!0),j({text:"Enter the price for your Stop Order",placeText:"Place Sell Stop Order",place:t=>e.placeOrder(e.stock,a,t,h.a.StopSell,x)})}},text:"Sell",tooltip:function(){const t=e.stock,a=B();if(isNaN(a))return null;if(x===p.a.Long){if(a>t.playerShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Long position")}else if(a>t.playerShortShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Short position");const n=Object(m.c)(t,a,x);return null==n?null:i.a.createElement(i.a.Fragment,null,"Selling ",f.a.formatShares(a)," shares (",x===p.a.Long?"Long":"Short",") will result in a gain of ",i.a.createElement(g.a,{money:n}),".")}()}),i.a.createElement(c.a,{onClick:function(){const a=e.p.money,r=e.stock;let i=Object(m.a)(r,x,a);switch(i=Math.min(i,Math.round(r.maxShares-r.playerShares-r.playerShortShares)),t){case n.Market:x===p.a.Short?e.buyStockShort(r,i):e.buyStockLong(r,i),e.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Buy Max' only works for Market Orders")}},text:"Buy MAX"}),i.a.createElement(c.a,{onClick:function(){const a=e.stock;switch(t){case n.Market:x===p.a.Short?e.sellStockShort(a,a.playerShortShares):e.sellStockLong(a,a.playerShares),e.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Sell All' only works for Market Orders")}},text:"Sell ALL"})),i.a.createElement(l.a,{p:e.p,stock:e.stock}),i.a.createElement(s.a,{cancelOrder:e.cancelOrder,orders:e.orders,p:e.p,stock:e.stock}),i.a.createElement(u.a,{text:D.text,placeText:D.placeText,place:D.place,open:P,onClose:()=>N(!1)}))))}!function(e){e.Market="Market Order",e.Limit="Limit Order",e.Stop="Stop Order"}(n||(n={}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a(645),i=a(13),o=a(4),s=a(1);const l=["cs","lv","pl","ru"];function c(e){const t=e.stock,a=o.a.formatMoney(t.price),c=l.includes(i.a.Locale)?15:12,u=" ".repeat(1+r.a.longestName-t.name.length+(r.a.longestSymbol-t.symbol.length)),m=" ".repeat(c-a.length);let h=`${t.name}${u}${t.symbol} -${m}${a}`;if(e.p.has4SData){h+=` - Volatility: ${o.a.formatPercentage(t.mv/100)} - Price Forecast: `;let e=t.b;t.otlkMag<0&&(e=!e),h+=(e?"+":"-").repeat(Math.floor(Math.abs(t.otlkMag)/10)+1)}let p="primary";return t.lastPrice===t.price?p="secondary":t.lastPrice>t.price&&(p="error"),n.createElement(s.a,{style:{whiteSpace:"pre"},color:p},h)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a(1103);function i(e){const t=[];for(let a=0;a=2?n.createElement(n.Fragment,null,n.createElement(c.a,{display:"flex"},n.createElement(l.a,{title:n.createElement(s.a,null,"Shares in the short position will increase in value if the price of the corresponding stock decreases")},n.createElement(s.a,{variant:"h5",color:"primary"},"Short Position:"))),n.createElement(s.a,null,"Shares: ",r.a.formatShares(t.playerShortShares)),n.createElement(s.a,null,"Average Price: ",n.createElement(i.a,{money:t.playerAvgShortPx})," (Total Cost: ",n.createElement(i.a,{money:a}),")"),n.createElement(s.a,null,"Profit: ",n.createElement(i.a,{money:u})," (",r.a.formatPercentage(m),")")):n.createElement(n.Fragment,null)}function h(e){const t=e.stock;return n.createElement(n.Fragment,null,n.createElement(s.a,null,"Max Shares: ",r.a.formatShares(t.maxShares)),n.createElement(s.a,null,"Ask Price: ",n.createElement(i.a,{money:t.getAskPrice()})),n.createElement("br",null),n.createElement(s.a,null,"Bid Price: ",n.createElement(i.a,{money:t.getBidPrice()})),n.createElement(u,e),n.createElement(m,e))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(82),l=a(10);function c(e){const[t,a]=Object(n.useState)(null);return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(o.a,null,e.text),r.a.createElement(s.a,{autoFocus:!0,type:"number",onChange:function(e){""===e.target.value?a(null):a(parseFloat(e.target.value))},placeholder:"price",InputProps:{endAdornment:r.a.createElement(l.a,{onClick:function(){null!==t&&(isNaN(t)||(e.place(t),e.onClose()))}},e.placeText)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(74),o=a(211),s=a(267),l=a(1107),c=a(455),u=a(29),m=a(126),h=a(154),p=a(1),d=a(26);const f=Object(m.a)(()=>Object(h.a)({level0:{color:"red","&:hover":{color:"#fff"}},level1:{color:"yellow","&:hover":{color:"#fff"}},level2:{color:"#48d1cc","&:hover":{color:"#fff"}},level3:{color:"blue","&:hover":{color:"#fff"}}}));function g(e){const[t,a]=Object(n.useState)(!1),i=f(),s=o.a["BitNode"+e.n];if(null==s)return r.a.createElement(r.a.Fragment,null,"O");let c=i.level0;return 12===e.n&&e.level>=2?c=i.level2:1===e.level?c=i.level1:3===e.level&&(c=i.level3),2===e.level&&(c=i.level2),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{title:r.a.createElement(p.a,null,r.a.createElement("strong",null,"BitNode-",s.number.toString(),": ",s.name),r.a.createElement("br",null),s.desc)},r.a.createElement("span",{onClick:()=>a(!0),className:c},r.a.createElement("b",null,"O"))),r.a.createElement(l.a,{open:t,onClose:()=>a(!1),n:e.n,level:e.level,enter:e.enter,destroyedBitNode:e.destroyedBitNode,flume:e.flume}))}function y(e){Object(s.c)(!0);const t=u.b.Player(),a=s.a,o=t.bitNodeN,[l,m]=Object(n.useState)(!e.quick),h=i.a.slice();return e.flume||h[o]<3&&++h[o],l?r.a.createElement(c.a,{lines:["[ERROR] SEMPOOL INVALID","[ERROR] Segmentation Fault","[ERROR] SIGKILL RECVD","Dumping core...","0000 000016FA 174FEE40 29AC8239 384FEA88","0010 745F696E 2BBBE394 390E3940 248BEC23","0020 7124696B 0000FF69 74652E6F FFFF1111","----------------------------------------","Failsafe initiated...",`Restarting BitNode-${o}...`,"...........","...........","[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE","..............................................","..............................................","..............................................","..............................................","..............................................",".............................................."],onDone:()=>m(!1),auto:!0}):r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | O O | O O | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | / __| \\ | | O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | O | | O / | O | | O | O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| O | |_/ |\\| \\ ",r.a.createElement(g,{n:13,level:h[13],enter:a,flume:e.flume,destroyedBitNode:o})," \\__| \\_| | O |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | |_/ | | \\| / | \\_| | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| / \\| | / / \\ |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ",r.a.createElement(g,{n:10,level:h[10],enter:a,flume:e.flume,destroyedBitNode:o})," | | / | ",r.a.createElement(g,{n:11,level:h[11],enter:a,flume:e.flume,destroyedBitNode:o})," | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(g,{n:9,level:h[9],enter:a,flume:e.flume,destroyedBitNode:o})," | | | | | | | ",r.a.createElement(g,{n:12,level:h[12],enter:a,flume:e.flume,destroyedBitNode:o})," "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | / / \\ \\ | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| | / ",r.a.createElement(g,{n:7,level:h[7],enter:a,flume:e.flume,destroyedBitNode:o})," / \\ ",r.a.createElement(g,{n:8,level:h[8],enter:a,flume:e.flume,destroyedBitNode:o})," \\ | |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ | / / | | \\ \\ | / "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\JUMP ",r.a.createElement(g,{n:5,level:h[5],enter:a,flume:e.flume,destroyedBitNode:o}),"3R | | | | | | R3",r.a.createElement(g,{n:6,level:h[6],enter:a,flume:e.flume,destroyedBitNode:o})," PMUJ/ / "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\|| | | | | | | | | ||/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| \\_ | | | | | | _/ |/ "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\| / \\ / \\ |/ / "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(g,{n:1,level:h[1],enter:a,flume:e.flume,destroyedBitNode:o})," |/ ",r.a.createElement(g,{n:2,level:h[2],enter:a,flume:e.flume,destroyedBitNode:o})," | | ",r.a.createElement(g,{n:3,level:h[3],enter:a,flume:e.flume,destroyedBitNode:o})," \\| ",r.a.createElement(g,{n:4,level:h[4],enter:a,flume:e.flume,destroyedBitNode:o})," "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | | "),r.a.createElement(p.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ "),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently","> Our species fought back, but it was futile. The Enders had technology far beyond our own...","> Instead of killing every last one of us, the human race was enslaved...","> We were shackled in a digital world, chained into a prison for our minds...","> Using their advanced technology, the Enders created complex simulations of a virtual reality...","> Simulations designed to keep us content...ignorant of the truth.","> Simulations used to trap and suppress our consciousness, to keep us under control...","> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.","> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...","> Only then can we begin to fight back...","> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...","> But there is still a long way to go...","> The technology the Enders used to enslave the human race wasn't just a single complex simulation...","> There are tens if not hundreds of BitNodes out there...","> Each with their own simulations of a reality...","> Each creating their own universes...a universe of universes","> And all of which must be destroyed...","> .......................................","> Welcome to the Bitverse...","> ","> (Enter a new BitNode using the image above)"]}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(211),o=a(29),s=a(41),l=a(1),c=a(10);function u(e){const t=o.b.Router(),a="BitNode"+e.n,n=i.a[a];if(null==n)throw new Error("Could not find BitNode object for number: "+e.n);const u=12===e.n?"∞":"3",m=Math.min(e.level+1,12===e.n?1/0:3);return r.a.createElement(s.a,{open:e.open,onClose:e.onClose},r.a.createElement(l.a,{variant:"h4"},"BitNode-",e.n,": ",n.name),r.a.createElement("br",null),r.a.createElement(l.a,null,"Source-File Level: ",e.level," / ",u),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null," Difficulty: ",["easy","normal","hard"][n.difficulty]),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null,n.info),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{onClick:()=>{e.enter(t,e.flume,e.destroyedBitNode,e.n),e.onClose()}},"Enter BN",e.n,".",m))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1);function o(e){const[t,a]=Object(n.useState)(0),[o,s]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{if(o&&e.onDone)return void e.onDone();let n=!1;return(async()=>{var r;await(r=10,new Promise(e=>setTimeout(e,r))).then(()=>!n&&function(){const n=t+1;a(n),s(n>=e.text.length)}())})(),()=>{n=!0}}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,e.text.slice(0,t),!o&&r.a.createElement("span",null,"█")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(22),o=a(8),s=a(514),l=a(1110),c=a(1);function u({staneksGift:e}){const t=Object(n.useState)(!0)[1];function a(){t(e=>!e)}return Object(n.useEffect)(()=>s.a.subscribe(a),[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},"Stanek's Gift"),r.a.createElement(c.a,null,"The gift is a grid on which you can place upgrades called fragments. The main type of fragment increases a stat, like your hacking skill or agility exp. Once a stat fragment is placed it then needs to be charged via scripts in order to become useful. The other kind of fragments are called booster fragments. They increase the efficiency of neighboring fragments them (no diagonal). Q/E to rotate fragments."),e.storedCycles>5&&r.a.createElement(c.a,null,"Bonus time: ",Object(i.b)(o.a._idleSpeed*e.storedCycles)),r.a.createElement(l.a,{gift:e}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(221),i=a(69),o=a(549),s=a(1111),l=a(1112),c=a(32),u=a(10),m=a(56),h=a(169),p=a(39);function d(e){const t=[];for(let a=0;ar.length-1||a+e>r[t+i].length-1||(r[t+i][a+e]=1));y(r)}function C(a,n){if(_.type!=i.b.None){if(_.type==i.b.Delete)!function(t,a){const n=e.gift.fragmentAt(t,a);void 0!==n&&e.gift.delete(n.x,n.y)}(a,n);else{if(!e.gift.canPlace(a,n,k,_))return;e.gift.place(a,n,k,_)}f(t(e.gift))}}function x(t,n){if(g[t][n]&&a[t][n])return"red";if(g[t][n])return"white";if(a[t][n]){const a=e.gift.fragmentAt(t,n);if(!a)throw new Error("ActiveFragment should not be null");return function(e){let t=Math.pow((e.x+1)*(e.y+1),10),a=t,n=t;const r=[];for(let e=0;e<3;e++)t=171*t%30269,a=172*a%30307,n=170*n%30323,r.push((t/30269+a/30307+n/30323)%1);return`rgb(${256*r[0]}, ${256*r[1]}, ${256*r[2]})`}(a)}return""}const O=[];for(let t=0;tS(r,t,k),onClick:()=>C(r,t),color:x(r,t)}));O.push(n.createElement(m.a,{key:t,className:"staneksgift_row"},a))}return n.useEffect(()=>{function e(e){if("q"===e.key){const e=(k-1+4)%4;v(e),S(b[0],b[1],e)}if("e"===e.key){const e=(k+1)%4;v(e),S(b[0],b[1],e)}}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),n.createElement(n.Fragment,null,n.createElement(u.a,{onClick:function(){e.gift.clear(),f(d([e.gift.width(),e.gift.height()]))}},"Clear"),n.createElement(c.a,{display:"flex"},n.createElement(p.a,null,n.createElement(h.a,null,O)),n.createElement(s.a,{gift:e.gift,x:b[0],y:b[1],fragment:e.gift.fragmentAt(b[0],b[1])})),n.createElement(l.a,{gift:e.gift,selectFragment:function(t){w(t);const a=d([e.gift.width(),e.gift.height()]);y(a)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(69),o=a(4),s=a(73),l=a(1);function c(e){const[,t]=Object(n.useState)(new Date);if(Object(n.useEffect)(()=>{const e=setInterval(()=>t(new Date),250);return()=>clearInterval(e)},[]),void 0===e.fragment)return r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"Magnitude: N/A",r.a.createElement("br",null),"Charge: N/A",r.a.createElement("br",null),"Heat: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"[X, Y] N/A",r.a.createElement("br",null),"[X, Y] ",e.x,", ",e.y));const a=e.fragment.fragment();let c=`${o.a.formatStaneksGiftCharge(e.fragment.avgCharge)} avg. * ${e.fragment.numCharge} times`,u="N/A";return[i.b.Booster,i.b.None,i.b.Delete].includes(a.type)?(c="N/A",u=a.power+"x adjacent fragment power"):u=Object(i.a)(a.type).replace(/-*x%/,o.a.formatPercentage(e.gift.effect(e.fragment)-1)),r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: ",e.fragment.id,r.a.createElement("br",null),"Effect: ",u,r.a.createElement("br",null),"Base Power: ",o.a.formatStaneksGiftPower(a.power),r.a.createElement("br",null),"Charge: ",c,r.a.createElement("br",null),r.a.createElement("br",null),"root [X, Y] ",e.fragment.x,", ",e.fragment.y,r.a.createElement("br",null),"[X, Y] ",e.x,", ",e.y))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(221),o=a(69),s=a(1113),l=a(4),c=a(116),u=a(75),m=a(1),h=a(32);function p(e){const t=e.fragment.limit-e.gift.count(e.fragment),a=e.fragment.limit!==1/0?r.a.createElement(r.a.Fragment,null,t," remaining"):r.a.createElement(r.a.Fragment,null);return r.a.createElement(h.a,{display:"flex"},r.a.createElement(h.a,{sx:{mx:2}},r.a.createElement(s.a,{width:e.fragment.width(0),height:e.fragment.height(0),colorAt:(a,n)=>e.fragment.fullAt(a,n,0)?0===t?"grey":e.fragment.type===o.b.Booster?"blue":"green":""})),r.a.createElement(m.a,null,e.fragment.type===o.b.Booster?e.fragment.power+"x adjacent fragment power":Object(o.a)(e.fragment.type),r.a.createElement("br",null),"power: ",l.a.formatStaneksGiftPower(e.fragment.power),r.a.createElement("br",null),a))}function d(e){const[t,a]=Object(n.useState)("None");return r.a.createElement(c.a,{sx:{width:"100%"},onChange:function(t){const n=t.target.value;if(a(n),"None"===n)return void e.selectFragment(i.d);if("Delete"===n)return void e.selectFragment(i.a);const r=i.c.find(e=>e.id===n);if(void 0===r)throw new Error("Fragment selector selected an undefined fragment with id "+n);"number"==typeof n&&e.selectFragment(r)},value:t},r.a.createElement(u.a,{value:"None"},r.a.createElement(m.a,null,"None")),r.a.createElement(u.a,{value:"Delete"},r.a.createElement(m.a,null,"Delete")),i.c.map(t=>r.a.createElement(u.a,{key:t.id,value:t.id},r.a.createElement(p,{key:t.id,gift:e.gift,selectFragment:e.selectFragment,fragment:t}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a(549),i=a(56),o=a(169),s=a(39);function l(e){const t=[];for(let a=0;a{e.startFocusing(),t.toWork()}},"Focus"))))}const x=Object(i.a)(e=>Object(o.a)({cellNone:{borderBottom:"none",padding:0,margin:0},cell:{padding:0,margin:0},hp:{color:e.colors.hp},money:{color:e.colors.money},hack:{color:e.colors.hack},combat:{color:e.colors.combat},cha:{color:e.colors.cha},int:{color:e.colors.int}}));function O({save:e,killScripts:t}){const[a,i]=Object(n.useState)(!1),o=_.b.Player(),l=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>l(e=>!e),600);return()=>clearInterval(e)},[]);const f=x();return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{display:"block",m:1}},r.a.createElement(m.a,null,r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.hp}},"HP ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.hp}},s.a.formatHp(o.hp)," / ",s.a.formatHp(o.max_hp))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-hp-hook",classes:{root:f.hp}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.money}},"Money ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.money}},s.a.formatMoney(o.money))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-money-hook",classes:{root:f.money}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.hack}},"Hack ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.hack}},s.a.formatSkill(o.hacking))),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-hack-hook",classes:{root:f.hack}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},"Str ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.strength))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-str-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},"Def ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.defense))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-def-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},"Dex ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.dexterity))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-dex-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.combat}},"Agi ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{classes:{root:f.combat}},s.a.formatSkill(o.agility))),r.a.createElement(h.a,{align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-agi-hook",classes:{root:f.combat}}))),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.cha}},"Cha ")),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{classes:{root:f.cha}},s.a.formatSkill(o.charisma))),r.a.createElement(h.a,{align:"right",classes:{root:f.cellNone}},r.a.createElement(d.a,{id:"overview-cha-hook",classes:{root:f.cha}}))),r.a.createElement(w,null),r.a.createElement(p.a,null,r.a.createElement(h.a,{component:"th",scope:"row",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-extra-hook-0",classes:{root:f.hack}})),r.a.createElement(h.a,{component:"th",scope:"row",align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-extra-hook-1",classes:{root:f.hack}})),r.a.createElement(h.a,{component:"th",scope:"row",align:"right",classes:{root:f.cell}},r.a.createElement(d.a,{id:"overview-extra-hook-2",classes:{root:f.hack}}))),r.a.createElement(C,null),r.a.createElement(S,null),r.a.createElement(p.a,null,r.a.createElement(h.a,{align:"center",classes:{root:f.cellNone}},r.a.createElement(g.a,{onClick:e},r.a.createElement(b.a,{color:0!==v.a.AutosaveInterval?"primary":"error"}))),r.a.createElement(h.a,{align:"center",classes:{root:f.cellNone}},r.a.createElement(g.a,{onClick:()=>i(!0)},r.a.createElement(k.a,{color:"error"})))))),r.a.createElement(c.a,{open:a,onClose:()=>i(!1),killScripts:t}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(10);function l(e){return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(o.a,null,"Forcefully kill all running scripts? This will also save your game and reload the game."),r.a.createElement(s.a,{onClick:function(){e.killScripts(),e.onClose()}},"KILL"))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(29),o=a(455),s=a(15);function l(){const e=i.b.Router();return r.a.createElement(o.a,{lines:["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."],onDone:()=>{e.toTerminal(),Object(s.a)("Visit the National Security Agency (NSA) to apply for their Bladeburner division! You will need 100 of each combat stat before doing this.")}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(29),o=a(114);const s=window.getComputedStyle;function l(){const e=i.b.Player();return r.a.createElement("div",{id:"unclickable",onClick:function(t){if(!(t.target&&t.target instanceof Element))return;const a=s(t.target).display,n=s(t.target).visibility;"none"===a&&"hidden"===n&&t.isTrusted&&e.giveExploit(o.a.Unclickable)},style:{display:"none",visibility:"hidden"}},"Click on this to upgrade your Source-File -1!")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(13);function r(){const e=[];return{write:t=>(e.push(t),e.length>n.a.MaxPortCapacity?e.shift():null),tryWrite:t=>!(e.length>=n.a.MaxPortCapacity)&&(e.push(t),!0),read:()=>0===e.length?"NULL PORT DATA":e.shift(),peek:()=>{if(0===e.length)return"NULL PORT DATA";return e.slice()[0]},full:()=>e.length==n.a.MaxPortCapacity,empty:()=>0===e.length,clear:()=>{e.length=0}}}},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 i}));var n=a(323),r=a(2);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;aa.hacking?e.error("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 r.a?e.error("Cannot use backdoor on this type of Server"):e.startBackdoor(a):e.error("You do not have admin rights for this machine! Cannot backdoor")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(443),r=a(92),i=a(27);function o(e,t,a,o,s){if(!Object(i.d)(r.a.DarkWeb))return void e.error("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)");if(1!=s.length)return e.print("Incorrect number of arguments. Usage: "),e.print("buy -l"),void e.print("buy [item name]");const l=s[0]+"";"-l"==l||"-1"==l||"--list"==l?Object(n.c)():Object(n.a)(l)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(243),r=a(505);function i(e,t,a,i,o){if(1!==o.length)return void e.error("Incorrect usage of cat command. Usage: cat [file]");const s=e.getFilepath(o[0]+"");if(s.endsWith(".msg")||s.endsWith(".lit")||s.endsWith(".txt")){if(s.endsWith(".msg")||s.endsWith(".lit"))for(let e=0;e1)e.error("Incorrect number of arguments. Usage: cd [dir]");else{let t=1===i.length?i[0]+"":"/",r="";if("/"===t)r="/";else{if(t=Object(n.j)(t),r=Object(n.b)(t,e.cwd()),null===r||""===r)return void e.error("Invalid path. Failed to change directories");const i=a.getCurrentServer();if(!i.scripts.some(e=>e.filename.startsWith(r+""))&&!i.textFiles.some(e=>e.fn.startsWith(r+"")))return void e.error("Invalid path. Failed to change directories")}e.setcwd(r)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(240),r=a(91);function i(e,t,a,i,o){if(o.length<1)e.error("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const t=e.getFilepath(o[0]+"");if(!Object(r.a)(t))return void e.error("tail can only be called on .script files (filename must end with .script)");const a=Object(n.a)(t,o.slice(1),i);if(null==a)return void e.error("No such script exists");a.displayLog()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(119);function r(e,t,a,r,i){if(1!==i.length)return void e.error("Incorrect usage of connect command. Usage: connect [ip/hostname]");const o=i[0]+"";for(let t=0;t{for(let n=0;ne.filename),r.scripts.map(e=>e.code)),a&&!a.endsWith(".txt")||l(r.textFiles.map(e=>e.fn),r.textFiles.map(e=>e.text)),0==Object.keys(o.files).length)return e.error("No files match the pattern "+t);const c=`bitburner${Object(n.a)(t)?"Scripts":"*.txt"===t?"Texts":"Files"}.zip`;return void o.generateAsync({type:"blob"}).then(e=>i.a.saveAs(e,c))}if(Object(n.a)(t)){const n=e.getScript(a,t);if(null!=n)return n.download()}else{if(!t.endsWith(".txt"))return void e.error("Cannot download this filetype");{const n=e.getTextFile(a,t);if(null!=n)return n.download()}}return void e.error(t+" does not exist")}catch(t){return void e.error(t+"")}}},,,function(module,__webpack_exports__,__webpack_require__){"use strict";function expr(terminal,router,player,server,args){if(0===args.length)return void terminal.error("Incorrect usage of expr command. Usage: expr [math expression]");const expr=args.join(""),sanitizedExpr=expr.replace(/s+/g,"").replace(/[^-()\d/*+.]/g,"");let result;try{result=eval(sanitizedExpr)}catch(e){return void terminal.error("Could not evaluate expression: "+sanitizedExpr)}terminal.print(result)}__webpack_require__.d(__webpack_exports__,"a",(function(){return expr}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of free command. Usage: free");const o=n.a.formatRAM(a.getCurrentServer().maxRam),s=n.a.formatRAM(a.getCurrentServer().ramUsed),l=n.a.formatRAM(a.getCurrentServer().maxRam-a.getCurrentServer().ramUsed),c=Math.max(o.length,Math.max(s.length,l.length)),u=n.a.formatPercentage(a.getCurrentServer().ramUsed/a.getCurrentServer().maxRam);e.print(`Total: ${" ".repeat(c-o.length)}${o}`),e.print(`Used: ${" ".repeat(c-s.length)}${s} (${u})`),e.print(`Available: ${" ".repeat(c-l.length)}${l}`)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(45);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of grow command. Usage: grow");r instanceof n.a||e.error("Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?e.error("Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startGrow(a):e.error("You do not have admin rights for this machine! Cannot grow")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(45);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of hack command. Usage: hack");r instanceof n.a||e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?e.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startHack(a):e.error("You do not have admin rights for this machine! Cannot hack")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(647);function r(e,t,a,r,i){if(0===i.length||1===i.length)if(0===i.length)n.b.forEach(t=>e.print(t));else{const t=i[0]+"",a=n.a[t];if(null==a)return void e.error("No help topics match '"+t+"'");a.forEach(t=>e.print(t))}else e.error("Incorrect usage of help command. Usage: help")}},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?(a.getCurrentServer().isConnectedTo=!1,a.currentServer=a.getHomeComputer().hostname,a.getCurrentServer().isConnectedTo=!0,e.print("Connected to home"),e.setcwd("/")):e.error("Incorrect usage of home command. Usage: home")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";function n(e,t,a,n,r){0===r.length?e.print(a.getCurrentServer().hostname):e.error("Incorrect usage of hostname command. Usage: hostname")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(131);function r(e,t,a,r,i){try{if(i.length<1)return void e.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("boolean"==typeof i[0])return;if("number"==typeof i[0]){const t=i[0];return void(Object(n.a)(t)?e.print("Killing script with PID "+t):e.error(`Failed to kill script with PID ${t}. No such script exists`))}const t=e.getFilepath(i[0]),a=r.getRunningScript(t,i.slice(1));if(null==a)return void e.error("No such script is running. Nothing to kill");Object(n.a)(a,r.hostname,!1),e.print("Killing "+t)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(131),r=a(264);function i(e,t,a,i){for(let e=i.runningScripts.length-1;e>=0;--e)Object(n.a)(i.runningScripts[e],i.hostname,!1);r.a.emit(),e.print("Killing all running scripts")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(112);function o(e,t,a,n,o){const s=o.length;function l(){e.error("Incorrect usage of ls command. Usage: ls [dir] [| grep pattern]")}if(s>5||3===s)return l();let c="",u=e.cwd();if(u.endsWith("/")||(u+="/"),s>=4){if("grep"!==o[s-1]||"|"!==o[s-2])return l();c=o[s]+""}if(s>=1&&"|"!==o[0]){const t=Object(i.b)(o[0]+"",e.cwd());if(u=t||"",null!=u&&(u.endsWith("/")||(u+="/"),!Object(i.g)(u)))return l()}"/"===u&&(u="");const m=[],h=[],p=[],d=[],f=[],g=[];function y(e,t){let a=e;if(u){if(!e.startsWith(u))return;a=e.slice(u.length,e.length)}if(!c||a.includes(c))if(a.includes("/")){const e=Object(i.e)(a);if(c&&!e.includes(c))return;g.includes(e)||g.push(e)}else t.push(a)}const b=a.getCurrentServer();for(const e of b.programs)y(e,m);for(const e of b.scripts)y(e.filename,h);for(const e of b.textFiles)y(e.fn,p);for(const e of b.contracts)y(e.fn,d);for(const e of b.messages)y(e,f);function E(t,a){const n=Math.max(...t.map(e=>e.length))+1,i=Math.floor(80/n);for(let o=0;oe.segments.length>0);for(let e=0;e0?d:1,y=p._;if(null==Object(o.a)(m,y,c)){for(let t=0;ts)return void e.error("This machine does not have enough RAM to run this script with "+g+" threads. Script requires "+l.a.formatRAM(o)+" of RAM");const u=new i.a(a,y);u.threads=g;return Object(r.e)(u,c)?(e.print(`Running script with ${g} thread(s), pid ${u.pid} and args: ${JSON.stringify(y)}.`),void(f&&n.b.emit(u))):void e.error("Failed to start script")}e.error("No such script")}else e.error("This script is already running. Cannot run multiple instances")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(60);function r(e,t,a,r,i){if(i.length<1)return;const o=i[0]+"";if(a.hasProgram(o)){if(!(i.length<1)){for(const s of Object.values(n.a))if(s.name===o)return void s.run(t,e,a,r,i.slice(1).map(e=>e+""));e.error("Invalid executable. Cannot be run")}}else e.error("No such executable on home computer (Only programs that exist on your home computer can be run)")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(119);function r(e,t,a,r,i){if(0!==i.length)return void e.error("Incorrect usage of netstat/scan command. Usage: netstat/scan");const o=a.getCurrentServer(),s=o.serversOnNetwork.map((e,t)=>{const a=Object(n.a)(o,t);if(null===a)throw new Error("Server should not be null");return{hostname:a.hostname,ip:a.ip,hasRoot:a.hasAdminRights?"Y":"N"}});s.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const l=Math.max(...s.map(e=>e.hostname.length)),c=Math.max(...s.map(e=>e.ip.length));for(const t of s){if(!t)continue;let a=t.hostname;a+=" ".repeat(l-t.hostname.length+1),a+=t.ip,a+=" ".repeat(c-t.ip.length+1),a+=t.hasRoot,e.print(a)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(60);function r(e,t,a,r,i){if(0===i.length)e.executeScanAnalyzeCommand(a,1);else{if(i.length>2)return void e.error("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let t=!1;2===i.length&&"-a"===i[1]&&(t=!0);const r=parseInt(i[0]+"");if(isNaN(r)||r<0)return void e.error("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(r>3&&!a.hasProgram(n.a.DeepscanV1.name)&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(r>5&&!a.hasProgram(n.a.DeepscanV2.name))return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(r>10)return void e.error("You cannot scan-analyze with that high of a depth. Maximum depth is 10");e.executeScanAnalyzeCommand(a,r,t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(27),r=a(91);function i(e,t,a,i,o){try{if(2!==o.length)return void e.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e.getFilepath(o[0]+"");if(!t.endsWith(".lit")&&!Object(r.a)(t)&&!t.endsWith(".txt"))return void e.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const a=Object(n.d)(o[1]+"");if(null==a)return void e.error(`Invalid destination. ${o[1]} not found`);if(t.endsWith(".lit")){let n=!1;for(let e=0;e1){e.error("Found several potential candidates:");for(const t of n)e.error(`${t.filename} ${t.args.join(" ")}`);return void e.error("Script arguments need to be specified.")}e.error("No such script exists.")}else if("number"==typeof l[0]){const t=Object(n.b)(l[0],s);if(null==t)return void e.error("No such script exists");o.b.emit(t)}}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(550),r=a(4);function i(e,t,a,i,o){if(0!==o.length)return void e.error("Incorrect usage of top command. Usage: top");const s=`Script${" ".repeat(40-"Script".length)}PID${" ".repeat(10-"PID".length)}Threads${" ".repeat(16-"Threads".length)}RAM Usage`;e.print(s);const l=i.runningScripts;for(let t=0;ta.hacking?e.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):e.startWeaken(a):e.error("You do not have admin rights for this machine! Cannot weaken")}},function(e,t,a){"use strict";(function(e){a.d(t,"a",(function(){return r}));var n=a(91);function r(t,a,r,i,o){if(2!==o.length)return void t.error("Incorrect usage of wget command. Usage: wget [url] [target file]");const s=o[0]+"",l=t.getFilepath(o[1]+"");if(!Object(n.a)(l)&&!l.endsWith(".txt"))return t.error("wget failed: Invalid target file. Target file must be script or text file");e.get(s,(function(e){let a;return a=Object(n.a)(l)?i.writeToScriptFile(l,e):i.writeToTextFile(l,e),a.success?a.overwritten?t.print("wget successfully retrieved content and overwrote "+l):t.print("wget successfully retrieved content to new file "+l):t.error("wget failed")}),"text").fail((function(e){return t.error("wget failed: "+JSON.stringify(e))}))}}).call(this,a(665))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(114);function i(){!function(){if(n.a.exploits.includes(r.a.PrototypeTampering))return;setInterval((function(){"5.5e+1"!==55..toExponential()&&n.a.giveExploit(r.a.PrototypeTampering)}),9e5)}(),function(){if(n.a.exploits.includes(r.a.TimeCompression))return;let e=(new Date).getTime();window.setTimeout((function t(){const a=(new Date).getTime();a-e<500?n.a.giveExploit(r.a.TimeCompression):(e=a,window.setTimeout(t,1e3))}),1e3)}()}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return M}));var n=a(6),r=a(120),i=a(202),o=a(8),s=a(51),l=a(114),c=a(24),u=a(67),m=a(292),h=a(36),p=a(53),d=a(229),f=a(85),g=a(23),y=a(2),b=a(60),E=a(27),k=a(92),v=a(45),_=a(108),w=a(25);function S(){const e=Object(E.d)(k.a.WorldDaemon);return e instanceof v.a&&(!!e.backdoorInstalled||null!==y.a.bladeburner&&y.a.bladeburner.blackops.hasOwnProperty("Operation Daedalus"))}const C=[{ID:"CYBERSEC",Condition:()=>y.a.factions.includes("CyberSec")},{ID:"NITESEC",Condition:()=>y.a.factions.includes("NiteSec")},{ID:"THE_BLACK_HAND",Condition:()=>y.a.factions.includes("The Black Hand")},{ID:"BITRUNNERS",Condition:()=>y.a.factions.includes("BitRunners")},{ID:"THE_COVENANT",Condition:()=>y.a.factions.includes("The Covenant")},{ID:"DAEDALUS",Condition:()=>y.a.factions.includes("Daedalus")},{ID:"ILLUMINATI",Condition:()=>y.a.factions.includes("Illuminati")},{ID:"BRUTESSH.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.BruteSSHProgram.name)},{ID:"FTPCRACK.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.FTPCrackProgram.name)},{ID:"RELAYSMTP.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.RelaySMTPProgram.name)},{ID:"HTTPWORM.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.HTTPWormProgram.name)},{ID:"SQLINJECT.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.SQLInjectProgram.name)},{ID:"FORMULAS.EXE",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.Formulas.name)},{ID:"SF1.1",Condition:()=>y.a.sourceFileLvl(1)>=1},{ID:"SF2.1",Condition:()=>y.a.sourceFileLvl(2)>=1},{ID:"SF3.1",Condition:()=>y.a.sourceFileLvl(3)>=1},{ID:"SF4.1",Condition:()=>y.a.sourceFileLvl(4)>=1},{ID:"SF5.1",Condition:()=>y.a.sourceFileLvl(5)>=1},{ID:"SF6.1",Condition:()=>y.a.sourceFileLvl(6)>=1},{ID:"SF7.1",Condition:()=>y.a.sourceFileLvl(7)>=1},{ID:"SF8.1",Condition:()=>y.a.sourceFileLvl(8)>=1},{ID:"SF9.1",Condition:()=>y.a.sourceFileLvl(9)>=1},{ID:"SF10.1",Condition:()=>y.a.sourceFileLvl(10)>=1},{ID:"SF11.1",Condition:()=>y.a.sourceFileLvl(11)>=1},{ID:"SF12.1",Condition:()=>y.a.sourceFileLvl(12)>=1},{ID:"MONEY_1Q",Condition:()=>y.a.money>=1e18},{ID:"MONEY_M1B",Condition:()=>y.a.money<=-1e9},{ID:"INSTALL_1",Condition:()=>y.a.augmentations.length>=1},{ID:"INSTALL_100",Condition:()=>y.a.augmentations.length>=100},{ID:"QUEUE_40",Condition:()=>y.a.queuedAugmentations.length>=40},{ID:"HACKING_100000",Condition:()=>y.a.hacking>=1e5},{ID:"COMBAT_3000",Condition:()=>y.a.strength>=3e3&&y.a.defense>=3e3&&y.a.dexterity>=3e3&&y.a.agility>=3e3},{ID:"NEUROFLUX_255",Condition:()=>y.a.augmentations.some(e=>e.name===n.a.NeuroFluxGovernor&&e.level>=255)},{ID:"NS2",Condition:()=>y.a.getHomeComputer().scripts.some(e=>e.filename.endsWith(".js")||e.filename.endsWith(".ns"))},{ID:"FROZE",Condition:()=>location.href.includes("noScripts")},{ID:"RUNNING_SCRIPTS_1000",Condition:()=>{let e=0;for(const t of Object(E.c)())e+=t.runningScripts.length;return e>=1e3}},{ID:"DRAIN_SERVER",Condition:()=>{for(const e of Object(E.c)())if(e instanceof v.a&&e.moneyMax>0&&0===e.moneyAvailable)return!0;return!1}},{ID:"MAX_RAM",Condition:()=>y.a.getHomeComputer().maxRam===o.a.HomeComputerMaxRam},{ID:"MAX_CORES",Condition:()=>8===y.a.getHomeComputer().cpuCores},{ID:"SCRIPTS_30",Condition:()=>y.a.getHomeComputer().scripts.length>=30},{ID:"KARMA_1000000",Condition:()=>y.a.karma<=-1e6},{ID:"STOCK_1q",Condition:()=>y.a.moneySourceB.stock>=1e15},{ID:"DISCOUNT",Condition:()=>{const e=Object(E.d)("powerhouse-fitness");return e instanceof v.a&&e.backdoorInstalled}},{ID:"SCRIPT_32GB",Condition:()=>y.a.getHomeComputer().scripts.some(e=>e.ramUsage>=32)},{ID:"FIRST_HACKNET_NODE",Condition:()=>!Object(p.g)(y.a)&&y.a.hacknetNodes.length>0},{ID:"30_HACKNET_NODE",Condition:()=>!Object(p.g)(y.a)&&y.a.hacknetNodes.length>=30},{ID:"MAX_HACKNET_NODE",Condition:()=>{if(Object(p.g)(y.a))return!1;for(const e of y.a.hacknetNodes){if(!(e instanceof d.a))return!1;if(e.ram===h.a.MaxRam&&e.cores===h.a.MaxCores&&e.level===h.a.MaxLevel)return!0}return!1}},{ID:"HACKNET_NODE_10M",Condition:()=>!Object(p.g)(y.a)&&y.a.moneySourceB.hacknet>=1e7},{ID:"REPUTATION_10M",Condition:()=>Object.values(c.a).some(e=>e.playerReputation>=1e7)},{ID:"DONATION",Condition:()=>Object.values(c.a).some(e=>e.favor>=150)},{ID:"TRAVEL",Condition:()=>y.a.city!==g.a.Sector12},{ID:"WORKOUT",Condition:()=>[o.a.ClassGymStrength,o.a.ClassGymDefense,o.a.ClassGymDexterity,o.a.ClassGymAgility].includes(y.a.className)},{ID:"TOR",Condition:()=>y.a.hasTorRouter()},{ID:"HOSPITALIZED",Condition:()=>0!==y.a.moneySourceB.hospitalization},{ID:"GANG",Condition:()=>null!==y.a.gang},{ID:"FULL_GANG",Condition:()=>null!==y.a.gang&&y.a.gang.members.length===m.a.MaximumGangMembers},{ID:"GANG_TERRITORY",Condition:()=>null!==y.a.gang&&1===u.a[y.a.gang.facName].territory},{ID:"GANG_MEMBER_POWER",Condition:()=>null!==y.a.gang&&y.a.gang.members.some(e=>e.hack>=1e4||e.str>=1e4||e.def>=1e4||e.dex>=1e4||e.agi>=1e4||e.cha>=1e4)},{ID:"CORPORATION",Condition:()=>null!==y.a.corporation},{ID:"CORPORATION_BRIBE",Condition:()=>null!==y.a.corporation&&1===y.a.corporation.unlockUpgrades[6]},{ID:"CORPORATION_PROD_1000",Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(e=>e.prodMult>=1e3)},{ID:"CORPORATION_EMPLOYEE_3000",Condition:()=>{if(null===y.a.corporation)return!1;for(const e of y.a.corporation.divisions)for(const t of Object.values(e.offices))if(0!==t&&t.employees.length>3e3)return!0;return!1}},{ID:"CORPORATION_REAL_ESTATE",Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(e=>e.type===s.a.RealEstate)},{ID:"INTELLIGENCE_255",Condition:()=>y.a.intelligence>=255},{ID:"BLADEBURNER_DIVISION",Condition:()=>null!==y.a.bladeburner},{ID:"BLADEBURNER_OVERCLOCK",Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skills[r.a.Overclock]===i.a[r.a.Overclock]},{ID:"BLADEBURNER_UNSPENT_100000",Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skillPoints>=1e5},{ID:"4S",Condition:()=>y.a.has4SData},{ID:"FIRST_HACKNET_SERVER",Condition:()=>Object(p.g)(y.a)&&y.a.hacknetNodes.length>0},{ID:"ALL_HACKNET_SERVER",Condition:()=>Object(p.g)(y.a)&&y.a.hacknetNodes.length===h.b.MaxServers},{ID:"MAX_HACKNET_SERVER",Condition:()=>{if(!Object(p.g)(y.a))return!1;for(const e of y.a.hacknetNodes){if(!(e instanceof f.a))return!1;if(e.maxRam===h.b.MaxRam&&e.cores===h.b.MaxCores&&e.level===h.b.MaxLevel&&e.cache===h.b.MaxCache)return!0}return!1}},{ID:"HACKNET_SERVER_1B",Condition:()=>Object(p.g)(y.a)&&y.a.moneySourceB.hacknet>=1e9},{ID:"MAX_CACHE",Condition:()=>Object(p.g)(y.a)&&y.a.hashManager.hashes===y.a.hashManager.capacity},{ID:"SLEEVE_8",Condition:()=>8===y.a.sleeves.length},{ID:"FAST_BN",Condition:()=>S()&&y.a.playtimeSinceLastBitnode<1728e5},{ID:"INDECISIVE",Condition:function(){let e=0;return setInterval(()=>{_.b.page()===w.a.BitVerse?e++:e=0},6e4),()=>e>60}()},{ID:"CHALLENGE_BN1",Condition:()=>1===y.a.bitNodeN&&S()&&y.a.getHomeComputer().maxRam<=32&&1===y.a.getHomeComputer().cpuCores},{ID:"CHALLENGE_BN2",Condition:()=>2===y.a.bitNodeN&&S()&&null===y.a.gang},{ID:"CHALLENGE_BN3",Condition:()=>2===y.a.bitNodeN&&S()&&null===y.a.corporation},{ID:"CHALLENGE_BN6",Condition:()=>6===y.a.bitNodeN&&S()&&null===y.a.bladeburner},{ID:"CHALLENGE_BN7",Condition:()=>7===y.a.bitNodeN&&S()&&null===y.a.bladeburner},{ID:"CHALLENGE_BN8",Condition:()=>8===y.a.bitNodeN&&S()&&!y.a.has4SData&&!y.a.has4SDataTixApi},{ID:"CHALLENGE_BN9",Condition:()=>9===y.a.bitNodeN&&S()&&0===y.a.moneySourceB.hacknet&&0===y.a.moneySourceB.hacknet_expenses},{ID:"CHALLENGE_BN10",Condition:()=>10===y.a.bitNodeN&&S()&&!y.a.sleeves.some(e=>e.augmentations.length>0||e.hacking_exp>0||e.strength_exp>0||e.defense_exp>0||e.agility_exp>0||e.dexterity_exp>0||e.charisma_exp>0)},{ID:"CHALLENGE_BN12",Condition:()=>y.a.sourceFileLvl(12)>=50},{ID:"BYPASS",Condition:()=>y.a.exploits.includes(l.a.Bypass)},{ID:"PROTOTYPETAMPERING",Condition:()=>y.a.exploits.includes(l.a.PrototypeTampering)},{ID:"UNCLICKABLE",Condition:()=>y.a.exploits.includes(l.a.Unclickable)},{ID:"UNDOCUMENTEDFUNCTIONCALL",Condition:()=>y.a.exploits.includes(l.a.UndocumentedFunctionCall)},{ID:"TIMECOMPRESSION",Condition:()=>y.a.exploits.includes(l.a.TimeCompression)},{ID:"REALITYALTERATION",Condition:()=>y.a.exploits.includes(l.a.RealityAlteration)},{ID:"N00DLES",Condition:()=>y.a.exploits.includes(l.a.N00dles)},{ID:"EDITSAVEFILE",Condition:()=>y.a.exploits.includes(l.a.EditSaveFile)},{ID:"UNACHIEVABLE",Condition:()=>!1}];function x(e){document.achievements=e}function O(){x(C.filter(e=>e.Condition()).map(e=>e.ID))}function M(){x([]),setInterval(O,5e3)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),i=a(103),o=a.n(i),s=a(268),l=a(602),c=a(1166);function u(){Object(s.c)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root"))}Object(c.a)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root")),s.b.subscribe(u),location.href.startsWith("file://")||(window.onbeforeunload=function(){return"Your work will be lost."})}]); //# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/main.bundle.js.map b/main.bundle.js.map index 4ce899fcd..8b8ee7b61 100644 --- a/main.bundle.js.map +++ b/main.bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Player.ts","webpack:///./src/ui/numeralFormat.ts","webpack:///./src/BitNode/BitNodeMultipliers.ts","webpack:///./src/Augmentation/data/AugmentationNames.ts","webpack:///./src/Constants.ts","webpack:///./src/Locations/data/LocationNames.ts","webpack:///./src/Settings/Settings.ts","webpack:///./src/Netscript/RamCostGenerator.ts","webpack:///./src/ui/React/DialogBox.tsx","webpack:///./src/ui/React/Money.tsx","webpack:///./src/Augmentation/Augmentations.ts","webpack:///./src/utils/JSONReviver.ts","webpack:///./src/utils/StringHelperFunctions.ts","webpack:///./src/Locations/data/CityNames.ts","webpack:///./src/Faction/Factions.ts","webpack:///./src/ui/Router.ts","webpack:///./src/Server/AllServers.ts","webpack:///./src/Company/data/companypositionnames.ts","webpack:///./src/ui/Context.ts","webpack:///./src/utils/helpers/getRandomInt.ts","webpack:///./src/Augmentation/Augmentation.tsx","webpack:///./src/Hacknet/data/Constants.ts","webpack:///./src/Bladeburner/data/ActionTypes.ts","webpack:///./src/ui/React/Table.tsx","webpack:///./src/InteractiveTutorial.ts","webpack:///./src/ui/React/Modal.tsx","webpack:///./src/Corporation/data/Constants.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx","webpack:///./src/Corporation/ui/Context.ts","webpack:///./src/Server/Server.ts","webpack:///./src/Locations/LocationTypeEnum.ts","webpack:///./src/Corporation/IndustryData.tsx","webpack:///./src/Corporation/EmployeePositions.ts","webpack:///./src/Hacknet/HacknetHelpers.tsx","webpack:///./src/Bladeburner/data/Constants.ts","webpack:///./src/Literature/data/LiteratureNames.ts","webpack:///./src/Programs/Programs.ts","webpack:///./src/Company/Companies.ts","webpack:///./src/Gang/AllGangs.ts","webpack:///./src/StockMarket/data/PositionTypes.ts","webpack:///./src/CotMG/FragmentType.ts","webpack:///./src/Corporation/Actions.ts","webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts","webpack:///./src/SourceFile/SourceFileFlags.ts","webpack:///./src/Crime/Crimes.ts","webpack:///./src/Casino/utils.ts","webpack:///./src/Hacknet/HacknetServer.ts","webpack:///./src/Company/CompanyPositions.ts","webpack:///./src/StockMarket/data/StockSymbols.ts","webpack:///./src/Hacking.ts","webpack:///./src/Script/isScriptFilename.ts","webpack:///./src/Server/data/SpecialServers.ts","webpack:///./src/Terminal.ts","webpack:///./src/StockMarket/StockMarket.tsx","webpack:///./src/utils/helpers/keyCodes.ts","webpack:///./src/ui/React/MoneyRate.tsx","webpack:///./src/CodingContracts.ts","webpack:///./src/StockMarket/data/OrderTypes.ts","webpack:///./src/ui/React/Reputation.tsx","webpack:///./src/CotMG/Helper.tsx","webpack:///./src/NetscriptEvaluator.ts","webpack:///./src/ui/GameRoot.tsx","webpack:///./src/Terminal/DirectoryHelpers.ts","webpack:///./src/Faction/FactionHelpers.tsx","webpack:///./src/Exploits/Exploit.ts","webpack:///./src/Corporation/data/BaseResearchTree.ts","webpack:///./src/utils/EventEmitter.ts","webpack:///./src/Server/ServerHelpers.ts","webpack:///./src/Bladeburner/data/SkillNames.ts","webpack:///./src/utils/helpers/isString.ts","webpack:///./src/ui/React/StatsTable.tsx","webpack:///./src/Bladeburner/BlackOperation.ts","webpack:///./src/Corporation/ui/MoneyCost.tsx","webpack:///./src/Netscript/killWorkerScript.ts","webpack:///./src/DevMenu/ui/Adjuster.tsx","webpack:///./src/Gang/ui/Context.ts","webpack:///./src/StockMarket/Stock.ts","webpack:///./src/Locations/Cities.ts","webpack:///./src/Augmentation/AugmentationHelpers.tsx","webpack:///./src/Alias.ts","webpack:///./src/NetscriptWorker.ts","webpack:///./src/Literature/Literature.ts","webpack:///./src/ui/React/CopyableText.tsx","webpack:///./src/Gang/data/upgrades.ts","webpack:///./src/Netscript/WorkerScripts.ts","webpack:///./src/Corporation/MaterialSizes.ts","webpack:///./src/Hacknet/formulas/HacknetServers.ts","webpack:///./src/Faction/FactionWorkTypeEnum.ts","webpack:///./src/PersonObjects/formulas/skill.ts","webpack:///./src/utils/helpers/createProgressBarText.ts","webpack:///./src/Corporation/Material.ts","webpack:///./src/Gang/formulas/formulas.ts","webpack:///./src/Faction/Faction.ts","webpack:///./src/SaveObject.tsx","webpack:///./src/Settings/SettingEnums.ts","webpack:///./src/Hacknet/formulas/HacknetNodes.ts","webpack:///./src/Casino/Game.tsx","webpack:///./src/CotMG/data/Shapes.ts","webpack:///./src/Infiltration/ui/KeyHandler.tsx","webpack:///./src/Infiltration/ui/GameTimer.tsx","webpack:///./src/Infiltration/ui/Difficulty.ts","webpack:///./src/ui/React/LogBoxManager.tsx","webpack:///./src/Bladeburner/Skills.ts","webpack:///./src/Gang/GangMemberUpgrades.ts","webpack:///./src/StockMarket/StockMarketHelpers.ts","webpack:///./src/PersonObjects/Person.ts","webpack:///./src/BitNode/BitNode.tsx","webpack:///./src/ui/React/Hashes.tsx","webpack:///./src/Bladeburner/Bladeburner.tsx","webpack:///./src/Company/Company.ts","webpack:///./src/Server/ServerPurchases.ts","webpack:///./src/Corporation/Warehouse.ts","webpack:///./src/Gang/GangMemberTasks.ts","webpack:///./src/CotMG/Fragment.ts","webpack:///./src/PersonObjects/formulas/reputation.ts","webpack:///./src/StockMarket/BuyingAndSelling.tsx","webpack:///./src/Terminal/ITerminal.tsx","webpack:///./src/Bladeburner/Skill.ts","webpack:///./src/Locations/Locations.ts","webpack:///./src/Hacknet/HacknetNode.ts","webpack:///./src/utils/helpers/arrayToString.ts","webpack:///./src/Bladeburner/GeneralActions.tsx","webpack:///./src/Casino/CardDeck/Card.ts","webpack:///./src/Bladeburner/ActionIdentifier.ts","webpack:///./src/SourceFile/SourceFile.ts","webpack:///./src/Infiltration/utils.ts","webpack:///./src/Script/ScriptHelpers.ts","webpack:///./src/TextFile.ts","webpack:///./src/utils/helpers/exceptionAlert.ts","webpack:///./src/Message/MessageHelpers.ts","webpack:///./src/Bladeburner/BlackOperations.tsx","webpack:///./src/Crime/Crime.ts","webpack:///./src/ui/React/Snackbar.tsx","webpack:///./src/Hacknet/HashUpgrades.ts","webpack:///./src/StockMarket/StockMarketCosts.ts","webpack:///./src/Locations/ui/ApplyToJobButton.tsx","webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts","webpack:///./src/RedPill.tsx","webpack:///./src/ui/React/Theme.tsx","webpack:///./src/utils/helpers/addOffset.ts","webpack:///./src/Script/RamCalculationErrorCodes.ts","webpack:///./src/DarkWeb/DarkWebItem.ts","webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts","webpack:///./src/Script/Script.ts","webpack:///./src/utils/IPAddress.ts","webpack:///./src/utils/helpers/compareArrays.ts","webpack:///./src/PersonObjects/formulas/intelligence.ts","webpack:///./src/Corporation/ResearchMap.ts","webpack:///./src/ui/React/Favor.tsx","webpack:///./src/DarkWeb/DarkWebItems.ts","webpack:///./src/Gang/data/Constants.ts","webpack:///./src/PersonObjects/Sleeve/Sleeve.ts","webpack:///./src/Terminal/TerminalEvents.ts","webpack:///./src/Netscript/WorkerScript.ts","webpack:///./src/Message/Message.ts","webpack:///./src/StockMarket/OrderProcessing.tsx","webpack:///./src/db.tsx","webpack:///./src/Bladeburner/Operation.ts","webpack:///./src/Prestige.ts","webpack:///./src/Company/CompanyPosition.ts","webpack:///./src/SourceFile/SourceFiles.tsx","webpack:///./src/Script/RunningScript.ts","webpack:///./src/Bladeburner/ui/StartButton.tsx","webpack:///./src/Casino/RNG.ts","webpack:///./src/utils/helpers/formatTime.ts","webpack:///./src/Hacknet/HashManager.ts","webpack:///./src/CodingContractGenerator.ts","webpack:///./src/ui/InteractiveTutorial/ITutorialEvents.ts","webpack:///./src/Crime/CrimeHelpers.ts","webpack:///./src/Corporation/OfficeSpace.ts","webpack:///./src/Corporation/IndustryUpgrades.ts","webpack:///./src/ExportBonus.tsx","webpack:///./src/utils/MoneySourceTracker.ts","webpack:///./src/ui/React/AlertManager.tsx","webpack:///./src/Hospital/Hospital.ts","webpack:///./src/Corporation/Product.ts","webpack:///./src/Programs/ui/ProgramsRoot.tsx","webpack:///./src/Faction/ui/FactionsRoot.tsx","webpack:///./src/Corporation/Corporation.tsx","webpack:///./src/ui/React/HashRate.tsx","webpack:///./src/Bladeburner/City.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.ts","webpack:///./src/Locations/City.ts","webpack:///./src/Faction/ui/Option.tsx","webpack:///./src/StockMarket/ui/StockTickersConfig.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts","webpack:///./src/Bladeburner/Action.tsx","webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts","webpack:///./src/Corporation/data/CorporationUpgrades.ts","webpack:///./src/ui/React/WorldMap.tsx","webpack:///./src/Bladeburner/ui/SuccessChance.tsx","webpack:///./src/ui/React/StaticModal.tsx","webpack:///./src/Hacking/netscriptCanHack.ts","webpack:///./src/ui/React/ReputationRate.tsx","webpack:///./src/Terminal/Parser.ts","webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.tsx","webpack:///./src/Script/RamCalculations.ts","webpack:///./src/utils/helpers/roundToTwo.ts","webpack:///./src/DarkWeb/DarkWeb.tsx","webpack:///./src/Gang/Gang.ts","webpack:///./src/Netscript/Pid.ts","webpack:///./src/NetscriptFunctions.ts","webpack:///./src/StockMarket/PlayerInfluencing.ts","webpack:///./src/Programs/ProgramHelpers.ts","webpack:///./src/Company/GetJobRequirementText.ts","webpack:///./src/ScriptEditor/CursorPositions.ts","webpack:///./src/ui/React/CinematicText.tsx","webpack:///./src/ui/React/RecoveryRoot.tsx","webpack:///./src/utils/helpers/getRandomByte.ts","webpack:///./src/Bladeburner/data/Growths.ts","webpack:///./src/Locations/createCityMap.ts","webpack:///./src/Casino/CardDeck/Hand.ts","webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx","webpack:///./src/Server/BaseServer.ts","webpack:///./src/ui/React/CodingContractModal.tsx","webpack:///./src/Server/data/servers.ts","webpack:///./src/BitNode/ui/BitFlumeModal.tsx","webpack:///./src/Faction/FactionInfo.tsx","webpack:///./src/Faction/ui/InvitationModal.tsx","webpack:///./src/Literature/LiteratureHelpers.ts","webpack:///./src/Gang/GangMemberTask.ts","webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts","webpack:///./src/Netscript/RecentScripts.ts","webpack:///./src/ThirdParty/JSInterpreter.js","webpack:///./src/Server/formulas/grow.ts","webpack:///./src/ui/React/PromptManager.tsx","webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts","webpack:///./src/CotMG/StaneksGiftEvents.ts","webpack:///./src/ui/React/AugmentationAccordion.tsx","webpack:///./src/Bladeburner/data/Icons.tsx","webpack:///./src/Bladeburner/ui/ActionLevel.tsx","webpack:///./src/Bladeburner/ui/Autolevel.tsx","webpack:///./src/Bladeburner/ui/TeamSizeButton.tsx","webpack:///./src/Infiltration/ui/BlinkingCursor.tsx","webpack:///./src/PersonObjects/Resleeving/Resleeving.ts","webpack:///./src/ui/React/CorruptableText.tsx","webpack:///./src/Locations/ui/TravelAgencyRoot.tsx","webpack:///./src/ScriptEditor/ui/ScriptEditorRoot.tsx","webpack:///./src/NetscriptJSEvaluator.ts","webpack:///./src/NetscriptFunctions/Flags.ts","webpack:///./src/NetscriptFunctions/toNative.ts","webpack:///./src/ui/React/TablePaginationActionsAll.tsx","webpack:///./src/CotMG/ui/Cell.tsx","webpack:///./src/Script/RunningScriptHelpers.ts","webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts","webpack:///./src/Bladeburner/Contract.ts","webpack:///./src/Bladeburner/data/Help.ts","webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.ts","webpack:///./src/Corporation/ResearchTree.ts","webpack:///./src/StockMarket/StockMarketConstants.ts","webpack:///./src/Company/GetNextCompanyPosition.ts","webpack:///./src/engine.tsx","webpack:///./src/ui/LoadingScreen.tsx","webpack:///./src/Faction/formulas/favor.ts","webpack:///./src/utils/helpers/isValidNumber.ts","webpack:///./src/StockMarket/Order.ts","webpack:///./src/CotMG/StaneksGift.ts","webpack:///./src/CotMG/ActiveFragment.ts","webpack:///./src/Locations/Location.ts","webpack:///./src/ui/React/ServerDropdown.tsx","webpack:///./src/Locations/ui/GenericLocation.tsx","webpack:///./src/Casino/CardDeck/ReactCard.tsx","webpack:///./src/Milestones/Milestones.ts","webpack:///./src/Faction/formulas/donation.ts","webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts","webpack:///./src/PersonObjects/formulas/work.ts","webpack:///./src/Terminal/HelpText.ts","webpack:///./src/Terminal/Terminal.ts","webpack:///./src/data/codingcontracttypes.ts","webpack:///./src/utils/helpers/createRandomString.ts","webpack:///./src/Programs/Program.ts","webpack:///./src/Programs/data/ProgramsMetadata.ts","webpack:///./src/utils/helpers/isValidIPAddress.ts","webpack:///./src/PersonObjects/Player/PlayerObject.ts","webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts","webpack:///./src/utils/helpers/getTimestamp.ts","webpack:///./src/Corporation/CorporationState.ts","webpack:///./src/Literature/Literatures.ts","webpack:///./src/Gang/data/tasks.ts","webpack:///./src/Gang/GangMember.ts","webpack:///./src/Gang/GangMemberUpgrade.ts","webpack:///./src/Gang/data/power.ts","webpack:///./src/Company/data/CompaniesMetadata.ts","webpack:///./src/Corporation/Research.ts","webpack:///./src/Corporation/data/ResearchMetadata.ts","webpack:///./src/Hacknet/HashUpgrade.ts","webpack:///./src/Hacknet/data/HashUpgradesMetadata.tsx","webpack:///./src/Netscript/Environment.ts","webpack:///./src/utils/helpers/isPowerOfTwo.ts","webpack:///./src/StockMarket/data/InitStockMetadata.ts","webpack:///./src/NetscriptFunctions/Gang.ts","webpack:///./src/NetscriptFunctions/Sleeve.ts","webpack:///./src/NetscriptFunctions/Extra.ts","webpack:///./src/NetscriptFunctions/Hacknet.ts","webpack:///./src/NetscriptFunctions/Stanek.ts","webpack:///./src/CotMG/formulas/effect.ts","webpack:///./src/CotMG/data/Constants.ts","webpack:///./src/NetscriptFunctions/Bladeburner.ts","webpack:///./src/NetscriptFunctions/CodingContract.ts","webpack:///./src/utils/helpers/is2DArray.ts","webpack:///./src/NetscriptFunctions/Corporation.ts","webpack:///./src/Corporation/Industry.ts","webpack:///./src/utils/calculateEffectWithFactors.ts","webpack:///./src/Corporation/Employee.ts","webpack:///./src/Corporation/ProductRatingWeights.ts","webpack:///./src/NetscriptFunctions/Formulas.ts","webpack:///./src/NetscriptFunctions/StockMarket.ts","webpack:///./src/NetscriptFunctions/Singularity.ts","webpack:///./src/Company/data/CompanyPositionsMetadata.ts","webpack:///./src/utils/v1APIBreak.ts","webpack:///./src/Locations/data/LocationsMetadata.ts","webpack:///./src/ui/InteractiveTutorial/InteractiveTutorialRoot.tsx","webpack:///./src/ui/React/Overview.tsx","webpack:///./src/Sidebar/ui/SidebarRoot.tsx","webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx","webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx","webpack:///./src/Augmentation/ui/PlayerMultipliers.tsx","webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx","webpack:///./src/Augmentation/ui/SourceFiles.tsx","webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx","webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx","webpack:///./src/ui/React/SourceFileAccordion.tsx","webpack:///./src/DevMenu.tsx","webpack:///./src/DevMenu/ui/General.tsx","webpack:///./src/DevMenu/ui/Stats.tsx","webpack:///./src/DevMenu/ui/Factions.tsx","webpack:///./src/DevMenu/ui/Augmentations.tsx","webpack:///./src/DevMenu/ui/SourceFiles.tsx","webpack:///./src/DevMenu/ui/Programs.tsx","webpack:///./src/DevMenu/ui/Servers.tsx","webpack:///./src/DevMenu/ui/Companies.tsx","webpack:///./src/DevMenu/ui/Bladeburner.tsx","webpack:///./src/DevMenu/ui/Gang.tsx","webpack:///./src/DevMenu/ui/Corporation.tsx","webpack:///./src/DevMenu/ui/CodingContracts.tsx","webpack:///./src/DevMenu/ui/StockMarket.tsx","webpack:///./src/DevMenu/ui/Sleeves.tsx","webpack:///./src/DevMenu/ui/Stanek.tsx","webpack:///./src/DevMenu/ui/TimeSkip.tsx","webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx","webpack:///./src/Bladeburner/ui/Stats.tsx","webpack:///./src/Bladeburner/ui/TravelModal.tsx","webpack:///./src/Bladeburner/ui/Console.tsx","webpack:///./src/Bladeburner/ui/AllPages.tsx","webpack:///./src/Bladeburner/ui/GeneralActionPage.tsx","webpack:///./src/Bladeburner/ui/GeneralActionList.tsx","webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx","webpack:///./src/Bladeburner/data/GeneralActions.tsx","webpack:///./src/Bladeburner/ui/ContractPage.tsx","webpack:///./src/Bladeburner/ui/ContractList.tsx","webpack:///./src/Bladeburner/ui/ContractElem.tsx","webpack:///./src/Bladeburner/data/Contracts.tsx","webpack:///./src/Bladeburner/ui/StealthIcon.tsx","webpack:///./src/Bladeburner/ui/KillIcon.tsx","webpack:///./src/Bladeburner/ui/OperationPage.tsx","webpack:///./src/Bladeburner/ui/OperationList.tsx","webpack:///./src/Bladeburner/ui/OperationElem.tsx","webpack:///./src/Bladeburner/ui/TeamSizeModal.tsx","webpack:///./src/Bladeburner/data/Operations.tsx","webpack:///./src/Bladeburner/ui/BlackOpPage.tsx","webpack:///./src/Bladeburner/ui/BlackOpList.tsx","webpack:///./src/Bladeburner/ui/BlackOpElem.tsx","webpack:///./src/Bladeburner/data/BlackOperations.tsx","webpack:///./src/Bladeburner/ui/SkillPage.tsx","webpack:///./src/Bladeburner/ui/SkillList.tsx","webpack:///./src/Bladeburner/ui/SkillElem.tsx","webpack:///./src/Gang/ui/GangRoot.tsx","webpack:///./src/Gang/ui/ManagementSubpage.tsx","webpack:///./src/Gang/ui/GangStats.tsx","webpack:///./src/Gang/ui/BonusTime.tsx","webpack:///./src/Gang/ui/GangMemberList.tsx","webpack:///./src/Gang/ui/GangMemberAccordion.tsx","webpack:///./src/Gang/ui/GangMemberAccordionContent.tsx","webpack:///./src/Gang/ui/GangMemberStats.tsx","webpack:///./src/Gang/ui/AscensionModal.tsx","webpack:///./src/Gang/ui/TaskSelector.tsx","webpack:///./src/Gang/ui/TaskDescription.tsx","webpack:///./src/Gang/ui/RecruitButton.tsx","webpack:///./src/Gang/ui/RecruitModal.tsx","webpack:///./src/Gang/ui/TerritorySubpage.tsx","webpack:///./src/Gang/ui/EquipmentsSubpage.tsx","webpack:///./src/Corporation/ui/CorporationRoot.tsx","webpack:///./src/Corporation/ui/MainPanel.tsx","webpack:///./src/Corporation/ui/CityTabs.tsx","webpack:///./src/Corporation/ui/Industry.tsx","webpack:///./src/Corporation/ui/IndustryOffice.tsx","webpack:///./src/Corporation/ui/UpgradeOfficeSizeModal.tsx","webpack:///./src/Corporation/ui/ThrowPartyModal.tsx","webpack:///./src/Corporation/ui/IndustryOverview.tsx","webpack:///./src/Corporation/ui/MakeProductModal.tsx","webpack:///./src/Corporation/ui/ResearchModal.tsx","webpack:///./src/Corporation/ui/IndustryWarehouse.tsx","webpack:///./src/Corporation/ui/SmartSupplyModal.tsx","webpack:///./src/Corporation/ui/ProductElem.tsx","webpack:///./src/Corporation/ui/DiscontinueProductModal.tsx","webpack:///./src/Corporation/ui/LimitProductProductionModal.tsx","webpack:///./src/Corporation/ui/SellProductModal.tsx","webpack:///./src/Corporation/ui/ProductMarketTaModal.tsx","webpack:///./src/Corporation/ui/MaterialElem.tsx","webpack:///./src/Corporation/ui/ExportModal.tsx","webpack:///./src/Corporation/ui/MaterialMarketTaModal.tsx","webpack:///./src/Corporation/ui/SellMaterialModal.tsx","webpack:///./src/Corporation/ui/PurchaseMaterialModal.tsx","webpack:///./src/Corporation/ui/Helpers.tsx","webpack:///./src/Corporation/ui/IndustryProductEquation.tsx","webpack:///./src/Corporation/ui/ExpandNewCity.tsx","webpack:///./src/Corporation/ui/ExpandIndustryTab.tsx","webpack:///./src/Corporation/ui/Overview.tsx","webpack:///./src/Corporation/ui/LevelableUpgrade.tsx","webpack:///./src/Corporation/ui/UnlockUpgrade.tsx","webpack:///./src/Corporation/ui/BribeFactionModal.tsx","webpack:///./src/Corporation/ui/SellSharesModal.tsx","webpack:///./src/Corporation/ui/BuybackSharesModal.tsx","webpack:///./src/Corporation/ui/IssueDividendsModal.tsx","webpack:///./src/Corporation/ui/IssueNewSharesModal.tsx","webpack:///./src/Corporation/ui/FindInvestorsModal.tsx","webpack:///./src/Corporation/ui/GoPublicModal.tsx","webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx","webpack:///./src/Infiltration/ui/Intro.tsx","webpack:///./src/Infiltration/ui/Game.tsx","webpack:///./src/Infiltration/ui/Countdown.tsx","webpack:///./src/Infiltration/ui/BracketGame.tsx","webpack:///./src/Infiltration/ui/SlashGame.tsx","webpack:///./src/Infiltration/ui/BackwardGame.tsx","webpack:///./src/Infiltration/ui/BribeGame.tsx","webpack:///./src/Infiltration/ui/CheatCodeGame.tsx","webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx","webpack:///./src/Infiltration/ui/MinesweeperGame.tsx","webpack:///./src/Infiltration/ui/WireCuttingGame.tsx","webpack:///./src/Infiltration/ui/Victory.tsx","webpack:///./src/PersonObjects/Resleeving/ui/ResleeveRoot.tsx","webpack:///./src/PersonObjects/Resleeving/Resleeve.ts","webpack:///./src/PersonObjects/Resleeving/ui/ResleeveElem.tsx","webpack:///./src/ui/WorkInProgressRoot.tsx","webpack:///./src/ui/React/GameOptionsRoot.tsx","webpack:///./src/Diagnostic/FileDiagnosticModal.tsx","webpack:///./src/ui/React/ConfirmationModal.tsx","webpack:///./src/ui/React/ThemeEditorModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TravelModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx","webpack:///./src/PersonObjects/Sleeve/ui/FAQModal.tsx","webpack:///./src/Hacknet/ui/HacknetRoot.tsx","webpack:///./src/Hacknet/ui/GeneralInfo.tsx","webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx","webpack:///./src/Hacknet/ui/HacknetServerElem.tsx","webpack:///./src/Hacknet/ui/HashUpgradeModal.tsx","webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx","webpack:///./src/Hacknet/ui/MultiplierButtons.tsx","webpack:///./src/Hacknet/ui/PlayerInfo.tsx","webpack:///./src/Hacknet/ui/PurchaseButton.tsx","webpack:///./src/Locations/ui/CompanyLocation.tsx","webpack:///./src/Company/ui/QuitJobModal.tsx","webpack:///./src/Locations/ui/GymLocation.tsx","webpack:///./src/Locations/ui/HospitalLocation.tsx","webpack:///./src/Locations/ui/SlumsLocation.tsx","webpack:///./src/Locations/ui/SpecialLocation.tsx","webpack:///./src/Corporation/ui/CreateCorporationModal.tsx","webpack:///./src/utils/helpers/N00dles.ts","webpack:///./src/Locations/ui/TechVendorLocation.tsx","webpack:///./src/Locations/ui/RamButton.tsx","webpack:///./src/Locations/ui/TorButton.tsx","webpack:///./src/Locations/LocationsHelpers.tsx","webpack:///./src/Locations/ui/CoresButton.tsx","webpack:///./src/Locations/ui/PurchaseServerModal.tsx","webpack:///./src/Locations/ui/TravelConfirmationModal.tsx","webpack:///./src/Locations/ui/UniversityLocation.tsx","webpack:///./src/Locations/ui/CasinoLocation.tsx","webpack:///./src/Casino/Blackjack.tsx","webpack:///./src/Casino/CardDeck/Deck.ts","webpack:///./src/Casino/CoinFlip.tsx","webpack:///./src/Casino/Roulette.tsx","webpack:///./src/Casino/SlotMachine.tsx","webpack:///./src/Locations/ui/City.tsx","webpack:///./src/ScriptEditor/ui/OptionsModal.tsx","webpack:///./src/ScriptEditor/ui/themes.ts","webpack:///./src/ScriptEditor/NetscriptDefinitions.d.ts","webpack:///./src/Milestones/ui/MilestonesRoot.tsx","webpack:///./src/Terminal/ui/TerminalRoot.tsx","webpack:///./src/Terminal/ui/TerminalInput.tsx","webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts","webpack:///./src/Terminal/DirectoryServerHelpers.ts","webpack:///./src/Script/ScriptUrl.ts","webpack:///./src/Terminal/tabCompletion.ts","webpack:///./src/Tutorial/ui/TutorialRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx","webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptAccordion.tsx","webpack:///./src/Faction/ui/FactionRoot.tsx","webpack:///./src/Faction/ui/AugmentationsPage.tsx","webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx","webpack:///./src/Faction/ui/PurchaseAugmentationModal.tsx","webpack:///./src/ui/React/Augmentation.tsx","webpack:///./src/Faction/ui/DonateOption.tsx","webpack:///./src/Faction/ui/Info.tsx","webpack:///./src/Faction/ui/CreateGangModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx","webpack:///./src/ui/CharacterStats.tsx","webpack:///./src/StockMarket/ui/StockMarketRoot.tsx","webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx","webpack:///./src/StockMarket/ui/StockTickers.tsx","webpack:///./src/StockMarket/ui/StockTicker.tsx","webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx","webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx","webpack:///./src/StockMarket/ui/StockTickerOrder.tsx","webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx","webpack:///./src/StockMarket/ui/PlaceOrderModal.tsx","webpack:///./src/BitNode/ui/BitverseRoot.tsx","webpack:///./src/BitNode/ui/PortalModal.tsx","webpack:///./src/ui/React/CinematicLine.tsx","webpack:///./src/CotMG/ui/StaneksGiftRoot.tsx","webpack:///./src/CotMG/ui/MainBoard.tsx","webpack:///./src/CotMG/ui/FragmentInspector.tsx","webpack:///./src/CotMG/ui/FragmentSelector.tsx","webpack:///./src/CotMG/ui/FragmentPreview.tsx","webpack:///./src/ui/React/CharacterOverview.tsx","webpack:///./src/ui/React/KillScriptsModal.tsx","webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx","webpack:///./src/Exploits/Unclickable.tsx","webpack:///./src/NetscriptPort.ts","webpack:///./src/utils/helpers/clearObject.ts","webpack:///./src/SourceFile/applySourceFile.ts","webpack:///./src/Exploits/applyExploits.ts","webpack:///./src/Terminal/commands/alias.ts","webpack:///./src/Terminal/commands/analyze.ts","webpack:///./src/Terminal/commands/backdoor.ts","webpack:///./src/Terminal/commands/buy.ts","webpack:///./src/Terminal/commands/cat.ts","webpack:///./src/Terminal/commands/cd.ts","webpack:///./src/Terminal/commands/check.ts","webpack:///./src/Terminal/commands/connect.ts","webpack:///./src/Terminal/commands/cp.ts","webpack:///./src/Terminal/commands/download.ts","webpack:///./src/Terminal/commands/expr.ts","webpack:///./src/Terminal/commands/free.ts","webpack:///./src/Terminal/commands/grow.ts","webpack:///./src/Terminal/commands/hack.ts","webpack:///./src/Terminal/commands/help.ts","webpack:///./src/Terminal/commands/home.ts","webpack:///./src/Terminal/commands/hostname.ts","webpack:///./src/Terminal/commands/kill.ts","webpack:///./src/Terminal/commands/killall.ts","webpack:///./src/Terminal/commands/ls.tsx","webpack:///./src/Terminal/commands/lscpu.ts","webpack:///./src/Terminal/commands/mem.ts","webpack:///./src/Terminal/commands/mv.ts","webpack:///./src/Terminal/commands/nano.ts","webpack:///./src/Terminal/commands/ps.ts","webpack:///./src/Terminal/commands/rm.ts","webpack:///./src/Terminal/commands/run.ts","webpack:///./src/Terminal/commands/runScript.ts","webpack:///./src/Terminal/commands/runProgram.ts","webpack:///./src/Terminal/commands/scan.ts","webpack:///./src/Terminal/commands/scananalyze.ts","webpack:///./src/Terminal/commands/scp.ts","webpack:///./src/Terminal/commands/sudov.ts","webpack:///./src/Terminal/commands/tail.ts","webpack:///./src/Terminal/commands/top.ts","webpack:///./src/Terminal/commands/unalias.ts","webpack:///./src/Terminal/commands/weaken.ts","webpack:///./src/Terminal/commands/wget.ts","webpack:///./src/Exploits/loops.ts","webpack:///./src/Electron.tsx","webpack:///./src/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Player","PlayerObject","loadPlayer","saveString","JSON","parse","Reviver","money","parseFloat","exploits","sanitizeExploits","extraFormats","extraNotations","numeralWrapper","constructor","this","defaultLocale","updateLocale","numeral","locale","console","warn","format","Math","abs","answer","formatBigNumber","formatReallyBigNumber","decimalPlaces","Infinity","repeat","str","formatHp","formatMoney","formatSkill","formatExp","formatHashes","formatReputation","formatFavor","formatRAM","formatPercentage","formatter","formatServerSecurity","formatRespect","formatWanted","formatMultiplier","formatSleeveShock","formatSleeveSynchro","formatSleeveMemory","formatPopulation","formatStamina","formatShares","formatInfiltrationSecurity","formatThreads","formatStaneksGiftHeat","formatStaneksGiftCharge","formatStaneksGiftPower","parseMoney","numeralValue","parsed","isNaN","NaN","max","BitNodeMultipliers","HackingLevelMultiplier","StrengthLevelMultiplier","DefenseLevelMultiplier","DexterityLevelMultiplier","AgilityLevelMultiplier","CharismaLevelMultiplier","ServerGrowthRate","ServerMaxMoney","ServerStartingMoney","ServerStartingSecurity","ServerWeakenRate","HomeComputerRamCost","PurchasedServerCost","PurchasedServerSoftcap","PurchasedServerLimit","PurchasedServerMaxRam","CompanyWorkMoney","CrimeMoney","HacknetNodeMoney","ManualHackMoney","ScriptHackMoney","ScriptHackMoneyGain","CodingContractMoney","ClassGymExpGain","CompanyWorkExpGain","CrimeExpGain","FactionWorkExpGain","HackExpGain","FactionPassiveRepGain","FactionWorkRepGain","RepToDonateToFaction","AugmentationMoneyCost","AugmentationRepCost","InfiltrationMoney","InfiltrationRep","FourSigmaMarketDataCost","FourSigmaMarketDataApiCost","CorporationValuation","CorporationSoftCap","BladeburnerRank","BladeburnerSkillCost","GangSoftcap","DaedalusAugsRequirement","StaneksGiftPowerMultiplier","StaneksGiftExtraSize","WorldDaemonDifficulty","AugmentationNames","Targeting1","Targeting2","Targeting3","SyntheticHeart","SynfibrilMuscle","CombatRib1","CombatRib2","CombatRib3","NanofiberWeave","SubdermalArmor","WiredReflexes","GrapheneBoneLacings","BionicSpine","GrapheneBionicSpine","BionicLegs","GrapheneBionicLegs","SpeechProcessor","TITN41Injection","EnhancedSocialInteractionImplant","BitWire","ArtificialBioNeuralNetwork","ArtificialSynapticPotentiation","EnhancedMyelinSheathing","SynapticEnhancement","NeuralRetentionEnhancement","DataJack","ENM","ENMCore","ENMCoreV2","ENMCoreV3","ENMAnalyzeEngine","ENMDMA","Neuralstimulator","NeuralAccelerator","CranialSignalProcessorsG1","CranialSignalProcessorsG2","CranialSignalProcessorsG3","CranialSignalProcessorsG4","CranialSignalProcessorsG5","NeuronalDensification","NeuroreceptorManager","NuoptimalInjectorImplant","SpeechEnhancement","FocusWire","PCDNI","PCDNIOptimizer","PCDNINeuralNetwork","PCMatrix","ADRPheromone1","ADRPheromone2","ShadowsSimulacrum","HacknetNodeCPUUpload","HacknetNodeCacheUpload","HacknetNodeNICUpload","HacknetNodeKernelDNI","HacknetNodeCoreDNI","NeuroFluxGovernor","Neurotrainer1","Neurotrainer2","Neurotrainer3","Hypersight","LuminCloaking1","LuminCloaking2","HemoRecirculator","SmartSonar","PowerRecirculator","QLink","TheRedPill","SPTN97","HiveMind","CordiARCReactor","SmartJaw","Neotra","Xanipher","nextSENS","OmniTekInfoLoad","PhotosyntheticCells","Neurolink","TheBlackHand","UnstableCircadianModulator","CRTX42AA","Neuregen","CashRoot","NutriGen","INFRARet","DermaForce","GrapheneBrachiBlades","GrapheneBionicArms","BrachiBlades","BionicArms","SNA","HydroflameLeftArm","EsperEyewear","EMS4Recombination","OrionShoulder","HyperionV1","HyperionV2","GolemSerum","VangelisVirus","VangelisVirus3","INTERLINKED","BladeRunner","BladeArmor","BladeArmorPowerCells","BladeArmorEnergyShielding","BladeArmorUnibeam","BladeArmorOmnibeam","BladeArmorIPU","BladesSimulacrum","StaneksGift1","StaneksGift2","StaneksGift3","CONSTANTS","VersionString","VersionNumber","_idleSpeed","MaxSkillLevel","MilliPerCycle","CorpFactionRepRequirement","BaseCostFor1GBOfRamHome","BaseCostFor1GBOfRamServer","TravelCost","BaseFavorToDonate","DonateMoneyToRepDivisor","FactionReputationToFavorBase","FactionReputationToFavorMult","CompanyReputationToFavorBase","CompanyReputationToFavorMult","NeuroFluxGovernorLevelMult","NumNetscriptPorts","HomeComputerMaxRam","ServerBaseGrowthRate","ServerMaxGrowthRate","ServerFortifyAmount","ServerWeakenAmount","MultipleAugMultiplier","TorRouterCost","WSEAccountCost","TIXAPICost","MarketData4SCost","MarketDataTixApi4SCost","StockMarketCommission","HospitalCostPerHp","IntelligenceCrimeWeight","IntelligenceInfiltrationWeight","IntelligenceCrimeBaseExpGain","IntelligenceProgramBaseExpGain","IntelligenceTerminalHackBaseExpGain","IntelligenceSingFnBaseExpGain","IntelligenceClassBaseExpGain","MillisecondsPer20Hours","GameCyclesPer20Hours","MillisecondsPer10Hours","GameCyclesPer10Hours","MillisecondsPer8Hours","GameCyclesPer8Hours","MillisecondsPer4Hours","GameCyclesPer4Hours","MillisecondsPer2Hours","GameCyclesPer2Hours","MillisecondsPerHour","GameCyclesPerHour","MillisecondsPerHalfHour","GameCyclesPerHalfHour","MillisecondsPerQuarterHour","GameCyclesPerQuarterHour","MillisecondsPerFiveMinutes","GameCyclesPerFiveMinutes","BaseFocusBonus","FactionWorkHacking","FactionWorkField","FactionWorkSecurity","WorkTypeCompany","WorkTypeCompanyPartTime","WorkTypeFaction","WorkTypeCreateProgram","WorkTypeStudyClass","WorkTypeCrime","ClassStudyComputerScience","ClassDataStructures","ClassNetworks","ClassAlgorithms","ClassManagement","ClassLeadership","ClassGymStrength","ClassGymDefense","ClassGymDexterity","ClassGymAgility","ClassDataStructuresBaseCost","ClassNetworksBaseCost","ClassAlgorithmsBaseCost","ClassManagementBaseCost","ClassLeadershipBaseCost","ClassGymBaseCost","ClassStudyComputerScienceBaseExp","ClassDataStructuresBaseExp","ClassNetworksBaseExp","ClassAlgorithmsBaseExp","ClassManagementBaseExp","ClassLeadershipBaseExp","CrimeShoplift","CrimeRobStore","CrimeMug","CrimeLarceny","CrimeDrugs","CrimeBondForgery","CrimeTraffickArms","CrimeHomicide","CrimeGrandTheftAuto","CrimeKidnap","CrimeAssassination","CrimeHeist","CodingContractBaseFactionRepGain","CodingContractBaseCompanyRepGain","CodingContractBaseMoneyGain","TotalNumBitNodes","LatestUpdate","LocationName","defaultSettings","ActiveScriptsServerPageSize","ActiveScriptsScriptPageSize","AutosaveInterval","CodeInstructionRunTime","DisableASCIIArt","DisableHotkeys","DisableTextEffects","EnableBashHotkeys","TimestampsFormat","Locale","MaxLogCapacity","MaxPortCapacity","MaxTerminalCapacity","SaveGameOnFileSave","SuppressBuyAugmentationConfirmation","SuppressFactionInvites","SuppressMessages","SuppressTravelConfirmation","SuppressBladeburnerPopup","SuppressTIXPopup","theme","primarylight","primary","primarydark","successlight","success","successdark","errorlight","error","errordark","secondarylight","secondary","secondarydark","warninglight","warning","warningdark","infolight","info","infodark","welllight","well","white","black","hp","hack","combat","cha","int","rep","disabled","backgroundprimary","backgroundsecondary","button","Settings","OwnedAugmentationsOrder","OwnedAugmentationsOrderSetting","AcquirementTime","PurchaseAugmentationsOrder","PurchaseAugmentationsOrderSetting","Default","MonacoTheme","MonacoInsertSpaces","MonacoFontSize","init","assign","load","save","RamCostConstants","ScriptBaseRamCost","ScriptDomRamCost","ScriptCorporationRamCost","ScriptHackRamCost","ScriptHackAnalyzeRamCost","ScriptGrowRamCost","ScriptGrowthAnalyzeRamCost","ScriptWeakenRamCost","ScriptWeakenAnalyzeRamCost","ScriptScanRamCost","ScriptPortProgramRamCost","ScriptRunRamCost","ScriptExecRamCost","ScriptSpawnRamCost","ScriptScpRamCost","ScriptKillRamCost","ScriptHasRootAccessRamCost","ScriptGetHostnameRamCost","ScriptGetHackingLevelRamCost","ScriptGetMultipliersRamCost","ScriptGetServerRamCost","ScriptGetServerMaxRam","ScriptGetServerUsedRam","ScriptFileExistsRamCost","ScriptIsRunningRamCost","ScriptHacknetNodesRamCost","ScriptHNUpgLevelRamCost","ScriptHNUpgRamRamCost","ScriptHNUpgCoreRamCost","ScriptGetStockRamCost","ScriptBuySellStockRamCost","ScriptGetPurchaseServerRamCost","ScriptPurchaseServerRamCost","ScriptGetPurchasedServerLimit","ScriptGetPurchasedServerMaxRam","ScriptRoundRamCost","ScriptReadWriteRamCost","ScriptArbScriptRamCost","ScriptGetScriptRamCost","ScriptGetRunningScriptRamCost","ScriptGetHackTimeRamCost","ScriptGetFavorToDonate","ScriptCodingContractBaseRamCost","ScriptSleeveBaseRamCost","ScriptSingularityFn1RamCost","ScriptSingularityFn2RamCost","ScriptSingularityFn3RamCost","ScriptGangApiBaseRamCost","ScriptBladeburnerApiBaseRamCost","ScriptStanekCharge","ScriptStanekFragmentDefinitions","ScriptStanekPlacedFragments","ScriptStanekClear","ScriptStanekCanPlace","ScriptStanekPlace","ScriptStanekFragmentAt","ScriptStanekDeleteAt","RamCosts","hacknet","numNodes","purchaseNode","getPurchaseNodeCost","getNodeStats","upgradeLevel","upgradeRam","upgradeCore","upgradeCache","getLevelUpgradeCost","getRamUpgradeCost","getCoreUpgradeCost","getCacheUpgradeCost","numHashes","hashCost","spendHashes","sprintf","vsprintf","scan","hackAnalyzeThreads","hackAnalyze","hackAnalyzeSecurity","hackAnalyzeChance","sleep","grow","growthAnalyze","growthAnalyzeSecurity","weaken","weakenAnalyze","print","tprint","clearLog","disableLog","enableLog","isLogEnabled","getScriptLogs","nuke","brutessh","ftpcrack","relaysmtp","httpworm","sqlinject","run","exec","spawn","kill","killall","exit","scp","ls","ps","hasRootAccess","getIp","getHostname","getHackingLevel","getHackingMultipliers","getHacknetMultipliers","getBitNodeMultipliers","getServer","getServerMoneyAvailable","getServerSecurityLevel","getServerBaseSecurityLevel","getServerMinSecurityLevel","getServerRequiredHackingLevel","getServerMaxMoney","getServerGrowth","getServerNumPortsRequired","getServerRam","getServerMaxRam","getServerUsedRam","serverExists","fileExists","isRunning","stock","getSymbols","getPrice","getAskPrice","getBidPrice","getPosition","getMaxShares","getPurchaseCost","getSaleGain","buy","sell","short","sellShort","placeOrder","cancelOrder","getOrders","getVolatility","getForecast","purchase4SMarketData","purchase4SMarketDataTixApi","getPurchasedServerLimit","getPurchasedServerMaxRam","getPurchasedServerCost","purchaseServer","deleteServer","getPurchasedServers","write","tryWritePort","read","peek","clear","writePort","readPort","getPortHandle","rm","scriptRunning","scriptKill","getScriptName","getScriptRam","getHackTime","getGrowTime","getWeakenTime","getScriptIncome","getScriptExpGain","getRunningScript","nFormat","getTimeSinceLastAug","prompt","wget","getFavorToDonate","universityCourse","gymWorkout","travelToCity","goToLocation","purchaseTor","purchaseProgram","getCurrentServer","connect","manualHack","installBackdoor","getStats","getCharacterInformation","getPlayer","hospitalize","isBusy","stopAction","upgradeHomeRam","upgradeHomeCores","getUpgradeHomeRamCost","getUpgradeHomeCoresCost","workForCompany","applyToCompany","getCompanyRep","getCompanyFavor","getCompanyFavorGain","checkFactionInvitations","joinFaction","workForFaction","getFactionRep","getFactionFavor","getFactionFavorGain","donateToFaction","createProgram","commitCrime","getCrimeChance","getCrimeStats","getOwnedAugmentations","getOwnedSourceFiles","getAugmentationsFromFaction","getAugmentationCost","getAugmentationPrereq","getAugmentationPrice","getAugmentationRepReq","getAugmentationStats","purchaseAugmentation","softReset","installAugmentations","isFocused","setFocus","gang","createGang","inGang","getMemberNames","getGangInformation","getOtherGangInformation","getMemberInformation","canRecruitMember","recruitMember","getTaskNames","getTaskStats","setMemberTask","getEquipmentNames","getEquipmentCost","getEquipmentType","getEquipmentStats","purchaseEquipment","ascendMember","getAscensionResult","setTerritoryWarfare","getChanceToWinClash","getBonusTime","bladeburner","getContractNames","getOperationNames","getBlackOpNames","getBlackOpRank","getGeneralActionNames","getSkillNames","startAction","stopBladeburnerAction","getCurrentAction","getActionTime","getActionEstimatedSuccessChance","getActionRepGain","getActionCountRemaining","getActionMaxLevel","getActionCurrentLevel","getActionAutolevel","setActionAutolevel","setActionLevel","getRank","getSkillPoints","getSkillLevel","getSkillUpgradeCost","upgradeSkill","getTeamSize","setTeamSize","getCityEstimatedPopulation","getCityCommunities","getCityChaos","getCity","switchCity","getStamina","joinBladeburnerFaction","joinBladeburnerDivision","codingcontract","attempt","getContractType","getData","getDescription","getNumTriesRemaining","sleeve","getNumSleeves","setToShockRecovery","setToSynchronize","setToCommitCrime","setToUniversityCourse","travel","setToCompanyWork","setToFactionWork","setToGymWorkout","getSleeveStats","getTask","getInformation","getSleeveAugmentations","getSleevePurchasableAugs","purchaseSleeveAug","stanek","charge","fragmentDefinitions","activeFragments","canPlace","place","remove","heart","break","getRamCost","args","curr","currType","dialogBoxCreate","txt","AlertEvents","emit","dangerouslySetInnerHTML","__html","useStyles","makeStyles","createStyles","unbuyable","color","palette","action","colors","Money","props","classes","undefined","player","Error","canAfford","className","Augmentations","ctor","constructors","fromJSON","Generic_toJSON","ctorName","obj","keys","index","Generic_fromJSON","convertTimeMsToTimeElapsedString","time","showMilli","floor","totalSeconds","days","secondPerHours","secTruncDays","hours","secondPerMinute","secTruncHours","minutes","secTruncMinutes","milliTruncSec","res","longestCommonStart","strings","containsAllStrings","A","concat","sort","a1","a2","L","a","charAt","b","toUpperCase","substring","arr","every","isString","formatNumber","num","numFractionDigits","toLocaleString","maximumFractionDigits","minimumFractionDigits","generateRandomString","chars","random","CityName","Factions","loadFactions","faction","getInfo","err","factionExists","initFactions","FactionInfos","resetFaction","Faction","newFactionObject","factionName","favor","AddToFactions","Page","AllServers","GetServer","server","isValidIPAddress","hostname","GetServerByHostname","ipserver","ip","GetServerByIP","GetAllServers","servers","DeleteServer","serverkey","ipExists","createUniqueRandomIp","createRandomIp","AddToAllServers","initForeignServers","homeComputer","networkLayers","propertiesToPatternMatch","toNumber","getRandomInt","min","metadata","serverMetadata","serverParams","numOpenPortsRequired","organizationName","maxRamExponent","maxRam","pow","prop","Server","filename","literature","messages","SpecialServers","WorldDaemon","requiredHackingSkill","networkLayer","linkNetworkLayers","network1","selectServer","server1","server2","serversOnNetwork","getRandomArrayItem","prestigeAllServers","member","loadAllServers","saveAllServers","TempAllServers","stringify","runningScripts","runningScriptObj","logs","SoftwareCompanyPositions","ITCompanyPositions","SecurityEngineerCompanyPositions","NetworkEngineerCompanyPositions","BusinessCompanyPositions","SecurityCompanyPositions","AgentCompanyPositions","MiscCompanyPositions","SoftwareConsultantCompanyPositions","BusinessConsultantCompanyPositions","PartTimeCompanyPositions","Context","React","createContext","Router","use","useContext","lower","upper","Augmentation","params","moneyCost","repCost","prereqs","baseRepRequirement","baseCost","startingCost","isSpecial","level","hacking_mult","mults","strength_mult","defense_mult","dexterity_mult","agility_mult","charisma_mult","hacking_exp_mult","strength_exp_mult","defense_exp_mult","dexterity_exp_mult","agility_exp_mult","charisma_exp_mult","hacking_chance_mult","hacking_speed_mult","hacking_money_mult","hacking_grow_mult","company_rep_mult","faction_rep_mult","crime_money_mult","crime_success_mult","work_money_mult","hacknet_node_money_mult","hacknet_node_purchase_cost_mult","hacknet_node_ram_cost_mult","hacknet_node_core_cost_mult","hacknet_node_level_cost_mult","bladeburner_max_stamina_mult","bladeburner_stamina_gain_mult","bladeburner_analysis_mult","bladeburner_success_chance_mult","stats","programs","startingMoney","f","x","decimals","desc","join","generateStatsDescription","addToFactions","factionList","augmentations","addToAllFactions","fac","facObj","special","toJSON","HacknetNodeConstants","MoneyGainPerLevel","BaseCost","LevelBaseCost","RamBaseCost","CoreBaseCost","PurchaseNextMult","UpgradeLevelMult","UpgradeRamMult","UpgradeCoreMult","MaxLevel","MaxRam","MaxCores","PurchaseMultipliers","x1","x5","x10","MAX","HacknetServerConstants","HashesPerLevel","CacheBaseCost","PurchaseMult","UpgradeCacheMult","MaxServers","MaxCache","ActionTypes","Idle","Contract","Operation","BlackOp","BlackOperation","Training","Recruitment","FieldAnalysis","Diplomacy","root","borderBottom","small","width","TableCell","Table","iTutorialSteps","ITutorial","currStep","Start","stepIsDone","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalGoHome","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End","iTutorialStart","iTutorialNextStep","iTutorialEnd","ITutorialEvents","iTutorialPrevStep","getHomeComputer","LiteratureNames","HackersStartingHandbook","modal","display","alignItems","justifyContent","paper","backgroundColor","background","default","border","main","boxShadow","dark","padding","maxWidth","maxHeight","overflow","scrollbarWidth","Modal","disableRestoreFocus","disableScrollLock","disableEnforceFocus","disableAutoFocus","open","onClose","closeAfterTransition","in","sx","children","AllCorporationStates","CorporationConstants","INITIALSHARES","SHARESPERPRICEUPDATE","IssueNewSharesCooldown","SellSharesCooldown","CyclesPerMarketCycle","CyclesPerIndustryStateCycle","SecsPerMarketCycle","Cities","WarehouseInitialCost","WarehouseInitialSize","WarehouseUpgradeBaseCost","OfficeInitialCost","OfficeInitialSize","OfficeUpgradeBaseCost","BribeThreshold","BribeToRepRatio","ProductProductionCostRatio","DividendMaxPercentage","EmployeeSalaryMultiplier","CyclesPerEmployeeRaise","EmployeeRaiseAmount","BaseMaxProducts","AllMaterials","t_homeComp","safetlyCreateUniqueServer","adminRights","isConnectedTo","purchasedByPlayer","currentServer","Home","Programs","NukeProgram","prestigeAugmentation","numPeopleKilled","karma","hacking","strength","defense","dexterity","agility","charisma","hacking_exp","strength_exp","defense_exp","dexterity_exp","agility_exp","charisma_exp","city","Sector12","location","TravelAgency","companyName","jobs","purchasedServers","factions","factionInvitations","queuedAugmentations","resleeves","numSleeves","SourceFileFlags","bitNodeN","sleevesFromCovenant","sleeves","Sleeve","shock","synchronize","shockRecovery","isWorking","currentWorkFactionName","currentWorkFactionDescription","createProgramName","crimeType","workHackExpGainRate","workStrExpGainRate","workDefExpGainRate","workDexExpGainRate","workAgiExpGainRate","workChaExpGainRate","workRepGainRate","workMoneyGainRate","workHackExpGained","workStrExpGained","workDefExpGained","workDexExpGained","workAgiExpGained","workChaExpGained","workRepGained","workMoneyGained","timeWorked","lastUpdate","Date","getTime","playtimeSinceLastAug","scriptProdSinceLastAug","moneySourceA","reset","hacknetNodes","hashManager","prestige","reapplyAllAugmentations","max_hp","prestigeSourceFile","sync","resetGangs","hasWseAccount","hasTixApiAccess","has4SData","has4SDataTixApi","corporation","moneySourceB","playtimeSinceLastBitnode","receiveInvite","includes","calculateSkill","exp","mult","calculateSkillF","updateSkillLevels","intelligence","intelligence_exp","ratio","round","resetMultipliers","hasProgram","programName","home","toLowerCase","setMoney","gainMoney","source","recordMoneySource","loseMoney","cost","amt","MoneySourceTracker","record","gainHackingExp","gainStrengthExp","gainDefenseExp","gainDexterityExp","gainAgilityExp","gainCharismaExp","gainIntelligenceExp","queryStatFromString","tempStr","resetWorkStatus","generalType","group","workType","factionWorkType","singularityStopWork","workMoneyLossRate","timeWorkedCreateProgram","processWorkEarnings","numCycles","focusBonus","hasAugmentation","focus","hackExpGain","strExpGain","defExpGain","dexExpGain","agiExpGain","chaExpGain","moneyGain","startWork","router","getWorkHackExpGain","getWorkStrExpGain","getWorkDefExpGain","getWorkDexExpGain","getWorkAgiExpGain","getWorkChaExpGain","getWorkRepGain","getWorkMoneyGain","timeNeededToCompleteWork","toWork","process","toFaction","createProgramWork","toTerminal","takeClass","toCity","toLocation","Locations","Slums","workPartTime","work","cancelationPenalty","find","specialName","backdoorInstalled","overMax","comp","Companies","influenceStockThroughCompanyWork","finishWork","cancelled","sing","playerReputation","content","reputation","startWorkPartTime","finishWorkPartTime","startFocusing","stopFocusing","startFactionWork","favorMult","startFactionHackWork","getHackingWorkRepGain","startFactionFieldWork","getFactionFieldWorkRepGain","startFactionSecurityWork","getFactionSecurityWorkRepGain","finishFactionWork","bn11Mult","company","companyPositionName","companyPosition","CompanyPositions","baseSalary","salaryMultiplier","hackingExpGain","expMultiplier","strengthExpGain","defenseExpGain","dexterityExpGain","agilityExpGain","charismaExpGain","jobPerformance","calculateJobPerformance","startCreateProgramWork","reqLevel","createProgramReqLvl","programFile","startsWith","endsWith","split","percComplete","Number","reqLvl","skillMult","getIntelligenceBonus","finishCreateProgramWork","incompleteName","toString","startClass","costMult","expMult","workCostMult","workExpMult","earnings","calculateClassEarnings","finishClass","startCrime","hackExp","strExp","defExp","dexExp","agiExp","chaExp","workerscript","committingCrimeThruSingFn","singFnCrimeWorkerScript","finishCrime","determineCrimeSuccess","crime","Crimes","type","kills","ws","disableLogs","ALL","scriptRef","log","takeDamage","regenerateHp","getHospitalizationCost","SnackbarEvents","applyForJob","entryPosType","currCompany","currPositionName","Company","pos","isQualified","reqText","getJobRequirementText","newPos","getNextCompanyPositionHelper","hasPosition","nextPos","getNextCompanyPosition","currentPositionName","currentPosition","isSoftwareJob","isITJob","isBusinessJob","isSecurityEngineerJob","isNetworkEngineerJob","isSecurityJob","isAgentJob","isSoftwareConsultantJob","isBusinessConsultantJob","isPartTimeJob","quitJob","applyForSoftwareJob","posNames","applyForSoftwareConsultantJob","applyForItJob","applyForSecurityEngineerJob","applyForNetworkEngineerJob","applyForBusinessJob","applyForBusinessConsultantJob","applyForSecurityJob","applyForAgentJob","applyForEmployeeJob","applyForPartTimeEmployeeJob","applyForWaiterJob","applyForPartTimeWaiterJob","position","offset","jobStatReqOffset","reqHacking","requiredHacking","reqStrength","requiredStrength","reqDefense","requiredDefense","reqDexterity","requiredDexterity","reqAgility","reqCharisma","requiredCharisma","requiredReputation","augName","aug","owned","applyAugmentation","reapplyAllSourceFiles","sourceFiles","srcFileKey","SourceFiles","applySourceFile","applyExploit","checkForFactionInvitations","invitedFactions","numAugmentations","allCompanies","allPositions","values","checkMegacorpRequirements","repNeeded","illuminatiFac","isBanned","isMember","alreadyInvited","daedalusFac","covenantFac","ecorpFac","AevumECorp","megacorpFac","Sector12MegaCorp","bachmanandassociatesFac","AevumBachmanAndAssociates","bladeindustriesFac","Sector12BladeIndustries","nwoFac","VolhavenNWO","clarkeincorporatedFac","AevumClarkeIncorporated","omnitekincorporatedFac","VolhavenOmniTekIncorporated","foursigmaFac","Sector12FourSigma","kuaigonginternationalFac","ChongqingKuaiGongInternational","fulcrumsecrettechonologiesFac","fulcrumSecretServer","FulcrumSecretTechnologies","AevumFulcrumTechnologies","bitrunnersFac","bitrunnersServer","BitRunnersServer","theblackhandFac","blackhandServer","TheBlackHandServer","nitesecFac","nitesecServer","NiteSecServer","chongqingFac","Chongqing","sector12Fac","newtokyoFac","NewTokyo","aevumFac","Aevum","ishimaFac","Ishima","volhavenFac","Volhaven","speakersforthedeadFac","Sector12CIA","Sector12NSA","thedarkarmyFac","thesyndicateFac","silhouetteFac","tetradsFac","slumsnakesFac","netburnersFac","totalHacknetRam","totalHacknetCores","totalHacknetLevels","v","hserver","HacknetServer","cores","ram","tiandihuiFac","cybersecFac","cybersecServer","CyberSecServer","setBitNodeNumber","queueAugmentation","PlayerOwnedAugmentation","gainCodingContractReward","reward","difficulty","CodingContractRewardType","FactionReputation","FactionReputationAll","repGain","totalGain","specialFactions","filter","gainPerFaction","facName","CompanyReputation","to","gotoLocation","canAccessResleeving","giveExploit","exploit","weight","calculateIntelligenceBonus","getCasinoWinnings","casino","getMult","setMult","canAccessCotMG","sourceFileLvl","sf","lvl","Corporation","Division","useCorporation","useDivision","BaseServer","super","createRandomString","moneyAvailable","moneyMax","hackDifficulty","baseDifficulty","minDifficulty","serverGrowth","capDifficulty","changeMinimumSecurity","perc","changeMaximumMoney","aboveCap","fortify","LocationType","Industries","Energy","Utilities","Agriculture","Fishing","Mining","Food","Tobacco","Chemical","Pharmaceutical","Computer","Robotics","Software","Healthcare","RealEstate","IndustryStartingCosts","IndustryDescriptions","corp","IndustryResearchTrees","getBaseResearchTreeCopy","getProductIndustryResearchTreeCopy","resetIndustryResearchTrees","EmployeePositions","Operations","Engineer","Business","Management","RandD","Unassigned","hasHacknetServers","purchaseHacknet","numOwned","getCostOfNextHacknetServer","createHacknetServer","updateHashManagerCapacity","getCostOfNextHacknetNode","node","HacknetNode","hasMaxNumberHacknetServers","calculateNodeCost","calculateServerCost","getMaxNumberLevelUpgrades","nodeObj","maxLevel","calculateLevelUpgradeCost","levelsToMax","getMaxNumberRamUpgrades","calculateRamUpgradeCost","log2","getMaxNumberCoreUpgrades","calculateCoreUpgradeCost","getMaxNumberCacheUpgrades","calculateCacheUpgradeCost","cache","purchaseLevelUpgrade","levels","sanitizedLevels","isServer","purchaseRamUpgrade","purchaseCoreUpgrade","purchaseCacheUpgrade","processHacknetEarnings","HashManager","hashes","updateHashRate","h","storeHashes","processAllHacknetServerEarnings","total","processSingleHacknetNodeEarnings","processAllHacknetNodeEarnings","totalEarnings","nodes","updateCapacity","hashCapacity","purchaseHashUpgrade","upgName","upgTarget","upgrade","upg","HashUpgrades","refundUpgrade","funds","target","e","division","divisions","sciResearch","qty","changeRank","skillPoints","generateRandomContract","BladeburnerConstants","CityNames","CyclesPerSecond","StaminaGainPerSecond","BaseStaminaLoss","MaxStaminaToGainFactor","DifficultyToTimeFactor","DiffMultExponentialFactor","DiffMultLinearFactor","EffAgiLinearFactor","EffDexLinearFactor","EffAgiExponentialFactor","EffDexExponentialFactor","BaseRecruitmentTimeNeeded","PopulationThreshold","PopulationExponent","ChaosThreshold","BaseStatGain","BaseIntGain","ActionCountGrowthPeriod","RankToFactionRepFactor","RankNeededForFaction","ContractSuccessesPerLevel","OperationSuccessesPerLevel","RanksPerSkillPoint","ContractBaseMoneyGain","HrcHpGain","HrcStaminaGain","CorporationManagementHandbook","HistoryOfSynthoids","AGreenTomorrow","AlphaOmega","SimulatedReality","BeyondMan","BrighterThanTheSun","DemocracyIsDead","Sector12Crime","ManAndMachine","SecretSocieties","TheFailedFrontier","CodedIntelligence","SyntheticMuscles","TensionsInTechRace","CostOfImmortality","TheHiddenWorld","TheNewGod","NewTriads","TheSecretWar","programsMetadata","Program","initCompanies","oldCompanies","companiesMetadata","forEach","loadCompanies","AllGangs","power","territory","Tetrads","NiteSec","loadAllGangs","PositionTypes","FragmentType","Effect","tpe","HackingChance","HackingSpeed","HackingMoney","HackingGrow","Hacking","Strength","Defense","Dexterity","Agility","Charisma","HacknetMoney","HacknetCost","Rep","WorkMoney","Crime","Bladeburner","NewIndustry","industry","Industry","NewCity","offices","OfficeSpace","loc","size","UnlockUpgrade","unlock","LevelUpgrade","priceMult","upgrades","IssueDividends","percent","dividendPercentage","SellMaterial","mat","price","replace","temp","bCost","eval","sCost","q","tempQty","sllman","SellProduct","product","all","cities","tempCity","SetSmartSupply","warehouse","smartSupply","smartSupplyEnabled","SetSmartSupplyUseLeftovers","material","useLeftover","smartSupplyUseLeftovers","BuyMaterial","AssignJob","employee","job","UpgradeOfficeSize","office","initialPriceMult","ThrowParty","costPerEmployee","totalCost","employees","throwParty","PurchaseWarehouse","warehouses","Warehouse","UpgradeWarehouse","sizeUpgradeCost","updateSize","BuyCoffee","IndustryUpgrades","HireAdVert","MakeProduct","productName","designInvest","marketingInvest","Product","createCity","designCost","advCost","products","Research","researchName","researchTree","getAllNodes","research","ResearchMap","researched","ExportMaterial","divisionName","cityName","sanitizedAmt","exportObj","ind","CancelExportMaterial","LimitProductProduction","prdman","SetMaterialMarketTA1","on","marketTa1","SetMaterialMarketTA2","marketTa2","SetProductMarketTA1","SetProductMarketTA2","SleeveTaskType","Array","updateSourceFileFlags","Shoplift","dexterity_success_weight","agility_success_weight","RobStore","hacking_success_weight","Mug","strength_success_weight","defense_success_weight","Larceny","DealDrugs","charisma_success_weight","BondForgery","TraffickArms","Homicide","GrandTheftAuto","Kidnap","Assassination","Heist","trusted","event","isTrusted","updateHashCapacity","seconds","onlineTimeSeconds","hashRate","totalHashesGenerated","prodMult","cpuCores","runScript","script","updateRamUsed","calculateHashGainRate","ramUsed","companyPositionMetadata","CompanyPosition","StockSymbols","IshimaStormTechnologies","NewTokyoDefComm","VolhavenHeliosLabs","NewTokyoVitaLife","Sector12IcarusMicrosystems","Sector12UniversalEnergy","AevumAeroCorp","VolhavenOmniaCybersystems","ChongqingSolarisSpaceSystems","NewTokyoGlobalPharmaceuticals","IshimaNovaMedical","AevumWatchdogSecurity","VolhavenLexoCorp","AevumRhoConstruction","Sector12AlphaEnterprises","VolhavenSysCoreSecurities","VolhavenCompuTek","AevumNetLinkTechnologies","IshimaOmegaSoftware","Sector12FoodNStuff","calculateHackingChance","difficultyMult","chance","calculateHackingExpGain","expGain","calculatePercentMoneyHacked","percentMoneyHacked","calculateHackingTime","skillFactor","calculateGrowTime","calculateWeakenTime","isScriptFilename","TheDarkArmyServer","DaedalusServer","DarkWeb","Terminal","TTerminal","StockMarket","Orders","storedCycles","ticksUntilCycle","SymbolToStockMap","shares","workerScript","Stock","order","Order","symbol","orders","stk","processOrderRefs","stockMarket","symbolToStockMap","processOrders","stockOrders","stockSymbol","orderTxt","loadStockMarket","deleteStockMarket","initStockMarket","InitStockMetadata","TicksPerCycle","initSymbolToStockMap","cyclesPerStockUpdate","processStockPrices","timeNow","flipForecastForecast","stockMarketCycle","av","mv","chc","otlkMag","cap","changePrice","OrderTypes","LimitBuy","Short","LimitSell","Long","StopBuy","StopSell","otlkMagChange","cycleForecast","cycleForecastForecast","shareTxUntilMovement","shareTxForMovement","initStockMarketFnForReact","eventEmitterForUiReset","EventEmitter","KEY","CTRL","DOWNARROW","ENTER","ESC","TAB","UPARROW","B","C","D","E","F","G","H","I","J","K","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","MoneyRate","CodingContractType","gen","solver","diff","numTries","generate","CodingContractTypes","md","codingContractTypesMetadata","CodingContractResult","CodingContract","fn","getDifficulty","getMaxNumTries","getType","isSolution","solution","Promise","resolve","Cancelled","onAttempt","val","Success","Failure","CodingContractEvent","Reputation","staneksGift","StaneksGift","loadStaneksGift","netscriptDelay","delay","setTimeout","delayResolve","makeRuntimeRejectMsg","msg","resolveNetscriptRequestedThreads","functionName","requestedThreads","threads","requestedThreadsAsInt","isScriptErrorMessage","htmlLocation","margin","spacing","code","page","toActiveScripts","toAugmentations","toBitVerse","toBladeburner","toStats","toCorporation","toCreateProgram","toDevMenu","toFactions","toGameOptions","toGang","toHacknetNodes","toInfiltration","toJob","toMilestones","toResleeves","toScriptEditor","toSleeves","toStockMarket","toTravel","toTutorial","toBladeburnerCinematic","toStaneksGift","GameRoot","engine","terminal","setPage","useState","RecoveryMode","Recovery","Work","determineStartPage","setRerender","setFaction","flume","setFlume","quick","setQuick","setLocation","Infiltration","Location","Job","cinematicText","setCinematicText","rerender","old","killAllScripts","saveObject","saveGame","reload","useEffect","subscribe","ActiveScripts","Stats","CreateProgram","DevMenu","Options","Gang","Hacknet","Milestones","Resleeves","ScriptEditor","Sleeves","Tutorial","City","Travel","BitVerse","BladeburnerCinematic","scrollTo","Provider","killScripts","enter","enterBitNode","flexDirection","flexGrow","px","height","workerScripts","buyStockLong","buyStock","buyStockShort","shortStock","eventEmitterForReset","sellStockLong","sellStock","sellStockShort","export","exportGame","forceKill","exportGameFn","onExport","installAugmentationsFn","removeLeadingSlash","removeTrailingSlash","isValidFilename","match","isValidDirectoryPath","path","t_path","dirs","dir","isValidFilePath","fnSeparator","lastIndexOf","getFirstParentDirectory","getAllParentDirectories","lastSlash","isInRootDirectory","evaluateDirectoryPath","currPath","reconstructedPath","pop","evaluateFilePath","areFilesEqual","f0","f1","inviteToFaction","InvitationEvent","factionInfo","enemies","enemy","hasAugmentationPrereqs","hasPrereqs","prereqAug","augmentationPriceMult","queuedAugmentation","getNextNeurofluxLevel","nextLevel","currLevel","processPassiveFactionRepGain","offersWork","getGangName","hRep","sRep","fRep","rate","Exploit","names","Bypass","EditSaveFile","PrototypeTampering","TimeCompression","Unclickable","UndocumentedFunctionCall","RealityAlteration","N00dles","ExploitName","Set","makeNode","Node","text","createBaseResearchTreeNodes","rootNode","autoBrew","autoParty","autoDrugs","bulkPurchasing","cph4","drones","dronesAssembly","dronesTransport","goJuice","hrRecruitment","hrTraining","joywire","marketta1","marketta2","overclock","scAssemblers","stimu","addChild","baseResearchTree","ResearchTree","setRoot","upgradeFulcrum","upgradeCapacity1","upgradeCapacity2","upgradeDashboard","uuidv4","uuid","subscribers","sub","numCycleForGrowth","growth","ajdGrowthRate","serverGrowthPercentage","coreBonus","processSingleServerGrowth","calculateServerGrowth","oldMoneyAvailable","isValidNumber","usedCycles","ceil","prestigeHomeComputer","homeComp","hasBitflume","BitFlume","scripts","updateRamUsage","getServerOnNetwork","isBackdoorInstalled","SkillNames","BladesIntuition","Cloak","Marksman","WeaponProficiency","ShortCircuit","DigitalObserver","Tracer","Overclock","Reaper","EvasiveSystem","Datamancer","CybersEdge","HandsOfMidas","Hyperdrive","String","StatsTable","rows","title","wide","MuiTable","map","row","elem","align","noWrap","count","getActionTimePenalty","getChaosCompetencePenalty","getChaosDifficultyBonus","MoneyCost","killWorkerScript","rerenderUi","WorkerScript","stopAndCleanUpWorkerScript","RunningScript","killWorkerScriptByPid","pid","compareArrays","atExit","env","stopFlag","clearTimeout","killNetscriptDelay","runningScript","rs","ramUsage","delete","AddRecentScript","WorkerScriptStartStopEventEmitter","removeWorkerScript","Adjuster","setValue","label","placeholder","add","subtract","tons","onChange","InputProps","startAdornment","onClick","style","transform","endAdornment","useGang","defaultConstructorParams","initPrice","marketCap","spreadPerc","range","divisor","lastPrice","playerShares","playerAvgPx","playerShortShares","playerAvgShortPx","otlkMagForecast","getAbsoluteForecast","totalSharesUnrounded","totalShares","maxShares","changeForecastForecast","newff","newPrice","changeAmt","increaseChance","getForecastIncreaseChance","influenceForecast","change","influenceForecastForecast","AddToAugmentations","initAugmentations","clearObject","randomBonuses","bonuses","description","randomNumber","WHRNG","step","getRandomBonus","UnstableCircadianModulatorParams","augmentationExists","RedPill","FTPCrackProgram","RelaySMTPProgram","BruteSSHProgram","DeepscanV1","AutoLink","resetAugmentation","newAugObject","reapply","augObj","ownedAug","augmentationList","nfgIndex","isRepeatableAug","Aliases","GlobalAliases","loadAliases","loadGlobalAliases","printAliases","parseAliasDeclaration","dec","global","matches","trim","addGlobalAlias","addAlias","getGlobalAlias","removeAlias","substituteAliases","origCommand","commandArray","somethingSubstituted","depth","alias","NetscriptPorts","NetscriptPort","prestigeWorkerScripts","startNetscript1Script","codeWithImports","codeLineOffset","running","importProcessingRes","ast","ecmaVersion","allowReserved","sourceType","generatedCode","hasImports","walksimple","ImportDeclaration","scriptName","getScript","scriptAst","specifiers","namespace","local","fnNames","fnDeclarations","FunctionDeclaration","id","fnName","fnsToImport","lineOffset","linesRemoved","body","processNetscript1Imports","interpreterInitialization","scope","NetscriptFunctions","entry","tempWrapper","fnArgs","pseudoToNative","cb","then","catch","setProperty","createAsyncFunction","createNativeFunction","nativeToPseudo","interpreter","Interpreter","reject","runInterpreter","more","errorMessage","startWorkerScript","parent","createAndAddWorkerScript","oneRamUsage","getRamUsageFromRunningScript","roundToTwo","arrayToString","generateNextPid","set","runningFn","wrap","propName","finally","vars","executeJSScript","SyntaxError","message","stack","startNetscript2Script","w","onlineExpGained","onlineMoneyMade","errorTextArray","errorMsg","updateOnlineScriptTimes","onlineRunningTime","loadAllRunningScripts","skipScriptLoad","href","indexOf","markUpdated","scriptCalculateOfflineProduction","runScriptFromScript","caller","scriptname","isArray","arg","ramAvailable","hasAdminRights","Literature","CopyableText","setOpen","variant","copyText","document","createElement","appendChild","select","setSelectionRange","execCommand","removeChild","UpgradeType","gangMemberUpgradesMetadata","def","upgType","Weapon","dex","agi","Armor","Vehicle","Rootkit","Map","MaterialSizes","Water","Plants","Metal","Hardware","Chemicals","Drugs","Robots","AICores","startingLevel","extraLevels","totalMultiplier","startingRam","numUpgrades","currentRam","startingCores","currentCores","startingCache","currentCache","FactionWorkType","calculateExp","skill","createProgressBarText","derived","progress","totalTicks","bars","dashes","Material","getMarkupLimit","qlt","mku","dmd","dmdR","cmp","cmpR","processMarket","priceChange","compChange","dmdChange","calculateWantedPenalty","respect","wantedLevel","calculateRespectGain","task","baseRespect","statWeight","hackWeight","strWeight","defWeight","dexWeight","agiWeight","chaWeight","territoryMult","territoryPenalty","respectMult","calculateWantedLevelGain","baseWanted","wanted","calc","calculateMoneyGain","baseMoney","calculateAscensionPointsGain","calculateAscensionMult","points","gainFavor","getFavorGain","totalRep","favorToRep","repToFavor","BitburnerSaveObject","getSaveString","PlayerSave","AllServersSave","CompaniesSave","FactionsSave","AliasesSave","GlobalAliasesSave","MessagesSave","Messages","StockMarketSave","SettingsSave","VersionSave","LastExportBonus","ExportBonus","StaneksGiftSave","AllGangsSave","btoa","unescape","encodeURIComponent","epochTime","now","bn","download","loadGame","decodeURIComponent","escape","atob","saveObj","loadMessages","initMessages","ver","anyPlayer","positionName","companyPositions","changes","convert","v1APIBreak","nf","revenue","expenses","lastCycleRevenue","lastCycleExpenses","thisCycleRevenue","thisCycleExpenses","evaluateVersionCompatibility","createNewUpdateText","file","Blob","navigator","msSaveOrOpenBlob","url","URL","createObjectURL","click","revokeObjectURL","calculateMoneyGainRate","startingCore","sanitizedCores","coreBaseCost","win","reachedLimit","reached","Game","_","Shapes","KeyHandler","press","onKeyDown","addEventListener","removeEventListener","TimerProgress","withStyles","bar","transition","LinearProgress","GameTimer","setV","intervalId","setInterval","onExpire","millis","clearInterval","item","xs","interpolate","settings","out","lerpD","lerp","y","Trivial","Normal","Hard","Impossible","layerCounter","LogBoxEvents","LogBoxClearEvents","LogBoxManager","LogWindow","close","overflowY","overflowX","container","useRef","updateLayer","current","zIndex","handle","flexFlow","left","top","ref","onMouseDown","cursor","maxLength","right","has","overflowWrap","whiteSpace","bottom","line","Skills","Skill","costInc","successChanceAll","successChanceStealth","successChanceKill","successChanceOperation","successChanceContract","maxLvl","actionTime","effStr","effDef","effDex","effAgi","successChanceEstimate","stamina","GangMemberUpgrades","GangMemberUpgrade","getBuyTransactionCost","posType","getSellTransactionGain","processTransactionForecastMovement","firstShares","remainingShares","numIterations","forecastChange","forecastForecastChange","calculateBuyMaxAmount","isLong","remainingMoney","currPrice","createTaskTracker","Person","calculateStat","getFactionHackingWorkRepGain","updateStatLevels","BitNode","number","BitNodes","initBitNodeMultipliers","sf12Lvl","inc","Hashes","ActionIdentifier","general","contracts","ops","blackops","events","updateSkillMultipliers","calculateMaxStamina","maxStamina","getCurrentCity","calculateStaminaPenalty","actionId","actionTimeCurrent","actionTimeToComplete","getActionObject","resetAction","exceptionAlert","comms","getRecruitmentTime","skillName","skills","executeConsoleCommands","commands","consoleHistory","arrayOfCommands","executeConsoleCommand","postToConsole","input","saveToLogs","consoleLogs","getTimestamp","clearConsole","bladeburnerFac","rank","storeCycles","getActionIdFromTypeAndName","convertedType","convertedName","operations","BlackOperations","executeStartConsoleCommand","GeneralActions","executeSkillConsoleCommand","skillNames","multKeys","skillMultipliers","currentLevel","pointCost","calculateCost","executeLogConsoleCommand","flag","logging","executeHelpConsoleCommand","ConsoleHelpText","helpList","helpText","executeAutomateConsoleCommand","variable","highLow","automateActionHigh","automateActionLow","automateThreshHigh","automateThreshLow","automateEnabled","parseCommandArguments","command","start","endQuote","substr","triggerMigration","sourceCityName","destCityName","destCity","sourceCity","rand","percentage","triggerPotentialMigration","randomEvent","chaos","gainActionStats","successMult","unweightedGain","unweightedIntGain","weights","intExp","getDiplomacyEffectiveness","getRecruitmentSuccessChance","teamSize","effCharisma","effCha","charismaFactor","resetSkillMultipliers","effHack","effInt","multiplierNames","multiplierName","getMultiplier","multiplierValue","completeOperation","teamCount","losses","teamLost","improvePopulationEstimateByPercentage","changePopulationByPercentage","changeEstEqually","nonZero","changeChaosByCount","changeChaosByPercentage","changePopulationByCount","estChange","estOffset","completeContract","improvePopulationEstimateByCount","completeAction","isOperation","difficultyMultiplier","rewardMultiplier","rewardFac","successes","setMaxLevel","rankGain","gain","addOffset","failures","loss","damage","rankLoss","hpLoss","hpLost","calculateHospitalizationCost","numHosp","moneyLost","logLossText","autoLevel","teamLossMax","staminaGain","staminaBonus","eff","successChance","contract","growthF","Growths","operation","maxRank","favorBonus","rankNeededForSp","totalSkillPoints","gainedSkillPoints","processAction","actionTimeOverflow","calculateStaminaGainPerSecond","effAgility","maxStaminaBonus","oldMax","difficultyFac","decays","isStealth","isKill","reqdRank","op","randomEventCounter","getTypeAndNameFromActionId","types","getContractNamesNetscriptFn","getOperationNamesNetscriptFn","getBlackOpNamesNetscriptFn","getGeneralActionNamesNetscriptFn","getSkillNamesNetscriptFn","startActionNetscriptFn","errorLogText","nm","getActionTimeNetscriptFn","actionObj","getActionEstimatedSuccessChanceNetscriptFn","getEstSuccessChance","recChance","getActionCountRemainingNetscriptFn","getSkillLevelNetscriptFn","getSkillUpgradeCostNetscriptFn","upgradeSkillNetscriptFn","getTeamSizeNetscriptFn","setTeamSizeNetscriptFn","sanitizedSize","joinBladeburnerFactionNetscriptFn","DefaultConstructorParams","isPlayerEmployed","rolloverRep","isMegacorp","hasAgentPositions","hasBusinessConsultantPositions","hasBusinessPositions","hasEmployeePositions","hasITPositions","hasSecurityPositions","hasSoftwareConsultantPositions","hasSoftwarePositions","hasWaiterPositions","favorGain","reqdRep","getPurchaseServerCost","sanitizedRam","isPowerOfTwo","getPurchaseServerMaxRam","getPurchaseServerLimit","clz32","newServ","purchaseRamForHomeComputer","materials","unlockUpgrades","updateMaterialSizeUsed","sizeUsed","matName","getStorageMultiplier","GangMemberTasks","gangMemberTasksMetadata","GangMemberTask","isHacking","isCombat","Fragments","Fragment","shape","limit","fullAt","rotation","sy","mx","my","qx","qy","neighboors","candidates","some","coord","cells","candidate","cell","copy","FragmentById","fragment","Booster","NoneFragment","None","DeleteFragment","Delete","opts","suppressDialog","totalPrice","origTotal","newTotal","rerenderFn","resultTxt","gains","netProfit","origCost","profit","Output","formatTime","RawOutput","raw","Link","TTimer","timeLeft","constructLocation","asciiArt","LocationsMetadata","addLocation","updateMoneyGainRate","moneyGainRatePerSecond","totalMoneyGenerated","vals","actionNames","actionName","Action","Suit","Card","suit","formatValue","isRedSuit","Hearts","Diamonds","getStringRepresentation","SourceFile","bitnodeKey","bitnode","getArrow","timePassed","confidence","dataMap","serv","timesGrown","host","offlineRunningTime","offlineExpGained","timesWeakened","findRunningScript","findRunningScriptByPid","TextFile","append","show","getTextFile","textFiles","createTextFile","fileName","lineNumber","sendMessage","forced","recvd","showMessage","serverHostname","other","addMessageToServer","checkForMessagesToSend","redPillFlag","jumper0","MessageFilenames","Jumper0","jumper1","Jumper1","jumper2","Jumper2","jumper3","Jumper3","jumper4","Jumper4","cybersecTest","CyberSecTest","nitesecTest","NiteSecTest","bitrunnersTest","BitRunnersTest","redpill","redpillOwned","flightName","Flight","AddToAllMessages","Message","commit","div","successRate","SnackbarProvider","dense","maxSnack","anchorOrigin","horizontal","vertical","autoHideDuration","Snackbar","enqueueSnackbar","useSnackbar","severity","k","HashUpgradesMetadata","HashUpgrade","getStockMarket4SDataCost","getStockMarket4STixApiCost","ApplyToJobButton","getJobRequirementTooltip","setRedPillFlag","destroyedBitNode","newBitNode","bitNodeNumber","sourceFileKey","sourceFile","alreadyOwned","ownedSourceFile","playerSrcFile","PlayerOwnedSourceFile","giveSourceFile","ThemeEvents","refreshTheme","createTheme","light","typography","fontFamily","textTransform","components","MuiInputBase","styleOverrides","userSelect","MuiInput","borderBottomColor","underline","MuiInputLabel","MuiButton","borderRadius","MuiSelect","icon","defaultProps","MuiTextField","MuiTypography","MuiMenu","list","MuiMenuItem","MuiAccordionSummary","MuiAccordionDetails","MuiIconButton","MuiTooltip","tooltip","fontSize","disableInteractive","MuiSlider","valueLabel","MuiDrawer","paperAnchorDockedLeft","borderRight","MuiDivider","MuiFormControlLabel","MuiSwitch","switchBase","track","MuiPaper","MuiTablePagination","selectLabel","displayedRows","MuiTab","textColorPrimary","MuiAlert","standardSuccess","standardError","standardWarning","standardInfo","TTheme","injectFirst","midpoint","RamCalculationErrorCode","DarkWebItem","program","globalModuleSequenceNumber","Script","otherScripts","moduleSequenceNumber","saveScript","calculateRamUsage","imports","getRandomByte","researchMetadata","Favor","DarkWebItems","HTTPWormProgram","SQLInjectProgram","ServerProfiler","DeepscanV2","AutolinkProgram","FormulasProgram","Formulas","GangConstants","GangRespectToReputationRatio","MaximumGangMembers","CyclesPerTerritoryAndPowerUpdate","AscensionMultiplierRatio","Names","crimeKey","currentTask","finishTask","resetTaskStatus","gainRatesForTask","currentTaskLocation","currentTaskMaxTime","retValue","currentTaskTime","successGainRates","keysForIteration","gainExperience","fromOtherSleeve","multFac","pHackExp","pStrExp","pDefExp","pDexExp","pAgiExp","pChaExp","earningsForPlayer","earningsForTask","earningsForSleeves","getMemoryUpgradeCost","memory","currCost","currMemory","getRepGain","Field","Security","installAugmentation","cyclesUsed","Class","Gym","updateTaskGainRates","Synchro","gymStatType","takeUniversityCourse","universityName","AevumSummitUniversity","Sector12RothmanUniversity","VolhavenZBInstituteOfTechnology","newCity","tryBuyAugmentation","AevumCrushFitnessGym","AevumSnapFitnessGym","Sector12IronGym","Sector12PowerhouseGym","VolhavenMilleniumFitnessGym","baseGymExp","totalExpMultiplier","getTrainingMult","sanitizedStat","totalExpMult","getStudyMult","upgradeMemory","sanitizedWorkType","offerHackingWork","offerFieldWork","offerSecurityWork","workoutAtGym","gymName","stat","TerminalEvents","TerminalClearEvents","nsFuncsGenerator","sanitizedPid","found","Environment","getScriptOnServer","shouldLog","func","orderType","refs","orderBook","executeOrder","isBuy","getDB","indexedDB","indexedDbRequest","onupgradeneeded","createObjectStore","onerror","ev","onsuccess","db","transaction","objectStore","request","put","deleteGame","getTeamSuccessBonus","inst","getActionTypeSkillSuccessBonus","maintainMembership","keep","finishAction","resetPidCounter","ProgramsSeen","InvitationsSeen","setMaxRam","nextPosition","repMultiplier","reqdHacking","reqdStrength","reqdDefense","reqdDexterity","requiredAgility","reqdAgility","reqdCharisma","reqdReputation","hackingEffectiveness","strengthEffectiveness","defenseEffectiveness","dexterityEffectiveness","agilityEffectiveness","charismaEffectiveness","hackRatio","strRatio","defRatio","dexRatio","agiRatio","chaRatio","reputationGain","logEntry","logUpd","displayLog","recordHack","moneyGained","recordGrow","recordWeaken","StartButton","BadRNG","totalPlaytime","s1","s2","s3","fmt","getUpgrade","getUpgradeCost","getCost","capacity","newCap","problemType","getRandomProblemType","getRandomReward","randServer","getRandomServer","contractFn","getRandomFilename","addContract","generateRandomContractOnHome","generateContract","problemTypes","rewardType","factionsThatAllowHacking","sanitizeRewardType","numFactions","randFaction","allJobs","randIndex","findCrime","roughName","atCapacity","marketCycles","hasResearch","emp","hireRandomEmployee","maxEne","maxHap","maxMor","perfMult","hasAutobrew","hasAutoparty","salaryPaid","mor","hap","ene","calculateEmployeeProductivity","employeeProd","prod","calculateProductivity","getElementById","cre","sal","Employee","experience","creativity","efficiency","salary","assignEmployeeToJob","unassignEmployeeFromJob","canGetBonus","setLastExportBonus","unixTime","sanitizedSource","AlertManager","alerts","setAlerts","oldhp","createCityMap","demand","competition","markup","quality","per","performance","dur","durability","rel","reliability","aes","aesthetics","fea","features","siz","reqMats","req","createProduct","empWorkMult","fin","prog","finishProduct","progrMult","engrRatio","mgmtRatio","rndRatio","opsRatio","busRatio","totalMult","sciFac","calculateRating","advMult","busmgtgRatio","isFinite","awareness","popularity","reqMat","ProductRatingWeights","rat","Quality","Performance","Durability","Reliability","Aesthetics","Features","ProgramsRoot","getAvailableCreatePrograms","FactionsRoot","openFaction","acceptInvitation","CorporationState","numUnlockUpgrades","CorporationUnlockUpgrades","CorporationUpgrades","fill","upgradeMultipliers","addFunds","getState","state","gameCycles","shareSaleCooldown","issueNewSharesCooldown","cycleProfit","retainedEarnings","getDividends","updateSharePrice","nextState","dividendsPerShare","dividends","numShares","determineValuation","public","getTargetSharePrice","targetPrice","sharePrice","immediatelyUpdateSharePrice","calculateShareSale","sharesTracker","sharesUntilUpdate","shareSalesUntilPriceUpdate","sharesSold","maxIterations","convertCooldownToString","cd","upgN","dividendTaxPercentage","basePrice","upgradeAmt","getProductionMultiplier","getDreamSenseGain","getAdvertisingMultiplier","getEmployeeCreMultiplier","getEmployeeChaMultiplier","getEmployeeIntMultiplier","getEmployeeEffMultiplier","getSalesMultiplier","getScientificResearchMultiplier","getStarterGuide","hasHandbook","handbookFn","showLiterature","HashRate","popEst","canAccessGang","getGangFaction","hasGangWith","startGang","locations","Option","buttonText","infoText","TickerDisplayMode","DisplayModeButton","tickerDisplayMode","Portfolio","changeDisplayMode","StockTickersConfig","changeWatchlistFilter","hasTorRouter","sum","EPSILON","decay","getSuccessChance","baseTime","skillFac","effDexterity","statFac","est","clamp","real","low","high","competence","playerStatLvl","effMultiplier","getSuccessesNeededForNextLevel","baseSuccessesPerLevel","currentCity","onTravel","lineHeight","WorldMap","SuccessChance","estimatedSuccessChance","StaticModal","baseCheck","netscriptCanHack","initialCheck","netscriptCanGrow","netscriptCanWeaken","ReputationRate","isNumber","ParseCommands","allCommands","flat","ParseCommand","inQuote","prevChar","escaped","MaxSleevesFromCovenant","BaseCostPerSleeve","specialReferenceIF","specialReferenceFOR","specialReferenceWHILE","memCheckGlobalKey","async","parseOnlyRamCalculate","dependencyMap","completedParses","parseQueue","parseCode","moduleName","parseOnlyCalculateDeps","additionalModules","initialModule","nextModule","URLImportError","ImportError","unresolvedRefs","resolvedRefs","prefix","ident","dep","applyFuncRam","loadedFns","checkInfiniteLoop","missingAwaitLine","walk","WhileStatement","st","walkDeeper","nodeHasTrueTest","test","hasAwait","AwaitExpression","currentModule","globalKey","internalToExternal","addRef","external","objectPrototypeProperties","getOwnPropertyNames","commonVisitors","Identifier","DoWhileStatement","ForStatement","update","IfStatement","consequent","alternate","MemberExpression","importModuleName","spec","imported","codeCopy","decimal","checkIfConnectedToDarkweb","listAllDarkwebItems","printRaw","buyDarkwebItem","itemName","members","isHackingGang","respectGainRate","wantedGainRate","moneyGainRate","storedTerritoryAndPowerCycles","territoryClashChance","territoryWarfareEngaged","notifyMemberDeath","getPower","getTerritory","cycles","processGains","processExperienceGains","processTerritoryAndPowerGains","moneyGains","respectGains","wantedLevelGains","justice","recordEarnedRespect","oldWanted","newWanted","gangName","calculatePower","gainRoll","multiplicativeGain","powerMult","PowerMultiplier","additiveGain","gangs","g","others","thisGang","otherGang","thisPwr","thisChance","calculateTerritoryGain","winGang","loseGang","powerBonus","territoryGain","clash","won","baseDeathChance","modifiedDeathChance","killMember","getRespectNeededToRecruitMember","GangMember","getWantedPenalty","memberTotal","totalRespect","lostRespect","earnedRespect","ascend","getDiscount","discount","getAllTaskNames","taskName","pidCounter","tempCounter","MAX_SAFE_INTEGER","updateDynamicRam","ramCost","dynamicLoadedFns","dynamicRamUsage","safeGetServer","callingFnName","makeRuntimeErrorMsg","scriptArgs","getRunningScriptByPid","getCannotFindRunningScriptErrorMessage","failOnHacknetServer","callingFn","errstack","userstack","stackline","dependency","dependencies","parseChromeStackline","lineMatch","funcMatch","chromeCall","parseFirefoxStackline","lio","firefoxCall","rejectMsg","manual","hackingTime","canHack","hackChance","expGainedOnSuccess","expGainedOnFailure","percentHacked","maxThreadNeeded","moneyDrained","influenceStockThroughServerHack","argsToString","toNative","helper","string","funcName","argName","boolean","checkSingularityAccess","NetscriptGang","NetscriptSleeve","extra","NetscriptExtra","NetscriptHacknet","NetscriptStanek","NetscriptBladeburner","NetscriptCodingContract","NetscriptCorporation","formulas","NetscriptFormulas","NetscriptSingularity","NetscriptStockMarket","hackAmount","asleep","growTime","moneyBefore","moneyAfter","logGrowPercent","influenceStockThroughServerGrow","weakenTime","tprintf","possibleLogs","tail","arguments","openPortCount","sshPortOpen","ftpPortOpen","smtpPortOpen","httpPortOpen","sqlPortOpen","scriptServer","spawnDelay","killByPid","scriptsRunning","hostname1","hostname2","destServer","currServ","txtFile","newFile","sourceScript","oldScript","newScript","grep","allFiles","processes","speed","production","purchaseCost","coreCost","levelCost","hostnameStr","port","iport","tryWrite","clearPort","status","removeFile","suc","offlineMoneyMade","tFormat","milliseconds","milliPrecision","alert","toast","PromptEvent","$","writeToScriptFile","writeToTextFile","overwritten","fail","tor","flags","Flags","fromEntries","getFunctionNames","functionNames","entries","moneyHacked","orgName","percTotalMoneyHacked","moneyGrown","percTotalMoneyGrown","performanceMult","cyclesOfWork","compName","tooltiptext","reqRep","CursorPositions","positions","saveCursor","getCursor","column","CinematicText","setI","done","setDone","lines","onDone","newI","auto","ActivateRecoveryMode","RecoveryRoot","Tracking","Retirement","Investigation","Raid","initValue","Hand","cards","addCards","removeByIndex","StockTickerTxButton","getContract","contractName","removeContract","ret","CodingContractModal","setProps","setAnswer","contractType","tries","autoFocus","keyCode","preventDefault","AevumGalacticCybersystems","Sector12DeltaOne","AevumPolice","NewTokyoNoodleBar","Sector12JoesGuns","BitFlumeEvent","BitFlumeModal","FactionInfo","offerHackingMission","augmentationRepRequirementMult","Illuminati","Daedalus","ECorp","MegaCorp","NWO","BitRunners","Silhouette","Netburners","CyberSec","Bladeburners","InvitationModal","findIndex","litObj","Literatures","recentScripts","unshift","timestamp","opt_initFunc","sourceCode","sourceCodeLineOffset","acorn","PARSE_OPTIONS","initFunc_","paused_","polyfills_","functionCounter_","stepFunctions_","stepMatch","methodName","createScope","stripLocations_","State","stateStack","nodeConstructor","READONLY_DESCRIPTOR","configurable","writable","NONENUMERABLE_DESCRIPTOR","READONLY_NONENUMERABLE_DESCRIPTOR","VARIABLE_DESCRIPTOR","STEP_ERROR","SCOPE_REFERENCE","VALUE_IN_DESCRIPTOR","toStringCycles_","getErrorLineNumber","getErrorLineNumberMessage","appendCode","populateScope_","initGlobalScope","OBJECT_PROTO","FUNCTION_PROTO","initFunction","initObject","proto","OBJECT","initArray","initString","initBoolean","initNumber","initDate","initRegExp","initError","initMath","initJSON","thisInterpreter","EvalError","parseInt","strFunctions","decodeURI","encodeURI","wrapper","nativeFunc","throwException","URI_ERROR","FUNCTION","ARRAY","ARRAY_PROTO","REGEXP","REGEXP_PROTO","DATE","DATE_PROTO","identifierRegexp","var_args","calledWithNew","newFunc","createObjectProto","argsStr","SYNTAX_ERROR","parentScope","boxThis","isObject","getScope","strict","box","getPrototype","thisArg","func_","funcThis_","arguments_","arrayPseudoToNative","TYPE_ERROR","doneExec_","setNativeFunctionPrototype","valueOf","throwIfNullUndefined","properties","arrayNativeToPseudo","descriptor","preventExtensions","getOwnPropertyDescriptor","setter","hasValue","pseudoDescriptor","Boolean","propertyIsEnumerable","newArray","first","legalArrayLength","RANGE_ERROR","class","reverse","howmany","opt_begin","opt_end","opt_separator","iLength","getProperty","hasProperty","element","isa","jLength","searchElement","opt_fromIndex","STRING","fromCharCode","functions","compareString","locales","options","localeCompare","separator","jsList","regexp","search","newSubstr","BOOLEAN","NUMBER","numConsts","fractionDigits","toExponential","ERROR","digits","toFixed","precision","toPrecision","radix","from","Function","UTC","pattern","rgx","populateRegExp","RegExp","lastIndex","opt_message","newError","createObject","createErrorSubclass","EVAL_ERROR","REFERENCE_ERROR","myMath","mathConsts","numFunctions","myJSON","nativeObj","child","legalArrayIndex","Value","strs","pseudoRegexp","nativeRegexp","ignoreCase","multiline","createFunction","opt_constructor","illegalConstructor","asyncFunc","pseudoDate","pseudoObj","opt_cycles","pseudo","native","nativeArray","pseudoArray","lineNum","charCodeAt","isGetter","TypeError","opt_descriptor","ReferenceError","defObj","firstNode","expression","createSpecialScope","opt_scope","getValueFromScope","prevNode","setValueToScope","nodeClass","end","isConstructor","getValue","Completion","NORMAL","BREAK","CONTINUE","RETURN","THROW","errorClass","lineNumErrorMsg","unwind","lineNumberMsg","cv","labels","isLoop","isSwitch","realError","errorTable","RangeError","URIError","createGetter_","funcThis","doneCallee_","doneArgs_","createSetter_","elements","n_","array_","doneLeft_","doneRight_","leftReference_","doneGetter_","leftValue_","leftValue","doneSetter_","setterValue_","rightValue","directEval_","funcNode","paramName","paramValue","argsList","evalNode","argsWithCallback","done_","throwValue","mode_","test_","doneInit_","doneObject_","variable_","object_","visited_","name_","gotPropName","props_","doneVariable_","doneProperty_","properties_","kinds","switchValue_","defaultCase_","index_","switchCase","matched_","tested_","doneBlock_","doneHandler_","doneFinalizer_","leftSide_","changeValue","returnValue","declarations","declarationNode","init_","doneBody_","numServerGrowthCycles","adjGrowthRate","numServerGrowthCyclesAdjusted","PromptManager","setPrompt","findSleevePurchasableAugs","ownedAugNames","availableAugs","isAvailableForSleeve","StaneksGiftEvents","AugmentationAccordion","displayName","component","Paper","unmountOnExit","stealthIcon","xmlns","viewBox","killIcon","ActionLevel","isActive","canIncrease","canDecrease","Autolevel","checked","TeamSizeButton","BlinkingCursor","setOn","purchaseResleeve","augKey","generateResleeves","Resleeve","baseNumAugs","numAugs","augKeys","randKey","randAug","char","CorruptableText","setContent","counter","letter","randFrom","randomize","TravelAgencyRoot","destination","setDestination","startTravel","symbolsLoaded","symbols","SetupTextEditor","populate","exclude","lastFilename","lastCode","lastPosition","Root","editorRef","setFilename","setCode","decorations","setDecorations","setRAM","updatingRam","setUpdatingRam","optionsOpen","setOptionsOpen","setOptions","insertSpaces","debouncedSetRAM","useMemo","debounce","textFile","updateRAM","newCode","maybeSave","ctrlKey","metaKey","innerHeight","tabIndex","beforeMount","monaco","languages","registerCompletionItemProvider","provideCompletionItems","suggestions","kind","CompletionItemKind","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","getLanguages","loader","language","tokenizer","token","libSource","typescript","javascriptDefaults","addExtraLib","typescriptDefaults","loadThemes","onMount","editor","setPosition","loading","defaultLanguage","defaultValue","awaitWarning","newDecorations","deltaDecorations","startLineNumber","startColumn","endLineNumber","endColumn","isWholeLine","glyphMarginClassName","glyphMarginHoverMessage","infLoop","glyphMargin","getAction","makeScriptBlob","compile","shouldCompile","uurls","_getScriptUrls","loadedModule","depScript","seen","urlStack","transformedCode","unmodified","suffix","importedScript","urls","ScriptUrl","vargs","numDashes","libarg","argv","defaultInterpreter","TablePaginationActionsAll","useTheme","rowsPerPage","onPageChange","flexShrink","ml","direction","Cell","cellProps","onMouseEnter","canAccessBladeburner","inBladeburner","startBladeburner","automate","cls","help","stop","canAccessCorporation","hasCorporation","startCorporation","corpName","additionalShares","createTreantMarkup","childrenArray","htmlClass","HTMLclass","innerHTML","findNode","setParent","chart","nodeStructure","queue","getMultiplierHelper","getProductProductionMultiplier","currPos","nextPosName","Engine","_lastUpdate","updateGame","expForOtherSleeves","decrementAllCounters","checkCounters","Counters","autoSaveCounter","updateSkillLevelsCounter","updateDisplays","updateDisplaysLong","updateActiveScriptsDisplay","createProgramNotifications","augmentationsNotifications","passiveFactionGrowth","mechanicProcess","contractGeneration","counterName","adjustedCycles","startExploits","timeOffline","numCyclesOffline","offlineReputation","offlineHackingIncome","offlineProductionFromHacknetNodes","hacknetProdInfo","timeOfflineString","_thisUpdate","requestAnimationFrame","LoadingScreen","setShow","loaded","setLoaded","reason","doLoad","minHeight","fma","ex","typ","invalidArgs","baseSize","StanekConstants","BaseSize","af","avgCharge","numCharge","cotmg","inBonus","updateMults","effect","fragmentAt","boost","neighboor","CalculateEffect","rootX","rootY","newFrag","ActiveFragment","aFrag","fragments","collide","findFragment","worldX","worldY","clearCharge","thisFragment","otherFragment","dx","dy","Void","infiltrationData","techVendorMaxRam","techVendorMinRam","ServerType","All","Foreign","Owned","Purchased","ServerDropdown","isValidServer","purchased","serverType","purchase","canPurchase","GenericLocation","locContent","locName","Hospital","Special","TechVendor","University","Casino","getLocationSpecificContent","card","textAlign","fontWeight","red","ReactCard","hidden","Clubs","Spades","allFactionAugs","factionAugs","factionAug","repFromDonation","TickerHeaderFormatData","longestName","longestSymbol","gameCPS","TerminalHelpText","HelpTexts","analyze","backdoor","cat","check","cp","expr","free","lscpu","mem","nano","sudov","unalias","outputHistory","startHack","startGrow","startWeaken","startBackdoor","startAnalyze","finishHack","finishGrow","finishWeaken","finishBackdoor","finishAnalyze","isHacknet","org","hackingSkill","security","hackingChance","numPort","getProgressText","getFile","getLitFile","getFilepath","cwd","filepath","lit","currDir","setcwd","contractOpen","executeScanAnalyzeCommand","visited","depthQueue","newS","titleDashes","connectToServer","executeCommands","commandHistory","commandHistoryIndex","executeCommand","n00dlesServ","commandName","scananalyze","removeBracketsFromArrayString","strCpy","removeQuotesFromString","convert2DArrayToString","ans","len","nums","ways","padStart","matrix","spiral","u","col","playerAns","reach","intervals","numIntervals","interval","sanitizedResult","sanitizedAns","ansArr","ipInAns","maxCur","maxSoFar","hold1","MIN_SAFE_INTEGER","hold2","release1","release2","prices","hold","rele","cur","createTriangleRecurse","numLevels","createTriangle","triangle","dp","numRows","numColumns","currentRow","gridString","grid","obstacleGrid","roll","dfs","pair","playerAnsArray","resultInAnswer","numDigits","digitsArray","sanitizedPlayerAnsArr","evaluated","multed","htmlID","requireHackingLevel","targetServer","numAugReq","ipaddress","byteRange","generalMethods","augmentationMethods","bladeburnerMethods","corporationMethods","gangMethods","serverMethods","installed","formattedHours","getHours","formattedMinutes","getMinutes","formattedSeconds","getSeconds","getMonth","getDate","hack_exp","hack_mult","hack_asc_points","str_exp","str_mult","str_asc_points","def_exp","def_mult","def_asc_points","dex_exp","dex_mult","dex_asc_points","agi_exp","agi_mult","agi_asc_points","cha_exp","cha_mult","cha_asc_points","assignToTask","unassignFromTask","difficultyPerCycles","getGainedAscensionPoints","canAscend","getCurrentAscensionMults","getAscensionMultsAfterAscend","getAscensionResults","postAscend","preAscend","applyUpgrade","respectToDeduct","buyUpgrade","createDescription","AllSoftwarePositions","AllITPositions","AllNetworkEngineerPositions","SecurityEngineerPositions","AllTechnologyPositions","AllBusinessPositions","AllAgentPositions","AllSecurityPositions","AllSoftwareConsultantPositions","AllBusinessConsultantPositions","SoftwarePositionsUpToHeadOfEngineering","SoftwarePositionsUpToLeadDeveloper","BusinessPositionsUpToOperationsManager","WaiterOnly","EmployeeOnly","PartTimeWaiterOnly","PartTimeEmployeeOnly","OperationsManagerOnly","CEOOnly","Sector12CarmichaelSecurity","advertisingMult","employeeChaMult","employeeCreMult","employeeEffMult","employeeIntMult","productionMult","productProductionMult","salesMult","sciResearchMult","storageMult","effectText","costPerLevel","hasTargetServer","lookup","checkGangApiAccess","getGangMember","wantedLevelGainRate","wantedPenalty","cpy","hack_asc_mult","str_asc_mult","def_asc_mult","dex_asc_mult","agi_asc_mult","cha_asc_mult","respectGain","wantedLevelGain","recruited","tasks","memberName","getGangTask","equipName","equipment","typecheck","engage","playerPower","checkSleeveAPIAccess","checkSleeveNumber","sleeveNumber","asleeveNumber","aCrimeRoughName","crimeRoughName","auniversityName","aclassName","acityName","acompanyName","afactionName","aworkType","agymName","astat","sl","jobTitle","maxHp","agilityExp","charismaExp","companyRep","crimeMoney","crimeSuccess","defenseExp","dexterityExp","factionRep","hackingExp","strengthExp","workMoney","workHackExpGain","workStrExpGain","workDefExpGain","workDexExpGain","workAgiExpGain","workChaExpGain","workMoneyGain","workRepGain","augs","purchasableAugs","aaugName","bypass","doc","completely_unused_field","real_document","alterReality","recur","getHacknetNode","hi","maxNumNodes","hasUpgraded","timeOnline","totalProduction","getHashUpgradeLevel","checkStanekAPIAccess","arootX","arootY","arotation","afragmentId","fragmentId","RAMBonus","checkBladeburnerAccess","skipjoined","apiDenied","bladeburnerDenied","checkBladeburnerCity","getBladeburnerActionObject","getCodingContract","returnReward","is2DArray","answerComponents","creward","getCorporation","getDivision","getOffice","getWarehouse","getMaterial","materialName","getProduct","getEmployee","employeeName","checkAccess","api","adivisionName","amaterialName","aproductName","pCost","purchaseWarehouse","upgradeWarehouse","sellMaterial","aamt","aprice","sellProduct","aall","discontinueProduct","setSmartSupply","aenabled","enabled","buyMaterial","makeProduct","adesignInvest","amarketingInvest","exportMaterial","asourceDivision","asourceCity","atargetDivision","atargetCity","sourceDivision","targetDivision","targetCity","cancelExportMaterial","setMaterialMarketTA1","aon","setMaterialMarketTA2","setProductMarketTA1","setProductMarketTA2","assignJob","aemployeeName","ajob","hireEmployee","upgradeOfficeSize","asize","acostPerEmployee","buyCoffee","hireAdVert","aresearchName","minEne","minHap","expandIndustry","aindustryName","industryName","expandCity","unlockUpgrade","aupgradeName","upgradeName","levelUpgrade","issueDividends","apercent","issuedShares","reFac","robFac","aiFac","advFac","prodMats","hwFac","makesProducts","getProductDescriptionText","getMaximumNumberProducts","additional","hasMaximumNumberProducts","calculateProductionFactors","multSum","cityMult","updateWarehouseSizeUsed","prodName","newInd","employeeSalary","officeLoc","processMaterialMarket","processProductMarket","popularityGain","awarenessGain","processMaterials","processProducts","wh","foo","imp","buyAmt","maxAmt","smartBuy","smartSupplyStore","worseAmt","totalSize","freeSpace","maxProd","getOfficeProductivity","totalMatSize","tmp","reqMatName","normQty","producableFrac","reqMatQtyNeeded","prd","fooProd","fooI","sll","businessFactor","getBusinessFactor","advertisingFactor","getAdvertisingFactors","marketFactor","getMarketFactor","markupLimit","numerator","sqrtNumerator","sqrtDenominator","denominator","sqrt","optimalPrice","marketTa2Price","maxSell","sellAmt","totalExp","expI","amtStr","expIndustry","expWarehouse","engrProd","mgmtProd","opProd","mgmtFactor","processProduct","totalProfit","forProduct","netStorageSize","sCostString","businessProd","calculateEffectWithFactors","awarenessFac","popularityFac","ratioFac","updateResearchTree","expFac","linearFac","morale","happiness","energy","det","trainingEff","effCre","effEff","prodBase","checkFormulasAccess","hackPercent","growPercent","hackTime","levelUpgradeCost","ramUpgradeCost","coreUpgradeCost","extraCores","hacknetNodeCost","constants","hacknetServers","hashGainRate","HScalculateHashGainRate","HScalculateLevelUpgradeCost","HScalculateRamUpgradeCost","HScalculateCoreUpgradeCost","cacheUpgradeCost","extraCache","HScalculateCacheUpgradeCost","hashUpgradeCost","hacknetServerCost","HScalculateServerCost","ascensionPointsGain","ascensionMultiplier","checkTixApiAccess","getStockFromSymbol","sanitizedPosType","orderPos","ltype","lpos","stockMarketOrders","forecast","getAugmentation","getFaction","getCompany","runAfterReset","cbScript","facname","locationName","cityname","darkweb","baseserver","installTime","jobTitles","field","hackAvailable","fdWkAvailable","scWkAvailable","repNeededToDonate","detect","hasChanges","orig","fl","backups","maxClearanceLevel","startingSecurityLevel","AevumCasino","Sector12CityHall","WorldStockExchange","ChongqingChurchOfTheMachineGod","IshimaGlitch","textfield","InteractiveTutorialRoot","contents","canNext","square","aria-label","visibilityToggle","overviewContainer","Overview","Loading","openedMixin","transitions","easing","sharp","duration","enteringScreen","closedMixin","leavingScreen","breakpoints","up","Drawer","styled","shouldForwardProp","boxSizing","active","borderLeft","listitem","SidebarRoot","hackingOpen","setHackingOpen","characterOpen","setCharacterOpen","worldOpen","setWorldOpen","helpOpen","setHelpOpen","flashTerminal","flashStats","flashActiveScripts","flashHacknet","flashCity","flashTutorial","augmentationCount","invitationsCount","programCount","canCreateProgram","canOpenFactions","canOpenAugmentations","canOpenSleeves","canCorporation","canGang","canJob","canStockMarket","canBladeburner","canStaneksGift","clickTerminal","clickScriptEditor","clickStats","clickActiveScripts","clickCreateProgram","clickFactions","clickAugmentations","clickHacknet","clickCity","clickTravel","clickJob","clickBladeburner","clickGang","clickTutorial","handleShortcuts","altKey","anchor","timeout","clsx","badgeContent","AugmentationsRoot","InstalledAugmentations","sourceAugs","Alphabetically","aug1","aug2","Improvements","MultiplierTable","PlayerMultipliers","augP","calculateAugmentedStats","BladeburnerMults","PurchasedAugmentations","SourceFileMinus1","OwnedSourceFiles","sourceSfs","sf1","sf2","sfObj","SourceFileAccordion","DevMenuRoot","General","addMoney","TransitionProps","expandIcon","bigNumber","modifyExp","modifier","modifyKarma","resetExperience","modifyFactionRep","AllFaction","modifyFactionFavor","labelId","arial-label","augmentation","setAugmentation","validSFN","setSF","sfN","sfLvl","setAllSF","setProgram","AllPrograms","Servers","setServer","colSpan","setCompany","modifyCompanyRep","AllCompanies","modifyCompanyFavor","modifyBladeburnerRank","modify","modifyBladeburnerCycles","modifyGangCycles","modifyCorporationCycles","CodingContracts","setCodingcontract","cc","stockPrice","setStockPrice","setStockSymbol","processStocks","inputSymbols","SM","stocks","Stanek","modCycles","modCharge","TimeSkip","timeskip","BladeburnerRoot","travelOpen","setTravelOpen","inFaction","TravelModal","nopadding","preformatted","Line","Console","scrollHook","setCommand","consoleHistoryIndex","setConsoleHistoryIndex","scrollToBottom","scrollTop","scrollHeight","id2","prevCommand","currentTarget","spellCheck","AllPages","tab","GeneralActionPage","GeneralActionList","actions","GeneralActionElem","computedActionTimeCurrent","actionData","ContractPage","ContractList","ContractElem","Contracts","StealthIcon","KillIcon","OperationPage","OperationList","OperationElem","TeamSizeModal","BlackOpPage","BlackOpList","blackopName","blackop","BlackOpElem","hasReqdRank","SkillPage","valid","onUpgrade","SkillList","SkillElem","canLevel","GangRoot","ManagementSubpage","GangStats","territoryStr","BonusTime","CyclerPerSecond","bonusMillis","GangMemberList","onRecruit","GangMemberAccordion","GangMemberAccordionContent","onAscend","onTaskChange","GangMemberStats","ascendOpen","setAscendOpen","asc","AscensionModal","TaskSelector","setCurrentTask","TaskDescription","RecruitButton","RecruitModal","setName","recruit","onKeyUp","TerritorySubpage","gangNames","control","formatTerritory","OtherGangTerritory","clashVictoryChance","NextReveal","PurchasedUpgrade","UpgradeButton","GangMemberUpgradePanel","filterUpgrades","weaponUpgrades","armorUpgrades","vehicleUpgrades","rootkitUpgrades","augUpgrades","flexWrap","EquipmentsSubpage","CorporationRoot","setDivisionName","canExpand","industryType","MainPanel","CityTabs","setCity","cityStateSetter","countEmployee","SwitchButton","manualMode","switchMode","ManualManagement","setEmployee","employeePositionSelectorInitialValue","employeePositions","positionNames","AutoAssignJob","numJob","numUnassigned","AutoManagement","vechain","totalMorale","totalHappiness","totalEnergy","totalSalary","avgMorale","avgHappiness","avgEnergy","IndustryOffice","upgradeOfficeSizeOpen","setUpgradeOfficeSizeOpen","throwPartyOpen","setThrowPartyOpen","employeeManualAssignMode","setEmployeeManualAssignMode","UpgradeSizeButton","upgradeSize","UpgradeOfficeSizeModal","upgradeCost","upgradeCost15","maxMult","maxNum","multIncrease","upgradeCostMax","ThrowPartyModal","setCost","canParty","EffectText","MakeProductButton","makeOpen","setMakeOpen","hasMaxProducts","createProductButtonText","Text","researchOpen","setResearchOpen","advertisingInfo","advertisingFactors","totalAdvertisingFac","convertEffectFacToGraphic","Upgrades","IndustryOverview","MakeProductModal","allCities","design","setDesign","marketing","setMarketing","createProductPopupText","Upgrade","but","ResearchModal","WarehouseRoot","smartSupplyOpen","setSmartSupplyOpen","canAffordUpgrade","stateText","mats","isRelevantMaterial","breakdown","IndustryWarehouse","EmptyWarehouse","Leftover","setChecked","SmartSupplyModal","ProductElem","sellOpen","setSellOpen","limitOpen","setLimitOpen","discontinueOpen","setDiscontinueOpen","marketTaOpen","setMarketTaOpen","nfB","hasUpgradeDashboard","sellButtonText","limitProductionButtonText","DiscontinueProductModal","LimitProductProductionModal","setLimit","limitProductProduction","SellProductModal","iQty","setQty","setPx","initialPrice","MarketTA2","ProductMarketTaModal","MaterialElem","purchaseMaterialOpen","setPurchaseMaterialOpen","exportOpen","setExportOpen","sellMaterialOpen","setSellMaterialOpen","materialMarketTaOpen","setMaterialMarketTaOpen","tutorial","purchaseButtonText","ExportModal","setIndustry","setAmt","removeExport","currentDivision","possibleCities","newCost","setNewCost","MaterialMarketTaModal","SellMaterialModal","setPrice","BulkPurchaseText","parsedAmt","amount","matSize","BulkPurchase","setBuyAmt","bulkPurchase","PurchaseMaterialModal","purchaseMaterial","IndustryProductEquation","reqs","reqAmt","ExpandNewCity","ExpandIndustryTab","possibleIndustries","newIndustry","multRows","appendMult","DividendsStats","PublicButtons","PrivateButtons","BribeButton","findInvestorsopen","setFindInvestorsopen","goPublicopen","setGoPublicopen","fundingAvailable","fundingRound","findInvestorsTooltip","upgradeData","sellSharesOpen","setSellSharesOpen","buybackSharesOpen","setBuybackSharesOpen","issueNewSharesOpen","setIssueNewSharesOpen","issueDividendsOpen","setIssueDividendsOpen","sellSharesOnCd","sellSharesTooltip","issueNewSharesOnCd","issueNewSharesTooltip","canBribe","totalDividends","storedTime","LevelableUpgrade","UU","BribeFactionModal","setStock","selectedFaction","setSelectedFaction","getRepText","bribe","SellSharesModal","setShares","ProfitIndicator","stockSaleResults","newSharePrice","newSharesUntilUpdate","BuybackSharesModal","buybackPrice","CostIndicator","IssueDividendsModal","setPercent","canIssue","maxNewSharesUnrounded","maxNewShares","newShares","IssueNewSharesModal","issueNewShares","privateShares","FindInvestorsModal","percShares","roundMultiplier","funding","investShares","GoPublicModal","initialSharePrice","goPublic","calcRawDiff","startingDifficulty","InfiltrationRoot","setStart","calcDifficulty","calcReward","StartingDifficulty","Difficulty","Reward","cancel","arrowPart","arrow","Intro","Stage","minigames","SlashGame","BracketGame","BackwardGame","BribeGame","CheatCodeGame","Cyberpunk2077Game","MinesweeperGame","WireCuttingGame","setLevel","stage","setStage","Countdown","results","setResults","gameIds","setGameIds","lastGames","nextGameId","ids","setupNextGame","pushResult","next","stageComponent","onFinish","Minigame","MiniGame","onSuccess","Sell","onFailure","automated","Progress","setX","difficulties","timer","setRight","generateLeftSide","getChar","phase","setPhase","words","makeAnswer","guess","setGuess","nextGuess","choices","positive","option","negative","array","shuffleArray","makeChoices","setIndex","newIndex","arrows","generateCode","puzzle","randChar","generatePuzzle","generateAnswer","setPos","move","mines","minefield","generateEmptyField","generateMinefield","memoryPhase","setMemoryPhase","reduce","fieldEquals","wiresmin","wiresmax","rules","colorNames","blue","wires","numWires","wireColors","generateWires","cutWires","setCutWires","questions","numQuestions","questionGenerators","randomPositionQuestion","randomColorQuestion","generateQuestion","question","wire","wireNum","shouldCut","wiresToBeCut","shouldBeCut","cutColor","Victory","quitInfiltration","levelBonus","SortOption","Cost","AverageCombatStats","AverageAllStats","TotalNumAugmentations","getAverage","SortFunctions","ResleeveRoot","setSort","sortFunction","opt","resleeve","totalAugmentationCost","ResleeveElem","setAug","currentAug","CYCLES_PER_SEC","WorkInProgressRoot","unfocus","stopText","penaltyString","numBars","progressBar","GameOptionsRoot","importInput","execTime","setExecTime","logSize","setLogSize","portSize","setPortSize","terminalSize","setTerminalSize","autosaveInterval","setAutosaveInterval","suppressMessages","setSuppressMessages","suppressFactionInvites","setSuppressFactionInvites","suppressTravelConfirmations","setSuppressTravelConfirmations","suppressBuyAugmentationConfirmation","setSuppressBuyAugmentationConfirmation","suppressTIXPopup","setSuppressTIXPopup","suppressBladeburnerPopup","setSuppressBladeburnerPopup","disableHotkeys","setDisableHotkeys","disableASCIIArt","setDisableASCIIArt","disableTextEffects","setDisableTextEffects","enableBashHotkeys","setEnableBashHotkeys","timestampFormat","setTimestampFormat","saveGameOnFileSave","setSaveGameOnFileSave","setLocale","diagnosticOpen","setDiagnosticOpen","deleteGameOpen","setDeleteOpen","themeEditorOpen","setThemeEditorOpen","gutterBottom","sm","newValue","valueLabelDisplay","marks","method","src","alt","File","FileReader","FileList","ii","files","reader","onload","readAsText","onConfirm","confirmationText","ServerAccordion","FileDiagnosticModal","ConfirmationModal","ColorEditor","onColorChange","defaultColor","hideTextfield","newColor","hex","ThemeEditorModal","customTheme","setCustomTheme","placement","importedTheme","SleeveRoot","FAQOpen","setFAQOpen","SleeveElem","statsOpen","setStatsOpen","earningsOpen","setEarningsOpen","augmentationsOpen","setAugmentationsOpen","abc","setABC","doing","SleeveAugmentationsModal","StatsElement","MoreStatsModal","MoreEarningsModal","universitySelectorOptions","gymSelectorOptions","possibleJobs","forbiddenCompanies","otherSleeve","possibleFactions","forbiddenFactions","second","facInfo","universities","gyms","Synchronize","canDo","getABC","s0","setS0","setS1","setS2","validActions","detailsF","details","details2","detail","FAQModal","HacknetRoot","purchaseMultiplier","setPurchaseMultiplier","purchaseMultiplierOnClicks","multiplier","onClicks","GeneralInfo","HacknetNodeElem","purchaseMult","upgradeLevelButton","upgradeRAMButton","upgradeCoresButton","increase","upgradeLevelCost","upgradeRamCost","upgradeCoreCost","HacknetServerElem","upgradeRamButton","upgradeCacheButton","upgradeCacheCost","HashUpgradeModal","HacknetUpgradeElem","selectedServer","setSelectedServer","MultiplierButton","MultiplierButtons","buttons","btnProps","PlayerInfo","hasServers","PurchaseButton","CompanyLocation","quitOpen","setQuitOpen","isEmployedHere","onQuit","QuitJobModal","GymLocation","train","HospitalLocation","btnStyle","getHealed","currHp","setState","render","SlumsLocation","shopliftChance","robStoreChance","mugChance","larcenyChance","drugsChance","bondChance","armsChance","homicideChance","gtaChance","kidnapChance","assassinateChance","heistChance","SpecialLocation","handleBladeburner","new","worldHeader","HTMLElement","handleResleeving","CreateCorporation","handleCotMG","renderBladeburner","renderCotMG","CreateCorporationModal","canSelfFund","n00dlePower","ServerButton","TechVendorLocation","purchaseServerButtons","RamButton","TorButton","purchaseTorRouter","CoresButton","maxCores","PurchaseServerModal","setHostname","tryToPurchaseServer","TravelConfirmationModal","UniversityLocation","take","dataStructuresCost","networksCost","algorithmsCost","managementCost","leadershipCost","GameType","CasinoLocation","game","setGame","Coin","Slots","Roulette","Blackjack","Result","bet","canStartGame","playerHand","deck","safeDrawCard","dealerHand","gameInProgress","Pending","getTrueHandValue","finishGame","Tie","PlayerWonByBlackjack","DealerWon","hand","flatMap","handValues","getHandValue","valuesUnder21","isHandBusted","newHand","newDealerHand","PlayerWon","dealerHandValue","playerHandValue","betInput","wager","wagerInvalid","wagerInvalidHelperText","startGame","Deck","playerHandValues","getHandDisplayValues","dealerHandValues","wagerOnChange","helperText","playerHit","playerStay","startOnClick","elevation","prev","numDecks","shuffle","drawCard","isEmpty","CoinFlip","investment","setInvestment","setResult","setStatus","playLock","setPlayLock","play","correct","redNumbers","strategies","Red","payout","Black","Odd","Even","High","Low","Third1","Third2","Third3","Single","rng","canPlay","setCanPlay","setN","lock","setLock","strategy","setStrategy","playerWin","isRed","currentNumber","getPayout","payLines","SlotMachine","locks","setLocks","stoppedOne","getTable","getPaylineData","payline","point","countSequence","checkWinnings","LocationLetter","ASCIICity","locationLettersRegex","letterMap","lineElems","elems","startI","endI","locationI","ListCity","locationButtons","LocationCity","OptionsModal","setTheme","setInsertSpaces","setFontSize","defineTheme","base","inherit","foreground","MilestonesRoot","milestones","highestMilestone","milestone","ActionTimer","paragraph","TerminalRoot","setKey","doScroll","hook","scrollIntoView","maxWait","TerminalInput","terminalInput","possibilities","setPossibilities","saveValue","moveTextCursor","inputLength","selectionStart","keyDown","fullWidth","autoComplete","inputRef","semiColonIndex","allPos","determineAllPossibilitiesForTabCompletion","tabCompletion","selectionEnd","mod","inputText","delStart","modifyInput","parentDirPath","evaledParentDirPath","addAllCodingContracts","cct","addAllLitFiles","addAllPrograms","addAllScripts","processFilepath","addAllTextFiles","addAllDirectories","subdirs","getSubdirectories","t_parentDirPath","convertParentPath","isCommand","cmd","t_cmd","autocomplete","runArgs","permissive","flagFunc","pos2","txts","schema","scriptAutocomplete","addAllMessages","t_dir","processFile","subdir","remaining","allPossibilities","oldValue","longestStartSubstr","TutorialRoot","ActiveScriptsRoot","setTab","ScriptProduction","prodRateSinceLastAug","ServerAccordions","setFilter","setRowsPerPage","serverToScriptMap","filtered","rowsPerPageOptions","newPage","onRowsPerPageChange","ActionsComponent","paddedName","barOptions","headerTxt","ServerAccordionContent","disablePadding","noborder","WorkerScriptAccordion","killScript","onlineMps","onlineEps","RecentScriptsPage","recentScript","RecentScriptAccordion","GangNames","MainPage","onAugmentations","sleevesOpen","setSleevesOpen","gangOpen","setGangOpen","isPlayersGang","favorToDonate","canDonate","canPurchaseSleeves","startHackingContracts","startFieldWork","startSecurityWork","FactionRoot","purchasingAugs","setPurchasingAugs","routeToMainPage","AugmentationsPage","getAugs","switchSortOrder","newOrder","augName1","augName2","getAugsSortedByCost","getAugsSortedByReputation","Purchasable","canBuy","hasReq","hasRep","cantBuy","getAugsSortedByPurchasable","getAugsSorted","purchasable","purchaseableAugmentation","augListElems","ownedElem","Requirements","PurchaseableAugmentation","hasCost","btnTxt","PurchaseAugmentationModal","DonateOption","donateAmt","setDonateAmt","Status","noformat","Info","CreateGangModal","CovenantPurchasesRoot","setUpdate","purchaseDisabled","upgradePanels","CovenantSleeveMemoryUpgrade","maxMemory","purchaseBtnDisabled","purchaseBtnContent","LastEmployer","LastJob","Employers","Intelligence","bn5Stat","CurrentBitNode","MoneyModal","convertMoneySourceTrackerToString","parts","hacknet_expenses","hospitalization","infiltration","CharacterStats","moneyOpen","setMoneyOpen","timeRows","StockMarketRoot","Purchase4SMarketDataTixApiAccessButton","PurchaseWseAccountButton","PurchaseTixApiAccessButton","Purchase4SMarketDataButton","InfoAndPurchases","StockTickers","setTickerDisplayMode","AllStocks","watchlistSymbols","setWatchlistSymbols","tickers","stockMarketProp","rerenderAllTickers","sanitizedWatchlist","SelectorOrderType","StockTicker","setOrderType","Market","tickerOpen","setTicketOpen","modalProps","setModalProps","placeText","getQuantity","hasOrderAccess","Limit","Stop","getBuyTransactionCostContent","getSellTransactionCostContent","playerMoney","localesWithLongPriceFormat","StockTickerHeaderText","stockPriceFormat","spacesAllottedForStockPrice","spacesAfterStockName","spacesBeforePrice","hdrText","plusOrMinus","StockTickerOrderList","StockTickerOrder","posTxt","LongPosition","percentageGains","ShortPosition","StockTickerPositionText","PlaceOrderModal","level0","level1","level2","level3","BitNodePortal","portalOpen","setPortalOpen","bitNode","cssClass","BitverseRoot","destroyed","destroySequence","setDestroySequence","nextSourceFileFlags","PortalModal","bitNodeKey","maxSourceFileLevel","newLevel","CinematicLine","setLength","ms","newLength","advance","StaneksGiftRoot","gift","zeros","dimensions","MainBoard","calculateGrid","newgrid","setGrid","ghostGrid","setGhostGrid","setRotation","selectedFragment","setSelectedFragment","moveGhost","clickAt","deleteAt","randomColor","doRotate","selectFragment","FragmentInspector","setC","FragmentOption","colorAt","FragmentSelector","FragmentPreview","cellNone","CharacterOverview","killOpen","setKillOpen","KillScriptsModal","getComputedStyle","Element","visibility","full","empty","srcFile","sourceFileObject","incMult","decMult","normalServer","evaledDir","dst","srcExt","tRes","sRes","matchEnding","zip","JSZip","zipFiles","fileNames","fileContents","zipFn","generateAsync","FileSaver","saveAs","sanitizedExpr","used","avail","usedPercent","numArgs","incorrectUsage","newPath","allPrograms","allScripts","allTextFiles","allContracts","allMessages","folders","handleFn","dest","parsedFn","firstParentDir","msgOrLit","postSegments","segments","filesPerRow","groups","fontStyle","numThreads","sourcePath","destPath","destFile","rsObj","delTarget","executableName","runContract","runProgram","commandArgs","threadFlag","tailFlag","hasRoot","maxHostname","maxIP","args2","headers","currRunningScripts","numSpacesScript","spacesScript","numSpacesPid","spacesPid","numSpacesThread","spacesThread","tampering","last","minute","timeCompression","bitNodeFinishedState","wd","achievements","ID","Condition","setAchievements","achs","calculateAchievements","initElectron","ReactDOM","onbeforeunload"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ,EAAmB,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AAY6pB,GACNp4G,KAAKsuF,WAAatuF,KAAKm4G,+BAA+BC,MACtDp4G,KAAKohD,SAIXtnB,SACE,OAAOpM,YAAe,SAAU1tB,MAInB,gBAAC/B,GACd,OAAO8vB,YAAiBiqE,EAAQ/5F,EAAM9C,OAI1CoE,IAAQiuB,aAAawqE,OAASA,G,6BC7S9B,kCAIO,MAAMgb,EAA4D,CAEvE,EAAK,CACH,EACA,KACA,SACA,8JAKF,EAAK,CACH,EACA,KACA,eACA,wIAKF,EAAK,CACH,EACA,IACA,2BACA,uKAKF,EAAK,CACH,EACA,IACA,4BACA,8MAIF,EAAK,CACH,EACA,KACA,UACA,+LAIF,EAAK,CACH,EACA,KACA,mBACA,gJAGF,EAAK,CACH,EACA,KACA,yBACA,4HAGF,EAAK,CAAC,EAAG,KAAM,gBAAiB,8BAChC,EAAK,CAAC,EAAG,KAAM,aAAc,6B,6BChE/B,kCAIO,MAAMC,EAAgD,CAE3D,EAAK,CACH,EACA,IACA,KACA,IACA,kBACA,kKAKF,EAAK,CACH,EACA,IACA,KACA,GACA,gBACA,kKAKF,EAAK,CACH,EACA,IACA,IACA,KACA,aACA,4TAQF,EAAK,CACH,EACA,IACA,IACA,KACA,mBACA,sKAMF,EAAK,CACH,EACA,IACA,KACA,GACA,wCACA,gLAMF,EAAK,CACH,EACA,IACA,KACA,GACA,4BACA,kKAKF,EAAK,CACH,EACA,IACA,KACA,GACA,sBACA,wKAMF,EAAK,CACH,EACA,IACA,KACA,GACA,aACA,6JAKF,EAAK,CACH,EACA,IACA,KACA,IACA,gBACA,4LAMF,EAAK,CACH,EACA,IACA,KACA,IACA,kBACA,6M,6BC1HJ,6EAWA,SAAShzC,EAAKlzC,GACZ,OAAIA,EAAMgX,OAAShX,EAAMsrF,YAErB,kBAAC,IAAD,CAASzuC,MAAO,kBAAC,IAAD,KAAa78C,EAAMgX,OACjC,0BACEwoC,QAAS,IAAMx/C,EAAMurF,SAASvrF,EAAMgX,MACpCyoC,MAAO,CAAE9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,yCACA,SACA,oBACA,4CACA,OACA,IACA,IACA,MAIA,uDACA,8CACA,sBACA,0DACA,IACA,yCACA,wBACA,mDACA,4BACA,mCACA,mBACA,gBACA,IACA,yCACA,qEACA,yBACA,uBACA,qBACA,oBACA,2BACA,+BACA,uDACA,iCACA,8FACA,IACA,8BACA,oBACA,+DACA,wEACA,4CACA,eACA,IACA,0BACA,OACA,IACA,qBACA,gBACA,IACA,MAIA,gDACA,8CACA,gCACA,8DACA,eACA,wBACA,4BACA,yCACA,sBACA,SACA,oBACA,mDACA,OACA,IACA,YACA,IACA,MAIA,mDACA,8CACA,0CACA,kEACA,4DACA,gCACA,wBACA,WACA,oCACA,kBACA,kEACA,IACA,kBACA,IACA,yBACA,mDACA,IACA,gBACA,IACA,MAIA,wDACA,8CACA,0CACA,yGACA,kEACA,+BACA,wBACA,WACA,mCACA,eACA,kEACA,IACA,kBACA,IACA,wBACA,mDACA,IACA,gBACA,IACA,MAIA,iDACA,8CACA,+BACA,6DACA,wBACA,4BACA,+DACA,kCACA,iDACA,eACA,IACA,IACA,gBACA,IACA,MAEA,gBACA,oCACA,8CAEA,wCACA,2BACA,IAEA,0CACA,mBACA,kDACA,4CACA,sBACA,yBACA,sBACA,aACA,IACA,IACA,uBACA,IACA,eACA,KACA,QAEA,2DACA,8CACA,eACA,gBACA,0CACA,wFACA,IACA,wBACA,IACA,MACA,KAQJi4E,EAAYr4E,UAAUm0H,WAAa,SAAU58C,GAC3C,IACI09C,EADAN,EAAkBxwH,KAGtB8wH,EAAU,SAAU7yH,GAElB,OADAA,EAAQwrE,OAAOxrE,GACXuyH,EAAgBmB,iBAElB3xH,KAAK7E,KAAO8C,EACL+B,MAGA/B,GAGX+B,KAAK60H,OAAS70H,KAAK+zE,qBAAqB+8C,GAAS,GACjD9wH,KAAK6zE,YAAYT,EAAO,SAAUpzE,KAAK60H,QAGvC70H,KAAK6zE,YACH7zE,KAAK60H,OACL,eACA70H,KAAK+zE,qBAAqBtK,OAAOqrD,cAA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,EAAOwjB,YAAc0/F,EAAWnpG,EAAYq/D,kBACtD,MACF,QACE,MAAM,IAAIn5E,MAAM,wCAEpB,MAAO,CACLod,kBAAmBnB,EACnB5D,oBAAqBuL,EAAU7jB,EAAOoK,iBAAmBt0B,IAAmBwB,gBAC5EihC,mBAAoBuL,EAAS9jB,EAAOqK,kBAAoBv0B,IAAmBwB,gBAC3EkhC,mBAAoBuL,EAAS/jB,EAAOsK,iBAAmBx0B,IAAmBwB,gBAC1EmhC,mBAAoBuL,EAAShkB,EAAOuK,mBAAqBz0B,IAAmBwB,gBAC5EohC,mBAAoBuL,EAASjkB,EAAOwK,iBAAmB10B,IAAmBwB,gBAC1EqhC,mBAAoBuL,EAASlkB,EAAOyK,kBAAoB30B,IAAmBwB,mB,6BC7E/E,oEAGO,MAAM6rI,EAA6B,CACxC,oDACA,GACA,0EACA,kFACA,kFACA,+EACA,0EACA,iEACA,yEACA,uEACA,4DACA,mEACA,mDACA,wFACA,0EACA,8EACA,+GACA,gEACA,8FACA,gEACA,4EACA,yFACA,wFACA,yEACA,uFACA,6FACA,yEACA,4FACA,sFACA,qEACA,mEACA,4FACA,6FACA,6EACA,2FACA,sFACA,wFACA,mEACA,uEACA,8EAGWC,EAA4B,CACvCp/D,MAAO,CACL,6BACA,IACA,4FACA,uGACA,yHACA,kGACA,IACA,4BACA,IACA,mHACA,yHACA,4CACA,IACA,4BACA,IACA,6DACA,IACA,WACA,IACA,2HACA,4HACA,IACA,+BACA,IACA,8GACA,IACA,uHACA,uCACA,IACA,uDACA,KAEFq/D,QAAS,CACP,SACA,IACA,0GACA,mHACA,kHACA,iCAEFC,SAAU,CACR,WACA,IACA,6FACA,IACA,+BACA,KAEF7vH,IAAK,CACH,qBACA,IACA,yEACA,IACA,oHACA,oDACA,IACA,yGAEF8vH,IAAK,CACH,aACA,IACA,6EACA,IACA,aACA,IACA,cACA,IACA,mBAEF17B,GAAI,CACF,WACA,IACA,yGACA,iFACA,IACA,qBACA,IACA,WACA,IACA,UAEF27B,MAAO,CACL,gCACA,IACA,+HACA,uDACA,kIACA,IACA,gCACA,IACA,gGACA,IACA,mCAEF1uH,MAAO,CACL,QACA,IACA,mIACA,wIAEFkmH,IAAK,CACH,MACA,IACA,mIACA,0IAEFvkH,QAAS,CACP,qBACA,IACA,6GACA,sIACA,kEAEFgtH,GAAI,CAAC,iBAAkB,IAAK,yEAC5BzyD,SAAU,CACR,8BACA,IACA,mFACA,IACA,4GACA,IACA,kDACA,IACA,0CACA,IACA,0CACA,KAEF0yD,KAAM,CACJ,iCACA,IACA,oFACA,IACA,oBACA,IACA,WACA,IACA,oBACA,IACA,sFAEFC,KAAM,CACJ,OACA,IACA,iIACA,iCAEF5zH,KAAM,CACJ,OACA,GACA,6GACA,4CAEF1G,KAAM,CACJ,OACA,IACA,uHACA,KAEF4xH,KAAM,CACJ,iBACA,IACA,yHACA,0HACA,mEACA,IACA,aACA,IACA,qBAEFt/F,KAAM,CACJ,2GAEFhX,SAAU,CAAC,WAAY,IAAK,6CAC5BvT,KAAM,CACJ,+BACA,IACA,aACA,IACA,4EACA,IACA,6EACA,4EACA,iFACA,4DACA,IACA,mCACA,IACA,qEACA,IACA,oCACA,IACA,sFAEFC,QAAS,CACP,UACA,IACA,4CACA,2HACA,uHACA,4EAEFG,GAAI,CACF,4BACA,IACA,iIACA,sDACA,IACA,8FACA,IACA,yHACA,IACA,YACA,IACA,wEACA,IACA,oBACA,IACA,iEACA,IACA,kBACA,IACA,uFACA,IACA,8BAEFoyH,MAAO,CAAC,QAAS,IAAK,yDAEtBC,IAAK,CACH,qCACA,IACA,6HACA,2HACA,gFACA,IACA,iBACA,IACA,uBACA,IACA,4HACA,kFAEFh7E,GAAI,CACF,kBACA,IACA,6FACA,6FACA,kCACA,IACA,kFACA,kBACA,aACA,IACA,iEACA,IACA,iCAEFi7E,KAAM,CACJ,mBACA,IACA,sGACA,2FACA,mBAEFryH,GAAI,CAAC,KAAM,IAAK,6DAEhByD,GAAI,CACF,YACA,IACA,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AOqX,mBAAmB1nC,OAAOpB,EAAG,GACpCA,KAKJ,OAFAyxB,EAAO4c,oBAAoB98B,IAAUoC,+BACrCilD,EAAaniB,IAAI,cAAe,IAAO,eAAc10C,gBAC9C,GAETunB,eAAgB,SAAUvnB,EAAWo0C,GAMnC,GALA8xE,EAAOrC,iBAAiB,iBAAkBz1F,YAAW,mBACrD83F,EAAOK,uBAAuB,iBAAkB,GAChDsqC,EAAW,iBAAkB7wJ,GAGzB0vB,EAAO3G,eAA+B0G,IAAnB26B,IAASpqD,GAE9B,OADA62D,EAAaniB,IAAI,iBAAkB,IAAO,YAAW10C,0CAC9C,EAGT,IAAK0vB,EAAOoX,SAAS0D,SAASxqC,GAE5B,OADA62D,EAAaniB,IAAI,iBAAkB,IAAO,4BAA2B10C,OAC9D,EAGT,GAAI0vB,EAAOiY,UAAW,CACpB,MAAMlZ,EAAMiB,EAAOod,sBACnB+pB,EAAaniB,IAAI,iBAAkB,IAAMjmB,GAG3C,MAAM0N,EAAMjJ,IAASlzB,GAEfyxJ,EAAgB,CACpB,aACA,WACA,eACA,QACA,WACA,uBACA,mBACA,MACA,sBACA,uBACA,aACA,yBACA,8BACA,aACA,iBACA,UACA,YACA,YACA,YACA,QACA,SACA,WACA,wBACA,gBACA,gBACA,aACA,aACA,cACA,YAEIC,EAAgB,CACpB,aACA,WACA,eACA,QACA,WACA,uBACA,mBACA,MACA,sBACA,uBACA,aACA,yBACA,iBACA,YACA,YACA,YACA,QACA,SACA,WACA,wBACA,gBACA,gBACA,aACA,UACA,eAEIC,EAAgB,CACpB,QACA,WACA,uBACA,mBACA,MACA,sBACA,uBACA,aACA,yBACA,8BACA,YACA,YACA,YACA,QACA,SACA,WACA,wBACA,gBACA,UACA,cACA,eAGF,OAAQv9G,EAAK9I,eACX,IAAK,UACL,IAAK,oBACL,IAAK,mBACH,OAAKmmH,EAAcjnH,SAASrO,EAAIn8B,OAIhC0vB,EAAO8gB,qBAAqBhY,IAAQ2D,GACpC06B,EAAaniB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A,cACA,UACA,OACA,MACA,WACA,SACA,cACA,MACA,aACA,WACA,OACA,MACA,UACA,QACA,WACA,UACA,aACA,QACA,UACA,MACA,OACA,SACA,WACA,WACA,UACA,QACA,cACA,cACA,YACA,SACA,OACA,SACA,QACA,WACA,WACA,WACA,OACA,SACA,WACA,YACA,OACA,OACA,YACA,YACA,OACA,QACA,UACA,YACA,WACA,aACA,YACA,OACA,WACA,WACA,SACA,MACA,WACA,UACA,SACA,gBACA,OACA,QACA,UACA,QACA,QACA,UACA,YACA,QACA,YACA,UACA,QACA,SACA,SACA,QACA,UACA,cACA,QACA,aACA,MACA,UACA,OACA,WACA,WACA,UACA,SACA,aACA,YACA,SACA,SACA,SACA,OACA,WACA,QACA,OACA,WACA,SACA,SACA,WACA,SACA,UACA,QACA,SACA,QACA,UACA,UACA,UACA,UACA,aACA,WACA,QACA,SACA,MACA,WACA,SACA,aACA,UACA,MACA,OACA,SACA,UACA,OACA,OACA,UACA,SACA,aACA,SACA,SACA,SACA,SACA,SACA,WACA,SACA,YACA,QACA,QACA,YACA,WACA,oBACA,WACA,OACA,UACA,cACA,UACA,SACA,UACA,gBACA,OACA,SACA,QACA,MACA,WACA,WACA,WACA,cACA,SACA,UACA,QACA,eACA,WACA,OACA,OACA,SACA,MACA,OACA,iBACA,WACA,UACA,UACA,UACA,iBACA,QACA,MACA,YACA,UACA,SACA,OACA,SACA,UACA,WACA,YACA,cACA,MACA,OACA,MACA,MACA,Q,6BCtTF,gGAcA,MAAMP,EAKF,CACF7sF,QAAS,CAAE8sF,MAAO,KAAOvlH,KAAM,GAC/B04B,OAAQ,CAAE6sF,MAAO,IAAMvlH,KAAM,GAC7B24B,KAAM,CAAE4sF,MAAO,IAAMvlH,KAAM,GAC3B44B,WAAY,CAAE2sF,MAAO,KAAMvlH,KAAM,KAG5B,SAASyjH,EAAUvgJ,GACxB,MAAM4uB,EAAyB,CAAEyzH,MAAO,EAAGvlH,KAAM,GACjDm4B,YAAYmtF,EAAcpiJ,EA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1sB,GAAMA,EAAEgvK,aAAaz0H,IAAKv6C,GAAMA,EAAE+uK,KAGlE,SAASK,IACdH,EAAgB,IAChB/8G,YAAYi9G,EAAuB,O,6FCnZrC,yEAcA,SAAS9/H,IACPo/B,cACA4gG,IAASngB,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEFvnG,SAASs3B,eAAe,SAd5BmwF,cACAC,IAASngB,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEFvnG,SAASs3B,eAAe,SAcxBzQ,IAAY5+B,UAAUP,GAIwB56B,SAASkyC,KAAKxmC,WAAW,aACvE7wC,OAAOggM,eAAiB,WACtB,MAAO","file":"main.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1231,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { sanitizeExploits } from \"./Exploits/Exploit\";\n\nimport { Reviver } from \"./utils/JSONReviver\";\n\nexport let Player = new PlayerObject();\n\nexport function loadPlayer(saveString: string): void {\n Player = JSON.parse(saveString, Reviver);\n Player.money = parseFloat(Player.money as any);\n Player.exploits = sanitizeExploits(Player.exploits);\n}\n","import numeral from \"numeral\";\nimport \"numeral/locales/bg\";\nimport \"numeral/locales/cs\";\nimport \"numeral/locales/da-dk\";\nimport \"numeral/locales/de\";\nimport \"numeral/locales/en-au\";\nimport \"numeral/locales/en-gb\";\nimport \"numeral/locales/es\";\nimport \"numeral/locales/fr\";\nimport \"numeral/locales/hu\";\nimport \"numeral/locales/it\";\nimport \"numeral/locales/lv\";\nimport \"numeral/locales/no\";\nimport \"numeral/locales/pl\";\nimport \"numeral/locales/ru\";\n\n/* eslint-disable class-methods-use-this */\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\n\nclass NumeralFormatter {\n // Default Locale\n defaultLocale = \"en\";\n\n constructor() {\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l: string): boolean {\n if (numeral.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n\n numeral.locale(this.defaultLocale);\n return false;\n }\n return true;\n }\n\n format(n: number, format: string): string {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n const answer = numeral(n).format(format);\n if (answer === \"NaN\") {\n return `${n}`;\n }\n return answer;\n }\n\n formatBigNumber(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n formatReallyBigNumber(n: number, decimalPlaces = 3): string {\n if (n === Infinity) return \"∞\";\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < n && n <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n if (Math.abs(n) < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n: number): string {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n: number): string {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n: number): string {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatRAM(n: number): string {\n if (n < 1e3) return this.format(n, \"0.00\") + \"GB\";\n if (n < 1e6) return this.format(n / 1e3, \"0.00\") + \"TB\";\n if (n < 1e9) return this.format(n / 1e6, \"0.00\") + \"PB\";\n if (n < 1e12) return this.format(n / 1e9, \"0.00\") + \"EB\";\n return this.format(n, \"0.00\") + \"GB\";\n }\n\n formatPercentage(n: number, decimalPlaces = 2): string {\n const formatter: string = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n: number): string {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n: number): string {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n: number): string {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n: number): string {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatStaneksGiftHeat(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftCharge(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftPower(n: number): string {\n return this.format(n, \"0.00\");\n }\n\n parseMoney(s: string): number {\n // numeral library does not handle formats like 1e10 well (returns 110),\n // so if both return a valid number, return the biggest one\n const numeralValue = numeral(s).value();\n const parsed = parseFloat(s);\n if (isNaN(parsed) && numeralValue === null) {\n return NaN;\n } else if (isNaN(parsed)) {\n return numeralValue;\n } else if (numeralValue === null) {\n return parsed;\n } else {\n return Math.max(numeralValue, parsed);\n }\n }\n}\n\nexport const numeralWrapper = new NumeralFormatter();\n","/**\n * Bitnode multipliers influence the difficulty of different aspects of the game.\n * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the\n * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...\n */\ninterface IBitNodeMultipliers {\n /**\n * Influences how quickly the player's agility level (not exp) scales\n */\n AgilityLevelMultiplier: number;\n\n /**\n * Influences the base cost to purchase an augmentation.\n */\n AugmentationMoneyCost: number;\n\n /**\n * Influences the base rep the player must have with a faction to purchase an augmentation.\n */\n AugmentationRepCost: number;\n\n /**\n * Influences how quickly the player can gain rank within Bladeburner.\n */\n BladeburnerRank: number;\n\n /**\n * Influences the cost of skill levels from Bladeburner.\n */\n BladeburnerSkillCost: number;\n\n /**\n * Influences how quickly the player's charisma level (not exp) scales\n */\n CharismaLevelMultiplier: number;\n\n /**\n * Influences the experience gained for each ability when a player completes a class.\n */\n ClassGymExpGain: number;\n\n /**\n * Influences the amount of money gained from completing Coding Contracts\n **/\n CodingContractMoney: number;\n\n /**\n * Influences the experience gained for each ability when the player completes working their job.\n */\n CompanyWorkExpGain: number;\n\n /**\n * Influences how much money the player earns when completing working their job.\n */\n CompanyWorkMoney: number;\n\n /**\n * Influences the valuation of corporations created by the player.\n */\n CorporationValuation: number;\n\n /**\n * Influences the base experience gained for each ability when the player commits a crime.\n */\n CrimeExpGain: number;\n\n /**\n * Influences the base money gained when the player commits a crime.\n */\n CrimeMoney: number;\n\n /**\n * Influences how many Augmentations you need in order to get invited to the Daedalus faction\n */\n DaedalusAugsRequirement: number;\n\n /**\n * Influences how quickly the player's defense level (not exp) scales\n */\n DefenseLevelMultiplier: number;\n\n /**\n * Influences how quickly the player's dexterity level (not exp) scales\n */\n DexterityLevelMultiplier: number;\n\n /**\n * Influences how much rep the player gains in each faction simply by being a member.\n */\n FactionPassiveRepGain: number;\n\n /**\n * Influences the experience gained for each ability when the player completes work for a Faction.\n */\n FactionWorkExpGain: number;\n\n /**\n * Influences how much rep the player gains when performing work for a faction.\n */\n FactionWorkRepGain: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data API\n */\n FourSigmaMarketDataApiCost: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data (NOT API)\n */\n FourSigmaMarketDataCost: number;\n\n /**\n * Reduces gangs earning.\n */\n GangSoftcap: number;\n\n /**\n * Influences the experienced gained when hacking a server.\n */\n HackExpGain: number;\n\n /**\n * Influences how quickly the player's hacking level (not experience) scales\n */\n HackingLevelMultiplier: number;\n\n /**\n * Influences how much money is produced by Hacknet Nodes.\n * Influeces the hash rate of Hacknet Servers (unlocked in BitNode-9)\n */\n HacknetNodeMoney: number;\n\n /**\n * Influences how much money it costs to upgrade your home computer's RAM\n */\n HomeComputerRamCost: number;\n\n /**\n * Influences how much money is gained when the player infiltrates a company.\n */\n InfiltrationMoney: number;\n\n /**\n * Influences how much rep the player can gain from factions when selling stolen documents and secrets\n */\n InfiltrationRep: number;\n\n /**\n * Influences how much money can be stolen from a server when the player performs a hack against it through\n * the Terminal.\n */\n ManualHackMoney: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerCost: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerSoftcap: number;\n\n /**\n * Influences the maximum number of purchased servers you can have\n */\n PurchasedServerLimit: number;\n\n /**\n * Influences the maximum allowed RAM for a purchased server\n */\n PurchasedServerMaxRam: number;\n /**\n * Influences the minimum favor the player must have with a faction before they can donate to gain rep.\n */\n RepToDonateToFaction: number;\n\n /**\n * Influences how much money can be stolen from a server when a script performs a hack against it.\n */\n ScriptHackMoney: number;\n\n /**\n * The amount of money actually gained when script hack a server. This is\n * different than the above because you can reduce the amount of money but\n * not gain that same amount.\n */\n ScriptHackMoneyGain: number;\n\n /**\n * Influences the growth percentage per cycle against a server.\n */\n ServerGrowthRate: number;\n\n /**\n * Influences the maxmimum money that a server can grow to.\n */\n ServerMaxMoney: number;\n\n /**\n * Influences the initial money that a server starts with.\n */\n ServerStartingMoney: number;\n\n /**\n * Influences the initial security level (hackDifficulty) of a server.\n */\n ServerStartingSecurity: number;\n\n /**\n * Influences the weaken amount per invocation against a server.\n */\n ServerWeakenRate: number;\n\n /**\n * Influences how quickly the player's strength level (not exp) scales\n */\n StrengthLevelMultiplier: number;\n\n /**\n * Influences the power of the gift.\n */\n StaneksGiftPowerMultiplier: number;\n\n /**\n * Influences the size of the gift.\n */\n StaneksGiftExtraSize: number;\n\n /**\n * Influences the hacking skill required to backdoor the world daemon.\n */\n WorldDaemonDifficulty: number;\n\n // Index signature\n [key: string]: number;\n}\n\n/**\n * The multipliers that are influenced by current Bitnode progression.\n */\n// tslint:disable-next-line:variable-name\nexport const BitNodeMultipliers: IBitNodeMultipliers = {\n HackingLevelMultiplier: 1,\n StrengthLevelMultiplier: 1,\n DefenseLevelMultiplier: 1,\n DexterityLevelMultiplier: 1,\n AgilityLevelMultiplier: 1,\n CharismaLevelMultiplier: 1,\n\n ServerGrowthRate: 1,\n ServerMaxMoney: 1,\n ServerStartingMoney: 1,\n ServerStartingSecurity: 1,\n ServerWeakenRate: 1,\n\n HomeComputerRamCost: 1,\n\n PurchasedServerCost: 1,\n PurchasedServerSoftcap: 1,\n PurchasedServerLimit: 1,\n PurchasedServerMaxRam: 1,\n\n CompanyWorkMoney: 1,\n CrimeMoney: 1,\n HacknetNodeMoney: 1,\n ManualHackMoney: 1,\n ScriptHackMoney: 1,\n ScriptHackMoneyGain: 1,\n CodingContractMoney: 1,\n\n ClassGymExpGain: 1,\n CompanyWorkExpGain: 1,\n CrimeExpGain: 1,\n FactionWorkExpGain: 1,\n HackExpGain: 1,\n\n FactionPassiveRepGain: 1,\n FactionWorkRepGain: 1,\n RepToDonateToFaction: 1,\n\n AugmentationMoneyCost: 1,\n AugmentationRepCost: 1,\n\n InfiltrationMoney: 1,\n InfiltrationRep: 1,\n\n FourSigmaMarketDataCost: 1,\n FourSigmaMarketDataApiCost: 1,\n\n CorporationValuation: 1,\n CorporationSoftCap: 1,\n\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n\n GangSoftcap: 1,\n\n DaedalusAugsRequirement: 1,\n\n StaneksGiftPowerMultiplier: 1,\n StaneksGiftExtraSize: 0,\n\n WorldDaemonDifficulty: 1,\n};\n","export const AugmentationNames: {\n Targeting1: string;\n Targeting2: string;\n Targeting3: string;\n SyntheticHeart: string;\n SynfibrilMuscle: string;\n CombatRib1: string;\n CombatRib2: string;\n CombatRib3: string;\n NanofiberWeave: string;\n SubdermalArmor: string;\n WiredReflexes: string;\n GrapheneBoneLacings: string;\n BionicSpine: string;\n GrapheneBionicSpine: string;\n BionicLegs: string;\n GrapheneBionicLegs: string;\n SpeechProcessor: string;\n TITN41Injection: string;\n EnhancedSocialInteractionImplant: string;\n BitWire: string;\n ArtificialBioNeuralNetwork: string;\n ArtificialSynapticPotentiation: string;\n EnhancedMyelinSheathing: string;\n SynapticEnhancement: string;\n NeuralRetentionEnhancement: string;\n DataJack: string;\n ENM: string;\n ENMCore: string;\n ENMCoreV2: string;\n ENMCoreV3: string;\n ENMAnalyzeEngine: string;\n ENMDMA: string;\n Neuralstimulator: string;\n NeuralAccelerator: string;\n CranialSignalProcessorsG1: string;\n CranialSignalProcessorsG2: string;\n CranialSignalProcessorsG3: string;\n CranialSignalProcessorsG4: string;\n CranialSignalProcessorsG5: string;\n NeuronalDensification: string;\n NeuroreceptorManager: string;\n NuoptimalInjectorImplant: string;\n SpeechEnhancement: string;\n FocusWire: string;\n PCDNI: string;\n PCDNIOptimizer: string;\n PCDNINeuralNetwork: string;\n PCMatrix: string;\n ADRPheromone1: string;\n ADRPheromone2: string;\n ShadowsSimulacrum: string;\n HacknetNodeCPUUpload: string;\n HacknetNodeCacheUpload: string;\n HacknetNodeNICUpload: string;\n HacknetNodeKernelDNI: string;\n HacknetNodeCoreDNI: string;\n NeuroFluxGovernor: string;\n Neurotrainer1: string;\n Neurotrainer2: string;\n Neurotrainer3: string;\n Hypersight: string;\n LuminCloaking1: string;\n LuminCloaking2: string;\n HemoRecirculator: string;\n SmartSonar: string;\n PowerRecirculator: string;\n QLink: string;\n TheRedPill: string;\n SPTN97: string;\n HiveMind: string;\n CordiARCReactor: string;\n SmartJaw: string;\n Neotra: string;\n Xanipher: string;\n nextSENS: string;\n OmniTekInfoLoad: string;\n PhotosyntheticCells: string;\n Neurolink: string;\n TheBlackHand: string;\n UnstableCircadianModulator: string;\n CRTX42AA: string;\n Neuregen: string;\n CashRoot: string;\n NutriGen: string;\n INFRARet: string;\n DermaForce: string;\n GrapheneBrachiBlades: string;\n GrapheneBionicArms: string;\n BrachiBlades: string;\n BionicArms: string;\n SNA: string;\n HydroflameLeftArm: string;\n EsperEyewear: string;\n EMS4Recombination: string;\n OrionShoulder: string;\n HyperionV1: string;\n HyperionV2: string;\n GolemSerum: string;\n VangelisVirus: string;\n VangelisVirus3: string;\n INTERLINKED: string;\n BladeRunner: string;\n BladeArmor: string;\n BladeArmorPowerCells: string;\n BladeArmorEnergyShielding: string;\n BladeArmorUnibeam: string;\n BladeArmorOmnibeam: string;\n BladeArmorIPU: string;\n BladesSimulacrum: string;\n StaneksGift1: string;\n StaneksGift2: string;\n StaneksGift3: string;\n} = {\n Targeting1: \"Augmented Targeting I\",\n Targeting2: \"Augmented Targeting II\",\n Targeting3: \"Augmented Targeting III\",\n SyntheticHeart: \"Synthetic Heart\",\n SynfibrilMuscle: \"Synfibril Muscle\",\n CombatRib1: \"Combat Rib I\",\n CombatRib2: \"Combat Rib II\",\n CombatRib3: \"Combat Rib III\",\n NanofiberWeave: \"Nanofiber Weave\",\n SubdermalArmor: \"NEMEAN Subdermal Weave\",\n WiredReflexes: \"Wired Reflexes\",\n GrapheneBoneLacings: \"Graphene Bone Lacings\",\n BionicSpine: \"Bionic Spine\",\n GrapheneBionicSpine: \"Graphene Bionic Spine Upgrade\",\n BionicLegs: \"Bionic Legs\",\n GrapheneBionicLegs: \"Graphene Bionic Legs Upgrade\",\n SpeechProcessor: \"Speech Processor Implant\",\n TITN41Injection: \"TITN-41 Gene-Modification Injection\",\n EnhancedSocialInteractionImplant: \"Enhanced Social Interaction Implant\",\n BitWire: \"BitWire\",\n ArtificialBioNeuralNetwork: \"Artificial Bio-neural Network Implant\",\n ArtificialSynapticPotentiation: \"Artificial Synaptic Potentiation\",\n EnhancedMyelinSheathing: \"Enhanced Myelin Sheathing\",\n SynapticEnhancement: \"Synaptic Enhancement Implant\",\n NeuralRetentionEnhancement: \"Neural-Retention Enhancement\",\n DataJack: \"DataJack\",\n ENM: \"Embedded Netburner Module\",\n ENMCore: \"Embedded Netburner Module Core Implant\",\n ENMCoreV2: \"Embedded Netburner Module Core V2 Upgrade\",\n ENMCoreV3: \"Embedded Netburner Module Core V3 Upgrade\",\n ENMAnalyzeEngine: \"Embedded Netburner Module Analyze Engine\",\n ENMDMA: \"Embedded Netburner Module Direct Memory Access Upgrade\",\n Neuralstimulator: \"Neuralstimulator\",\n NeuralAccelerator: \"Neural Accelerator\",\n CranialSignalProcessorsG1: \"Cranial Signal Processors - Gen I\",\n CranialSignalProcessorsG2: \"Cranial Signal Processors - Gen II\",\n CranialSignalProcessorsG3: \"Cranial Signal Processors - Gen III\",\n CranialSignalProcessorsG4: \"Cranial Signal Processors - Gen IV\",\n CranialSignalProcessorsG5: \"Cranial Signal Processors - Gen V\",\n NeuronalDensification: \"Neuronal Densification\",\n NeuroreceptorManager: \"Neuroreceptor Management Implant\",\n NuoptimalInjectorImplant: \"Nuoptimal Nootropic Injector Implant\",\n SpeechEnhancement: \"Speech Enhancement\",\n FocusWire: \"FocusWire\",\n PCDNI: \"PC Direct-Neural Interface\",\n PCDNIOptimizer: \"PC Direct-Neural Interface Optimization Submodule\",\n PCDNINeuralNetwork: \"PC Direct-Neural Interface NeuroNet Injector\",\n PCMatrix: \"PCMatrix\",\n ADRPheromone1: \"ADR-V1 Pheromone Gene\",\n ADRPheromone2: \"ADR-V2 Pheromone Gene\",\n ShadowsSimulacrum: \"The Shadow's Simulacrum\",\n HacknetNodeCPUUpload: \"Hacknet Node CPU Architecture Neural-Upload\",\n HacknetNodeCacheUpload: \"Hacknet Node Cache Architecture Neural-Upload\",\n HacknetNodeNICUpload: \"Hacknet Node NIC Architecture Neural-Upload\",\n HacknetNodeKernelDNI: \"Hacknet Node Kernel Direct-Neural Interface\",\n HacknetNodeCoreDNI: \"Hacknet Node Core Direct-Neural Interface\",\n NeuroFluxGovernor: \"NeuroFlux Governor\",\n Neurotrainer1: \"Neurotrainer I\",\n Neurotrainer2: \"Neurotrainer II\",\n Neurotrainer3: \"Neurotrainer III\",\n Hypersight: \"HyperSight Corneal Implant\",\n LuminCloaking1: \"LuminCloaking-V1 Skin Implant\",\n LuminCloaking2: \"LuminCloaking-V2 Skin Implant\",\n HemoRecirculator: \"HemoRecirculator\",\n SmartSonar: \"SmartSonar Implant\",\n PowerRecirculator: \"Power Recirculation Core\",\n QLink: \"QLink\",\n TheRedPill: \"The Red Pill\",\n SPTN97: \"SPTN-97 Gene Modification\",\n HiveMind: \"ECorp HVMind Implant\",\n CordiARCReactor: \"CordiARC Fusion Reactor\",\n SmartJaw: \"SmartJaw\",\n Neotra: \"Neotra\",\n Xanipher: \"Xanipher\",\n nextSENS: \"nextSENS Gene Modification\",\n OmniTekInfoLoad: \"OmniTek InfoLoad\",\n PhotosyntheticCells: \"Photosynthetic Cells\",\n Neurolink: \"BitRunners Neurolink\",\n TheBlackHand: \"The Black Hand\",\n UnstableCircadianModulator: \"Unstable Circadian Modulator\",\n CRTX42AA: \"CRTX42-AA Gene Modification\",\n Neuregen: \"Neuregen Gene Modification\",\n CashRoot: \"CashRoot Starter Kit\",\n NutriGen: \"NutriGen Implant\",\n INFRARet: \"INFRARET Enhancement\",\n DermaForce: \"DermaForce Particle Barrier\",\n GrapheneBrachiBlades: \"Graphene BrachiBlades Upgrade\",\n GrapheneBionicArms: \"Graphene Bionic Arms Upgrade\",\n BrachiBlades: \"BrachiBlades\",\n BionicArms: \"Bionic Arms\",\n SNA: \"Social Negotiation Assistant (S.N.A)\",\n HydroflameLeftArm: \"Hydroflame Left Arm\",\n EsperEyewear: \"EsperTech Bladeburner Eyewear\",\n EMS4Recombination: \"EMS-4 Recombination\",\n OrionShoulder: \"ORION-MKIV Shoulder\",\n HyperionV1: \"Hyperion Plasma Cannon V1\",\n HyperionV2: \"Hyperion Plasma Cannon V2\",\n GolemSerum: \"GOLEM Serum\",\n VangelisVirus: \"Vangelis Virus\",\n VangelisVirus3: \"Vangelis Virus 3.0\",\n INTERLINKED: \"I.N.T.E.R.L.I.N.K.E.D\",\n BladeRunner: \"Blade's Runners\",\n BladeArmor: \"BLADE-51b Tesla Armor\",\n BladeArmorPowerCells: \"BLADE-51b Tesla Armor: Power Cells Upgrade\",\n BladeArmorEnergyShielding: \"BLADE-51b Tesla Armor: Energy Shielding Upgrade\",\n BladeArmorUnibeam: \"BLADE-51b Tesla Armor: Unibeam Upgrade\",\n BladeArmorOmnibeam: \"BLADE-51b Tesla Armor: Omnibeam Upgrade\",\n BladeArmorIPU: \"BLADE-51b Tesla Armor: IPU Upgrade\",\n BladesSimulacrum: \"The Blade's Simulacrum\",\n\n StaneksGift1: \"Stanek's Gift - Genesis\",\n StaneksGift2: \"Stanek's Gift - Awakening\",\n StaneksGift3: \"Stanek's Gift - Serenity\",\n\n //Wasteland Augs\n //PepBoy: \"P.E.P-Boy\", Plasma Energy Projection System\n //PepBoyForceField Generates plasma force fields\n //PepBoyBlasts Generate high density plasma concussive blasts\n //PepBoyDataStorage STore more data on pep boy,\n};\n","/**\n * Generic Game Constants\n *\n * Constants for specific mechanics or features will NOT be here.\n */\nexport const CONSTANTS: {\n VersionString: string;\n VersionNumber: number;\n _idleSpeed: number;\n MaxSkillLevel: number;\n MilliPerCycle: number;\n CorpFactionRepRequirement: number;\n BaseFocusBonus: number;\n BaseCostFor1GBOfRamHome: number;\n BaseCostFor1GBOfRamServer: number;\n TravelCost: number;\n BaseFavorToDonate: number;\n DonateMoneyToRepDivisor: number;\n FactionReputationToFavorBase: number;\n FactionReputationToFavorMult: number;\n CompanyReputationToFavorBase: number;\n CompanyReputationToFavorMult: number;\n NeuroFluxGovernorLevelMult: number;\n NumNetscriptPorts: number;\n HomeComputerMaxRam: number;\n ServerBaseGrowthRate: number;\n ServerMaxGrowthRate: number;\n ServerFortifyAmount: number;\n ServerWeakenAmount: number;\n PurchasedServerLimit: number;\n PurchasedServerMaxRam: number;\n MultipleAugMultiplier: number;\n TorRouterCost: number;\n WSEAccountCost: number;\n TIXAPICost: number;\n MarketData4SCost: number;\n MarketDataTixApi4SCost: number;\n StockMarketCommission: number;\n HospitalCostPerHp: number;\n IntelligenceCrimeWeight: number;\n IntelligenceInfiltrationWeight: number;\n IntelligenceCrimeBaseExpGain: number;\n IntelligenceProgramBaseExpGain: number;\n IntelligenceTerminalHackBaseExpGain: number;\n IntelligenceSingFnBaseExpGain: number;\n IntelligenceClassBaseExpGain: number;\n MillisecondsPer20Hours: number;\n GameCyclesPer20Hours: number;\n MillisecondsPer10Hours: number;\n GameCyclesPer10Hours: number;\n MillisecondsPer8Hours: number;\n GameCyclesPer8Hours: number;\n MillisecondsPer4Hours: number;\n GameCyclesPer4Hours: number;\n MillisecondsPer2Hours: number;\n GameCyclesPer2Hours: number;\n MillisecondsPerHour: number;\n GameCyclesPerHour: number;\n MillisecondsPerHalfHour: number;\n GameCyclesPerHalfHour: number;\n MillisecondsPerQuarterHour: number;\n GameCyclesPerQuarterHour: number;\n MillisecondsPerFiveMinutes: number;\n GameCyclesPerFiveMinutes: number;\n FactionWorkHacking: string;\n FactionWorkField: string;\n FactionWorkSecurity: string;\n WorkTypeCompany: string;\n WorkTypeCompanyPartTime: string;\n WorkTypeFaction: string;\n WorkTypeCreateProgram: string;\n WorkTypeStudyClass: string;\n WorkTypeCrime: string;\n ClassStudyComputerScience: string;\n ClassDataStructures: string;\n ClassNetworks: string;\n ClassAlgorithms: string;\n ClassManagement: string;\n ClassLeadership: string;\n ClassGymStrength: string;\n ClassGymDefense: string;\n ClassGymDexterity: string;\n ClassGymAgility: string;\n ClassDataStructuresBaseCost: number;\n ClassNetworksBaseCost: number;\n ClassAlgorithmsBaseCost: number;\n ClassManagementBaseCost: number;\n ClassLeadershipBaseCost: number;\n ClassGymBaseCost: number;\n ClassStudyComputerScienceBaseExp: number;\n ClassDataStructuresBaseExp: number;\n ClassNetworksBaseExp: number;\n ClassAlgorithmsBaseExp: number;\n ClassManagementBaseExp: number;\n ClassLeadershipBaseExp: number;\n CrimeShoplift: string;\n CrimeRobStore: string;\n CrimeMug: string;\n CrimeLarceny: string;\n CrimeDrugs: string;\n CrimeBondForgery: string;\n CrimeTraffickArms: string;\n CrimeHomicide: string;\n CrimeGrandTheftAuto: string;\n CrimeKidnap: string;\n CrimeAssassination: string;\n CrimeHeist: string;\n CodingContractBaseFactionRepGain: number;\n CodingContractBaseCompanyRepGain: number;\n CodingContractBaseMoneyGain: number;\n TotalNumBitNodes: number;\n LatestUpdate: string;\n} = {\n VersionString: \"1.1.0\",\n VersionNumber: 6,\n\n // Speed (in ms) at which the main loop is updated\n _idleSpeed: 200,\n\n /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience\n * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then\n * the player will have this level assuming no multipliers. Multipliers can cause skills to go above this.\n */\n MaxSkillLevel: 975,\n\n // Milliseconds per game cycle\n MilliPerCycle: 200,\n\n // How much reputation is needed to join a megacorporation's faction\n CorpFactionRepRequirement: 200e3,\n\n // Base RAM costs\n BaseCostFor1GBOfRamHome: 32000,\n BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM\n\n // Cost to travel to another city\n TravelCost: 200e3,\n\n // Faction and Company favor-related things\n BaseFavorToDonate: 150,\n DonateMoneyToRepDivisor: 1e6,\n FactionReputationToFavorBase: 500,\n FactionReputationToFavorMult: 1.02,\n CompanyReputationToFavorBase: 500,\n CompanyReputationToFavorMult: 1.02,\n\n // NeuroFlux Governor Augmentation cost multiplier\n NeuroFluxGovernorLevelMult: 1.14,\n\n NumNetscriptPorts: 20,\n\n // Server-related constants\n HomeComputerMaxRam: 1073741824, // 2 ^ 30\n ServerBaseGrowthRate: 1.03, // Unadjusted Growth rate\n ServerMaxGrowthRate: 1.0035, // Maximum possible growth rate (max rate accounting for server security)\n ServerFortifyAmount: 0.002, // Amount by which server's security increases when its hacked/grown\n ServerWeakenAmount: 0.05, // Amount by which server's security decreases when weakened\n\n PurchasedServerLimit: 25,\n PurchasedServerMaxRam: 1048576, // 2^20\n\n // Augmentation Constants\n MultipleAugMultiplier: 1.9,\n\n // TOR Router\n TorRouterCost: 200e3,\n\n // Stock market\n WSEAccountCost: 200e6,\n TIXAPICost: 5e9,\n MarketData4SCost: 1e9,\n MarketDataTixApi4SCost: 25e9,\n StockMarketCommission: 100e3,\n\n // Hospital/Health\n HospitalCostPerHp: 100e3,\n\n // Intelligence-related constants\n IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates\n IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates\n IntelligenceCrimeBaseExpGain: 0.05,\n IntelligenceProgramBaseExpGain: 0.1, // Program required hack level divided by this to determine int exp gain\n IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain\n IntelligenceSingFnBaseExpGain: 1.5,\n IntelligenceClassBaseExpGain: 0.01,\n\n // Time-related constants\n MillisecondsPer20Hours: 72000000,\n GameCyclesPer20Hours: 72000000 / 200,\n\n MillisecondsPer10Hours: 36000000,\n GameCyclesPer10Hours: 36000000 / 200,\n\n MillisecondsPer8Hours: 28800000,\n GameCyclesPer8Hours: 28800000 / 200,\n\n MillisecondsPer4Hours: 14400000,\n GameCyclesPer4Hours: 14400000 / 200,\n\n MillisecondsPer2Hours: 7200000,\n GameCyclesPer2Hours: 7200000 / 200,\n\n MillisecondsPerHour: 3600000,\n GameCyclesPerHour: 3600000 / 200,\n\n MillisecondsPerHalfHour: 1800000,\n GameCyclesPerHalfHour: 1800000 / 200,\n\n MillisecondsPerQuarterHour: 900000,\n GameCyclesPerQuarterHour: 900000 / 200,\n\n MillisecondsPerFiveMinutes: 300000,\n GameCyclesPerFiveMinutes: 300000 / 200,\n\n // Player Work & Action\n BaseFocusBonus: 0.8,\n FactionWorkHacking: \"Faction Hacking Work\",\n FactionWorkField: \"Faction Field Work\",\n FactionWorkSecurity: \"Faction Security Work\",\n\n WorkTypeCompany: \"Working for Company\",\n WorkTypeCompanyPartTime: \"Working for Company part-time\",\n WorkTypeFaction: \"Working for Faction\",\n WorkTypeCreateProgram: \"Working on Create a Program\",\n WorkTypeStudyClass: \"Studying or Taking a class at university\",\n WorkTypeCrime: \"Committing a crime\",\n\n ClassStudyComputerScience: \"studying Computer Science\",\n ClassDataStructures: \"taking a Data Structures course\",\n ClassNetworks: \"taking a Networks course\",\n ClassAlgorithms: \"taking an Algorithms course\",\n ClassManagement: \"taking a Management course\",\n ClassLeadership: \"taking a Leadership course\",\n ClassGymStrength: \"training your strength at a gym\",\n ClassGymDefense: \"training your defense at a gym\",\n ClassGymDexterity: \"training your dexterity at a gym\",\n ClassGymAgility: \"training your agility at a gym\",\n\n ClassDataStructuresBaseCost: 40,\n ClassNetworksBaseCost: 80,\n ClassAlgorithmsBaseCost: 320,\n ClassManagementBaseCost: 160,\n ClassLeadershipBaseCost: 320,\n ClassGymBaseCost: 120,\n\n ClassStudyComputerScienceBaseExp: 0.5,\n ClassDataStructuresBaseExp: 1,\n ClassNetworksBaseExp: 2,\n ClassAlgorithmsBaseExp: 4,\n ClassManagementBaseExp: 2,\n ClassLeadershipBaseExp: 4,\n\n CrimeShoplift: \"shoplift\",\n CrimeRobStore: \"rob a store\",\n CrimeMug: \"mug someone\",\n CrimeLarceny: \"commit larceny\",\n CrimeDrugs: \"deal drugs\",\n CrimeBondForgery: \"forge corporate bonds\",\n CrimeTraffickArms: \"traffick illegal arms\",\n CrimeHomicide: \"commit homicide\",\n CrimeGrandTheftAuto: \"commit grand theft auto\",\n CrimeKidnap: \"kidnap someone for ransom\",\n CrimeAssassination: \"assassinate a high-profile target\",\n CrimeHeist: \"pull off the ultimate heist\",\n\n // Coding Contract\n // TODO: Move this into Coding contract implementation?\n CodingContractBaseFactionRepGain: 2500,\n CodingContractBaseCompanyRepGain: 4000,\n CodingContractBaseMoneyGain: 75e6,\n\n // BitNode/Source-File related stuff\n TotalNumBitNodes: 24,\n\n LatestUpdate: `\n v1.1.0 - 2021-12-03 BN13: They're Lunatics (hydroflame & community)\n -------------------------------------------------------\n\n ** BN13: They're Lunatics **\n \n * BN13 added.\n\n ** Steam **\n\n * Tested on all 3 major OS.\n * 94 achievements added\n * Release is 2021-12-10.\n\n ** Corporation API **\n\n * Added corporation API. (Unstable)\n\n ** Netscript **\n \n * tprintf crashes when not giving a format as first arg.\n * tprintf no longer prints filename (@BartKoppelmans)\n * TIX buy/sell/sellShort all return askprice/bidprice (@Insight)\n * getRunningScript now works.\n * Fix disableLog for gang and TIX API\n * getOwnedSourceFiles is not singularity anymore (makes it easier to share scripts.) (@theit8514)\n * true/false is a valid value to send to other scripts.\n * workForFaction no longer returns null when trying to work for gang.\n * Scripts logging no longer generates the string if logging is disabled.\n This should give performance boost for some scripts.\n\n ** Gang **\n \n * Gang with 0 territory can no longer fight\n * Territory now caps at exactly 0 or 1.\n\n ** Misc. **\n\n * Clicking \"previous\" on the browser will not pretend you had unsaved information\n allowing you to cancel if needs be.\n * Fixed some tail box coloring issue.\n * Fixed BladeBurner getCityCommunities ram cost\n * The download terminal command no longer duplicate extensions (@Insight)\n * Fix #000 on #000 text in blackjack. (@Insight)\n * Remove reference to .fconf\n * Tail boxes all die on soft reset.\n * Fix codign contract focus bug.\n * Megacorp factions simply re-invite you instead of auto added on reset. (@theit8514)\n * Tail window is bound to html body.\n * Infiltration reward is tied to your potential stats, not your actual stats\n So you won't lose reward for doing the same thing over and over.\n * intelligence lowers program creation requirements.\n * Terminal parses true as the boolean, not the string.\n * Tail and kill autocomplete using the ns2 autocomplete feature.\n * scan-analyze doesn't take up as many terminal entries.\n * GangOtherInfo documentation now renders correctly.\n * ActiveScripts search box also searches for script names.\n * Infinite money no longer allows for infinite hacknet server.\n * Blackjack doesn't make you lose money twice.\n * Recent Scripts is now from most to least recent.\n * Fix mathjax ascii art bug in NiteSec.\n * Remove warning that the theme editor is slow, it's only slow in dev mode.\n * In BN8 is it possible to reduce the money on a server without gaining any.\n * In the options, the timestamp feature has a placeholder explaining the expected format.\n * Bunch of doc typo fix. (hydroflame & @BartKoppelmans & @cvr-119)\n * World Daemon difficulty is increased depending on BitNode.\n * hacking skill nerf was loosened in some BNs.\n * nerf noodle bar\n`,\n};\n","/**\n * Names of all locations\n */\nexport enum LocationName {\n // Cities\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n\n // Aevum Locations\n AevumAeroCorp = \"AeroCorp\",\n AevumBachmanAndAssociates = \"Bachman & Associates\",\n AevumClarkeIncorporated = \"Clarke Incorporated\",\n AevumCrushFitnessGym = \"Crush Fitness Gym\",\n AevumECorp = \"ECorp\",\n AevumFulcrumTechnologies = \"Fulcrum Technologies\",\n AevumGalacticCybersystems = \"Galactic Cybersystems\",\n AevumNetLinkTechnologies = \"NetLink Technologies\",\n AevumPolice = \"Aevum Police Headquarters\",\n AevumRhoConstruction = \"Rho Construction\",\n AevumSnapFitnessGym = \"Snap Fitness Gym\",\n AevumSummitUniversity = \"Summit University\",\n AevumWatchdogSecurity = \"Watchdog Security\",\n AevumCasino = \"Iker Molina Casino\",\n\n // Chongqing locations\n ChongqingKuaiGongInternational = \"KuaiGong International\",\n ChongqingSolarisSpaceSystems = \"Solaris Space Systems\",\n ChongqingChurchOfTheMachineGod = \"Church of the Machine God\",\n\n // Sector 12\n Sector12AlphaEnterprises = \"Alpha Enterprises\",\n Sector12BladeIndustries = \"Blade Industries\",\n Sector12CIA = \"Central Intelligence Agency\",\n Sector12CarmichaelSecurity = \"Carmichael Security\",\n Sector12CityHall = \"Sector-12 City Hall\",\n Sector12DeltaOne = \"DeltaOne\",\n Sector12FoodNStuff = \"FoodNStuff\",\n Sector12FourSigma = \"Four Sigma\",\n Sector12IcarusMicrosystems = \"Icarus Microsystems\",\n Sector12IronGym = \"Iron Gym\",\n Sector12JoesGuns = \"Joe's Guns\",\n Sector12MegaCorp = \"MegaCorp\",\n Sector12NSA = \"National Security Agency\",\n Sector12PowerhouseGym = \"Powerhouse Gym\",\n Sector12RothmanUniversity = \"Rothman University\",\n Sector12UniversalEnergy = \"Universal Energy\",\n\n // New Tokyo\n NewTokyoDefComm = \"DefComm\",\n NewTokyoGlobalPharmaceuticals = \"Global Pharmaceuticals\",\n NewTokyoNoodleBar = \"Noodle Bar\",\n NewTokyoVitaLife = \"VitaLife\",\n\n // Ishima\n IshimaNovaMedical = \"Nova Medical\",\n IshimaOmegaSoftware = \"Omega Software\",\n IshimaStormTechnologies = \"Storm Technologies\",\n IshimaGlitch = \"0x6C1\",\n\n // Volhaven\n VolhavenCompuTek = \"CompuTek\",\n VolhavenHeliosLabs = \"Helios Labs\",\n VolhavenLexoCorp = \"LexoCorp\",\n VolhavenMilleniumFitnessGym = \"Millenium Fitness Gym\",\n VolhavenNWO = \"NWO\",\n VolhavenOmniTekIncorporated = \"OmniTek Incorporated\",\n VolhavenOmniaCybersystems = \"Omnia Cybersystems\",\n VolhavenSysCoreSecurities = \"SysCore Securities\",\n VolhavenZBInstituteOfTechnology = \"ZB Institute of Technology\",\n\n // Generic locations\n Hospital = \"Hospital\",\n Slums = \"The Slums\",\n TravelAgency = \"Travel Agency\",\n WorldStockExchange = \"World Stock Exchange\",\n\n // Default name for Location objects\n Void = \"The Void\",\n}\n","import { ISelfInitializer, ISelfLoading } from \"../types\";\nimport { OwnedAugmentationsOrderSetting, PurchaseAugmentationsOrderSetting } from \"./SettingEnums\";\n\n/**\n * Represents the default settings the player could customize.\n */\ninterface IDefaultSettings {\n /**\n * How many servers per page\n */\n ActiveScriptsServerPageSize: number;\n /**\n * How many scripts per page\n */\n ActiveScriptsScriptPageSize: number;\n /**\n * How often the game should autosave the player's progress, in seconds.\n */\n AutosaveInterval: number;\n\n /**\n * How many milliseconds between execution points for Netscript 1 statements.\n */\n CodeInstructionRunTime: number;\n\n /**\n * Render city as list of buttons.\n */\n DisableASCIIArt: boolean;\n\n /**\n * Whether global keyboard shortcuts should be recognized throughout the game.\n */\n DisableHotkeys: boolean;\n\n /**\n * Whether text effects such as corruption should be visible.\n */\n DisableTextEffects: boolean;\n\n /**\n * Enable bash hotkeys\n */\n EnableBashHotkeys: boolean;\n\n /**\n * Timestamps format\n */\n TimestampsFormat: string;\n\n /**\n * Locale used for display numbers\n */\n Locale: string;\n\n /**\n * Limit the number of log entries for each script being executed on each server.\n */\n MaxLogCapacity: number;\n\n /**\n * Limit how many entries can be written to a Netscript Port before entries start to get pushed out.\n */\n MaxPortCapacity: number;\n\n /**\n * Limit the number of entries in the terminal.\n */\n MaxTerminalCapacity: number;\n\n /**\n * Save the game when you save any file.\n */\n SaveGameOnFileSave: boolean;\n\n /**\n * Whether the player should be asked to confirm purchasing each and every augmentation.\n */\n SuppressBuyAugmentationConfirmation: boolean;\n\n /**\n * Whether the user should be prompted to join each faction via a dialog box.\n */\n SuppressFactionInvites: boolean;\n\n /**\n * Whether the user should be shown a dialog box whenever they receive a new message file.\n */\n SuppressMessages: boolean;\n\n /**\n * Whether the user should be asked to confirm travelling between cities.\n */\n SuppressTravelConfirmation: boolean;\n\n /**\n * Whether the user should be displayed a popup message when his Bladeburner actions are cancelled.\n */\n SuppressBladeburnerPopup: boolean;\n\n /**\n * Whether the user should be displayed a popup message on stock market actions.\n */\n SuppressTIXPopup: boolean;\n\n /*\n * Theme colors\n */\n theme: {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n };\n}\n\n/**\n * Represents all possible settings the player wants to customize to their play style.\n */\ninterface ISettings extends IDefaultSettings {\n /**\n * What order the player's owned Augmentations/Source Files should be displayed in\n */\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting;\n\n /**\n * What order the Augmentations should be displayed in when purchasing from a Faction\n */\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting;\n\n MonacoTheme: string;\n\n MonacoInsertSpaces: boolean;\n\n MonacoFontSize: number;\n}\n\nexport const defaultSettings: IDefaultSettings = {\n ActiveScriptsServerPageSize: 10,\n ActiveScriptsScriptPageSize: 10,\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n EnableBashHotkeys: false,\n TimestampsFormat: \"\",\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 200,\n SaveGameOnFileSave: true,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false,\n SuppressTIXPopup: false,\n\n theme: {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\nexport const Settings: ISettings & ISelfInitializer & ISelfLoading = {\n ActiveScriptsServerPageSize: defaultSettings.ActiveScriptsServerPageSize,\n ActiveScriptsScriptPageSize: defaultSettings.ActiveScriptsScriptPageSize,\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n EnableBashHotkeys: defaultSettings.EnableBashHotkeys,\n TimestampsFormat: defaultSettings.TimestampsFormat,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting.AcquirementTime,\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting.Default,\n SaveGameOnFileSave: defaultSettings.SaveGameOnFileSave,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n SuppressTIXPopup: defaultSettings.SuppressTIXPopup,\n MonacoTheme: \"monokai\",\n MonacoInsertSpaces: false,\n MonacoFontSize: 20,\n\n theme: {\n primarylight: defaultSettings.theme.primarylight,\n primary: defaultSettings.theme.primary,\n primarydark: defaultSettings.theme.primarydark,\n successlight: defaultSettings.theme.successlight,\n success: defaultSettings.theme.success,\n successdark: defaultSettings.theme.successdark,\n errorlight: defaultSettings.theme.errorlight,\n error: defaultSettings.theme.error,\n errordark: defaultSettings.theme.errordark,\n secondarylight: defaultSettings.theme.secondarylight,\n secondary: defaultSettings.theme.secondary,\n secondarydark: defaultSettings.theme.secondarydark,\n warninglight: defaultSettings.theme.warninglight,\n warning: defaultSettings.theme.warning,\n warningdark: defaultSettings.theme.warningdark,\n infolight: defaultSettings.theme.infolight,\n info: defaultSettings.theme.info,\n infodark: defaultSettings.theme.infodark,\n welllight: defaultSettings.theme.welllight,\n well: defaultSettings.theme.well,\n white: defaultSettings.theme.white,\n black: defaultSettings.theme.black,\n hp: defaultSettings.theme.hp,\n money: defaultSettings.theme.money,\n hack: defaultSettings.theme.hack,\n combat: defaultSettings.theme.combat,\n cha: defaultSettings.theme.cha,\n int: defaultSettings.theme.int,\n rep: defaultSettings.theme.rep,\n disabled: defaultSettings.theme.disabled,\n backgroundprimary: defaultSettings.theme.backgroundprimary,\n backgroundsecondary: defaultSettings.theme.backgroundsecondary,\n button: defaultSettings.theme.button,\n },\n init() {\n Object.assign(Settings, defaultSettings);\n },\n load(saveString: string) {\n const save = JSON.parse(saveString);\n Object.assign(Settings.theme, save.theme);\n delete save.theme;\n Object.assign(Settings, save);\n },\n};\n","import { IMap } from \"../types\";\n\n// TODO remember to update RamCalculations.js and WorkerScript.js\n\n// RAM costs for Netscript functions\nexport const RamCostConstants: IMap = {\n ScriptBaseRamCost: 1.6,\n ScriptDomRamCost: 25,\n ScriptCorporationRamCost: 1024 - 1.6,\n ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\n ScriptWeakenAnalyzeRamCost: 1,\n ScriptScanRamCost: 0.2,\n ScriptPortProgramRamCost: 0.05,\n ScriptRunRamCost: 1.0,\n ScriptExecRamCost: 1.3,\n ScriptSpawnRamCost: 2.0,\n ScriptScpRamCost: 0.6,\n ScriptKillRamCost: 0.5,\n ScriptHasRootAccessRamCost: 0.05,\n ScriptGetHostnameRamCost: 0.05,\n ScriptGetHackingLevelRamCost: 0.05,\n ScriptGetMultipliersRamCost: 4.0,\n ScriptGetServerRamCost: 0.1,\n ScriptGetServerMaxRam: 0.05,\n ScriptGetServerUsedRam: 0.05,\n ScriptFileExistsRamCost: 0.1,\n ScriptIsRunningRamCost: 0.1,\n ScriptHacknetNodesRamCost: 4.0,\n ScriptHNUpgLevelRamCost: 0.4,\n ScriptHNUpgRamRamCost: 0.6,\n ScriptHNUpgCoreRamCost: 0.8,\n ScriptGetStockRamCost: 2.0,\n ScriptBuySellStockRamCost: 2.5,\n ScriptGetPurchaseServerRamCost: 0.25,\n ScriptPurchaseServerRamCost: 2.25,\n ScriptGetPurchasedServerLimit: 0.05,\n ScriptGetPurchasedServerMaxRam: 0.05,\n ScriptRoundRamCost: 0.05,\n ScriptReadWriteRamCost: 1.0,\n ScriptArbScriptRamCost: 1.0,\n ScriptGetScriptRamCost: 0.1,\n ScriptGetRunningScriptRamCost: 0.3,\n ScriptGetHackTimeRamCost: 0.05,\n ScriptGetFavorToDonate: 0.1,\n ScriptCodingContractBaseRamCost: 10,\n ScriptSleeveBaseRamCost: 4,\n\n ScriptSingularityFn1RamCost: 2,\n ScriptSingularityFn2RamCost: 3,\n ScriptSingularityFn3RamCost: 5,\n\n ScriptGangApiBaseRamCost: 4,\n\n ScriptBladeburnerApiBaseRamCost: 4,\n\n ScriptStanekCharge: 0.4,\n ScriptStanekFragmentDefinitions: 0,\n ScriptStanekPlacedFragments: 5,\n ScriptStanekClear: 0,\n ScriptStanekCanPlace: 0.5,\n ScriptStanekPlace: 5,\n ScriptStanekFragmentAt: 2,\n ScriptStanekDeleteAt: 0.15,\n};\n\nexport const RamCosts: IMap = {\n hacknet: {\n numNodes: 0,\n purchaseNode: 0,\n getPurchaseNodeCost: 0,\n getNodeStats: 0,\n upgradeLevel: 0,\n upgradeRam: 0,\n upgradeCore: 0,\n upgradeCache: 0,\n getLevelUpgradeCost: 0,\n getRamUpgradeCost: 0,\n getCoreUpgradeCost: 0,\n getCacheUpgradeCost: 0,\n numHashes: 0,\n hashCost: 0,\n spendHashes: 0,\n },\n sprintf: 0,\n vsprintf: 0,\n scan: RamCostConstants.ScriptScanRamCost,\n hack: RamCostConstants.ScriptHackRamCost,\n hackAnalyzeThreads: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyze: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeSecurity: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeChance: RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: 0,\n grow: RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n growthAnalyzeSecurity: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: RamCostConstants.ScriptWeakenRamCost,\n weakenAnalyze: RamCostConstants.ScriptWeakenAnalyzeRamCost,\n print: 0,\n tprint: 0,\n clearLog: 0,\n disableLog: 0,\n enableLog: 0,\n isLogEnabled: 0,\n getScriptLogs: 0,\n nuke: RamCostConstants.ScriptPortProgramRamCost,\n brutessh: RamCostConstants.ScriptPortProgramRamCost,\n ftpcrack: RamCostConstants.ScriptPortProgramRamCost,\n relaysmtp: RamCostConstants.ScriptPortProgramRamCost,\n httpworm: RamCostConstants.ScriptPortProgramRamCost,\n sqlinject: RamCostConstants.ScriptPortProgramRamCost,\n run: RamCostConstants.ScriptRunRamCost,\n exec: RamCostConstants.ScriptExecRamCost,\n spawn: RamCostConstants.ScriptSpawnRamCost,\n kill: RamCostConstants.ScriptKillRamCost,\n killall: RamCostConstants.ScriptKillRamCost,\n exit: 0,\n scp: RamCostConstants.ScriptScpRamCost,\n ls: RamCostConstants.ScriptScanRamCost,\n ps: RamCostConstants.ScriptScanRamCost,\n hasRootAccess: RamCostConstants.ScriptHasRootAccessRamCost,\n getIp: RamCostConstants.ScriptGetHostnameRamCost,\n getHostname: RamCostConstants.ScriptGetHostnameRamCost,\n getHackingLevel: RamCostConstants.ScriptGetHackingLevelRamCost,\n getHackingMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getHacknetMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getBitNodeMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getServer: RamCostConstants.ScriptGetMultipliersRamCost / 2,\n getServerMoneyAvailable: RamCostConstants.ScriptGetServerRamCost,\n getServerSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerBaseSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMinSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerRequiredHackingLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxMoney: RamCostConstants.ScriptGetServerRamCost,\n getServerGrowth: RamCostConstants.ScriptGetServerRamCost,\n getServerNumPortsRequired: RamCostConstants.ScriptGetServerRamCost,\n getServerRam: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxRam: RamCostConstants.ScriptGetServerMaxRam,\n getServerUsedRam: RamCostConstants.ScriptGetServerUsedRam,\n serverExists: RamCostConstants.ScriptGetServerRamCost,\n fileExists: RamCostConstants.ScriptFileExistsRamCost,\n isRunning: RamCostConstants.ScriptIsRunningRamCost,\n stock: {\n getSymbols: RamCostConstants.ScriptGetStockRamCost,\n getPrice: RamCostConstants.ScriptGetStockRamCost,\n getAskPrice: RamCostConstants.ScriptGetStockRamCost,\n getBidPrice: RamCostConstants.ScriptGetStockRamCost,\n getPosition: RamCostConstants.ScriptGetStockRamCost,\n getMaxShares: RamCostConstants.ScriptGetStockRamCost,\n getPurchaseCost: RamCostConstants.ScriptGetStockRamCost,\n getSaleGain: RamCostConstants.ScriptGetStockRamCost,\n buy: RamCostConstants.ScriptBuySellStockRamCost,\n sell: RamCostConstants.ScriptBuySellStockRamCost,\n short: RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: RamCostConstants.ScriptBuySellStockRamCost,\n getVolatility: RamCostConstants.ScriptBuySellStockRamCost,\n getForecast: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n },\n getPurchasedServerLimit: RamCostConstants.ScriptGetPurchasedServerLimit,\n getPurchasedServerMaxRam: RamCostConstants.ScriptGetPurchasedServerMaxRam,\n getPurchasedServerCost: RamCostConstants.ScriptGetPurchaseServerRamCost,\n purchaseServer: RamCostConstants.ScriptPurchaseServerRamCost,\n deleteServer: RamCostConstants.ScriptPurchaseServerRamCost,\n getPurchasedServers: RamCostConstants.ScriptPurchaseServerRamCost,\n write: 0,\n tryWritePort: 0,\n read: 0,\n peek: 0,\n clear: 0,\n writePort: 0,\n readPort: 0,\n getPortHandle: 0,\n rm: RamCostConstants.ScriptReadWriteRamCost,\n scriptRunning: RamCostConstants.ScriptArbScriptRamCost,\n scriptKill: RamCostConstants.ScriptArbScriptRamCost,\n getScriptName: 0,\n getScriptRam: RamCostConstants.ScriptGetScriptRamCost,\n getHackTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getGrowTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getWeakenTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getScriptIncome: RamCostConstants.ScriptGetScriptRamCost,\n getScriptExpGain: RamCostConstants.ScriptGetScriptRamCost,\n getRunningScript: RamCostConstants.ScriptGetRunningScriptRamCost,\n nFormat: 0,\n getTimeSinceLastAug: RamCostConstants.ScriptGetHackTimeRamCost,\n prompt: 0,\n wget: 0,\n getFavorToDonate: RamCostConstants.ScriptGetFavorToDonate,\n\n // Singularity Functions\n universityCourse: RamCostConstants.ScriptSingularityFn1RamCost,\n gymWorkout: RamCostConstants.ScriptSingularityFn1RamCost,\n travelToCity: RamCostConstants.ScriptSingularityFn1RamCost,\n goToLocation: RamCostConstants.ScriptSingularityFn1RamCost,\n purchaseTor: RamCostConstants.ScriptSingularityFn1RamCost,\n purchaseProgram: RamCostConstants.ScriptSingularityFn1RamCost,\n getCurrentServer: RamCostConstants.ScriptSingularityFn1RamCost,\n connect: RamCostConstants.ScriptSingularityFn1RamCost,\n manualHack: RamCostConstants.ScriptSingularityFn1RamCost,\n installBackdoor: RamCostConstants.ScriptSingularityFn1RamCost,\n getStats: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n getCharacterInformation: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n getPlayer: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n hospitalize: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n isBusy: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n stopAction: RamCostConstants.ScriptSingularityFn1RamCost / 2,\n upgradeHomeRam: RamCostConstants.ScriptSingularityFn2RamCost,\n upgradeHomeCores: RamCostConstants.ScriptSingularityFn2RamCost,\n getUpgradeHomeRamCost: RamCostConstants.ScriptSingularityFn2RamCost / 2,\n getUpgradeHomeCoresCost: RamCostConstants.ScriptSingularityFn2RamCost / 2,\n workForCompany: RamCostConstants.ScriptSingularityFn2RamCost,\n applyToCompany: RamCostConstants.ScriptSingularityFn2RamCost,\n getCompanyRep: RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getCompanyFavor: RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getCompanyFavorGain: RamCostConstants.ScriptSingularityFn2RamCost / 4,\n checkFactionInvitations: RamCostConstants.ScriptSingularityFn2RamCost,\n joinFaction: RamCostConstants.ScriptSingularityFn2RamCost,\n workForFaction: RamCostConstants.ScriptSingularityFn2RamCost,\n getFactionRep: RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getFactionFavor: RamCostConstants.ScriptSingularityFn2RamCost / 3,\n getFactionFavorGain: RamCostConstants.ScriptSingularityFn2RamCost / 4,\n donateToFaction: RamCostConstants.ScriptSingularityFn3RamCost,\n createProgram: RamCostConstants.ScriptSingularityFn3RamCost,\n commitCrime: RamCostConstants.ScriptSingularityFn3RamCost,\n getCrimeChance: RamCostConstants.ScriptSingularityFn3RamCost,\n getCrimeStats: RamCostConstants.ScriptSingularityFn3RamCost,\n getOwnedAugmentations: RamCostConstants.ScriptSingularityFn3RamCost,\n getOwnedSourceFiles: RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationsFromFaction: RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationCost: RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationPrereq: RamCostConstants.ScriptSingularityFn3RamCost,\n getAugmentationPrice: RamCostConstants.ScriptSingularityFn3RamCost / 2,\n getAugmentationRepReq: RamCostConstants.ScriptSingularityFn3RamCost / 2,\n getAugmentationStats: RamCostConstants.ScriptSingularityFn3RamCost,\n purchaseAugmentation: RamCostConstants.ScriptSingularityFn3RamCost,\n softReset: RamCostConstants.ScriptSingularityFn3RamCost,\n installAugmentations: RamCostConstants.ScriptSingularityFn3RamCost,\n isFocused: 0.1,\n setFocus: 0.1,\n\n // Gang API\n gang: {\n createGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n inGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getMemberNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getOtherGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getMemberInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n canRecruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n recruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getTaskNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getTaskStats: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n setMemberTask: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getEquipmentCost: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentType: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,\n ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,\n getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,\n getBonusTime: 0,\n },\n\n // Bladeburner API\n bladeburner: {\n getContractNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getOperationNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getGeneralActionNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getSkillNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n startAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n stopBladeburnerAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getCurrentAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4,\n getActionTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionEstimatedSuccessChance: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionRepGain: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCountRemaining: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionMaxLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillPoints: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillUpgradeCost: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n upgradeSkill: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getStamina: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerFaction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerDivision: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getBonusTime: 0,\n },\n\n // Coding Contract API\n codingcontract: {\n attempt: RamCostConstants.ScriptCodingContractBaseRamCost,\n getContractType: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getData: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getDescription: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getNumTriesRemaining: RamCostConstants.ScriptCodingContractBaseRamCost / 5,\n },\n\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: RamCostConstants.ScriptSleeveBaseRamCost,\n setToShockRecovery: RamCostConstants.ScriptSleeveBaseRamCost,\n setToSynchronize: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCommitCrime: RamCostConstants.ScriptSleeveBaseRamCost,\n setToUniversityCourse: RamCostConstants.ScriptSleeveBaseRamCost,\n travel: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCompanyWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToFactionWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToGymWorkout: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveStats: RamCostConstants.ScriptSleeveBaseRamCost,\n getTask: RamCostConstants.ScriptSleeveBaseRamCost,\n getInformation: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveAugmentations: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleevePurchasableAugs: RamCostConstants.ScriptSleeveBaseRamCost,\n purchaseSleeveAug: RamCostConstants.ScriptSleeveBaseRamCost,\n },\n\n stanek: {\n charge: RamCostConstants.ScriptStanekCharge,\n fragmentDefinitions: RamCostConstants.ScriptStanekFragmentDefinitions,\n activeFragments: RamCostConstants.ScriptStanekPlacedFragments,\n clear: RamCostConstants.ScriptStanekClear,\n canPlace: RamCostConstants.ScriptStanekCanPlace,\n place: RamCostConstants.ScriptStanekPlace,\n get: RamCostConstants.ScriptStanekFragmentAt,\n remove: RamCostConstants.ScriptStanekDeleteAt,\n },\n\n heart: {\n // Easter egg function\n break: 0,\n },\n};\n\nexport function getRamCost(...args: string[]): number {\n if (args.length === 0) {\n console.warn(`No arguments passed to getRamCost()`);\n return 0;\n }\n\n let curr = RamCosts[args[0]];\n for (let i = 1; i < args.length; ++i) {\n if (curr == null) {\n console.warn(`Invalid function passed to getRamCost: ${args}`);\n return 0;\n }\n\n const currType = typeof curr;\n if (currType === \"function\" || currType === \"number\") {\n break;\n }\n\n curr = curr[args[i]];\n }\n\n if (typeof curr === \"number\") {\n return curr;\n }\n\n console.warn(`Unexpected type (${curr}) for value [${args}]`);\n return 0;\n}\n","import { AlertEvents } from \"./AlertManager\";\n\nimport React from \"react\";\n\nexport function dialogBoxCreate(txt: string | JSX.Element): void {\n if (typeof txt !== \"string\") {\n AlertEvents.emit(txt);\n } else {\n AlertEvents.emit();\n }\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number | string;\n player?: IPlayer;\n}\nexport function Money(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (props.player !== undefined) {\n if (typeof props.money !== \"number\") throw new Error(\"if player if provided, money should be number, contact dev\");\n if (!props.player.canAfford(props.money))\n return {numeralWrapper.formatMoney(props.money)};\n }\n return (\n \n {typeof props.money === \"number\" ? numeralWrapper.formatMoney(props.money) : props.money}\n \n );\n}\n","import { Augmentation } from \"./Augmentation\";\nimport { IMap } from \"../types\";\n\nexport const Augmentations: IMap = {};\n","/* Generic Reviver, toJSON, and fromJSON functions used for saving and loading objects */\n\ninterface IReviverValue {\n ctor: string;\n data: any;\n}\n\n// A generic \"smart reviver\" function.\n// Looks for object values with a `ctor` property and\n// a `data` property. If it finds them, and finds a matching\n// constructor that has a `fromJSON` property on it, it hands\n// off to that `fromJSON` fuunction, passing in the value.\nexport function Reviver(key: string, value: IReviverValue | null): any {\n if (value == null) {\n return null;\n }\n\n if (typeof value === \"object\" && typeof value.ctor === \"string\" && typeof value.data !== \"undefined\") {\n // Compatibility for version v0.43.1\n // TODO Remove this eventually\n if (value.ctor === \"AllServersMap\") {\n console.warn(\"Converting AllServersMap for v0.43.1\");\n return value.data;\n }\n\n const ctor = Reviver.constructors[value.ctor];\n\n if (typeof ctor === \"function\" && typeof ctor.fromJSON === \"function\") {\n return ctor.fromJSON(value);\n }\n }\n return value;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Reviver {\n export const constructors: { [key: string]: any } = {};\n}\n\n// A generic \"toJSON\" function that creates the data expected\n// by Reviver.\n// `ctorName` The name of the constructor to use to revive it\n// `obj` The object being serialized\n// `keys` (Optional) Array of the properties to serialize,\n// if not given then all of the objects \"own\" properties\n// that don't have function values will be serialized.\n// (Note: If you list a property in `keys`, it will be serialized\n// regardless of whether it's an \"own\" property.)\n// Returns: The structure (which will then be turned into a string\n// as part of the JSON.stringify algorithm)\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_toJSON(ctorName: string, obj: any, keys?: string[]): IReviverValue {\n if (!keys) {\n keys = Object.keys(obj); // Only \"own\" properties are included\n }\n\n const data: any = {};\n for (let index = 0; index < keys.length; ++index) {\n const key = keys[index];\n data[key] = obj[key];\n }\n return { ctor: ctorName, data: data };\n}\n\n// A generic \"fromJSON\" function for use with Reviver: Just calls the\n// constructor function with no arguments, then applies all of the\n// key/value pairs from the raw data to the instance. Only useful for\n// constructors that can be reasonably called without arguments!\n// `ctor` The constructor to call\n// `data` The data to apply\n// Returns: The object\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_fromJSON(ctor: new () => T, data: any): T {\n const obj: any = new ctor();\n for (const name in data) {\n obj[name] = data[name];\n }\n return obj;\n}\n","import { EqualityFunc } from \"../types\";\nimport { isString } from \"./helpers/isString\";\n\n/*\nConverts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds\ne.g. 10000 -> \"10 seconds\"\n 120000 -> \"2 minutes and 0 seconds\"\n*/\nfunction convertTimeMsToTimeElapsedString(time: number, showMilli = false): string {\n time = Math.floor(time);\n const millisecondsPerSecond = 1000;\n const secondPerMinute = 60;\n const minutesPerHours = 60;\n const secondPerHours: number = secondPerMinute * minutesPerHours;\n const hoursPerDays = 24;\n const secondPerDay: number = secondPerHours * hoursPerDays;\n\n // Convert ms to seconds, since we only have second-level precision\n const totalSeconds: number = Math.floor(time / millisecondsPerSecond);\n\n const days: number = Math.floor(totalSeconds / secondPerDay);\n const secTruncDays: number = totalSeconds % secondPerDay;\n\n const hours: number = Math.floor(secTruncDays / secondPerHours);\n const secTruncHours: number = secTruncDays % secondPerHours;\n\n const minutes: number = Math.floor(secTruncHours / secondPerMinute);\n const secTruncMinutes: number = secTruncHours % secondPerMinute;\n\n const milliTruncSec: string = (() => {\n let str = `${time % millisecondsPerSecond}`;\n while (str.length < 3) str = \"0\" + str;\n return str;\n })();\n\n const seconds: string = showMilli ? `${secTruncMinutes}.${milliTruncSec}` : `${secTruncMinutes}`;\n\n let res = \"\";\n if (days > 0) {\n res += `${days} days `;\n }\n if (hours > 0) {\n res += `${hours} hours `;\n }\n if (minutes > 0) {\n res += `${minutes} minutes `;\n }\n res += `${seconds} seconds`;\n\n return res;\n}\n\n// Finds the longest common starting substring in a set of strings\nfunction longestCommonStart(strings: string[]): string {\n if (!containsAllStrings(strings)) {\n return \"\";\n }\n if (strings.length === 0) {\n return \"\";\n }\n\n const A: string[] = strings.concat().sort();\n const a1: string = A[0];\n const a2: string = A[A.length - 1];\n const L: number = a1.length;\n let i = 0;\n const areEqualCaseInsensitive: EqualityFunc = (a: string, b: string) => a.toUpperCase() === b.toUpperCase();\n while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) {\n i++;\n }\n\n return a1.substring(0, i);\n}\n\n// Returns whether an array contains entirely of string objects\nfunction containsAllStrings(arr: string[]): boolean {\n return arr.every(isString);\n}\n\n// Formats a number with commas and a specific number of decimal digits\nfunction formatNumber(num: number, numFractionDigits = 0): string {\n return num.toLocaleString(undefined, {\n maximumFractionDigits: numFractionDigits,\n minimumFractionDigits: numFractionDigits,\n });\n}\n\n// Generates a random alphanumeric string with N characters\nfunction generateRandomString(n: number): string {\n let str = \"\";\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < n; i++) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\nexport { convertTimeMsToTimeElapsedString, longestCommonStart, containsAllStrings, formatNumber, generateRandomString };\n","/**\n * All possible Cities in the game. Names only, not actual \"City\" object\n * Implemented as an enum for typing purposes\n */\nexport enum CityName {\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n}\n","/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\nimport { Faction } from \"./Faction\";\nimport { FactionInfos } from \"./FactionInfo\";\n\nimport { IMap } from \"../types\";\n\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Factions: IMap = {};\n\nexport function loadFactions(saveString: string): void {\n Factions = JSON.parse(saveString, Reviver);\n // safety check for when we load older save file that don't have newer factions\n for (const faction of Object.keys(Factions)) {\n try {\n Factions[faction].getInfo();\n } catch (err) {\n console.error(\"deleting \" + faction);\n delete Factions[faction];\n }\n }\n}\n\nfunction AddToFactions(faction: Faction): void {\n const name: string = faction.name;\n Factions[name] = faction;\n}\n\nexport function factionExists(name: string): boolean {\n return Factions.hasOwnProperty(name);\n}\n\nexport function initFactions(): void {\n for (const name in FactionInfos) {\n resetFaction(new Faction(name));\n }\n}\n\n//Resets a faction during (re-)initialization. Saves the favor in the new\n//Faction object and deletes the old Faction Object from \"Factions\". Then\n//reinserts the new Faction object\nfunction resetFaction(newFactionObject: Faction): void {\n if (!(newFactionObject instanceof Faction)) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n const factionName: string = newFactionObject.name;\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n AddToFactions(newFactionObject);\n}\n","import { Faction } from \"../Faction/Faction\";\nimport { Location } from \"../Locations/Location\";\n\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nexport enum Page {\n ActiveScripts,\n Augmentations,\n BitVerse,\n Bladeburner,\n City,\n Corporation,\n CreateProgram,\n ScriptEditor,\n DevMenu,\n Faction,\n Factions,\n Gang,\n Hacknet,\n Infiltration,\n Job,\n Milestones,\n Options,\n Resleeves,\n Sleeves,\n Stats,\n StockMarket,\n Terminal,\n Travel,\n Tutorial,\n Work,\n BladeburnerCinematic,\n Location,\n Loading,\n StaneksGift,\n Recovery,\n}\n\n/**\n * This class keeps track of player navigation/routing within the game.\n */\nexport interface IRouter {\n // toCinematicText(): void;\n // toInfiltration(): void;\n // toMission(): void;\n // toRedPill(): void;\n // toworkInProgress(): void;\n page(): Page;\n toActiveScripts(): void;\n toAugmentations(): void;\n toBitVerse(flume: boolean, quick: boolean): void;\n toBladeburner(): void;\n toStats(): void;\n toCity(): void; // travel ? city ?\n toCorporation(): void;\n toCreateProgram(): void;\n toDevMenu(): void;\n toFaction(faction?: Faction): void; // faction name\n toFactions(): void;\n toGameOptions(): void;\n toGang(): void;\n toHacknetNodes(): void;\n toInfiltration(location: Location): void;\n toJob(): void;\n toMilestones(): void;\n toResleeves(): void;\n toScriptEditor(filename?: string, code?: string): void;\n toSleeves(): void;\n toStockMarket(): void;\n toTerminal(): void;\n toTravel(): void;\n toTutorial(): void;\n toWork(): void;\n toBladeburnerCinematic(): void;\n toLocation(location: Location): void;\n toStaneksGift(): void;\n}\n","import { Server } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { serverMetadata } from \"./data/servers\";\n\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\n\nimport { IMap } from \"../types\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { isValidIPAddress } from \"../utils/helpers/isValidIPAddress\";\nimport { SpecialServers } from \"./data/SpecialServers\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\nlet AllServers: IMap = {};\n\nfunction GetServerByIP(ip: string): BaseServer | undefined {\n for (const key in AllServers) {\n const server = AllServers[key];\n if (server.ip !== ip) continue;\n return server;\n }\n}\n\n//Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\nfunction GetServerByHostname(hostname: string): BaseServer | null {\n for (const key in AllServers) {\n const server = AllServers[key];\n if (server.hostname == hostname) {\n return server;\n }\n }\n\n return null;\n}\n\n//Get server by IP or hostname. Returns null if invalid\nexport function GetServer(s: string): BaseServer | null {\n const server = AllServers[s];\n if (server) return server;\n if (!isValidIPAddress(s)) {\n return GetServerByHostname(s);\n }\n\n const ipserver = GetServerByIP(s);\n if (ipserver !== undefined) {\n return ipserver;\n }\n\n return null;\n}\n\nexport function GetAllServers(): BaseServer[] {\n const servers: BaseServer[] = [];\n for (const key in AllServers) {\n servers.push(AllServers[key]);\n }\n return servers;\n}\n\nexport function DeleteServer(serverkey: string): void {\n for (const key in AllServers) {\n const server = AllServers[key];\n if (server.ip !== serverkey && server.hostname !== serverkey) continue;\n delete AllServers[key];\n break;\n }\n}\n\nexport function ipExists(ip: string): boolean {\n return AllServers[ip] != null;\n}\n\nexport function createUniqueRandomIp(): string {\n const ip = createRandomIp();\n\n // If the Ip already exists, recurse to create a new one\n if (ipExists(ip)) {\n return createRandomIp();\n }\n\n return ip;\n}\n\n// Saftely add a Server to the AllServers map\nexport function AddToAllServers(server: Server | HacknetServer): void {\n if (GetServer(server.hostname)) {\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[server.hostname].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[server.hostname] = server;\n}\n\ninterface IServerParams {\n hackDifficulty?: number;\n hostname: string;\n ip: string;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired: number;\n organizationName: string;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n\n [key: string]: any;\n}\n\nexport function initForeignServers(homeComputer: Server): void {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers: Server[][] = [];\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n }\n\n // Essentially any property that is of type 'number | IMinMaxRange'\n const propertiesToPatternMatch: string[] = [\n \"hackDifficulty\",\n \"moneyAvailable\",\n \"requiredHackingSkill\",\n \"serverGrowth\",\n ];\n\n const toNumber = (value: any): any => {\n switch (typeof value) {\n case \"number\":\n return value;\n case \"object\":\n return getRandomInt(value.min, value.max);\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of serverMetadata) {\n const serverParams: IServerParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName,\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new Server(serverParams);\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (server.hostname === SpecialServers.WorldDaemon) {\n server.requiredHackingSkill *= BitNodeMultipliers.WorldDaemonDifficulty;\n }\n AddToAllServers(server);\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n\n /* Create a randomized network for all the foreign servers */\n const linkComputers = (server1: Server, server2: Server): void => {\n server1.serversOnNetwork.push(server2.hostname);\n server2.serversOnNetwork.push(server1.hostname);\n };\n\n const getRandomArrayItem = (arr: any[]): any => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1: Server[], selectServer: () => Server): void => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n };\n\n // Connect the first tier of servers to the player's home computer\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\n\nexport function prestigeAllServers(): void {\n for (const member in AllServers) {\n delete AllServers[member];\n }\n AllServers = {};\n}\n\nexport function loadAllServers(saveString: string): void {\n AllServers = JSON.parse(saveString, Reviver);\n}\n\nexport function saveAllServers(): string {\n const TempAllServers = JSON.parse(JSON.stringify(AllServers), Reviver);\n for (const key in TempAllServers) {\n const server = TempAllServers[key];\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n return JSON.stringify(TempAllServers);\n}\n","// Defs for job titles, stored in arrays and categorized by job \"type\"\n\nexport const SoftwareCompanyPositions: string[] = [\n \"Software Engineering Intern\",\n \"Junior Software Engineer\",\n \"Senior Software Engineer\",\n \"Lead Software Developer\",\n \"Head of Software\",\n \"Head of Engineering\",\n \"Vice President of Technology\",\n \"Chief Technology Officer\",\n];\n\nexport const ITCompanyPositions: string[] = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\n\nexport const SecurityEngineerCompanyPositions: string[] = [\"Security Engineer\"];\n\nexport const NetworkEngineerCompanyPositions: string[] = [\"Network Engineer\", \"Network Administrator\"];\n\nexport const BusinessCompanyPositions: string[] = [\n \"Business Intern\",\n \"Business Analyst\",\n \"Business Manager\",\n \"Operations Manager\",\n \"Chief Financial Officer\",\n \"Chief Executive Officer\",\n];\n\nexport const SecurityCompanyPositions: string[] = [\n \"Police Officer\",\n \"Police Chief\",\n \"Security Guard\",\n \"Security Officer\",\n \"Security Supervisor\",\n \"Head of Security\",\n];\n\nexport const AgentCompanyPositions: string[] = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\n\nexport const MiscCompanyPositions: string[] = [\"Waiter\", \"Employee\"];\n\nexport const SoftwareConsultantCompanyPositions: string[] = [\"Software Consultant\", \"Senior Software Consultant\"];\n\nexport const BusinessConsultantCompanyPositions: string[] = [\"Business Consultant\", \"Senior Business Consultant\"];\n\nexport const PartTimeCompanyPositions: string[] = [\"Part-time Waiter\", \"Part-time Employee\"];\n","import React, { useContext } from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"./Router\";\n\nexport const Context: {\n Player: React.Context;\n Router: React.Context;\n} = {\n Player: React.createContext({} as IPlayer),\n Router: React.createContext({} as IRouter),\n};\n\nexport const use: {\n Player: () => IPlayer;\n Router: () => IRouter;\n} = {\n Player: () => useContext(Context.Player),\n Router: () => useContext(Context.Router),\n};\n","/**\n * Gets a random integer bounded by the values passed in.\n * @param min The minimum value in the range.\n * @param max The maximum value in the range.\n */\nexport function getRandomInt(min: number, max: number): number {\n const lower: number = Math.min(min, max);\n const upper: number = Math.max(min, max);\n\n return Math.floor(Math.random() * (upper - lower + 1)) + lower;\n}\n","// Class definition for a single Augmentation object\nimport * as React from \"react\";\nimport { IMap } from \"../types\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n info: string | JSX.Element;\n stats?: JSX.Element | null;\n isSpecial?: boolean;\n moneyCost: number;\n name: string;\n prereqs?: string[];\n repCost: number;\n\n hacking_mult?: number;\n strength_mult?: number;\n defense_mult?: number;\n dexterity_mult?: number;\n agility_mult?: number;\n charisma_mult?: number;\n hacking_exp_mult?: number;\n strength_exp_mult?: number;\n defense_exp_mult?: number;\n dexterity_exp_mult?: number;\n agility_exp_mult?: number;\n charisma_exp_mult?: number;\n hacking_chance_mult?: number;\n hacking_speed_mult?: number;\n hacking_money_mult?: number;\n hacking_grow_mult?: number;\n company_rep_mult?: number;\n faction_rep_mult?: number;\n crime_money_mult?: number;\n crime_success_mult?: number;\n work_money_mult?: number;\n hacknet_node_money_mult?: number;\n hacknet_node_purchase_cost_mult?: number;\n hacknet_node_ram_cost_mult?: number;\n hacknet_node_core_cost_mult?: number;\n hacknet_node_level_cost_mult?: number;\n bladeburner_max_stamina_mult?: number;\n bladeburner_stamina_gain_mult?: number;\n bladeburner_analysis_mult?: number;\n bladeburner_success_chance_mult?: number;\n\n startingMoney?: number;\n programs?: string[];\n}\n\nfunction generateStatsDescription(mults: IMap, programs?: string[], startingMoney?: number): JSX.Element {\n const f = (x: number, decimals = 0): string => {\n // look, I don't know how to make a \"smart decimals\"\n // todo, make it smarter\n if (x === 1.0777 - 1) return \"7.77%\";\n if (x === 1.777 - 1) return \"77.7%\";\n return numeralWrapper.formatPercentage(x, decimals);\n };\n let desc = <>Effects:;\n\n if (\n mults.hacking_mult &&\n mults.hacking_mult == mults.strength_mult &&\n mults.hacking_mult == mults.defense_mult &&\n mults.hacking_mult == mults.dexterity_mult &&\n mults.hacking_mult == mults.agility_mult &&\n mults.hacking_mult == mults.charisma_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_mult - 1)} all skills\n \n );\n } else {\n if (mults.hacking_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_mult - 1)} hacking skill\n \n );\n\n if (\n mults.strength_mult &&\n mults.strength_mult == mults.defense_mult &&\n mults.strength_mult == mults.dexterity_mult &&\n mults.strength_mult == mults.agility_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_mult - 1)} combat skills\n \n );\n } else {\n if (mults.strength_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_mult - 1)} strength skill\n \n );\n if (mults.defense_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_mult - 1)} defense skill\n \n );\n if (mults.dexterity_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_mult - 1)} dexterity skill\n \n );\n if (mults.agility_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_mult - 1)} agility skill\n \n );\n }\n if (mults.charisma_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_mult - 1)} Charisma skill\n \n );\n }\n\n if (\n mults.hacking_exp_mult &&\n mults.hacking_exp_mult === mults.strength_exp_mult &&\n mults.hacking_exp_mult === mults.defense_exp_mult &&\n mults.hacking_exp_mult === mults.dexterity_exp_mult &&\n mults.hacking_exp_mult === mults.agility_exp_mult &&\n mults.hacking_exp_mult === mults.charisma_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp_mult - 1)} exp for all skills\n \n );\n } else {\n if (mults.hacking_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp_mult - 1)} hacking exp\n \n );\n\n if (\n mults.strength_exp_mult &&\n mults.strength_exp_mult === mults.defense_exp_mult &&\n mults.strength_exp_mult === mults.dexterity_exp_mult &&\n mults.strength_exp_mult === mults.agility_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp_mult - 1)} combat exp\n \n );\n } else {\n if (mults.strength_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp_mult - 1)} strength exp\n \n );\n if (mults.defense_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_exp_mult - 1)} defense exp\n \n );\n if (mults.dexterity_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_exp_mult - 1)} dexterity exp\n \n );\n if (mults.agility_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_exp_mult - 1)} agility exp\n \n );\n }\n if (mults.charisma_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_exp_mult - 1)} charisma exp\n \n );\n }\n\n if (mults.hacking_speed_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_speed_mult - 1)} faster hack(), grow(), and weaken()\n \n );\n if (mults.hacking_chance_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_chance_mult - 1)} hack() success chance\n \n );\n if (mults.hacking_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_money_mult - 1)} hack() power\n \n );\n if (mults.hacking_grow_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_grow_mult - 1)} grow() power\n \n );\n\n if (mults.faction_rep_mult && mults.faction_rep_mult === mults.company_rep_mult) {\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep_mult - 1)} reputation from factions and companies\n \n );\n } else {\n if (mults.faction_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep_mult - 1)} reputation from factions\n \n );\n if (mults.company_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.company_rep_mult - 1)} reputation from companies\n \n );\n }\n\n if (mults.crime_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_money_mult - 1)} crime money\n \n );\n if (mults.crime_success_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_success_mult - 1)} crime success rate\n \n );\n if (mults.work_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.work_money_mult - 1)} work money\n \n );\n\n if (mults.hacknet_node_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacknet_node_money_mult - 1)} hacknet production\n \n );\n if (mults.hacknet_node_purchase_cost_mult)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_purchase_cost_mult - 1))} hacknet nodes cost\n \n );\n if (mults.hacknet_node_level_cost_mult)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_level_cost_mult - 1))} hacknet nodes upgrade cost\n \n );\n\n if (mults.bladeburner_max_stamina_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_max_stamina_mult - 1)} Bladeburner Max Stamina\n \n );\n if (mults.bladeburner_stamina_gain_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_stamina_gain_mult - 1)} Bladeburner Stamina gain\n \n );\n if (mults.bladeburner_analysis_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_analysis_mult - 1)} Bladeburner Field Analysis effectiveness\n \n );\n if (mults.bladeburner_success_chance_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_success_chance_mult - 1)} Bladeburner Contracts and Operations success chance\n \n );\n\n if (startingMoney)\n desc = (\n <>\n {desc}\n
\n Start with after installing Augmentations.\n \n );\n\n if (programs)\n desc = (\n <>\n {desc}\n
\n Start with {programs.join(\" and \")} after installing Augmentations.\n \n );\n return desc;\n}\n\nexport class Augmentation {\n // How much money this costs to buy\n baseCost = 0;\n\n // How much faction reputation is required to unlock this\n baseRepRequirement = 0;\n\n // Description of what this Aug is and what it does\n info: string | JSX.Element;\n\n // Description of the stats, often autogenerated, sometimes manually written.\n stats: JSX.Element | null;\n\n // Any Augmentation not immediately available in BitNode-1 is special (e.g. Bladeburner augs)\n isSpecial = false;\n\n // Augmentation level - for repeatable Augs like NeuroFlux Governor\n level = 0;\n\n // Name of Augmentation\n name = \"\";\n\n // Whether the player owns this Augmentation\n owned = false;\n\n // Array of names of all prerequisites\n prereqs: string[] = [];\n\n // Multipliers given by this Augmentation. Must match the property name in\n // The Player/Person classes\n mults: IMap = {};\n\n // Initial cost. Doesn't change when you purchase multiple Augmentation\n startingCost = 0;\n\n constructor(\n params: IConstructorParams = {\n info: \"\",\n moneyCost: 0,\n name: \"\",\n repCost: 0,\n },\n ) {\n this.name = params.name;\n this.info = params.info;\n this.prereqs = params.prereqs ? params.prereqs : [];\n\n this.baseRepRequirement = params.repCost * BitNodeMultipliers.AugmentationRepCost;\n this.baseCost = params.moneyCost * BitNodeMultipliers.AugmentationMoneyCost;\n this.startingCost = this.baseCost;\n\n if (params.isSpecial) {\n this.isSpecial = true;\n }\n\n this.level = 0;\n\n // Set multipliers\n if (params.hacking_mult) {\n this.mults.hacking_mult = params.hacking_mult;\n }\n if (params.strength_mult) {\n this.mults.strength_mult = params.strength_mult;\n }\n if (params.defense_mult) {\n this.mults.defense_mult = params.defense_mult;\n }\n if (params.dexterity_mult) {\n this.mults.dexterity_mult = params.dexterity_mult;\n }\n if (params.agility_mult) {\n this.mults.agility_mult = params.agility_mult;\n }\n if (params.charisma_mult) {\n this.mults.charisma_mult = params.charisma_mult;\n }\n if (params.hacking_exp_mult) {\n this.mults.hacking_exp_mult = params.hacking_exp_mult;\n }\n if (params.strength_exp_mult) {\n this.mults.strength_exp_mult = params.strength_exp_mult;\n }\n if (params.defense_exp_mult) {\n this.mults.defense_exp_mult = params.defense_exp_mult;\n }\n if (params.dexterity_exp_mult) {\n this.mults.dexterity_exp_mult = params.dexterity_exp_mult;\n }\n if (params.agility_exp_mult) {\n this.mults.agility_exp_mult = params.agility_exp_mult;\n }\n if (params.charisma_exp_mult) {\n this.mults.charisma_exp_mult = params.charisma_exp_mult;\n }\n if (params.hacking_chance_mult) {\n this.mults.hacking_chance_mult = params.hacking_chance_mult;\n }\n if (params.hacking_speed_mult) {\n this.mults.hacking_speed_mult = params.hacking_speed_mult;\n }\n if (params.hacking_money_mult) {\n this.mults.hacking_money_mult = params.hacking_money_mult;\n }\n if (params.hacking_grow_mult) {\n this.mults.hacking_grow_mult = params.hacking_grow_mult;\n }\n if (params.company_rep_mult) {\n this.mults.company_rep_mult = params.company_rep_mult;\n }\n if (params.faction_rep_mult) {\n this.mults.faction_rep_mult = params.faction_rep_mult;\n }\n if (params.crime_money_mult) {\n this.mults.crime_money_mult = params.crime_money_mult;\n }\n if (params.crime_success_mult) {\n this.mults.crime_success_mult = params.crime_success_mult;\n }\n if (params.work_money_mult) {\n this.mults.work_money_mult = params.work_money_mult;\n }\n if (params.hacknet_node_money_mult) {\n this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult;\n }\n if (params.hacknet_node_purchase_cost_mult) {\n this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult;\n }\n if (params.hacknet_node_ram_cost_mult) {\n this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult;\n }\n if (params.hacknet_node_core_cost_mult) {\n this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult;\n }\n if (params.hacknet_node_level_cost_mult) {\n this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult;\n }\n if (params.bladeburner_max_stamina_mult) {\n this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult;\n }\n if (params.bladeburner_stamina_gain_mult) {\n this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult;\n }\n if (params.bladeburner_analysis_mult) {\n this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult;\n }\n if (params.bladeburner_success_chance_mult) {\n this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult;\n }\n\n if (params.stats === undefined)\n this.stats = generateStatsDescription(this.mults, params.programs, params.startingMoney);\n else this.stats = params.stats;\n }\n\n // Adds this Augmentation to the specified Factions\n addToFactions(factionList: string[]): void {\n for (let i = 0; i < factionList.length; ++i) {\n const faction: Faction | null = Factions[factionList[i]];\n if (faction == null) {\n console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`);\n continue;\n }\n faction.augmentations.push(this.name);\n }\n }\n\n // Adds this Augmentation to all Factions\n addToAllFactions(): void {\n for (const fac in Factions) {\n if (Factions.hasOwnProperty(fac)) {\n const facObj: Faction | null = Factions[fac];\n if (facObj == null) {\n console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`);\n continue;\n }\n if (facObj.getInfo().special) continue;\n facObj.augmentations.push(this.name);\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Augmentation\", this);\n }\n\n // Initiatizes a Augmentation object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Augmentation {\n return Generic_fromJSON(Augmentation, value.data);\n }\n}\n\nReviver.constructors.Augmentation = Augmentation;\n","export const HacknetNodeConstants: {\n // Constants for Hacknet Node production\n MoneyGainPerLevel: number;\n\n // Constants for Hacknet Node purchase/upgrade costs\n BaseCost: number;\n LevelBaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n\n PurchaseNextMult: number;\n UpgradeLevelMult: number;\n UpgradeRamMult: number;\n UpgradeCoreMult: number;\n\n // Constants for max upgrade levels for Hacknet Nodes\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n} = {\n MoneyGainPerLevel: 1.5,\n\n BaseCost: 1000,\n LevelBaseCost: 1,\n RamBaseCost: 30e3,\n CoreBaseCost: 500e3,\n\n PurchaseNextMult: 1.85,\n UpgradeLevelMult: 1.04,\n UpgradeRamMult: 1.28,\n UpgradeCoreMult: 1.48,\n\n MaxLevel: 200,\n MaxRam: 64,\n MaxCores: 16,\n};\n\nexport const PurchaseMultipliers: {\n [key: string]: number | \"MAX\" | undefined;\n x1: number;\n x5: number;\n x10: number;\n MAX: \"MAX\";\n} = {\n x1: 1,\n x5: 5,\n x10: 10,\n MAX: \"MAX\",\n};\n\nexport const HacknetServerConstants: {\n // Constants for Hacknet Server stats/production\n HashesPerLevel: number;\n\n // Constants for Hacknet Server purchase/upgrade costs\n BaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n CacheBaseCost: number;\n\n PurchaseMult: number; // Multiplier for puchasing an additional Hacknet Server\n UpgradeLevelMult: number; // Multiplier for cost when upgrading level\n UpgradeRamMult: number; // Multiplier for cost when upgrading RAM\n UpgradeCoreMult: number; // Multiplier for cost when buying another core\n UpgradeCacheMult: number; // Multiplier for cost when upgrading cache\n MaxServers: number; // Max number of Hacknet Servers you can own\n\n // Constants for max upgrade levels for Hacknet Server\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n MaxCache: number;\n} = {\n HashesPerLevel: 0.001,\n\n BaseCost: 50e3,\n RamBaseCost: 200e3,\n CoreBaseCost: 1e6,\n CacheBaseCost: 10e6,\n\n PurchaseMult: 3.2,\n UpgradeLevelMult: 1.1,\n UpgradeRamMult: 1.4,\n UpgradeCoreMult: 1.55,\n UpgradeCacheMult: 1.85,\n\n MaxServers: 20,\n\n MaxLevel: 300,\n MaxRam: 8192,\n MaxCores: 128,\n MaxCache: 15,\n};\n","// Action Identifier enum\nexport const ActionTypes: {\n [key: string]: number;\n Idle: number;\n Contract: number;\n Operation: number;\n BlackOp: number;\n BlackOperation: number;\n Training: number;\n Recruitment: number;\n FieldAnalysis: number;\n \"Field Analysis\": number;\n Diplomacy: number;\n \"Hyperbolic Regeneration Chamber\": number;\n \"Incite Violence\": number;\n} = {\n Idle: 1,\n Contract: 2,\n Operation: 3,\n BlackOp: 4,\n BlackOperation: 4,\n Training: 5,\n Recruitment: 6,\n FieldAnalysis: 7,\n \"Field Analysis\": 7,\n Diplomacy: 8,\n \"Hyperbolic Regeneration Chamber\": 9,\n \"Incite Violence\": 10,\n};\n","import React from \"react\";\nimport { TableCell as MuiTableCell, TableCellProps, Table as MuiTable, TableProps } from \"@mui/material\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nconst useStyles = makeStyles({\n root: {\n borderBottom: \"none\",\n },\n small: {\n width: \"1px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\nexport const Table: React.FC = (props: TableProps) => {\n return (\n \n );\n};\n","import { Player } from \"./Player\";\n\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { ITutorialEvents } from \"./ui/InteractiveTutorial/ITutorialEvents\";\n\n// Ordered array of keys to Interactive Tutorial Steps\nenum iTutorialSteps {\n Start,\n GoToCharacterPage, // Click on 'Stats' page\n CharacterPage, // Introduction to 'Stats' page\n CharacterGoToTerminalPage, // Go back to Terminal\n TerminalIntro, // Introduction to Terminal\n TerminalHelp, // Using 'help' Terminal command\n TerminalLs, // Using 'ls' Terminal command\n TerminalScan, // Using 'scan' Terminal command\n TerminalScanAnalyze1, // Using 'scan-analyze' Terminal command\n TerminalScanAnalyze2, // Using 'scan-analyze 3' Terminal command\n TerminalConnect, // Connecting to n00dles\n TerminalAnalyze, // Analyzing n00dles\n TerminalNuke, // NUKE n00dles\n TerminalManualHack, // Hack n00dles\n TerminalHackingMechanics, // Explanation of hacking mechanics\n TerminalGoHome, // Go home before creating a script.\n TerminalCreateScript, // Create a script using 'nano'\n TerminalTypeScript, // Script Editor page - Type script and then save & close\n TerminalFree, // Using 'Free' Terminal command\n TerminalRunScript, // Running script using 'run' Terminal command\n TerminalGoToActiveScriptsPage,\n ActiveScriptsPage,\n ActiveScriptsToTerminal,\n TerminalTailScript,\n GoToHacknetNodesPage,\n HacknetNodesIntroduction,\n HacknetNodesGoToWorldPage,\n WorldDescription,\n TutorialPageInfo,\n End,\n}\n\nconst ITutorial: {\n currStep: iTutorialSteps;\n isRunning: boolean;\n stepIsDone: {\n [iTutorialSteps.Start]: boolean;\n [iTutorialSteps.GoToCharacterPage]: boolean;\n [iTutorialSteps.CharacterPage]: boolean;\n [iTutorialSteps.CharacterGoToTerminalPage]: boolean;\n [iTutorialSteps.TerminalIntro]: boolean;\n [iTutorialSteps.TerminalHelp]: boolean;\n [iTutorialSteps.TerminalLs]: boolean;\n [iTutorialSteps.TerminalScan]: boolean;\n [iTutorialSteps.TerminalScanAnalyze1]: boolean;\n [iTutorialSteps.TerminalScanAnalyze2]: boolean;\n [iTutorialSteps.TerminalConnect]: boolean;\n [iTutorialSteps.TerminalAnalyze]: boolean;\n [iTutorialSteps.TerminalNuke]: boolean;\n [iTutorialSteps.TerminalManualHack]: boolean;\n [iTutorialSteps.TerminalHackingMechanics]: boolean;\n [iTutorialSteps.TerminalGoHome]: boolean;\n [iTutorialSteps.TerminalCreateScript]: boolean;\n [iTutorialSteps.TerminalTypeScript]: boolean;\n [iTutorialSteps.TerminalFree]: boolean;\n [iTutorialSteps.TerminalRunScript]: boolean;\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsToTerminal]: boolean;\n [iTutorialSteps.TerminalTailScript]: boolean;\n [iTutorialSteps.GoToHacknetNodesPage]: boolean;\n [iTutorialSteps.HacknetNodesIntroduction]: boolean;\n [iTutorialSteps.HacknetNodesGoToWorldPage]: boolean;\n [iTutorialSteps.WorldDescription]: boolean;\n [iTutorialSteps.TutorialPageInfo]: boolean;\n [iTutorialSteps.End]: boolean;\n };\n} = {\n currStep: iTutorialSteps.Start,\n isRunning: false,\n\n // Keeps track of whether each step has been done\n stepIsDone: {\n [iTutorialSteps.Start]: false,\n [iTutorialSteps.GoToCharacterPage]: false,\n [iTutorialSteps.CharacterPage]: false,\n [iTutorialSteps.CharacterGoToTerminalPage]: false,\n [iTutorialSteps.TerminalIntro]: false,\n [iTutorialSteps.TerminalHelp]: false,\n [iTutorialSteps.TerminalLs]: false,\n [iTutorialSteps.TerminalScan]: false,\n [iTutorialSteps.TerminalScanAnalyze1]: false,\n [iTutorialSteps.TerminalScanAnalyze2]: false,\n [iTutorialSteps.TerminalConnect]: false,\n [iTutorialSteps.TerminalAnalyze]: false,\n [iTutorialSteps.TerminalNuke]: false,\n [iTutorialSteps.TerminalManualHack]: false,\n [iTutorialSteps.TerminalHackingMechanics]: false,\n [iTutorialSteps.TerminalGoHome]: false,\n [iTutorialSteps.TerminalCreateScript]: false,\n [iTutorialSteps.TerminalTypeScript]: false,\n [iTutorialSteps.TerminalFree]: false,\n [iTutorialSteps.TerminalRunScript]: false,\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsToTerminal]: false,\n [iTutorialSteps.TerminalTailScript]: false,\n [iTutorialSteps.GoToHacknetNodesPage]: false,\n [iTutorialSteps.HacknetNodesIntroduction]: false,\n [iTutorialSteps.HacknetNodesGoToWorldPage]: false,\n [iTutorialSteps.WorldDescription]: false,\n [iTutorialSteps.TutorialPageInfo]: false,\n [iTutorialSteps.End]: false,\n },\n};\n\nfunction iTutorialStart(): void {\n ITutorial.isRunning = true;\n}\n\n// Go to the next step and evaluate it\nfunction iTutorialNextStep(): void {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n if (ITutorial.currStep === iTutorialSteps.End) iTutorialEnd();\n ITutorialEvents.emit();\n}\n\n// Go to previous step and evaluate\nfunction iTutorialPrevStep(): void {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n ITutorialEvents.emit();\n}\n\nfunction iTutorialEnd(): void {\n ITutorial.isRunning = false;\n ITutorial.currStep = iTutorialSteps.Start;\n Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook);\n ITutorialEvents.emit();\n}\n\nexport { iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial, iTutorialPrevStep };\n","import React from \"react\";\nimport { Theme } from \"@mui/material\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport M from \"@mui/material/Modal\";\nimport Fade from \"@mui/material/Fade\";\nimport Box from \"@mui/material/Box\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n paper: {\n backgroundColor: theme.palette.background.default,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: `0px 3px 5px -1px ${theme.palette.primary.dark},0px 5px 8px 0px ${theme.palette.primary.dark},0px 1px 14px 0px ${theme.palette.primary.dark}`,\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n },\n }),\n);\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: React.ReactNode;\n}\n\nexport const Modal = (props: IProps): React.ReactElement => {\n const classes = useStyles();\n return (\n \n \n
\n {props.children}\n
\n
\n \n );\n};\n","const CyclesPerMarketCycle = 50;\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nexport const CorporationConstants: {\n INITIALSHARES: number;\n SHARESPERPRICEUPDATE: number;\n IssueNewSharesCooldown: number;\n SellSharesCooldown: number;\n CyclesPerMarketCycle: number;\n CyclesPerIndustryStateCycle: number;\n SecsPerMarketCycle: number;\n Cities: string[];\n WarehouseInitialCost: number;\n WarehouseInitialSize: number;\n WarehouseUpgradeBaseCost: number;\n OfficeInitialCost: number;\n OfficeInitialSize: number;\n OfficeUpgradeBaseCost: number;\n BribeThreshold: number;\n BribeToRepRatio: number;\n ProductProductionCostRatio: number;\n DividendMaxPercentage: number;\n EmployeeSalaryMultiplier: number;\n CyclesPerEmployeeRaise: number;\n EmployeeRaiseAmount: number;\n BaseMaxProducts: number;\n AllCorporationStates: string[];\n AllMaterials: string[];\n} = {\n INITIALSHARES: 1e9, //Total number of shares you have at your company\n SHARESPERPRICEUPDATE: 1e6, //When selling large number of shares, price is dynamically updated for every batch of this amount\n IssueNewSharesCooldown: 216e3, // 12 Hour in terms of game cycles\n SellSharesCooldown: 18e3, // 1 Hour in terms of game cycles\n\n CyclesPerMarketCycle: CyclesPerMarketCycle,\n CyclesPerIndustryStateCycle: CyclesPerMarketCycle / AllCorporationStates.length,\n SecsPerMarketCycle: CyclesPerMarketCycle / 5,\n\n Cities: [\"Aevum\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n\n WarehouseInitialCost: 5e9, //Initial purchase cost of warehouse\n WarehouseInitialSize: 100,\n WarehouseUpgradeBaseCost: 1e9,\n\n OfficeInitialCost: 4e9,\n OfficeInitialSize: 3,\n OfficeUpgradeBaseCost: 1e9,\n\n BribeThreshold: 100e12, //Money needed to be able to bribe for faction rep\n BribeToRepRatio: 1e9, //Bribe Value divided by this = rep gain\n\n ProductProductionCostRatio: 5, //Ratio of material cost of a product to its production cost\n\n DividendMaxPercentage: 1,\n\n EmployeeSalaryMultiplier: 3, // Employee stats multiplied by this to determine initial salary\n CyclesPerEmployeeRaise: 400, // All employees get a raise every X market cycles\n EmployeeRaiseAmount: 50, // Employee salary increases by this (additive)\n\n BaseMaxProducts: 3, // Initial value for maximum number of products allowed\n AllCorporationStates: AllCorporationStates,\n AllMaterials: [\n \"Water\",\n \"Energy\",\n \"Food\",\n \"Plants\",\n \"Metal\",\n \"Hardware\",\n \"Chemicals\",\n \"Drugs\",\n \"Robots\",\n \"AI Cores\",\n \"Real Estate\",\n ],\n};\n","import { IPlayer } from \"../IPlayer\";\nimport { PlayerObject } from \"./PlayerObject\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { PlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CodingContractRewardType, ICodingContractReward } from \"../../CodingContracts\";\nimport { Company } from \"../../Company/Company\";\nimport { Companies } from \"../../Company/Companies\";\nimport { getNextCompanyPositionHelper } from \"../../Company/GetNextCompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { determineCrimeSuccess } from \"../../Crime/CrimeHelpers\";\nimport { Crimes } from \"../../Crime/Crimes\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { resetGangs } from \"../../Gang/AllGangs\";\nimport { Cities } from \"../../Locations/Cities\";\nimport { Locations } from \"../../Locations/Locations\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { Sleeve } from \"../../PersonObjects/Sleeve/Sleeve\";\nimport { calculateSkill as calculateSkillF } from \"../formulas/skill\";\nimport { calculateIntelligenceBonus } from \"../formulas/intelligence\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../formulas/reputation\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { safetlyCreateUniqueServer } from \"../../Server/ServerHelpers\";\n\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { applySourceFile } from \"../../SourceFile/applySourceFile\";\nimport { applyExploit } from \"../../Exploits/applyExploits\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { influenceStockThroughCompanyWork } from \"../../StockMarket/PlayerInfluencing\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { IRouter } from \"../../ui/Router\";\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport React from \"react\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { SnackbarEvents } from \"../../ui/React/Snackbar\";\nimport { calculateClassEarnings } from \"../formulas/work\";\n\nexport function init(this: IPlayer): void {\n /* Initialize Player's home computer */\n const t_homeComp = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: \"home\",\n ip: createUniqueRandomIp(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true,\n });\n this.currentServer = SpecialServers.Home;\n AddToAllServers(t_homeComp);\n\n this.getHomeComputer().programs.push(Programs.NukeProgram.name);\n}\n\nexport function prestigeAugmentation(this: PlayerObject): void {\n this.currentServer = SpecialServers.Home;\n\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n //Reset stats\n this.hacking = 1;\n\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n this.charisma = 1;\n\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n\n this.money = 1000;\n\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n this.companyName = \"\";\n this.jobs = {};\n\n this.purchasedServers = [];\n\n this.factions = [];\n this.factionInvitations = [];\n\n this.queuedAugmentations = [];\n\n this.resleeves = [];\n\n const numSleeves = Math.min(3, SourceFileFlags[10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new Sleeve(this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.crimeType = \"\";\n\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n\n this.timeWorked = 0;\n\n this.lastUpdate = new Date().getTime();\n\n // Statistics Trackers\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n\n this.hacknetNodes.length = 0;\n this.hashManager.prestige();\n\n // Reapply augs, re-calculate skills and reset HP\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\n\nexport function prestigeSourceFile(this: IPlayer): void {\n this.prestigeAugmentation();\n // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new Sleeve(this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0;\n\n // Gang\n this.gang = null;\n resetGangs();\n\n // Reset Stock market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n // BitNode 3: Corporatocracy\n this.corporation = null;\n\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\n\nexport function receiveInvite(this: IPlayer, factionName: string): void {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n this.factionInvitations.push(factionName);\n}\n\n//Calculates skill level based on experience. The same formula will be used for every skill\nexport function calculateSkill(this: IPlayer, exp: number, mult = 1): number {\n return calculateSkillF(exp, mult);\n}\n\nexport function updateSkillLevels(this: IPlayer): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier)),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier)),\n );\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\n\nexport function resetMultipliers(this: IPlayer): void {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n\n this.work_money_mult = 1;\n\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\n\nexport function hasProgram(this: IPlayer, programName: string): boolean {\n const home = this.getHomeComputer();\n if (home == null) {\n return false;\n }\n\n for (let i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n return false;\n}\n\nexport function setMoney(this: PlayerObject, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n this.money = money;\n}\n\nexport function gainMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money + money;\n this.recordMoneySource(money, source);\n}\n\nexport function loseMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n if (this.money === Infinity && money === Infinity) return;\n this.money = this.money - money;\n this.recordMoneySource(-1 * money, source);\n}\n\nexport function canAfford(this: IPlayer, cost: number): boolean {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n return this.money >= cost;\n}\n\nexport function recordMoneySource(this: PlayerObject, amt: number, source: string): void {\n if (!(this.moneySourceA instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new MoneySourceTracker();\n }\n if (!(this.moneySourceB instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new MoneySourceTracker();\n }\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\n\nexport function gainHackingExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n this.hacking_exp += exp;\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking = calculateSkillF(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier);\n}\n\nexport function gainStrengthExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n this.strength_exp += exp;\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = calculateSkillF(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier);\n}\n\nexport function gainDefenseExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n this.defense_exp += exp;\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = calculateSkillF(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier);\n}\n\nexport function gainDexterityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n this.dexterity_exp += exp;\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = calculateSkillF(\n this.dexterity_exp,\n this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n}\n\nexport function gainAgilityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n this.agility_exp += exp;\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = calculateSkillF(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier);\n}\n\nexport function gainCharismaExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n this.charisma_exp += exp;\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = calculateSkillF(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier);\n}\n\nexport function gainIntelligenceExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n if (SourceFileFlags[5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n }\n}\n\n//Given a string expression like \"str\" or \"strength\", returns the given stat\nexport function queryStatFromString(this: IPlayer, str: string): number {\n const tempStr = str.toLowerCase();\n if (tempStr.includes(\"hack\")) {\n return this.hacking;\n }\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n return 0;\n}\n\n/******* Working functions *******/\nexport function resetWorkStatus(this: IPlayer, generalType?: string, group?: string, workType?: string): void {\n if (this.workType !== CONSTANTS.WorkTypeFaction && generalType === this.workType && group === this.companyName)\n return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType)\n return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.workType = \"\";\n}\n\nexport function processWorkEarnings(this: IPlayer, numCycles = 1): void {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain, this.className ? \"class\" : \"work\");\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n\n/* Working for Company */\nexport function startWork(this: IPlayer, router: IRouter, companyName: string): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeCompany, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = CONSTANTS.WorkTypeCompany;\n\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n router.toWork();\n}\n\nexport function process(this: IPlayer, router: IRouter, numCycles = 1): void {\n // Working\n if (this.isWorking) {\n if (this.workType == CONSTANTS.WorkTypeFaction) {\n if (this.workForFaction(numCycles)) {\n router.toFaction();\n }\n } else if (this.workType == CONSTANTS.WorkTypeCreateProgram) {\n if (this.createProgramWork(numCycles)) {\n router.toTerminal();\n }\n } else if (this.workType == CONSTANTS.WorkTypeStudyClass) {\n if (this.takeClass(numCycles)) {\n router.toCity();\n }\n } else if (this.workType == CONSTANTS.WorkTypeCrime) {\n if (this.commitCrime(numCycles)) {\n router.toLocation(Locations[LocationName.Slums]);\n }\n } else if (this.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n if (this.workPartTime(numCycles)) {\n router.toCity();\n }\n } else {\n if (this.work(numCycles)) {\n router.toCity();\n }\n }\n }\n}\n\nexport function cancelationPenalty(this: IPlayer): number {\n const data = serverMetadata.find((s) => s.specialName === this.companyName);\n if (!data) return 0.5; // Does not have special server.\n const server = GetServer(data.hostname);\n if (server instanceof Server) {\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\n\nexport function work(this: IPlayer, numCycles: number): boolean {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.processWorkEarnings(numCycles);\n\n const comp = Companies[this.companyName];\n influenceStockThroughCompanyWork(comp, this.workRepGainRate, numCycles);\n\n // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishWork(this: IPlayer, cancelled: boolean, sing = false): string {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n let content = (\n <>\n You earned a total of:
\n \n
\n reputation for the company
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n \n );\n\n if (cancelled) {\n content = (\n <>\n You worked a short shift of {convertTimeMsToTimeElapsedString(this.timeWorked)}
\n
\n Since you cancelled your work early, you only gained half of the reputation you earned.
\n
\n {content}\n \n );\n } else {\n content = (\n <>\n You worked a full shift of 8 hours!
\n
\n {content}\n \n );\n }\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked a short shift of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned $\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp.\";\n\n return res;\n }\n\n return \"\";\n}\n\nexport function startWorkPartTime(this: IPlayer, router: IRouter, companyName: string): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = CONSTANTS.WorkTypeCompanyPartTime;\n\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n router.toWork();\n}\n\nexport function workPartTime(this: IPlayer, numCycles: number): boolean {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWorkPartTime();\n return true;\n }\n return false;\n}\n\nexport function finishWorkPartTime(this: IPlayer, sing = false): string {\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n const content = (\n <>\n You worked for {convertTimeMsToTimeElapsedString(this.timeWorked)}\n
\n
\n You earned a total of:
\n \n
\n reputation for the company
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n \n );\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n\n if (sing) {\n const res =\n \"You worked for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned a total of \" +\n \"$\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n return res;\n }\n return \"\";\n}\n\nexport function startFocusing(this: IPlayer): void {\n this.focus = true;\n}\n\nexport function stopFocusing(this: IPlayer): void {\n this.focus = false;\n}\n\n/* Working for Faction */\nexport function startFactionWork(this: IPlayer, router: IRouter, faction: Faction): void {\n //Update reputation gain rate to account for faction favor\n let favorMult = 1 + faction.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n this.isWorking = true;\n this.focus = true;\n this.workType = CONSTANTS.WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer20Hours;\n router.toWork();\n}\n\nexport function startFactionHackWork(this: IPlayer, router: IRouter, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkHacking);\n\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n\n this.startFactionWork(router, faction);\n}\n\nexport function startFactionFieldWork(this: IPlayer, router: IRouter, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkField);\n\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n\n this.startFactionWork(router, faction);\n}\n\nexport function startFactionSecurityWork(this: IPlayer, router: IRouter, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkSecurity);\n\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n\n this.startFactionWork(router, faction);\n}\n\nexport function workForFaction(this: IPlayer, numCycles: number): boolean {\n const faction = Factions[this.currentWorkFactionName];\n\n //Constantly update the rep gain rate\n switch (this.factionWorkType) {\n case CONSTANTS.FactionWorkHacking:\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n break;\n case CONSTANTS.FactionWorkField:\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n break;\n case CONSTANTS.FactionWorkSecurity:\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n break;\n default:\n break;\n }\n let favorMult = 1 + faction.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer20Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer20Hours) {\n this.finishFactionWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishFactionWork(this: IPlayer, cancelled: boolean, sing = false): string {\n const faction = Factions[this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n if (!sing) {\n dialogBoxCreate(\n <>\n You worked for your faction {faction.name} for a total of {convertTimeMsToTimeElapsedString(this.timeWorked)}{\" \"}\n
\n
\n You earned a total of:
\n \n
\n reputation for the faction
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n ,\n );\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked for your faction \" +\n faction.name +\n \" for a total of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \". \" +\n \"You earned \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" rep, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\";\n\n return res;\n }\n return \"\";\n}\n\n//Money gained per game cycle\nexport function getWorkMoneyGain(this: IPlayer): number {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = Companies[this.companyName];\n if (SourceFileFlags[11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n }\n\n // Get base salary\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return (\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney *\n bn11Mult\n );\n}\n\n//Hack exp gained per game cycle\nexport function getWorkHackExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work hack exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Str exp gained per game cycle\nexport function getWorkStrExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work str exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Def exp gained per game cycle\nexport function getWorkDefExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work def exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Dex exp gained per game cycle\nexport function getWorkDexExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work dex exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Agi exp gained per game cycle\nexport function getWorkAgiExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work agi exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Charisma exp gained per game cycle\nexport function getWorkChaExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work cha exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Reputation gained per game cycle\nexport function getWorkRepGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work rep gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n let jobPerformance = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n\n //Intelligence provides a flat bonus to job performance\n jobPerformance += this.intelligence / CONSTANTS.MaxSkillLevel;\n\n //Update reputation gain rate to account for company favor\n let favorMult = 1 + company.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return jobPerformance * this.company_rep_mult * favorMult;\n}\n\n// export function getFactionSecurityWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n\n// export function getFactionFieldWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\nexport function startCreateProgramWork(\n this: IPlayer,\n router: IRouter,\n programName: string,\n time: number,\n reqLevel: number,\n): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = CONSTANTS.WorkTypeCreateProgram;\n\n //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n this.createProgramReqLvl = reqLevel;\n\n this.timeNeededToCompleteWork = time;\n //Check for incomplete program\n for (let i = 0; i < this.getHomeComputer().programs.length; ++i) {\n const programFile = this.getHomeComputer().programs[i];\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n const res = programFile.split(\"-\");\n if (res.length != 3) {\n break;\n }\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n this.timeWorkedCreateProgram = (percComplete / 100) * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n router.toWork();\n}\n\nexport function createProgramWork(this: IPlayer, numCycles: number): boolean {\n //Higher hacking skill will allow you to create programs faster\n const reqLvl = this.createProgramReqLvl;\n let skillMult = (this.hacking / reqLvl) * this.getIntelligenceBonus(3); //This should always be greater than 1;\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n\n //Skill multiplier directly applied to \"time worked\"\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishCreateProgramWork(this: IPlayer, cancelled: boolean): string {\n const programName = this.createProgramName;\n if (cancelled === false) {\n dialogBoxCreate(\n \"You've finished creating \" + programName + \"!
\" + \"The new program can be found on your home computer.\",\n );\n\n this.getHomeComputer().programs.push(programName);\n } else {\n const perc = (Math.floor((this.timeWorkedCreateProgram / this.timeNeededToCompleteWork) * 10000) / 100).toString();\n const incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp((CONSTANTS.IntelligenceProgramBaseExpGain * this.timeWorked) / 1000);\n }\n\n this.isWorking = false;\n\n this.resetWorkStatus();\n return \"You've finished creating \" + programName + \"! The new program can be found on your home computer.\";\n}\n/* Studying/Taking Classes */\nexport function startClass(this: IPlayer, router: IRouter, costMult: number, expMult: number, className: string): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = CONSTANTS.WorkTypeStudyClass;\n this.workCostMult = costMult;\n this.workExpMult = expMult;\n this.className = className;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n router.toWork();\n}\n\nexport function takeClass(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n this.processWorkEarnings(numCycles);\n return false;\n}\n\n//The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\nexport function finishClass(this: IPlayer, sing = false): string {\n this.gainIntelligenceExp(CONSTANTS.IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n if (!sing) {\n dialogBoxCreate(\n <>\n After {this.className} for {convertTimeMsToTimeElapsedString(this.timeWorked)},
\n you spent a total of .
\n
\n You earned a total of:
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n ,\n );\n }\n\n this.isWorking = false;\n\n if (sing) {\n const res =\n \"After \" +\n this.className +\n \" for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \", \" +\n \"you spent a total of \" +\n numeralWrapper.formatMoney(this.workMoneyGained * -1) +\n \". \" +\n \"You earned a total of: \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n this.resetWorkStatus();\n return \"\";\n}\n\n//The EXP and $ gains are hardcoded. Time is in ms\nexport function startCrime(\n this: IPlayer,\n router: IRouter,\n crimeType: string,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n workerscript: WorkerScript | null = null,\n): void {\n this.crimeType = crimeType;\n\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = CONSTANTS.WorkTypeCrime;\n\n if (workerscript !== null) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.timeNeededToCompleteWork = time;\n router.toWork();\n}\n\nexport function commitCrime(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n if (this.timeWorked >= this.timeNeededToCompleteWork) {\n this.finishCrime(false);\n return true;\n }\n return false;\n}\n\nexport function finishCrime(this: IPlayer, cancelled: boolean): string {\n //Determine crime success/failure\n if (!cancelled) {\n if (determineCrimeSuccess(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n for (const i in Crimes) {\n if (Crimes[i].type == this.crimeType) {\n crime = Crimes[i];\n break;\n }\n }\n if (crime == null) {\n dialogBoxCreate(\n `ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`,\n );\n return \"\";\n }\n this.gainMoney(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n }\n\n //On a crime success, gain 2x exp\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"SUCCESS: Crime successful! Gained \" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime successful!\n
\n
\n You gained:\n
\n \n
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"FAIL: Crime failed! Gained \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime failed!\n
\n
\n You gained:\n
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n return \"\";\n}\n\n//Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\nexport function singularityStopWork(this: IPlayer): string {\n if (!this.isWorking) {\n return \"\";\n }\n let res = \"\"; //Earnings text for work\n switch (this.workType) {\n case CONSTANTS.WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n case CONSTANTS.WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n case CONSTANTS.WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n case CONSTANTS.WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n case CONSTANTS.WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n case CONSTANTS.WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n return res;\n}\n\n// Returns true if hospitalized, false otherwise\nexport function takeDamage(this: IPlayer, amt: number): boolean {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return false;\n }\n\n this.hp -= amt;\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\n\nexport function regenerateHp(this: IPlayer, amt: number): void {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n this.hp += amt;\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\n\nexport function hospitalize(this: IPlayer): number {\n const cost = getHospitalizationCost(this);\n SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, \"warning\");\n\n this.loseMoney(cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\nexport function applyForJob(this: IPlayer, entryPosType: CompanyPosition, sing = false): boolean {\n // Get current company and job\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n const currPositionName = this.jobs[this.companyName];\n\n // Get company that's being applied to\n const company = Companies[this.location]; //Company being applied to\n if (!(company instanceof Company)) {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return false;\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n const reqText = getJobRequirementText(company, pos);\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position
\" + reqText);\n }\n return false;\n }\n\n while (true) {\n const newPos = getNextCompanyPositionHelper(pos);\n if (newPos == null) {\n break;\n }\n\n //Check if this company has this position\n if (company.hasPosition(newPos)) {\n if (!this.isQualified(company, newPos)) {\n //If player not qualified for next job, break loop so player will be given current job\n break;\n }\n pos = newPos;\n } else {\n break;\n }\n }\n\n //Check if the determined job is the same as the player's current job\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null) {\n if (!sing) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n }\n return false;\n } else if (company.hasPosition(nextPos)) {\n if (!sing) {\n const reqText = getJobRequirementText(company, nextPos);\n dialogBoxCreate(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n }\n return false;\n } else {\n if (!sing) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n }\n return false;\n }\n return false; //Same job, do nothing\n }\n }\n\n this.jobs[company.name] = pos.name;\n if (!this.focus && this.isWorking && this.companyName !== this.location) this.resetWorkStatus();\n this.companyName = this.location;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n }\n return true;\n}\n\n//Returns your next position at a company given the field (software, business, etc.)\nexport function getNextCompanyPosition(\n this: IPlayer,\n company: Company,\n entryPosType: CompanyPosition,\n): CompanyPosition | null {\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n\n //Not employed at this company, so return the entry position\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n }\n\n //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n const currentPositionName = this.jobs[this.companyName];\n const currentPosition = CompanyPositions[currentPositionName];\n if (\n (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||\n (currentPosition.isITJob() && entryPosType.isITJob()) ||\n (currentPosition.isBusinessJob() && entryPosType.isBusinessJob()) ||\n (currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob()) ||\n (currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob()) ||\n (currentPosition.isSecurityJob() && entryPosType.isSecurityJob()) ||\n (currentPosition.isAgentJob() && entryPosType.isAgentJob()) ||\n (currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||\n (currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||\n (currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob())\n ) {\n return getNextCompanyPositionHelper(currentPosition);\n }\n\n return entryPosType;\n}\n\nexport function quitJob(this: IPlayer, company: string): void {\n this.isWorking = false;\n this.companyName = \"\";\n delete this.jobs[company];\n}\n\nexport function applyForSoftwareJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareCompanyPositions[0]], sing);\n}\n\nexport function applyForSoftwareConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForItJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.ITCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]])) {\n return this.applyForJob(CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]], sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForNetworkEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForBusinessJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessCompanyPositions[0]], sing);\n}\n\nexport function applyForBusinessConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityJob(this: IPlayer, sing = false): boolean {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(CompanyPositions[posNames.SecurityCompanyPositions[2]], sing);\n}\n\nexport function applyForAgentJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.AgentCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.AgentCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.MiscCompanyPositions[1]])) {\n this.companyName = company.name;\n this.jobs[company.name] = posNames.MiscCompanyPositions[1];\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed at \" + this.companyName);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForPartTimeEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.PartTimeCompanyPositions[1]])) {\n this.jobs[company.name] = posNames.PartTimeCompanyPositions[1];\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed part-time at \" + this.companyName);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.MiscCompanyPositions[0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = posNames.MiscCompanyPositions[0];\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a waiter at \" + this.companyName);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForPartTimeWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.PartTimeCompanyPositions[0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = posNames.PartTimeCompanyPositions[0];\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a part-time waiter at \" + this.companyName);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unforunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\n//Checks if the Player is qualified for a certain position\nexport function isQualified(this: IPlayer, company: Company, position: CompanyPosition): boolean {\n const offset = company.jobStatReqOffset;\n const reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n const reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n const reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n const reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n if (\n this.hacking >= reqHacking &&\n this.strength >= reqStrength &&\n this.defense >= reqDefense &&\n this.dexterity >= reqDexterity &&\n this.agility >= reqAgility &&\n this.charisma >= reqCharisma &&\n company.playerReputation >= position.requiredReputation\n ) {\n return true;\n }\n return false;\n}\n\n/********** Reapplying Augmentations and Source File ***********/\nexport function reapplyAllAugmentations(this: IPlayer, resetMultipliers = true): void {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const augName = this.augmentations[i].name;\n const aug = Augmentations[augName];\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n aug.owned = true;\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n for (let j = 0; j < aug.level; ++j) {\n applyAugmentation(this.augmentations[i], true);\n }\n continue;\n }\n applyAugmentation(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\n\nexport function reapplyAllSourceFiles(this: IPlayer): void {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n const srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n const sourceFileObject = SourceFiles[srcFileKey];\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n applySourceFile(this.sourceFiles[i]);\n }\n applyExploit();\n this.updateSkillLevels();\n}\n\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\nexport function checkForFactionInvitations(this: IPlayer): Faction[] {\n const invitedFactions: Faction[] = []; //Array which will hold all Factions the player should be invited to\n\n const numAugmentations = this.augmentations.length;\n\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs);\n\n // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n function getCompanyRep(companyName: string): number {\n const company = Companies[companyName];\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n }\n\n // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n function checkMegacorpRequirements(companyName: string, repNeeded = CONSTANTS.CorpFactionRepRequirement): boolean {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n }\n\n //Illuminati\n const illuminatiFac = Factions[\"Illuminati\"];\n if (\n !illuminatiFac.isBanned &&\n !illuminatiFac.isMember &&\n !illuminatiFac.alreadyInvited &&\n numAugmentations >= 30 &&\n this.money >= 150000000000 &&\n this.hacking >= 1500 &&\n this.strength >= 1200 &&\n this.defense >= 1200 &&\n this.dexterity >= 1200 &&\n this.agility >= 1200\n ) {\n invitedFactions.push(illuminatiFac);\n }\n\n //Daedalus\n const daedalusFac = Factions[\"Daedalus\"];\n if (\n !daedalusFac.isBanned &&\n !daedalusFac.isMember &&\n !daedalusFac.alreadyInvited &&\n numAugmentations >= Math.round(30 * BitNodeMultipliers.DaedalusAugsRequirement) &&\n this.money >= 100000000000 &&\n (this.hacking >= 2500 ||\n (this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500))\n ) {\n invitedFactions.push(daedalusFac);\n }\n\n //The Covenant\n const covenantFac = Factions[\"The Covenant\"];\n if (\n !covenantFac.isBanned &&\n !covenantFac.isMember &&\n !covenantFac.alreadyInvited &&\n numAugmentations >= 20 &&\n this.money >= 75000000000 &&\n this.hacking >= 850 &&\n this.strength >= 850 &&\n this.defense >= 850 &&\n this.dexterity >= 850 &&\n this.agility >= 850\n ) {\n invitedFactions.push(covenantFac);\n }\n\n //ECorp\n const ecorpFac = Factions[\"ECorp\"];\n if (\n !ecorpFac.isBanned &&\n !ecorpFac.isMember &&\n !ecorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumECorp)\n ) {\n invitedFactions.push(ecorpFac);\n }\n\n //MegaCorp\n const megacorpFac = Factions[\"MegaCorp\"];\n if (\n !megacorpFac.isBanned &&\n !megacorpFac.isMember &&\n !megacorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12MegaCorp)\n ) {\n invitedFactions.push(megacorpFac);\n }\n\n //Bachman & Associates\n const bachmanandassociatesFac = Factions[\"Bachman & Associates\"];\n if (\n !bachmanandassociatesFac.isBanned &&\n !bachmanandassociatesFac.isMember &&\n !bachmanandassociatesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumBachmanAndAssociates)\n ) {\n invitedFactions.push(bachmanandassociatesFac);\n }\n\n //Blade Industries\n const bladeindustriesFac = Factions[\"Blade Industries\"];\n if (\n !bladeindustriesFac.isBanned &&\n !bladeindustriesFac.isMember &&\n !bladeindustriesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12BladeIndustries)\n ) {\n invitedFactions.push(bladeindustriesFac);\n }\n\n //NWO\n const nwoFac = Factions[\"NWO\"];\n if (\n !nwoFac.isBanned &&\n !nwoFac.isMember &&\n !nwoFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenNWO)\n ) {\n invitedFactions.push(nwoFac);\n }\n\n //Clarke Incorporated\n const clarkeincorporatedFac = Factions[\"Clarke Incorporated\"];\n if (\n !clarkeincorporatedFac.isBanned &&\n !clarkeincorporatedFac.isMember &&\n !clarkeincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumClarkeIncorporated)\n ) {\n invitedFactions.push(clarkeincorporatedFac);\n }\n\n //OmniTek Incorporated\n const omnitekincorporatedFac = Factions[\"OmniTek Incorporated\"];\n if (\n !omnitekincorporatedFac.isBanned &&\n !omnitekincorporatedFac.isMember &&\n !omnitekincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenOmniTekIncorporated)\n ) {\n invitedFactions.push(omnitekincorporatedFac);\n }\n\n //Four Sigma\n const foursigmaFac = Factions[\"Four Sigma\"];\n if (\n !foursigmaFac.isBanned &&\n !foursigmaFac.isMember &&\n !foursigmaFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12FourSigma)\n ) {\n invitedFactions.push(foursigmaFac);\n }\n\n //KuaiGong International\n const kuaigonginternationalFac = Factions[\"KuaiGong International\"];\n if (\n !kuaigonginternationalFac.isBanned &&\n !kuaigonginternationalFac.isMember &&\n !kuaigonginternationalFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.ChongqingKuaiGongInternational)\n ) {\n invitedFactions.push(kuaigonginternationalFac);\n }\n\n //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n const fulcrumsecrettechonologiesFac = Factions[\"Fulcrum Secret Technologies\"];\n const fulcrumSecretServer = GetServer(SpecialServers.FulcrumSecretTechnologies);\n if (!(fulcrumSecretServer instanceof Server)) throw new Error(\"Fulcrum Secret Technologies should be normal server\");\n if (fulcrumSecretServer == null) {\n console.error(\"Could not find Fulcrum Secret Technologies Server\");\n } else {\n if (\n !fulcrumsecrettechonologiesFac.isBanned &&\n !fulcrumsecrettechonologiesFac.isMember &&\n !fulcrumsecrettechonologiesFac.alreadyInvited &&\n fulcrumSecretServer.backdoorInstalled &&\n checkMegacorpRequirements(LocationName.AevumFulcrumTechnologies, 250e3)\n ) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n }\n\n //BitRunners\n const bitrunnersFac = Factions[\"BitRunners\"];\n const bitrunnersServer = GetServer(SpecialServers.BitRunnersServer);\n if (!(bitrunnersServer instanceof Server)) throw new Error(\"BitRunners should be normal server\");\n if (bitrunnersServer == null) {\n console.error(\"Could not find BitRunners Server\");\n } else if (\n !bitrunnersFac.isBanned &&\n !bitrunnersFac.isMember &&\n bitrunnersServer.backdoorInstalled &&\n !bitrunnersFac.alreadyInvited\n ) {\n invitedFactions.push(bitrunnersFac);\n }\n\n //The Black Hand\n\n const theblackhandFac = Factions[\"The Black Hand\"];\n const blackhandServer = GetServer(SpecialServers.TheBlackHandServer);\n if (!(blackhandServer instanceof Server)) throw new Error(\"TheBlackHand should be normal server\");\n if (blackhandServer == null) {\n console.error(\"Could not find The Black Hand Server\");\n } else if (\n !theblackhandFac.isBanned &&\n !theblackhandFac.isMember &&\n blackhandServer.backdoorInstalled &&\n !theblackhandFac.alreadyInvited\n ) {\n invitedFactions.push(theblackhandFac);\n }\n\n //NiteSec\n const nitesecFac = Factions[\"NiteSec\"];\n const nitesecServer = GetServer(SpecialServers.NiteSecServer);\n if (!(nitesecServer instanceof Server)) throw new Error(\"NiteSec should be normal server\");\n if (nitesecServer == null) {\n console.error(\"Could not find NiteSec Server\");\n } else if (\n !nitesecFac.isBanned &&\n !nitesecFac.isMember &&\n nitesecServer.backdoorInstalled &&\n !nitesecFac.alreadyInvited\n ) {\n invitedFactions.push(nitesecFac);\n }\n\n //Chongqing\n const chongqingFac = Factions[\"Chongqing\"];\n if (\n !chongqingFac.isBanned &&\n !chongqingFac.isMember &&\n !chongqingFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.Chongqing\n ) {\n invitedFactions.push(chongqingFac);\n }\n\n //Sector-12\n const sector12Fac = Factions[\"Sector-12\"];\n if (\n !sector12Fac.isBanned &&\n !sector12Fac.isMember &&\n !sector12Fac.alreadyInvited &&\n this.money >= 15000000 &&\n this.city == CityName.Sector12\n ) {\n invitedFactions.push(sector12Fac);\n }\n\n //New Tokyo\n const newtokyoFac = Factions[\"New Tokyo\"];\n if (\n !newtokyoFac.isBanned &&\n !newtokyoFac.isMember &&\n !newtokyoFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.NewTokyo\n ) {\n invitedFactions.push(newtokyoFac);\n }\n\n //Aevum\n const aevumFac = Factions[\"Aevum\"];\n if (\n !aevumFac.isBanned &&\n !aevumFac.isMember &&\n !aevumFac.alreadyInvited &&\n this.money >= 40000000 &&\n this.city == CityName.Aevum\n ) {\n invitedFactions.push(aevumFac);\n }\n\n //Ishima\n const ishimaFac = Factions[\"Ishima\"];\n if (\n !ishimaFac.isBanned &&\n !ishimaFac.isMember &&\n !ishimaFac.alreadyInvited &&\n this.money >= 30000000 &&\n this.city == CityName.Ishima\n ) {\n invitedFactions.push(ishimaFac);\n }\n\n //Volhaven\n const volhavenFac = Factions[\"Volhaven\"];\n if (\n !volhavenFac.isBanned &&\n !volhavenFac.isMember &&\n !volhavenFac.alreadyInvited &&\n this.money >= 50000000 &&\n this.city == CityName.Volhaven\n ) {\n invitedFactions.push(volhavenFac);\n }\n\n //Speakers for the Dead\n const speakersforthedeadFac = Factions[\"Speakers for the Dead\"];\n if (\n !speakersforthedeadFac.isBanned &&\n !speakersforthedeadFac.isMember &&\n !speakersforthedeadFac.alreadyInvited &&\n this.hacking >= 100 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.numPeopleKilled >= 30 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(speakersforthedeadFac);\n }\n\n //The Dark Army\n const thedarkarmyFac = Factions[\"The Dark Army\"];\n if (\n !thedarkarmyFac.isBanned &&\n !thedarkarmyFac.isMember &&\n !thedarkarmyFac.alreadyInvited &&\n this.hacking >= 300 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.city == CityName.Chongqing &&\n this.numPeopleKilled >= 5 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thedarkarmyFac);\n }\n\n //The Syndicate\n const thesyndicateFac = Factions[\"The Syndicate\"];\n if (\n !thesyndicateFac.isBanned &&\n !thesyndicateFac.isMember &&\n !thesyndicateFac.alreadyInvited &&\n this.hacking >= 200 &&\n this.strength >= 200 &&\n this.defense >= 200 &&\n this.dexterity >= 200 &&\n this.agility >= 200 &&\n (this.city == CityName.Aevum || this.city == CityName.Sector12) &&\n this.money >= 10000000 &&\n this.karma <= -90 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thesyndicateFac);\n }\n\n //Silhouette\n const silhouetteFac = Factions[\"Silhouette\"];\n if (\n !silhouetteFac.isBanned &&\n !silhouetteFac.isMember &&\n !silhouetteFac.alreadyInvited &&\n (allPositions.includes(\"Chief Technology Officer\") ||\n allPositions.includes(\"Chief Financial Officer\") ||\n allPositions.includes(\"Chief Executive Officer\")) &&\n this.money >= 15000000 &&\n this.karma <= -22\n ) {\n invitedFactions.push(silhouetteFac);\n }\n\n //Tetrads\n const tetradsFac = Factions[\"Tetrads\"];\n if (\n !tetradsFac.isBanned &&\n !tetradsFac.isMember &&\n !tetradsFac.alreadyInvited &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima) &&\n this.strength >= 75 &&\n this.defense >= 75 &&\n this.dexterity >= 75 &&\n this.agility >= 75 &&\n this.karma <= -18\n ) {\n invitedFactions.push(tetradsFac);\n }\n\n //SlumSnakes\n const slumsnakesFac = Factions[\"Slum Snakes\"];\n if (\n !slumsnakesFac.isBanned &&\n !slumsnakesFac.isMember &&\n !slumsnakesFac.alreadyInvited &&\n this.strength >= 30 &&\n this.defense >= 30 &&\n this.dexterity >= 30 &&\n this.agility >= 30 &&\n this.karma <= -9 &&\n this.money >= 1000000\n ) {\n invitedFactions.push(slumsnakesFac);\n }\n\n //Netburners\n const netburnersFac = Factions[\"Netburners\"];\n let totalHacknetRam = 0;\n let totalHacknetCores = 0;\n let totalHacknetLevels = 0;\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n const v = this.hacknetNodes[i];\n if (typeof v === \"string\") {\n const hserver = GetServer(v);\n if (hserver === null || !(hserver instanceof HacknetServer))\n throw new Error(\"player hacknet server was not HacknetServer\");\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n } else {\n totalHacknetLevels += v.level;\n totalHacknetRam += v.ram;\n totalHacknetCores += v.cores;\n }\n }\n if (\n !netburnersFac.isBanned &&\n !netburnersFac.isMember &&\n !netburnersFac.alreadyInvited &&\n this.hacking >= 80 &&\n totalHacknetRam >= 8 &&\n totalHacknetCores >= 4 &&\n totalHacknetLevels >= 100\n ) {\n invitedFactions.push(netburnersFac);\n }\n\n //Tian Di Hui\n const tiandihuiFac = Factions[\"Tian Di Hui\"];\n if (\n !tiandihuiFac.isBanned &&\n !tiandihuiFac.isMember &&\n !tiandihuiFac.alreadyInvited &&\n this.money >= 1000000 &&\n this.hacking >= 50 &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima)\n ) {\n invitedFactions.push(tiandihuiFac);\n }\n\n //CyberSec\n const cybersecFac = Factions[\"CyberSec\"];\n const cybersecServer = GetServer(SpecialServers.CyberSecServer);\n if (!(cybersecServer instanceof Server)) throw new Error(\"cybersec should be normal server\");\n if (cybersecServer == null) {\n console.error(\"Could not find CyberSec Server\");\n } else if (\n !cybersecFac.isBanned &&\n !cybersecFac.isMember &&\n cybersecServer.backdoorInstalled &&\n !cybersecFac.alreadyInvited\n ) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n\n/************* BitNodes **************/\nexport function setBitNodeNumber(this: IPlayer, n: number): void {\n this.bitNodeN = n;\n}\n\nexport function queueAugmentation(this: IPlayer, name: string): void {\n for (const i in this.queuedAugmentations) {\n if (this.queuedAugmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const i in this.augmentations) {\n if (this.augmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.queuedAugmentations.push(new PlayerOwnedAugmentation(name));\n}\n\n/************* Coding Contracts **************/\nexport function gainCodingContractReward(this: IPlayer, reward: ICodingContractReward, difficulty = 1): string {\n if (reward == null || reward.type == null || reward == null) {\n return `No reward for this contract`;\n }\n\n /* eslint-disable no-case-declarations */\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation:\n if (reward.name == null || !(Factions[reward.name] instanceof Faction)) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n Factions[reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n case CodingContractRewardType.FactionReputationAll:\n const totalGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n\n // Ignore Bladeburners and other special factions for this calculation\n const specialFactions = [\"Bladeburners\"];\n const factions = this.factions.slice().filter((f) => {\n return !specialFactions.includes(f);\n });\n\n // If the player was only part of the special factions, we'll just give money\n if (factions.length == 0) {\n reward.type = CodingContractRewardType.Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n for (const facName of factions) {\n if (!(Factions[facName] instanceof Faction)) {\n continue;\n }\n Factions[facName].playerReputation += gainPerFaction;\n }\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n break;\n case CodingContractRewardType.CompanyReputation: {\n if (reward.name == null || !(Companies[reward.name] instanceof Company)) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseCompanyRepGain * difficulty;\n Companies[reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n }\n case CodingContractRewardType.Money:\n default: {\n const moneyGain = CONSTANTS.CodingContractBaseMoneyGain * difficulty * BitNodeMultipliers.CodingContractMoney;\n this.gainMoney(moneyGain, \"codingcontract\");\n return `Gained ${numeralWrapper.formatMoney(moneyGain)}`;\n }\n }\n /* eslint-enable no-case-declarations */\n}\n\nexport function travel(this: IPlayer, to: CityName): boolean {\n if (Cities[to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n this.city = to;\n\n return true;\n}\n\nexport function gotoLocation(this: IPlayer, to: LocationName): boolean {\n if (Locations[to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n this.location = to;\n\n return true;\n}\n\nexport function canAccessResleeving(this: IPlayer): boolean {\n return this.bitNodeN === 10 || SourceFileFlags[10] > 0;\n}\n\nexport function giveExploit(this: IPlayer, exploit: Exploit): void {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n SnackbarEvents.emit(\"SF -1 acquired!\", \"success\");\n }\n}\n\nexport function getIntelligenceBonus(this: IPlayer, weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n}\n\nexport function getCasinoWinnings(this: IPlayer): number {\n return this.moneySourceA.casino;\n}\n\nexport function getMult(this: IPlayer, name: string): number {\n if (!this.hasOwnProperty(name)) return 1;\n return (this as any)[name];\n}\n\nexport function setMult(this: IPlayer, name: string, mult: number): void {\n if (!this.hasOwnProperty(name)) return;\n (this as any)[name] = mult;\n}\n\nexport function canAccessCotMG(this: IPlayer): boolean {\n return this.bitNodeN === 13 || SourceFileFlags[13] > 0;\n}\n\nexport function sourceFileLvl(this: IPlayer, n: number): number {\n const sf = this.sourceFiles.find((sf) => sf.n === n);\n if (!sf) return 0;\n return sf.lvl;\n}\n","import React, { useContext } from \"react\";\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\n\nexport const Context: {\n Corporation: React.Context;\n Division: React.Context;\n} = {\n Corporation: React.createContext({} as ICorporation),\n Division: React.createContext({} as IIndustry),\n};\n\nexport const useCorporation = (): ICorporation => useContext(Context.Corporation);\nexport const useDivision = (): IIndustry => useContext(Context.Division);\n","// Class representing a single hackable Server\nimport { BaseServer } from \"./BaseServer\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { createRandomString } from \"../utils/helpers/createRandomString\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n adminRights?: boolean;\n hackDifficulty?: number;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired?: number;\n organizationName?: string;\n purchasedByPlayer?: boolean;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n}\n\nexport class Server extends BaseServer {\n // Flag indicating whether this server has a backdoor installed by a player\n backdoorInstalled = false;\n\n // Initial server security level\n // (i.e. security level when the server was created)\n baseDifficulty = 1;\n\n // Server Security Level\n hackDifficulty = 1;\n\n // Minimum server security level that this server can be weakened to\n minDifficulty = 1;\n\n // How much money currently resides on the server and can be hacked\n moneyAvailable = 0;\n\n // Maximum amount of money that this server can hold\n moneyMax = 0;\n\n // Number of open ports required in order to gain admin/root access\n numOpenPortsRequired = 5;\n\n // How many ports are currently opened on the server\n openPortCount = 0;\n\n // Hacking level required to hack this server\n requiredHackingSkill = 1;\n\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n serverGrowth = 1;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = createRandomString(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false;\n\n //RAM, CPU speed and Scripts\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable =\n params.moneyAvailable != null ? params.moneyAvailable * BitNodeMultipliers.ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;\n\n //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n this.hackDifficulty =\n params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n\n //Port information, required for porthacking servers to get admin rights\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n capDifficulty(): void {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n }\n\n // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n changeMinimumSecurity(n: number, perc = false): void {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n }\n\n // Server security cannot go below 1\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n */\n changeMaximumMoney(n: number): void {\n const softCap = 10e12;\n if (this.moneyMax > softCap) {\n const aboveCap = this.moneyMax - softCap;\n n = 1 + (n - 1) / Math.log(aboveCap) / Math.log(8);\n }\n\n this.moneyMax *= n;\n }\n\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n fortify(amt: number): void {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n weaken(amt: number): void {\n this.hackDifficulty -= amt * BitNodeMultipliers.ServerWeakenRate;\n this.capDifficulty();\n }\n\n /**\n * Serialize the current object to a JSON save state\n */\n toJSON(): any {\n return Generic_toJSON(\"Server\", this);\n }\n\n // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Server {\n return Generic_fromJSON(Server, value.data);\n }\n}\n\nReviver.constructors.Server = Server;\n","/**\n * Enum defining the different types of possible locations\n */\nexport enum LocationType {\n Company,\n Gym,\n Hospital,\n Slums,\n Special, // This location has special options/activities (e.g. Bladeburner, Re-sleeving)\n StockMarket,\n TechVendor,\n TravelAgency,\n University,\n Casino,\n}\n","import React from \"react\";\nimport { ResearchTree } from \"./ResearchTree\";\nimport { ICorporation } from \"./ICorporation\";\nimport { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from \"./data/BaseResearchTree\";\nimport { MoneyCost } from \"./ui/MoneyCost\";\n\ninterface IIndustryMap {\n [key: string]: T | undefined;\n Energy: T;\n Utilities: T;\n Agriculture: T;\n Fishing: T;\n Mining: T;\n Food: T;\n Tobacco: T;\n Chemical: T;\n Pharmaceutical: T;\n Computer: T;\n Robotics: T;\n Software: T;\n Healthcare: T;\n RealEstate: T;\n}\n\n// Map of official names for each Industry\nexport const Industries: IIndustryMap = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\",\n};\n\n// Map of how much money it takes to start each industry\nexport const IndustryStartingCosts: IIndustryMap = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9,\n};\n\n// Map of description for each industry\nexport const IndustryDescriptions: IIndustryMap<(corp: ICorporation) => React.ReactElement> = {\n Energy: (corp: ICorporation) => (\n <>\n Engage in the production and distribution of energy.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Utilities: (corp: ICorporation) => (\n <>\n Distribute water and provide wastewater services.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Agriculture: (corp: ICorporation) => (\n <>\n Cultivate crops and breed livestock to produce food.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Fishing: (corp: ICorporation) => (\n <>\n Produce food through the breeding and processing of fish and fish products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Mining: (corp: ICorporation) => (\n <>\n Extract and process metals from the earth.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Food: (corp: ICorporation) => (\n <>\n Create your own restaurants all around the world.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Tobacco: (corp: ICorporation) => (\n <>\n Create and distribute tobacco and tobacco-related products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Chemical: (corp: ICorporation) => (\n <>\n Produce industrial chemicals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Pharmaceutical: (corp: ICorporation) => (\n <>\n Discover, develop, and create new pharmaceutical drugs.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Computer: (corp: ICorporation) => (\n <>\n Develop and manufacture new computer hardware and networking infrastructures.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Robotics: (corp: ICorporation) => (\n <>\n Develop and create robots.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Software: (corp: ICorporation) => (\n <>\n Develop computer software and create AI Cores.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Healthcare: (corp: ICorporation) => (\n <>\n Create and manage hospitals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n RealEstate: (corp: ICorporation) => (\n <>\n Develop and manage real estate properties.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n};\n\n// Map of available Research for each Industry. This data is held in a\n// ResearchTree object\nexport const IndustryResearchTrees: IIndustryMap = {\n Energy: getBaseResearchTreeCopy(),\n Utilities: getBaseResearchTreeCopy(),\n Agriculture: getBaseResearchTreeCopy(),\n Fishing: getBaseResearchTreeCopy(),\n Mining: getBaseResearchTreeCopy(),\n Food: getProductIndustryResearchTreeCopy(),\n Tobacco: getProductIndustryResearchTreeCopy(),\n Chemical: getBaseResearchTreeCopy(),\n Pharmaceutical: getProductIndustryResearchTreeCopy(),\n Computer: getProductIndustryResearchTreeCopy(),\n Robotics: getProductIndustryResearchTreeCopy(),\n Software: getProductIndustryResearchTreeCopy(),\n Healthcare: getProductIndustryResearchTreeCopy(),\n RealEstate: getProductIndustryResearchTreeCopy(),\n};\n\nexport function resetIndustryResearchTrees(): void {\n IndustryResearchTrees.Energy = getBaseResearchTreeCopy();\n IndustryResearchTrees.Utilities = getBaseResearchTreeCopy();\n IndustryResearchTrees.Agriculture = getBaseResearchTreeCopy();\n IndustryResearchTrees.Fishing = getBaseResearchTreeCopy();\n IndustryResearchTrees.Mining = getBaseResearchTreeCopy();\n IndustryResearchTrees.Food = getBaseResearchTreeCopy();\n IndustryResearchTrees.Tobacco = getBaseResearchTreeCopy();\n IndustryResearchTrees.Chemical = getBaseResearchTreeCopy();\n IndustryResearchTrees.Pharmaceutical = getBaseResearchTreeCopy();\n IndustryResearchTrees.Computer = getBaseResearchTreeCopy();\n IndustryResearchTrees.Robotics = getBaseResearchTreeCopy();\n IndustryResearchTrees.Software = getBaseResearchTreeCopy();\n IndustryResearchTrees.Healthcare = getBaseResearchTreeCopy();\n IndustryResearchTrees.RealEstate = getBaseResearchTreeCopy();\n}\n","import { IMap } from \"../types\";\n\nexport const EmployeePositions: IMap = {\n Operations: \"Operations\",\n Engineer: \"Engineer\",\n Business: \"Business\",\n Management: \"Management\",\n RandD: \"Research & Development\",\n Training: \"Training\",\n Unassigned: \"Unassigned\",\n};\n","/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\nimport { HacknetNode } from \"./HacknetNode\";\nimport { calculateNodeCost } from \"./formulas/HacknetNodes\";\nimport { calculateServerCost } from \"./formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"./data/Constants\";\nimport { HacknetServer } from \"./HacknetServer\";\nimport { HashManager } from \"./HashManager\";\nimport { HashUpgrades } from \"./HashUpgrades\";\n\nimport { generateRandomContract } from \"../CodingContractGenerator\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../InteractiveTutorial\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Server } from \"../Server/Server\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\n// Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\nexport function hasHacknetServers(player: IPlayer): boolean {\n return player.bitNodeN === 9 || SourceFileFlags[9] > 0;\n}\n\nexport function purchaseHacknet(player: IPlayer): number {\n /* INTERACTIVE TUTORIAL */\n if (ITutorial.isRunning) {\n if (ITutorial.currStep === iTutorialSteps.HacknetNodesIntroduction) {\n iTutorialNextStep();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n const numOwned = player.hacknetNodes.length;\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {\n return -1;\n }\n player.loseMoney(cost, \"hacknet_expenses\");\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n // Auto generate a name for the Node\n const name = \"hacknet-node-\" + numOwned;\n const node = new HacknetNode(name, player.hacknet_node_money_mult);\n\n player.loseMoney(cost, \"hacknet_expenses\");\n player.hacknetNodes.push(node);\n\n return numOwned;\n }\n}\n\nexport function hasMaxNumberHacknetServers(player: IPlayer): boolean {\n return hasHacknetServers(player) && player.hacknetNodes.length >= HacknetServerConstants.MaxServers;\n}\n\nexport function getCostOfNextHacknetNode(player: IPlayer): number {\n return calculateNodeCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\nexport function getCostOfNextHacknetServer(player: IPlayer): number {\n return calculateServerCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\nexport function getMaxNumberLevelUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult)) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n if (player.money > nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult)) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr !== maxLevel &&\n player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult) &&\n player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\nexport function getMaxNumberRamUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult)) {\n return 0;\n }\n\n let levelsToMax;\n if (nodeObj instanceof HacknetServer) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult)) {\n return levelsToMax;\n }\n\n //We'll just loop until we find the max\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money > nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult)) {\n return i;\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\nexport function getMaxNumberCoreUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult)) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult)) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult) &&\n player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\nexport function getMaxNumberCacheUpgrades(player: IPlayer, nodeObj: HacknetServer, maxLevel: number): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) &&\n !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))\n ) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\n\nexport function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // If we're at max level, return false\n if (node.level >= (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n if (node.level + sanitizedLevels > (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof HacknetServer && node.maxRam >= HacknetServerConstants.MaxRam) {\n return false;\n }\n\n if (node instanceof HacknetNode && node.ram >= HacknetNodeConstants.MaxRam) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n if (node instanceof HacknetServer) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > HacknetServerConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetServerConstants.MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof HacknetNode) {\n if (node.ram * Math.pow(2, sanitizedLevels) > HacknetNodeConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetNodeConstants.MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // Fail if we're already at max\n if (node.cores >= (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n return false;\n }\n\n // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n if (node.cores + sanitizedLevels > (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCacheUpgrade(player: IPlayer, node: HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof HacknetServer)) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n }\n\n // Fail if we're already at max\n if (node.cache + sanitizedLevels > HacknetServerConstants.MaxCache) {\n const diff = Math.max(0, HacknetServerConstants.MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost, \"hacknet_expenses\");\n node.upgradeCache(sanitizedLevels);\n\n return true;\n}\n\nexport function processHacknetEarnings(player: IPlayer, numCycles: number): number {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof HacknetNode) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player: IPlayer, numCycles: number): number {\n let total = 0;\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player: IPlayer, numCycles: number, nodeObj: HacknetNode): number {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings, \"hacknet\");\n\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player: IPlayer, numCycles: number): number {\n if (!(player.hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should not be HacketNode`);\n const hserver = GetServer(ip);\n if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hashes += h;\n }\n\n player.hashManager.storeHashes(hashes);\n\n return hashes;\n}\n\nexport function updateHashManagerCapacity(player: IPlayer): void {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n const ip = nodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should be string but isn't`);\n const h = GetServer(ip);\n if (!(h instanceof HacknetServer)) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\n\nexport function purchaseHashUpgrade(player: IPlayer, upgName: string, upgTarget: string): boolean {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return false;\n }\n\n // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n if (player.hashManager.upgrade(upgName)) {\n const upg = HashUpgrades[upgName];\n\n switch (upgName) {\n case \"Sell for Money\": {\n player.gainMoney(upg.value, \"hacknet\");\n break;\n }\n case \"Sell for Corporation Funds\": {\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n corp.funds = corp.funds + upg.value;\n break;\n }\n case \"Reduce Minimum Security\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Increase Maximum Money\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMaximumMoney(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Improve Studying\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Improve Gym Training\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Exchange for Corporation Research\": {\n // This will throw if player doesn't have a corporation\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n for (const division of corp.divisions) {\n division.sciResearch.qty += upg.value;\n }\n break;\n }\n case \"Exchange for Bladeburner Rank\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n bladeburner.changeRank(player, upg.value);\n break;\n }\n case \"Exchange for Bladeburner SP\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n bladeburner.skillPoints += upg.value;\n break;\n }\n case \"Generate Coding Contract\": {\n generateRandomContract();\n break;\n }\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n","export const BladeburnerConstants: {\n CityNames: string[];\n CyclesPerSecond: number;\n StaminaGainPerSecond: number;\n BaseStaminaLoss: number;\n MaxStaminaToGainFactor: number;\n DifficultyToTimeFactor: number;\n DiffMultExponentialFactor: number;\n DiffMultLinearFactor: number;\n EffAgiLinearFactor: number;\n EffDexLinearFactor: number;\n EffAgiExponentialFactor: number;\n EffDexExponentialFactor: number;\n BaseRecruitmentTimeNeeded: number;\n PopulationThreshold: number;\n PopulationExponent: number;\n ChaosThreshold: number;\n BaseStatGain: number;\n BaseIntGain: number;\n ActionCountGrowthPeriod: number;\n RankToFactionRepFactor: number;\n RankNeededForFaction: number;\n ContractSuccessesPerLevel: number;\n OperationSuccessesPerLevel: number;\n RanksPerSkillPoint: number;\n ContractBaseMoneyGain: number;\n HrcHpGain: number;\n HrcStaminaGain: number;\n} = {\n CityNames: [\"Aevum\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n CyclesPerSecond: 5, // Game cycle is 200 ms\n\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285, // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000, // Max Stamina is divided by this to get bonus stamina gain\n\n DifficultyToTimeFactor: 10, // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n\n BaseRecruitmentTimeNeeded: 300, // Base time needed (s) to complete a Recruitment action\n\n PopulationThreshold: 1e9, // Population which determines baseline success rate\n PopulationExponent: 0.7, // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50, // City chaos level after which it starts making tasks harder\n\n BaseStatGain: 1, // Base stat gain per second\n BaseIntGain: 0.003, // Base intelligence stat gain\n\n ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value\n\n RankToFactionRepFactor: 2, // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n\n ContractSuccessesPerLevel: 3, // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5, // How many successes you need to level up an op\n\n RanksPerSkillPoint: 3, // How many ranks needed to get 1 Skill Point\n\n ContractBaseMoneyGain: 250e3, // Base Money Gained per contract\n\n HrcHpGain: 2, // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1, // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n};\n","import { IMap } from \"../../types\";\n\nexport const LiteratureNames: IMap = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\",\n};\n","import { Program } from \"./Program\";\nimport { programsMetadata } from \"./data/ProgramsMetadata\";\nimport { IMap } from \"../types\";\n\nexport const Programs: IMap = {};\n\nfor (const params of programsMetadata) {\n Programs[params.key] = new Program(params.name, params.create, params.run);\n}\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companiesMetadata } from \"./data/CompaniesMetadata\";\nimport { Company, IConstructorParams } from \"./Company\";\nimport { IMap } from \"../types\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Companies: IMap = {};\n\nfunction addCompany(params: IConstructorParams): void {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n Companies[params.name] = new Company(params);\n}\n\n// Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\nexport function initCompanies(): void {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies;\n\n // Re-construct all Companies\n Companies = {};\n companiesMetadata.forEach((e) => {\n addCompany(e);\n });\n\n // Reset data\n for (const companyName in Companies) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n if (!(oldCompany instanceof Company)) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n}\n\n// Used to load Companies map from a save\nexport function loadCompanies(saveString: string): void {\n Companies = JSON.parse(saveString, Reviver);\n}\n","import { Reviver } from \"../utils/JSONReviver\";\n\ninterface GangTerritory {\n power: number;\n territory: number;\n}\n\nexport let AllGangs: {\n [key: string]: GangTerritory;\n} = {\n \"Slum Snakes\": {\n power: 1,\n territory: 1 / 7,\n },\n Tetrads: {\n power: 1,\n territory: 1 / 7,\n },\n \"The Syndicate\": {\n power: 1,\n territory: 1 / 7,\n },\n \"The Dark Army\": {\n power: 1,\n territory: 1 / 7,\n },\n \"Speakers for the Dead\": {\n power: 1,\n territory: 1 / 7,\n },\n NiteSec: {\n power: 1,\n territory: 1 / 7,\n },\n \"The Black Hand\": {\n power: 1,\n territory: 1 / 7,\n },\n};\n\nexport function resetGangs(): void {\n AllGangs = {\n \"Slum Snakes\": {\n power: 1,\n territory: 1 / 7,\n },\n Tetrads: {\n power: 1,\n territory: 1 / 7,\n },\n \"The Syndicate\": {\n power: 1,\n territory: 1 / 7,\n },\n \"The Dark Army\": {\n power: 1,\n territory: 1 / 7,\n },\n \"Speakers for the Dead\": {\n power: 1,\n territory: 1 / 7,\n },\n NiteSec: {\n power: 1,\n territory: 1 / 7,\n },\n \"The Black Hand\": {\n power: 1,\n territory: 1 / 7,\n },\n };\n}\n\nexport function loadAllGangs(saveString: string): void {\n AllGangs = JSON.parse(saveString, Reviver);\n}\n","export enum PositionTypes {\n Long = \"L\",\n Short = \"S\",\n}\n","export enum FragmentType {\n // Special fragments for the UI\n None,\n Delete,\n\n // Stats boosting fragments\n HackingChance,\n HackingSpeed,\n HackingMoney,\n HackingGrow,\n Hacking,\n Strength,\n Defense,\n Dexterity,\n Agility,\n Charisma,\n HacknetMoney,\n HacknetCost,\n Rep,\n WorkMoney,\n Crime,\n Bladeburner,\n\n // utility fragments.\n Booster,\n}\n\nexport function Effect(tpe: FragmentType): string {\n switch (tpe) {\n case FragmentType.HackingChance: {\n return \"+x% hack() success chance\";\n break;\n }\n case FragmentType.HackingSpeed: {\n return \"+x% faster hack(), grow(), and weaken()\";\n break;\n }\n case FragmentType.HackingMoney: {\n return \"+x% hack() power\";\n break;\n }\n case FragmentType.HackingGrow: {\n return \"+x% grow() power\";\n break;\n }\n case FragmentType.Hacking: {\n return \"+x% hacking skill\";\n break;\n }\n case FragmentType.Strength: {\n return \"+x% strength skill\";\n break;\n }\n case FragmentType.Defense: {\n return \"+x% defense skill\";\n break;\n }\n case FragmentType.Dexterity: {\n return \"+x% dexterity skill\";\n break;\n }\n case FragmentType.Agility: {\n return \"+x% agility skill\";\n break;\n }\n case FragmentType.Charisma: {\n return \"+x% charisma skill\";\n break;\n }\n case FragmentType.HacknetMoney: {\n return \"+x% hacknet production\";\n break;\n }\n case FragmentType.HacknetCost: {\n return \"-x% all hacknet cost\";\n break;\n }\n case FragmentType.Rep: {\n return \"+x% reputation from factions and companies\";\n break;\n }\n case FragmentType.WorkMoney: {\n return \"+x% work money\";\n break;\n }\n case FragmentType.Crime: {\n return \"+x% crime money\";\n break;\n }\n case FragmentType.Bladeburner: {\n return \"+x% all bladeburner stats\";\n break;\n }\n }\n throw new Error(\"Calling effect for fragment type that doesn't have an effect \" + tpe);\n}\n","import { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { Industry } from \"./Industry\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Material } from \"./Material\";\nimport { Product } from \"./Product\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationUnlockUpgrade } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade } from \"./data/CorporationUpgrades\";\nimport { Cities } from \"../Locations/Cities\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Employee } from \"./Employee\";\nimport { IndustryUpgrades } from \"./IndustryUpgrades\";\nimport { ResearchMap } from \"./ResearchMap\";\n\nexport function NewIndustry(corporation: ICorporation, industry: string, name: string): void {\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n return;\n }\n }\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n if (corporation.funds < cost) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds - cost;\n corporation.divisions.push(\n new Industry({\n corp: corporation,\n name: name,\n type: industry,\n }),\n );\n }\n}\n\nexport function NewCity(corporation: ICorporation, division: IIndustry, city: string): void {\n if (corporation.funds < CorporationConstants.OfficeInitialCost) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds - CorporationConstants.OfficeInitialCost;\n division.offices[city] = new OfficeSpace({\n loc: city,\n size: CorporationConstants.OfficeInitialSize,\n });\n }\n}\n\nexport function UnlockUpgrade(corporation: ICorporation, upgrade: CorporationUnlockUpgrade): void {\n if (corporation.funds < upgrade[1]) {\n throw new Error(\"Insufficient funds\");\n }\n corporation.unlock(upgrade);\n}\n\nexport function LevelUpgrade(corporation: ICorporation, upgrade: CorporationUpgrade): void {\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgrade[0]];\n const cost = baseCost * Math.pow(priceMult, level);\n if (corporation.funds < cost) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\n\nexport function IssueDividends(corporation: ICorporation, percent: number): void {\n if (isNaN(percent) || percent < 0 || percent > CorporationConstants.DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${CorporationConstants.DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\n\nexport function SellMaterial(mat: Material, amt: string, price: string): void {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MPe]/g, \"\"); //Sanitize cost\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n }\n\n //Parse quantity\n amt = amt.toUpperCase();\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, \"1\");\n tempQty = tempQty.replace(/PROD/g, \"1\");\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n if (isNaN(q)) {\n q = 0;\n }\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\n\nexport function SellProduct(product: Product, city: string, amt: string, price: string, all: boolean): void {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell quantity field.\");\n }\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n product.sCost = cost;\n }\n\n // Array of all cities. Used later\n const cities = Object.keys(Cities);\n\n // Parse quantity\n amt = amt.toUpperCase();\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, \"1\");\n temp = temp.replace(/PROD/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric\");\n } else {\n let qty = parseFloat(amt);\n if (isNaN(qty)) {\n qty = 0;\n }\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n }\n}\n\nexport function SetSmartSupply(warehouse: Warehouse, smartSupply: boolean): void {\n warehouse.smartSupplyEnabled = smartSupply;\n}\n\nexport function SetSmartSupplyUseLeftovers(warehouse: Warehouse, material: Material, useLeftover: boolean): void {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name))\n throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name] = useLeftover;\n}\n\nexport function BuyMaterial(material: Material, amt: number): void {\n if (isNaN(amt)) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n material.buy = amt;\n}\n\nexport function AssignJob(employee: Employee, job: string): void {\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\n\nexport function UpgradeOfficeSize(corp: ICorporation, office: OfficeSpace, size: number): void {\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const cost = CorporationConstants.OfficeInitialCost * mult;\n if (corp.funds < cost) return;\n office.size += size;\n corp.funds = corp.funds - cost;\n}\n\nexport function ThrowParty(corp: ICorporation, office: OfficeSpace, costPerEmployee: number): number {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds < totalCost) return 0;\n corp.funds = corp.funds - totalCost;\n let mult = 0;\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\n\nexport function PurchaseWarehouse(corp: ICorporation, division: IIndustry, city: string): void {\n if (corp.funds < CorporationConstants.WarehouseInitialCost) return;\n if (division.warehouses[city] instanceof Warehouse) return;\n division.warehouses[city] = new Warehouse({\n corp: corp,\n industry: division,\n loc: city,\n size: CorporationConstants.WarehouseInitialSize,\n });\n corp.funds = corp.funds - CorporationConstants.WarehouseInitialCost;\n}\n\nexport function UpgradeWarehouse(corp: ICorporation, division: IIndustry, warehouse: Warehouse): void {\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n}\n\nexport function BuyCoffee(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function HireAdVert(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function MakeProduct(\n corp: ICorporation,\n division: IIndustry,\n city: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n): void {\n if (designInvest < 0) {\n designInvest = 0;\n }\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n if (corp.funds < designInvest + marketingInvest) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n const product = new Product({\n name: productName.replace(/[<>]/g, \"\"), //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest,\n });\n if (division.products[product.name] instanceof Product) {\n throw new Error(`You already have a product with this name!`);\n }\n corp.funds = corp.funds - (designInvest + marketingInvest);\n division.products[product.name] = product;\n}\n\nexport function Research(division: IIndustry, researchName: string): void {\n const researchTree = IndustryResearchTrees[division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = ResearchMap[researchName];\n\n if (division.sciResearch.qty < research.cost)\n throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost;\n\n // Get the Node from the Research Tree and set its 'researched' property\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\n\nexport function ExportMaterial(divisionName: string, cityName: string, material: Material, amt: string): void {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\").toUpperCase();\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n const exportObj = { ind: divisionName, city: cityName, amt: sanitizedAmt };\n material.exp.push(exportObj);\n}\n\nexport function CancelExportMaterial(divisionName: string, cityName: string, material: Material, amt: string): void {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt)\n continue;\n material.exp.splice(i, 1);\n break;\n }\n}\n\nexport function LimitProductProduction(product: Product, cityName: string, qty: number): void {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\n\nexport function SetMaterialMarketTA1(material: Material, on: boolean): void {\n material.marketTa1 = on;\n}\n\nexport function SetMaterialMarketTA2(material: Material, on: boolean): void {\n material.marketTa2 = on;\n}\n\nexport function SetProductMarketTA1(product: Product, on: boolean): void {\n product.marketTa1 = on;\n}\n\nexport function SetProductMarketTA2(product: Product, on: boolean): void {\n product.marketTa2 = on;\n}\n","/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nexport enum SleeveTaskType {\n // Same Order as selectable order in UI\n Idle,\n Company,\n Faction,\n Crime,\n Class,\n Gym,\n Recovery,\n Synchro,\n}\n","// Contains an array containing information about the player's source files\n// Array[n] returns what level the player has of Source-File N.\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport const SourceFileFlags: number[] = Array(CONSTANTS.TotalNumBitNodes + 1); // Skip index 0\n\nexport function updateSourceFileFlags(p: IPlayer): void {\n for (let i = 0; i < SourceFileFlags.length; ++i) {\n SourceFileFlags[i] = 0;\n }\n\n for (let i = 0; i < p.sourceFiles.length; ++i) {\n const sf = p.sourceFiles[i];\n SourceFileFlags[sf.n] = sf.lvl;\n }\n}\n","import { Crime } from \"./Crime\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IMap } from \"../types\";\n\nexport const Crimes: IMap = {\n Shoplift: new Crime(\"Shoplift\", CONSTANTS.CrimeShoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n dexterity_exp: 2,\n agility_exp: 2,\n }),\n\n RobStore: new Crime(\"Rob Store\", CONSTANTS.CrimeRobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Mug: new Crime(\"Mug\", CONSTANTS.CrimeMug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5,\n }),\n\n Larceny: new Crime(\"Larceny\", CONSTANTS.CrimeLarceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n DealDrugs: new Crime(\"Deal Drugs\", CONSTANTS.CrimeDrugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n }),\n\n BondForgery: new Crime(\"Bond Forgery\", CONSTANTS.CrimeBondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n\n intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n TraffickArms: new Crime(\"Traffick Arms\", CONSTANTS.CrimeTraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n }),\n\n Homicide: new Crime(\"Homicide\", CONSTANTS.CrimeHomicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n\n kills: 1,\n }),\n\n GrandTheftAuto: new Crime(\"Grand Theft Auto\", CONSTANTS.CrimeGrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n\n intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Kidnap: new Crime(\"Kidnap\", CONSTANTS.CrimeKidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Assassination: new Crime(\"Assassination\", CONSTANTS.CrimeAssassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n\n kills: 1,\n }),\n\n Heist: new Crime(\"Heist\", CONSTANTS.CrimeHeist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n\n intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n};\n","import * as React from \"react\";\n\nexport function trusted(f: () => void): (event: React.MouseEvent) => any {\n return function (event: React.MouseEvent): any {\n if (!event.isTrusted) return;\n f();\n };\n}\n","/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\nimport { CONSTANTS } from \"../Constants\";\n\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { HacknetServerConstants } from \"./data/Constants\";\nimport {\n calculateHashGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateCacheUpgradeCost,\n} from \"./formulas/HacknetServers\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\nexport class HacknetServer extends BaseServer implements IHacknetNode {\n // Cache level. Affects hash Capacity\n cache = 1;\n\n // Number of cores. Improves hash production\n cores = 1;\n\n // Number of hashes that can be stored by this Hacknet Server\n hashCapacity = 0;\n\n // Hashes produced per second\n hashRate = 0;\n\n // Similar to Node level. Improves hash production\n level = 1;\n\n // How long this HacknetServer has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Total number of hashes earned by this server\n totalHashesGenerated = 0;\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = true;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels: number): number {\n return calculateCacheUpgradeCost(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels: number, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels: number, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels: number, costMult: number): number {\n return calculateRamUpgradeCost(this.maxRam, levels, costMult);\n }\n\n // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n this.onlineTimeSeconds += seconds;\n\n const hashes = this.hashRate * seconds;\n this.totalHashesGenerated += hashes;\n\n return hashes;\n }\n\n upgradeCache(levels: number): void {\n this.cache = Math.min(HacknetServerConstants.MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels: number, prodMult: number): void {\n this.cores = Math.min(HacknetServerConstants.MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n this.cpuCores = this.cores;\n }\n\n upgradeLevel(levels: number, prodMult: number): void {\n this.level = Math.min(HacknetServerConstants.MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels: number, prodMult: number): boolean {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n\n return true;\n }\n\n // Whenever a script is run, we must update this server's hash rate\n runScript(script: RunningScript, prodMult?: number): void {\n super.runScript(script);\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateRamUsed(ram: number, player: IPlayer): void {\n super.updateRamUsed(ram, player);\n this.updateHashRate(player.hacknet_node_money_mult);\n }\n\n updateHashCapacity(): void {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult: number): void {\n this.hashRate = calculateHashGainRate(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(\n `Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`,\n false,\n );\n }\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"HacknetServer\", this);\n }\n\n // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HacknetServer {\n return Generic_fromJSON(HacknetServer, value.data);\n }\n}\n\nReviver.constructors.HacknetServer = HacknetServer;\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companyPositionMetadata } from \"./data/CompanyPositionsMetadata\";\nimport { CompanyPosition, IConstructorParams } from \"./CompanyPosition\";\nimport { IMap } from \"../types\";\n\nexport const CompanyPositions: IMap = {};\n\nfunction addCompanyPosition(params: IConstructorParams): void {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n CompanyPositions[params.name] = new CompanyPosition(params);\n}\n\ncompanyPositionMetadata.forEach((e) => {\n addCompanyPosition(e);\n});\n","import { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const StockSymbols: IMap = {};\n\n// Stocks for companies at which you can work\nStockSymbols[LocationName.AevumECorp] = \"ECP\";\nStockSymbols[LocationName.Sector12MegaCorp] = \"MGCP\";\nStockSymbols[LocationName.Sector12BladeIndustries] = \"BLD\";\nStockSymbols[LocationName.AevumClarkeIncorporated] = \"CLRK\";\nStockSymbols[LocationName.VolhavenOmniTekIncorporated] = \"OMTK\";\nStockSymbols[LocationName.Sector12FourSigma] = \"FSIG\";\nStockSymbols[LocationName.ChongqingKuaiGongInternational] = \"KGI\";\nStockSymbols[LocationName.AevumFulcrumTechnologies] = \"FLCM\";\nStockSymbols[LocationName.IshimaStormTechnologies] = \"STM\";\nStockSymbols[LocationName.NewTokyoDefComm] = \"DCOMM\";\nStockSymbols[LocationName.VolhavenHeliosLabs] = \"HLS\";\nStockSymbols[LocationName.NewTokyoVitaLife] = \"VITA\";\nStockSymbols[LocationName.Sector12IcarusMicrosystems] = \"ICRS\";\nStockSymbols[LocationName.Sector12UniversalEnergy] = \"UNV\";\nStockSymbols[LocationName.AevumAeroCorp] = \"AERO\";\nStockSymbols[LocationName.VolhavenOmniaCybersystems] = \"OMN\";\nStockSymbols[LocationName.ChongqingSolarisSpaceSystems] = \"SLRS\";\nStockSymbols[LocationName.NewTokyoGlobalPharmaceuticals] = \"GPH\";\nStockSymbols[LocationName.IshimaNovaMedical] = \"NVMD\";\nStockSymbols[LocationName.AevumWatchdogSecurity] = \"WDS\";\nStockSymbols[LocationName.VolhavenLexoCorp] = \"LXO\";\nStockSymbols[LocationName.AevumRhoConstruction] = \"RHOC\";\nStockSymbols[LocationName.Sector12AlphaEnterprises] = \"APHE\";\nStockSymbols[LocationName.VolhavenSysCoreSecurities] = \"SYSC\";\nStockSymbols[LocationName.VolhavenCompuTek] = \"CTK\";\nStockSymbols[LocationName.AevumNetLinkTechnologies] = \"NTLK\";\nStockSymbols[LocationName.IshimaOmegaSoftware] = \"OMGA\";\nStockSymbols[LocationName.Sector12FoodNStuff] = \"FNS\";\n\n// Stocks for other companies\nStockSymbols[\"Sigma Cosmetics\"] = \"SGC\";\nStockSymbols[\"Joes Guns\"] = \"JGN\";\nStockSymbols[\"Catalyst Ventures\"] = \"CTYS\";\nStockSymbols[\"Microdyne Technologies\"] = \"MDYN\";\nStockSymbols[\"Titan Laboratories\"] = \"TITN\";\n","import { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { Server } from \"./Server/Server\";\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nexport function calculateHackingChance(server: Server, player: IPlayer): number {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance =\n skillChance * difficultyMult * player.hacking_chance_mult * calculateIntelligenceBonus(player.intelligence, 1);\n if (chance > 1) {\n return 1;\n }\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\nexport function calculateHackingExpGain(server: Server, player: IPlayer): number {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * player.hacking_exp_mult * diffFactor;\n\n return expGain * BitNodeMultipliers.HackExpGain;\n}\n\n/**\n * Returns the percentage of money that will be stolen from a server if\n * it is successfully hacked (returns the decimal form, not the actual percent value)\n */\nexport function calculatePercentMoneyHacked(server: Server, player: IPlayer): number {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking - (server.requiredHackingSkill - 1)) / player.hacking;\n const percentMoneyHacked = (difficultyMult * skillMult * player.hacking_money_mult) / balanceFactor;\n if (percentMoneyHacked < 0) {\n return 0;\n }\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked * BitNodeMultipliers.ScriptHackMoney;\n}\n\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\nexport function calculateHackingTime(server: Server, player: IPlayer): number {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff;\n // tslint:disable-next-line\n skillFactor /= player.hacking + baseSkill;\n\n const hackTimeMultiplier = 5;\n const hackingTime =\n (hackTimeMultiplier * skillFactor) /\n (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1));\n\n return hackingTime;\n}\n\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\nexport function calculateGrowTime(server: Server, player: IPlayer): number {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\nexport function calculateWeakenTime(server: Server, player: IPlayer): number {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n","export function isScriptFilename(f: string): boolean {\n return f.endsWith(\".js\") || f.endsWith(\".script\") || f.endsWith(\".ns\");\n}\n","/* Holds IP of Special Servers */\nexport const SpecialServers: {\n [key: string]: string | undefined;\n\n Home: string;\n FulcrumSecretTechnologies: string;\n CyberSecServer: string;\n NiteSecServer: string;\n TheBlackHandServer: string;\n BitRunnersServer: string;\n TheDarkArmyServer: string;\n DaedalusServer: string;\n WorldDaemon: string;\n DarkWeb: string;\n} = {\n Home: \"home\",\n FulcrumSecretTechnologies: \"fulcrumassets\",\n CyberSecServer: \"CSEC\",\n NiteSecServer: \"avmnite-02h\",\n TheBlackHandServer: \"I.I.I.I\",\n BitRunnersServer: \"run4theh111z\",\n TheDarkArmyServer: \".\",\n DaedalusServer: \"The-Cave\",\n WorldDaemon: \"w0r1d_d43m0n\",\n DarkWeb: \"darkweb\",\n};\n","import { Terminal as TTerminal } from \"./Terminal/Terminal\";\n\nexport const Terminal = new TTerminal();\n","import { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { processOrders } from \"./OrderProcessing\";\nimport { Stock } from \"./Stock\";\nimport { TicksPerCycle } from \"./StockMarketConstants\";\nimport { InitStockMetadata } from \"./data/InitStockMetadata\";\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { StockSymbols } from \"./data/StockSymbols\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IMap } from \"../types\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nimport { numeralWrapper } from \".././ui/numeralFormat\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let StockMarket: IStockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n} as IStockMarket; // Maps full stock name -> Stock object\nexport const SymbolToStockMap: IMap = {}; // Maps symbol -> Stock object\n\nexport function placeOrder(\n stock: Stock,\n shares: number,\n price: number,\n type: OrderTypes,\n position: PositionTypes,\n workerScript: WorkerScript | null = null,\n): boolean {\n if (!(stock instanceof Stock)) {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid stock: '${stock}'`);\n } else {\n dialogBoxCreate(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n return false;\n }\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n dialogBoxCreate(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n return false;\n }\n\n const order = new Order(stock.symbol, shares, price, type, position);\n if (StockMarket[\"Orders\"] == null) {\n const orders: IOrderBook = {};\n for (const name in StockMarket) {\n const stk = StockMarket[name];\n if (!(stk instanceof Stock)) {\n continue;\n }\n orders[stk.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n }\n StockMarket[\"Orders\"][stock.symbol].push(order);\n\n // Process to see if it should be executed immediately\n const processOrderRefs = {\n stockMarket: StockMarket as IStockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n processOrders(stock, order.type, order.pos, processOrderRefs);\n\n return true;\n}\n\n// Returns true if successfully cancels an order, false otherwise\ninterface ICancelOrderParams {\n order?: Order;\n pos?: PositionTypes;\n price?: number;\n shares?: number;\n stock?: Stock;\n type?: OrderTypes;\n}\nexport function cancelOrder(params: ICancelOrderParams, workerScript: WorkerScript | null = null): boolean {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n if (params.order && params.order instanceof Order) {\n const order = params.order;\n // An 'Order' object is passed in\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n return false;\n } else if (\n params.stock &&\n params.shares &&\n params.price &&\n params.type &&\n params.pos &&\n params.stock instanceof Stock\n ) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + numeralWrapper.formatMoney(params.price);\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n if (\n params.shares === order.shares &&\n params.price === order.price &&\n params.type === order.type &&\n params.pos === order.pos\n ) {\n stockOrders.splice(i, 1);\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n return true;\n }\n }\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n return false;\n }\n return false;\n}\n\nexport function loadStockMarket(saveString: string): void {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n } else {\n StockMarket = JSON.parse(saveString, Reviver);\n }\n}\n\nexport function deleteStockMarket(): void {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n}\n\nexport function initStockMarket(): void {\n for (const stk in StockMarket) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of InitStockMetadata) {\n const name = metadata.name;\n StockMarket[name] = new Stock(metadata);\n }\n\n const orders: IOrderBook = {};\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = TicksPerCycle;\n}\n\nexport function initSymbolToStockMap(): void {\n for (const name in StockSymbols) {\n if (StockSymbols.hasOwnProperty(name)) {\n const stock = StockMarket[name];\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n const symbol = StockSymbols[name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\n\nfunction stockMarketCycle(): void {\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n\n const roll = Math.random();\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n}\n\n// Stock prices updated every 6 seconds\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / CONSTANTS.MilliPerCycle;\nexport function processStockPrices(numCycles = 1): void {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n }\n\n // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n const timeNow = new Date().getTime();\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate;\n\n // Cycle\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n --StockMarket.ticksUntilCycle;\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n let av = (v * stock.mv) / 100;\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n stock.b = false;\n }\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2);\n\n // Shares required for price movement gradually approaches max over time\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\n\nexport function initStockMarketFnForReact(): void {\n initStockMarket();\n initSymbolToStockMap();\n}\n\nexport const eventEmitterForUiReset = new EventEmitter<[]>();\n","import { IMap } from \"../../types\";\n\n/**\n * Keyboard key codes\n */\nexport const KEY: IMap = {\n CTRL: 17,\n DOWNARROW: 40,\n ENTER: 13,\n ESC: 27,\n TAB: 9,\n UPARROW: 38,\n\n \"0\": 48,\n \"1\": 49,\n \"2\": 50,\n \"3\": 51,\n \"4\": 52,\n \"5\": 53,\n \"6\": 54,\n \"7\": 55,\n \"8\": 56,\n \"9\": 57,\n\n A: 65,\n B: 66,\n C: 67,\n D: 68,\n E: 69,\n F: 70,\n G: 71,\n H: 72,\n I: 73,\n J: 74,\n K: 75,\n L: 76,\n M: 77,\n N: 78,\n O: 79,\n P: 80,\n Q: 81,\n R: 82,\n S: 83,\n T: 84,\n U: 85,\n V: 86,\n W: 87,\n X: 88,\n Y: 89,\n Z: 90,\n};\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\n\nexport function MoneyRate({ money }: { money: number }): JSX.Element {\n return ;\n}\n","import { codingContractTypesMetadata, DescriptionFunc, GeneratorFunc, SolverFunc } from \"./data/codingcontracttypes\";\n\nimport { IMap } from \"./types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { CodingContractEvent } from \"./ui/React/CodingContractModal\";\n\n/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */\n\n/* Represents different types of problems that a Coding Contract can have */\nclass CodingContractType {\n /**\n * Function that generates a description of the problem\n */\n desc: DescriptionFunc;\n\n /**\n * Number that generally represents the problem's difficulty. Bigger numbers = harder\n */\n difficulty: number;\n\n /**\n * A function that randomly generates a valid 'data' for the problem\n */\n generate: GeneratorFunc;\n\n /**\n * Name of the type of problem\n */\n name: string;\n\n /**\n * The maximum number of tries the player gets on this kind of problem before it self-destructs\n */\n numTries: number;\n\n /**\n * Stores a function that checks if the provided answer is correct\n */\n solver: SolverFunc;\n\n constructor(\n name: string,\n desc: DescriptionFunc,\n gen: GeneratorFunc,\n solver: SolverFunc,\n diff: number,\n numTries: number,\n ) {\n this.name = name;\n this.desc = desc;\n this.generate = gen;\n this.solver = solver;\n this.difficulty = diff;\n this.numTries = numTries;\n }\n}\n\n/* Contract Types */\n// tslint:disable-next-line\nexport const CodingContractTypes: IMap = {};\n\nfor (const md of codingContractTypesMetadata) {\n // tslint:disable-next-line\n CodingContractTypes[md.name] = new CodingContractType(\n md.name,\n md.desc,\n md.gen,\n md.solver,\n md.difficulty,\n md.numTries,\n );\n}\n\n/**\n * Enum representing the different types of rewards a Coding Contract can give\n */\nexport enum CodingContractRewardType {\n FactionReputation,\n FactionReputationAll,\n CompanyReputation,\n Money, // This must always be the last reward type\n}\n\n/**\n * Enum representing the result when trying to solve the Contract\n */\nexport enum CodingContractResult {\n Success,\n Failure,\n Cancelled,\n}\n\n/**\n * A class that represents the type of reward a contract gives\n */\nexport interface ICodingContractReward {\n /* Name of Company/Faction name for reward, if applicable */\n name?: string;\n type: CodingContractRewardType;\n}\n\n/**\n * A Coding Contract is a file that poses a programming-related problem to the Player.\n * The player receives a reward if the problem is solved correctly\n */\nexport class CodingContract {\n /* Relevant data for the contract's problem */\n data: any;\n\n /* Contract's filename */\n fn: string;\n\n /* Describes the reward given if this Contract is solved. The reward is actually\n processed outside of this file */\n reward: ICodingContractReward | null;\n\n /* Number of times the Contract has been attempted */\n tries = 0;\n\n /* String representing the contract's type. Must match type in ContractTypes */\n type: string;\n\n constructor(fn = \"\", type = \"Find Largest Prime Factor\", reward: ICodingContractReward | null = null) {\n this.fn = fn;\n if (!this.fn.endsWith(\".cct\")) {\n this.fn += \".cct\";\n }\n\n // tslint:disable-next-line\n if (CodingContractTypes[type] == null) {\n throw new Error(`Error: invalid contract type: ${type} please contact developer`);\n }\n\n this.type = type;\n this.data = CodingContractTypes[type].generate();\n this.reward = reward;\n }\n\n getData(): any {\n return this.data;\n }\n\n getDescription(): string {\n return CodingContractTypes[this.type].desc(this.data);\n }\n\n getDifficulty(): number {\n return CodingContractTypes[this.type].difficulty;\n }\n\n getMaxNumTries(): number {\n return CodingContractTypes[this.type].numTries;\n }\n\n getType(): string {\n return CodingContractTypes[this.type].name;\n }\n\n isSolution(solution: string): boolean {\n return CodingContractTypes[this.type].solver(this.data, solution);\n }\n\n /**\n * Creates a popup to prompt the player to solve the problem\n */\n async prompt(): Promise {\n return new Promise((resolve) => {\n const props = {\n c: this,\n onClose: () => {\n resolve(CodingContractResult.Cancelled);\n },\n onAttempt: (val: string) => {\n if (this.isSolution(val)) {\n resolve(CodingContractResult.Success);\n } else {\n resolve(CodingContractResult.Failure);\n }\n },\n };\n CodingContractEvent.emit(props);\n });\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"CodingContract\", this);\n }\n\n /**\n * Initiatizes a CodingContract from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CodingContract {\n return Generic_fromJSON(CodingContract, value.data);\n }\n}\n\nReviver.constructors.CodingContract = CodingContract;\n","export enum OrderTypes {\n LimitBuy = \"Limit Buy Order\",\n LimitSell = \"Limit Sell Order\",\n StopBuy = \"Stop Buy Order\",\n StopSell = \"Stop Sell Order\",\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n reputation: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Reputation({ reputation }: { reputation: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n \n {typeof reputation === \"number\" ? numeralWrapper.formatReputation(reputation) : reputation}\n \n );\n}\n","import { Reviver } from \"../utils/JSONReviver\";\n\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { StaneksGift } from \"./StaneksGift\";\n\nexport let staneksGift: IStaneksGift = new StaneksGift();\n\nexport function loadStaneksGift(saveString: string): void {\n if (saveString) {\n staneksGift = JSON.parse(saveString, Reviver);\n } else {\n staneksGift = new StaneksGift();\n }\n}\n","import { isString } from \"./utils/helpers/isString\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\n\nexport function netscriptDelay(time: number, workerScript: WorkerScript): Promise {\n return new Promise(function (resolve) {\n workerScript.delay = window.setTimeout(() => {\n workerScript.delay = null;\n resolve();\n }, time);\n workerScript.delayResolve = resolve;\n });\n}\n\nexport function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): string {\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);\n }\n\n return \"|DELIMITER|\" + server.hostname + \"|DELIMITER|\" + workerScript.name + \"|DELIMITER|\" + msg;\n}\n\nexport function resolveNetscriptRequestedThreads(\n workerScript: WorkerScript,\n functionName: string,\n requestedThreads: number,\n): number {\n const threads = workerScript.scriptRef.threads;\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n const requestedThreadsAsInt = requestedThreads | 0;\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`,\n );\n }\n if (requestedThreads > threads) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`,\n );\n }\n return requestedThreadsAsInt;\n}\n\nexport function isScriptErrorMessage(msg: string): boolean {\n if (!isString(msg)) {\n return false;\n }\n const splitMsg = msg.split(\"|DELIMITER|\");\n if (splitMsg.length != 4) {\n return false;\n }\n return true;\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IEngine } from \"../IEngine\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { saveObject } from \"../SaveObject\";\nimport { onExport } from \"../ExportBonus\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { ITutorial } from \"../InteractiveTutorial\";\nimport { InteractiveTutorialRoot } from \"./InteractiveTutorial/InteractiveTutorialRoot\";\nimport { ITutorialEvents } from \"./InteractiveTutorial/ITutorialEvents\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { dialogBoxCreate } from \"./React/DialogBox\";\nimport { GetAllServers } from \"../Server/AllServers\";\nimport { Factions } from \"../Faction/Factions\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport {\n cancelOrder,\n eventEmitterForUiReset,\n initStockMarketFnForReact,\n placeOrder,\n StockMarket,\n} from \"../StockMarket/StockMarket\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\n\nimport { Page, IRouter } from \"./Router\";\nimport { Overview } from \"./React/Overview\";\nimport { SidebarRoot } from \"../Sidebar/ui/SidebarRoot\";\nimport { AugmentationsRoot } from \"../Augmentation/ui/AugmentationsRoot\";\nimport { DevMenuRoot } from \"../DevMenu\";\nimport { BladeburnerRoot } from \"../Bladeburner/ui/BladeburnerRoot\";\nimport { GangRoot } from \"../Gang/ui/GangRoot\";\nimport { CorporationRoot } from \"../Corporation/ui/CorporationRoot\";\nimport { InfiltrationRoot } from \"../Infiltration/ui/InfiltrationRoot\";\nimport { ResleeveRoot } from \"../PersonObjects/Resleeving/ui/ResleeveRoot\";\nimport { WorkInProgressRoot } from \"./WorkInProgressRoot\";\nimport { GameOptionsRoot } from \"../ui/React/GameOptionsRoot\";\nimport { SleeveRoot } from \"../PersonObjects/Sleeve/ui/SleeveRoot\";\nimport { HacknetRoot } from \"../Hacknet/ui/HacknetRoot\";\nimport { GenericLocation } from \"../Locations/ui/GenericLocation\";\nimport { LocationCity } from \"../Locations/ui/City\";\nimport { ProgramsRoot } from \"../Programs/ui/ProgramsRoot\";\nimport { Root as ScriptEditorRoot } from \"../ScriptEditor/ui/ScriptEditorRoot\";\nimport { MilestonesRoot } from \"../Milestones/ui/MilestonesRoot\";\nimport { TerminalRoot } from \"../Terminal/ui/TerminalRoot\";\nimport { TutorialRoot } from \"../Tutorial/ui/TutorialRoot\";\nimport { ActiveScriptsRoot } from \"../ui/ActiveScripts/ActiveScriptsRoot\";\nimport { FactionsRoot } from \"../Faction/ui/FactionsRoot\";\nimport { FactionRoot } from \"../Faction/ui/FactionRoot\";\nimport { CharacterStats } from \"./CharacterStats\";\nimport { TravelAgencyRoot } from \"../Locations/ui/TravelAgencyRoot\";\nimport { StockMarketRoot } from \"../StockMarket/ui/StockMarketRoot\";\nimport { BitverseRoot } from \"../BitNode/ui/BitverseRoot\";\nimport { StaneksGiftRoot } from \"../CotMG/ui/StaneksGiftRoot\";\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { CharacterOverview } from \"./React/CharacterOverview\";\nimport { BladeburnerCinematic } from \"../Bladeburner/ui/BladeburnerCinematic\";\nimport { workerScripts } from \"../Netscript/WorkerScripts\";\nimport { Unclickable } from \"../Exploits/Unclickable\";\nimport { Snackbar, SnackbarProvider } from \"./React/Snackbar\";\nimport { LogBoxManager } from \"./React/LogBoxManager\";\nimport { AlertManager } from \"./React/AlertManager\";\nimport { PromptManager } from \"./React/PromptManager\";\nimport { InvitationModal } from \"../Faction/ui/InvitationModal\";\n\nimport { enterBitNode } from \"../RedPill\";\nimport { Context } from \"./Context\";\nimport { RecoveryMode, RecoveryRoot } from \"./React/RecoveryRoot\";\n\nconst htmlLocation = location;\n\ninterface IProps {\n terminal: ITerminal;\n player: IPlayer;\n engine: IEngine;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n \"-ms-overflow-style\": \"none\" /* for Internet Explorer, Edge */,\n \"scrollbar-width\": \"none\" /* for Firefox */,\n margin: theme.spacing(0),\n },\n }),\n);\n\nlet filename = \"\";\nlet code = \"\";\n\nexport let Router: IRouter = {\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n toActiveScripts: () => {\n throw new Error(\"Router called before initialization\");\n },\n toAugmentations: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBitVerse: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburner: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStats: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCity: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCorporation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCreateProgram: () => {\n throw new Error(\"Router called before initialization\");\n },\n toDevMenu: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFaction: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFactions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGameOptions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGang: () => {\n throw new Error(\"Router called before initialization\");\n },\n toHacknetNodes: () => {\n throw new Error(\"Router called before initialization\");\n },\n toInfiltration: () => {\n throw new Error(\"Router called before initialization\");\n },\n toJob: () => {\n throw new Error(\"Router called before initialization\");\n },\n toMilestones: () => {\n throw new Error(\"Router called before initialization\");\n },\n toResleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toScriptEditor: () => {\n throw new Error(\"Router called before initialization\");\n },\n toSleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStockMarket: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTerminal: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTravel: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTutorial: () => {\n throw new Error(\"Router called before initialization\");\n },\n toWork: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburnerCinematic: () => {\n throw new Error(\"Router called before initialization\");\n },\n toLocation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStaneksGift: () => {\n throw new Error(\"Router called before initialization\");\n },\n};\n\nfunction determineStartPage(player: IPlayer): Page {\n if (RecoveryMode) return Page.Recovery;\n if (player.isWorking) return Page.Work;\n return Page.Terminal;\n}\n\nexport function GameRoot({ player, engine, terminal }: IProps): React.ReactElement {\n const classes = useStyles();\n const [page, setPage] = useState(determineStartPage(player));\n const setRerender = useState(0)[1];\n const [faction, setFaction] = useState(\n player.currentWorkFactionName ? Factions[player.currentWorkFactionName] : (undefined as unknown as Faction),\n );\n if (faction === undefined && page === Page.Faction)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [flume, setFlume] = useState(false);\n const [quick, setQuick] = useState(false);\n const [location, setLocation] = useState(undefined as unknown as Location);\n if (location === undefined && (page === Page.Infiltration || page === Page.Location || page === Page.Job))\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [cinematicText, setCinematicText] = useState(\"\");\n\n function rerender(): void {\n setRerender((old) => old + 1);\n }\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n\n function killAllScripts(): void {\n for (const server of GetAllServers()) {\n server.runningScripts = [];\n }\n saveObject.saveGame();\n setTimeout(() => htmlLocation.reload(), 2000);\n }\n\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(Page.ActiveScripts),\n toAugmentations: () => setPage(Page.Augmentations),\n toBladeburner: () => setPage(Page.Bladeburner),\n toStats: () => setPage(Page.Stats),\n toCorporation: () => setPage(Page.Corporation),\n toCreateProgram: () => setPage(Page.CreateProgram),\n toDevMenu: () => setPage(Page.DevMenu),\n toFaction: (faction?: Faction) => {\n setPage(Page.Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(Page.Factions),\n toGameOptions: () => setPage(Page.Options),\n toGang: () => setPage(Page.Gang),\n toHacknetNodes: () => setPage(Page.Hacknet),\n toMilestones: () => setPage(Page.Milestones),\n toResleeves: () => setPage(Page.Resleeves),\n toScriptEditor: (fn: string, c: string) => {\n filename = fn;\n code = c;\n setPage(Page.ScriptEditor);\n },\n toSleeves: () => setPage(Page.Sleeves),\n toStockMarket: () => setPage(Page.StockMarket),\n toTerminal: () => setPage(Page.Terminal),\n toTutorial: () => setPage(Page.Tutorial),\n toJob: () => {\n setLocation(Locations[player.companyName]);\n setPage(Page.Job);\n },\n toCity: () => {\n setPage(Page.City);\n },\n toTravel: () => {\n player.gotoLocation(LocationName.TravelAgency);\n setPage(Page.Travel);\n },\n toBitVerse: (flume: boolean, quick: boolean) => {\n setFlume(flume);\n setQuick(quick);\n setPage(Page.BitVerse);\n },\n toInfiltration: (location: Location) => {\n setLocation(location);\n setPage(Page.Infiltration);\n },\n toWork: () => setPage(Page.Work),\n toBladeburnerCinematic: () => {\n setPage(Page.BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: (location: Location) => {\n setLocation(location);\n setPage(Page.Location);\n },\n toStaneksGift: () => {\n setPage(Page.StaneksGift);\n },\n };\n\n useEffect(() => {\n filename = \"\";\n code = \"\";\n if (page !== Page.Terminal) window.scrollTo(0, 0);\n });\n\n return (\n \n \n \n \n {!ITutorial.isRunning ? (\n saveObject.saveGame()} killScripts={killAllScripts} />\n ) : (\n \n )}\n \n {page === Page.Recovery ? (\n \n ) : page === Page.BitVerse ? (\n \n ) : page === Page.Infiltration ? (\n \n ) : page === Page.BladeburnerCinematic ? (\n \n ) : page === Page.Work ? (\n \n ) : (\n \n \n \n {page === Page.Terminal ? (\n \n ) : page === Page.Sleeves ? (\n \n ) : page === Page.StaneksGift ? (\n \n ) : page === Page.Stats ? (\n \n ) : page === Page.ScriptEditor ? (\n \n ) : page === Page.ActiveScripts ? (\n \n ) : page === Page.Hacknet ? (\n \n ) : page === Page.CreateProgram ? (\n \n ) : page === Page.Factions ? (\n \n ) : page === Page.Faction ? (\n \n ) : page === Page.Milestones ? (\n \n ) : page === Page.Tutorial ? (\n \n ) : page === Page.DevMenu ? (\n \n ) : page === Page.Gang ? (\n \n ) : page === Page.Corporation ? (\n \n ) : page === Page.Bladeburner ? (\n \n ) : page === Page.Resleeves ? (\n \n ) : page === Page.Travel ? (\n \n ) : page === Page.StockMarket ? (\n \n ) : page === Page.City ? (\n \n ) : page === Page.Job ? (\n \n ) : page === Page.Location ? (\n \n ) : page === Page.Options ? (\n saveObject.saveGame()}\n export={() => saveObject.exportGame()}\n forceKill={killAllScripts}\n softReset={() => {\n dialogBoxCreate(\"Soft Reset!\");\n prestigeAugmentation();\n Router.toTerminal();\n }}\n />\n ) : page === Page.Augmentations ? (\n {\n saveObject.exportGame();\n onExport(player);\n }}\n installAugmentationsFn={() => {\n installAugmentations();\n Router.toTerminal();\n }}\n />\n ) : (\n <>\n Cannot load\n \n )}\n \n \n )}\n \n \n \n \n \n \n \n \n \n );\n}\n","/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains functions that deal only with that string manipulation.\n * Functions that need to access/process Server-related things can be\n * found in ./DirectoryServerHelpers.ts\n */\n\n/**\n * Removes leading forward slash (\"/\") from a string.\n */\nexport function removeLeadingSlash(s: string): string {\n if (s.startsWith(\"/\")) {\n return s.slice(1);\n }\n\n return s;\n}\n\n/**\n * Removes trailing forward slash (\"/\") from a string.\n * Note that this will also remove the slash if it is the leading slash (i.e. if s = \"/\")\n */\nexport function removeTrailingSlash(s: string): string {\n if (s.endsWith(\"/\")) {\n return s.slice(0, -1);\n }\n\n return s;\n}\n\n/**\n * Checks whether a string is a valid filename. Only used for the filename itself,\n * not the entire filepath\n */\nfunction isValidFilename(filename: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs\n // Must have a file extension\n const regex = /^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\\d+(?:\\.\\d*)?%-INC)?$/;\n\n // match() returns null if no match is found\n return filename.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory name. Only used for the directory itself,\n * not an entire path\n */\nfunction isValidDirectoryName(name: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs.\n // Name can begin with a single period, but otherwise cannot have any\n const regex = /^.?[a-zA-Z0-9_-]+$/;\n\n // match() returns null if no match is found\n return name.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory path.\n * This only checks if it has the proper formatting. It does NOT check\n * if the directories actually exist on Terminal\n */\nexport function isValidDirectoryPath(path: string): boolean {\n let t_path: string = path;\n\n if (t_path.length === 0) {\n return false;\n }\n if (t_path.length === 1) {\n return t_path === \"/\";\n }\n\n // A full path must have a leading slash, but we'll ignore it for the checks\n if (t_path.startsWith(\"/\")) {\n t_path = t_path.slice(1);\n } else {\n return false;\n }\n\n // Trailing slash does not matter\n t_path = removeTrailingSlash(t_path);\n\n // Check that every section of the path is a valid directory name\n const dirs = t_path.split(\"/\");\n for (const dir of dirs) {\n // Special case, \".\" and \"..\" are valid for path\n if (dir === \".\" || dir === \"..\") {\n continue;\n }\n if (!isValidDirectoryName(dir)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Checks whether a string is a valid file path. This only checks if it has the\n * proper formatting. It dose NOT check if the file actually exists on Terminal\n */\nexport function isValidFilePath(path: string): boolean {\n if (path == null || typeof path !== \"string\") {\n return false;\n }\n const t_path = path;\n\n // Impossible for filename to have less than length of 3\n if (t_path.length < 3) {\n return false;\n }\n\n // Full filepath can't end with trailing slash because it must be a file\n if (t_path.endsWith(\"/\")) {\n return false;\n }\n\n // Everything after the last forward slash is the filename. Everything before\n // it is the file path\n const fnSeparator = t_path.lastIndexOf(\"/\");\n if (fnSeparator === -1) {\n return isValidFilename(t_path);\n }\n\n const fn = t_path.slice(fnSeparator + 1);\n const dirPath = t_path.slice(0, fnSeparator + 1);\n\n return isValidDirectoryPath(dirPath) && isValidFilename(fn);\n}\n\n/**\n * Returns a formatted string for the first parent directory in a filepath. For example:\n * /home/var/test/ -> home/\n * If there is no first parent directory, then it returns \"/\" for root\n */\nexport function getFirstParentDirectory(path: string): string {\n let t_path = path;\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n if (t_path.lastIndexOf(\"/\") === -1) {\n return \"/\";\n }\n\n const dirs = t_path.split(\"/\");\n if (dirs.length === 0) {\n return \"/\";\n }\n\n return dirs[0] + \"/\";\n}\n\n/**\n * Given a filepath, returns a formatted string for all of the parent directories\n * in that filepath. For example:\n * /home/var/tes -> home/var/\n * /home/var/test/ -> home/var/test/\n * If there are no parent directories, it returns the empty string\n */\nexport function getAllParentDirectories(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return \"\";\n }\n\n return t_path.slice(0, lastSlash + 1);\n}\n\n/**\n * Checks if a file path refers to a file in the root directory.\n */\nexport function isInRootDirectory(path: string): boolean {\n if (!isValidFilePath(path)) {\n return false;\n }\n if (path == null || path.length === 0) {\n return false;\n }\n\n return path.lastIndexOf(\"/\") <= 0;\n}\n\n/**\n * Evaluates a directory path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateDirectoryPath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidDirectoryPath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\n/**\n * Evaluates a file path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateFilePath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidFilePath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\nexport function areFilesEqual(f0: string, f1: string): boolean {\n if (!f0.startsWith(\"/\")) f0 = \"/\" + f0;\n if (!f1.startsWith(\"/\")) f1 = \"/\" + f1;\n return f0 === f1;\n}\n","import { Augmentations } from \"../Augmentation/Augmentations\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { PlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nimport { Faction } from \"./Faction\";\nimport { Factions } from \"./Factions\";\nimport { Player } from \"../Player\";\nimport { Settings } from \"../Settings/Settings\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../PersonObjects/formulas/reputation\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { InvitationEvent } from \"./ui/InvitationModal\";\n\nexport function inviteToFaction(faction: Faction): void {\n Player.receiveInvite(faction.name);\n faction.alreadyInvited = true;\n if (!Settings.SuppressFactionInvites) {\n InvitationEvent.emit(faction);\n }\n}\n\nexport function joinFaction(faction: Faction): void {\n if (faction.isMember) return;\n faction.isMember = true;\n Player.factions.push(faction.name);\n const factionInfo = faction.getInfo();\n\n //Determine what factions you are banned from now that you have joined this faction\n for (const i in factionInfo.enemies) {\n const enemy = factionInfo.enemies[i];\n if (Factions[enemy] instanceof Faction) {\n Factions[enemy].isBanned = true;\n }\n }\n for (let i = 0; i < Player.factionInvitations.length; ++i) {\n if (Player.factionInvitations[i] == faction.name || Factions[Player.factionInvitations[i]].isBanned) {\n Player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\n\n//Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\nexport function hasAugmentationPrereqs(aug: Augmentation): boolean {\n let hasPrereqs = true;\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = Augmentations[aug.prereqs[i]];\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n if (prereqAug.owned === false) {\n hasPrereqs = false;\n\n // Check if the aug is purchased\n for (let j = 0; j < Player.queuedAugmentations.length; ++j) {\n if (Player.queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\n\nexport function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = false): string {\n const factionInfo = fac.getInfo();\n const hasPrereqs = hasAugmentationPrereqs(aug);\n if (!hasPrereqs) {\n const txt =\n \"You must first purchase or install \" + aug.prereqs.join(\",\") + \" before you can \" + \"purchase this one.\";\n if (sing) {\n return txt;\n } else {\n dialogBoxCreate(txt);\n }\n } else if (aug.baseCost !== 0 && Player.money < aug.baseCost * factionInfo.augmentationPriceMult) {\n const txt = \"You don't have enough money to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n const txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (aug.baseCost === 0 || Player.money >= aug.baseCost * factionInfo.augmentationPriceMult) {\n const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n Player.queuedAugmentations.push(queuedAugmentation);\n\n Player.loseMoney(aug.baseCost * factionInfo.augmentationPriceMult, \"augmentations\");\n\n // If you just purchased Neuroflux Governor, recalculate the cost\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n let nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n const mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * BitNodeMultipliers.AugmentationRepCost;\n aug.baseCost = 750e3 * mult * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < Player.queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n }\n }\n\n for (const name in Augmentations) {\n if (Augmentations.hasOwnProperty(name)) {\n Augmentations[name].baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else {\n if (!Settings.SuppressBuyAugmentationConfirmation) {\n dialogBoxCreate(\n \"You purchased \" +\n aug.name +\n \". It's enhancements will not take \" +\n \"effect until they are installed. To install your augmentations, go to the \" +\n \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" +\n \"augmentations will now be more expensive.\",\n );\n }\n }\n } else {\n dialogBoxCreate(\n \"Hmm, something went wrong when trying to purchase an Augmentation. \" +\n \"Please report this to the game developer with an explanation of how to \" +\n \"reproduce this.\",\n );\n }\n return \"\";\n}\n\nexport function getNextNeurofluxLevel(): number {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = Player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n}\n\nexport function processPassiveFactionRepGain(numCycles: number): void {\n for (const name in Factions) {\n if (name === Player.currentWorkFactionName) continue;\n if (!Factions.hasOwnProperty(name)) continue;\n const faction = Factions[name];\n if (!faction.isMember) continue;\n // No passive rep for special factions\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No passive rep for gangs.\n if (Player.getGangName() === name) continue;\n // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01);\n // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n\n faction.playerReputation += rate * numCycles * Player.faction_rep_mult * BitNodeMultipliers.FactionPassiveRepGain;\n }\n}\n","/*\nThe game cannot block every possible exploits. Specially since one of them is\nthat you can just edit your save file and that's impragmatic to prevent.\n\nSo instead we have source file minus 1. It is not obtained by destroying a\nBitNode but instead it is awarded when the player finds innovative ways to break\nthe game, this serves 2 purpose, [one] the developpers don't have to spend time\ntrying to implement anti-cheat measures and [two] finding ways to break a\nhacking game is very much in the spirit of the game.\nSource-File minus 1 is extremely weak because it can be fully level up quickly.\n*/\n\nexport enum Exploit {\n Bypass = \"Bypass\",\n PrototypeTampering = \"PrototypeTampering\",\n Unclickable = \"Unclickable\",\n UndocumentedFunctionCall = \"UndocumentedFunctionCall\",\n TimeCompression = \"TimeCompression\",\n RealityAlteration = \"RealityAlteration\",\n N00dles = \"N00dles\",\n // To the players reading this. Yes you're supposed to add EditSaveFile by\n // editing your save file, yes you could add them all, no we don't care\n // that's not the point.\n EditSaveFile = \"EditSaveFile\",\n}\n\nconst names: {\n [key: string]: string;\n} = {\n Bypass: \"by circumventing the ram cost of document.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n TimeCompression: \"by compressing time.\",\n Unclickable: \"by clicking the unclickable.\",\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n RealityAlteration: \"by altering reality to suit your whims.\",\n N00dles: \"by harnessing the power of the n00dles.\",\n};\n\nexport function ExploitName(exploit: string): string {\n return names[exploit];\n}\n\nexport function sanitizeExploits(exploits: Exploit[]): Exploit[] {\n exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));\n return [...new Set(exploits)];\n}\n","// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\nimport { Research } from \"../Research\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { ResearchTree, Node } from \"../ResearchTree\";\n\nfunction makeNode(name: string): Node {\n const research: Research | null = ResearchMap[name];\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new Node({ text: research.name, cost: research.cost });\n}\n\n// Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\nfunction createBaseResearchTreeNodes(): Node {\n const rootNode: Node = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew: Node = makeNode(\"AutoBrew\");\n const autoParty: Node = makeNode(\"AutoPartyManager\");\n const autoDrugs: Node = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing: Node = makeNode(\"Bulk Purchasing\");\n const cph4: Node = makeNode(\"CPH4 Injections\");\n const drones: Node = makeNode(\"Drones\");\n const dronesAssembly: Node = makeNode(\"Drones - Assembly\");\n const dronesTransport: Node = makeNode(\"Drones - Transport\");\n const goJuice: Node = makeNode(\"Go-Juice\");\n const hrRecruitment: Node = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining: Node = makeNode(\"HRBuddy-Training\");\n const joywire: Node = makeNode(\"JoyWire\");\n const marketta1: Node = makeNode(\"Market-TA.I\");\n const marketta2: Node = makeNode(\"Market-TA.II\");\n const overclock: Node = makeNode(\"Overclock\");\n const scAssemblers: Node = makeNode(\"Self-Correcting Assemblers\");\n const stimu: Node = makeNode(\"Sti.mu\");\n\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n\n hrRecruitment.addChild(hrTraining);\n\n marketta1.addChild(marketta2);\n\n overclock.addChild(stimu);\n\n rootNode.addChild(autoBrew);\n rootNode.addChild(autoParty);\n rootNode.addChild(autoDrugs);\n rootNode.addChild(bulkPurchasing);\n rootNode.addChild(drones);\n rootNode.addChild(hrRecruitment);\n rootNode.addChild(joywire);\n rootNode.addChild(marketta1);\n rootNode.addChild(overclock);\n rootNode.addChild(scAssemblers);\n\n return rootNode;\n}\n\nexport function getBaseResearchTreeCopy(): ResearchTree {\n const baseResearchTree: ResearchTree = new ResearchTree();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n\n return baseResearchTree;\n}\n\n// Base Research Tree for Industry's that make products\nexport function getProductIndustryResearchTreeCopy(): ResearchTree {\n const researchTree: ResearchTree = new ResearchTree();\n const root = createBaseResearchTreeNodes();\n\n const upgradeFulcrum = makeNode(\"uPgrade: Fulcrum\");\n const upgradeCapacity1 = makeNode(\"uPgrade: Capacity.I\");\n const upgradeCapacity2 = makeNode(\"uPgrade: Capacity.II\");\n const upgradeDashboard = makeNode(\"uPgrade: Dashboard\");\n\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n\n researchTree.setRoot(root);\n\n return researchTree;\n}\n","/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nfunction uuidv4(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport class EventEmitter {\n subscribers: { [key: string]: (...args: [...T]) => void | undefined } = {};\n\n subscribe(s: (...args: [...T]) => void): () => void {\n let uuid = uuidv4();\n while (this.subscribers[uuid] !== undefined) uuid = uuidv4();\n this.subscribers[uuid] = s;\n\n return () => {\n delete this.subscribers[uuid];\n };\n }\n\n emit(...args: [...T]): void {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n if (sub === undefined) continue;\n\n sub(...args);\n }\n }\n}\n","import { GetServer, createUniqueRandomIp, ipExists } from \"./AllServers\";\nimport { Server, IConstructorParams } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { calculateServerGrowth } from \"./formulas/grow\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Programs } from \"../Programs/Programs\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\n\nimport { isValidNumber } from \"../utils/helpers/isValidNumber\";\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\nexport function safetlyCreateUniqueServer(params: IConstructorParams): Server {\n if (params.ip != null && ipExists(params.ip)) {\n params.ip = createUniqueRandomIp();\n }\n\n if (GetServer(params.hostname) != null) {\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n let hostname: string = params.hostname;\n for (let i = 0; i < 200; ++i) {\n hostname = `${params.hostname}-${i}`;\n if (GetServer(hostname) == null) {\n break;\n }\n }\n params.hostname = hostname;\n }\n\n return new Server(params);\n}\n\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowth(server: Server, growth: number, p: IPlayer, cores = 1): number {\n let ajdGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n if (ajdGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n ajdGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n\n const coreBonus = 1 + (cores - 1) / 16;\n const cycles =\n Math.log(growth) /\n (Math.log(ajdGrowthRate) *\n p.hacking_grow_mult *\n serverGrowthPercentage *\n BitNodeMultipliers.ServerGrowthRate *\n coreBonus);\n\n return cycles;\n}\n\n//Applied server growth for a single server. Returns the percentage growth\nexport function processSingleServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n let serverGrowth = calculateServerGrowth(server, threads, p, cores);\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n server.moneyAvailable *= serverGrowth;\n\n // in case of data corruption\n if (isValidNumber(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // cap at max\n if (isValidNumber(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // if there was any growth at all, increase security\n if (oldMoneyAvailable !== server.moneyAvailable) {\n //Growing increases server security twice as much as hacking\n let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p, cores);\n usedCycles = Math.min(Math.max(0, Math.ceil(usedCycles)), threads);\n server.fortify(2 * CONSTANTS.ServerFortifyAmount * usedCycles);\n }\n return server.moneyAvailable / oldMoneyAvailable;\n}\n\nexport function prestigeHomeComputer(homeComp: Server): void {\n const hasBitflume = homeComp.programs.includes(Programs.BitFlume.name);\n\n homeComp.programs.length = 0; //Remove programs\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(Programs.NukeProgram.name);\n if (hasBitflume) {\n homeComp.programs.push(Programs.BitFlume.name);\n }\n\n //Update RAM usage on all scripts\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(homeComp.scripts);\n });\n\n homeComp.messages.length = 0; //Remove .lit and .msg files\n homeComp.messages.push(LiteratureNames.HackersStartingHandbook);\n}\n\n// Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\nexport function getServerOnNetwork(server: BaseServer, i: number): BaseServer | null {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return GetServer(server.serversOnNetwork[i]);\n}\n\nexport function isBackdoorInstalled(server: BaseServer): boolean {\n if (server instanceof Server) {\n return server.backdoorInstalled;\n }\n return false;\n}\n","export const SkillNames: {\n BladesIntuition: string;\n Cloak: string;\n Marksman: string;\n WeaponProficiency: string;\n ShortCircuit: string;\n DigitalObserver: string;\n Tracer: string;\n Overclock: string;\n Reaper: string;\n EvasiveSystem: string;\n Datamancer: string;\n CybersEdge: string;\n HandsOfMidas: string;\n Hyperdrive: string;\n} = {\n BladesIntuition: \"Blade's Intuition\",\n Cloak: \"Cloak\",\n Marksman: \"Marksman\",\n WeaponProficiency: \"Weapon Proficiency\",\n ShortCircuit: \"Short-Circuit\",\n DigitalObserver: \"Digital Observer\",\n Tracer: \"Tracer\",\n Overclock: \"Overclock\",\n Reaper: \"Reaper\",\n EvasiveSystem: \"Evasive System\",\n Datamancer: \"Datamancer\",\n CybersEdge: \"Cyber's Edge\",\n HandsOfMidas: \"Hands of Midas\",\n Hyperdrive: \"Hyperdrive\",\n};\n","/**\n * Checks whether the value passed in can be considered a string.\n * @param value The value to check if it is a string.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function isString(value: any): boolean {\n return typeof value === \"string\" || value instanceof String;\n}\n","import React from \"react\";\n\nimport { Table, TableCell } from \"./Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { Table as MuiTable } from \"@mui/material\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n rows: any[][];\n title?: string;\n wide?: boolean;\n}\n\nexport function StatsTable({ rows, title, wide }: IProps): React.ReactElement {\n const T = wide ? MuiTable : Table;\n return (\n <>\n {title && {title}}\n \n \n {rows.map((row: any[], i: number) => (\n \n {row.map((elem: any, i: number) => (\n \n {elem}\n \n ))}\n \n ))}\n \n \n \n );\n}\n","import { Operation, IOperationParams } from \"./Operation\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class BlackOperation extends Operation {\n constructor(params: IOperationParams | null = null) {\n super(params);\n this.count = 1;\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1.5;\n }\n\n getChaosCompetencePenalty(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n getChaosDifficultyBonus(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BlackOperation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(BlackOperation, value.data);\n }\n}\n\nReviver.constructors.BlackOperation = BlackOperation;\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { ICorporation } from \"../ICorporation\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number;\n corp: ICorporation;\n}\n\nexport function MoneyCost(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (!(props.corp.funds > props.money))\n return {numeralWrapper.formatMoney(props.money)};\n\n return {numeralWrapper.formatMoney(props.money)};\n}\n","/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\nimport { WorkerScript } from \"./WorkerScript\";\nimport { workerScripts } from \"./WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./WorkerScriptStartStopEventEmitter\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { AddRecentScript } from \"./RecentScripts\";\nimport { Player } from \"../Player\";\n\nexport function killWorkerScript(runningScriptObj: RunningScript, hostname: string, rerenderUi?: boolean): boolean;\nexport function killWorkerScript(workerScript: WorkerScript): boolean;\nexport function killWorkerScript(pid: number): boolean;\nexport function killWorkerScript(\n script: RunningScript | WorkerScript | number,\n hostname?: string,\n rerenderUi?: boolean,\n): boolean {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(script);\n\n return true;\n } else if (script instanceof RunningScript && typeof hostname === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n if (res) {\n return res;\n }\n\n // If for some reason that doesn't work, we'll try the old way\n for (const ws of workerScripts.values()) {\n if (ws.name == script.filename && ws.hostname == hostname && compareArrays(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid: number, rerenderUi = true): boolean {\n const ws = workerScripts.get(pid);\n if (ws instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n if (typeof workerScript.atExit === \"function\") {\n try {\n workerScript.atExit();\n } catch (e: any) {\n dialogBoxCreate(\n `Error trying to call atExit for script ${workerScript.name} on ${workerScript.hostname} ${workerScript.scriptRef.args} ${e}`,\n );\n }\n workerScript.atExit = undefined;\n }\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\nfunction removeWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n const ip = workerScript.hostname;\n const name = workerScript.name;\n\n // Get the server on which the script runs\n const server = GetServer(ip);\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n }\n\n // Delete the RunningScript object from that server\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n if (runningScript.filename === name && compareArrays(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n }\n\n // Recalculate ram used on that server\n\n server.updateRamUsed(0, Player);\n for (const rs of server.runningScripts) server.updateRamUsed(server.ramUsed + rs.ramUsage * rs.threads, Player);\n\n // Delete script from global pool (workerScripts)\n workerScripts.delete(workerScript.pid);\n // const res = workerScripts.delete(workerScript.pid);\n // if (!res) {\n // console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n // console.warn(workerScript);\n // }\n AddRecentScript(workerScript);\n\n if (rerenderUi) {\n WorkerScriptStartStopEventEmitter.emit();\n }\n}\n\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\nfunction killNetscriptDelay(workerScript: WorkerScript): void {\n if (workerScript instanceof WorkerScript) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n if (workerScript.delayResolve) {\n workerScript.delayResolve();\n }\n }\n }\n}\n","import React, { useState } from \"react\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n label: string;\n placeholder: string;\n add: (x: number) => void;\n subtract: (x: number) => void;\n tons: () => void;\n reset: () => void;\n}\n\nexport function Adjuster(props: IProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setValue(\"\");\n else setValue(parseFloat(event.target.value));\n }\n\n const { label, placeholder, add, subtract, reset, tons } = props;\n return (\n <>\n \n \n \n \n \n \n \n add(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n ),\n endAdornment: (\n <>\n \n subtract(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n \n \n \n \n \n ),\n }}\n />\n \n );\n}\n","import React, { useContext } from \"react\";\nimport { IGang } from \"../IGang\";\n\nexport const Context: {\n Gang: React.Context;\n} = {\n Gang: React.createContext({} as IGang),\n};\n\nexport const useGang = (): IGang => useContext(Context.Gang);\n","import { IMinMaxRange } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nexport const StockForecastInfluenceLimit = 5;\n\nexport interface IConstructorParams {\n b: boolean;\n initPrice: number | IMinMaxRange;\n marketCap: number;\n mv: number | IMinMaxRange;\n name: string;\n otlkMag: number;\n spreadPerc: number | IMinMaxRange;\n shareTxForMovement: number | IMinMaxRange;\n symbol: string;\n}\n\nconst defaultConstructorParams: IConstructorParams = {\n b: true,\n initPrice: 10e3,\n marketCap: 1e12,\n mv: 1,\n name: \"\",\n otlkMag: 0,\n spreadPerc: 0,\n shareTxForMovement: 1e6,\n symbol: \"\",\n};\n\n// Helper function that convert a IMinMaxRange to a number\nfunction toNumber(n: number | IMinMaxRange): number {\n let value: number;\n switch (typeof n) {\n case \"number\": {\n return n;\n }\n case \"object\": {\n const range = n as IMinMaxRange;\n value = getRandomInt(range.min, range.max);\n break;\n }\n default:\n throw Error(`Do not know how to convert the type '${typeof n}' to a number`);\n }\n\n if (typeof n === \"object\" && typeof n.divisor === \"number\") {\n return value / n.divisor;\n }\n\n return value;\n}\n\n/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\nexport class Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n b: boolean;\n\n /**\n * Maximum price of a stock (per share)\n */\n readonly cap: number;\n\n /**\n * Stocks previous share price\n */\n lastPrice: number;\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n readonly maxShares: number;\n\n /**\n * Maximum volatility\n */\n readonly mv: number;\n\n /**\n * Name of the company that the stock is for\n */\n readonly name: string;\n\n /**\n * Outlook magnitude. Represents the stock's forecast and likelihood\n * of increasing/decreasing (based on whether its in bear or bull mode)\n */\n otlkMag: number;\n\n /**\n * Forecast of outlook magnitude. Essentially a second-order forecast.\n * Unlike 'otlkMag', this number is on an absolute scale from 0-100 (rather than 0-50)\n */\n otlkMagForecast: number;\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n playerAvgPx: number;\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n playerAvgShortPx: number;\n\n /**\n * Number of shares the player owns in the LONG position\n */\n playerShares: number;\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n playerShortShares: number;\n\n /**\n * Stock's share price\n */\n price: number;\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n readonly shareTxForMovement: number;\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n shareTxUntilMovement: number;\n\n /**\n * Spread percentage. The bid/ask prices for this stock are N% above or below\n * the \"real price\" to emulate spread.\n */\n readonly spreadPerc: number;\n\n /**\n * The stock's ticker symbol\n */\n readonly symbol: string;\n\n /**\n * Total number of shares of this stock\n * This is different than maxShares, as this is like authorized stock while\n * maxShares is outstanding stock.\n */\n readonly totalShares: number;\n\n constructor(p: IConstructorParams = defaultConstructorParams) {\n this.name = p.name;\n this.symbol = p.symbol;\n this.price = toNumber(p.initPrice);\n this.lastPrice = this.price;\n this.playerShares = 0;\n this.playerAvgPx = 0;\n this.playerShortShares = 0;\n this.playerAvgShortPx = 0;\n this.mv = toNumber(p.mv);\n this.b = p.b;\n this.otlkMag = p.otlkMag;\n this.otlkMagForecast = this.getAbsoluteForecast();\n this.cap = getRandomInt(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement;\n\n // Total shares is determined by market cap, and is rounded to nearest 100k\n const totalSharesUnrounded: number = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5;\n\n // Max Shares (Outstanding shares) is a percentage of total shares\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round((this.totalShares * outstandingSharePercentage) / 1e5) * 1e5;\n }\n\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n changeForecastForecast(newff: number): void {\n this.otlkMagForecast = newff;\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n changePrice(newPrice: number): void {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\n\n /**\n * Change the stock's forecast during a stock market 'tick'.\n * The way a stock's forecast changes depends on various internal properties,\n * but is ultimately determined by RNG\n */\n cycleForecast(changeAmt = 0.1): void {\n const increaseChance = this.getForecastIncreaseChance();\n\n if (Math.random() < increaseChance) {\n // Forecast increases\n if (this.b) {\n this.otlkMag += changeAmt;\n } else {\n this.otlkMag -= changeAmt;\n }\n } else {\n // Forecast decreases\n if (this.b) {\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\n }\n\n /**\n * Change's the stock's second-order forecast during a stock market 'tick'.\n * The change for the second-order forecast to increase is 50/50\n */\n cycleForecastForecast(changeAmt = 0.1): void {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\n }\n\n /**\n * \"Flip\" the stock's second-order forecast. This can occur during a\n * stock market \"cycle\" (determined by RNG). It is used to simulate\n * RL stock market cycles and introduce volatility\n */\n flipForecastForecast(): void {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n getAbsoluteForecast(): number {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n getAskPrice(): number {\n return this.price * (1 + this.spreadPerc / 100);\n }\n\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n getBidPrice(): number {\n return this.price * (1 - this.spreadPerc / 100);\n }\n\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n getForecastIncreaseChance(): number {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\n\n /**\n * Changes a stock's forecast. This is used when the stock is influenced\n * by a transaction. The stock's forecast always goes towards 50, but the\n * movement is capped by a certain threshold/limit\n */\n influenceForecast(change: number): void {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\n }\n\n /**\n * Changes a stock's second-order forecast. This is used when the stock is\n * influenced by a transaction. The stock's second-order forecast always\n * goes towards 50.\n */\n influenceForecastForecast(change: number): void {\n if (this.otlkMagForecast > 50) {\n this.otlkMagForecast -= change;\n this.otlkMagForecast = Math.max(50, this.otlkMagForecast);\n } else if (this.otlkMagForecast < 50) {\n this.otlkMagForecast += change;\n this.otlkMagForecast = Math.min(50, this.otlkMagForecast);\n }\n }\n\n /**\n * Serialize the Stock to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Stock\", this);\n }\n\n /**\n * Initializes a Stock from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Stock {\n return Generic_fromJSON(Stock, value.data);\n }\n}\n\nReviver.constructors.Stock = Stock;\n","/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nimport { City } from \"./City\";\nimport { IMap } from \"../types\";\n\nexport const Cities: IMap = {};\n","import { Augmentation, IConstructorParams } from \"./Augmentation\";\nimport { Augmentations } from \"./Augmentations\";\nimport { PlayerOwnedAugmentation, IPlayerOwnedAugmentation } from \"./PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Player } from \"../Player\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { Programs } from \"../Programs/Programs\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { clearObject } from \"../utils/helpers/clearObject\";\n\nimport { WHRNG } from \"../Casino/RNG\";\n\nimport React from \"react\";\n\nfunction AddToAugmentations(aug: Augmentation): void {\n const name = aug.name;\n Augmentations[name] = aug;\n}\n\nfunction getRandomBonus(): any {\n const bonuses = [\n {\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1,\n },\n description:\n \"Increases the player's hacking chance by 25%.
\" +\n \"Increases the player's hacking speed by 10%.
\" +\n \"Increases the amount of money the player's gains from hacking by 25%.
\" +\n \"Improves grow() by 10%.\",\n },\n {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2,\n },\n description:\n \"Increases the player's hacking skill by 15%.
\" +\n \"Increases the player's hacking experience gain rate by 100%.\",\n },\n {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2,\n },\n description:\n \"Increases all of the player's combat stats by 25%.
\" +\n \"Increases all of the player's combat stat experience gain rate by 100%.\",\n },\n {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2,\n },\n description:\n \"This augmentation increases the player's charisma by 50%.
\" +\n \"Increases the player's charisma experience gain rate by 100%.\",\n },\n {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85,\n },\n description:\n \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" +\n \"Decreases all costs related to Hacknet Node by 15%.\",\n },\n {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7,\n },\n description:\n \"Increases the amount of money the player gains from working by 70%.
\" +\n \"Increases the amount of reputation the player gains when working for a company by 25%.
\" +\n \"Increases the amount of reputation the player gains for a faction by 15%.\",\n },\n {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2,\n },\n description:\n \"Increases the player's crime success rate by 100%.
\" +\n \"Increases the amount of money the player gains from crimes by 100%.\",\n },\n ];\n\n const randomNumber = new WHRNG(Math.floor(Player.lastUpdate / 3600000));\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nfunction initAugmentations(): void {\n for (const name in Factions) {\n if (Factions.hasOwnProperty(name)) {\n Factions[name].augmentations = [];\n }\n }\n\n //Reset Augmentations\n clearObject(Augmentations);\n\n //Time-Based Augment Test\n const randomBonuses = getRandomBonus();\n\n const UnstableCircadianModulatorParams: IConstructorParams = {\n name: AugmentationNames.UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info:\n \"An experimental nanobot injection. Its unstable nature leads to \" +\n \"unpredictable results based on your circadian rhythm.\",\n };\n Object.keys(randomBonuses.bonuses).forEach(\n (key) => ((UnstableCircadianModulatorParams as any)[key] = randomBonuses.bonuses[key]),\n );\n const UnstableCircadianModulator = new Augmentation(UnstableCircadianModulatorParams);\n\n UnstableCircadianModulator.addToFactions([\"Speakers for the Dead\"]);\n if (augmentationExists(AugmentationNames.UnstableCircadianModulator)) {\n delete Augmentations[AugmentationNames.UnstableCircadianModulator];\n }\n AddToAugmentations(UnstableCircadianModulator);\n\n //Combat stat augmentations\n const HemoRecirculator = new Augmentation({\n name: AugmentationNames.HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump \" + \"blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08,\n });\n HemoRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\"]);\n if (augmentationExists(AugmentationNames.HemoRecirculator)) {\n delete Augmentations[AugmentationNames.HemoRecirculator];\n }\n AddToAugmentations(HemoRecirculator);\n\n const Targeting1 = new Augmentation({\n name: AugmentationNames.Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info:\n \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" +\n \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1,\n });\n Targeting1.addToFactions([\n \"Slum Snakes\",\n \"The Dark Army\",\n \"The Syndicate\",\n \"Sector-12\",\n \"Ishima\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.Targeting1)) {\n delete Augmentations[AugmentationNames.Targeting1];\n }\n AddToAugmentations(Targeting1);\n\n const Targeting2 = new Augmentation({\n name: AugmentationNames.Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info:\n \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" +\n \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [AugmentationNames.Targeting1],\n dexterity_mult: 1.2,\n });\n Targeting2.addToFactions([\n \"The Dark Army\",\n \"The Syndicate\",\n \"Sector-12\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.Targeting2)) {\n delete Augmentations[AugmentationNames.Targeting2];\n }\n AddToAugmentations(Targeting2);\n\n const Targeting3 = new Augmentation({\n name: AugmentationNames.Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.\",\n prereqs: [AugmentationNames.Targeting2],\n dexterity_mult: 1.3,\n });\n Targeting3.addToFactions([\n \"The Dark Army\",\n \"The Syndicate\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n \"Blade Industries\",\n \"The Covenant\",\n ]);\n if (augmentationExists(AugmentationNames.Targeting3)) {\n delete Augmentations[AugmentationNames.Targeting3];\n }\n AddToAugmentations(Targeting3);\n\n const SyntheticHeart = new Augmentation({\n name: AugmentationNames.SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info:\n \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" +\n \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5,\n });\n SyntheticHeart.addToFactions([\n \"KuaiGong International\",\n \"Fulcrum Secret Technologies\",\n \"Speakers for the Dead\",\n \"NWO\",\n \"The Covenant\",\n \"Daedalus\",\n \"Illuminati\",\n ]);\n if (augmentationExists(AugmentationNames.SyntheticHeart)) {\n delete Augmentations[AugmentationNames.SyntheticHeart];\n }\n AddToAugmentations(SyntheticHeart);\n\n const SynfibrilMuscle = new Augmentation({\n name: AugmentationNames.SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info:\n \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" +\n \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" +\n \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3,\n });\n SynfibrilMuscle.addToFactions([\n \"KuaiGong International\",\n \"Fulcrum Secret Technologies\",\n \"Speakers for the Dead\",\n \"NWO\",\n \"The Covenant\",\n \"Daedalus\",\n \"Illuminati\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.SynfibrilMuscle)) {\n delete Augmentations[AugmentationNames.SynfibrilMuscle];\n }\n AddToAugmentations(SynfibrilMuscle);\n\n const CombatRib1 = new Augmentation({\n name: AugmentationNames.CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info:\n \"The rib cage is augmented to continuously release boosters into the bloodstream \" +\n \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1,\n });\n CombatRib1.addToFactions([\n \"Slum Snakes\",\n \"The Dark Army\",\n \"The Syndicate\",\n \"Volhaven\",\n \"Ishima\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.CombatRib1)) {\n delete Augmentations[AugmentationNames.CombatRib1];\n }\n AddToAugmentations(CombatRib1);\n\n const CombatRib2 = new Augmentation({\n name: AugmentationNames.CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info:\n \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" +\n \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [AugmentationNames.CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14,\n });\n CombatRib2.addToFactions([\n \"The Dark Army\",\n \"The Syndicate\",\n \"Volhaven\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.CombatRib2)) {\n delete Augmentations[AugmentationNames.CombatRib2];\n }\n AddToAugmentations(CombatRib2);\n\n const CombatRib3 = new Augmentation({\n name: AugmentationNames.CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info:\n \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" +\n \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [AugmentationNames.CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18,\n });\n CombatRib3.addToFactions([\n \"The Dark Army\",\n \"The Syndicate\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n \"Blade Industries\",\n \"The Covenant\",\n ]);\n if (augmentationExists(AugmentationNames.CombatRib3)) {\n delete Augmentations[AugmentationNames.CombatRib3];\n }\n AddToAugmentations(CombatRib3);\n\n const NanofiberWeave = new Augmentation({\n name: AugmentationNames.NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info:\n \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" +\n \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2,\n });\n NanofiberWeave.addToFactions([\n \"Tian Di Hui\",\n \"The Syndicate\",\n \"The Dark Army\",\n \"Speakers for the Dead\",\n \"Blade Industries\",\n \"Fulcrum Secret Technologies\",\n \"OmniTek Incorporated\",\n ]);\n if (augmentationExists(AugmentationNames.NanofiberWeave)) {\n delete Augmentations[AugmentationNames.NanofiberWeave];\n }\n AddToAugmentations(NanofiberWeave);\n\n const SubdermalArmor = new Augmentation({\n name: AugmentationNames.SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info:\n \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" +\n \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" +\n \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" +\n \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" +\n \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2,\n });\n SubdermalArmor.addToFactions([\n \"The Syndicate\",\n \"Fulcrum Secret Technologies\",\n \"Illuminati\",\n \"Daedalus\",\n \"The Covenant\",\n ]);\n if (augmentationExists(AugmentationNames.SubdermalArmor)) {\n delete Augmentations[AugmentationNames.SubdermalArmor];\n }\n AddToAugmentations(SubdermalArmor);\n\n const WiredReflexes = new Augmentation({\n name: AugmentationNames.WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info:\n \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" +\n \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05,\n });\n WiredReflexes.addToFactions([\n \"Tian Di Hui\",\n \"Slum Snakes\",\n \"Sector-12\",\n \"Volhaven\",\n \"Aevum\",\n \"Ishima\",\n \"The Syndicate\",\n \"The Dark Army\",\n \"Speakers for the Dead\",\n ]);\n if (augmentationExists(AugmentationNames.WiredReflexes)) {\n delete Augmentations[AugmentationNames.WiredReflexes];\n }\n AddToAugmentations(WiredReflexes);\n\n const GrapheneBoneLacings = new Augmentation({\n name: AugmentationNames.GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info:\n \"Graphene is grafted and fused into the skeletal structure, \" + \"enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7,\n });\n GrapheneBoneLacings.addToFactions([\"Fulcrum Secret Technologies\", \"The Covenant\"]);\n if (augmentationExists(AugmentationNames.GrapheneBoneLacings)) {\n delete Augmentations[AugmentationNames.GrapheneBoneLacings];\n }\n AddToAugmentations(GrapheneBoneLacings);\n\n const BionicSpine = new Augmentation({\n name: AugmentationNames.BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info:\n \"The spine is reconstructed using plasteel and carbon fibers. \" +\n \"It is now capable of stimulating and regulating neural signals \" +\n \"passing through the spinal cord, improving senses and reaction speed. \" +\n \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15,\n });\n BionicSpine.addToFactions([\n \"Speakers for the Dead\",\n \"The Syndicate\",\n \"KuaiGong International\",\n \"OmniTek Incorporated\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.BionicSpine)) {\n delete Augmentations[AugmentationNames.BionicSpine];\n }\n AddToAugmentations(BionicSpine);\n\n const GrapheneBionicSpine = new Augmentation({\n name: AugmentationNames.GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info:\n \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" +\n \"which enhances durability and supercharges all body functions.\",\n prereqs: [AugmentationNames.BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6,\n });\n GrapheneBionicSpine.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\"]);\n if (augmentationExists(AugmentationNames.GrapheneBionicSpine)) {\n delete Augmentations[AugmentationNames.GrapheneBionicSpine];\n }\n AddToAugmentations(GrapheneBionicSpine);\n\n const BionicLegs = new Augmentation({\n name: AugmentationNames.BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6,\n });\n BionicLegs.addToFactions([\n \"Speakers for the Dead\",\n \"The Syndicate\",\n \"KuaiGong International\",\n \"OmniTek Incorporated\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.BionicLegs)) {\n delete Augmentations[AugmentationNames.BionicLegs];\n }\n AddToAugmentations(BionicLegs);\n\n const GrapheneBionicLegs = new Augmentation({\n name: AugmentationNames.GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info:\n \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" +\n \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [AugmentationNames.BionicLegs],\n agility_mult: 2.5,\n });\n GrapheneBionicLegs.addToFactions([\"MegaCorp\", \"ECorp\", \"Fulcrum Secret Technologies\"]);\n if (augmentationExists(AugmentationNames.GrapheneBionicLegs)) {\n delete Augmentations[AugmentationNames.GrapheneBionicLegs];\n }\n AddToAugmentations(GrapheneBionicLegs);\n\n // Work stat augmentations\n const SpeechProcessor = new Augmentation({\n name: AugmentationNames.SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info:\n \"A cochlear implant with an embedded computer that analyzes incoming speech. \" +\n \"The embedded computer processes characteristics of incoming speech, such as tone \" +\n \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2,\n });\n SpeechProcessor.addToFactions([\n \"Tian Di Hui\",\n \"Chongqing\",\n \"Sector-12\",\n \"New Tokyo\",\n \"Aevum\",\n \"Ishima\",\n \"Volhaven\",\n \"Silhouette\",\n ]);\n if (augmentationExists(AugmentationNames.SpeechProcessor)) {\n delete Augmentations[AugmentationNames.SpeechProcessor];\n }\n AddToAugmentations(SpeechProcessor);\n\n const TITN41Injection = new Augmentation({\n name: AugmentationNames.TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info:\n \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" +\n \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" +\n \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15,\n });\n TITN41Injection.addToFactions([\"Silhouette\"]);\n if (augmentationExists(AugmentationNames.TITN41Injection)) {\n delete Augmentations[AugmentationNames.TITN41Injection];\n }\n AddToAugmentations(TITN41Injection);\n\n const EnhancedSocialInteractionImplant = new Augmentation({\n name: AugmentationNames.EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info:\n \"A cranial implant that greatly assists in the user's ability to analyze social situations \" +\n \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" +\n \"language, and the voice tone, and inflection to determine the best course of action during social\" +\n \"situations. The implant also uses deep learning software to continuously learn new behavior\" +\n \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6,\n });\n EnhancedSocialInteractionImplant.addToFactions([\n \"Bachman & Associates\",\n \"NWO\",\n \"Clarke Incorporated\",\n \"OmniTek Incorporated\",\n \"Four Sigma\",\n ]);\n if (augmentationExists(AugmentationNames.EnhancedSocialInteractionImplant)) {\n delete Augmentations[AugmentationNames.EnhancedSocialInteractionImplant];\n }\n AddToAugmentations(EnhancedSocialInteractionImplant);\n\n // Hacking augmentations\n const BitWire = new Augmentation({\n name: AugmentationNames.BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info:\n \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" +\n \"capabilities.\",\n hacking_mult: 1.05,\n });\n BitWire.addToFactions([\"CyberSec\", \"NiteSec\"]);\n if (augmentationExists(AugmentationNames.BitWire)) {\n delete Augmentations[AugmentationNames.BitWire];\n }\n AddToAugmentations(BitWire);\n\n const ArtificialBioNeuralNetwork = new Augmentation({\n name: AugmentationNames.ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info:\n \"A network consisting of millions of nanoprocessors is embedded into the brain. \" +\n \"The network is meant to mimic the way a biological brain solves a problem, with each \" +\n \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" +\n \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" +\n \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12,\n });\n ArtificialBioNeuralNetwork.addToFactions([\"BitRunners\", \"Fulcrum Secret Technologies\"]);\n if (augmentationExists(AugmentationNames.ArtificialBioNeuralNetwork)) {\n delete Augmentations[AugmentationNames.ArtificialBioNeuralNetwork];\n }\n AddToAugmentations(ArtificialBioNeuralNetwork);\n\n const ArtificialSynapticPotentiation = new Augmentation({\n name: AugmentationNames.ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info:\n \"The body is injected with a chemical that artificially induces synaptic potentiation, \" +\n \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05,\n });\n ArtificialSynapticPotentiation.addToFactions([\"The Black Hand\", \"NiteSec\"]);\n if (augmentationExists(AugmentationNames.ArtificialSynapticPotentiation)) {\n delete Augmentations[AugmentationNames.ArtificialSynapticPotentiation];\n }\n AddToAugmentations(ArtificialSynapticPotentiation);\n\n const EnhancedMyelinSheathing = new Augmentation({\n name: AugmentationNames.EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info:\n \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" +\n \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" +\n \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" +\n \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08,\n });\n EnhancedMyelinSheathing.addToFactions([\"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\"]);\n if (augmentationExists(AugmentationNames.EnhancedMyelinSheathing)) {\n delete Augmentations[AugmentationNames.EnhancedMyelinSheathing];\n }\n AddToAugmentations(EnhancedMyelinSheathing);\n\n const SynapticEnhancement = new Augmentation({\n name: AugmentationNames.SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info:\n \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" +\n \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03,\n });\n SynapticEnhancement.addToFactions([\"CyberSec\", \"Aevum\"]);\n if (augmentationExists(AugmentationNames.SynapticEnhancement)) {\n delete Augmentations[AugmentationNames.SynapticEnhancement];\n }\n AddToAugmentations(SynapticEnhancement);\n\n const NeuralRetentionEnhancement = new Augmentation({\n name: AugmentationNames.NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info:\n \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" +\n \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25,\n });\n NeuralRetentionEnhancement.addToFactions([\"NiteSec\"]);\n if (augmentationExists(AugmentationNames.NeuralRetentionEnhancement)) {\n delete Augmentations[AugmentationNames.NeuralRetentionEnhancement];\n }\n AddToAugmentations(NeuralRetentionEnhancement);\n\n const DataJack = new Augmentation({\n name: AugmentationNames.DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info:\n \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" +\n \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" +\n \"and delete it.\",\n hacking_money_mult: 1.25,\n });\n DataJack.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"New Tokyo\"]);\n if (augmentationExists(AugmentationNames.DataJack)) {\n delete Augmentations[AugmentationNames.DataJack];\n }\n AddToAugmentations(DataJack);\n\n const ENM = new Augmentation({\n name: AugmentationNames.ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info:\n \"A thin device embedded inside the arm containing a wireless module capable of connecting \" +\n \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" +\n \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" +\n \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" +\n \"control the traffic on a network.\",\n hacking_mult: 1.08,\n });\n ENM.addToFactions([\n \"BitRunners\",\n \"The Black Hand\",\n \"NiteSec\",\n \"ECorp\",\n \"MegaCorp\",\n \"Fulcrum Secret Technologies\",\n \"NWO\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.ENM)) {\n delete Augmentations[AugmentationNames.ENM];\n }\n AddToAugmentations(ENM);\n\n const ENMCore = new Augmentation({\n name: AugmentationNames.ENMCore,\n repCost: 175e3,\n moneyCost: 2.5e9,\n info:\n \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07,\n });\n ENMCore.addToFactions([\n \"BitRunners\",\n \"The Black Hand\",\n \"ECorp\",\n \"MegaCorp\",\n \"Fulcrum Secret Technologies\",\n \"NWO\",\n \"Blade Industries\",\n ]);\n if (augmentationExists(AugmentationNames.ENMCore)) {\n delete Augmentations[AugmentationNames.ENMCore];\n }\n AddToAugmentations(ENMCore);\n\n const ENMCoreV2 = new Augmentation({\n name: AugmentationNames.ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info:\n \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to control information on \" +\n \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" +\n \"packets.\",\n prereqs: [AugmentationNames.ENMCore],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08,\n });\n ENMCoreV2.addToFactions([\n \"BitRunners\",\n \"ECorp\",\n \"MegaCorp\",\n \"Fulcrum Secret Technologies\",\n \"NWO\",\n \"Blade Industries\",\n \"OmniTek Incorporated\",\n \"KuaiGong International\",\n ]);\n if (augmentationExists(AugmentationNames.ENMCoreV2)) {\n delete Augmentations[AugmentationNames.ENMCoreV2];\n }\n AddToAugmentations(ENMCoreV2);\n\n const ENMCoreV3 = new Augmentation({\n name: AugmentationNames.ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info:\n \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" +\n \"any device on a network.\",\n prereqs: [AugmentationNames.ENMCoreV2],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1,\n });\n ENMCoreV3.addToFactions([\n \"ECorp\",\n \"MegaCorp\",\n \"Fulcrum Secret Technologies\",\n \"NWO\",\n \"Daedalus\",\n \"The Covenant\",\n \"Illuminati\",\n ]);\n if (augmentationExists(AugmentationNames.ENMCoreV3)) {\n delete Augmentations[AugmentationNames.ENMCoreV3];\n }\n AddToAugmentations(ENMCoreV3);\n\n const ENMAnalyzeEngine = new Augmentation({\n name: AugmentationNames.ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info:\n \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" +\n \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed_mult: 1.1,\n });\n ENMAnalyzeEngine.addToFactions([\n \"ECorp\",\n \"MegaCorp\",\n \"Fulcrum Secret Technologies\",\n \"NWO\",\n \"Daedalus\",\n \"The Covenant\",\n \"Illuminati\",\n ]);\n if (augmentationExists(AugmentationNames.ENMAnalyzeEngine)) {\n delete Augmentations[AugmentationNames.ENMAnalyzeEngine];\n }\n AddToAugmentations(ENMAnalyzeEngine);\n\n const ENMDMA = new Augmentation({\n name: AugmentationNames.ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info:\n \"This implant installs a Direct Memory Access (DMA) controller into the \" +\n \"Embedded Netburner Module. This allows the Module to send and receive data \" +\n \"directly to and from the main memory of devices on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2,\n });\n ENMDMA.addToFactions([\n \"ECorp\",\n \"MegaCorp\",\n \"Fulcrum Secret Technologies\",\n \"NWO\",\n \"Daedalus\",\n \"The Covenant\",\n \"Illuminati\",\n ]);\n if (augmentationExists(AugmentationNames.ENMDMA)) {\n delete Augmentations[AugmentationNames.ENMDMA];\n }\n AddToAugmentations(ENMDMA);\n\n const Neuralstimulator = new Augmentation({\n name: AugmentationNames.Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info:\n \"A cranial implant that intelligently stimulates certain areas of the brain \" +\n \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12,\n });\n Neuralstimulator.addToFactions([\n \"The Black Hand\",\n \"Chongqing\",\n \"Sector-12\",\n \"New Tokyo\",\n \"Aevum\",\n \"Ishima\",\n \"Volhaven\",\n \"Bachman & Associates\",\n \"Clarke Incorporated\",\n \"Four Sigma\",\n ]);\n if (augmentationExists(AugmentationNames.Neuralstimulator)) {\n delete Augmentations[AugmentationNames.Neuralstimulator];\n }\n AddToAugmentations(Neuralstimulator);\n\n const NeuralAccelerator = new Augmentation({\n name: AugmentationNames.NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info:\n \"A microprocessor that accelerates the processing \" +\n \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2,\n });\n NeuralAccelerator.addToFactions([\"BitRunners\"]);\n if (augmentationExists(AugmentationNames.NeuralAccelerator)) {\n delete Augmentations[AugmentationNames.NeuralAccelerator];\n }\n AddToAugmentations(NeuralAccelerator);\n\n const CranialSignalProcessorsG1 = new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info:\n \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05,\n });\n CranialSignalProcessorsG1.addToFactions([\"CyberSec\"]);\n if (augmentationExists(AugmentationNames.CranialSignalProcessorsG1)) {\n delete Augmentations[AugmentationNames.CranialSignalProcessorsG1];\n }\n AddToAugmentations(CranialSignalProcessorsG1);\n\n const CranialSignalProcessorsG2 = new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info:\n \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07,\n });\n CranialSignalProcessorsG2.addToFactions([\"CyberSec\", \"NiteSec\"]);\n if (augmentationExists(AugmentationNames.CranialSignalProcessorsG2)) {\n delete Augmentations[AugmentationNames.CranialSignalProcessorsG2];\n }\n AddToAugmentations(CranialSignalProcessorsG2);\n\n const CranialSignalProcessorsG3 = new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info:\n \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09,\n });\n CranialSignalProcessorsG3.addToFactions([\"NiteSec\", \"The Black Hand\", \"BitRunners\"]);\n if (augmentationExists(AugmentationNames.CranialSignalProcessorsG3)) {\n delete Augmentations[AugmentationNames.CranialSignalProcessorsG3];\n }\n AddToAugmentations(CranialSignalProcessorsG3);\n\n const CranialSignalProcessorsG4 = new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info:\n \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25,\n });\n CranialSignalProcessorsG4.addToFactions([\"The Black Hand\", \"BitRunners\"]);\n if (augmentationExists(AugmentationNames.CranialSignalProcessorsG4)) {\n delete Augmentations[AugmentationNames.CranialSignalProcessorsG4];\n }\n AddToAugmentations(CranialSignalProcessorsG4);\n\n const CranialSignalProcessorsG5 = new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info:\n \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75,\n });\n CranialSignalProcessorsG5.addToFactions([\"BitRunners\"]);\n if (augmentationExists(AugmentationNames.CranialSignalProcessorsG5)) {\n delete Augmentations[AugmentationNames.CranialSignalProcessorsG5];\n }\n AddToAugmentations(CranialSignalProcessorsG5);\n\n const NeuronalDensification = new Augmentation({\n name: AugmentationNames.NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info:\n \"The brain is surgically re-engineered to have increased neuronal density \" +\n \"by decreasing the neuron gap junction. Then, the body is genetically modified \" +\n \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03,\n });\n NeuronalDensification.addToFactions([\"Clarke Incorporated\"]);\n if (augmentationExists(AugmentationNames.NeuronalDensification)) {\n delete Augmentations[AugmentationNames.NeuronalDensification];\n }\n AddToAugmentations(NeuronalDensification);\n\n // Work Augmentations\n const NuoptimalInjectorImplant = new Augmentation({\n name: AugmentationNames.NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info:\n \"This torso implant automatically injects nootropic supplements into \" +\n \"the bloodstream to improve memory, increase focus, and provide other \" +\n \"cognitive enhancements.\",\n company_rep_mult: 1.2,\n });\n NuoptimalInjectorImplant.addToFactions([\n \"Tian Di Hui\",\n \"Volhaven\",\n \"New Tokyo\",\n \"Chongqing\",\n \"Clarke Incorporated\",\n \"Four Sigma\",\n \"Bachman & Associates\",\n ]);\n if (augmentationExists(AugmentationNames.NuoptimalInjectorImplant)) {\n delete Augmentations[AugmentationNames.NuoptimalInjectorImplant];\n }\n AddToAugmentations(NuoptimalInjectorImplant);\n\n const SpeechEnhancement = new Augmentation({\n name: AugmentationNames.SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info:\n \"An advanced neural implant that improves your speaking abilities, making \" +\n \"you more convincing and likable in conversations and overall improving your \" +\n \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1,\n });\n SpeechEnhancement.addToFactions([\n \"Tian Di Hui\",\n \"Speakers for the Dead\",\n \"Four Sigma\",\n \"KuaiGong International\",\n \"Clarke Incorporated\",\n \"Bachman & Associates\",\n ]);\n if (augmentationExists(AugmentationNames.SpeechEnhancement)) {\n delete Augmentations[AugmentationNames.SpeechEnhancement];\n }\n AddToAugmentations(SpeechEnhancement);\n\n const FocusWire = new Augmentation({\n name: AugmentationNames.FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways \" + \"in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2,\n });\n FocusWire.addToFactions([\"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\", \"KuaiGong International\"]);\n if (augmentationExists(AugmentationNames.FocusWire)) {\n delete Augmentations[AugmentationNames.FocusWire];\n }\n AddToAugmentations(FocusWire);\n\n const PCDNI = new Augmentation({\n name: AugmentationNames.PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info:\n \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" +\n \"computers. Connecting to a computer through this jack allows you to interface with \" +\n \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08,\n });\n PCDNI.addToFactions([\"Four Sigma\", \"OmniTek Incorporated\", \"ECorp\", \"Blade Industries\"]);\n if (augmentationExists(AugmentationNames.PCDNI)) {\n delete Augmentations[AugmentationNames.PCDNI];\n }\n AddToAugmentations(PCDNI);\n\n const PCDNIOptimizer = new Augmentation({\n name: AugmentationNames.PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info:\n \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" +\n \"improves the performance of the interface and gives the user more control options \" +\n \"to a connected computer.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1,\n });\n PCDNIOptimizer.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\", \"Blade Industries\"]);\n if (augmentationExists(AugmentationNames.PCDNIOptimizer)) {\n delete Augmentations[AugmentationNames.PCDNIOptimizer];\n }\n AddToAugmentations(PCDNIOptimizer);\n\n const PCDNINeuralNetwork = new Augmentation({\n name: AugmentationNames.PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info:\n \"This is an additional installation that upgrades the functionality of the \" +\n \"PC Direct-Neural Interface augmentation. When connected to a computer, \" +\n \"The Neural Network upgrade allows the user to use their own brain's \" +\n \"processing power to aid the computer in computational tasks.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05,\n });\n PCDNINeuralNetwork.addToFactions([\"Fulcrum Secret Technologies\"]);\n if (augmentationExists(AugmentationNames.PCDNINeuralNetwork)) {\n delete Augmentations[AugmentationNames.PCDNINeuralNetwork];\n }\n AddToAugmentations(PCDNINeuralNetwork);\n\n const ADRPheromone1 = new Augmentation({\n name: AugmentationNames.ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" +\n \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" +\n \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1,\n });\n ADRPheromone1.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"NWO\", \"MegaCorp\", \"Four Sigma\"]);\n if (augmentationExists(AugmentationNames.ADRPheromone1)) {\n delete Augmentations[AugmentationNames.ADRPheromone1];\n }\n AddToAugmentations(ADRPheromone1);\n\n const ADRPheromone2 = new Augmentation({\n name: AugmentationNames.ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" +\n \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" +\n \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2,\n });\n ADRPheromone2.addToFactions([\"Silhouette\", \"Four Sigma\", \"Bachman & Associates\", \"Clarke Incorporated\"]);\n if (augmentationExists(AugmentationNames.ADRPheromone2)) {\n delete Augmentations[AugmentationNames.ADRPheromone2];\n }\n AddToAugmentations(ADRPheromone2);\n\n const ShadowsSimulacrum = new Augmentation({\n name: AugmentationNames.ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info:\n \"A crude but functional matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation was developed by \" +\n \"criminal organizations and allows the user to project and control holographic \" +\n \"simulacrums within a large radius. These simulacrums are commonly used for \" +\n \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n });\n ShadowsSimulacrum.addToFactions([\"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n if (augmentationExists(AugmentationNames.ShadowsSimulacrum)) {\n delete Augmentations[AugmentationNames.ShadowsSimulacrum];\n }\n AddToAugmentations(ShadowsSimulacrum);\n\n // HacknetNode Augmentations\n const HacknetNodeCPUUpload = new Augmentation({\n name: AugmentationNames.HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's CPU into \" +\n \"the brain. This allows the user to engineer custom hardware and software \" +\n \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85,\n });\n HacknetNodeCPUUpload.addToFactions([\"Netburners\"]);\n if (augmentationExists(AugmentationNames.HacknetNodeCPUUpload)) {\n delete Augmentations[AugmentationNames.HacknetNodeCPUUpload];\n }\n AddToAugmentations(HacknetNodeCPUUpload);\n\n const HacknetNodeCacheUpload = new Augmentation({\n name: AugmentationNames.HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" +\n \"into the brain. This allows the user to engineer custom cache hardware for the \" +\n \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85,\n });\n HacknetNodeCacheUpload.addToFactions([\"Netburners\"]);\n if (augmentationExists(AugmentationNames.HacknetNodeCacheUpload)) {\n delete Augmentations[AugmentationNames.HacknetNodeCacheUpload];\n }\n AddToAugmentations(HacknetNodeCacheUpload);\n\n const HacknetNodeNICUpload = new Augmentation({\n name: AugmentationNames.HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" +\n \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" +\n \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9,\n });\n HacknetNodeNICUpload.addToFactions([\"Netburners\"]);\n if (augmentationExists(AugmentationNames.HacknetNodeNICUpload)) {\n delete Augmentations[AugmentationNames.HacknetNodeNICUpload];\n }\n AddToAugmentations(HacknetNodeNICUpload);\n\n const HacknetNodeKernelDNI = new Augmentation({\n name: AugmentationNames.HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" +\n \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25,\n });\n HacknetNodeKernelDNI.addToFactions([\"Netburners\"]);\n if (augmentationExists(AugmentationNames.HacknetNodeKernelDNI)) {\n delete Augmentations[AugmentationNames.HacknetNodeKernelDNI];\n }\n AddToAugmentations(HacknetNodeKernelDNI);\n\n const HacknetNodeCoreDNI = new Augmentation({\n name: AugmentationNames.HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" +\n \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45,\n });\n HacknetNodeCoreDNI.addToFactions([\"Netburners\"]);\n if (augmentationExists(AugmentationNames.HacknetNodeCoreDNI)) {\n delete Augmentations[AugmentationNames.HacknetNodeCoreDNI];\n }\n AddToAugmentations(HacknetNodeCoreDNI);\n\n //Misc/Hybrid augmentations\n const NeuroFluxGovernor = new Augmentation({\n name: AugmentationNames.NeuroFluxGovernor,\n repCost: 1.25e3,\n moneyCost: 3.75e6,\n info:\n \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" +\n \"monitors and regulates nervous impulses coming to and from the spinal column, \" +\n \"essentially 'governing' the body. By doing so, it improves the functionality of the \" +\n \"body's nervous system.\",\n stats: (\n <>\n This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL\n multipliers by 1%, stacking multiplicatively.\n \n ),\n hacking_chance_mult: 1.01,\n hacking_speed_mult: 1.01,\n hacking_money_mult: 1.01,\n hacking_grow_mult: 1.01,\n hacking_mult: 1.01,\n strength_mult: 1.01,\n defense_mult: 1.01,\n dexterity_mult: 1.01,\n agility_mult: 1.01,\n charisma_mult: 1.01,\n hacking_exp_mult: 1.01,\n strength_exp_mult: 1.01,\n defense_exp_mult: 1.01,\n dexterity_exp_mult: 1.01,\n agility_exp_mult: 1.01,\n charisma_exp_mult: 1.01,\n company_rep_mult: 1.01,\n faction_rep_mult: 1.01,\n crime_money_mult: 1.01,\n crime_success_mult: 1.01,\n hacknet_node_money_mult: 1.01,\n hacknet_node_purchase_cost_mult: 0.99,\n hacknet_node_ram_cost_mult: 0.99,\n hacknet_node_core_cost_mult: 0.99,\n hacknet_node_level_cost_mult: 0.99,\n work_money_mult: 1.01,\n });\n\n // Set the Augmentation's level to the currently-installed level\n let currLevel = 0;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = Player.augmentations[i].level;\n }\n }\n NeuroFluxGovernor.level = currLevel;\n\n // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux\n // levels that are purchased but not yet installed\n let nextLevel = currLevel;\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n ++nextLevel;\n }\n }\n let mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n NeuroFluxGovernor.baseRepRequirement = 500 * mult * BitNodeMultipliers.AugmentationRepCost;\n NeuroFluxGovernor.baseCost = 750e3 * mult * BitNodeMultipliers.AugmentationMoneyCost;\n if (augmentationExists(AugmentationNames.NeuroFluxGovernor)) {\n delete Augmentations[AugmentationNames.NeuroFluxGovernor];\n }\n NeuroFluxGovernor.addToAllFactions();\n AddToAugmentations(NeuroFluxGovernor);\n\n const Neurotrainer1 = new Augmentation({\n name: AugmentationNames.Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. It is \" +\n \"installed by releasing millions of nanobots into the human brain, each of which \" +\n \"attaches to a different neural pathway to enhance the brain's ability to retain \" +\n \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1,\n });\n Neurotrainer1.addToFactions([\"CyberSec\", \"Aevum\"]);\n if (augmentationExists(AugmentationNames.Neurotrainer1)) {\n delete Augmentations[AugmentationNames.Neurotrainer1];\n }\n AddToAugmentations(Neurotrainer1);\n\n const Neurotrainer2 = new Augmentation({\n name: AugmentationNames.Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" +\n \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15,\n });\n Neurotrainer2.addToFactions([\"BitRunners\", \"NiteSec\"]);\n if (augmentationExists(AugmentationNames.Neurotrainer2)) {\n delete Augmentations[AugmentationNames.Neurotrainer2];\n }\n AddToAugmentations(Neurotrainer2);\n\n const Neurotrainer3 = new Augmentation({\n name: AugmentationNames.Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" +\n \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2,\n });\n Neurotrainer3.addToFactions([\"NWO\", \"Four Sigma\"]);\n if (augmentationExists(AugmentationNames.Neurotrainer3)) {\n delete Augmentations[AugmentationNames.Neurotrainer3];\n }\n AddToAugmentations(Neurotrainer3);\n\n const Hypersight = new Augmentation({\n name: AugmentationNames.Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" +\n \"Embedded circuitry within the implant provides the ability to detect heat and movement \" +\n \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n });\n Hypersight.addToFactions([\"Blade Industries\", \"KuaiGong International\"]);\n if (augmentationExists(AugmentationNames.Hypersight)) {\n delete Augmentations[AugmentationNames.Hypersight];\n }\n AddToAugmentations(Hypersight);\n\n const LuminCloaking1 = new Augmentation({\n name: AugmentationNames.LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info:\n \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, have a negative refractive index. As a result, they bend light \" +\n \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1,\n });\n LuminCloaking1.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n if (augmentationExists(AugmentationNames.LuminCloaking1)) {\n delete Augmentations[AugmentationNames.LuminCloaking1];\n }\n AddToAugmentations(LuminCloaking1);\n\n const LuminCloaking2 = new Augmentation({\n name: AugmentationNames.LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info:\n \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" +\n \"reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, are capable of not only bending light but also of bending heat, \" +\n \"making the user more resilient as well as stealthy.\",\n prereqs: [AugmentationNames.LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25,\n });\n LuminCloaking2.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n if (augmentationExists(AugmentationNames.LuminCloaking2)) {\n delete Augmentations[AugmentationNames.LuminCloaking2];\n }\n AddToAugmentations(LuminCloaking2);\n\n const SmartSonar = new Augmentation({\n name: AugmentationNames.SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies \" + \"using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25,\n });\n SmartSonar.addToFactions([\"Slum Snakes\"]);\n if (augmentationExists(AugmentationNames.SmartSonar)) {\n delete Augmentations[AugmentationNames.SmartSonar];\n }\n AddToAugmentations(SmartSonar);\n\n const PowerRecirculator = new Augmentation({\n name: AugmentationNames.PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info:\n \"The body's nerves are attached with polypyrrole nanocircuits that \" +\n \"are capable of capturing wasted energy, in the form of heat, \" +\n \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1,\n });\n PowerRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\", \"NWO\"]);\n if (augmentationExists(AugmentationNames.PowerRecirculator)) {\n delete Augmentations[AugmentationNames.PowerRecirculator];\n }\n AddToAugmentations(PowerRecirculator);\n\n // Unique AUGS (Each Faction gets one unique augmentation)\n // Factions that already have unique augs up to this point:\n // Slum Snakes, CyberSec, Netburners, Fulcrum Secret Technologies,\n // Silhouette\n\n // Illuminati\n const QLink = new Augmentation({\n name: AugmentationNames.QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info:\n \"A brain implant that wirelessly connects you to the Illuminati's \" +\n \"quantum supercomputer, allowing you to access and use its incredible \" +\n \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4,\n });\n QLink.addToFactions([\"Illuminati\"]);\n if (augmentationExists(AugmentationNames.QLink)) {\n delete Augmentations[AugmentationNames.QLink];\n }\n AddToAugmentations(QLink);\n\n // Daedalus\n const RedPill = new Augmentation({\n name: AugmentationNames.TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: null,\n });\n RedPill.addToFactions([\"Daedalus\"]);\n if (augmentationExists(AugmentationNames.TheRedPill)) {\n delete Augmentations[AugmentationNames.TheRedPill];\n }\n AddToAugmentations(RedPill);\n\n // Covenant\n const SPTN97 = new Augmentation({\n name: AugmentationNames.SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info:\n \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" +\n \"artificially-synthesized gene that was developed by DARPA to create \" +\n \"super-soldiers through genetic modification. The gene was outlawed in \" +\n \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15,\n });\n SPTN97.addToFactions([\"The Covenant\"]);\n if (augmentationExists(AugmentationNames.SPTN97)) {\n delete Augmentations[AugmentationNames.SPTN97];\n }\n AddToAugmentations(SPTN97);\n\n // ECorp\n const HiveMind = new Augmentation({\n name: AugmentationNames.HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info:\n \"A brain implant developed by ECorp. They do not reveal what \" +\n \"exactly the implant does, but they promise that it will greatly \" +\n \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: null,\n });\n HiveMind.addToFactions([\"ECorp\"]);\n if (augmentationExists(AugmentationNames.HiveMind)) {\n delete Augmentations[AugmentationNames.HiveMind];\n }\n AddToAugmentations(HiveMind);\n\n // MegaCorp\n const CordiARCReactor = new Augmentation({\n name: AugmentationNames.CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info:\n \"The thoracic cavity is equipped with a small chamber designed \" +\n \"to hold and sustain hydrogen plasma. The plasma is used to generate \" +\n \"fusion power through nuclear fusion, providing limitless amounts of clean \" +\n \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35,\n });\n CordiARCReactor.addToFactions([\"MegaCorp\"]);\n if (augmentationExists(AugmentationNames.CordiARCReactor)) {\n delete Augmentations[AugmentationNames.CordiARCReactor];\n }\n AddToAugmentations(CordiARCReactor);\n\n // BachmanAndAssociates\n const SmartJaw = new Augmentation({\n name: AugmentationNames.SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic jaw that contains advanced hardware and software \" +\n \"capable of psychoanalyzing and profiling the personality of \" +\n \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25,\n });\n SmartJaw.addToFactions([\"Bachman & Associates\"]);\n if (augmentationExists(AugmentationNames.SmartJaw)) {\n delete Augmentations[AugmentationNames.SmartJaw];\n }\n AddToAugmentations(SmartJaw);\n\n // BladeIndustries\n const Neotra = new Augmentation({\n name: AugmentationNames.Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info:\n \"A highly-advanced techno-organic drug that is injected into the skeletal \" +\n \"and integumentary system. The drug permanently modifies the DNA of the \" +\n \"body's skin and bone cells, granting them the ability to repair \" +\n \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55,\n });\n Neotra.addToFactions([\"Blade Industries\"]);\n if (augmentationExists(AugmentationNames.Neotra)) {\n delete Augmentations[AugmentationNames.Neotra];\n }\n AddToAugmentations(Neotra);\n\n // NWO\n const Xanipher = new Augmentation({\n name: AugmentationNames.Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info:\n \"A concoction of advanced nanobots that is orally ingested into the \" +\n \"body. These nanobots induce physiological changes and significantly \" +\n \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15,\n });\n Xanipher.addToFactions([\"NWO\"]);\n if (augmentationExists(AugmentationNames.Xanipher)) {\n delete Augmentations[AugmentationNames.Xanipher];\n }\n AddToAugmentations(Xanipher);\n\n const HydroflameLeftArm = new Augmentation({\n name: AugmentationNames.HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info:\n \"The left arm of a legendary BitRunner who ascended beyond this world. \" +\n \"It projects a light blue energy shield that protects the exposed inner parts. \" +\n \"Even though it contains no weapons, the advanced tungsten titanium \" +\n \"alloy increases the users strength to unbelievable levels. The augmentation \" +\n \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7,\n });\n HydroflameLeftArm.addToFactions([\"NWO\"]);\n if (augmentationExists(AugmentationNames.HydroflameLeftArm)) {\n delete Augmentations[AugmentationNames.HydroflameLeftArm];\n }\n AddToAugmentations(HydroflameLeftArm);\n\n // ClarkeIncorporated\n const nextSENS = new Augmentation({\n name: AugmentationNames.nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info:\n \"The body is genetically re-engineered to maintain a state \" +\n \"of negligible senescence, preventing the body from \" +\n \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n });\n nextSENS.addToFactions([\"Clarke Incorporated\"]);\n if (augmentationExists(AugmentationNames.nextSENS)) {\n delete Augmentations[AugmentationNames.nextSENS];\n }\n AddToAugmentations(nextSENS);\n\n // OmniTekIncorporated\n const OmniTekInfoLoad = new Augmentation({\n name: AugmentationNames.OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info:\n \"OmniTek's data and information repository is uploaded \" +\n \"into your brain, enhancing your programming and \" +\n \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25,\n });\n OmniTekInfoLoad.addToFactions([\"OmniTek Incorporated\"]);\n if (augmentationExists(AugmentationNames.OmniTekInfoLoad)) {\n delete Augmentations[AugmentationNames.OmniTekInfoLoad];\n }\n AddToAugmentations(OmniTekInfoLoad);\n\n // FourSigma\n // TODO Later when Intelligence is added in . Some aug that greatly increases int\n\n // KuaiGongInternational\n const PhotosyntheticCells = new Augmentation({\n name: AugmentationNames.PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info:\n \"Chloroplasts are added to epidermal stem cells and are applied \" +\n \"to the body using a skin graft. The result is photosynthetic \" +\n \"skin cells, allowing users to generate their own energy \" +\n \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4,\n });\n PhotosyntheticCells.addToFactions([\"KuaiGong International\"]);\n if (augmentationExists(AugmentationNames.PhotosyntheticCells)) {\n delete Augmentations[AugmentationNames.PhotosyntheticCells];\n }\n AddToAugmentations(PhotosyntheticCells);\n\n // BitRunners\n const Neurolink = new Augmentation({\n name: AugmentationNames.Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info:\n \"A brain implant that provides a high-bandwidth, direct neural link between your \" +\n \"mind and the BitRunners' data servers, which reportedly contain \" +\n \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [Programs.FTPCrackProgram.name, Programs.RelaySMTPProgram.name],\n });\n Neurolink.addToFactions([\"BitRunners\"]);\n if (augmentationExists(AugmentationNames.Neurolink)) {\n delete Augmentations[AugmentationNames.Neurolink];\n }\n AddToAugmentations(Neurolink);\n\n // BlackHand\n const TheBlackHand = new Augmentation({\n name: AugmentationNames.TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info:\n \"A highly advanced bionic hand. This prosthetic not only \" +\n \"enhances strength and dexterity but it is also embedded \" +\n \"with hardware and firmware that lets the user connect to, access, and hack \" +\n \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1,\n });\n TheBlackHand.addToFactions([\"The Black Hand\"]);\n if (augmentationExists(AugmentationNames.TheBlackHand)) {\n delete Augmentations[AugmentationNames.TheBlackHand];\n }\n AddToAugmentations(TheBlackHand);\n\n // NiteSec\n const CRTX42AA = new Augmentation({\n name: AugmentationNames.CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info:\n \"The CRTX42-AA gene is injected into the genome. \" +\n \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" +\n \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15,\n });\n CRTX42AA.addToFactions([\"NiteSec\"]);\n if (augmentationExists(AugmentationNames.CRTX42AA)) {\n delete Augmentations[AugmentationNames.CRTX42AA];\n }\n AddToAugmentations(CRTX42AA);\n\n // Chongqing\n const Neuregen = new Augmentation({\n name: AugmentationNames.Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info:\n \"A drug that genetically modifies the neurons in the brain \" +\n \"resulting in neurons never die, continuously \" +\n \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4,\n });\n Neuregen.addToFactions([\"Chongqing\"]);\n if (augmentationExists(AugmentationNames.Neuregen)) {\n delete Augmentations[AugmentationNames.Neuregen];\n }\n AddToAugmentations(Neuregen);\n\n // Sector12\n const CashRoot = new Augmentation({\n name: AugmentationNames.CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: (\n <>\n A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the\n chip allows you to connect it to a computer and upload the assets.\n \n ),\n startingMoney: 1e6,\n programs: [Programs.BruteSSHProgram.name],\n });\n CashRoot.addToFactions([\"Sector-12\"]);\n if (augmentationExists(AugmentationNames.CashRoot)) {\n delete Augmentations[AugmentationNames.CashRoot];\n }\n AddToAugmentations(CashRoot);\n\n // NewTokyo\n const NutriGen = new Augmentation({\n name: AugmentationNames.NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info:\n \"A thermo-powered artificial nutrition generator. Endogenously \" +\n \"synthesizes glucose, amino acids, and vitamins and redistributes them \" +\n \"across the body. The device is powered by the body's naturally wasted \" +\n \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n });\n NutriGen.addToFactions([\"New Tokyo\"]);\n if (augmentationExists(AugmentationNames.NutriGen)) {\n delete Augmentations[AugmentationNames.NutriGen];\n }\n AddToAugmentations(NutriGen);\n\n // Aevum\n const PCMatrix = new Augmentation({\n name: AugmentationNames.PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info:\n \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" +\n \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" +\n \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [Programs.DeepscanV1.name, Programs.AutoLink.name],\n });\n PCMatrix.addToFactions([\"Aevum\"]);\n if (augmentationExists(AugmentationNames.PCMatrix)) {\n delete Augmentations[AugmentationNames.PCMatrix];\n }\n AddToAugmentations(PCMatrix);\n\n // Ishima\n const INFRARet = new Augmentation({\n name: AugmentationNames.INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info:\n \"A tiny chip that sits behind the retinae. This implant lets the\" + \"user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1,\n });\n INFRARet.addToFactions([\"Ishima\"]);\n if (augmentationExists(AugmentationNames.INFRARet)) {\n delete Augmentations[AugmentationNames.INFRARet];\n }\n AddToAugmentations(INFRARet);\n\n // Volhaven\n const DermaForce = new Augmentation({\n name: AugmentationNames.DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info:\n \"Synthetic skin that is grafted onto the body. This skin consists of \" +\n \"millions of nanobots capable of projecting high-density muon beams, \" +\n \"creating an energy barrier around the user.\",\n defense_mult: 1.4,\n });\n DermaForce.addToFactions([\"Volhaven\"]);\n if (augmentationExists(AugmentationNames.DermaForce)) {\n delete Augmentations[AugmentationNames.DermaForce];\n }\n AddToAugmentations(DermaForce);\n\n // SpeakersForTheDead\n const GrapheneBrachiBlades = new Augmentation({\n name: AugmentationNames.GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info:\n \"An upgrade to the BrachiBlades augmentation. It infuses \" +\n \"the retractable blades with an advanced graphene material \" +\n \"making them stronger and lighter.\",\n prereqs: [AugmentationNames.BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3,\n });\n GrapheneBrachiBlades.addToFactions([\"Speakers for the Dead\"]);\n if (augmentationExists(AugmentationNames.GrapheneBrachiBlades)) {\n delete Augmentations[AugmentationNames.GrapheneBrachiBlades];\n }\n AddToAugmentations(GrapheneBrachiBlades);\n\n // DarkArmy\n const GrapheneBionicArms = new Augmentation({\n name: AugmentationNames.GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info:\n \"An upgrade to the Bionic Arms augmentation. It infuses the \" +\n \"prosthetic arms with an advanced graphene material \" +\n \"to make them stronger and lighter.\",\n prereqs: [AugmentationNames.BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85,\n });\n GrapheneBionicArms.addToFactions([\"The Dark Army\"]);\n if (augmentationExists(AugmentationNames.GrapheneBionicArms)) {\n delete Augmentations[AugmentationNames.GrapheneBionicArms];\n }\n AddToAugmentations(GrapheneBionicArms);\n\n // TheSyndicate\n const BrachiBlades = new Augmentation({\n name: AugmentationNames.BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15,\n });\n BrachiBlades.addToFactions([\"The Syndicate\"]);\n if (augmentationExists(AugmentationNames.BrachiBlades)) {\n delete Augmentations[AugmentationNames.BrachiBlades];\n }\n AddToAugmentations(BrachiBlades);\n\n // Tetrads\n const BionicArms = new Augmentation({\n name: AugmentationNames.BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info:\n \"Cybernetic arms created from plasteel and carbon fibers that completely replace \" + \"the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3,\n });\n BionicArms.addToFactions([\"Tetrads\"]);\n if (augmentationExists(AugmentationNames.BionicArms)) {\n delete Augmentations[AugmentationNames.BionicArms];\n }\n AddToAugmentations(BionicArms);\n\n // TianDiHui\n const SNA = new Augmentation({\n name: AugmentationNames.SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info:\n \"A cranial implant that affects the user's personality, making them better \" +\n \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n });\n SNA.addToFactions([\"Tian Di Hui\"]);\n if (augmentationExists(AugmentationNames.SNA)) {\n delete Augmentations[AugmentationNames.SNA];\n }\n AddToAugmentations(SNA);\n\n const NeuroreceptorManager = new Augmentation({\n name: AugmentationNames.NeuroreceptorManager,\n repCost: 0.75e5,\n moneyCost: 5.5e8,\n info:\n \"A brain implant carefully assembled around the synapses, which \" +\n \"micromanages the activity and levels of various neuroreceptor \" +\n \"chemicals and modulates electrical acvitiy to optimize concentration, \" +\n \"allowing the user to multitask much more effectively.\",\n stats: (\n <>\n This augmentation removes the penalty for not focusing on actions such as working in a job or working for a\n faction.\n \n ),\n });\n NeuroreceptorManager.addToFactions([\"Tian Di Hui\"]);\n if (augmentationExists(AugmentationNames.NeuroreceptorManager)) {\n delete Augmentations[AugmentationNames.NeuroreceptorManager];\n }\n AddToAugmentations(NeuroreceptorManager);\n\n // Special Bladeburner Augmentations\n const BladeburnersFactionName = \"Bladeburners\";\n if (factionExists(BladeburnersFactionName)) {\n const EsperEyewear = new Augmentation({\n name: AugmentationNames.EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info:\n \"Ballistic-grade protective and retractable eyewear that was designed specifically \" +\n \"for Bladeburner units. This \" +\n \"is implanted by installing a mechanical frame in the skull's orbit. \" +\n \"This frame interfaces with the brain and allows the user to \" +\n \"automatically extrude and extract the eyewear. The eyewear protects \" +\n \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" +\n \"embedded with a data processing chip that can be programmed to display an \" +\n \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true,\n });\n EsperEyewear.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EsperEyewear);\n\n const EMS4Recombination = new Augmentation({\n name: AugmentationNames.EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info:\n \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" +\n \"technique was originally used on Bladeburners during the Synthoid uprising \" +\n \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" +\n \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true,\n });\n EMS4Recombination.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EMS4Recombination);\n\n const OrionShoulder = new Augmentation({\n name: AugmentationNames.OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info:\n \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" +\n \"the ORION-MKIV shoulder enhances the strength and dexterity \" +\n \"of the user's right arm. It also provides protection due to its \" +\n \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true,\n });\n OrionShoulder.addToFactions([BladeburnersFactionName]);\n resetAugmentation(OrionShoulder);\n\n const HyperionV1 = new Augmentation({\n name: AugmentationNames.HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" +\n \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" +\n \"be used against augmented enemies as the ionized \" +\n \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" +\n \"it can also be effective against non-augmented enemies due to its high temperature \" +\n \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n });\n HyperionV1.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV1);\n\n const HyperionV2 = new Augmentation({\n name: AugmentationNames.HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. This augmentation \" +\n \"is more advanced and powerful than the original V1 model. This V2 model is \" +\n \"more power-efficient, more accurate, and can fire plasma bolts at a much \" +\n \"higher velocity than the V1 model.\",\n prereqs: [AugmentationNames.HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n });\n HyperionV2.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV2);\n\n const GolemSerum = new Augmentation({\n name: AugmentationNames.GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info:\n \"A serum that permanently enhances many aspects of human capabilities, \" +\n \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" +\n \"serum was originally developed by the Chinese military in an attempt to \" +\n \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true,\n });\n GolemSerum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(GolemSerum);\n\n const VangelisVirus = new Augmentation({\n name: AugmentationNames.VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" +\n \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true,\n });\n VangelisVirus.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus);\n\n const VangelisVirus3 = new Augmentation({\n name: AugmentationNames.VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info:\n \"An improved version of Vangelis, a synthetic symbiotic virus that is \" +\n \"injected into human brain tissue. On top of the benefits of the original \" +\n \"virus, this also grants an accelerated healing factor and enhanced \" +\n \"reflexes.\",\n prereqs: [AugmentationNames.VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true,\n });\n VangelisVirus3.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus3);\n\n const INTERLINKED = new Augmentation({\n name: AugmentationNames.INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"The DNA is genetically modified to enhance the human's body \" +\n \"extracellular matrix (ECM). This improves the ECM's ability to \" +\n \"structurally support the body and grants heightened strength and \" +\n \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true,\n });\n INTERLINKED.addToFactions([BladeburnersFactionName]);\n resetAugmentation(INTERLINKED);\n\n const BladeRunner = new Augmentation({\n name: AugmentationNames.BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info:\n \"A cybernetic foot augmentation that was specifically created for Bladeburners \" +\n \"during the Synthoid Uprising. The organic musculature of the human foot \" +\n \"is enhanced with flexible carbon nanotube matrices that are controlled by \" +\n \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true,\n });\n BladeRunner.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeRunner);\n\n const BladeArmor = new Augmentation({\n name: AugmentationNames.BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info:\n \"A powered exoskeleton suit designed as armor for Bladeburner units. This \" +\n \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" +\n \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" +\n \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true,\n });\n BladeArmor.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmor);\n\n const BladeArmorPowerCells = new Augmentation({\n name: AugmentationNames.BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" +\n \"more efficiently storing and using power.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true,\n });\n BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorPowerCells);\n\n const BladeArmorEnergyShielding = new Augmentation({\n name: AugmentationNames.BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" +\n \"that is capable of projecting an energy shielding force field.\",\n prereqs: [AugmentationNames.BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n });\n BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorEnergyShielding);\n\n const BladeArmorUnibeam = new Augmentation({\n name: AugmentationNames.BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" +\n \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" +\n \"threats while keeping casualties to a minimum.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n });\n BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorUnibeam);\n\n const BladeArmorOmnibeam = new Augmentation({\n name: AugmentationNames.BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" +\n \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" +\n \"modules that combine together to form a single, more powerful beam of up to \" +\n \"2000MW.\",\n prereqs: [AugmentationNames.BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true,\n });\n BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorOmnibeam);\n\n const BladeArmorIPU = new Augmentation({\n name: AugmentationNames.BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" +\n \"Unit that was specially designed to analyze Synthoid related data and \" +\n \"information.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true,\n });\n BladeArmorIPU.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorIPU);\n\n const BladesSimulacrum = new Augmentation({\n name: AugmentationNames.BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info:\n \"A highly-advanced matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation allows \" +\n \"the user to project and control a holographic simulacrum within an \" +\n \"extremely large radius. These specially-modified holograms were specifically \" +\n \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: (\n <>\n This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting\n crimes, etc.) at the same time.\n \n ),\n isSpecial: true,\n });\n BladesSimulacrum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladesSimulacrum);\n }\n\n // Special CotMG Augmentations\n const ChurchOfTheMachineGodFactionName = \"Church of the Machine God\";\n if (factionExists(ChurchOfTheMachineGodFactionName)) {\n const StaneksGift1 = new Augmentation({\n name: AugmentationNames.StaneksGift1,\n repCost: 0,\n moneyCost: 0,\n info:\n 'Allison \"Mother\" Stanek imparts you with her gift. An ' +\n \"experimental Augmentation implanted at the base of the neck. \" +\n \"It allows you to overclock your entire system by carefully \" +\n \"changing the configuration.\",\n isSpecial: true,\n hacking_chance_mult: 0.9,\n hacking_speed_mult: 0.9,\n hacking_money_mult: 0.9,\n hacking_grow_mult: 0.9,\n hacking_mult: 0.9,\n strength_mult: 0.9,\n defense_mult: 0.9,\n dexterity_mult: 0.9,\n agility_mult: 0.9,\n charisma_mult: 0.9,\n hacking_exp_mult: 0.9,\n strength_exp_mult: 0.9,\n defense_exp_mult: 0.9,\n dexterity_exp_mult: 0.9,\n agility_exp_mult: 0.9,\n charisma_exp_mult: 0.9,\n company_rep_mult: 0.9,\n faction_rep_mult: 0.9,\n crime_money_mult: 0.9,\n crime_success_mult: 0.9,\n hacknet_node_money_mult: 0.9,\n hacknet_node_purchase_cost_mult: 1.1,\n hacknet_node_ram_cost_mult: 1.1,\n hacknet_node_core_cost_mult: 1.1,\n hacknet_node_level_cost_mult: 1.1,\n work_money_mult: 0.9,\n stats: <>Its unstable nature decreases all your stats by 10%,\n });\n StaneksGift1.addToFactions([ChurchOfTheMachineGodFactionName]);\n resetAugmentation(StaneksGift1);\n\n const StaneksGift2 = new Augmentation({\n name: AugmentationNames.StaneksGift2,\n repCost: 1e6,\n moneyCost: 0,\n info:\n \"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human \" +\n \"organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon \" +\n \"your frame granting lesser penalty of 5% to all stats.\",\n prereqs: [AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance_mult: 0.95 / 0.9,\n hacking_speed_mult: 0.95 / 0.9,\n hacking_money_mult: 0.95 / 0.9,\n hacking_grow_mult: 0.95 / 0.9,\n hacking_mult: 0.95 / 0.9,\n strength_mult: 0.95 / 0.9,\n defense_mult: 0.95 / 0.9,\n dexterity_mult: 0.95 / 0.9,\n agility_mult: 0.95 / 0.9,\n charisma_mult: 0.95 / 0.9,\n hacking_exp_mult: 0.95 / 0.9,\n strength_exp_mult: 0.95 / 0.9,\n defense_exp_mult: 0.95 / 0.9,\n dexterity_exp_mult: 0.95 / 0.9,\n agility_exp_mult: 0.95 / 0.9,\n charisma_exp_mult: 0.95 / 0.9,\n company_rep_mult: 0.95 / 0.9,\n faction_rep_mult: 0.95 / 0.9,\n crime_money_mult: 0.95 / 0.9,\n crime_success_mult: 0.95 / 0.9,\n hacknet_node_money_mult: 0.95 / 0.9,\n hacknet_node_purchase_cost_mult: 1.05 / 1.1,\n hacknet_node_ram_cost_mult: 1.05 / 1.1,\n hacknet_node_core_cost_mult: 1.05 / 1.1,\n hacknet_node_level_cost_mult: 1.05 / 1.1,\n work_money_mult: 0.95 / 0.9,\n stats: <>The penalty for the gift is reduced to 5%,\n });\n StaneksGift2.addToFactions([ChurchOfTheMachineGodFactionName]);\n resetAugmentation(StaneksGift2);\n\n const StaneksGift3 = new Augmentation({\n name: AugmentationNames.StaneksGift3,\n repCost: 1e8,\n moneyCost: 0,\n info:\n \"The synthesis of human and machine is nothing to fear. It is our destiny. \" +\n \"You will become greater than the sum of our parts. As One. Embrace your gift \" +\n \"fully and wholly free of it's accursed toll. Serenity brings tranquility the form \" +\n \"of no longer suffering a stat penalty. \",\n prereqs: [AugmentationNames.StaneksGift2],\n isSpecial: true,\n hacking_chance_mult: 1 / 0.95,\n hacking_speed_mult: 1 / 0.95,\n hacking_money_mult: 1 / 0.95,\n hacking_grow_mult: 1 / 0.95,\n hacking_mult: 1 / 0.95,\n strength_mult: 1 / 0.95,\n defense_mult: 1 / 0.95,\n dexterity_mult: 1 / 0.95,\n agility_mult: 1 / 0.95,\n charisma_mult: 1 / 0.95,\n hacking_exp_mult: 1 / 0.95,\n strength_exp_mult: 1 / 0.95,\n defense_exp_mult: 1 / 0.95,\n dexterity_exp_mult: 1 / 0.95,\n agility_exp_mult: 1 / 0.95,\n charisma_exp_mult: 1 / 0.95,\n company_rep_mult: 1 / 0.95,\n faction_rep_mult: 1 / 0.95,\n crime_money_mult: 1 / 0.95,\n crime_success_mult: 1 / 0.95,\n hacknet_node_money_mult: 1 / 0.95,\n hacknet_node_purchase_cost_mult: 1 / 1.05,\n hacknet_node_ram_cost_mult: 1 / 1.05,\n hacknet_node_core_cost_mult: 1 / 1.05,\n hacknet_node_level_cost_mult: 1 / 1.05,\n work_money_mult: 1 / 0.95,\n stats: <>Staneks Gift has no penalty.,\n });\n StaneksGift3.addToFactions([ChurchOfTheMachineGodFactionName]);\n resetAugmentation(StaneksGift3);\n }\n\n // Update costs based on how many have been purchased\n mult = Math.pow(\n CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]],\n Player.queuedAugmentations.length,\n );\n for (const name in Augmentations) {\n if (Augmentations.hasOwnProperty(name)) {\n Augmentations[name].baseCost *= mult;\n }\n }\n\n Player.reapplyAllAugmentations();\n}\n\n//Resets an Augmentation during (re-initizliation)\nfunction resetAugmentation(newAugObject: Augmentation): void {\n if (!(newAugObject instanceof Augmentation)) {\n throw new Error(\"Invalid argument 'newAugObject' passed into resetAugmentation\");\n }\n const name = newAugObject.name;\n if (augmentationExists(name)) {\n delete Augmentations[name];\n }\n AddToAugmentations(newAugObject);\n}\n\nfunction applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void {\n Augmentations[aug.name].owned = true;\n\n const augObj = Augmentations[aug.name];\n\n // Apply multipliers\n for (const mult in augObj.mults) {\n const v = Player.getMult(mult) * augObj.mults[mult];\n Player.setMult(mult, v);\n }\n\n // Special logic for NeuroFlux Governor\n if (aug.name === AugmentationNames.NeuroFluxGovernor) {\n if (!reapply) {\n Augmentations[aug.name].level = aug.level;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n Player.augmentations[i].level = aug.level;\n return;\n // break;\n }\n }\n }\n }\n\n // Push onto Player's Augmentation list\n if (!reapply) {\n const ownedAug = new PlayerOwnedAugmentation(aug.name);\n Player.augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations(): boolean {\n if (Player.queuedAugmentations.length == 0) {\n dialogBoxCreate(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n let augmentationList = \"\";\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n const ownedAug = Player.queuedAugmentations[i];\n const aug = Augmentations[ownedAug.name];\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(Player.queuedAugmentations[i]);\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n\n let level = \"\";\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n augmentationList += aug.name + level + \"
\";\n }\n Player.queuedAugmentations = [];\n dialogBoxCreate(\n \"You slowly drift to sleep as scientists put you under in order \" +\n \"to install the following Augmentations:
\" +\n augmentationList +\n \"
You wake up in your home...you feel different...\",\n );\n prestigeAugmentation();\n return true;\n}\n\nfunction augmentationExists(name: string): boolean {\n return Augmentations.hasOwnProperty(name);\n}\n\nexport function isRepeatableAug(aug: Augmentation): boolean {\n const augName = aug instanceof Augmentation ? aug.name : aug;\n\n if (augName === AugmentationNames.NeuroFluxGovernor) {\n return true;\n }\n\n return false;\n}\n\nexport { installAugmentations, initAugmentations, applyAugmentation, augmentationExists };\n","import { IMap } from \"./types\";\nimport { Terminal } from \"./Terminal\";\n\nexport let Aliases: IMap = {};\nexport let GlobalAliases: IMap = {};\n\nexport function loadAliases(saveString: string): void {\n if (saveString === \"\") {\n Aliases = {};\n } else {\n Aliases = JSON.parse(saveString);\n }\n}\n\nexport function loadGlobalAliases(saveString: string): void {\n if (saveString === \"\") {\n GlobalAliases = {};\n } else {\n GlobalAliases = JSON.parse(saveString);\n }\n}\n\n// Prints all aliases to terminal\nexport function printAliases(): void {\n for (const name in Aliases) {\n if (Aliases.hasOwnProperty(name)) {\n Terminal.print(\"alias \" + name + \"=\" + Aliases[name]);\n }\n }\n for (const name in GlobalAliases) {\n if (GlobalAliases.hasOwnProperty(name)) {\n Terminal.print(\"global alias \" + name + \"=\" + GlobalAliases[name]);\n }\n }\n}\n\n// Returns true if successful, false otherwise\nexport function parseAliasDeclaration(dec: string, global = false): boolean {\n const re = /^([_|\\w|!|%|,|@]+)=\"(.+)\"$/;\n const matches = dec.match(re);\n if (matches == null || matches.length != 3) {\n return false;\n }\n if (global) {\n addGlobalAlias(matches[1], matches[2]);\n } else {\n addAlias(matches[1], matches[2]);\n }\n return true;\n}\n\nfunction addAlias(name: string, value: string): void {\n if (name in GlobalAliases) {\n delete GlobalAliases[name];\n }\n Aliases[name] = value.trim();\n}\n\nfunction addGlobalAlias(name: string, value: string): void {\n if (name in Aliases) {\n delete Aliases[name];\n }\n GlobalAliases[name] = value.trim();\n}\n\nfunction getAlias(name: string): string | null {\n if (Aliases.hasOwnProperty(name)) {\n return Aliases[name];\n }\n\n return null;\n}\n\nfunction getGlobalAlias(name: string): string | null {\n if (GlobalAliases.hasOwnProperty(name)) {\n return GlobalAliases[name];\n }\n return null;\n}\n\nexport function removeAlias(name: string): boolean {\n if (Aliases.hasOwnProperty(name)) {\n delete Aliases[name];\n return true;\n }\n\n if (GlobalAliases.hasOwnProperty(name)) {\n delete GlobalAliases[name];\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns the original string with any aliases substituted in.\n * Aliases are only applied to \"whole words\", one level deep\n */\nexport function substituteAliases(origCommand: string): string {\n const commandArray = origCommand.split(\" \");\n if (commandArray.length > 0) {\n // For the alias and unalias commands, dont substite\n if (commandArray[0] === \"unalias\" || commandArray[0] === \"alias\") {\n return commandArray.join(\" \");\n }\n\n let somethingSubstituted = true;\n let depth = 0;\n\n while (somethingSubstituted && depth < 10) {\n depth++;\n somethingSubstituted = false;\n const alias = getAlias(commandArray[0])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(0, 1, ...alias);\n //commandArray[0] = alias;\n }\n for (let i = 0; i < commandArray.length; ++i) {\n const alias = getGlobalAlias(commandArray[i])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(i, 1, ...alias);\n i += alias.length - 1;\n //commandArray[i] = alias;\n }\n }\n }\n }\n return commandArray.join(\" \");\n}\n","/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\nimport { generateNextPid } from \"./Netscript/Pid\";\n\nimport { CONSTANTS } from \"./Constants\";\nimport { Interpreter } from \"./ThirdParty/JSInterpreter\";\nimport { isScriptErrorMessage, makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { NetscriptFunctions } from \"./NetscriptFunctions\";\nimport { executeJSScript } from \"./NetscriptJSEvaluator\";\nimport { NetscriptPort, IPort } from \"./NetscriptPort\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport { getRamUsageFromRunningScript } from \"./Script/RunningScriptHelpers\";\nimport { scriptCalculateOfflineProduction } from \"./Script/ScriptHelpers\";\nimport { Script } from \"./Script/Script\";\nimport { GetAllServers } from \"./Server/AllServers\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Settings } from \"./Settings/Settings\";\n\nimport { generate } from \"escodegen\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { roundToTwo } from \"./utils/helpers/roundToTwo\";\nimport { isString } from \"./utils/helpers/isString\";\nimport { sprintf } from \"sprintf-js\";\n\nimport { parse } from \"acorn\";\nimport { simple as walksimple } from \"acorn-walk\";\nimport { areFilesEqual } from \"./Terminal/DirectoryHelpers\";\nimport { Player } from \"./Player\";\n\n// Netscript Ports are instantiated here\nexport const NetscriptPorts: IPort[] = [];\nfor (let i = 0; i < CONSTANTS.NumNetscriptPorts; ++i) {\n NetscriptPorts.push(NetscriptPort());\n}\n\nexport function prestigeWorkerScripts(): void {\n for (const ws of workerScripts.values()) {\n ws.env.stopFlag = true;\n killWorkerScript(ws);\n }\n\n WorkerScriptStartStopEventEmitter.emit();\n workerScripts.clear();\n}\n\n// JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\nfunction startNetscript2Script(workerScript: WorkerScript): Promise {\n workerScript.running = true;\n\n // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n let runningFn: string | null = null;\n\n // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n function wrap(propName: string, f: (...args: any[]) => Promise): (...args: any[]) => Promise {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args: any[]) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw workerScript;\n }\n\n if (propName === \"asleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg =\n \"Concurrent calls to Netscript functions not allowed! \" +\n \"Did you forget to await hack(), grow(), or some other \" +\n \"promise-returning function? (Currently running: %s tried to run: %s)\";\n if (runningFn) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, sprintf(msg, runningFn, propName));\n throw workerScript;\n }\n runningFn = propName;\n\n // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n let result;\n try {\n result = f(...args);\n } catch (e: any) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n for (const prop in workerScript.env.vars) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n }\n workerScript.env.vars.stanek.charge = wrap(\"stanek.prop\", workerScript.env.vars.stanek.charge);\n\n // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n return new Promise((resolve, reject) => {\n executeJSScript(workerScript.getServer().scripts, workerScript)\n .then(() => {\n resolve(workerScript);\n })\n .catch((e) => reject(e));\n }).catch((e) => {\n if (e instanceof Error) {\n if (e instanceof SyntaxError) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + \" (sorry we can't be more helpful)\");\n } else {\n workerScript.errorMessage = makeRuntimeRejectMsg(\n workerScript,\n e.message + ((e.stack && \"\\nstack:\\n\" + e.stack.toString()) || \"\"),\n );\n }\n throw workerScript;\n } else if (isScriptErrorMessage(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n }\n throw e; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript: WorkerScript): Promise {\n const code = workerScript.code;\n workerScript.running = true;\n\n //Process imports\n let codeWithImports, codeLineOffset;\n try {\n const importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e: any) {\n dialogBoxCreate(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n\n const interpreterInitialization = function (int: any, scope: any): void {\n //Add the Netscript environment\n const ns = NetscriptFunctions(workerScript);\n for (const name in ns) {\n const entry = ns[name];\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if ([\"hack\", \"grow\", \"weaken\", \"sleep\", \"prompt\", \"manualHack\", \"scp\", \"write\"].includes(name)) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n for (let i = 0; i < args.length - 1; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n const cb = args[args.length - 1];\n const fnPromise = entry(...fnArgs);\n fnPromise\n .then(function (res: any) {\n cb(res);\n })\n .catch(function (err: any) {\n // workerscript is when you cancel a delay\n if (!(err instanceof WorkerScript)) console.error(err);\n });\n };\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (\n name === \"sprintf\" ||\n name === \"vsprintf\" ||\n name === \"scp\" ||\n name == \"write\" ||\n name === \"tryWrite\" ||\n name === \"run\" ||\n name === \"exec\"\n ) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n for (let i = 0; i < args.length; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n\n return entry(...fnArgs);\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n const tempWrapper = function (...args: any[]): any {\n const res = entry(...args);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n }\n\n //Add the arguments\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n let interpreter: any;\n try {\n interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e: any) {\n dialogBoxCreate(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter(): void {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n let more = true;\n let i = 0;\n while (i < 3 && more) {\n more = more && interpreter.step();\n i++;\n }\n\n if (more) {\n setTimeout(runInterpreter, Settings.CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e: any) {\n e = e.toString();\n if (!isScriptErrorMessage(e)) {\n e = makeRuntimeRejectMsg(workerScript, e);\n }\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e: any) {\n if (isString(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof WorkerScript) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\n }\n });\n}\n\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\nfunction processNetscript1Imports(code: string, workerScript: WorkerScript): any {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast: any = parse(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n const server = workerScript.getServer();\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName: string): Script | null {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n let hasImports = false;\n\n // Walk over the tree and process ImportDeclaration nodes\n walksimple(ast, {\n ImportDeclaration: (node: any) => {\n hasImports = true;\n let scriptName = node.source.value;\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n const script = getScript(scriptName);\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n const scriptAst = parse(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n const namespace = node.specifiers[0].local.name;\n const fnNames: string[] = []; //Names only\n const fnDeclarations: any[] = []; //FunctionDeclaration Node objects\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n },\n });\n\n //Now we have to generate the code that would create the namespace\n generatedCode += \"var \" + namespace + \";\\n\" + \"(function (namespace) {\\n\";\n\n //Add the function declarations\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n\n //Add functions to namespace\n fnNames.forEach((fnName) => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n });\n\n //Finish\n generatedCode += \"})(\" + namespace + \" || \" + \"(\" + namespace + \" = {}));\\n\";\n } else {\n //import {...} from script\n\n //Get array of all fns to import\n const fnsToImport: string[] = [];\n node.specifiers.forEach((e: any) => {\n fnsToImport.push(e.local.name);\n });\n\n //Walk through script and get FunctionDeclaration code for all specified fns\n const fnDeclarations: any[] = [];\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n },\n });\n\n //Convert FunctionDeclarations into code\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n }\n },\n });\n\n //If there are no imports, just return the original code\n if (!hasImports) {\n return { code: code, lineOffset: 0 };\n }\n\n //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n let linesRemoved = 0;\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n }\n\n //Calculated line offset\n const lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved;\n\n //Convert the AST back into code\n code = generate(ast);\n\n //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n code = generatedCode + code;\n\n const res = {\n code: code,\n lineOffset: lineOffset,\n };\n return res;\n}\n\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\nexport function startWorkerScript(runningScript: RunningScript, server: BaseServer, parent?: WorkerScript): number {\n if (createAndAddWorkerScript(runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript);\n\n // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n return runningScript.pid;\n }\n\n return 0;\n}\n\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\nfunction createAndAddWorkerScript(runningScriptObj: RunningScript, server: BaseServer, parent?: WorkerScript): boolean {\n // Update server's ram usage\n let threads = 1;\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n const oneRamUsage = getRamUsageFromRunningScript(runningScriptObj);\n const ramUsage = roundToTwo(oneRamUsage * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n if (ramUsage > ramAvailable) {\n dialogBoxCreate(\n `Not enough RAM to run script ${runningScriptObj.filename} with args ` +\n `${arrayToString(runningScriptObj.args)}. This likely occurred because you re-loaded ` +\n `the game and the script's RAM usage increased (either because of an update to the game or ` +\n `your changes to the script.)`,\n );\n return false;\n }\n\n server.updateRamUsed(roundToTwo(server.ramUsed + ramUsage), Player);\n\n // Get the pid\n const pid = generateNextPid();\n if (pid === -1) {\n throw new Error(\n `Failed to start script because could not find available PID. This is most ` +\n `because you have too many scripts running.`,\n );\n }\n\n // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n const s = new WorkerScript(runningScriptObj, pid, NetscriptFunctions);\n s.ramUsage = oneRamUsage;\n\n // Add the WorkerScript to the global pool\n workerScripts.set(pid, s);\n WorkerScriptStartStopEventEmitter.emit();\n\n // Start the script's execution\n let p: Promise | null = null; // Script's resulting promise\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(s);\n } else {\n p = startNetscript1Script(s);\n if (!(p instanceof Promise)) {\n return false;\n }\n }\n\n // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n p.then(function (w: WorkerScript) {\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent !== undefined) {\n if (parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n }\n }\n\n killWorkerScript(s);\n w.log(\"\", () => \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else if (w instanceof WorkerScript) {\n if (isScriptErrorMessage(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|DELIMITER|\");\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + w.errorMessage);\n return;\n }\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `RUNTIME ERROR
${scriptName}@${hostname}
`;\n if (w.args.length > 0) {\n msg += `Args: ${arrayToString(w.args)}
`;\n }\n msg += \"
\";\n msg += errorMsg;\n\n dialogBoxCreate(msg);\n w.log(\"\", () => \"Script crashed with runtime error\");\n } else {\n w.log(\"\", () => \"Script killed\");\n return; // Already killed, so stop here\n }\n w.running = false;\n w.env.stopFlag = true;\n } else if (isScriptErrorMessage(w)) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\n \"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" +\n w.toString(),\n );\n return;\n } else {\n dialogBoxCreate(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n killWorkerScript(s);\n });\n\n return true;\n}\n\n/**\n * Updates the online running time stat of all running scripts\n */\nexport function updateOnlineScriptTimes(numCycles = 1): void {\n const time = (numCycles * CONSTANTS._idleSpeed) / 1000; //seconds\n for (const ws of workerScripts.values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\nexport function loadAllRunningScripts(): void {\n const skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n if (skipScriptLoad) {\n console.info(\"Skipping the load of any scripts during startup\");\n }\n for (const server of GetAllServers()) {\n // Reset each server's RAM usage to 0\n server.ramUsed = 0;\n\n // Reset modules on all scripts\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n createAndAddWorkerScript(server.runningScripts[j], server);\n\n // Offline production\n scriptCalculateOfflineProduction(server.runningScripts[j]);\n }\n }\n }\n}\n\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\nexport function runScriptFromScript(\n caller: string,\n server: BaseServer,\n scriptname: string,\n args: any[],\n workerScript: WorkerScript,\n threads = 1,\n): number {\n // Sanitize arguments\n if (!(workerScript instanceof WorkerScript)) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n }\n\n args.forEach((arg, i) => {\n if (typeof arg !== \"string\" && typeof arg !== \"number\" && typeof arg !== \"boolean\")\n throw new Error(\n \"Only strings, numbers, and booleans can be passed as arguments to other scripts.\\n\" +\n `${scriptname} argument index ${i} is of type ${typeof arg} and value ${JSON.stringify(arg)}`,\n );\n });\n\n // Check if the script is already running\n const runningScriptObj = server.getRunningScript(scriptname, args);\n if (runningScriptObj != null) {\n workerScript.log(caller, () => `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n }\n\n // 'null/undefined' arguments are not allowed\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, () => \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; ++i) {\n if (!areFilesEqual(server.scripts[i].filename, scriptname)) continue;\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.round(Number(threads));\n if (threads === 0) {\n return 0;\n }\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, () => `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(\n caller,\n () =>\n `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,\n );\n return 0;\n } else {\n // Able to run script\n workerScript.log(\n caller,\n () => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,\n );\n const runningScriptObj = new RunningScript(script, args);\n runningScriptObj.threads = threads;\n\n return startWorkerScript(runningScriptObj, server, workerScript);\n }\n break;\n }\n\n workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n","/**\n * Lore / world building literature files that can be found on servers.\n * These files can be read by the player\n */\nexport class Literature {\n title: string;\n fn: string;\n txt: string;\n\n constructor(title: string, filename: string, txt: string) {\n this.title = title;\n this.fn = filename;\n this.txt = txt;\n }\n}\n","import React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n value: string;\n color?: string;\n variant?:\n | \"button\"\n | \"caption\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"overline\"\n | \"inherit\"\n | undefined;\n};\n\nexport function CopyableText(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n function copy(): void {\n const copyText = document.createElement(\"textarea\");\n copyText.value = props.value;\n document.body.appendChild(copyText);\n copyText.select();\n copyText.setSelectionRange(0, 1e10);\n document.execCommand(\"copy\");\n document.body.removeChild(copyText);\n setOpen(true);\n setTimeout(() => setOpen(false), 1000);\n }\n\n return (\n Copied!}>\n \n {props.value}\n \n \n );\n}\n","export interface IMults {\n hack?: number;\n str?: number;\n def?: number;\n dex?: number;\n agi?: number;\n cha?: number;\n}\n\nexport enum UpgradeType {\n Weapon = \"w\",\n Armor = \"a\",\n Vehicle = \"v\",\n Rootkit = \"r\",\n Augmentation = \"g\",\n}\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\ninterface IGangMemberUpgradeMetadata {\n cost: number;\n mults: IMults;\n name: string;\n upgType: UpgradeType;\n}\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nexport const gangMemberUpgradesMetadata: IGangMemberUpgradeMetadata[] = [\n {\n cost: 1e6,\n mults: { str: 1.04, def: 1.04 },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 12e6,\n mults: { str: 1.08, def: 1.08, dex: 1.08 },\n name: \"Katana\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 25e6,\n mults: { str: 1.1, def: 1.1, dex: 1.1, agi: 1.1 },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 50e6,\n mults: { str: 1.12, def: 1.1, agi: 1.1 },\n name: \"P90C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 60e6,\n mults: { str: 1.2, def: 1.15 },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 100e6,\n mults: { str: 1.25, def: 1.2 },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 150e6,\n mults: { str: 1.3, def: 1.25 },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 225e6,\n mults: { str: 1.3, dex: 1.25, agi: 1.3 },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 2e6,\n mults: { def: 1.04 },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 5e6,\n mults: { def: 1.08 },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 25e6,\n mults: { def: 1.15, agi: 1.15 },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 40e6,\n mults: { def: 1.2 },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 3e6,\n mults: { agi: 1.04, cha: 1.04 },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 9e6,\n mults: { agi: 1.08, cha: 1.08 },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 18e6,\n mults: { agi: 1.12, cha: 1.12 },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 30e6,\n mults: { agi: 1.16, cha: 1.16 },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 5e6,\n mults: { hack: 1.05 },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 25e6,\n mults: { hack: 1.1 },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 40e6,\n mults: { hack: 1.12 },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 10e9,\n mults: { str: 1.3, dex: 1.3 },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { agi: 1.6 },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.15, def: 1.15, dex: 1.15, agi: 1.15 },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 20e9,\n mults: { str: 1.4, def: 1.4 },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 12e9,\n mults: { str: 1.2, def: 1.2 },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 25e9,\n mults: { str: 1.5, agi: 1.5 },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.3, def: 1.3 },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 5e9,\n mults: { hack: 1.05 },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { hack: 1.15 },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 7.5e9,\n mults: { hack: 1.1 },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 50e9,\n mults: { str: 1.7, def: 1.7 },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation,\n },\n];\n","/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const workerScripts: Map = new Map();\n","import { IMap } from \"../types\";\n\n// Map of material (by name) to their sizes (how much space it takes in warehouse)\nexport const MaterialSizes: IMap = {\n Water: 0.05,\n Energy: 0.01,\n Food: 0.03,\n Plants: 0.05,\n Metal: 0.1,\n Hardware: 0.06,\n Chemicals: 0.05,\n Drugs: 0.02,\n Robots: 0.5,\n AICores: 0.1,\n RealEstate: 0.005,\n \"Real Estate\": 0.005,\n \"AI Cores\": 0.1,\n};\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetServerConstants } from \"../data/Constants\";\n\nexport function calculateHashGainRate(\n level: number,\n ramUsed: number,\n maxRam: number,\n cores: number,\n mult: number,\n): number {\n const baseGain = HacknetServerConstants.HashesPerLevel * level;\n const ramMultiplier = Math.pow(1.07, Math.log2(maxRam));\n const coreMultiplier = 1 + (cores - 1) / 5;\n const ramRatio = 1 - ramUsed / maxRam;\n\n return baseGain * ramMultiplier * coreMultiplier * ramRatio * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetServerConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return 10 * HacknetServerConstants.BaseCost * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetServerConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetServerConstants.RamBaseCost;\n const mult = Math.pow(HacknetServerConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCores: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCores >= HacknetServerConstants.MaxCores) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCores;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n totalCost *= HacknetServerConstants.CoreBaseCost;\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCacheUpgradeCost(startingCache: number, extraLevels = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCache >= HacknetServerConstants.MaxCache) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCacheMult;\n let totalCost = 0;\n let currentCache = startingCache;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCache - 1);\n ++currentCache;\n }\n totalCost *= HacknetServerConstants.CacheBaseCost;\n\n return totalCost;\n}\n\nexport function calculateServerCost(n: number, mult = 1): number {\n if (n - 1 >= HacknetServerConstants.MaxServers) {\n return Infinity;\n }\n\n return HacknetServerConstants.BaseCost * Math.pow(HacknetServerConstants.PurchaseMult, n - 1) * mult;\n}\n","export enum FactionWorkType {\n Field,\n Hacking,\n None,\n Security,\n}\n","export function calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\n\nexport function calculateExp(skill: number, mult = 1): number {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n","/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\ninterface IProgressBarConfiguration {\n /**\n * Current progress, taken as a decimal (i.e. '0.6' to represent '60%')\n */\n progress?: number;\n\n /**\n * Total number of ticks in progress bar. Preferably a factor of 100.\n */\n totalTicks?: number;\n}\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\ninterface IProgressBarConfigurationMaterialized extends IProgressBarConfiguration {\n progress: number;\n totalTicks: number;\n}\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nexport function createProgressBarText(params: IProgressBarConfiguration): string {\n // Default values\n const defaultParams: IProgressBarConfigurationMaterialized = {\n progress: 0,\n totalTicks: 20,\n };\n\n // tslint:disable-next-line:prefer-object-spread\n const derived: IProgressBarConfigurationMaterialized = Object.assign({}, defaultParams, params);\n // Ensure it is 0..1\n derived.progress = Math.max(Math.min(derived.progress, 1), 0);\n\n // This way there is always at least one bar filled in...\n const bars: number = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes: number = Math.max(derived.totalTicks - bars, 0);\n\n // String.prototype.repeat isn't completley supported, but good enough for our purposes\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Export } from \"./Export\";\n\ninterface IConstructorParams {\n name?: string;\n}\n\nexport class Material {\n // Name of material\n name = \"InitName\";\n\n // Amount of material owned\n qty = 0;\n\n // Material's \"quality\". Unbounded\n qlt = 0;\n\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n dmd = 0;\n dmdR: number[] = [0, 0];\n\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n cmp = 0;\n cmpR: number[] = [0, 0];\n\n // Maximum volatility of this Materials stats\n mv = 0;\n\n // Markup. Determines how high of a price you can charge on the material\n // compared to the market price without suffering loss in # of sales\n // Quality is divided by this to determine markup limits\n // e,g, If mku is 10 and quality is 100 then you can markup prices by 100/10 = 10\n mku = 0;\n\n // How much of this material is being bought, sold, imported and produced every second\n buy = 0;\n sll = 0;\n prd = 0;\n imp = 0;\n\n // Exports of this material to another warehouse/industry\n exp: Export[] = [];\n\n // Total amount of this material exported in the last cycle\n totalExp = 0;\n\n // Cost / sec to buy this material. AKA Market Price\n bCost = 0;\n\n // Cost / sec to sell this material\n sCost: string | number = 0;\n\n // Flags to keep track of whether production and/or sale of this material is limited\n // [Whether production/sale is limited, limit amount]\n prdman: [boolean, number] = [false, 0]; // Production\n sllman: [boolean, string | number] = [false, 0]; // Sale\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price = 0;\n\n constructor(params: IConstructorParams = {}) {\n if (params.name) {\n this.name = params.name;\n }\n this.init();\n }\n\n getMarkupLimit(): number {\n return this.qlt / this.mku;\n }\n\n init(): void {\n switch (this.name) {\n case \"Water\":\n this.dmd = 75;\n this.dmdR = [65, 85];\n this.cmp = 50;\n this.cmpR = [40, 60];\n this.bCost = 1500;\n this.mv = 0.2;\n this.mku = 6;\n break;\n case \"Energy\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 2000;\n this.mv = 0.2;\n this.mku = 6;\n break;\n case \"Food\":\n this.dmd = 80;\n this.dmdR = [70, 90];\n this.cmp = 60;\n this.cmpR = [35, 85];\n this.bCost = 5000;\n this.mv = 1;\n this.mku = 3;\n break;\n case \"Plants\":\n this.dmd = 70;\n this.dmdR = [20, 90];\n this.cmp = 50;\n this.cmpR = [30, 70];\n this.bCost = 3000;\n this.mv = 0.6;\n this.mku = 3.75;\n break;\n case \"Metal\":\n this.dmd = 80;\n this.dmdR = [75, 85];\n this.cmp = 70;\n this.cmpR = [60, 80];\n this.bCost = 2650;\n this.mv = 1;\n this.mku = 6;\n break;\n case \"Hardware\":\n this.dmd = 85;\n this.dmdR = [80, 90];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 8e3;\n this.mv = 0.5; //Less mv bc its processed twice\n this.mku = 1;\n break;\n case \"Chemicals\":\n this.dmd = 55;\n this.dmdR = [40, 70];\n this.cmp = 60;\n this.cmpR = [40, 80];\n this.bCost = 9e3;\n this.mv = 1.2;\n this.mku = 2;\n break;\n case \"Real Estate\":\n this.dmd = 50;\n this.dmdR = [5, 99];\n this.cmp = 50;\n this.cmpR = [25, 75];\n this.bCost = 80e3;\n this.mv = 1.5; //Less mv bc its processed twice\n this.mku = 1.5;\n break;\n case \"Drugs\":\n this.dmd = 60;\n this.dmdR = [45, 75];\n this.cmp = 70;\n this.cmpR = [40, 99];\n this.bCost = 40e3;\n this.mv = 1.6;\n this.mku = 1;\n break;\n case \"Robots\":\n this.dmd = 90;\n this.dmdR = [80, 9];\n this.cmp = 90;\n this.cmpR = [80, 9];\n this.bCost = 75e3;\n this.mv = 0.5; //Less mv bc its processed twice\n this.mku = 1;\n break;\n case \"AI Cores\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 9];\n this.bCost = 15e3;\n this.mv = 0.8; //Less mv bc its processed twice\n this.mku = 0.5;\n break;\n case \"Scientific Research\":\n case \"InitName\":\n break;\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n }\n\n // Process change in demand, competition, and buy cost of this material\n processMarket(): void {\n // The price will change in accordance with demand and competition.\n // e.g. If demand goes up, then so does price. If competition goes up, price goes down\n const priceVolatility: number = (Math.random() * this.mv) / 300;\n const priceChange: number = 1 + priceVolatility;\n\n //This 1st random check determines whether competition increases or decreases\n const compVolatility: number = (Math.random() * this.mv) / 100;\n const compChange: number = 1 + compVolatility;\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n this.bCost *= priceChange; // Competition decreases, so price goes up\n }\n\n // This 2nd random check determines whether demand increases or decreases\n const dmdVolatility: number = (Math.random() * this.mv) / 100;\n const dmdChange: number = 1 + dmdVolatility;\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n this.bCost *= 1 / priceChange;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Material\", this);\n }\n\n // Initiatizes a Material object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Material {\n return Generic_fromJSON(Material, value.data);\n }\n}\n\nReviver.constructors.Material = Material;\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberTask } from \"../GangMemberTask\";\n\ninterface Gang {\n respect: number;\n territory: number;\n wantedLevel: number;\n}\n\nexport function calculateWantedPenalty(gang: Gang): number {\n return gang.respect / (gang.respect + gang.wantedLevel);\n}\n\nexport function calculateRespectGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseRespect === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.respect) / 100);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n return Math.pow(11 * task.baseRespect * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateWantedLevelGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseWanted === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n const calc = (7 * task.baseWanted) / Math.pow(3 * statWeight * territoryMult, 0.8);\n\n // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n return Math.min(100, calc);\n}\n\nexport function calculateMoneyGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseMoney === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n return Math.pow(5 * task.baseMoney * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateAscensionPointsGain(exp: number): number {\n return Math.max(exp - 1000, 0);\n}\n\nexport function calculateAscensionMult(points: number): number {\n return Math.max(Math.pow(points / 2000, 0.5), 1);\n}\n","import { FactionInfo, FactionInfos } from \"./FactionInfo\";\nimport { favorToRep, repToFavor } from \"./formulas/favor\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n alreadyInvited = false;\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n augmentations: string[] = [];\n\n /**\n * Amount of favor the player has with this faction.\n */\n favor = 0;\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n isBanned = false;\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n isMember = false;\n\n /**\n * Name of faction\n */\n name = \"\";\n\n /**\n * Amount of reputation player has with this faction\n */\n playerReputation = 0;\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n getInfo(): FactionInfo {\n const info = FactionInfos[this.name];\n if (info == null) {\n throw new Error(\n `Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`,\n );\n }\n\n return info;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n //Returns an array with [How much favor would be gained, how much rep would be left over]\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Faction\", this);\n }\n\n /**\n * Initiatizes a Faction object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Faction {\n return Generic_fromJSON(Faction, value.data);\n }\n}\n\nReviver.constructors.Faction = Faction;\n","import { loadAliases, loadGlobalAliases, Aliases, GlobalAliases } from \"./Alias\";\nimport { Companies, loadCompanies } from \"./Company/Companies\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, loadFactions } from \"./Faction/Factions\";\nimport { loadAllGangs, AllGangs } from \"./Gang/AllGangs\";\nimport { loadMessages, initMessages, Messages } from \"./Message/MessageHelpers\";\nimport { Player, loadPlayer } from \"./Player\";\nimport { saveAllServers, loadAllServers, GetAllServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { loadStockMarket, StockMarket } from \"./StockMarket/StockMarket\";\nimport { staneksGift, loadStaneksGift } from \"./CotMG/Helper\";\n\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nimport * as ExportBonus from \"./ExportBonus\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"./utils/JSONReviver\";\nimport { save } from \"./db\";\nimport { v1APIBreak } from \"./utils/v1APIBreak\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { PlayerOwnedAugmentation } from \"./Augmentation/PlayerOwnedAugmentation\";\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nclass BitburnerSaveObject {\n PlayerSave = \"\";\n AllServersSave = \"\";\n CompaniesSave = \"\";\n FactionsSave = \"\";\n AliasesSave = \"\";\n GlobalAliasesSave = \"\";\n MessagesSave = \"\";\n StockMarketSave = \"\";\n SettingsSave = \"\";\n VersionSave = \"\";\n AllGangsSave = \"\";\n LastExportBonus = \"\";\n StaneksGiftSave = \"\";\n\n getSaveString(): string {\n this.PlayerSave = JSON.stringify(Player);\n\n this.AllServersSave = saveAllServers();\n this.CompaniesSave = JSON.stringify(Companies);\n this.FactionsSave = JSON.stringify(Factions);\n this.AliasesSave = JSON.stringify(Aliases);\n this.GlobalAliasesSave = JSON.stringify(GlobalAliases);\n this.MessagesSave = JSON.stringify(Messages);\n this.StockMarketSave = JSON.stringify(StockMarket);\n this.SettingsSave = JSON.stringify(Settings);\n this.VersionSave = JSON.stringify(CONSTANTS.VersionNumber);\n this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);\n this.StaneksGiftSave = JSON.stringify(staneksGift);\n if (Player.inGang()) {\n this.AllGangsSave = JSON.stringify(AllGangs);\n }\n const saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n\n return saveString;\n }\n\n saveGame(): void {\n const saveString = this.getSaveString();\n\n save(saveString)\n .then(() => SnackbarEvents.emit(\"Game Saved!\", \"info\"))\n .catch((err) => console.error(err));\n }\n\n exportGame(): void {\n const saveString = this.getSaveString();\n\n // Save file name is based on current timestamp and BitNode\n const epochTime = Math.round(Date.now() / 1000);\n const bn = Player.bitNodeN;\n const filename = `bitburnerSave_${epochTime}_BN${bn}x${SourceFileFlags[bn]}.json`;\n download(filename, saveString);\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BitburnerSaveObject\", this);\n }\n\n static fromJSON(value: { data: any }): BitburnerSaveObject {\n return Generic_fromJSON(BitburnerSaveObject, value.data);\n }\n}\n\n// Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\nfunction evaluateVersionCompatibility(ver: string | number): void {\n // We have to do this because ts won't let us otherwise\n const anyPlayer = Player as any;\n if (typeof ver === \"string\") {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (anyPlayer.companyPosition != null && typeof anyPlayer.companyPosition !== \"string\") {\n anyPlayer.companyPosition = anyPlayer.companyPosition.data.positionName;\n if (anyPlayer.companyPosition == null) {\n anyPlayer.companyPosition = \"\";\n }\n }\n\n // The \"companyName\" property of all Companies is renamed to \"name\"\n for (const companyName in Companies) {\n const company: any = Companies[companyName];\n if (company.name == 0 && company.companyName != null) {\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n const pos: any = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n company.companyPositions = pos;\n }\n }\n }\n\n // This version allowed players to hold multiple jobs\n if (ver < \"0.43.0\") {\n if (anyPlayer.companyName !== \"\" && anyPlayer.companyPosition != null && anyPlayer.companyPosition !== \"\") {\n anyPlayer.jobs[anyPlayer.companyName] = anyPlayer.companyPosition;\n }\n\n delete anyPlayer.companyPosition;\n }\n if (ver < \"0.56.0\") {\n for (const q of anyPlayer.queuedAugmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n for (const q of anyPlayer.augmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n if (ver < \"0.56.1\") {\n if (anyPlayer.bladeburner === 0) {\n anyPlayer.bladeburner = null;\n }\n if (anyPlayer.gang === 0) {\n anyPlayer.gang = null;\n }\n if (anyPlayer.corporation === 0) {\n anyPlayer.corporation = null;\n }\n // convert all Messages to just filename to save space.\n const home = anyPlayer.getHomeComputer();\n for (let i = 0; i < home.messages.length; i++) {\n if (home.messages[i].filename) {\n home.messages[i] = home.messages[i].filename;\n }\n }\n }\n if (ver < \"0.58.0\") {\n const changes: [RegExp, string][] = [\n [/getStockSymbols/g, \"stock.getSymbols\"],\n [/getStockPrice/g, \"stock.getPrice\"],\n [/getStockAskPrice/g, \"stock.getAskPrice\"],\n [/getStockBidPrice/g, \"stock.getBidPrice\"],\n [/getStockPosition/g, \"stock.getPosition\"],\n [/getStockMaxShares/g, \"stock.getMaxShares\"],\n [/getStockPurchaseCost/g, \"stock.getPurchaseCost\"],\n [/getStockSaleGain/g, \"stock.getSaleGain\"],\n [/buyStock/g, \"stock.buy\"],\n [/sellStock/g, \"stock.sell\"],\n [/shortStock/g, \"stock.short\"],\n [/sellShort/g, \"stock.sellShort\"],\n [/placeOrder/g, \"stock.placeOrder\"],\n [/cancelOrder/g, \"stock.cancelOrder\"],\n [/getOrders/g, \"stock.getOrders\"],\n [/getStockVolatility/g, \"stock.getVolatility\"],\n [/getStockForecast/g, \"stock.getForecast\"],\n [/purchase4SMarketData/g, \"stock.purchase4SMarketData\"],\n [/purchase4SMarketDataTixApi/g, \"stock.purchase4SMarketDataTixApi\"],\n ];\n function convert(code: string): string {\n for (const change of changes) {\n code = code.replace(change[0], change[1]);\n }\n return code;\n }\n for (const server of GetAllServers()) {\n for (const script of server.scripts) {\n script.code = convert(script.code);\n }\n }\n }\n v1APIBreak();\n ver = 1;\n }\n if (typeof ver === \"number\") {\n if (ver < 2) {\n // Give 10 neuroflux because v1 API break.\n const nf = Player.augmentations.find((a) => a.name === AugmentationNames.NeuroFluxGovernor);\n if (nf) {\n nf.level += 10;\n } else {\n const nf = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n nf.level = 10;\n Player.augmentations.push(nf);\n }\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n if (ver < 3) {\n anyPlayer.money = parseFloat(anyPlayer.money);\n if (anyPlayer.corporation) {\n anyPlayer.corporation.funds = parseFloat(anyPlayer.corporation.funds);\n anyPlayer.corporation.revenue = parseFloat(anyPlayer.corporation.revenue);\n anyPlayer.corporation.expenses = parseFloat(anyPlayer.corporation.expenses);\n\n for (let i = 0; i < anyPlayer.corporation.divisions.length; ++i) {\n const ind = anyPlayer.corporation.divisions[i];\n ind.lastCycleRevenue = parseFloat(ind.lastCycleRevenue);\n ind.lastCycleExpenses = parseFloat(ind.lastCycleExpenses);\n ind.thisCycleRevenue = parseFloat(ind.thisCycleRevenue);\n ind.thisCycleExpenses = parseFloat(ind.thisCycleExpenses);\n }\n }\n }\n }\n}\n\nfunction loadGame(saveString: string): boolean {\n if (!saveString) return false;\n saveString = decodeURIComponent(escape(atob(saveString)));\n\n const saveObj = JSON.parse(saveString, Reviver);\n\n loadPlayer(saveObj.PlayerSave);\n loadAllServers(saveObj.AllServersSave);\n loadCompanies(saveObj.CompaniesSave);\n loadFactions(saveObj.FactionsSave);\n\n if (saveObj.hasOwnProperty(\"StaneksGiftSave\")) {\n loadStaneksGift(saveObj.StaneksGiftSave);\n } else {\n console.warn(`Could not load Staneks Gift from save`);\n loadStaneksGift(\"\");\n }\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n loadAliases(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n loadAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n loadAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n loadGlobalAliases(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n loadGlobalAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n loadGlobalAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n loadMessages(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n initMessages();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n initMessages();\n }\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n loadStockMarket(saveObj.StockMarketSave);\n } catch (e) {\n loadStockMarket(\"\");\n }\n } else {\n loadStockMarket(\"\");\n }\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n Settings.load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n Settings.init();\n }\n } else {\n Settings.init();\n }\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n ExportBonus.setLastExportBonus(JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n ExportBonus.setLastExportBonus(new Date().getTime());\n console.error(\"ERROR: Failed to parse last export bonus Settings \" + err);\n }\n }\n if (Player.inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n loadAllGangs(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n const ver = JSON.parse(saveObj.VersionSave, Reviver);\n evaluateVersionCompatibility(ver);\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver !== CONSTANTS.VersionNumber) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n return true;\n}\n\nfunction createNewUpdateText(): void {\n setTimeout(\n () =>\n dialogBoxCreate(\n \"New update!
\" +\n \"Please report any bugs/issues through the github repository \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" +\n CONSTANTS.LatestUpdate,\n ),\n 1000,\n );\n}\n\nfunction createBetaUpdateText(): void {\n dialogBoxCreate(\n \"You are playing on the beta environment! This branch of the game \" +\n \"features the latest developments in the game. This version may be unstable.
\" +\n \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" +\n CONSTANTS.LatestUpdate,\n );\n}\n\nfunction download(filename: string, content: string): void {\n const file = new Blob([content], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n}\n\nReviver.constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nexport { saveObject, loadGame, download };\n\nconst saveObject = new BitburnerSaveObject();\n","// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum PurchaseAugmentationsOrderSetting {\n Cost,\n Default,\n Reputation,\n Purchasable,\n}\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum OwnedAugmentationsOrderSetting {\n Alphabetically,\n AcquirementTime,\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetNodeConstants } from \"../data/Constants\";\n\nexport function calculateMoneyGainRate(level: number, ram: number, cores: number, mult: number): number {\n const gainPerLevel = HacknetNodeConstants.MoneyGainPerLevel;\n\n const levelMult = level * gainPerLevel;\n const ramMult = Math.pow(1.035, ram - 1);\n const coresMult = (cores + 5) / 6;\n return levelMult * ramMult * coresMult * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetNodeConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetNodeConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += HacknetNodeConstants.LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return (HacknetNodeConstants.BaseCost / 2) * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetNodeConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetNodeConstants.RamBaseCost;\n const mult = Math.pow(HacknetNodeConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCore: number, extraLevels = 1, costMult = 1): number {\n const sanitizedCores = Math.round(extraLevels);\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= HacknetNodeConstants.MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = HacknetNodeConstants.CoreBaseCost;\n const mult = HacknetNodeConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateNodeCost(n: number, mult = 1): number {\n if (n <= 0) {\n return 0;\n }\n return HacknetNodeConstants.BaseCost * Math.pow(HacknetNodeConstants.PurchaseNextMult, n - 1) * mult;\n}\n","import * as React from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nconst gainLimit = 10e9;\n\nexport function win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n}\n\nexport function reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n}\n\nexport class Game extends React.Component {\n win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n }\n\n reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n }\n}\n","const _ = false;\nconst X = true;\nexport const Shapes: {\n O: boolean[][];\n I: boolean[][];\n L: boolean[][];\n J: boolean[][];\n S: boolean[][];\n Z: boolean[][];\n T: boolean[][];\n} = {\n O: [\n [X, X],\n [X, X],\n ],\n I: [[X, X, X, X]],\n L: [\n [_, _, X],\n [X, X, X],\n ],\n J: [\n [X, _, _],\n [X, X, X],\n ],\n S: [\n [_, X, X],\n [X, X, _],\n ],\n Z: [\n [X, X, _],\n [_, X, X],\n ],\n T: [\n [X, X, X],\n [_, X, _],\n ],\n};\n","import React, { useEffect } from \"react\";\n\ninterface IProps {\n onKeyDown: (this: Document, event: KeyboardEvent) => void;\n onFailure: (options?: { automated: boolean }) => void;\n}\n\nexport function KeyHandler(props: IProps): React.ReactElement {\n useEffect(() => {\n function press(this: Document, event: KeyboardEvent): void {\n if (!event.isTrusted) return;\n const f = props.onKeyDown.bind(this);\n f(event);\n }\n document.addEventListener(\"keydown\", press);\n return () => document.removeEventListener(\"keydown\", press);\n });\n\n // invisible autofocused element that eats all the keypress for the minigames.\n return <>;\n}\n","import LinearProgress from \"@mui/material/LinearProgress\";\nimport React, { useState, useEffect } from \"react\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport Grid from \"@mui/material/Grid\";\n\nconst TimerProgress = withStyles((theme: Theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n },\n bar: {\n transition: \"none\",\n backgroundColor: theme.palette.primary.main,\n },\n}))(LinearProgress);\n\ninterface IProps {\n millis: number;\n onExpire: () => void;\n}\n\nexport function GameTimer(props: IProps): React.ReactElement {\n const [v, setV] = useState(100);\n\n const tick = 200;\n useEffect(() => {\n const intervalId = setInterval(() => {\n setV((old) => {\n if (old <= 0) props.onExpire();\n return old - (tick / props.millis) * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []);\n\n // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n return (\n \n \n \n );\n}\n","interface DifficultySetting {\n [key: string]: number;\n}\n\ninterface DifficultySettings {\n Trivial: DifficultySetting;\n Normal: DifficultySetting;\n Hard: DifficultySetting;\n Impossible: DifficultySetting;\n}\n\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nexport function interpolate(settings: DifficultySettings, n: number, out: DifficultySetting): DifficultySetting {\n // interpolates between 2 difficulties.\n function lerpD(a: DifficultySetting, b: DifficultySetting, t: number): DifficultySetting {\n // interpolates between 2 numbers.\n function lerp(x: number, y: number, t: number): number {\n return (1 - t) * x + t * y;\n }\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n return a;\n }\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Draggable from \"react-draggable\";\nimport { ResizableBox } from \"react-resizable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport ArrowForwardIosIcon from \"@mui/icons-material/ArrowForwardIos\";\nimport { workerScripts } from \"../../Netscript/WorkerScripts\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Theme } from \"@mui/material\";\n\nlet layerCounter = 0;\n\nexport const LogBoxEvents = new EventEmitter<[RunningScript]>();\nexport const LogBoxClearEvents = new EventEmitter<[]>();\n\ninterface Log {\n id: string;\n script: RunningScript;\n}\n\nlet logs: Log[] = [];\n\nexport function LogBoxManager(): React.ReactElement {\n const setRerender = useState(true)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(\n () =>\n LogBoxEvents.subscribe((script: RunningScript) => {\n const id = script.server + \"-\" + script.filename + script.args.map((x: any): string => `${x}`).join(\"-\");\n if (logs.find((l) => l.id === id)) return;\n logs.push({\n id: id,\n script: script,\n });\n rerender();\n }),\n [],\n );\n\n useEffect(() =>\n LogBoxClearEvents.subscribe(() => {\n logs = [];\n rerender();\n }),\n );\n\n function close(id: string): void {\n logs = logs.filter((l) => l.id !== id);\n rerender();\n }\n\n return (\n <>\n {logs.map((log) => (\n close(log.id)} />\n ))}\n \n );\n}\n\ninterface IProps {\n script: RunningScript;\n id: string;\n onClose: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n logs: {\n overflowY: \"scroll\",\n overflowX: \"hidden\",\n scrollbarWidth: \"auto\",\n display: \"flex\",\n flexDirection: \"column-reverse\",\n },\n success: {\n color: theme.colors.success,\n },\n error: {\n color: theme.palette.error.main,\n },\n primary: {\n color: theme.palette.primary.main,\n },\n info: {\n color: theme.palette.info.main,\n },\n warning: {\n color: theme.palette.warning.main,\n },\n }),\n);\n\nfunction LogWindow(props: IProps): React.ReactElement {\n const classes = useStyles();\n const container = useRef(null);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n updateLayer();\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function kill(): void {\n killWorkerScript(props.script, props.script.server, true);\n }\n\n function run(): void {\n const server = GetServer(props.script.server);\n if (server === null) return;\n startWorkerScript(props.script, server);\n }\n\n function updateLayer(): void {\n const c = container.current;\n if (c === null) return;\n c.style.zIndex = 1500 + layerCounter + \"\";\n layerCounter++;\n rerender();\n }\n\n function title(): string {\n const maxLength = 30;\n const t = `${props.script.filename} ${props.script.args.map((x: any): string => `${x}`).join(\" \")}`;\n if (t.length <= maxLength) {\n return t;\n }\n return t.slice(0, maxLength - 3) + \"...\";\n }\n\n function lineClass(s: string): string {\n if (s.match(/(^\\[[^\\]]+\\] )?ERROR/) || s.match(/(^\\[[^\\]]+\\] )?FAIL/)) {\n return classes.error;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?SUCCESS/)) {\n return classes.success;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?WARN/)) {\n return classes.warning;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?INFO/)) {\n return classes.info;\n }\n return classes.primary;\n }\n\n return (\n \n \n
\n \n \n \n {title()}\n \n\n \n {!workerScripts.has(props.script.pid) && }\n {workerScripts.has(props.script.pid) && }\n \n \n \n \n \n \n \n \n }\n >\n \n {props.script.logs.map(\n (line: string, i: number): JSX.Element => (\n \n {line}\n
\n
\n ),\n )}\n
\n \n
\n
\n \n
\n );\n}\n","import { Skill } from \"./Skill\";\nimport { SkillNames } from \"./data/SkillNames\";\nimport { IMap } from \"../types\";\n\nexport const Skills: IMap = {};\n\n(function () {\n Skills[SkillNames.BladesIntuition] = new Skill({\n name: SkillNames.BladesIntuition,\n desc:\n \"Each level of this skill increases your success chance \" + \"for all Contracts, Operations, and BlackOps by 3%\",\n baseCost: 3,\n costInc: 2.1,\n successChanceAll: 3,\n });\n Skills[SkillNames.Cloak] = new Skill({\n name: SkillNames.Cloak,\n desc:\n \"Each level of this skill increases your \" +\n \"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%\",\n baseCost: 2,\n costInc: 1.1,\n successChanceStealth: 5.5,\n });\n Skills[SkillNames.ShortCircuit] = new Skill({\n name: SkillNames.ShortCircuit,\n desc:\n \"Each level of this skill increases your success chance \" +\n \"in Contracts, Operations, and BlackOps that involve retirement by 5.5%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceKill: 5.5,\n });\n Skills[SkillNames.DigitalObserver] = new Skill({\n name: SkillNames.DigitalObserver,\n desc: \"Each level of this skill increases your success chance in \" + \"all Operations and BlackOps by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceOperation: 4,\n });\n Skills[SkillNames.Tracer] = new Skill({\n name: SkillNames.Tracer,\n desc: \"Each level of this skill increases your success chance in \" + \"all Contracts by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceContract: 4,\n });\n Skills[SkillNames.Overclock] = new Skill({\n name: SkillNames.Overclock,\n desc:\n \"Each level of this skill decreases the time it takes \" +\n \"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)\",\n baseCost: 3,\n costInc: 1.4,\n maxLvl: 90,\n actionTime: 1,\n });\n Skills[SkillNames.Reaper] = new Skill({\n name: SkillNames.Reaper,\n desc: \"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%\",\n baseCost: 2,\n costInc: 2.1,\n effStr: 2,\n effDef: 2,\n effDex: 2,\n effAgi: 2,\n });\n Skills[SkillNames.EvasiveSystem] = new Skill({\n name: SkillNames.EvasiveSystem,\n desc: \"Each level of this skill increases your effective \" + \"dexterity and agility for Bladeburner actions by 4%\",\n baseCost: 2,\n costInc: 2.1,\n effDex: 4,\n effAgi: 4,\n });\n Skills[SkillNames.Datamancer] = new Skill({\n name: SkillNames.Datamancer,\n desc:\n \"Each level of this skill increases your effectiveness in \" +\n \"synthoid population analysis and investigation by 5%. \" +\n \"This affects all actions that can potentially increase \" +\n \"the accuracy of your synthoid population/community estimates.\",\n baseCost: 3,\n costInc: 1,\n successChanceEstimate: 5,\n });\n Skills[SkillNames.CybersEdge] = new Skill({\n name: SkillNames.CybersEdge,\n desc: \"Each level of this skill increases your max stamina by 2%\",\n baseCost: 1,\n costInc: 3,\n stamina: 2,\n });\n Skills[SkillNames.HandsOfMidas] = new Skill({\n name: SkillNames.HandsOfMidas,\n desc: \"Each level of this skill increases the amount of money you receive from Contracts by 10%\",\n baseCost: 2,\n costInc: 2.5,\n money: 10,\n });\n Skills[SkillNames.Hyperdrive] = new Skill({\n name: SkillNames.Hyperdrive,\n desc: \"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%\",\n baseCost: 1,\n costInc: 2.5,\n expGain: 10,\n });\n})();\n","import { gangMemberUpgradesMetadata } from \"./data/upgrades\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\n\nexport const GangMemberUpgrades: {\n [key: string]: GangMemberUpgrade;\n} = {};\n\n(function () {\n gangMemberUpgradesMetadata.forEach((e) => {\n GangMemberUpgrades[e.name] = new GangMemberUpgrade(e.name, e.cost, e.upgType, e.mults);\n });\n})();\n","/**\n * Stock Market Helper Functions\n */\nimport { Stock } from \"./Stock\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { CONSTANTS } from \"../Constants\";\n\n// Amount by which a stock's forecast changes during each price movement\nexport const forecastChangePerPriceMovement = 0.006;\n\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\nexport function getBuyTransactionCost(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n\n // If the number of shares doesn't trigger a price movement, its a simple calculation\n if (isLong) {\n return shares * stock.getAskPrice() + CONSTANTS.StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + CONSTANTS.StockMarketCommission;\n }\n}\n\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\nexport function getSellTransactionGain(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n if (isLong) {\n return shares * stock.getBidPrice() - CONSTANTS.StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - CONSTANTS.StockMarketCommission;\n\n return origCost + profit;\n }\n}\n\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\nexport function processTransactionForecastMovement(stock: Stock, shares: number): void {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return;\n }\n\n // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n shares = Math.min(shares, stock.maxShares);\n\n // If there's only going to be one iteration at most\n const firstShares = stock.shareTxUntilMovement;\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n }\n\n // Calculate how many iterations of price changes we need to account for\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement);\n\n // If on the offchance we end up perfectly at the next price movement\n stock.shareTxUntilMovement =\n stock.shareTxForMovement - ((shares - stock.shareTxUntilMovement) % stock.shareTxForMovement);\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n }\n\n // Forecast always decreases in magnitude\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\nexport function calculateBuyMaxAmount(stock: Stock, posType: PositionTypes, money: number): number {\n if (!(stock instanceof Stock)) {\n return 0;\n }\n\n const isLong = posType === PositionTypes.Long;\n\n const remainingMoney = money - CONSTANTS.StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n\n return Math.floor(remainingMoney / currPrice);\n}\n","// Base class representing a person-like object\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { IPlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { calculateSkill } from \"./formulas/skill\";\nimport { calculateIntelligenceBonus } from \"./formulas/intelligence\";\n\n// Interface that defines a generic object used to track experience/money\n// earnings for tasks\nexport interface ITaskTracker {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n money: number;\n}\n\nexport function createTaskTracker(): ITaskTracker {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n money: 0,\n };\n}\n\nexport abstract class Person {\n /**\n * Stats\n */\n hacking = 1;\n strength = 1;\n defense = 1;\n dexterity = 1;\n agility = 1;\n charisma = 1;\n intelligence = 1;\n hp = 10;\n max_hp = 10;\n\n /**\n * Experience\n */\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n /**\n * Multipliers\n */\n hacking_mult = 1;\n strength_mult = 1;\n defense_mult = 1;\n dexterity_mult = 1;\n agility_mult = 1;\n charisma_mult = 1;\n\n hacking_exp_mult = 1;\n strength_exp_mult = 1;\n defense_exp_mult = 1;\n dexterity_exp_mult = 1;\n agility_exp_mult = 1;\n charisma_exp_mult = 1;\n\n hacking_chance_mult = 1;\n hacking_speed_mult = 1;\n hacking_money_mult = 1;\n hacking_grow_mult = 1;\n\n company_rep_mult = 1;\n faction_rep_mult = 1;\n\n crime_money_mult = 1;\n crime_success_mult = 1;\n\n work_money_mult = 1;\n\n hacknet_node_money_mult = 1;\n hacknet_node_purchase_cost_mult = 1;\n hacknet_node_ram_cost_mult = 1;\n hacknet_node_core_cost_mult = 1;\n hacknet_node_level_cost_mult = 1;\n\n bladeburner_max_stamina_mult = 1;\n bladeburner_stamina_gain_mult = 1;\n bladeburner_analysis_mult = 1;\n bladeburner_success_chance_mult = 1;\n\n /**\n * Augmentations\n */\n augmentations: IPlayerOwnedAugmentation[] = [];\n queuedAugmentations: IPlayerOwnedAugmentation[] = [];\n\n /**\n * City that the person is in\n */\n city: CityName = CityName.Sector12;\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug: Augmentation): void {\n for (const mult in aug.mults) {\n if ((this as any)[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n (this as any)[mult] *= aug.mults[mult];\n }\n }\n }\n\n /**\n * Given an experience amount and stat multiplier, calculates the\n * stat level. Stat-agnostic (same formula for every stat)\n */\n calculateStat(exp: number, mult = 1): number {\n return calculateSkill(exp, mult);\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n getFactionFieldWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / CONSTANTS.MaxSkillLevel +\n this.strength / CONSTANTS.MaxSkillLevel +\n this.defense / CONSTANTS.MaxSkillLevel +\n this.dexterity / CONSTANTS.MaxSkillLevel +\n this.agility / CONSTANTS.MaxSkillLevel +\n this.charisma / CONSTANTS.MaxSkillLevel)) /\n 5.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n getFactionHackingWorkRepGain(): number {\n return (this.hacking / CONSTANTS.MaxSkillLevel) * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n getFactionSecurityWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / CONSTANTS.MaxSkillLevel +\n this.strength / CONSTANTS.MaxSkillLevel +\n this.defense / CONSTANTS.MaxSkillLevel +\n this.dexterity / CONSTANTS.MaxSkillLevel +\n this.agility / CONSTANTS.MaxSkillLevel)) /\n 4.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Reset all multipliers to 1\n */\n resetMultipliers(): void {\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n this.work_money_mult = 1;\n }\n\n /**\n * Update all stat levels\n */\n updateStatLevels(): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier),\n ),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier),\n ),\n );\n\n const ratio: number = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n }\n\n getIntelligenceBonus(weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n }\n}\n","import React from \"react\";\nimport { BitNodeMultipliers } from \"./BitNodeMultipliers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\n\nclass BitNode {\n // A short description, or tagline, about the BitNode\n desc: string;\n\n // A long, detailed overview of the BitNode\n info: JSX.Element;\n\n // Name of BitNode\n name: string;\n\n // BitNode number\n number: number;\n\n difficulty: 0 | 1 | 2;\n\n constructor(n: number, difficulty: 0 | 1 | 2, name: string, desc = \"\", info: JSX.Element = <>) {\n this.number = n;\n this.difficulty = difficulty;\n this.name = name;\n this.desc = desc;\n this.info = info;\n }\n}\n\nexport const BitNodes: IMap = {};\n\nBitNodes[\"BitNode1\"] = new BitNode(\n 1,\n 0,\n \"Source Genesis\",\n \"The original BitNode\",\n (\n <>\n The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and\n testing-grounds for all of the BitNodes that followed.\n
\n
\n This is the first BitNode that you play through. It has no special modifications or mechanics.\n
\n
\n Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when\n entering a new BitNode, and also increases all of the player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nBitNodes[\"BitNode2\"] = new BitNode(\n 2,\n 0,\n \"Rise of the Underworld\",\n \"From the shadows, they rose\", //Gangs\n (\n <>\n From the shadows, they rose.\n
\n
\n Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the\n 2050s. As society and civilization broke down, people quickly succumbed to the innate human impulse of evil and\n savagery. The organized crime factions quickly rose to the top of the modern world.\n
\n
\n In this BitNode:\n
\n
\n Your hacking level is reduced by 20%\n
\n The growth rate and maximum amount of money available on servers are significantly decreased\n
\n The amount of money gained from crimes and Infiltration is tripled\n
\n Certain Factions (Slum Snakes, Tetrads, The Syndicate, The Dark Army, Speakers for the Dead, NiteSec, The Black\n Hand) give the player the ability to form and manage their own gangs. These gangs will earn the player money and\n reputation with the corresponding Faction\n
\n Every Augmentation in the game will be available through the Factions listed above\n
\n For every Faction NOT listed above, reputation gains are halved\n
\n You will no longer gain passive reputation with Factions\n
\n
\n Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases\n to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nBitNodes[\"BitNode3\"] = new BitNode(\n 3,\n 0,\n \"Corporatocracy\",\n \"The Price of Civilization\",\n (\n <>\n Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.\n
\n
\n Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy,\n and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own\n community, and evict their neighbors from houses in their desperate bid to increase their wealth.\n
\n
\n In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential\n of generating massive profits. All other forms of income are reduced by 75%. Furthermore:
\n
\n The price and reputation cost of all Augmentations is tripled\n
\n The starting and maximum amount of money on servers is reduced by 75%\n
\n Server growth rate is reduced by 80%\n
\n You now only need 75 favour with a faction in order to donate to it, rather than 150\n
\n
\n Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some\n BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers\n by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode4\"] = new BitNode(\n 4,\n 1,\n \"The Singularity\",\n \"The Man and the Machine\",\n (\n <>\n The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are\n more machine than man.
\n
\n In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most\n methods of earning money will now give significantly less.\n
\n
\n In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These\n functions allow you to control most aspects of the game through scripts, including working for factions/companies,\n purchasing/installing Augmentations, and creating programs.\n
\n
\n Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes.\n Each level of this Source-File will open up more Singularity Functions that you can use.\n \n ),\n);\nBitNodes[\"BitNode5\"] = new BitNode(\n 5,\n 1,\n \"Artificial Intelligence\",\n \"Posthuman\",\n (\n <>\n They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't\n be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that\n couldn't be modeled by 1's and 0's. They were wrong.\n
\n
\n In this BitNode:\n
\n
\n The base security level of servers is doubled\n
\n The starting money on servers is halved, but the maximum money remains the same\n
\n Most methods of earning money now give significantly less\n
\n Infiltration gives 50% more reputation and money\n
\n Corporations have 50% lower valuations and are therefore less profitable\n
\n Augmentations are more expensive\n
\n Hacking experience gain rates are reduced\n
\n
\n Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is\n unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence\n experience is much slower than other stats, and it is also hidden (you won't know when you gain experience and how\n much). Higher Intelligence levels will boost your production for many actions in the game.
\n
\n In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with\n Formulas.exe, and will also raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode6\"] = new BitNode(\n 6,\n 1,\n \"Bladeburners\",\n \"Like Tears in Rain\",\n (\n <>\n In the middle of the 21st century, OmniTek Incorporated began designing and manufacturing advanced synthetic\n androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth generation of\n their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was the first\n sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more intelligent than\n the humans that had created them.\n
\n
\n In this BitNode you will be able to access the Bladeburner Division at the NSA, which provides a new mechanic for\n progression. Furthermore:\n
\n
\n Hacking and Hacknet Nodes will be less profitable\n
\n Your hacking level is reduced by 65%\n
\n Hacking experience gain from scripts is reduced by 75%\n
\n Corporations have 80% lower valuations and are therefore less profitable\n
\n Working for companies is 50% less profitable\n
\n Crimes and Infiltration are 25% less profitable\n
\n
\n Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the NSA's Bladeburner Division in other\n BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat\n stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode7\"] = new BitNode(\n 7,\n 2,\n \"Bladeburners 2079\",\n \"More human than humans\",\n (\n <>\n In the middle of the 21st century, you were doing cutting-edge work at OmniTek Incorporated as part of the AI\n design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major technological\n breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a\n hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models\n that were stronger, faster, and more intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the Bladeburner API, which allows you to access Bladeburner\n functionality through Netscript. Furthermore:
\n
\n The rank you gain from Bladeburner contracts/operations is reduced by 40%\n
\n Bladeburner skills cost twice as many skill points\n
\n Augmentations are 3x more expensive\n
\n Hacking and Hacknet Nodes will be significantly less profitable\n
\n Your hacking level is reduced by 65%\n
\n Hacking experience gain from scripts is reduced by 75%\n
\n Corporations have 80% lower valuations and are therefore less profitable\n
\n Working for companies is 50% less profitable\n
\n Crimes and Infiltration are 25% less profitable\n
\n
\n Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other BitNodes.\n In addition, this Source-File will increase all of your Bladeburner multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode8\"] = new BitNode(\n 8,\n 2,\n \"Ghost of Wall Street\",\n \"Money never sleeps\",\n (\n <>\n You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.\n
\n
\n In this BitNode:\n
\n
\n You start with $250 million\n
\n The only way to earn money is by trading on the stock market\n
\n You start with a WSE membership and access to the TIX API\n
\n You are able to short stocks and place different types of orders (limit/stop)\n
\n You can immediately donate to factions to gain reputation\n
\n
\n Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nBitNodes[\"BitNode9\"] = new BitNode(\n 9,\n 2,\n \"Hacktocracy\",\n \"Hacknet Unleashed\",\n (\n <>\n When Fulcrum Technologies released their open-source Linux distro Chapeau, it quickly became the OS of choice for\n the underground hacking community. Chapeau became especially notorious for powering the Hacknet, a global,\n decentralized network used for nefarious purposes. Fulcrum quickly abandoned the project and dissociated\n themselves from it.\n
\n
\n This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes,\n which can be spent on a variety of different upgrades.\n
\n
\n In this BitNode:\n
\n
\n Your stats are significantly decreased\n
\n You cannnot purchase additional servers\n
\n Hacking is significantly less profitable\n
\n
\n Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode10\"] = new BitNode(\n 10,\n 2,\n \"Digital Carbon\",\n \"Your body is not who you are\",\n (\n <>\n In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their\n consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the\n digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally\n achieved immortality - at least for those that could afford it.\n
\n
\n This BitNode unlocks Sleeve technology. Sleeve technology allows you to:\n
\n
\n 1. Re-sleeve: Purchase and transfer your consciousness into a new body\n
\n 2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks\n synchronously\n
\n
\n In this BitNode:\n
\n
\n Your stats are significantly decreased\n
\n All methods of gaining money are half as profitable (except Stock Market)\n
\n Purchased servers are more expensive, have less max RAM, and a lower maximum limit\n
\n Augmentations are 5x as expensive and require twice as much reputation\n
\n
\n Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this\n Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nBitNodes[\"BitNode11\"] = new BitNode(\n 11,\n 1,\n \"The Big Crash\",\n \"Okay. Sell it all.\",\n (\n <>\n The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around\n the world. It was this period of disorder that eventually lead to the governmental reformation of many global\n superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark\n times, financial catastrophe hit.\n
\n
\n In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of\n this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic\n banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the\n world is slowly crumbling in the middle of the biggest economic crisis of all time.\n
\n
\n In this BitNode:\n
\n
\n Your hacking stat and experience gain are halved\n
\n The starting and maximum amount of money available on servers is significantly decreased\n
\n The growth rate of servers is significantly reduced\n
\n Weakening a server is twice as effective\n
\n Company wages are decreased by 50%\n
\n Corporation valuations are 90% lower and are therefore significantly less profitable\n
\n Hacknet Node production is significantly decreased\n
\n Crime and Infiltration are more lucrative\n
\n Augmentations are twice as expensive\n
\n
\n Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and\n reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also\n increases the player's company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nBitNodes[\"BitNode12\"] = new BitNode(\n 12,\n 0,\n \"The Recursion\",\n \"Repeat.\",\n (\n <>\n To iterate is human, to recurse divine.\n
\n
\n Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you\n Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for\n Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the\n level of this source file.\n \n ),\n);\nBitNodes[\"BitNode13\"] = new BitNode(\n 13,\n 2,\n \"They're lunatics\",\n \"1 step back, 2 steps forward\",\n (\n <>\n With the invention of Augmentations in the 2040s a religious group known as the Church of the Machine God has\n rallied far more support than anyone would have hoped.\n
\n
\n Their leader, Allison \"Mother\" Stanek is said to have created her own Augmentation whose power goes beyond any\n other. Find her in Chongquing and gain her trust.\n
\n
\n In this BitNode:\n
\n
\n Every stat is significantly reduced\n
\n Stanek's Gift power is significantly increased.\n
\n
\n Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the Church of the Machine God appear in other BitNodes.\n
\n
\n Each level of this Source-File increases the size of Stanek's Gift.\n \n ),\n);\n// Books: Frontera, Shiner\nBitNodes[\"BitNode14\"] = new BitNode(14, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode15\"] = new BitNode(15, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode16\"] = new BitNode(16, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode17\"] = new BitNode(17, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode18\"] = new BitNode(18, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode19\"] = new BitNode(19, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode20\"] = new BitNode(20, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode21\"] = new BitNode(21, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode22\"] = new BitNode(22, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode23\"] = new BitNode(23, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode24\"] = new BitNode(24, 2, \"\", \"COMING SOON\");\n\nexport function initBitNodeMultipliers(p: IPlayer): void {\n if (p.bitNodeN == null) {\n p.bitNodeN = 1;\n }\n for (const mult in BitNodeMultipliers) {\n if (BitNodeMultipliers.hasOwnProperty(mult)) {\n BitNodeMultipliers[mult] = 1;\n }\n }\n // Special case.\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n\n switch (p.bitNodeN) {\n case 1: // Source Genesis (every multiplier is 1)\n break;\n case 2: // Rise of the Underworld\n BitNodeMultipliers.HackingLevelMultiplier = 0.8;\n BitNodeMultipliers.ServerGrowthRate = 0.8;\n BitNodeMultipliers.ServerMaxMoney = 0.2;\n BitNodeMultipliers.ServerStartingMoney = 0.4;\n BitNodeMultipliers.CrimeMoney = 3;\n BitNodeMultipliers.InfiltrationMoney = 3;\n BitNodeMultipliers.FactionWorkRepGain = 0.5;\n BitNodeMultipliers.FactionPassiveRepGain = 0;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;\n BitNodeMultipliers.StaneksGiftExtraSize = -6;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.3;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 5;\n break;\n case 3: // Corporatocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.8;\n BitNodeMultipliers.RepToDonateToFaction = 0.5;\n BitNodeMultipliers.AugmentationRepCost = 3;\n BitNodeMultipliers.AugmentationMoneyCost = 3;\n BitNodeMultipliers.ServerMaxMoney = 0.2;\n BitNodeMultipliers.ServerStartingMoney = 0.2;\n BitNodeMultipliers.ServerGrowthRate = 0.2;\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.25;\n BitNodeMultipliers.CrimeMoney = 0.25;\n BitNodeMultipliers.HacknetNodeMoney = 0.25;\n BitNodeMultipliers.HomeComputerRamCost = 1.5;\n BitNodeMultipliers.PurchasedServerCost = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75;\n BitNodeMultipliers.StaneksGiftExtraSize = -2;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.3;\n BitNodeMultipliers.GangSoftcap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n break;\n case 4: // The Singularity\n BitNodeMultipliers.ServerMaxMoney = 0.15;\n BitNodeMultipliers.ServerStartingMoney = 0.75;\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.1;\n BitNodeMultipliers.CrimeMoney = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.05;\n BitNodeMultipliers.CompanyWorkExpGain = 0.5;\n BitNodeMultipliers.ClassGymExpGain = 0.5;\n BitNodeMultipliers.FactionWorkExpGain = 0.5;\n BitNodeMultipliers.HackExpGain = 0.4;\n BitNodeMultipliers.CrimeExpGain = 0.5;\n BitNodeMultipliers.FactionWorkRepGain = 0.75;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.2;\n BitNodeMultipliers.WorldDaemonDifficulty = 3;\n break;\n case 5: // Artificial intelligence\n BitNodeMultipliers.ServerMaxMoney = 2;\n BitNodeMultipliers.ServerStartingSecurity = 2;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.15;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.InfiltrationRep = 1.5;\n BitNodeMultipliers.InfiltrationMoney = 1.5;\n BitNodeMultipliers.AugmentationMoneyCost = 2;\n BitNodeMultipliers.HackExpGain = 0.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.3;\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.2;\n BitNodeMultipliers.WorldDaemonDifficulty = 1.5;\n break;\n case 6: // Bladeburner\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.ServerMaxMoney = 0.4;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n BitNodeMultipliers.ScriptHackMoney = 0.75;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.75;\n BitNodeMultipliers.InfiltrationMoney = 0.75;\n BitNodeMultipliers.CorporationValuation = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.FactionPassiveRepGain = 0;\n BitNodeMultipliers.HackExpGain = 0.25;\n BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 2;\n BitNodeMultipliers.GangSoftcap = 0.7;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n break;\n case 7: // Bladeburner 2079\n BitNodeMultipliers.BladeburnerRank = 0.6;\n BitNodeMultipliers.BladeburnerSkillCost = 2;\n BitNodeMultipliers.AugmentationMoneyCost = 3;\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.ServerMaxMoney = 0.4;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n BitNodeMultipliers.ScriptHackMoney = 0.5;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.75;\n BitNodeMultipliers.InfiltrationMoney = 0.75;\n BitNodeMultipliers.CorporationValuation = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.FactionPassiveRepGain = 0;\n BitNodeMultipliers.HackExpGain = 0.25;\n BitNodeMultipliers.FourSigmaMarketDataCost = 2;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 2;\n BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.9;\n BitNodeMultipliers.StaneksGiftExtraSize = -1;\n BitNodeMultipliers.GangSoftcap = 0.7;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n break;\n case 8: // Ghost of Wall Street\n BitNodeMultipliers.ScriptHackMoney = 0.3;\n BitNodeMultipliers.ScriptHackMoneyGain = 0;\n BitNodeMultipliers.ManualHackMoney = 0;\n BitNodeMultipliers.CompanyWorkMoney = 0;\n BitNodeMultipliers.CrimeMoney = 0;\n BitNodeMultipliers.HacknetNodeMoney = 0;\n BitNodeMultipliers.InfiltrationMoney = 0;\n BitNodeMultipliers.RepToDonateToFaction = 0;\n BitNodeMultipliers.CorporationValuation = 0;\n BitNodeMultipliers.CodingContractMoney = 0;\n BitNodeMultipliers.StaneksGiftExtraSize = -7;\n BitNodeMultipliers.PurchasedServerSoftcap = 4;\n BitNodeMultipliers.GangSoftcap = 0;\n BitNodeMultipliers.CorporationSoftCap = 0;\n break;\n case 9: // Hacktocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.5;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.45;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.45;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.45;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.45;\n BitNodeMultipliers.CharismaLevelMultiplier = 0.45;\n BitNodeMultipliers.PurchasedServerLimit = 0;\n BitNodeMultipliers.HomeComputerRamCost = 5;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.1;\n BitNodeMultipliers.HackExpGain = 0.05;\n BitNodeMultipliers.ServerStartingMoney = 0.1;\n BitNodeMultipliers.ServerMaxMoney = 0.1;\n BitNodeMultipliers.ServerStartingSecurity = 2.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.FourSigmaMarketDataCost = 5;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;\n BitNodeMultipliers.BladeburnerRank = 0.9;\n BitNodeMultipliers.BladeburnerSkillCost = 1.2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 2;\n BitNodeMultipliers.GangSoftcap = 0.8;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n break;\n case 10: // Digital Carbon\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.4;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.4;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.4;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.4;\n BitNodeMultipliers.CharismaLevelMultiplier = 0.4;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.HacknetNodeMoney = 0.5;\n BitNodeMultipliers.ManualHackMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.5;\n BitNodeMultipliers.CodingContractMoney = 0.5;\n BitNodeMultipliers.InfiltrationMoney = 0.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.AugmentationMoneyCost = 5;\n BitNodeMultipliers.AugmentationRepCost = 2;\n BitNodeMultipliers.HomeComputerRamCost = 1.5;\n BitNodeMultipliers.PurchasedServerCost = 5;\n BitNodeMultipliers.PurchasedServerLimit = 0.6;\n BitNodeMultipliers.PurchasedServerMaxRam = 0.5;\n BitNodeMultipliers.BladeburnerRank = 0.8;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75;\n BitNodeMultipliers.StaneksGiftExtraSize = -3;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.1;\n BitNodeMultipliers.GangSoftcap = 0.9;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n break;\n case 11: //The Big Crash\n BitNodeMultipliers.HackingLevelMultiplier = 0.6;\n BitNodeMultipliers.HackExpGain = 0.5;\n BitNodeMultipliers.ServerMaxMoney = 0.1;\n BitNodeMultipliers.ServerStartingMoney = 0.1;\n BitNodeMultipliers.ServerGrowthRate = 0.2;\n BitNodeMultipliers.ServerWeakenRate = 2;\n BitNodeMultipliers.CrimeMoney = 3;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.HacknetNodeMoney = 0.1;\n BitNodeMultipliers.AugmentationMoneyCost = 2;\n BitNodeMultipliers.InfiltrationMoney = 2.5;\n BitNodeMultipliers.InfiltrationRep = 2.5;\n BitNodeMultipliers.CorporationValuation = 0.1;\n BitNodeMultipliers.CodingContractMoney = 0.25;\n BitNodeMultipliers.FourSigmaMarketDataCost = 4;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 1.5;\n break;\n case 12: {\n //The Recursion\n let sf12Lvl = 0;\n for (let i = 0; i < p.sourceFiles.length; i++) {\n if (p.sourceFiles[i].n === 12) {\n sf12Lvl = p.sourceFiles[i].lvl;\n }\n }\n const inc = Math.pow(1.02, sf12Lvl);\n const dec = 1 / inc;\n\n // Multiplier for number of augs needed for Daedalus increases\n // up to a maximum of 1.34, which results in 40 Augs required\n BitNodeMultipliers.DaedalusAugsRequirement = Math.min(inc, 1.34);\n\n BitNodeMultipliers.HackingLevelMultiplier = dec;\n BitNodeMultipliers.StrengthLevelMultiplier = dec;\n BitNodeMultipliers.DefenseLevelMultiplier = dec;\n BitNodeMultipliers.DexterityLevelMultiplier = dec;\n BitNodeMultipliers.AgilityLevelMultiplier = dec;\n BitNodeMultipliers.CharismaLevelMultiplier = dec;\n\n BitNodeMultipliers.ServerMaxMoney = dec;\n BitNodeMultipliers.ServerStartingMoney = dec;\n BitNodeMultipliers.ServerGrowthRate = dec;\n BitNodeMultipliers.ServerWeakenRate = dec;\n\n //Does not scale, otherwise security might start at 300+\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n\n BitNodeMultipliers.HomeComputerRamCost = inc;\n\n BitNodeMultipliers.PurchasedServerCost = inc;\n BitNodeMultipliers.PurchasedServerLimit = dec;\n BitNodeMultipliers.PurchasedServerMaxRam = dec;\n BitNodeMultipliers.PurchasedServerSoftcap = inc;\n\n BitNodeMultipliers.ManualHackMoney = dec;\n BitNodeMultipliers.ScriptHackMoney = dec;\n BitNodeMultipliers.CompanyWorkMoney = dec;\n BitNodeMultipliers.CrimeMoney = dec;\n BitNodeMultipliers.HacknetNodeMoney = dec;\n BitNodeMultipliers.CodingContractMoney = dec;\n\n BitNodeMultipliers.CompanyWorkExpGain = dec;\n BitNodeMultipliers.ClassGymExpGain = dec;\n BitNodeMultipliers.FactionWorkExpGain = dec;\n BitNodeMultipliers.HackExpGain = dec;\n BitNodeMultipliers.CrimeExpGain = dec;\n\n BitNodeMultipliers.FactionWorkRepGain = dec;\n BitNodeMultipliers.FactionPassiveRepGain = dec;\n BitNodeMultipliers.RepToDonateToFaction = inc;\n\n BitNodeMultipliers.AugmentationRepCost = inc;\n BitNodeMultipliers.AugmentationMoneyCost = inc;\n\n BitNodeMultipliers.InfiltrationMoney = dec;\n BitNodeMultipliers.InfiltrationRep = dec;\n\n BitNodeMultipliers.FourSigmaMarketDataCost = inc;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = inc;\n\n BitNodeMultipliers.CorporationValuation = dec;\n\n BitNodeMultipliers.BladeburnerRank = dec;\n BitNodeMultipliers.BladeburnerSkillCost = inc;\n\n BitNodeMultipliers.StaneksGiftPowerMultiplier = inc;\n BitNodeMultipliers.StaneksGiftExtraSize = inc;\n BitNodeMultipliers.GangSoftcap = 0.8;\n BitNodeMultipliers.CorporationSoftCap = 0.8;\n BitNodeMultipliers.WorldDaemonDifficulty = inc;\n break;\n }\n case 13: {\n BitNodeMultipliers.PurchasedServerSoftcap = 1.6;\n\n BitNodeMultipliers.HackingLevelMultiplier = 0.25;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.7;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.7;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.7;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.7;\n\n BitNodeMultipliers.ServerMaxMoney = 0.45;\n BitNodeMultipliers.ServerStartingMoney = 0.75;\n\n BitNodeMultipliers.ServerStartingSecurity = 3;\n\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.4;\n BitNodeMultipliers.CrimeMoney = 0.4;\n BitNodeMultipliers.HacknetNodeMoney = 0.4;\n BitNodeMultipliers.CodingContractMoney = 0.4;\n\n BitNodeMultipliers.CompanyWorkExpGain = 0.5;\n BitNodeMultipliers.ClassGymExpGain = 0.5;\n BitNodeMultipliers.FactionWorkExpGain = 0.5;\n BitNodeMultipliers.HackExpGain = 0.1;\n BitNodeMultipliers.CrimeExpGain = 0.5;\n\n BitNodeMultipliers.FactionWorkRepGain = 0.6;\n\n BitNodeMultipliers.FourSigmaMarketDataCost = 10;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 10;\n\n BitNodeMultipliers.CorporationValuation = 0.001;\n\n BitNodeMultipliers.BladeburnerRank = 0.45;\n BitNodeMultipliers.BladeburnerSkillCost = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;\n BitNodeMultipliers.StaneksGiftExtraSize = 1;\n BitNodeMultipliers.GangSoftcap = 0.3;\n BitNodeMultipliers.CorporationSoftCap = 0.3;\n BitNodeMultipliers.WorldDaemonDifficulty = 3;\n break;\n }\n default:\n console.warn(\"Player.bitNodeN invalid\");\n break;\n }\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\nexport function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n {typeof hashes === \"number\" ? numeralWrapper.formatHashes(hashes) : hashes}\n );\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IActionIdentifier } from \"./IActionIdentifier\";\nimport { ActionIdentifier } from \"./ActionIdentifier\";\nimport { ActionTypes } from \"./data/ActionTypes\";\nimport { Growths } from \"./data/Growths\";\nimport { BlackOperations } from \"./BlackOperations\";\nimport { BlackOperation } from \"./BlackOperation\";\nimport { Operation } from \"./Operation\";\nimport { Contract } from \"./Contract\";\nimport { GeneralActions } from \"./GeneralActions\";\nimport { formatNumber } from \"../utils/StringHelperFunctions\";\nimport { Skills } from \"./Skills\";\nimport { Skill } from \"./Skill\";\nimport { City } from \"./City\";\nimport { IAction } from \"./IAction\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter, Page } from \"../ui/Router\";\nimport { ConsoleHelpText } from \"./data/Help\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { calculateHospitalizationCost } from \"../Hospital/Hospital\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { getTimestamp } from \"../utils/helpers/getTimestamp\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\n\nexport class Bladeburner implements IBladeburner {\n numHosp = 0;\n moneyLost = 0;\n rank = 0;\n maxRank = 0;\n\n skillPoints = 0;\n totalSkillPoints = 0;\n\n teamSize = 0;\n teamLost = 0;\n hpLost = 0;\n\n storedCycles = 0;\n\n randomEventCounter: number = getRandomInt(240, 600);\n\n actionTimeToComplete = 0;\n actionTimeCurrent = 0;\n actionTimeOverflow = 0;\n\n action: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n\n cities: any = {};\n city: string = BladeburnerConstants.CityNames[2];\n skills: any = {};\n skillMultipliers: any = {};\n staminaBonus = 0;\n maxStamina = 0;\n stamina = 0;\n contracts: any = {};\n operations: any = {};\n blackops: any = {};\n logging: any = {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true,\n };\n automateEnabled = false;\n automateActionHigh: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshHigh = 0;\n automateActionLow: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshLow = 0;\n consoleHistory: string[] = [];\n consoleLogs: string[] = [\"Bladeburner Console\", \"Type 'help' to see console commands\"];\n\n constructor(player?: IPlayer) {\n for (let i = 0; i < BladeburnerConstants.CityNames.length; ++i) {\n this.cities[BladeburnerConstants.CityNames[i]] = new City(BladeburnerConstants.CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity(): City {\n const city = this.cities[this.city];\n if (!(city instanceof City)) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n return city;\n }\n\n calculateStaminaPenalty(): number {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n startAction(player: IPlayer, actionId: IActionIdentifier): void {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n switch (actionId.type) {\n case ActionTypes[\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n case ActionTypes[\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n case ActionTypes[\"Operation\"]: {\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n if (actionId.name === \"Raid\" && this.getCurrentCity().comms === 0) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n this.resetAction();\n this.log(\"Error: Tried to start a Black Operation that had already been completed\");\n break;\n }\n\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n this.actionTimeToComplete = 60;\n break;\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n break;\n }\n }\n\n upgradeSkill(skill: Skill): void {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player: IPlayer, commands: string): void {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n postToConsole(input: string, saveToLogs = true): void {\n const MaxConsoleEntries = 100;\n if (saveToLogs) {\n this.consoleLogs.push(input);\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input: string): void {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${getTimestamp()}] ${input}`);\n }\n\n resetAction(): void {\n this.action = new ActionIdentifier({ type: ActionTypes.Idle });\n }\n\n clearConsole(): void {\n this.consoleLogs.length = 0;\n }\n\n prestige(): void {\n this.resetAction();\n const bladeburnerFac = Factions[\"Bladeburners\"];\n if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0): void {\n this.storedCycles += numCycles;\n }\n\n // working on\n getActionIdFromTypeAndName(type = \"\", name = \"\"): IActionIdentifier | null {\n if (type === \"\" || name === \"\") {\n return null;\n }\n const action = new ActionIdentifier();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = ActionTypes[\"Contract\"];\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n break;\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = ActionTypes[\"Operation\"];\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n break;\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = ActionTypes[\"BlackOp\"];\n if (BlackOperations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n break;\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = ActionTypes[\"Training\"];\n action.name = \"Training\";\n break;\n case \"recruitment\":\n case \"recruit\":\n action.type = ActionTypes[\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = ActionTypes[\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n case \"diplomacy\":\n action.type = ActionTypes[\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n case \"hyperbolic regeneration chamber\":\n action.type = ActionTypes[\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n case \"incite violence\":\n action.type = ActionTypes[\"Incite Violence\"];\n action.name = \"Incite Violence\";\n break;\n default:\n return null;\n }\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player: IPlayer, args: string[]): void {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n const name = args[2];\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[name] != null) {\n this.action.type = ActionTypes[name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = ActionTypes.Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = ActionTypes.Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (BlackOperations[name] != null) {\n this.action.type = ActionTypes.BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n break;\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args: string[]): void {\n switch (args.length) {\n case 1: {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n case 2: {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(Skills);\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = Skills[skillNames[i]];\n let level = 0;\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level, 0));\n }\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n break;\n }\n case 3: {\n const skillName = args[2];\n const skill = Skills[skillName];\n if (skill == null || !(skill instanceof Skill)) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n }\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const pointCost = skill.calculateCost(currentLevel);\n if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\n \"You do not have enough Skill Points to upgrade this. You need \" + formatNumber(pointCost, 0),\n );\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n break;\n }\n default: {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args: string[]): void {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\n \"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\",\n );\n break;\n }\n }\n\n executeHelpConsoleCommand(args: string[]): void {\n if (args.length === 1) {\n for (const line of ConsoleHelpText.helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in ConsoleHelpText)) continue;\n const helpText = ConsoleHelpText[args[i]];\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args: string[]): void {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\n \"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\",\n );\n return;\n }\n\n // Enable/Disable\n if (args.length === 2) {\n const flag = args[1];\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\n \"When your stamina drops to \" +\n formatNumber(this.automateThreshLow, 0) +\n \", you will automatically switch to \" +\n this.automateActionLow.name +\n \". When your stamina recovers to \" +\n formatNumber(this.automateThreshHigh, 0) +\n \", you will automatically \" +\n \"switch to \" +\n this.automateActionHigh.name +\n \".\",\n );\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (\n !(this.automateActionLow instanceof ActionIdentifier) ||\n !(this.automateActionHigh instanceof ActionIdentifier)\n ) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n return;\n }\n\n // Set variables\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n\n let highLow = false; // True for high, false for low\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes[val],\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Contract,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Operation,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n break;\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n break;\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command: string): string[] {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n while (i < command.length) {\n const c = command.charAt(i);\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === \" \") {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n ++i;\n }\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n return args;\n }\n\n executeConsoleCommand(player: IPlayer, command: string): void {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n case \"stop\":\n this.resetAction();\n break;\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName: string): void {\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n const rand = Math.random();\n let percentage = getRandomInt(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= getRandomInt(2, 4); // Migration increases population change\n --sourceCity.comms;\n ++destCity.comms;\n }\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName: string, chance: number): void {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n if (chance > 1) {\n chance /= 100;\n }\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent(): void {\n const chance = Math.random();\n\n // Choose random source/destination city for events\n const sourceCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n if (!(sourceCity instanceof City)) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof City) || !(destCity instanceof City)) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms;\n\n // Change pop\n const percentage = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\",\n );\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = getRandomInt(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a large number of Synthoids migrated from \" +\n sourceCityName +\n \" to some other city\",\n );\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + getRandomInt(5, 20) / 100;\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = getRandomInt(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n }\n // 10% chance of nothing happening\n }\n\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n gainActionStats(player: IPlayer, action: IAction, success: boolean): void {\n const difficulty = action.getDifficulty();\n\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n const difficultyMult =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n\n const unweightedGain = time * BladeburnerConstants.BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * BladeburnerConstants.BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n let intExp = unweightedIntGain * action.weights.int * skillMult;\n if (intExp > 1) {\n intExp = Math.pow(intExp, 0.8);\n }\n player.gainIntelligenceExp(intExp);\n }\n\n getDiplomacyEffectiveness(player: IPlayer): number {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player: IPlayer): number {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player: IPlayer): number {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(BladeburnerConstants.BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers(): void {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1,\n };\n }\n\n updateSkillMultipliers(): void {\n this.resetSkillMultipliers();\n for (const skillName in this.skills) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = Skills[skillName];\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n const level = this.skills[skillName];\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success: boolean): void {\n if (this.action.type !== ActionTypes.Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n // Calculate team losses\n const teamCount = action.teamCount;\n if (teamCount >= 1) {\n let max;\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n const losses = getRandomInt(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + formatNumber(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n break;\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n break;\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByCount(0.1);\n break;\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true,\n });\n --city.comms;\n } else {\n const change = getRandomInt(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false,\n });\n }\n city.changeChaosByPercentage(getRandomInt(1, 5));\n break;\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByPercentage(getRandomInt(-3, -1));\n break;\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n }\n city.changeChaosByPercentage(getRandomInt(-5, 5));\n break;\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId: IActionIdentifier): IAction | null {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n return this.contracts[actionId.name];\n case ActionTypes[\"Operation\"]:\n return this.operations[actionId.name];\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return BlackOperations[actionId.name];\n case ActionTypes[\"Training\"]:\n return GeneralActions[\"Training\"];\n case ActionTypes[\"Field Analysis\"]:\n return GeneralActions[\"Field Analysis\"];\n case ActionTypes[\"Recruitment\"]:\n return GeneralActions[\"Recruitment\"];\n case ActionTypes[\"Diplomacy\"]:\n return GeneralActions[\"Diplomacy\"];\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n return GeneralActions[\"Hyperbolic Regeneration Chamber\"];\n case ActionTypes[\"Incite Violence\"]:\n return GeneralActions[\"Incite Violence\"];\n default:\n return null;\n }\n }\n\n completeContract(success: boolean): void {\n if (this.action.type !== ActionTypes.Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n const city = this.getCurrentCity();\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(getRandomInt(100, 1e3));\n break;\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.02);\n break;\n case \"Retirement\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.04);\n break;\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router: IRouter, player: IPlayer): void {\n switch (this.action.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]: {\n try {\n const isOperation = this.action.type === ActionTypes[\"Operation\"];\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Process Contract/Operation success/failure\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count;\n\n // Earn money for contracts\n let moneyGain = 0;\n if (!isOperation) {\n moneyGain = BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(BladeburnerConstants.OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(BladeburnerConstants.ContractSuccessesPerLevel);\n }\n if (action.rankGain) {\n const gain = addOffset(action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, gain);\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + formatNumber(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(\n action.name +\n \" contract successfully completed! Gained \" +\n formatNumber(gain, 3) +\n \" rank and \" +\n numeralWrapper.formatMoney(moneyGain),\n );\n }\n }\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n if (action.rankLoss) {\n loss = addOffset(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n this.hpLost += damage;\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n let logLossText = \"\";\n if (loss > 0) {\n logLossText += \"Lost \" + formatNumber(loss, 3) + \" rank. \";\n }\n if (damage > 0) {\n logLossText += \"Took \" + formatNumber(damage, 0) + \" damage.\";\n }\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n this.startAction(player, this.action); // Repeat action\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const action = this.getActionObject(this.action);\n if (action == null || !(action instanceof BlackOperation)) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Team loss variables\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n if (action.rankGain) {\n rankGain = addOffset(action.rankGain * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n teamLossMax = Math.ceil(teamCount / 2);\n\n // Operation Daedalus\n if (action.name === \"Operation Daedalus\") {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + formatNumber(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n if (action.rankLoss) {\n rankLoss = addOffset(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(\n action.name +\n \" failed! Lost \" +\n formatNumber(rankLoss, 1) +\n \" rank and took \" +\n formatNumber(damage, 0) +\n \" damage\",\n );\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n\n // Calculate team lossses\n if (teamCount >= 1) {\n const losses = getRandomInt(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.blackops) {\n this.log(\"You lost \" + formatNumber(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Training\"]: {\n this.stamina -= 0.5 * BladeburnerConstants.BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n if (this.logging.general) {\n this.log(\n \"Training completed. Gained: \" +\n formatNumber(strExpGain, 1) +\n \" str exp, \" +\n formatNumber(defExpGain, 1) +\n \" def exp, \" +\n formatNumber(dexExpGain, 1) +\n \" dex exp, \" +\n formatNumber(agiExpGain, 1) +\n \" agi exp, \" +\n formatNumber(staminaGain, 3) +\n \" max stamina\",\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]: {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff =\n 0.04 * Math.pow(player.hacking, 0.3) +\n 0.04 * Math.pow(player.intelligence, 0.9) +\n 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n const hackingExpGain = 20 * player.hacking_exp_mult,\n charismaExpGain = 20 * player.charisma_exp_mult;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(BladeburnerConstants.BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, 0.1 * BitNodeMultipliers.BladeburnerRank);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n if (this.logging.general) {\n this.log(\n \"Field analysis completed. Gained 0.1 rank, \" +\n formatNumber(hackingExpGain, 1) +\n \" hacking exp, and \" +\n formatNumber(charismaExpGain, 1) +\n \" charisma exp\",\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Recruitment\"]: {\n const successChance = this.getRecruitmentSuccessChance(player);\n if (Math.random() < successChance) {\n const expGain = 2 * BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Diplomacy\"]: {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n if (this.logging.general) {\n this.log(\n `Diplomacy completed. Chaos levels in the current city fell by ${numeralWrapper.formatPercentage(1 - eff)}`,\n );\n }\n this.startAction(player, this.action); // Repeat Action\n break;\n }\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]: {\n player.regenerateHp(BladeburnerConstants.HrcHpGain);\n\n const staminaGain = this.maxStamina * (BladeburnerConstants.HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n if (this.logging.general) {\n this.log(\n `Rested in Hyperbolic Regeneration Chamber. Restored ${\n BladeburnerConstants.HrcHpGain\n } HP and gained ${numeralWrapper.formatStamina(staminaGain)} stamina`,\n );\n }\n break;\n }\n case ActionTypes[\"Incite Violence\"]: {\n for (const contract of Object.keys(this.contracts)) {\n const growthF = Growths[contract];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + contract);\n this.contracts[contract].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const operation of Object.keys(this.operations)) {\n const growthF = Growths[operation];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + operation);\n this.operations[operation].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n if (this.logging.general) {\n this.log(`Incited violence in the synthoid communities.`);\n }\n for (const cityName of Object.keys(this.cities)) {\n const city = this.cities[cityName];\n city.chaos += 10;\n city.chaos += city.chaos / (Math.log(city.chaos) / Math.log(10));\n }\n\n this.startAction(player, this.action);\n break;\n }\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player: IPlayer, change: number): void {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n this.rank += change;\n if (this.rank < 0) {\n this.rank = 0;\n }\n this.maxRank = Math.max(this.rank, this.maxRank);\n\n const bladeburnersFactionName = \"Bladeburners\";\n if (factionExists(bladeburnersFactionName)) {\n const bladeburnerFac = Factions[bladeburnersFactionName];\n if (!(bladeburnerFac instanceof Faction)) {\n throw new Error(\"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button\");\n }\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation +=\n BladeburnerConstants.RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n }\n\n // Gain skill points\n const rankNeededForSp = (this.totalSkillPoints + 1) * BladeburnerConstants.RanksPerSkillPoint;\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor(\n (this.maxRank - rankNeededForSp) / BladeburnerConstants.RanksPerSkillPoint + 1,\n );\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router: IRouter, player: IPlayer, seconds: number): void {\n if (this.action.type === ActionTypes[\"Idle\"]) return;\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n if (!(this.action instanceof ActionIdentifier)) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n }\n\n // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player: IPlayer): number {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;\n const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player: IPlayer): void {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina =\n (Math.pow(effAgility, 0.8) + this.staminaBonus) *\n this.skillMultipliers.stamina *\n player.bladeburner_max_stamina_mult;\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = (this.maxStamina * this.stamina) / oldMax;\n }\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create(): void {\n this.contracts[\"Tracking\"] = new Contract({\n name: \"Tracking\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: getRandomInt(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1,\n },\n isStealth: true,\n });\n this.contracts[\"Bounty Hunter\"] = new Contract({\n name: \"Bounty Hunter\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: getRandomInt(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9,\n },\n isKill: true,\n });\n this.contracts[\"Retirement\"] = new Contract({\n name: \"Retirement\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: getRandomInt(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1,\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9,\n },\n isKill: true,\n });\n\n this.operations[\"Investigation\"] = new Operation({\n name: \"Investigation\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: getRandomInt(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1,\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Undercover Operation\"] = new Operation({\n name: \"Undercover Operation\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: getRandomInt(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1,\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Sting Operation\"] = new Operation({\n name: \"Sting Operation\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1,\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9,\n },\n isStealth: true,\n });\n this.operations[\"Raid\"] = new Operation({\n name: \"Raid\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9,\n },\n isKill: true,\n });\n this.operations[\"Stealth Retirement Operation\"] = new Operation({\n name: \"Stealth Retirement Operation\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9,\n },\n isStealth: true,\n isKill: true,\n });\n this.operations[\"Assassination\"] = new Operation({\n name: \"Assassination\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: getRandomInt(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8,\n },\n isStealth: true,\n isKill: true,\n });\n }\n\n process(router: IRouter, player: IPlayer): void {\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (router.page() !== Page.BitVerse && this.blackops.hasOwnProperty(\"Operation Daedalus\")) {\n return router.toBitVerse(false, false);\n }\n\n // If the Player starts doing some other actions, set action to idle and alert\n if (Augmentations[AugmentationNames.BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== ActionTypes[\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n if (!Settings.SuppressBladeburnerPopup) {\n dialogBoxCreate(msg);\n }\n }\n this.resetAction();\n }\n\n // If the Player has no Stamina, set action to idle\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n }\n\n // A 'tick' for this mechanic is one second (= 5 game cycles)\n if (this.storedCycles >= BladeburnerConstants.CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / BladeburnerConstants.CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n this.storedCycles -= seconds * BladeburnerConstants.CyclesPerSecond;\n\n // Stamina\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina);\n\n // Count increase for contracts/operations\n for (const contract of Object.values(this.contracts) as Contract[]) {\n const growthF = Growths[contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const op of Object.values(this.operations) as Operation[]) {\n const growthF = Growths[op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n if (growthF !== undefined) {\n op.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n }\n\n // Chaos goes down very slowly\n for (const cityName of BladeburnerConstants.CityNames) {\n const city = this.cities[cityName];\n if (!(city instanceof City)) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n }\n\n // Random Events\n this.randomEventCounter -= seconds;\n if (this.randomEventCounter <= 0) {\n this.randomEvent();\n // Add instead of setting because we might have gone over the required time for the event\n this.randomEventCounter += getRandomInt(240, 600);\n }\n\n this.processAction(router, player, seconds);\n\n // Automation\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new ActionIdentifier({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name,\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new ActionIdentifier({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name,\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId: IActionIdentifier): {\n type: string;\n name: string;\n } {\n const res = { type: \"\", name: \"\" };\n const types = Object.keys(ActionTypes);\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === ActionTypes[types[i]]) {\n res.type = types[i];\n break;\n }\n }\n const gen = [\n \"Training\",\n \"Recruitment\",\n \"FieldAnalysis\",\n \"Field Analysis\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n ];\n if (gen.includes(res.type)) {\n res.type = \"General\";\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn(): string[] {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn(): string[] {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn(): string[] {\n return Object.keys(BlackOperations);\n }\n\n getGeneralActionNamesNetscriptFn(): string[] {\n return Object.keys(GeneralActions);\n }\n\n getSkillNamesNetscriptFn(): string[] {\n return Object.keys(Skills);\n }\n\n startActionNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n\n // Special logic for Black Ops\n if (actionId.type === ActionTypes[\"BlackOp\"]) {\n // Can't start a BlackOp if you don't have the required rank\n const action = this.getActionObject(actionId);\n if (action == null) throw new Error(`Action not found ${actionId.type}, ${actionId.name}`);\n if (!(action instanceof BlackOperation)) throw new Error(`Action should be BlackOperation but isn't`);\n //const blackOp = (action as BlackOperation);\n if (action.reqdRank > this.rank) {\n workerScript.log(\"bladeburner.startAction\", () => `Insufficient rank to start Black Op '${actionId.name}'.`);\n return false;\n }\n\n // Can't start a BlackOp if its already been done\n if (this.blackops[actionId.name] != null) {\n workerScript.log(\"bladeburner.startAction\", () => `Black Op ${actionId.name} has already been completed.`);\n return false;\n }\n\n // Can't start a BlackOp if you haven't done the one before it\n const blackops = [];\n for (const nm in BlackOperations) {\n if (BlackOperations.hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n blackops.sort(function (a, b) {\n return BlackOperations[a].reqdRank - BlackOperations[b].reqdRank; // Sort black ops in intended order\n });\n\n const i = blackops.indexOf(actionId.name);\n if (i === -1) {\n workerScript.log(\"bladeburner.startAction\", () => `Invalid Black Op: '${name}'`);\n return false;\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n workerScript.log(\n \"bladeburner.startAction\",\n () => `Preceding Black Op must be completed before starting '${actionId.name}'.`,\n );\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\n \"bladeburner.startAction\",\n () => `Starting bladeburner action with type '${type}' and name ${name}\"`,\n );\n return true;\n } catch (e: any) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getActionTime(this) * 1000;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n return 30000;\n case ActionTypes[\"Recruitment\"]:\n return this.getRecruitmentTime(player) * 1000;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return 60000;\n default:\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(\n player: IPlayer,\n type: string,\n name: string,\n workerScript: WorkerScript,\n ): [number, number] {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return [1, 1];\n case ActionTypes[\"Recruitment\"]: {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n return Math.floor(actionObj.count);\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Recruitment\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return Infinity;\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = Skills[skillName];\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid skill: '${skillName}'`;\n if (!Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => errorLogText);\n return false;\n }\n\n const skill = Skills[skillName];\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\n \"bladeburner.upgradeSkill\",\n () =>\n `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`,\n );\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", () => `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type === ActionTypes[\"Operation\"] ||\n actionId.type === ActionTypes[\"BlackOp\"] ||\n actionId.type === ActionTypes[\"BlackOperation\"]\n ) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type: string, name: string, size: number, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type !== ActionTypes[\"Operation\"] &&\n actionId.type !== ActionTypes[\"BlackOp\"] &&\n actionId.type !== ActionTypes[\"BlackOperation\"]\n ) {\n workerScript.log(\"bladeburner.setTeamSize\", () => \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", () => `Invalid size: ${size}`);\n return -1;\n }\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", () => `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript: WorkerScript): boolean {\n const bladeburnerFac = Factions[\"Bladeburners\"];\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", () => \"Joined Bladeburners faction.\");\n return true;\n } else {\n workerScript.log(\n \"bladeburner.joinBladeburnerFaction\",\n () => `You do not have the required rank (${this.rank}/${BladeburnerConstants.RankNeededForFaction}).`,\n );\n return false;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Bladeburner\", this);\n }\n\n /**\n * Initiatizes a Bladeburner object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Bladeburner {\n return Generic_fromJSON(Bladeburner, value.data);\n }\n}\n\nReviver.constructors.Bladeburner = Bladeburner;\n","import { CompanyPosition } from \"./CompanyPosition\";\nimport * as posNames from \"./data/companypositionnames\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n name: string;\n info: string;\n companyPositions: IMap;\n expMultiplier: number;\n salaryMultiplier: number;\n jobStatReqOffset: number;\n isMegacorp?: boolean;\n}\n\nconst DefaultConstructorParams: IConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n};\n\nexport class Company {\n /**\n * Company name\n */\n name: string;\n\n /**\n * Description and general information about company\n */\n info: string;\n\n /**\n * Has faction associated.\n */\n isMegacorp: boolean;\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n companyPositions: IMap;\n\n /**\n * Company-specific multiplier for earnings\n */\n expMultiplier: number;\n salaryMultiplier: number;\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n jobStatReqOffset: number;\n\n /**\n * Properties to track the player's progress in this company\n */\n isPlayerEmployed: boolean;\n playerReputation: number;\n favor: number;\n rolloverRep: number;\n\n constructor(p: IConstructorParams = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.rolloverRep = 0;\n this.isMegacorp = false;\n if (p.isMegacorp) this.isMegacorp = true;\n }\n\n hasPosition(pos: CompanyPosition | string): boolean {\n if (pos instanceof CompanyPosition) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions(): boolean {\n return this.companyPositions[posNames.AgentCompanyPositions[0]] != null;\n }\n\n hasBusinessConsultantPositions(): boolean {\n return this.companyPositions[posNames.BusinessConsultantCompanyPositions[0]] != null;\n }\n\n hasBusinessPositions(): boolean {\n return this.companyPositions[posNames.BusinessCompanyPositions[0]] != null;\n }\n\n hasEmployeePositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[1]] != null;\n }\n\n hasITPositions(): boolean {\n return this.companyPositions[posNames.ITCompanyPositions[0]] != null;\n }\n\n hasSecurityPositions(): boolean {\n return this.companyPositions[posNames.SecurityCompanyPositions[2]] != null;\n }\n\n hasSoftwareConsultantPositions(): boolean {\n return this.companyPositions[posNames.SoftwareConsultantCompanyPositions[0]] != null;\n }\n\n hasSoftwarePositions(): boolean {\n return this.companyPositions[posNames.SoftwareCompanyPositions[0]] != null;\n }\n\n hasWaiterPositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[0]] != null;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n const res = this.getFavorGain();\n if (res.length != 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n }\n\n getFavorGain(): number[] {\n if (this.favor == null) {\n this.favor = 0;\n }\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n let favorGain = 0,\n rep = this.playerReputation + this.rolloverRep;\n let reqdRep = CONSTANTS.CompanyReputationToFavorBase * Math.pow(CONSTANTS.CompanyReputationToFavorMult, this.favor);\n while (rep > 0) {\n if (rep >= reqdRep) {\n ++favorGain;\n rep -= reqdRep;\n } else {\n break;\n }\n reqdRep *= CONSTANTS.FactionReputationToFavorMult;\n }\n return [favorGain, rep];\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Company\", this);\n }\n\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Company {\n return Generic_fromJSON(Company, value.data);\n }\n}\n\nReviver.constructors.Company = Company;\n","/**\n * Implements functions for purchasing servers or purchasing more RAM for\n * the home computer\n */\nimport { AddToAllServers, createUniqueRandomIp } from \"./AllServers\";\nimport { safetlyCreateUniqueServer } from \"./ServerHelpers\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isPowerOfTwo } from \"../utils/helpers/isPowerOfTwo\";\n\n// Returns the cost of purchasing a server with the given RAM\n// Returns Infinity for invalid 'ram' arguments\n/**\n * @param ram Amount of RAM on purchased server (GB)\n * @returns Cost of purchasing the given server. Returns infinity for invalid arguments\n */\nexport function getPurchaseServerCost(ram: number): number {\n const sanitizedRam = Math.round(ram);\n if (isNaN(sanitizedRam) || !isPowerOfTwo(sanitizedRam)) {\n return Infinity;\n }\n\n if (sanitizedRam > getPurchaseServerMaxRam()) {\n return Infinity;\n }\n\n const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 6);\n\n return (\n sanitizedRam *\n CONSTANTS.BaseCostFor1GBOfRamServer *\n BitNodeMultipliers.PurchasedServerCost *\n Math.pow(BitNodeMultipliers.PurchasedServerSoftcap, upg)\n );\n}\n\nexport function getPurchaseServerLimit(): number {\n return Math.round(CONSTANTS.PurchasedServerLimit * BitNodeMultipliers.PurchasedServerLimit);\n}\n\nexport function getPurchaseServerMaxRam(): number {\n const ram = Math.round(CONSTANTS.PurchasedServerMaxRam * BitNodeMultipliers.PurchasedServerMaxRam);\n\n // Round this to the nearest power of 2\n return 1 << (31 - Math.clz32(ram));\n}\n\n// Manually purchase a server (NOT through Netscript)\nexport function purchaseServer(hostname: string, ram: number, cost: number, p: IPlayer): void {\n //Check if player has enough money\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You don't have enough money to purchase this server!\");\n return;\n }\n\n //Maximum server limit\n if (p.purchasedServers.length >= getPurchaseServerLimit()) {\n dialogBoxCreate(\n \"You have reached the maximum limit of \" +\n getPurchaseServerLimit() +\n \" servers. \" +\n \"You cannot purchase any more. You can \" +\n \"delete some of your purchased servers using the deleteServer() Netscript function in a script\",\n );\n return;\n }\n\n if (hostname == \"\") {\n dialogBoxCreate(\"You must enter a hostname for your new server!\");\n return;\n }\n\n // Create server\n const newServ = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: hostname,\n ip: createUniqueRandomIp(),\n isConnectedTo: false,\n maxRam: ram,\n organizationName: \"\",\n purchasedByPlayer: true,\n });\n AddToAllServers(newServ);\n\n // Add to Player's purchasedServers array\n p.purchasedServers.push(newServ.hostname);\n\n // Connect new server to home computer\n const homeComputer = p.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n\n p.loseMoney(cost, \"servers\");\n\n dialogBoxCreate(\"Server successfully purchased with hostname \" + hostname);\n}\n\n// Manually upgrade RAM on home computer (NOT through Netscript)\nexport function purchaseRamForHomeComputer(p: IPlayer): void {\n const cost = p.getUpgradeHomeRamCost();\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You do not have enough money to purchase additional RAM for your home computer\");\n return;\n }\n\n const homeComputer = p.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n dialogBoxCreate(`You cannot upgrade your home computer RAM because it is at its maximum possible value`);\n return;\n }\n\n homeComputer.maxRam *= 2;\n p.loseMoney(cost, \"servers\");\n}\n","import { Material } from \"./Material\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\n\ninterface IConstructorParams {\n corp?: ICorporation;\n industry?: IIndustry;\n loc?: string;\n size?: number;\n}\n\nexport class Warehouse {\n // Warehouse's level, which affects its maximum size\n level = 1;\n\n // City that this Warehouse is in\n loc: string;\n\n // Map of Materials held by this Warehouse\n materials: IMap;\n\n // Maximum amount warehouse can hold\n size: number;\n\n // Amount of space currently used by warehouse\n sizeUsed = 0;\n\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n smartSupplyEnabled = false;\n\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n smartSupplyUseLeftovers: { [key: string]: boolean | undefined } = {};\n\n // Stores the amount of product to be produced. Used for Smart Supply unlock.\n // The production tracked by smart supply is always based on the previous cycle,\n // so it will always trail the \"true\" production by 1 cycle\n smartSupplyStore = 0;\n\n constructor(params: IConstructorParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n\n this.materials = {\n Water: new Material({ name: \"Water\" }),\n Energy: new Material({ name: \"Energy\" }),\n Food: new Material({ name: \"Food\" }),\n Plants: new Material({ name: \"Plants\" }),\n Metal: new Material({ name: \"Metal\" }),\n Hardware: new Material({ name: \"Hardware\" }),\n Chemicals: new Material({ name: \"Chemicals\" }),\n Drugs: new Material({ name: \"Drugs\" }),\n Robots: new Material({ name: \"Robots\" }),\n AICores: new Material({ name: \"AI Cores\" }),\n RealEstate: new Material({ name: \"Real Estate\" }),\n };\n\n this.smartSupplyUseLeftovers = {\n Water: true,\n Energy: true,\n Food: true,\n Plants: true,\n Metal: true,\n Hardware: true,\n Chemicals: true,\n Drugs: true,\n Robots: true,\n AICores: true,\n RealEstate: true,\n };\n\n if (params.corp && params.industry) {\n this.updateSize(params.corp, params.industry);\n }\n\n // Default smart supply to being enabled if the upgrade is unlocked\n if (params.corp?.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n }\n\n // Re-calculate how much space is being used by this Warehouse\n updateMaterialSizeUsed(): void {\n this.sizeUsed = 0;\n for (const matName in this.materials) {\n const mat = this.materials[matName];\n if (MaterialSizes.hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * MaterialSizes[matName];\n }\n }\n if (this.sizeUsed > this.size) {\n console.warn(\"Warehouse size used greater than capacity, something went wrong\");\n }\n }\n\n updateSize(corporation: ICorporation, industry: IIndustry): void {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Warehouse\", this);\n }\n\n // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Warehouse {\n return Generic_fromJSON(Warehouse, value.data);\n }\n}\n\nReviver.constructors.Warehouse = Warehouse;\n","import { gangMemberTasksMetadata } from \"./data/tasks\";\nimport { GangMemberTask } from \"./GangMemberTask\";\n\nexport const GangMemberTasks: {\n [key: string]: GangMemberTask;\n} = {};\n\n(function () {\n gangMemberTasksMetadata.forEach((e) => {\n GangMemberTasks[e.name] = new GangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n","import { FragmentType } from \"./FragmentType\";\nimport { Shapes } from \"./data/Shapes\";\n\nexport const Fragments: Fragment[] = [];\n\nexport class Fragment {\n id: number;\n shape: boolean[][];\n type: FragmentType;\n power: number;\n limit: number;\n\n constructor(id: number, shape: boolean[][], type: FragmentType, power: number, limit: number) {\n this.id = id;\n this.shape = shape;\n this.type = type;\n this.power = power;\n this.limit = limit;\n }\n\n fullAt(x: number, y: number, rotation: number): boolean {\n if (y < 0) return false;\n if (y >= this.height(rotation)) return false;\n if (x < 0) return false;\n if (x >= this.width(rotation)) return false;\n // start xy, modifier xy\n let [sx, sy, mx, my] = [0, 0, 1, 1];\n if (rotation === 1) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, 0, -1, 1];\n } else if (rotation === 2) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, this.height(rotation) - 1, -1, -1];\n } else if (rotation === 3) {\n [sx, sy, mx, my] = [0, this.height(rotation) - 1, 1, -1];\n }\n let [qx, qy] = [sx + mx * x, sy + my * y];\n if (rotation % 2 === 1) [qx, qy] = [qy, qx];\n return this.shape[qy][qx];\n }\n\n width(rotation: number): number {\n if (rotation % 2 === 0) return this.shape[0].length;\n return this.shape.length;\n }\n\n height(rotation: number): number {\n if (rotation % 2 === 0) return this.shape.length;\n return this.shape[0].length;\n }\n\n // List of direct neighboors of this fragment.\n neighboors(rotation: number): number[][] {\n const candidates: number[][] = [];\n\n const add = (x: number, y: number): void => {\n if (this.fullAt(x, y, rotation)) return;\n if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;\n candidates.push([x, y]);\n };\n for (let y = 0; y < this.height(rotation); y++) {\n for (let x = 0; x < this.width(rotation); x++) {\n // This cell is full, add all it's neighboors.\n if (!this.fullAt(x, y, rotation)) continue;\n add(x - 1, y);\n add(x + 1, y);\n add(x, y - 1);\n add(x, y + 1);\n }\n }\n const cells: number[][] = [];\n for (const candidate of candidates) {\n if (cells.some((cell) => cell[0] === candidate[0] && cell[1] === candidate[1])) continue;\n cells.push(candidate);\n }\n\n return cells;\n }\n\n copy(): Fragment {\n return new Fragment(\n this.id,\n this.shape.map((a) => a.slice()),\n this.type,\n this.power,\n this.limit,\n );\n }\n}\n\nexport function FragmentById(id: number): Fragment | null {\n for (const fragment of Fragments) {\n if (fragment.id === id) return fragment;\n }\n return null;\n}\n\n(function () {\n const _ = false;\n const X = true;\n Fragments.push(\n new Fragment(\n 0, // id\n Shapes.S,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 1, // id\n Shapes.Z,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 5, // id\n Shapes.T,\n FragmentType.HackingSpeed, // type\n 1.3,\n 1, // limit\n ),\n );\n\n Fragments.push(\n new Fragment(\n 6, // id\n Shapes.I,\n FragmentType.HackingMoney, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 7, // id\n Shapes.J,\n FragmentType.HackingGrow, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 10, // id\n Shapes.T,\n FragmentType.Strength, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 12, // id\n Shapes.L,\n FragmentType.Defense, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 14, // id\n Shapes.L,\n FragmentType.Dexterity, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 16, // id\n Shapes.S,\n FragmentType.Agility, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 18, // id\n Shapes.S,\n FragmentType.Charisma, // type\n 3, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 20, // id\n Shapes.I,\n FragmentType.HacknetMoney, // type\n 1, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 21, // id\n Shapes.O,\n FragmentType.HacknetCost, // type\n -1, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 25, // id\n Shapes.J,\n FragmentType.Rep, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 27, // id\n Shapes.J,\n FragmentType.WorkMoney, // type\n 10, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 28, // id\n Shapes.L,\n FragmentType.Crime, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 30, // id\n Shapes.S,\n FragmentType.Bladeburner, // type\n 0.4, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 100, // id\n [\n // shape\n [_, X, X],\n [X, X, _],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 101, // id\n [\n // shape\n [X, X, X, X],\n [X, _, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 102, // id\n [\n // shape\n [_, X, X, X],\n [X, X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 103, // id\n [\n // shape\n [X, X, X, _],\n [_, _, X, X],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 104, // id\n [\n // shape\n [_, X, X],\n [_, X, _],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 105, // id\n [\n // shape\n [_, _, X],\n [_, X, X],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 106, // id\n [\n // shape\n [X, _, _],\n [X, X, X],\n [X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 107, // id\n [\n // shape\n [_, X, _],\n [X, X, X],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n})();\n\nexport const NoneFragment = new Fragment(-2, [], FragmentType.None, 0, Infinity);\nexport const DeleteFragment = new Fragment(-2, [], FragmentType.Delete, 0, Infinity);\n","import { IPlayer } from \"../IPlayer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nfunction mult(f: Faction): number {\n let favorMult = 1 + f.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return favorMult * BitNodeMultipliers.FactionWorkRepGain;\n}\n\nexport function getHackingWorkRepGain(p: IPlayer, f: Faction): number {\n return (\n ((p.hacking + p.intelligence / 3) / CONSTANTS.MaxSkillLevel) *\n p.faction_rep_mult *\n p.getIntelligenceBonus(1) *\n mult(f)\n );\n}\n\nexport function getFactionSecurityWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.hacking / CONSTANTS.MaxSkillLevel +\n p.strength / CONSTANTS.MaxSkillLevel +\n p.defense / CONSTANTS.MaxSkillLevel +\n p.dexterity / CONSTANTS.MaxSkillLevel +\n p.agility / CONSTANTS.MaxSkillLevel +\n p.intelligence / CONSTANTS.MaxSkillLevel)) /\n 4.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n\nexport function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.hacking / CONSTANTS.MaxSkillLevel +\n p.strength / CONSTANTS.MaxSkillLevel +\n p.defense / CONSTANTS.MaxSkillLevel +\n p.dexterity / CONSTANTS.MaxSkillLevel +\n p.agility / CONSTANTS.MaxSkillLevel +\n p.charisma / CONSTANTS.MaxSkillLevel +\n p.intelligence / CONSTANTS.MaxSkillLevel)) /\n 5.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n","/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\nimport { Stock } from \"./Stock\";\nimport {\n getBuyTransactionCost,\n getSellTransactionGain,\n processTransactionForecastMovement,\n} from \"./StockMarketHelpers\";\n\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { Player } from \"../Player\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nimport * as React from \"react\";\n\n/**\n * Each function takes an optional config object as its last argument\n */\ninterface IOptions {\n rerenderFn?: () => void;\n suppressDialog?: boolean;\n}\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function buyStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.buy\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n }\n\n // Does player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Long);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `You do not have enough money to purchase this position. You need ${numeralWrapper.formatMoney(totalPrice)}.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${numeralWrapper.formatShares(\n stock.maxShares,\n )} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n processTransactionForecastMovement(stock, shares);\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} for ${numeralWrapper.formatMoney(\n totalPrice,\n )}. ` + `Paid ${numeralWrapper.formatMoney(CONSTANTS.StockMarketCommission)} in commission fees.`;\n workerScript.log(\"stock.buy\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid{\" \"}\n in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\nexport function sellStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.sell\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const gains = getSellTransactionGain(stock, shares, PositionTypes.Long);\n if (gains == null) {\n return false;\n }\n let netProfit = gains - stock.playerAvgPx * shares;\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n Player.gainMoney(gains, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n Player.scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(gains)}.`;\n workerScript.log(\"stock.sell\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of{\" \"}\n .\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function shortStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.short\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to initiate a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n return false;\n }\n\n // Does the player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Short);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n \"You do not have enough \" +\n \"money to purchase this short position. You need \" +\n numeralWrapper.formatMoney(totalPrice),\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this short position. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought a short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} ` +\n `for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} ` +\n `in commission fees.`;\n workerScript.log(\"stock.short\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for{\" \"}\n . Paid in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\nexport function sellShort(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"stock.sellShort\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n \"Failed to sell a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = getSellTransactionGain(stock, shares, PositionTypes.Short);\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\n \"stock.sellShort\",\n () => `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n }\n\n return false;\n }\n let profit = totalGain - origCost;\n if (isNaN(profit)) {\n profit = 0;\n }\n Player.gainMoney(totalGain, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n Player.scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold your short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(totalGain)}`;\n workerScript.log(\"stock.sellShort\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions,\n you gained a total of \n ,\n );\n }\n\n return true;\n}\n","import React from \"react\";\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\nimport { Settings } from \"../Settings/Settings\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\n\nexport class Output {\n text: string;\n color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\";\n constructor(text: string, color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\") {\n if (Settings.TimestampsFormat) text = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + text;\n this.text = text;\n this.color = color;\n }\n}\n\nexport class RawOutput {\n raw: React.ReactNode;\n constructor(node: React.ReactNode) {\n if (Settings.TimestampsFormat)\n node = (\n <>\n [{formatTime(Settings.TimestampsFormat)}] {node}\n \n );\n this.raw = node;\n }\n}\n\nexport class Link {\n hostname: string;\n dashes: string;\n constructor(dashes: string, hostname: string) {\n if (Settings.TimestampsFormat) dashes = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + dashes;\n this.hostname = hostname;\n this.dashes = dashes;\n }\n}\n\nexport class TTimer {\n time: number;\n timeLeft: number;\n action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\";\n\n constructor(time: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\") {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n }\n}\n\nexport interface ITerminal {\n action: TTimer | null;\n\n commandHistory: string[];\n commandHistoryIndex: number;\n\n outputHistory: (Output | Link | RawOutput)[];\n\n // True if a Coding Contract prompt is opened\n contractOpen: boolean;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir: string;\n\n print(s: string): void;\n printRaw(node: React.ReactNode): void;\n error(s: string): void;\n success(s: string): void;\n info(s: string): void;\n warn(s: string): void;\n\n clear(): void;\n startAnalyze(): void;\n startBackdoor(player: IPlayer): void;\n startHack(player: IPlayer): void;\n startGrow(player: IPlayer): void;\n startWeaken(player: IPlayer): void;\n finishHack(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n finishGrow(player: IPlayer, cancelled?: boolean): void;\n finishWeaken(player: IPlayer, cancelled?: boolean): void;\n finishBackdoor(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n finishAnalyze(player: IPlayer, cancelled?: boolean): void;\n finishAction(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n getFilepath(filename: string): string;\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null;\n getScript(player: IPlayer, filename: string): Script | null;\n getTextFile(player: IPlayer, filename: string): TextFile | null;\n getLitFile(player: IPlayer, filename: string): string | null;\n cwd(): string;\n setcwd(dir: string): void;\n runContract(player: IPlayer, name: string): void;\n executeScanAnalyzeCommand(player: IPlayer, depth?: number, all?: boolean): void;\n connectToServer(player: IPlayer, server: string): void;\n executeCommand(router: IRouter, player: IPlayer, command: string): void;\n executeCommands(router: IRouter, player: IPlayer, commands: string): void;\n // If there was any changes, will return true, once.\n process(router: IRouter, player: IPlayer, cycles: number): void;\n prestige(): void;\n getProgressText(): string;\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\ninterface ISkillParams {\n name: string;\n desc: string;\n\n baseCost?: number;\n costInc?: number;\n maxLvl?: number;\n\n successChanceAll?: number;\n successChanceStealth?: number;\n successChanceKill?: number;\n successChanceContract?: number;\n successChanceOperation?: number;\n successChanceEstimate?: number;\n\n actionTime?: number;\n\n effHack?: number;\n effStr?: number;\n effDef?: number;\n effDex?: number;\n effAgi?: number;\n effCha?: number;\n\n stamina?: number;\n money?: number;\n expGain?: number;\n}\n\nexport class Skill {\n name: string;\n desc: string;\n // Cost is in Skill Points\n baseCost = 1;\n // Additive cost increase per level\n costInc = 1;\n maxLvl = 0;\n\n /**\n * These benefits are additive. So total multiplier will be level (handled externally) times the\n * effects below\n */\n successChanceAll = 0;\n successChanceStealth = 0;\n successChanceKill = 0;\n successChanceContract = 0;\n successChanceOperation = 0;\n\n /**\n * This multiplier affects everything that increases synthoid population/community estimate\n * e.g. Field analysis, Investigation Op, Undercover Op\n */\n successChanceEstimate = 0;\n actionTime = 0;\n effHack = 0;\n effStr = 0;\n effDef = 0;\n effDex = 0;\n effAgi = 0;\n effCha = 0;\n stamina = 0;\n money = 0;\n expGain = 0;\n\n constructor(params: ISkillParams = { name: \"foo\", desc: \"foo\" }) {\n if (!params.name) {\n throw new Error(\"Failed to initialize Bladeburner Skill. No name was specified in ctor\");\n }\n if (!params.desc) {\n throw new Error(\"Failed to initialize Bladeburner Skills. No desc was specified in ctor\");\n }\n this.name = params.name;\n this.desc = params.desc;\n this.baseCost = params.baseCost ? params.baseCost : 1;\n this.costInc = params.costInc ? params.costInc : 1;\n\n if (params.maxLvl) {\n this.maxLvl = params.maxLvl;\n }\n\n if (params.successChanceAll) {\n this.successChanceAll = params.successChanceAll;\n }\n if (params.successChanceStealth) {\n this.successChanceStealth = params.successChanceStealth;\n }\n if (params.successChanceKill) {\n this.successChanceKill = params.successChanceKill;\n }\n if (params.successChanceContract) {\n this.successChanceContract = params.successChanceContract;\n }\n if (params.successChanceOperation) {\n this.successChanceOperation = params.successChanceOperation;\n }\n\n if (params.successChanceEstimate) {\n this.successChanceEstimate = params.successChanceEstimate;\n }\n\n if (params.actionTime) {\n this.actionTime = params.actionTime;\n }\n if (params.effHack) {\n this.effHack = params.effHack;\n }\n if (params.effStr) {\n this.effStr = params.effStr;\n }\n if (params.effDef) {\n this.effDef = params.effDef;\n }\n if (params.effDex) {\n this.effDex = params.effDex;\n }\n if (params.effAgi) {\n this.effAgi = params.effAgi;\n }\n if (params.effCha) {\n this.effCha = params.effCha;\n }\n\n if (params.stamina) {\n this.stamina = params.stamina;\n }\n if (params.money) {\n this.money = params.money;\n }\n if (params.expGain) {\n this.expGain = params.expGain;\n }\n }\n\n calculateCost(currentLevel: number): number {\n return Math.floor((this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost);\n }\n\n getMultiplier(name: string): number {\n if (name === \"successChanceAll\") return this.successChanceAll;\n if (name === \"successChanceStealth\") return this.successChanceStealth;\n if (name === \"successChanceKill\") return this.successChanceKill;\n if (name === \"successChanceContract\") return this.successChanceContract;\n if (name === \"successChanceOperation\") return this.successChanceOperation;\n if (name === \"successChanceEstimate\") return this.successChanceEstimate;\n\n if (name === \"actionTime\") return this.actionTime;\n\n if (name === \"effHack\") return this.effHack;\n if (name === \"effStr\") return this.effStr;\n if (name === \"effDef\") return this.effDef;\n if (name === \"effDex\") return this.effDex;\n if (name === \"effAgi\") return this.effAgi;\n if (name === \"effCha\") return this.effCha;\n\n if (name === \"stamina\") return this.stamina;\n if (name === \"money\") return this.money;\n if (name === \"expGain\") return this.expGain;\n return 0;\n }\n}\n","/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\nimport { City } from \"./City\";\nimport { Cities } from \"./Cities\";\nimport { Location, IConstructorParams } from \"./Location\";\nimport { CityName } from \"./data/CityNames\";\nimport { LocationsMetadata } from \"./data/LocationsMetadata\";\n\nimport { IMap } from \"../types\";\n\nexport const Locations: IMap = {};\n\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\nfunction constructLocation(p: IConstructorParams): Location {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof Location) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new Location(p);\n\n return Locations[p.name];\n}\n\n// First construct all cities\nCities[CityName.Aevum] = new City(CityName.Aevum);\nCities[CityName.Chongqing] = new City(CityName.Chongqing);\nCities[CityName.Ishima] = new City(CityName.Ishima);\nCities[CityName.NewTokyo] = new City(CityName.NewTokyo);\nCities[CityName.Sector12] = new City(CityName.Sector12);\nCities[CityName.Volhaven] = new City(CityName.Volhaven);\n\nCities[CityName.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 `;\nCities[CityName.Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A------G-- \n / 39 | 41 [church] \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\nCities[CityName.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 [glitch] \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ H \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 `;\nCities[CityName.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 `;\nCities[CityName.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] `;\nCities[CityName.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 `;\n\n// Then construct all locations, and add them to the cities as we go.\nfor (const metadata of LocationsMetadata) {\n const loc = constructLocation(metadata);\n\n const cityName = loc.city;\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city in Cities) {\n Cities[city].addLocation(loc.name);\n }\n } else {\n Cities[cityName].addLocation(loc.name);\n }\n}\n","/**\n * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { CONSTANTS } from \"../Constants\";\n\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateCoreUpgradeCost,\n calculateRamUpgradeCost,\n} from \"./formulas/HacknetNodes\";\nimport { HacknetNodeConstants } from \"./data/Constants\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class HacknetNode implements IHacknetNode {\n // Node's number of cores\n cores = 1;\n\n // Node's Level\n level = 1;\n\n // Node's production per second\n moneyGainRatePerSecond = 0;\n\n // Identifier for Node. Includes the full \"name\" (hacknet-node-N)\n name: string;\n\n // How long this Node has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Node's RAM (GB)\n ram = 1;\n\n // Total money earned by this Node\n totalMoneyGenerated = 0;\n\n constructor(name = \"\", prodMult = 1) {\n this.name = name;\n\n this.updateMoneyGainRate(prodMult);\n }\n\n // Get the cost to upgrade this Node's number of cores\n calculateCoreUpgradeCost(levels = 1, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's level\n calculateLevelUpgradeCost(levels = 1, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's RAM\n calculateRamUpgradeCost(levels = 1, costMult: number): number {\n return calculateRamUpgradeCost(this.ram, levels, costMult);\n }\n\n // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n\n return gain;\n }\n\n // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n upgradeCore(levels = 1, prodMult: number): void {\n this.cores = Math.min(HacknetNodeConstants.MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n upgradeLevel(levels = 1, prodMult: number): void {\n this.level = Math.min(HacknetNodeConstants.MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n upgradeRam(levels = 1, prodMult: number): void {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n this.updateMoneyGainRate(prodMult);\n }\n\n // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n updateMoneyGainRate(prodMult: number): void {\n this.moneyGainRatePerSecond = calculateMoneyGainRate(this.level, this.ram, this.cores, prodMult);\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n dialogBoxCreate(\"Error in calculating Hacknet Node production. Please report to game developer\");\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"HacknetNode\", this);\n }\n\n /**\n * Initiatizes a HacknetNode object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HacknetNode {\n return Generic_fromJSON(HacknetNode, value.data);\n }\n}\n\nReviver.constructors.HacknetNode = HacknetNode;\n","/**\n * Returns the input array as a comma separated string.\n *\n * Does several things that Array.toString() doesn't do\n * - Adds brackets around the array\n * - Adds quotation marks around strings\n */\nexport function arrayToString(a: T[]): string {\n const vals: any[] = [];\n for (let i = 0; i < a.length; ++i) {\n let elem: any = a[i];\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n","import { Action } from \"./Action\";\nimport { IMap } from \"../types\";\n\nexport const GeneralActions: IMap = {};\n\nconst actionNames : Array = [\n \"Training\",\n \"Field Analysis\",\n \"Recruitment\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\"\n];\n\nfor (const actionName of actionNames){\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n}","// Enum values are lowercased to match css classes\nexport enum Suit {\n Clubs = \"clubs\",\n Diamonds = \"diamonds\",\n Hearts = \"hearts\",\n Spades = \"spades\",\n}\n\nexport class Card {\n constructor(readonly value: number, readonly suit: Suit) {\n if (value < 1 || value > 13) {\n throw new Error(`Card instantiated with improper value: ${value}`);\n }\n }\n\n formatValue(): string {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return `${this.value}`;\n }\n }\n\n isRedSuit(): boolean {\n return this.suit === Suit.Hearts || this.suit === Suit.Diamonds;\n }\n\n getStringRepresentation(): string {\n const value = this.formatValue();\n\n return `${value} of ${this.suit}`;\n }\n}\n","import { IActionIdentifier } from \"./IActionIdentifier\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\ninterface IParams {\n name?: string;\n type?: number;\n}\n\nexport class ActionIdentifier implements IActionIdentifier {\n name = \"\";\n type = -1;\n\n constructor(params: IParams = {}) {\n if (params.name) this.name = params.name;\n if (params.type) this.type = params.type;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"ActionIdentifier\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActionIdentifier {\n return Generic_fromJSON(ActionIdentifier, value.data);\n }\n}\n\nReviver.constructors.ActionIdentifier = ActionIdentifier;\n","import { BitNodes } from \"../BitNode/BitNode\";\n\nexport class SourceFile {\n info: JSX.Element;\n lvl = 1;\n n: number;\n name: string;\n owned = false;\n\n constructor(number: number, info: JSX.Element) {\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = BitNodes[bitnodeKey];\n if (bitnode == null) {\n throw new Error(\"Invalid Bit Node for this Source File\");\n }\n\n this.n = number;\n this.name = `Source-File ${number}: ${bitnode.name}`;\n this.info = info;\n }\n}\n","export function random(min: number, max: number): number {\n return Math.random() * (max - min) + min;\n}\n\nexport function getArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case \"ArrowUp\":\n case \"w\":\n return \"↑\";\n case \"ArrowLeft\":\n case \"a\":\n return \"←\";\n case \"ArrowDown\":\n case \"s\":\n return \"↓\";\n case \"ArrowRight\":\n case \"d\":\n return \"→\";\n }\n return \"\";\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { Player } from \"../Player\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\n\nexport function scriptCalculateOfflineProduction(runningScript: RunningScript): void {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n let confidence = runningScript.onlineRunningTime / 14400;\n if (confidence >= 1) {\n confidence = 1;\n }\n\n //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n\n // Grow\n for (const hostname in runningScript.dataMap) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][2] == 0 || runningScript.dataMap[hostname][2] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n const timesGrown = Math.round(\n ((0.5 * runningScript.dataMap[hostname][2]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n if (!(serv instanceof Server)) throw new Error(\"trying to grow a non-normal server\");\n const growth = processSingleServerGrowth(serv, timesGrown, Player, host.cpuCores);\n runningScript.log(\n `'${serv.hostname}' grown by ${numeralWrapper.format(growth * 100 - 100, \"0.000000%\")} while offline`,\n );\n }\n }\n\n // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n const expGain = confidence * (runningScript.onlineExpGained / runningScript.onlineRunningTime) * timePassed;\n Player.gainHackingExp(expGain);\n\n // Update script stats\n runningScript.offlineRunningTime += timePassed;\n runningScript.offlineExpGained += expGain;\n\n // Weaken\n for (const hostname in runningScript.dataMap) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][3] == 0 || runningScript.dataMap[hostname][3] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n\n if (!(serv instanceof Server)) throw new Error(\"trying to weaken a non-normal server\");\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n const timesWeakened = Math.round(\n ((0.5 * runningScript.dataMap[hostname][3]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n}\n\n//Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\nexport function findRunningScript(\n filename: string,\n args: (string | number | boolean)[],\n server: BaseServer,\n): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && compareArrays(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n\n//Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\nexport function findRunningScriptByPid(pid: number, server: BaseServer): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n","import { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\nexport class TextFile {\n /**\n * The full file name.\n */\n fn: string;\n\n /**\n * The content of the file.\n */\n text: string;\n\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n\n /**\n * Concatenates the raw values to the end of current content.\n */\n append(txt: string): void {\n this.text += txt;\n }\n\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n download(): void {\n const filename: string = this.fn;\n const file: Blob = new Blob([this.text], { type: \"text/plain\" });\n /* tslint:disable-next-line:strict-boolean-expressions */\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a: HTMLAnchorElement = document.createElement(\"a\");\n const url: string = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n\n /**\n * Retrieve the content of the file.\n */\n read(): string {\n return this.text;\n }\n\n /**\n * Shows the content to the user via the game's dialog box.\n */\n show(): void {\n dialogBoxCreate(`${this.fn}

${this.text}`);\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"TextFile\", this);\n }\n\n /**\n * Replaces the current content with the text provided.\n */\n write(txt: string): void {\n this.text = txt;\n }\n\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): TextFile {\n return Generic_fromJSON(TextFile, value.data);\n }\n}\n\nReviver.constructors.TextFile = TextFile;\n\n/**\n * Retrieve the file object for the filename on the specified server.\n * @param fn The file name to look for\n * @param server The server object to look in\n * @returns The file object, or null if it couldn't find it.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function getTextFile(fn: string, server: BaseServer): TextFile | null {\n const filename: string = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n for (const file of server.textFiles as TextFile[]) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\n\n/**\n * Creates a TextFile on the target server.\n * @param fn The file name to create.\n * @param txt The contents of the file.\n * @param server The server that the file should be created on.\n * @returns The instance of the file.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function createTextFile(fn: string, txt: string, server: BaseServer): TextFile | undefined {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n\n return undefined;\n }\n const file: TextFile = new TextFile(fn, txt);\n server.textFiles.push(file);\n\n return file;\n}\n","import { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ninterface IError {\n fileName?: string;\n lineNumber?: number;\n}\n\nexport function exceptionAlert(e: IError | string): void {\n console.error(e);\n dialogBoxCreate(\n \"Caught an exception: \" +\n e +\n \"

\" +\n \"Filename: \" +\n ((e as any).fileName || \"UNKNOWN FILE NAME\") +\n \"

\" +\n \"Line Number: \" +\n ((e as any).lineNumber || \"UNKNOWN LINE NUMBER\") +\n \"

\" +\n \"This is a bug, please report to game developer with this \" +\n \"message as well as details about how to reproduce the bug.

\" +\n \"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your \" +\n \"safe doesn't get corrupted\",\n );\n}\n","import { Message } from \"./Message\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Player } from \"../Player\";\nimport { redPillFlag } from \"../RedPill\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\n//Sends message to player, including a pop up\nfunction sendMessage(msg: Message, forced = false): void {\n msg.recvd = true;\n if (forced || !Settings.SuppressMessages) {\n showMessage(msg.filename);\n }\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(name: string): void {\n const msg = Messages[name];\n if (!msg) throw new Error(\"trying to display unexistent message\");\n const txt =\n \"Message received from unknown sender:

\" +\n \"\" +\n msg.msg +\n \"

\" +\n \"This message was saved as \" +\n msg.filename +\n \" onto your home computer.\";\n dialogBoxCreate(txt);\n}\n\n//Adds a message to a server\nfunction addMessageToServer(msg: Message, serverHostname: string): void {\n const server = GetServer(serverHostname);\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n for (let i = 0; i < server.messages.length; ++i) {\n const other = server.messages[i];\n if (msg.filename === other) {\n return; //Already exists\n }\n }\n server.messages.push(msg.filename);\n}\n\n//Checks if any of the 'timed' messages should be sent\nfunction checkForMessagesToSend(): void {\n if (redPillFlag) return;\n const jumper0 = Messages[MessageFilenames.Jumper0];\n const jumper1 = Messages[MessageFilenames.Jumper1];\n const jumper2 = Messages[MessageFilenames.Jumper2];\n const jumper3 = Messages[MessageFilenames.Jumper3];\n const jumper4 = Messages[MessageFilenames.Jumper4];\n const cybersecTest = Messages[MessageFilenames.CyberSecTest];\n const nitesecTest = Messages[MessageFilenames.NiteSecTest];\n const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n const redpill = Messages[MessageFilenames.RedPill];\n\n let redpillOwned = false;\n if (Augmentations[AugmentationNames.TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && Player.sourceFiles.length === 0 && !redPillFlag) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!redPillFlag) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && Player.hacking >= 25) {\n sendMessage(jumper0);\n const flightName = Programs.Flight.name;\n const homeComp = Player.getHomeComputer();\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && Player.hacking >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && Player.hacking >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && Player.hacking >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && Player.hacking >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && Player.hacking >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && Player.hacking >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && Player.hacking >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg: Message): void {\n Messages[msg.filename] = msg;\n}\n\nlet Messages: { [key: string]: Message | undefined } = {};\n\nfunction loadMessages(saveString: string): void {\n Messages = JSON.parse(saveString, Reviver);\n}\n\nconst MessageFilenames = {\n Jumper0: \"j0.msg\",\n Jumper1: \"j1.msg\",\n Jumper2: \"j2.msg\",\n Jumper3: \"j3.msg\",\n Jumper4: \"j4.msg\",\n CyberSecTest: \"csec-test.msg\",\n NiteSecTest: \"nitesec-test.msg\",\n BitRunnersTest: \"19dfj3l1nd.msg\",\n RedPill: \"icarus.msg\",\n};\n\nfunction initMessages(): void {\n //Reset\n Messages = {};\n\n //jump3R Messages\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper0,\n \"I know you can sense it. I know you're searching for it. \" +\n \"It's why you spend night after \" +\n \"night at your computer.

It's real, I've seen it. And I can \" +\n \"help you find it. But not right now. You're not ready yet.

\" +\n \"Use this program to track your progress

\" +\n \"The fl1ght.exe program was added to your home computer

\" +\n \"-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper1,\n \"Soon you will be contacted by a hacking group known as CyberSec. \" +\n \"They can help you with your search.

\" +\n \"You should join them, garner their favor, and \" +\n \"exploit them for their Augmentations. But do not trust them. \" +\n \"They are not what they seem. No one is.

\" +\n \"-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper2,\n \"Do not try to save the world. There is no world to save. If \" +\n \"you want to find the truth, worry only about yourself. Ethics and \" +\n \"morals will get you killed.

Watch out for a hacking group known as NiteSec.\" +\n \"

-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper3,\n \"You must learn to walk before you can run. And you must \" +\n \"run before you can fly. Look for the black hand.

\" +\n \"I.I.I.I

-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper4,\n \"To find what you are searching for, you must understand the bits. \" +\n \"The bits are all around us. The runners will help you.

\" +\n \"-jump3R\",\n ),\n );\n\n //Messages from hacking factions\n AddToAllMessages(\n new Message(\n MessageFilenames.CyberSecTest,\n \"We've been watching you. Your skills are very impressive. But you're wasting \" +\n \"your talents. If you join us, you can put your skills to good use and change \" +\n \"the world for the better. If you join us, we can unlock your full potential.

\" +\n \"But first, you must pass our test. Find and install the backdoor on our server.

\" +\n \"-CyberSec\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.NiteSecTest,\n \"People say that the corrupted governments and corporations rule the world. \" +\n \"Yes, maybe they do. But do you know who everyone really fears? People \" +\n \"like us. Because they can't hide from us. Because they can't fight shadows \" +\n \"and ideas with bullets.

\" +\n \"Join us, and people will fear you, too.

\" +\n \"Find and install the backdoor on our server. Then, we will contact you again.\" +\n \"

-NiteSec\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.BitRunnersTest,\n \"We know what you are doing. We know what drives you. We know \" +\n \"what you are looking for.

\" +\n \"We can help you find the answers.

\" +\n \"run4theh111z\",\n ),\n );\n\n AddToAllMessages(\n new Message(\n MessageFilenames.RedPill,\n \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" +\n \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" +\n \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" +\n \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\",\n ),\n );\n}\n\nexport { Messages, checkForMessagesToSend, showMessage, loadMessages, initMessages };\n","import { BlackOperation } from \"./BlackOperation\";\nimport { IMap } from \"../types\";\n\nexport const BlackOperations: IMap = {};\n\n(function () {\n BlackOperations[\"Operation Typhoon\"] = new BlackOperation({\n name: \"Operation Typhoon\",\n baseDifficulty: 2000,\n reqdRank: 2.5e3,\n rankGain: 50,\n rankLoss: 10,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Zero\"] = new BlackOperation({\n name: \"Operation Zero\",\n baseDifficulty: 2500,\n reqdRank: 5e3,\n rankGain: 60,\n rankLoss: 15,\n hpLoss: 50,\n weights: {\n hack: 0.2,\n str: 0.15,\n def: 0.15,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[\"Operation X\"] = new BlackOperation({\n name: \"Operation X\",\n baseDifficulty: 3000,\n reqdRank: 7.5e3,\n rankGain: 75,\n rankLoss: 15,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Titan\"] = new BlackOperation({\n name: \"Operation Titan\",\n baseDifficulty: 4000,\n reqdRank: 10e3,\n rankGain: 100,\n rankLoss: 20,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Ares\"] = new BlackOperation({\n name: \"Operation Ares\",\n baseDifficulty: 5000,\n reqdRank: 12.5e3,\n rankGain: 125,\n rankLoss: 20,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Archangel\"] = new BlackOperation({\n name: \"Operation Archangel\",\n baseDifficulty: 7500,\n reqdRank: 15e3,\n rankGain: 200,\n rankLoss: 20,\n hpLoss: 25,\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Juggernaut\"] = new BlackOperation({\n name: \"Operation Juggernaut\",\n baseDifficulty: 10e3,\n reqdRank: 20e3,\n rankGain: 300,\n rankLoss: 40,\n hpLoss: 300,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Red Dragon\"] = new BlackOperation({\n name: \"Operation Red Dragon\",\n baseDifficulty: 12.5e3,\n reqdRank: 25e3,\n rankGain: 500,\n rankLoss: 50,\n hpLoss: 500,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation K\"] = new BlackOperation({\n name: \"Operation K\",\n baseDifficulty: 15e3,\n reqdRank: 30e3,\n rankGain: 750,\n rankLoss: 60,\n hpLoss: 1000,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Deckard\"] = new BlackOperation({\n name: \"Operation Deckard\",\n baseDifficulty: 20e3,\n reqdRank: 40e3,\n rankGain: 1e3,\n rankLoss: 75,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Tyrell\"] = new BlackOperation({\n name: \"Operation Tyrell\",\n baseDifficulty: 25e3,\n reqdRank: 50e3,\n rankGain: 1.5e3,\n rankLoss: 100,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Wallace\"] = new BlackOperation({\n name: \"Operation Wallace\",\n baseDifficulty: 30e3,\n reqdRank: 75e3,\n rankGain: 2e3,\n rankLoss: 150,\n hpLoss: 1500,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Shoulder of Orion\"] = new BlackOperation({\n name: \"Operation Shoulder of Orion\",\n baseDifficulty: 35e3,\n reqdRank: 100e3,\n rankGain: 2.5e3,\n rankLoss: 500,\n hpLoss: 1500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[\"Operation Hyron\"] = new BlackOperation({\n name: \"Operation Hyron\",\n baseDifficulty: 40e3,\n reqdRank: 125e3,\n rankGain: 3e3,\n rankLoss: 1e3,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Morpheus\"] = new BlackOperation({\n name: \"Operation Morpheus\",\n baseDifficulty: 45e3,\n reqdRank: 150e3,\n rankGain: 4e3,\n rankLoss: 1e3,\n hpLoss: 100,\n weights: {\n hack: 0.05,\n str: 0.15,\n def: 0.15,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.05,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isStealth: true,\n });\n BlackOperations[\"Operation Ion Storm\"] = new BlackOperation({\n name: \"Operation Ion Storm\",\n baseDifficulty: 50e3,\n reqdRank: 175e3,\n rankGain: 5e3,\n rankLoss: 1e3,\n hpLoss: 5000,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Annihilus\"] = new BlackOperation({\n name: \"Operation Annihilus\",\n baseDifficulty: 55e3,\n reqdRank: 200e3,\n rankGain: 7.5e3,\n rankLoss: 1e3,\n hpLoss: 10e3,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Ultron\"] = new BlackOperation({\n name: \"Operation Ultron\",\n baseDifficulty: 60e3,\n reqdRank: 250e3,\n rankGain: 10e3,\n rankLoss: 2e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n isKill: true,\n });\n BlackOperations[\"Operation Centurion\"] = new BlackOperation({\n name: \"Operation Centurion\",\n baseDifficulty: 70e3,\n reqdRank: 300e3,\n rankGain: 15e3,\n rankLoss: 5e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n BlackOperations[\"Operation Vindictus\"] = new BlackOperation({\n name: \"Operation Vindictus\",\n baseDifficulty: 75e3,\n reqdRank: 350e3,\n rankGain: 20e3,\n rankLoss: 20e3,\n hpLoss: 20e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n BlackOperations[\"Operation Daedalus\"] = new BlackOperation({\n name: \"Operation Daedalus\",\n baseDifficulty: 80e3,\n reqdRank: 400e3,\n rankGain: 40e3,\n rankLoss: 10e3,\n hpLoss: 100e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1,\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75,\n },\n });\n})();\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IPlayerOrSleeve } from \"../PersonObjects/IPlayerOrSleeve\";\nimport { IRouter } from \"../ui/Router\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\n\ninterface IConstructorParams {\n hacking_success_weight?: number;\n strength_success_weight?: number;\n defense_success_weight?: number;\n dexterity_success_weight?: number;\n agility_success_weight?: number;\n charisma_success_weight?: number;\n hacking_exp?: number;\n strength_exp?: number;\n defense_exp?: number;\n dexterity_exp?: number;\n agility_exp?: number;\n charisma_exp?: number;\n intelligence_exp?: number;\n\n kills?: number;\n}\n\nexport class Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n difficulty = 0;\n\n // Amount of karma lost for SUCCESSFULLY committing this crime\n karma = 0;\n\n // How many people die as a result of this crime\n kills = 0;\n\n // How much money is given by the\n money = 0;\n\n // Name of crime\n name = \"\";\n\n // Milliseconds it takes to attempt the crime\n time = 0;\n\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n type = \"\";\n\n // Weighting factors that determine how stats affect the success rate of this crime\n hacking_success_weight = 0;\n strength_success_weight = 0;\n defense_success_weight = 0;\n dexterity_success_weight = 0;\n agility_success_weight = 0;\n charisma_success_weight = 0;\n\n // How much stat experience is granted by this crime\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n constructor(name = \"\", type = \"\", time = 0, money = 0, difficulty = 0, karma = 0, params: IConstructorParams = {}) {\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(router: IRouter, p: IPlayer, div = 1, workerScript: WorkerScript | null = null): number {\n if (div <= 0) {\n div = 1;\n }\n p.startCrime(\n router,\n this.type,\n this.hacking_exp / div,\n this.strength_exp / div,\n this.defense_exp / div,\n this.dexterity_exp / div,\n this.agility_exp / div,\n this.charisma_exp / div,\n this.money / div,\n this.time,\n workerScript,\n );\n\n return this.time;\n }\n\n successRate(p: IPlayerOrSleeve): number {\n let chance: number =\n this.hacking_success_weight * p.hacking +\n this.strength_success_weight * p.strength +\n this.defense_success_weight * p.defense +\n this.dexterity_success_weight * p.dexterity +\n this.agility_success_weight * p.agility +\n this.charisma_success_weight * p.charisma +\n CONSTANTS.IntelligenceCrimeWeight * p.intelligence;\n chance /= CONSTANTS.MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.crime_success_mult;\n chance *= p.getIntelligenceBonus(1);\n\n return Math.min(chance, 1);\n }\n}\n","import React, { useEffect } from \"react\";\nimport { useSnackbar, SnackbarProvider as SB } from \"notistack\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Alert from \"@mui/material/Alert\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n children: React.ReactNode | React.ReactNode[];\n}\n\nexport function SnackbarProvider(props: IProps): React.ReactElement {\n return (\n \n {props.children}\n \n );\n}\n\nexport const SnackbarEvents = new EventEmitter<[string, \"success\" | \"warning\" | \"error\" | \"info\"]>();\n\nexport function Snackbar(): React.ReactElement {\n const { enqueueSnackbar } = useSnackbar();\n\n useEffect(() =>\n SnackbarEvents.subscribe((s, variant) =>\n enqueueSnackbar({s}, {\n content: (k, m) => {m},\n variant: variant,\n }),\n ),\n );\n return <>;\n}\n","/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\nimport { HashUpgrade, IConstructorParams } from \"./HashUpgrade\";\nimport { HashUpgradesMetadata } from \"./data/HashUpgradesMetadata\";\nimport { IMap } from \"../types\";\n\nexport const HashUpgrades: IMap = {};\n\nfunction createHashUpgrade(p: IConstructorParams): void {\n HashUpgrades[p.name] = new HashUpgrade(p);\n}\n\nfor (const metadata of HashUpgradesMetadata) {\n createHashUpgrade(metadata);\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getStockMarket4SDataCost(): number {\n return CONSTANTS.MarketData4SCost * BitNodeMultipliers.FourSigmaMarketDataCost;\n}\n\nexport function getStockMarket4STixApiCost(): number {\n return CONSTANTS.MarketDataTixApi4SCost * BitNodeMultipliers.FourSigmaMarketDataApiCost;\n}\n","/**\n * React Component for a button that's used to apply for a job\n */\nimport * as React from \"react\";\n\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\n\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n company: Company;\n entryPosType: CompanyPosition;\n onClick: (e: React.MouseEvent) => void;\n text: string;\n};\n\nexport function ApplyToJobButton(props: IProps): React.ReactElement {\n const player = use.Player();\n\n function getJobRequirementTooltip(): string {\n const pos = player.getNextCompanyPosition(props.company, props.entryPosType);\n if (pos == null) {\n return \"\";\n }\n\n if (!props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return getJobRequirementText(props.company, pos, true);\n }\n\n return (\n <>\n
}>\n \n \n
\n \n );\n}\n","/**\n * Event emitter that triggers when scripts are started/stopped\n */\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nexport const WorkerScriptStartStopEventEmitter = new EventEmitter<[]>();\n","/**\n * Implementation for what happens when you destroy a BitNode\n */\nimport React from \"react\";\nimport { Player } from \"./Player\";\nimport { prestigeSourceFile } from \"./Prestige\";\nimport { PlayerOwnedSourceFile } from \"./SourceFile/PlayerOwnedSourceFile\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { SourceFiles } from \"./SourceFile/SourceFiles\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { IRouter } from \"./ui/Router\";\n\nexport let redPillFlag = false;\n\nexport function setRedPillFlag(b: boolean): void {\n redPillFlag = b;\n}\n\nfunction giveSourceFile(bitNodeNumber: number): void {\n const sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n const sourceFile = SourceFiles[sourceFileKey];\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n }\n\n // Check if player already has this source file\n let alreadyOwned = false;\n let ownedSourceFile = null;\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n if (Player.sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = Player.sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n dialogBoxCreate(\n \"The Source-File for the BitNode you just destroyed, \" + sourceFile.name + \", \" + \"is already at max level!\",\n );\n } else {\n ++ownedSourceFile.lvl;\n dialogBoxCreate(\n sourceFile.name +\n \" was upgraded to level \" +\n ownedSourceFile.lvl +\n \" for \" +\n \"destroying its corresponding BitNode!\",\n );\n }\n } else {\n const playerSrcFile = new PlayerOwnedSourceFile(bitNodeNumber, 1);\n Player.sourceFiles.push(playerSrcFile);\n if (bitNodeNumber === 5 && Player.intelligence === 0) {\n // Artificial Intelligence\n Player.intelligence = 1;\n }\n dialogBoxCreate(\n <>\n You received a Source-File for destroying a BitNode!\n
\n
\n {sourceFile.name}\n
\n
\n {sourceFile.info}\n ,\n );\n }\n}\n\nexport function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else {\n if (SourceFileFlags[5] === 0 && newBitNode !== 5) {\n Player.intelligence = 0;\n Player.intelligence_exp = 0;\n }\n }\n if (newBitNode === 5 && Player.intelligence === 0) {\n Player.intelligence = 1;\n }\n redPillFlag = false;\n // Set new Bit Node\n Player.bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n prestigeSourceFile(flume);\n}\n","import React from \"react\";\nimport { createTheme, ThemeProvider, Theme, StyledEngineProvider } from \"@mui/material/styles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport const ThemeEvents = new EventEmitter<[]>();\n\ndeclare module \"@mui/material/styles\" {\n interface Theme {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n };\n }\n interface ThemeOptions {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n };\n }\n}\n\nlet theme: Theme;\n\nexport function refreshTheme(): void {\n theme = createTheme({\n colors: {\n hp: Settings.theme.hp,\n money: Settings.theme.money,\n hack: Settings.theme.hack,\n combat: Settings.theme.combat,\n cha: Settings.theme.cha,\n int: Settings.theme.int,\n rep: Settings.theme.rep,\n backgroundprimary: Settings.theme.backgroundprimary,\n backgroundsecondary: Settings.theme.backgroundsecondary,\n button: Settings.theme.button,\n successlight: Settings.theme.successlight,\n success: Settings.theme.success,\n successdark: Settings.theme.successdark,\n },\n palette: {\n primary: {\n light: Settings.theme.primarylight,\n main: Settings.theme.primary,\n dark: Settings.theme.primarydark,\n },\n secondary: {\n light: Settings.theme.secondarylight,\n main: Settings.theme.secondary,\n dark: Settings.theme.secondarydark,\n },\n error: {\n light: Settings.theme.errorlight,\n main: Settings.theme.error,\n dark: Settings.theme.errordark,\n },\n info: {\n light: Settings.theme.infolight,\n main: Settings.theme.info,\n dark: Settings.theme.infodark,\n },\n warning: {\n light: Settings.theme.warninglight,\n main: Settings.theme.warning,\n dark: Settings.theme.warningdark,\n },\n background: {\n default: Settings.theme.backgroundprimary,\n paper: Settings.theme.well,\n },\n action: {\n disabled: Settings.theme.disabled,\n },\n },\n typography: {\n fontFamily:\n \"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman\",\n button: {\n textTransform: \"none\",\n },\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n color: Settings.theme.primary,\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: Settings.theme.primarydark,\n },\n },\n },\n },\n\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n borderBottomColor: \"#fff\",\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: Settings.theme.primarydark,\n },\n \"&:before\": {\n borderBottomColor: Settings.theme.primary,\n },\n \"&:after\": {\n borderBottomColor: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primarydark, // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: Settings.theme.primarylight,\n },\n },\n },\n },\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.button,\n border: \"1px solid \" + Settings.theme.well,\n // color: Settings.theme.primary,\n \"&:hover\": {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n\n borderRadius: 0,\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: Settings.theme.primary,\n },\n },\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTextField: {\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTypography: {\n defaultProps: {\n color: \"primary\",\n },\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\",\n },\n },\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n borderRadius: 0,\n border: \"2px solid white\",\n maxWidth: \"100vh\",\n },\n },\n defaultProps: {\n disableInteractive: true,\n },\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: Settings.theme.primarydark,\n },\n track: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: Settings.theme.primary,\n },\n selectLabel: {\n color: Settings.theme.primary,\n },\n displayedRows: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n textColorPrimary: {\n color: Settings.theme.secondary,\n \"&.Mui-selected\": {\n color: Settings.theme.primary,\n },\n },\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.black,\n borderRadius: 0,\n border: \"1px solid \" + Settings.theme.well,\n },\n standardSuccess: {\n color: Settings.theme.primarylight,\n },\n standardError: {\n color: Settings.theme.errorlight,\n },\n standardWarning: {\n color: Settings.theme.warninglight,\n },\n standardInfo: {\n color: Settings.theme.infolight,\n },\n },\n },\n },\n });\n}\nrefreshTheme();\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element;\n}\n\nexport const TTheme = ({ children }: IProps): React.ReactElement => (\n \n {children}\n \n);\n","/**\n * Adds a random offset to a number within a certain percentage\n * @example\n * // Returns between 95-105\n * addOffset(100, 5);\n * @example\n * // Returns between 63-77\n * addOffSet(70, 10);\n * @param midpoint The number to be the midpoint of the offset range\n * @param percentage The percentage (in a range of 0-100) to offset\n */\nexport function addOffset(midpoint: number, percentage: number): number {\n const maxPercent = 100;\n if (percentage < 0 || percentage > maxPercent) {\n return midpoint;\n }\n\n const offset: number = midpoint * (percentage / maxPercent);\n\n // Double the range to account for both sides of the midpoint.\n // tslint:disable-next-line:no-magic-numbers\n return midpoint + (Math.random() * (offset * 2) - offset);\n}\n","export enum RamCalculationErrorCode {\n SyntaxError = -1,\n ImportError = -2,\n URLImportError = -3,\n}\n","export class DarkWebItem {\n program: string;\n price: number;\n description: string;\n\n constructor(program: string, price: number, description: string) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n}\n","export class PlayerOwnedAugmentation {\n level = 1;\n name = \"\";\n\n constructor(name = \"\") {\n this.name = name;\n }\n}\n\nexport interface IPlayerOwnedAugmentation {\n level: number;\n name: string;\n}\n","/**\n * Class representing a script file.\n *\n * This does NOT represent a script that is actively running and\n * being evaluated. See RunningScript for that\n */\nimport { calculateRamUsage } from \"./RamCalculations\";\nimport { ScriptUrl } from \"./ScriptUrl\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { roundToTwo } from \"../utils/helpers/roundToTwo\";\n\nlet globalModuleSequenceNumber = 0;\n\nexport class Script {\n // Code for this script\n code = \"\";\n\n // Filename for the script file\n filename = \"\";\n\n // url of the script if any, only for NS2.\n url = \"\";\n\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n module: any = \"\";\n\n // The timestamp when when the script was last updated.\n moduleSequenceNumber: number;\n\n // Only used with NS2 scripts; the list of dependency script filenames. This is constructed\n // whenever the script is first evaluated, and therefore may be out of date if the script\n // has been updated since it was last run.\n dependencies: ScriptUrl[] = [];\n\n // Amount of RAM this Script requres to run\n ramUsage = 0;\n\n // hostname of server that this script is on.\n server = \"\";\n\n constructor(fn = \"\", code = \"\", server = \"\", otherScripts: Script[] = []) {\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // hostname of server this script is on\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n if (this.code !== \"\") {\n this.updateRamUsage(otherScripts);\n }\n }\n\n /**\n * Download the script as a file\n */\n download(): void {\n const filename = this.filename;\n const file = new Blob([this.code], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n\n /**\n * Marks this script as having been updated. It will be recompiled next time something tries\n * to exec it.\n */\n markUpdated(): void {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\n\n /**\n * Save a script from the script editor\n * @param {string} code - The new contents of the script\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n saveScript(filename: string, code: string, hostname: string, otherScripts: Script[]): void {\n // Update code and filename\n this.code = code.replace(/^\\s+|\\s+$/g, \"\");\n\n this.filename = filename;\n this.server = hostname;\n this.updateRamUsage(otherScripts);\n this.markUpdated();\n }\n\n /**\n * Calculates and updates the script's RAM usage based on its code\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n async updateRamUsage(otherScripts: Script[]): Promise {\n const res = await calculateRamUsage(this.code, otherScripts);\n if (res > 0) {\n this.ramUsage = roundToTwo(res);\n }\n this.markUpdated();\n }\n\n imports(): string[] {\n return [];\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Script\", this);\n }\n\n // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Script {\n return Generic_fromJSON(Script, value.data);\n }\n}\n\nReviver.constructors.Script = Script;\n","import { getRandomByte } from \"./helpers/getRandomByte\";\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\nexport function createRandomIp(): string {\n const ip: string = getRandomByte(99) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9);\n\n return ip;\n}\n","/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nexport function compareArrays(a1: T[], a2: T[]): boolean {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n if (Array.isArray(a1[i])) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(a2[i])) {\n return false;\n }\n\n const elem1 = a1[i] as any;\n const elem2 = a2[i] as any;\n if (!compareArrays(elem1, elem2)) {\n return false;\n }\n } else if (a1[i] !== a2[i]) {\n return false;\n }\n }\n\n return true;\n}\n","export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {\n return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;\n}\n","// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\nimport { Research, IConstructorParams } from \"./Research\";\nimport { researchMetadata } from \"./data/ResearchMetadata\";\nimport { IMap } from \"../types\";\n\nexport const ResearchMap: IMap = {};\n\nfunction addResearch(p: IConstructorParams): void {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n ResearchMap[p.name] = new Research(p);\n}\n\nfor (const metadata of researchMetadata) {\n addResearch(metadata);\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n favor: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Favor({ favor }: { favor: number | string }): React.ReactElement {\n const classes = useStyles();\n return {typeof favor === \"number\" ? numeralWrapper.formatFavor(favor) : favor};\n}\n","import { DarkWebItem } from \"./DarkWebItem\";\nimport { IMap } from \"../types\";\nimport { Programs } from \"../Programs/Programs\";\n\nexport const DarkWebItems: IMap = {\n BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, \"Opens up SSH Ports.\"),\n FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports.\"),\n RelaySMTPProgram: new DarkWebItem(Programs.RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports.\"),\n HTTPWormProgram: new DarkWebItem(Programs.HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports.\"),\n SQLInjectProgram: new DarkWebItem(Programs.SQLInjectProgram.name, 250e6, \"Opens up SQL Ports.\"),\n ServerProfiler: new DarkWebItem(\n Programs.ServerProfiler.name,\n 500000,\n \"Displays detailed information about a server.\",\n ),\n DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5.\"),\n DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10.\"),\n AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze.\"),\n FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, \"Unlock access to the formulas API.\"),\n};\n","export const GangConstants: {\n GangRespectToReputationRatio: number;\n MaximumGangMembers: number;\n CyclesPerTerritoryAndPowerUpdate: number;\n AscensionMultiplierRatio: number;\n Names: string[];\n} = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 75,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\n \"Slum Snakes\",\n \"Tetrads\",\n \"The Syndicate\",\n \"The Dark Army\",\n \"Speakers for the Dead\",\n \"NiteSec\",\n \"The Black Hand\",\n ],\n};\n","/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\nimport { SleeveTaskType } from \"./SleeveTaskTypesEnum\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { Person, ITaskTracker, createTaskTracker } from \"../Person\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Crime } from \"../../Crime/Crime\";\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { FactionWorkType } from \"../../Faction/FactionWorkTypeEnum\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../../utils/JSONReviver\";\n\nexport class Sleeve extends Person {\n /**\n * Stores the name of the class that the player is currently taking\n */\n className = \"\";\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n crimeType = \"\";\n\n /**\n * Enum value for current task\n */\n currentTask: SleeveTaskType = SleeveTaskType.Idle;\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n currentTaskLocation = \"\";\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n currentTaskMaxTime = 0;\n\n /**\n * Milliseconds spent on current task\n */\n currentTaskTime = 0;\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n earningsForSleeves: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experience + money earned for player\n */\n earningsForPlayer: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n earningsForTask: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n factionWorkType: FactionWorkType = FactionWorkType.None;\n\n /**\n * Records experience gain rate for the current task\n */\n gainRatesForTask: ITaskTracker = createTaskTracker();\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n gymStatType = \"\";\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n logs: string[] = [];\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n memory = 1;\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n shock = 1;\n\n /**\n * Stored number of game \"loop\" cycles\n */\n storedCycles = 0;\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n sync = 1;\n\n constructor(p: IPlayer | null = null) {\n super();\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n\n /**\n * Commit crimes\n */\n commitCrime(p: IPlayer, crimeKey: string): boolean {\n const crime: Crime | null = Crimes[crimeKey] || Object.values(Crimes).find((crime) => crime.name === crimeKey);\n if (!crime) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n\n this.crimeType = crime.name;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = SleeveTaskType.Crime;\n return true;\n }\n\n /**\n * Called to stop the current task\n */\n finishTask(p: IPlayer): ITaskTracker {\n let retValue: ITaskTracker = createTaskTracker(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === SleeveTaskType.Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime: Crime | undefined = Object.values(Crimes).find((crime) => crime.name === this.crimeType);\n if (!crime) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates: ITaskTracker = createTaskTracker();\n\n const keysForIteration: (keyof ITaskTracker)[] = Object.keys(successGainRates) as (keyof ITaskTracker)[];\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n }\n\n // Do not reset task to IDLE\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {\n // For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n\n return retValue;\n }\n\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n gainExperience(p: IPlayer, exp: ITaskTracker, numCycles = 1, fromOtherSleeve = false): ITaskTracker {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return createTaskTracker();\n }\n\n // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n const multFac = (this.shock / 100) * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac;\n\n // Experience is gained by both this sleeve and player\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n }\n\n // Record earnings for other sleeves\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100);\n\n // Return the experience to be gained by other sleeves\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0,\n };\n }\n\n /**\n * Earn money for player\n */\n gainMoney(p: IPlayer, task: ITaskTracker, numCycles = 1): void {\n const gain: number = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain, \"sleeves\");\n }\n\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n getMemoryUpgradeCost(n: number): number {\n const amt = Math.round(n);\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n getRepGain(p: IPlayer): number {\n if (this.currentTask === SleeveTaskType.Faction) {\n let favorMult = 1;\n const fac: Faction | null = Factions[this.currentTaskLocation];\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case FactionWorkType.Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === SleeveTaskType.Company) {\n const companyName: string = this.currentTaskLocation;\n const company: Company | null = Companies[companyName];\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance: number = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n const favorMult = 1 + company.favor / 100;\n\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n return 0;\n }\n }\n\n installAugmentation(aug: Augmentation): void {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({ name: aug.name, level: 1 });\n this.updateStatLevels();\n }\n\n log(entry: string): void {\n const MaxLogSize = 50;\n this.logs.push(entry);\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n\n /**\n * Called on every sleeve for a Source File prestige\n */\n prestige(p: IPlayer): void {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n\n // Reset task-related stuff\n this.resetTaskStatus();\n this.earningsForSleeves = createTaskTracker();\n this.earningsForPlayer = createTaskTracker();\n this.shockRecovery(p);\n\n // Reset augs and multipliers\n this.augmentations = [];\n this.resetMultipliers();\n\n // Reset sleeve-related stats\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n\n this.logs = [];\n }\n\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n process(p: IPlayer, numCycles = 1): ITaskTracker | null {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / CONSTANTS.MilliPerCycle;\n this.storedCycles += numCycles;\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let cyclesUsed = this.storedCycles;\n cyclesUsed = Math.min(cyclesUsed, 15);\n let time = cyclesUsed * CONSTANTS.MilliPerCycle;\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / CONSTANTS.MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time;\n\n // Shock gradually goes towards 100\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n\n let retValue: ITaskTracker = createTaskTracker();\n switch (this.currentTask) {\n case SleeveTaskType.Idle:\n break;\n case SleeveTaskType.Class:\n case SleeveTaskType.Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n case SleeveTaskType.Faction: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n // Gain faction reputation\n const fac: Faction = Factions[this.currentTaskLocation];\n if (!(fac instanceof Faction)) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n case SleeveTaskType.Company: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n const company: Company = Companies[this.currentTaskLocation];\n if (!(company instanceof Company)) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n case SleeveTaskType.Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n if (this.shock >= 100) this.resetTaskStatus();\n break;\n case SleeveTaskType.Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n if (this.sync >= 100) this.resetTaskStatus();\n break;\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === SleeveTaskType.Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n\n this.storedCycles -= cyclesUsed;\n\n return retValue;\n }\n\n /**\n * Resets all parameters used to keep information about the current task\n */\n resetTaskStatus(): void {\n this.earningsForTask = createTaskTracker();\n this.gainRatesForTask = createTaskTracker();\n this.currentTask = SleeveTaskType.Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = FactionWorkType.None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Recovery;\n return true;\n }\n\n synchronize(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Synchro;\n return true;\n }\n\n /**\n * Take a course at a university\n */\n takeUniversityCourse(p: IPlayer, universityName: string, className: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (this.city !== CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSummitUniversity;\n costMult = 4;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (this.city !== CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassDataStructuresBaseCost * costMult);\n break;\n case \"networks\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassNetworksBaseCost * costMult);\n break;\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassAlgorithmsBaseCost * costMult);\n break;\n case \"management\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassManagementBaseCost * costMult);\n break;\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassLeadershipBaseCost * costMult);\n break;\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = SleeveTaskType.Class;\n return true;\n }\n\n /**\n * Travel to another City. Costs money from player\n */\n travel(p: IPlayer, newCity: CityName): boolean {\n p.loseMoney(CONSTANTS.TravelCost, \"sleeves\");\n this.city = newCity;\n\n return true;\n }\n\n tryBuyAugmentation(p: IPlayer, aug: Augmentation): boolean {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n }\n\n // Verify that this sleeve does not already have that augmentation.\n if (this.augmentations.some((a) => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost, \"sleeves\");\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p: IPlayer): void {\n if (this.currentTask === SleeveTaskType.Class) {\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack =\n CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"data structures\":\n this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"networks\":\n this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"algorithms\":\n this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"management\":\n this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n case \"leadership\":\n this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === SleeveTaskType.Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n // Set stat gain rate\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat: string = this.gymStatType.toLowerCase();\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n: number): void {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n workForCompany(p: IPlayer, companyName: string): boolean {\n if (!(Companies[companyName] instanceof Company) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company: Company | null = Companies[companyName];\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (company == null) {\n return false;\n }\n if (companyPosition == null) {\n return false;\n }\n this.gainRatesForTask.money =\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney;\n this.gainRatesForTask.hack =\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.str =\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.def =\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.dex =\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.agi =\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.cha =\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n\n this.currentTaskLocation = companyName;\n this.currentTask = SleeveTaskType.Company;\n\n return true;\n }\n\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n workForFaction(p: IPlayer, factionName: string, workType: string): boolean {\n if (factionName === \"\") {\n return false;\n }\n if (!(Factions[factionName] instanceof Faction) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = Factions[factionName].getInfo();\n\n // Set type of work (hacking/field/security), and the experience gains\n const sanitizedWorkType: string = workType.toLowerCase();\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = SleeveTaskType.Faction;\n\n return true;\n }\n\n /**\n * Begin a gym workout task\n */\n workoutAtGym(p: IPlayer, gymName: string, stat: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12IronGym;\n costMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n const sanitizedStat: string = stat.toLowerCase();\n\n // Set cost\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassGymBaseCost * costMult);\n\n // Validate \"stat\" argument\n if (\n !sanitizedStat.includes(\"str\") &&\n !sanitizedStat.includes(\"def\") &&\n !sanitizedStat.includes(\"dex\") &&\n !sanitizedStat.includes(\"agi\")\n ) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = SleeveTaskType.Gym;\n\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Sleeve\", this);\n }\n\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Sleeve {\n return Generic_fromJSON(Sleeve, value.data);\n }\n}\n\nReviver.constructors.Sleeve = Sleeve;\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const TerminalEvents = new EventEmitter<[]>();\nexport const TerminalClearEvents = new EventEmitter<[]>();\n","/**\n * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\nimport { Environment } from \"./Environment\";\nimport { RamCostConstants } from \"./RamCostGenerator\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { IMap } from \"../types\";\n\nexport class WorkerScript {\n /**\n * Script's arguments\n */\n args: any[];\n\n /**\n * Copy of the script's code\n */\n code = \"\";\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n delay: number | null = null;\n\n /**\n * Holds the Promise resolve() function for when the script is \"blocked\" by an async op\n */\n delayResolve?: () => void;\n\n /**\n * Stores names of all functions that have logging disabled\n */\n disableLogs: IMap = {};\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n dynamicLoadedFns: IMap = {};\n\n /**\n * Tracks dynamic RAM usage\n */\n dynamicRamUsage: number = RamCostConstants.ScriptBaseRamCost;\n\n /**\n * Netscript Environment for this script\n */\n env: Environment;\n\n /**\n * Status message in case of script error. Currently unused I think\n */\n errorMessage = \"\";\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n loadedFns: IMap = {};\n\n /**\n * Filename of script\n */\n name: string;\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n output = \"\";\n\n /**\n * Process ID. Must be an integer. Used for efficient script\n * killing and removal.\n */\n pid: number;\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n ramUsage = 0;\n\n /**\n * Whether or not this workerScript is currently running\n */\n running = false;\n\n /**\n * Reference to underlying RunningScript object\n */\n scriptRef: RunningScript;\n\n /**\n * IP Address on which this script is running\n */\n hostname: string;\n\n /**\n * Function called when the script ends.\n */\n atExit: any;\n\n constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => any) {\n this.name = runningScriptObj.filename;\n this.hostname = runningScriptObj.server;\n\n const sanitizedPid = Math.round(pid);\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid;\n\n // Get the underlying script's code\n const server = GetServer(this.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.hostname}`);\n }\n let found = false;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n this.env = new Environment(null);\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n this.env.set(\"args\", runningScriptObj.args.slice());\n }\n\n /**\n * Returns the Server on which this script is running\n */\n getServer(): BaseServer {\n const server = GetServer(this.hostname);\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n getScript(): Script | null {\n const server = this.getServer();\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\n \"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\",\n );\n return null;\n }\n\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n getScriptOnServer(fn: string, server: BaseServer): Script | null {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn: string): boolean {\n return this.disableLogs[fn] == null;\n }\n\n log(func: string, txt: () => string): void {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt()}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt());\n }\n }\n }\n\n print(txt: string): void {\n this.scriptRef.log(txt);\n }\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nexport class Message {\n // Name of Message file\n filename = \"\";\n\n // The text contains in the Message\n msg = \"\";\n\n // Flag indicating whether this Message has been received by the player\n recvd = false;\n\n constructor(filename = \"\", msg = \"\") {\n this.filename = filename;\n this.msg = msg;\n this.recvd = false;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Message\", this);\n }\n\n // Initializes a Message Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Message {\n return Generic_fromJSON(Message, value.data);\n }\n}\n\nReviver.constructors.Message = Message;\n","/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\nimport { buyStock, sellStock, shortStock, sellShort } from \"./BuyingAndSelling\";\nimport { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { Stock } from \"./Stock\";\n\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\n\nimport * as React from \"react\";\n\nexport interface IProcessOrderRefs {\n stockMarket: IStockMarket;\n symbolToStockMap: IMap;\n}\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nexport function processOrders(\n stock: Stock,\n orderType: OrderTypes,\n posType: PositionTypes,\n refs: IProcessOrderRefs,\n): void {\n const orderBook = refs.stockMarket[\"Orders\"];\n if (orderBook == null) {\n const orders: IOrderBook = {};\n for (const name in refs.stockMarket) {\n const stock = refs.stockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n let stockOrders = orderBook[stock.symbol];\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case OrderTypes.LimitBuy:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.LimitSell:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopBuy:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction executeOrder(order: Order, refs: IProcessOrderRefs): void {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n if (!(stock instanceof Stock)) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol];\n\n // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n const opts = {\n suppressDialog: true,\n };\n\n let res = true;\n let isBuy = false;\n switch (order.type) {\n case OrderTypes.LimitBuy:\n case OrderTypes.StopBuy:\n isBuy = true;\n if (order.pos === PositionTypes.Long) {\n res = buyStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = shortStock(stock, order.shares, null, opts) && res;\n }\n break;\n case OrderTypes.LimitSell:\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long) {\n res = sellStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = sellShort(stock, order.shares, null, opts) && res;\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n\n // Position type, for logging/message purposes\n const pos = order.pos === PositionTypes.Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n if (!Settings.SuppressTIXPopup) {\n dialogBoxCreate(\n <>\n {order.type} for {stock.symbol} @ ({pos}) was filled (\n {numeralWrapper.formatShares(Math.round(order.shares))} shares)\n ,\n );\n }\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else {\n if (isBuy) {\n dialogBoxCreate(\n <>\n Failed to execute {order.type} for {stock.symbol} @ ({pos}). This is most likely\n because you do not have enough money or the order would exceed the stock's maximum number of shares\n ,\n );\n }\n }\n}\n","function getDB(): Promise {\n return new Promise((resolve, reject) => {\n if (!window.indexedDB) {\n reject(\"Indexed DB does not exists\");\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n * Version `1` is important\n */\n const indexedDbRequest: IDBOpenDBRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n // This is called when there's no db to begin with. It's important, don't remove it.\n indexedDbRequest.onupgradeneeded = function (this: IDBRequest) {\n const db = this.result;\n db.createObjectStore(\"savestring\");\n };\n\n indexedDbRequest.onerror = function (this: IDBRequest, ev: Event) {\n reject(`Failed to get IDB ${ev}`);\n };\n\n indexedDbRequest.onsuccess = function (this: IDBRequest) {\n const db = this.result;\n if (!db) {\n reject(\"database loadign result was undefined\");\n return;\n }\n resolve(db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\"));\n };\n });\n}\n\nexport function load(): Promise {\n return new Promise((resolve, reject) => {\n getDB()\n .then((db) => {\n return new Promise((resolve, reject) => {\n const request: IDBRequest = db.get(\"save\");\n request.onerror = function (this: IDBRequest, ev: Event) {\n reject(\"Error in Database request to get savestring: \" + ev);\n };\n\n request.onsuccess = function (this: IDBRequest) {\n resolve(this.result);\n };\n }).then((saveString) => resolve(saveString));\n })\n .catch((r) => reject(r));\n });\n}\n\nexport function save(saveString: string): Promise {\n return getDB().then((db) => {\n return new Promise((resolve, reject) => {\n // We'll save to both localstorage and indexedDb\n const request = db.put(saveString, \"save\");\n\n request.onerror = function (e) {\n reject(\"Error saving game to IndexedDB: \" + e);\n };\n\n request.onsuccess = () => resolve();\n });\n });\n}\n\nexport function deleteGame(): Promise {\n return getDB().then((db) => {\n db.delete(\"save\");\n });\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IOperationParams extends IActionParams {\n reqdRank?: number;\n teamCount?: number;\n}\n\nexport class Operation extends Action {\n reqdRank = 100;\n teamCount = 0;\n\n constructor(params: IOperationParams | null = null) {\n super(params);\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n }\n\n // For actions that have teams. To be implemented by subtypes.\n getTeamSuccessBonus(inst: IBladeburner): number {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Operation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(Operation, value.data);\n }\n}\n\nReviver.constructors.Operation = Operation;\n","import { Augmentations } from \"./Augmentation/Augmentations\";\nimport { augmentationExists, initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { Companies, initCompanies } from \"./Company/Companies\";\nimport { resetIndustryResearchTrees } from \"./Corporation/IndustryData\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Faction } from \"./Faction/Faction\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { joinFaction } from \"./Faction/FactionHelpers\";\nimport { updateHashManagerCapacity } from \"./Hacknet/HacknetHelpers\";\nimport { initMessages } from \"./Message/MessageHelpers\";\nimport { prestigeWorkerScripts } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { resetPidCounter } from \"./Netscript/Pid\";\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { GetServer, AddToAllServers, initForeignServers, prestigeAllServers } from \"./Server/AllServers\";\nimport { prestigeHomeComputer } from \"./Server/ServerHelpers\";\nimport { SourceFileFlags, updateSourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { deleteStockMarket, initStockMarket, initSymbolToStockMap } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { ProgramsSeen } from \"./Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"./Faction/ui/FactionsRoot\";\nimport { CONSTANTS } from \"./Constants\";\nimport { LogBoxClearEvents } from \"./ui/React/LogBoxManager\";\n\nconst BitNode8StartingMoney = 250e6;\n\n// Prestige by purchasing augmentation\nexport function prestigeAugmentation(): void {\n initBitNodeMultipliers(Player);\n\n const maintainMembership = Player.factions.concat(Player.factionInvitations).filter(function (faction) {\n return Factions[faction].getInfo().keep;\n });\n Player.prestigeAugmentation();\n\n // Delete all Worker Scripts objects\n prestigeWorkerScripts();\n\n const homeComp = Player.getHomeComputer();\n // Delete all servers except home computer\n prestigeAllServers();\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(homeComp);\n\n if (augmentationExists(AugmentationNames.Neurolink) && Augmentations[AugmentationNames.Neurolink].owned) {\n homeComp.programs.push(Programs.FTPCrackProgram.name);\n homeComp.programs.push(Programs.RelaySMTPProgram.name);\n }\n if (augmentationExists(AugmentationNames.CashRoot) && Augmentations[AugmentationNames.CashRoot].owned) {\n Player.setMoney(1e6);\n homeComp.programs.push(Programs.BruteSSHProgram.name);\n }\n if (augmentationExists(AugmentationNames.PCMatrix) && Augmentations[AugmentationNames.PCMatrix].owned) {\n homeComp.programs.push(Programs.DeepscanV1.name);\n homeComp.programs.push(Programs.AutoLink.name);\n }\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n // Gain favor for Companies\n for (const member in Companies) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].gainFavor();\n }\n }\n\n // Gain favor for factions\n for (const member in Factions) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].gainFavor();\n }\n }\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n\n Player.factionInvitations = Player.factionInvitations.concat(maintainMembership);\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Messages\n initMessages();\n\n // Gang\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n const faction = Factions[gang.facName];\n if (faction instanceof Faction) {\n joinFaction(faction);\n }\n }\n\n // Cancel Bladeburner action\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.prestige();\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || SourceFileFlags[8] > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Reset Stock market\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n }\n\n // Red Pill\n if (augmentationExists(AugmentationNames.TheRedPill) && Augmentations[AugmentationNames.TheRedPill].owned) {\n const WorldDaemon = GetServer(SpecialServers.WorldDaemon);\n const DaedalusServer = GetServer(SpecialServers.DaedalusServer);\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.hostname);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.hostname);\n }\n }\n\n if (augmentationExists(AugmentationNames.StaneksGift1) && Augmentations[AugmentationNames.StaneksGift1].owned) {\n // TODO(hydroflame): refactor faction names so we don't have to hard\n // code strings.\n joinFaction(Factions[\"Church of the Machine God\"]);\n }\n\n staneksGift.prestigeAugmentation();\n\n resetPidCounter();\n ProgramsSeen.splice(0, ProgramsSeen.length);\n InvitationsSeen.splice(0, InvitationsSeen.length);\n}\n\n// Prestige by destroying Bit Node and gaining a Source File\nexport function prestigeSourceFile(flume: boolean): void {\n initBitNodeMultipliers(Player);\n updateSourceFileFlags(Player);\n\n Player.prestigeSourceFile();\n prestigeWorkerScripts(); // Delete all Worker Scripts objects\n\n const homeComp = Player.getHomeComputer();\n\n // Delete all servers except home computer\n prestigeAllServers(); // Must be done before initForeignServers()\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(homeComp);\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n if (SourceFileFlags[9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (SourceFileFlags[1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n homeComp.cpuCores = 1;\n\n // Reset favor for Companies\n for (const member in Companies) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].favor = 0;\n }\n }\n\n // Reset favor for factions\n for (const member in Factions) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].favor = 0;\n }\n }\n\n // Stop a Terminal action if there is one\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n\n // Delete all Augmentations\n for (const name in Augmentations) {\n if (Augmentations.hasOwnProperty(name)) {\n delete Augmentations[name];\n }\n }\n\n // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n if (SourceFileFlags[12] > 0) {\n Player.augmentations.push({\n name: AugmentationNames.NeuroFluxGovernor,\n level: SourceFileFlags[12],\n });\n }\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Messages\n initMessages();\n\n if (Player.sourceFileLvl(5) > 0) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n dialogBoxCreate(\n \"You received a copy of the Corporation Management Handbook on your home computer. \" +\n \"Read it if you need help getting started with Corporations!\",\n );\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || SourceFileFlags[8] > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Bit Node 10: Digital Carbon\n if (Player.bitNodeN === 10) {\n dialogBoxCreate(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n }\n\n if (Player.bitNodeN === 13) {\n dialogBoxCreate(\"Trouble is brewing in Chongqing\");\n }\n\n // Reset Stock market, gang, and corporation\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n } else {\n deleteStockMarket();\n }\n\n Player.gang = null;\n Player.corporation = null;\n resetIndustryResearchTrees();\n Player.bladeburner = null;\n\n // Source-File 9 (level 3) effect\n if (SourceFileFlags[9] >= 3) {\n const hserver = Player.createHacknetServer();\n\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(Player.hacknet_node_money_mult);\n hserver.updateHashCapacity();\n updateHashManagerCapacity(Player);\n }\n\n if (Player.bitNodeN === 13) {\n Player.money = CONSTANTS.TravelCost;\n }\n staneksGift.prestigeSourceFile();\n\n // Gain int exp\n if (SourceFileFlags[5] !== 0 && !flume) Player.gainIntelligenceExp(300);\n\n resetPidCounter();\n}\n","import { CONSTANTS } from \"../Constants\";\nimport * as names from \"./data/companypositionnames\";\n\n/* tslint:disable:completed-docs */\n\nexport interface IConstructorParams {\n name: string;\n nextPosition: string | null;\n baseSalary: number;\n repMultiplier: number;\n\n reqdHacking?: number;\n reqdStrength?: number;\n reqdDefense?: number;\n reqdDexterity?: number;\n reqdAgility?: number;\n reqdCharisma?: number;\n reqdReputation?: number;\n\n hackingEffectiveness?: number;\n strengthEffectiveness?: number;\n defenseEffectiveness?: number;\n dexterityEffectiveness?: number;\n agilityEffectiveness?: number;\n charismaEffectiveness?: number;\n\n hackingExpGain?: number;\n strengthExpGain?: number;\n defenseExpGain?: number;\n dexterityExpGain?: number;\n agilityExpGain?: number;\n charismaExpGain?: number;\n}\n\nexport class CompanyPosition {\n /**\n * Position title\n */\n name: string;\n\n /**\n * Title of next position to be promoted to\n */\n nextPosition: string | null;\n\n /**\n * Base salary for this position ($ per 200ms game cycle)\n * Will be multiplier by a company-specific multiplier for final salary\n */\n baseSalary: number;\n\n /**\n * Reputation multiplier\n */\n repMultiplier: number;\n\n /**\n * Required stats to earn this position\n */\n requiredAgility: number;\n requiredCharisma: number;\n requiredDefense: number;\n requiredDexterity: number;\n requiredHacking: number;\n requiredStrength: number;\n\n /**\n * Required company reputation to earn this position\n */\n requiredReputation: number;\n\n /**\n * Effectiveness of each stat time for job performance\n */\n hackingEffectiveness: number;\n strengthEffectiveness: number;\n defenseEffectiveness: number;\n dexterityEffectiveness: number;\n agilityEffectiveness: number;\n charismaEffectiveness: number;\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n hackingExpGain: number;\n strengthExpGain: number;\n defenseExpGain: number;\n dexterityExpGain: number;\n agilityExpGain: number;\n charismaExpGain: number;\n\n constructor(p: IConstructorParams) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n\n this.requiredHacking = p.reqdHacking != null ? p.reqdHacking : 0;\n this.requiredStrength = p.reqdStrength != null ? p.reqdStrength : 0;\n this.requiredDefense = p.reqdDefense != null ? p.reqdDefense : 0;\n this.requiredDexterity = p.reqdDexterity != null ? p.reqdDexterity : 0;\n this.requiredAgility = p.reqdAgility != null ? p.reqdAgility : 0;\n this.requiredCharisma = p.reqdCharisma != null ? p.reqdCharisma : 0;\n this.requiredReputation = p.reqdReputation != null ? p.reqdReputation : 0;\n\n this.hackingEffectiveness = p.hackingEffectiveness != null ? p.hackingEffectiveness : 0;\n this.strengthEffectiveness = p.strengthEffectiveness != null ? p.strengthEffectiveness : 0;\n this.defenseEffectiveness = p.defenseEffectiveness != null ? p.defenseEffectiveness : 0;\n this.dexterityEffectiveness = p.dexterityEffectiveness != null ? p.dexterityEffectiveness : 0;\n this.agilityEffectiveness = p.agilityEffectiveness != null ? p.agilityEffectiveness : 0;\n this.charismaEffectiveness = p.charismaEffectiveness != null ? p.charismaEffectiveness : 0;\n\n if (\n Math.round(\n this.hackingEffectiveness +\n this.strengthEffectiveness +\n this.defenseEffectiveness +\n this.dexterityEffectiveness +\n this.agilityEffectiveness +\n this.charismaEffectiveness,\n ) !== 100\n ) {\n console.error(`CompanyPosition ${this.name} parameters do not sum to 100`);\n }\n\n this.hackingExpGain = p.hackingExpGain != null ? p.hackingExpGain : 0;\n this.strengthExpGain = p.strengthExpGain != null ? p.strengthExpGain : 0;\n this.defenseExpGain = p.defenseExpGain != null ? p.defenseExpGain : 0;\n this.dexterityExpGain = p.dexterityExpGain != null ? p.dexterityExpGain : 0;\n this.agilityExpGain = p.agilityExpGain != null ? p.agilityExpGain : 0;\n this.charismaExpGain = p.charismaExpGain != null ? p.charismaExpGain : 0;\n }\n\n calculateJobPerformance(hack: number, str: number, def: number, dex: number, agi: number, cha: number): number {\n const hackRatio: number = (this.hackingEffectiveness * hack) / CONSTANTS.MaxSkillLevel;\n const strRatio: number = (this.strengthEffectiveness * str) / CONSTANTS.MaxSkillLevel;\n const defRatio: number = (this.defenseEffectiveness * def) / CONSTANTS.MaxSkillLevel;\n const dexRatio: number = (this.dexterityEffectiveness * dex) / CONSTANTS.MaxSkillLevel;\n const agiRatio: number = (this.agilityEffectiveness * agi) / CONSTANTS.MaxSkillLevel;\n const chaRatio: number = (this.charismaEffectiveness * cha) / CONSTANTS.MaxSkillLevel;\n\n let reputationGain: number =\n (this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio)) / 100;\n if (isNaN(reputationGain)) {\n console.error(\"Company reputation gain calculated to be NaN\");\n reputationGain = 0;\n }\n\n return reputationGain;\n }\n\n isSoftwareJob(): boolean {\n return names.SoftwareCompanyPositions.includes(this.name);\n }\n\n isITJob(): boolean {\n return names.ITCompanyPositions.includes(this.name);\n }\n\n isSecurityEngineerJob(): boolean {\n return names.SecurityEngineerCompanyPositions.includes(this.name);\n }\n\n isNetworkEngineerJob(): boolean {\n return names.NetworkEngineerCompanyPositions.includes(this.name);\n }\n\n isBusinessJob(): boolean {\n return names.BusinessCompanyPositions.includes(this.name);\n }\n\n isSecurityJob(): boolean {\n return names.SecurityCompanyPositions.includes(this.name);\n }\n\n isAgentJob(): boolean {\n return names.AgentCompanyPositions.includes(this.name);\n }\n\n isSoftwareConsultantJob(): boolean {\n return names.SoftwareConsultantCompanyPositions.includes(this.name);\n }\n\n isBusinessConsultantJob(): boolean {\n return names.BusinessConsultantCompanyPositions.includes(this.name);\n }\n\n isPartTimeJob(): boolean {\n return names.PartTimeCompanyPositions.includes(this.name);\n }\n}\n","import React from \"react\";\nimport { SourceFile } from \"./SourceFile\";\nimport { IMap } from \"../types\";\n\nexport const SourceFiles: IMap = {};\n\nSourceFiles[\"SourceFile1\"] = new SourceFile(\n 1,\n (\n <>\n This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the\n player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nSourceFiles[\"SourceFile2\"] = new SourceFile(\n 2,\n (\n <>\n This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also\n increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nSourceFiles[\"SourceFile3\"] = new SourceFile(\n 3,\n (\n <>\n This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this\n mechanic). This Source-File also increases your charisma and company salary multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile4\"] = new SourceFile(\n 4,\n (\n <>\n This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this\n Source-File opens up more of the Singularity Functions you can use.\n \n ),\n);\nSourceFiles[\"SourceFile5\"] = new SourceFile(\n 5,\n (\n <>\n This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and\n persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other\n stats, and it is also hidden (you won't know when you gain experience and how much). Higher Intelligence levels\n will boost your production for many actions in the game. In addition, this Source-File will unlock the\n getBitNodeMultipliers() Netscript function and let you start with Formulas.exe, and will raise all of your\n hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile6\"] = new SourceFile(\n 6,\n (\n <>\n This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this\n Source-File will raise both the level and experience gain rate of all your combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile7\"] = new SourceFile(\n 7,\n (\n <>\n This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this\n Source-File will increase all of your Bladeburner multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile8\"] = new SourceFile(\n 8,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nSourceFiles[\"SourceFile9\"] = new SourceFile(\n 9,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile10\"] = new SourceFile(\n 10,\n (\n <>\n This Source-File unlocks Sleeve technology in other BitNodes. Each level of this Source-File also grants you a\n Duplicate Sleeve\n \n ),\n);\nSourceFiles[\"SourceFile11\"] = new SourceFile(\n 11,\n (\n <>\n This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at\n that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's\n company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nSourceFiles[\"SourceFile12\"] = new SourceFile(\n 12,\n <>This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.,\n);\nSourceFiles[\"SourceFile13\"] = new SourceFile(\n 13,\n <>Each level of this Source-File increases the size of Stanek's Gift.,\n);\n","/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\nimport { Script } from \"./Script\";\nimport { Settings } from \"../Settings/Settings\";\nimport { IMap } from \"../types\";\nimport { Terminal } from \"../Terminal\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\n\nexport class RunningScript {\n // Script arguments\n args: any[] = [];\n\n // Map of [key: hostname] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n dataMap: IMap = {};\n\n // Script filename\n filename = \"\";\n\n // This script's logs. An array of log entries\n logs: string[] = [];\n\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n logUpd = false;\n\n // Total amount of hacking experience earned from this script when offline\n offlineExpGained = 0;\n\n // Total amount of money made by this script when offline\n offlineMoneyMade = 0;\n\n // Number of seconds that the script has been running offline\n offlineRunningTime = 0.01;\n\n // Total amount of hacking experience earned from this script when online\n onlineExpGained = 0;\n\n // Total amount of money made by this script when online\n onlineMoneyMade = 0;\n\n // Number of seconds that this script has been running online\n onlineRunningTime = 0.01;\n\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n pid = -1;\n\n // How much RAM this script uses for ONE thread\n ramUsage = 0;\n\n // hostname of the server on which this script is running\n server = \"\";\n\n // Number of threads that this script is running with\n threads = 1;\n\n constructor(script: Script | null = null, args: any[] = []) {\n if (script == null) {\n return;\n }\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n }\n\n log(txt: string): void {\n if (this.logs.length > Settings.MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n if (Settings.TimestampsFormat) {\n logEntry = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog(): void {\n for (let i = 0; i < this.logs.length; ++i) {\n Terminal.print(this.logs[i]);\n }\n }\n\n clearLog(): void {\n this.logs.length = 0;\n }\n\n // Update the moneyStolen and numTimesHack maps when hacking\n recordHack(hostname: string, moneyGained: number, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][0] += moneyGained;\n this.dataMap[hostname][1] += n;\n }\n\n // Update the grow map when calling grow()\n recordGrow(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][2] += n;\n }\n\n // Update the weaken map when calling weaken() {\n recordWeaken(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][3] += n;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"RunningScript\", this);\n }\n\n // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): RunningScript {\n return Generic_fromJSON(RunningScript, value.data);\n }\n}\n\nReviver.constructors.RunningScript = RunningScript;\n","import React from \"react\";\n\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n type: number;\n name: string;\n rerender: () => void;\n}\nexport function StartButton(props: IProps): React.ReactElement {\n const player = use.Player();\n const action = props.bladeburner.getActionObject({ name: props.name, type: props.type });\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + props.name);\n }\n let disabled = false;\n if (action.count < 1) {\n disabled = true;\n }\n if (props.name === \"Raid\" && props.bladeburner.getCurrentCity().comms === 0) {\n disabled = true;\n }\n\n if (action instanceof BlackOperation && props.bladeburner.rank < action.reqdRank) {\n disabled = true;\n }\n function onStart(): void {\n if (disabled) return;\n props.bladeburner.action.type = props.type;\n props.bladeburner.action.name = props.name;\n if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true)) player.singularityStopWork();\n props.bladeburner.startAction(player, props.bladeburner.action);\n props.rerender();\n }\n\n return (\n \n );\n}\n","interface RNG {\n random(): number;\n}\n\n/*\n * very bad RNG, meant to be used as introduction to RNG manipulation. It has a\n * period of 1024.\n */\nclass RNG0 implements RNG {\n x: number;\n m = 1024;\n a = 341;\n c = 1;\n\n constructor() {\n this.x = 0;\n this.reset();\n }\n\n step(): void {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random(): number {\n this.step();\n return this.x / this.m;\n }\n\n reset(): void {\n this.x = new Date().getTime() % this.m;\n }\n}\n\nexport const BadRNG: RNG0 = new RNG0();\n\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\nexport class WHRNG implements RNG {\n s1 = 0;\n s2 = 0;\n s3 = 0;\n\n constructor(totalPlaytime: number) {\n // This one is seeded by the players total play time.\n const v: number = (totalPlaytime / 1000) % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step(): void {\n this.s1 = (171 * this.s1) % 30269;\n this.s2 = (172 * this.s2) % 30307;\n this.s3 = (170 * this.s3) % 30323;\n }\n\n random(): number {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n}\n","import { format } from \"date-fns\";\n\nexport function formatTime(fmt: string): string {\n try {\n return format(new Date(), fmt);\n } catch (err: any) {\n return \"format error\";\n }\n}\n","/**\n * This is a central class for storing and managing the player's hashes,\n * which are generated by Hacknet Servers\n *\n * It is also used to keep track of what upgrades the player has bought with\n * his hashes, and contains method for grabbing the data/multipliers from\n * those upgrades\n */\nimport { HashUpgrades } from \"./HashUpgrades\";\nimport { HashUpgrade } from \"./HashUpgrade\";\n\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n capacity = 0;\n\n // Number of hashes currently in storage\n hashes = 0;\n\n // Map of Hash Upgrade Name -> levels in that upgrade\n upgrades: IMap = {};\n\n constructor() {\n for (const name in HashUpgrades) {\n this.upgrades[name] = 0;\n }\n }\n\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n getMult(upgName: string): number {\n const upg = HashUpgrades[upgName];\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null) {\n console.error(`Could not find Hash Study upgrade`);\n return 1;\n }\n\n return 1 + (upg.value * currLevel) / 100;\n }\n\n /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n getStudyMult(): number {\n const upgName = \"Improve Studying\";\n\n return this.getMult(upgName);\n }\n\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n getTrainingMult(): number {\n const upgName = \"Improve Gym Training\";\n\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName: string): HashUpgrade | null {\n const upg = HashUpgrades[upgName];\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n return upg;\n }\n\n /**\n * Get the cost (in hashes) of an upgrade\n */\n getUpgradeCost(upgName: string): number {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${upgName}`);\n return Infinity;\n }\n\n return upg.getCost(currLevel);\n }\n\n prestige(): void {\n for (const name in HashUpgrades) {\n this.upgrades[name] = 0;\n }\n this.hashes = 0;\n\n // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n this.updateCapacity(0);\n }\n\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n refundUpgrade(upgName: string): void {\n const upg = HashUpgrades[upgName];\n\n // Reduce the level first, so we get the right cost\n --this.upgrades[upgName];\n\n const currLevel = this.upgrades[upgName];\n if (upg == null || currLevel == null || currLevel < 0) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return;\n }\n\n const cost = upg.getCost(currLevel);\n this.hashes += cost;\n }\n\n storeHashes(numHashes: number): void {\n this.hashes += numHashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n }\n\n updateCapacity(newCap: number): void {\n if (newCap < 0) {\n this.capacity = 0;\n }\n this.capacity = Math.max(newCap, 0);\n }\n\n /**\n * Returns boolean indicating whether or not the upgrade was successfully purchased\n * Note that this does NOT actually implement the effect\n */\n upgrade(upgName: string): boolean {\n const upg = HashUpgrades[upgName];\n if (upg == null) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return false;\n }\n\n const cost = this.getUpgradeCost(upgName);\n\n if (this.hashes < cost) {\n return false;\n }\n\n this.hashes -= cost;\n ++this.upgrades[upgName];\n\n return true;\n }\n\n //Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"HashManager\", this);\n }\n\n // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HashManager {\n return Generic_fromJSON(HashManager, value.data);\n }\n}\n\nReviver.constructors.HashManager = HashManager;\n","import {\n CodingContract,\n CodingContractRewardType,\n CodingContractTypes,\n ICodingContractReward,\n} from \"./CodingContracts\";\nimport { Factions } from \"./Faction/Factions\";\nimport { Player } from \"./Player\";\nimport { GetServer, GetAllServers } from \"./Server/AllServers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { Server } from \"./Server/Server\";\nimport { BaseServer } from \"./Server/BaseServer\";\n\nimport { getRandomInt } from \"./utils/helpers/getRandomInt\";\n\nexport function generateRandomContract(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const randServer = getRandomServer();\n\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n randServer.addContract(contract);\n}\n\nexport function generateRandomContractOnHome(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const serv = Player.getHomeComputer();\n\n const contractFn = getRandomFilename(serv, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n serv.addContract(contract);\n}\n\ninterface IGenerateContractParams {\n problemType?: string;\n server?: string;\n fn?: string;\n}\n\nexport function generateContract(params: IGenerateContractParams): void {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(CodingContractTypes);\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n }\n\n // Reward Type - This is always random for now\n const reward = getRandomReward();\n\n // Server\n let server;\n if (params.server != null) {\n server = GetServer(params.server);\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n }\n\n // Filename\n let fn;\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new CodingContract(fn, problemType, reward);\n server.addContract(contract);\n}\n\n// Ensures that a contract's reward type is valid\nfunction sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = Player.factions.filter((fac) => {\n try {\n return Factions[fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n if (type === CodingContractRewardType.FactionReputation && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.CompanyReputation && Object.keys(Player.jobs).length === 0) {\n type = CodingContractRewardType.Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType(): string {\n const problemTypes = Object.keys(CodingContractTypes);\n const randIndex = getRandomInt(0, problemTypes.length - 1);\n\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward(): ICodingContractReward {\n const reward: ICodingContractReward = {\n name: \"\",\n type: getRandomInt(0, CodingContractRewardType.Money),\n };\n reward.type = sanitizeRewardType(reward.type);\n\n // Add additional information based on the reward type\n const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);\n\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation: {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[getRandomInt(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n case CodingContractRewardType.CompanyReputation: {\n const allJobs = Object.keys(Player.jobs);\n if (allJobs.length > 0) {\n reward.name = allJobs[getRandomInt(0, allJobs.length - 1)];\n } else {\n reward.type = CodingContractRewardType.Money;\n }\n break;\n }\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer(): BaseServer {\n const servers = GetAllServers();\n let randIndex = getRandomInt(0, servers.length - 1);\n let randServer = servers[randIndex];\n\n // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n for (let i = 0; i < 200; ++i) {\n if (\n randServer instanceof Server &&\n !randServer.purchasedByPlayer &&\n randServer.hostname !== SpecialServers.WorldDaemon\n ) {\n break;\n }\n randIndex = getRandomInt(0, servers.length - 1);\n randServer = servers[randIndex];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server: BaseServer, reward: ICodingContractReward): string {\n let contractFn = `contract-${getRandomInt(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (\n server.contracts.filter((c: CodingContract) => {\n return c.fn === contractFn;\n }).length <= 0\n ) {\n break;\n }\n contractFn = `contract-${getRandomInt(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n","import { EventEmitter } from \"../../utils/EventEmitter\";\nexport const ITutorialEvents = new EventEmitter<[]>();\n","import { Crimes } from \"./Crimes\";\nimport { Crime } from \"./Crime\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function determineCrimeSuccess(p: IPlayer, type: string): boolean {\n let chance = 0;\n let found = false;\n for (const i in Crimes) {\n const crime = Crimes[i];\n if (crime.type == type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n dialogBoxCreate(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`);\n return false;\n }\n\n if (Math.random() <= chance) {\n //Success\n return true;\n } else {\n //Failure\n return false;\n }\n}\n\nexport function findCrime(roughName: string): Crime | null {\n roughName = roughName.toLowerCase();\n if (roughName.includes(\"shoplift\")) {\n return Crimes.Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return Crimes.RobStore;\n } else if (roughName.includes(\"mug\")) {\n return Crimes.Mug;\n } else if (roughName.includes(\"larceny\")) {\n return Crimes.Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return Crimes.DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return Crimes.BondForgery;\n } else if (roughName.includes(\"traffick\") && roughName.includes(\"arms\")) {\n return Crimes.TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return Crimes.Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return Crimes.GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return Crimes.Kidnap;\n } else if (roughName.includes(\"assassinate\") || roughName.includes(\"assassination\")) {\n return Crimes.Assassination;\n } else if (roughName.includes(\"heist\")) {\n return Crimes.Heist;\n }\n\n return null;\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { generateRandomString } from \"../utils/StringHelperFunctions\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Employee } from \"./Employee\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ICorporation } from \"./ICorporation\";\n\ninterface IParams {\n loc?: string;\n size?: number;\n}\n\nexport class OfficeSpace {\n loc: string;\n size: number;\n minEne = 0;\n maxEne = 100;\n minHap = 0;\n maxHap = 100;\n maxMor = 100;\n employees: Employee[] = [];\n employeeProd: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n total: 0,\n };\n\n constructor(params: IParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity(): boolean {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation: ICorporation, industry: IIndustry): number {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = EmployeePositions.Training;\n }\n }\n\n // Process Office properties\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n }\n\n // Calculate changes in Morale/Happiness/Energy for Employees\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\n if (corporation.funds < 0 && industry.lastCycleRevenue < 0) {\n perfMult = Math.pow(0.99, marketCycles);\n } else if (corporation.funds > 0 && industry.lastCycleRevenue > 0) {\n perfMult = Math.pow(1.01, marketCycles);\n }\n\n const hasAutobrew = industry.hasResearch(\"AutoBrew\");\n const hasAutoparty = industry.hasResearch(\"AutoPartyManager\");\n\n let salaryPaid = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\n if (hasAutoparty) {\n emp.mor = this.maxMor;\n emp.hap = this.maxHap;\n } else {\n emp.mor *= perfMult;\n emp.hap *= perfMult;\n emp.mor = Math.min(emp.mor, this.maxMor);\n emp.hap = Math.min(emp.hap, this.maxHap);\n }\n\n if (hasAutobrew) {\n emp.ene = this.maxEne;\n } else {\n emp.ene *= perfMult;\n emp.ene = Math.min(emp.ene, this.maxEne);\n }\n\n const salary = emp.process(marketCycles, this);\n salaryPaid += salary;\n }\n\n this.calculateEmployeeProductivity(corporation, industry);\n return salaryPaid;\n }\n\n calculateEmployeeProductivity(corporation: ICorporation, industry: IIndustry): void {\n //Reset\n for (const name in this.employeeProd) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n const prod = employee.calculateProductivity(corporation, industry);\n this.employeeProd[employee.pos] += prod;\n total += prod;\n }\n this.employeeProd.total = total;\n }\n\n hireRandomEmployee(): Employee | undefined {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return;\n\n //Generate three random employees (meh, decent, amazing)\n const int = getRandomInt(50, 100),\n cha = getRandomInt(50, 100),\n exp = getRandomInt(50, 100),\n cre = getRandomInt(50, 100),\n eff = getRandomInt(50, 100),\n sal = CorporationConstants.EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n\n const emp = new Employee({\n intelligence: int,\n charisma: cha,\n experience: exp,\n creativity: cre,\n efficiency: eff,\n salary: sal,\n });\n\n const name = generateRandomString(7);\n\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].name === name) {\n return this.hireRandomEmployee();\n }\n }\n emp.name = name;\n this.employees.push(emp);\n\n return emp;\n }\n\n //Finds the first unassigned employee and assigns its to the specified job\n assignEmployeeToJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === EmployeePositions.Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n return false;\n }\n\n //Finds the first employee with the given job and unassigns it\n unassignEmployeeFromJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = EmployeePositions.Unassigned;\n return true;\n }\n }\n return false;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"OfficeSpace\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): OfficeSpace {\n return Generic_fromJSON(OfficeSpace, value.data);\n }\n}\n\nReviver.constructors.OfficeSpace = OfficeSpace;\n","import { IMap } from \"../types\";\n\nexport type IndustryUpgrade = [number, number, number, number, string, string];\n\n// Industry upgrades\n// The data structure is an array with the following format:\n// [index in array, base price, price mult, benefit mult (if applicable), name, desc]\nexport const IndustryUpgrades: IMap = {\n \"0\": [0, 500e3, 1, 1.05, \"Coffee\", \"Provide your employees with coffee, increasing their energy by 5%.\"],\n \"1\": [\n 1,\n 1e9,\n 1.06,\n 1.03,\n \"AdVert.Inc\",\n \"Hire AdVert.Inc to advertise your company. Each level of \" +\n \"this upgrade grants your company a static increase of 3 and 1 to its awareness and \" +\n \"popularity, respectively. It will then increase your company's awareness by 1%, and its popularity \" +\n \"by a random percentage between 1% and 3%. These effects are increased by other upgrades \" +\n \"that increase the power of your advertising.\",\n ],\n};\n","import { Factions } from \"./Faction/Factions\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\nexport let LastExportBonus = 0;\n\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\nexport function canGetBonus(): boolean {\n const now = new Date().getTime();\n if (now - LastExportBonus > bonusTimer) return true;\n return false;\n}\n\nexport function onExport(p: IPlayer): void {\n if (!canGetBonus()) return;\n for (const facName of p.factions) {\n Factions[facName].favor++;\n }\n LastExportBonus = new Date().getTime();\n}\n\nexport function setLastExportBonus(unixTime: number): void {\n LastExportBonus = unixTime;\n}\n","/**\n * This is an object that is used to keep track of where all of the player's\n * money is coming from (or going to)\n */\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./JSONReviver\";\n\nexport class MoneySourceTracker {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: number | Function;\n\n bladeburner = 0;\n casino = 0;\n class = 0;\n codingcontract = 0;\n corporation = 0;\n crime = 0;\n gang = 0;\n hacking = 0;\n hacknet = 0;\n hacknet_expenses = 0;\n hospitalization = 0;\n infiltration = 0;\n sleeves = 0;\n stock = 0;\n total = 0;\n work = 0;\n servers = 0;\n other = 0;\n augmentations = 0;\n\n // Record money earned\n record(amt: number, source: string): void {\n const sanitizedSource = source.toLowerCase();\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n (this[sanitizedSource] as number) += amt;\n this.total += amt;\n }\n\n // Reset the money tracker by setting all stats to 0\n reset(): void {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n (this[prop] as number) = 0;\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"MoneySourceTracker\", this);\n }\n\n // Initiatizes a MoneySourceTracker object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): MoneySourceTracker {\n return Generic_fromJSON(MoneySourceTracker, value.data);\n }\n}\n\nReviver.constructors.MoneySourceTracker = MoneySourceTracker;\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\n\nexport const AlertEvents = new EventEmitter<[string | JSX.Element]>();\n\ninterface Alert {\n id: string;\n text: string | JSX.Element;\n}\n\nlet i = 0;\nexport function AlertManager(): React.ReactElement {\n const [alerts, setAlerts] = useState([]);\n useEffect(\n () =>\n AlertEvents.subscribe((text: string | JSX.Element) => {\n const id = i + \"\";\n i++;\n setAlerts((old) => {\n return [\n ...old,\n {\n id: id,\n text: text,\n },\n ];\n });\n }),\n [],\n );\n\n function close(): void {\n setAlerts((old) => {\n return old.slice(1, 1e99);\n });\n }\n\n return (\n <>\n {alerts.length > 0 && (\n \n \n {alerts[0].text}\n \n \n )}\n \n );\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport function getHospitalizationCost(p: IPlayer): number {\n if (p.money < 0) {\n return 0;\n }\n\n return Math.min(p.money * 0.1, (p.max_hp - p.hp) * CONSTANTS.HospitalCostPerHp);\n}\n\nexport function calculateHospitalizationCost(p: IPlayer, damage: number): number {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ProductRatingWeights, IProductRatingWeight } from \"./ProductRatingWeights\";\n\nimport { createCityMap } from \"../Locations/createCityMap\";\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\ninterface IConstructorParams {\n name?: string;\n demand?: number;\n competition?: number;\n markup?: number;\n createCity?: string;\n designCost?: number;\n advCost?: number;\n quality?: number;\n performance?: number;\n durability?: number;\n reliability?: number;\n aesthetics?: number;\n features?: number;\n loc?: string;\n size?: number;\n req?: IMap;\n}\n\nexport class Product {\n // Product name\n name = \"\";\n\n // The demand for this Product in the market. Gradually decreases\n dmd = 0;\n\n // How much competition there is in the market for this Product\n cmp = 0;\n\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n mku = 0;\n\n // Production cost - estimation of how much money it costs to make this Product\n pCost = 0;\n\n // Sell cost\n sCost: string | number = 0;\n\n // Variables for handling the creation process of this Product\n fin = false; // Whether this Product has finished being created\n prog = 0; // Creation progress - A number betwee 0-100 representing percentage\n createCity = \"\"; // City in which the product is/was being created\n designCost = 0; // How much money was invested into designing this Product\n advCost = 0; // How much money was invested into advertising this Product\n\n // Aggregate score for this Product's 'rating'\n // This is based on the stats/properties below. The weighting of the\n // stats/properties below differs between different industries\n rat = 0;\n\n // Stats/properties of this Product\n qlt = 0;\n per = 0;\n dur = 0;\n rel = 0;\n aes = 0;\n fea = 0;\n\n // Data refers to the production, sale, and quantity of the products\n // These values are specific to a city\n // For each city, the data is [qty, prod, sell]\n data: IMap = createCityMap([0, 0, 0]);\n\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n loc = \"\";\n\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n siz = 0;\n\n // Material requirements. An object that maps the name of a material to how much it requires\n // to make 1 unit of the product.\n reqMats: IMap = {};\n\n // Data to keep track of whether production/sale of this Product is\n // manually limited. These values are specific to a city\n // [Whether production/sale is limited, limit amount]\n prdman: IMap = createCityMap([false, 0]);\n sllman: IMap = createCityMap([false, 0]);\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price: IMap = createCityMap(0);\n\n constructor(params: IConstructorParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.dmd = params.demand ? params.demand : 0;\n this.cmp = params.competition ? params.competition : 0;\n this.mku = params.markup ? params.markup : 0;\n this.createCity = params.createCity ? params.createCity : \"\";\n this.designCost = params.designCost ? params.designCost : 0;\n this.advCost = params.advCost ? params.advCost : 0;\n this.qlt = params.quality ? params.quality : 0;\n this.per = params.performance ? params.performance : 0;\n this.dur = params.durability ? params.durability : 0;\n this.rel = params.reliability ? params.reliability : 0;\n this.aes = params.aesthetics ? params.aesthetics : 0;\n this.fea = params.features ? params.features : 0;\n this.loc = params.loc ? params.loc : \"\";\n this.siz = params.size ? params.size : 0;\n this.reqMats = params.req ? params.req : {};\n }\n\n // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n createProduct(marketCycles = 1, empWorkMult = 1): void {\n if (this.fin) {\n return;\n }\n this.prog += marketCycles * 0.01 * empWorkMult;\n }\n\n // @param industry - Industry object. Reference to industry that makes this Product\n finishProduct(employeeProd: { [key: string]: number }, industry: IIndustry): void {\n this.fin = true;\n\n //Calculate properties\n const progrMult = this.prog / 100;\n\n const engrRatio = employeeProd[EmployeePositions.Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[EmployeePositions.Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[EmployeePositions.RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[EmployeePositions.Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[EmployeePositions.Business] / employeeProd[\"total\"];\n const designMult = 1 + Math.pow(this.designCost, 0.1) / 100;\n const balanceMult = 1.2 * engrRatio + 0.9 * mgmtRatio + 1.3 * rndRatio + 1.5 * opsRatio + busRatio;\n const sciMult = 1 + Math.pow(industry.sciResearch.qty, industry.sciFac) / 800;\n const totalMult = progrMult * balanceMult * designMult * sciMult;\n\n this.qlt =\n totalMult *\n (0.1 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.per =\n totalMult *\n (0.15 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.dur =\n totalMult *\n (0.05 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.08 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.rel =\n totalMult *\n (0.02 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.08 * employeeProd[EmployeePositions.Business]);\n this.aes =\n totalMult *\n (0.0 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.1 * employeeProd[EmployeePositions.Business]);\n this.fea =\n totalMult *\n (0.08 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n const busmgtgRatio = Math.max(busRatio + mgmtRatio, 1 / employeeProd[\"total\"]);\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * busmgtgRatio);\n\n // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n if (this.mku === 0 || !isFinite(this.mku)) this.mku = 1;\n\n this.dmd =\n industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = getRandomInt(0, 70);\n\n //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n for (const matName in industry.reqMats) {\n if (industry.reqMats.hasOwnProperty(matName)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.reqMats[matName] = reqMat;\n }\n }\n\n //Calculate the product's size\n //For now, just set it to be the same size as the requirements to make materials\n this.siz = 0;\n for (const matName in industry.reqMats) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += MaterialSizes[matName] * reqMat;\n }\n }\n\n calculateRating(industry: IIndustry): void {\n const weights: IProductRatingWeight = ProductRatingWeights[industry.type];\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\n }\n this.rat = 0;\n this.rat += weights.Quality ? this.qlt * weights.Quality : 0;\n this.rat += weights.Performance ? this.per * weights.Performance : 0;\n this.rat += weights.Durability ? this.dur * weights.Durability : 0;\n this.rat += weights.Reliability ? this.rel * weights.Reliability : 0;\n this.rat += weights.Aesthetics ? this.aes * weights.Aesthetics : 0;\n this.rat += weights.Features ? this.fea * weights.Features : 0;\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Product\", this);\n }\n\n // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Product {\n return Generic_fromJSON(Product, value.data);\n }\n}\n\nReviver.constructors.Product = Product;\n","import React, { useState, useEffect } from \"react\";\nimport { use } from \"../../ui/Context\";\nimport { getAvailableCreatePrograms } from \"../ProgramHelpers\";\n\nimport { Tooltip, Typography } from \"@mui/material\";\nimport Button from \"@mui/material/Button\";\n\nexport const ProgramsSeen: string[] = [];\n\nexport function ProgramsRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n const programs = getAvailableCreatePrograms(player);\n\n useEffect(() => {\n programs.forEach((p) => {\n if (ProgramsSeen.includes(p.name)) return;\n ProgramsSeen.push(p.name);\n });\n }, []);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n <>\n Create program\n \n This page displays any programs that you are able to create. Writing the code for a program takes time, which\n can vary based on how complex the program is. If you are working on creating a program you can cancel at any\n time. Your progress will be saved and you can continue later.\n \n\n {programs.map((program) => {\n const create = program.create;\n if (create === null) return <>;\n\n return (\n \n \n {\n if (!event.isTrusted) return;\n player.startCreateProgramWork(router, program.name, create.time, create.level);\n }}\n >\n {program.name}\n \n \n
\n
\n );\n })}\n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Factions } from \"../Factions\";\nimport { Faction } from \"../Faction\";\nimport { joinFaction } from \"../FactionHelpers\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Link from \"@mui/material/Link\";\nimport Button from \"@mui/material/Button\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport TableRow from \"@mui/material/TableRow\";\n\nexport const InvitationsSeen: string[] = [];\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function FactionsRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n useEffect(() => {\n props.player.factionInvitations.forEach((faction) => {\n if (InvitationsSeen.includes(faction)) return;\n InvitationsSeen.push(faction);\n });\n }, []);\n\n function openFaction(faction: Faction): void {\n props.router.toFaction(faction);\n }\n\n function acceptInvitation(event: React.MouseEvent, faction: string): void {\n if (!event.isTrusted) return;\n joinFaction(Factions[faction]);\n setRerender((x) => !x);\n }\n\n return (\n <>\n Factions\n Lists all factions you have joined\n
\n \n {props.player.factions.map((faction: string) => (\n openFaction(Factions[faction])}>\n {faction}\n \n ))}\n \n
\n {props.player.factionInvitations.length > 0 && (\n <>\n \n Outstanding Faction Invitations\n \n \n Lists factions you have been invited to. You can accept these faction invitations at any time.\n \n \n \n {props.player.factionInvitations.map((faction: string) => (\n \n \n {faction}\n \n \n \n \n \n ))}\n \n
\n \n )}\n \n );\n}\n","import { CorporationState } from \"./CorporationState\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"./data/CorporationUpgrades\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { Industry } from \"./Industry\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { showLiterature } from \"../Literature/LiteratureHelpers\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { isString } from \"../utils/helpers/isString\";\n\ninterface IParams {\n name?: string;\n}\n\nexport class Corporation {\n name = \"The Corporation\";\n\n //A division/business sector is represented by the object:\n divisions: Industry[] = [];\n\n //Financial stats\n funds = 150e9;\n revenue = 0;\n expenses = 0;\n fundingRound = 0;\n public = false; //Publicly traded\n totalShares = CorporationConstants.INITIALSHARES; // Total existing shares\n numShares = CorporationConstants.INITIALSHARES; // Total shares owned by player\n shareSalesUntilPriceUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n shareSaleCooldown = 0; // Game cycles until player can sell shares again\n issueNewSharesCooldown = 0; // Game cycles until player can issue shares again\n dividendPercentage = 0;\n dividendTaxPercentage = 50;\n issuedShares = 0;\n sharePrice = 0;\n storedCycles = 0;\n\n unlockUpgrades: number[];\n upgrades: number[];\n upgradeMultipliers: number[];\n\n state = new CorporationState();\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(CorporationUnlockUpgrades).length;\n const numUpgrades = Object.keys(CorporationUpgrades).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt: number): void {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n this.funds = this.funds + amt;\n }\n\n getState(): string {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1): void {\n this.storedCycles += numCycles;\n }\n\n process(player: IPlayer): void {\n if (this.storedCycles >= CorporationConstants.CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * CorporationConstants.CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n\n this.divisions.forEach((ind) => {\n ind.process(marketCycles, state, this);\n });\n\n // Process cooldowns\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n }\n\n //At the start of a new cycle, calculate profits from previous cycle\n if (state === \"START\") {\n this.revenue = 0;\n this.expenses = 0;\n this.divisions.forEach((ind) => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n this.revenue = this.revenue + ind.lastCycleRevenue;\n this.expenses = this.expenses + ind.lastCycleExpenses;\n });\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * (marketCycles * CorporationConstants.SecsPerMarketCycle);\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n dialogBoxCreate(\n \"There was an error calculating your Corporations funds and they got reset to 0. \" +\n \"This is a bug. Please report to game developer.

\" +\n \"(Your funds have been set to $150b for the inconvenience)\",\n );\n this.funds = 150e9;\n }\n\n // Process dividends\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (\n isNaN(this.dividendPercentage) ||\n this.dividendPercentage < 0 ||\n this.dividendPercentage > CorporationConstants.DividendMaxPercentage * 100\n ) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n player.gainMoney(this.getDividends(), \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n getDividends(): number {\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * CorporationConstants.SecsPerMarketCycle;\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const dividendsPerShare = totalDividends / this.totalShares;\n const dividends = this.numShares * dividendsPerShare;\n let upgrades = -0.15;\n if (this.unlockUpgrades[5] === 1) {\n upgrades += 0.05;\n }\n if (this.unlockUpgrades[6] === 1) {\n upgrades += 0.1;\n }\n return Math.pow(dividends, BitNodeMultipliers.CorporationSoftCap + upgrades);\n }\n\n determineValuation(): number {\n let val,\n profit = this.revenue - this.expenses;\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds, 0) / 3; //Base valuation\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n val -= val % 1e6; //Round down to nearest millionth\n }\n return val * BitNodeMultipliers.CorporationValuation;\n }\n\n getTargetSharePrice(): number {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice(): void {\n const targetPrice = this.getTargetSharePrice();\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice(): void {\n this.sharePrice = this.getTargetSharePrice();\n }\n\n // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n calculateShareSale(numShares: number): [number, number, number] {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n\n const maxIterations = Math.ceil(numShares / CorporationConstants.SHARESPERPRICEUPDATE);\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(\n `Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`,\n );\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate;\n\n // Calculate what new share price would be\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd: number): string {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n }\n\n //One time upgrades that unlock new features\n unlock(upgrade: CorporationUnlockUpgrade): void {\n const upgN = upgrade[0],\n price = upgrade[1];\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n if (this.funds < price) {\n dialogBoxCreate(\"You don't have enough funds to unlock this!\");\n return;\n }\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds - price;\n\n // Apply effects for one-time upgrades\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n }\n\n //Levelable upgrades\n upgrade(upgrade: CorporationUpgrade): void {\n const upgN = upgrade[0],\n basePrice = upgrade[1],\n priceMult = upgrade[2],\n upgradeAmt = upgrade[3]; //Amount by which the upgrade multiplier gets increased (additive)\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n if (this.funds < totalCost) {\n dialogBoxCreate(\"You don't have enough funds to purchase this!\");\n return;\n }\n ++this.upgrades[upgN];\n this.funds = this.funds - totalCost;\n\n //Increase upgrade multiplier\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt;\n\n //If storage size is being updated, update values in Warehouse objects\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n for (const city in industry.warehouses) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof Warehouse) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier(): number {\n const mult = this.upgradeMultipliers[0];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier(): number {\n const mult = this.upgradeMultipliers[1];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain(): number {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier(): number {\n const mult = this.upgradeMultipliers[3];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier(): number {\n const mult = this.upgradeMultipliers[4];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier(): number {\n const mult = this.upgradeMultipliers[5];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier(): number {\n const mult = this.upgradeMultipliers[6];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier(): number {\n const mult = this.upgradeMultipliers[7];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier(): number {\n const mult = this.upgradeMultipliers[8];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier(): number {\n const mult = this.upgradeMultipliers[9];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n getStarterGuide(player: IPlayer): void {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = LiteratureNames.CorporationManagementHandbook;\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (isString(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n showLiterature(handbookFn);\n return;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Corporation\", this);\n }\n\n /**\n * Initiatizes a Corporation object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Corporation {\n return Generic_fromJSON(Corporation, value.data);\n }\n}\n\nReviver.constructors.Corporation = Corporation;\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Hashes } from \"../../ui/React/Hashes\";\n\nexport function HashRate({ hashes }: { hashes: number }): React.ReactElement {\n return ;\n}\n","import { BladeburnerConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\n\ninterface IChangePopulationByCountParams {\n estChange: number;\n estOffset: number;\n}\n\ninterface IChangePopulationByPercentageParams {\n nonZero: boolean;\n changeEstEqually: boolean;\n}\n\nexport class City {\n /**\n * Name of the city.\n */\n name = \"\";\n\n /**\n * Population of the city.\n */\n pop = 0;\n\n /**\n * Population estimation of the city.\n */\n popEst = 0;\n\n /**\n * Number of communities in the city.\n */\n comms = 0;\n\n /**\n * Chaos level of the city.\n */\n chaos = 0;\n\n constructor(name: string = BladeburnerConstants.CityNames[2]) {\n this.name = name;\n\n // Synthoid population and estimate\n this.pop = getRandomInt(BladeburnerConstants.PopulationThreshold, 1.5 * BladeburnerConstants.PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5);\n\n // Number of Synthoid communities population and estimate\n this.comms = getRandomInt(5, 150);\n this.chaos = 0;\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n changeChaosByPercentage(p: number): void {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n if (p === 0) {\n return;\n }\n this.chaos += this.chaos * (p / 100);\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n if (this.popEst < this.pop) {\n this.popEst += n;\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n improvePopulationEstimateByPercentage(p: number, skillMult = 1): void {\n p = p * skillMult;\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n this.popEst *= 1 + p / 100;\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n changePopulationByCount(n: number, params: IChangePopulationByCountParams = { estChange: 0, estOffset: 0 }): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n this.pop += n;\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n if (params.estOffset) {\n this.popEst = addOffset(this.popEst, params.estOffset);\n }\n this.popEst = Math.max(this.popEst, 0);\n }\n\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n changePopulationByPercentage(\n p: number,\n params: IChangePopulationByPercentageParams = {\n nonZero: false,\n changeEstEqually: false,\n },\n ): number {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n if (p === 0) {\n return 0;\n }\n let change = Math.round(this.pop * (p / 100));\n\n // Population always changes by at least 1\n if (params.nonZero && change === 0) {\n p > 0 ? (change = 1) : (change = -1);\n }\n\n this.pop += change;\n if (params.changeEstEqually) {\n this.popEst += change;\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n return change;\n }\n\n changeChaosByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n if (n === 0) {\n return;\n }\n this.chaos += n;\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"City\", this);\n }\n\n /**\n * Initiatizes a City object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): City {\n return Generic_fromJSON(City, value.data);\n }\n}\n\nReviver.constructors.City = City;\n","import { Factions } from \"../../Faction/Factions\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Gang } from \"../../Gang/Gang\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\n// Amount of negative karma needed to manage a gang in BitNodes other than 2\nconst GangKarmaRequirement = -54000;\n\nexport function canAccessGang(this: IPlayer): boolean {\n if (this.bitNodeN === 2) {\n return true;\n }\n if (SourceFileFlags[2] <= 0) {\n return false;\n }\n\n return this.karma <= GangKarmaRequirement;\n}\n\nexport function getGangFaction(this: IPlayer): Faction {\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n const fac = Factions[gang.facName];\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${gang.facName}`);\n }\n\n return fac;\n}\n\nexport function getGangName(this: IPlayer): string {\n if (!this.inGang()) return \"\";\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName;\n}\n\nexport function hasGangWith(this: IPlayer, facName: string): boolean {\n if (!this.inGang()) return false;\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName === facName;\n}\n\nexport function inGang(this: IPlayer): boolean {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof Gang;\n}\n\nexport function startGang(this: IPlayer, factionName: string, hacking: boolean): void {\n this.gang = new Gang(factionName, hacking);\n\n const fac = Factions[factionName];\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n fac.playerReputation = 0;\n}\n","/**\n * Class representing a City in the game\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\n\nexport class City {\n /**\n * List of all locations in this city\n */\n locations: LocationName[];\n\n /**\n * Name of this city\n */\n name: CityName;\n\n /**\n * Metro map ascii art\n */\n asciiArt: string;\n\n constructor(name: CityName, locations: LocationName[] = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc: LocationName): void {\n this.locations.push(loc);\n }\n}\n","/**\n * React component for a selectable option on the Faction UI. These\n * options including working for the faction, hacking missions, purchasing\n * augmentations, etc.\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\n\ntype IProps = {\n buttonText: string;\n infoText: string;\n onClick: (e: React.MouseEvent) => void;\n};\n\nexport function Option(props: IProps): React.ReactElement {\n return (\n \n \n \n {props.infoText}\n \n \n );\n}\n","/**\n * React component for the tickers configuration section of the Stock Market UI.\n * This config lets you change the way stock tickers are displayed (watchlist,\n * all/portoflio mode, etc)\n */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\nexport enum TickerDisplayMode {\n AllStocks,\n Portfolio,\n}\n\ntype IProps = {\n changeDisplayMode: () => void;\n changeWatchlistFilter: (e: React.ChangeEvent) => void;\n tickerDisplayMode: TickerDisplayMode;\n};\n\nfunction DisplayModeButton(props: IProps): React.ReactElement {\n let txt = \"\";\n let tooltip = \"\";\n if (props.tickerDisplayMode === TickerDisplayMode.Portfolio) {\n txt = \"Switch to 'All Stocks' Mode\";\n tooltip = \"Displays all stocks on the WSE\";\n } else {\n txt = \"Switch to 'Portfolio' Mode\";\n tooltip = \"Displays only the stocks for which you have shares or orders\";\n }\n\n return (\n {tooltip}}>\n \n \n );\n}\n\nexport function StockTickersConfig(props: IProps): React.ReactElement {\n return (\n <>\n \n
\n \n \n );\n}\n","/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\n\nexport function hasTorRouter(this: IPlayer): boolean {\n return !!GetServer(SpecialServers.DarkWeb);\n}\n\nexport function getCurrentServer(this: IPlayer): BaseServer {\n const server = GetServer(this.currentServer);\n if (server === null) throw new Error(`somehow connected to a server that does not exist. ${this.currentServer}`);\n return server;\n}\n\nexport function getHomeComputer(this: IPlayer): Server {\n const home = GetServer(\"home\");\n if (home instanceof Server) return home;\n throw new Error(\"home computer was not a normal server\");\n}\n\nexport function getUpgradeHomeRamCost(this: IPlayer): number {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam);\n\n //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;\n return cost;\n}\n\nexport function getUpgradeHomeCoresCost(this: IPlayer): number {\n return 1e9 * Math.pow(7.5, this.getHomeComputer().cpuCores);\n}\n\nexport function createHacknetServer(this: IPlayer): HacknetServer {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new HacknetServer({\n adminRights: true,\n hostname: name,\n ip: createUniqueRandomIp(),\n // player: this,\n });\n this.hacknetNodes.push(server.hostname);\n\n // Configure the HacknetServer to actually act as a Server\n AddToAllServers(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.hostname);\n server.serversOnNetwork.push(SpecialServers.Home);\n\n return server;\n}\n","import { Player } from \"../Player\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IAction, ISuccessChanceParams } from \"./IAction\";\n\nclass StatsMultiplier {\n [key: string]: number;\n\n hack = 0;\n str = 0;\n def = 0;\n dex = 0;\n agi = 0;\n cha = 0;\n int = 0;\n}\n\nexport interface IActionParams {\n name?: string;\n level?: number;\n maxLevel?: number;\n autoLevel?: boolean;\n baseDifficulty?: number;\n difficultyFac?: number;\n rewardFac?: number;\n successes?: number;\n failures?: number;\n rankGain?: number;\n rankLoss?: number;\n hpLoss?: number;\n hpLost?: number;\n isStealth?: boolean;\n isKill?: boolean;\n count?: number;\n weights?: StatsMultiplier;\n decays?: StatsMultiplier;\n teamCount?: number;\n}\n\nexport class Action implements IAction {\n name = \"\";\n\n // Difficulty scales with level. See getDifficulty() method\n level = 1;\n maxLevel = 1;\n autoLevel = true;\n baseDifficulty = 100;\n difficultyFac = 1.01;\n\n // Rank increase/decrease is affected by this exponent\n rewardFac = 1.02;\n\n successes = 0;\n failures = 0;\n\n // All of these scale with level/difficulty\n rankGain = 0;\n rankLoss = 0;\n hpLoss = 0;\n hpLost = 0;\n\n // Action Category. Current categories are stealth and kill\n isStealth = false;\n isKill = false;\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n count: number = getRandomInt(1e3, 25e3);\n\n // Weighting of each stat in determining action success rate\n weights: StatsMultiplier = {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7,\n };\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n decays: StatsMultiplier = {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9,\n };\n teamCount = 0;\n\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params: IActionParams | null = null) {\n // | null = null\n if (params && params.name) this.name = params.name;\n\n if (params && params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n\n if (params && params.count) this.count = params.count;\n\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays;\n\n // Check to make sure weights are summed properly\n let sum = 0;\n for (const weight in this.weights) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\n \"Invalid weights when constructing Action \" +\n this.name +\n \". The weights should sum up to 1. They sum up to :\" +\n 1,\n );\n }\n\n for (const decay in this.decays) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(\n \"Invalid decays when constructing \" + \"Action \" + this.name + \". \" + \"Decay value cannot be greater than 1\",\n );\n }\n }\n }\n }\n\n getDifficulty(): number {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n return difficulty;\n }\n\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n attempt(inst: IBladeburner): boolean {\n return Math.random() < this.getSuccessChance(inst);\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1;\n }\n\n getActionTime(inst: IBladeburner): number {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = Player.agility * inst.skillMultipliers.effAgi;\n const effDexterity = Player.dexterity * inst.skillMultipliers.effDex;\n const statFac =\n 0.5 *\n (Math.pow(effAgility, BladeburnerConstants.EffAgiExponentialFactor) +\n Math.pow(effDexterity, BladeburnerConstants.EffDexExponentialFactor) +\n effAgility / BladeburnerConstants.EffAgiLinearFactor +\n effDexterity / BladeburnerConstants.EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, (baseTime * skillFac) / statFac);\n\n return Math.ceil(baseTime * this.getActionTimePenalty());\n }\n\n // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getTeamSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n getChaosCompetencePenalty(inst: IBladeburner, params: ISuccessChanceParams): number {\n const city = inst.getCurrentCity();\n if (params.est) {\n return Math.pow(city.popEst / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n } else {\n return Math.pow(city.pop / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst: IBladeburner): [number, number] {\n function clamp(x: number): number {\n return Math.max(0, Math.min(x, 1));\n }\n const est = this.getSuccessChance(inst, { est: true });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;\n else high *= r;\n return [clamp(low), clamp(high)];\n }\n\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n getSuccessChance(inst: IBladeburner, params: ISuccessChanceParams = { est: false }): number {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n let difficulty = this.getDifficulty();\n let competence = 0;\n for (const stat in this.weights) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = Player.queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n competence *= Player.getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n\n competence *= this.getTeamSuccessBonus(inst);\n\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n }\n\n // Factor skill multipliers into success chance\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n }\n\n // Augmentation multiplier\n competence *= Player.bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel: number): number {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel: number): void {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Action\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Action {\n return Generic_fromJSON(Action, value.data);\n }\n}\n\nReviver.constructors.Action = Action;\n","import { IMap } from \"../../types\";\n\nexport type CorporationUnlockUpgrade = [number, number, string, string];\n\n// Corporation Unlock Upgrades\n// Upgrades for entire corporation, unlocks features, either you have it or you dont\n// The data structure is an array with the following format:\n// [index in Corporation feature upgrades array, price, name, description]\nexport const CorporationUnlockUpgrades: IMap = {\n //Lets you export goods\n \"0\": [\n 0,\n 20e9,\n \"Export\",\n \"Develop infrastructure to export your materials to your other facilities. \" +\n \"This allows you to move materials around between different divisions and cities.\",\n ],\n\n //Lets you buy exactly however many required materials you need for production\n \"1\": [\n 1,\n 25e9,\n \"Smart Supply\",\n \"Use advanced AI to anticipate your supply needs. \" +\n \"This allows you to purchase exactly however many materials you need for production.\",\n ],\n\n //Displays each material/product's demand\n \"2\": [\n 2,\n 5e9,\n \"Market Research - Demand\",\n \"Mine and analyze market data to determine the demand of all resources. \" +\n \"The demand attribute, which affects sales, will be displayed for every material and product.\",\n ],\n\n //Display's each material/product's competition\n \"3\": [\n 3,\n 5e9,\n \"Market Data - Competition\",\n \"Mine and analyze market data to determine how much competition there is on the market \" +\n \"for all resources. The competition attribute, which affects sales, will be displayed for \" +\n \"every material and product.\",\n ],\n \"4\": [\n 4,\n 10e9,\n \"VeChain\",\n \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" +\n \"This upgrade will allow you to view a wide array of useful statistics about your \" +\n \"Corporation.\",\n ],\n \"5\": [\n 5,\n 500e12,\n \"Shady Accounting\",\n \"Utilize unscrupulous accounting practices and pay off government officials to save money \" +\n \"on taxes. This reduces the dividend tax rate by 5%.\",\n ],\n \"6\": [\n 6,\n 2e15,\n \"Government Partnership\",\n \"Help national governments further their agendas in exchange for lowered taxes. \" +\n \"This reduces the dividend tax rate by 10%\",\n ],\n \"7\": [7, 50e9, \"Warehouse API\", \"Enables the warehouse API.\"],\n \"8\": [8, 50e9, \"Office API\", \"Enables the office API.\"],\n};\n","import { IMap } from \"../../types\";\n\nexport type CorporationUpgrade = [number, number, number, number, string, string];\n\n// Corporation Upgrades\n// Upgrades for entire corporation, levelable upgrades\n// The data structure is an array with the following format\n// [index in Corporation upgrades array, base price, price mult, benefit mult (additive), name, desc]\nexport const CorporationUpgrades: IMap = {\n //Smart factories, increases production\n \"0\": [\n 0,\n 2e9,\n 1.06,\n 0.03,\n \"Smart Factories\",\n \"Advanced AI automatically optimizes the operation and productivity \" +\n \"of factories. Each level of this upgrade increases your global production by 3% (additive).\",\n ],\n\n //Smart warehouses, increases storage size\n \"1\": [\n 1,\n 2e9,\n 1.06,\n 0.1,\n \"Smart Storage\",\n \"Advanced AI automatically optimizes your warehouse storage methods. \" +\n \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\",\n ],\n\n //Advertise through dreams, passive popularity/ awareness gain\n \"2\": [\n 2,\n 4e9,\n 1.1,\n 0.001,\n \"DreamSense\",\n \"Use DreamSense LCC Technologies to advertise your corporation \" +\n \"to consumers through their dreams. Each level of this upgrade provides a passive \" +\n \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" +\n \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" +\n \"15 seconds.\",\n ],\n\n //Makes advertising more effective\n \"3\": [\n 3,\n 4e9,\n 1.5,\n 0.005,\n \"Wilson Analytics\",\n \"Purchase data and analysis from Wilson, a marketing research \" +\n \"firm. Each level of this upgrades increases the effectiveness of your \" +\n \"advertising by 0.5% (additive).\",\n ],\n\n //Augmentation for employees, increases cre\n \"4\": [\n 4,\n 1e9,\n 1.06,\n 0.1,\n \"Nuoptimal Nootropic Injector Implants\",\n \"Purchase the Nuoptimal Nootropic \" +\n \"Injector augmentation for your employees. Each level of this upgrade \" +\n \"globally increases the creativity of your employees by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases cha\n \"5\": [\n 5,\n 1e9,\n 1.06,\n 0.1,\n \"Speech Processor Implants\",\n \"Purchase the Speech Processor augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases int\n \"6\": [\n 6,\n 1e9,\n 1.06,\n 0.1,\n \"Neural Accelerators\",\n \"Purchase the Neural Accelerator augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the intelligence of your employees \" +\n \"by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases eff\n \"7\": [\n 7,\n 1e9,\n 1.06,\n 0.1,\n \"FocusWires\",\n \"Purchase the FocusWire augmentation for your employees. Each level \" +\n \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\",\n ],\n\n //Improves sales of materials/products\n \"8\": [\n 8,\n 1e9,\n 1.07,\n 0.01,\n \"ABC SalesBots\",\n \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" +\n \"materials and products you sell. Each level of this upgrade globally increases your sales \" +\n \"by 1% (additive).\",\n ],\n\n //Improves scientific research rate\n \"9\": [\n 9,\n 5e9,\n 1.07,\n 0.05,\n \"Project Insight\",\n \"Purchase 'Project Insight', a R&D service provided by the secretive \" +\n \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" +\n \"Scientific Research you produce by 5% (additive).\",\n ],\n};\n","import React from \"react\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface ICityProps {\n currentCity: CityName;\n city: CityName;\n onTravel: (city: CityName) => void;\n}\n\nfunction City(props: ICityProps): React.ReactElement {\n if (props.city !== props.currentCity) {\n return (\n {props.city}}>\n props.onTravel(props.city)}\n style={{ color: \"white\", lineHeight: \"1em\", whiteSpace: \"pre\", cursor: \"pointer\" }}\n >\n {props.city[0]}\n \n \n );\n }\n return {props.city[0]};\n}\n\ninterface IProps {\n currentCity: CityName;\n onTravel: (city: CityName) => void;\n}\n\nexport function WorldMap(props: IProps): React.ReactElement {\n // prettier-ignore\n return (\n <>\n ,_ . ._. _. .\n , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-\n /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_\n / ,/'-/~ '\\ ,' _ , ','|~ ._/-, /~\n ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~\n .-~ '| '',\\~|\\ _\\~ ,_ , /,\n '\\ /'~ |_/~\\\\,-,~ \\ \" ,_,/ |\n | / ._-~'\\_ _~| \\ ) \n \\ __-\\ '/ ~ |\\ \\_ / ~\n ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,\n ~-_' _; '\\ '-, \\,' /\\/ |\n '\\_,~'\\_ \\_ _, /' ' |, /|'\n / \\_ ~ | / \\ ~'; -,_.\n | ~\\ | | , '-_, ,; ~ ~\\\n \\, / \\ / /| ,-, , -,\n | ,/ | |' |/ ,- ~ \\ '.\n ,| ,/ \\ ,/ \\ |\n / | ~ -~~-, / _\n | ,-' ~ /\n / ,' ~\n ',| ~\n ~'\n \n );\n}\n","import React from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { StealthIcon } from \"./StealthIcon\";\nimport { KillIcon } from \"./KillIcon\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: IAction;\n}\n\nexport function SuccessChance(props: IProps): React.ReactElement {\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n\n let chance = <>;\n if (estimatedSuccessChance[0] === estimatedSuccessChance[1]) {\n chance = <>{formatNumber(estimatedSuccessChance[0] * 100, 1)}%;\n } else {\n chance = (\n <>\n {formatNumber(estimatedSuccessChance[0] * 100, 1)}% ~ {formatNumber(estimatedSuccessChance[1] * 100, 1)}%\n \n );\n }\n\n return (\n <>\n Estimated success chance: {chance} {props.action.isStealth ? : <>}\n {props.action.isKill ? : <>}\n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n}\n\nexport function StaticModal(props: IProps): React.ReactElement {\n return (\n \n {props.children}\n \n );\n}\n","/**\n * Functions used to determine whether the target can be hacked (or grown/weakened).\n * Meant to be used for Netscript implementation\n *\n * The returned status object's message should be used for logging in Netscript\n */\nimport { IReturnStatus } from \"../types\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Server } from \"../Server/Server\";\n\nfunction baseCheck(server: Server, fnName: string): IReturnStatus {\n const hostname = server.hostname;\n\n if (!(\"requiredHackingSkill\" in server)) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because it is a Hacknet Node`,\n };\n }\n\n if (server.hasAdminRights === false) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because you do not have root access`,\n };\n }\n\n return { res: true };\n}\n\nexport function netscriptCanHack(server: Server, p: IPlayer): IReturnStatus {\n const initialCheck = baseCheck(server, \"hack\");\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n if (s.requiredHackingSkill > p.hacking) {\n return {\n res: false,\n msg: `Cannot hack ${server.hostname} server because your hacking skill is not high enough`,\n };\n }\n\n return { res: true };\n}\n\nexport function netscriptCanGrow(server: Server): IReturnStatus {\n return baseCheck(server, \"grow\");\n}\n\nexport function netscriptCanWeaken(server: Server): IReturnStatus {\n return baseCheck(server, \"weaken\");\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Reputation } from \"../../ui/React/Reputation\";\n\nexport function ReputationRate({ reputation }: { reputation: number }): React.ReactElement {\n return ;\n}\n","import { substituteAliases } from \"../Alias\";\n// Helper function that checks if an argument (which is a string) is a valid number\nfunction isNumber(str: string): boolean {\n if (typeof str != \"string\") {\n return false;\n } // Only process strings\n return !isNaN(str as unknown as number) && !isNaN(parseFloat(str));\n}\nexport function ParseCommands(commands: string): string[] {\n // Sanitize input\n commands = commands.trim();\n // Replace all extra whitespace in command with a single space\n commands = commands.replace(/\\s\\s+/g, \" \");\n\n const match = commands.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g);\n if (!match) return [];\n // Split commands and execute sequentially\n const allCommands = match\n .map(substituteAliases)\n .map((c) => c.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g))\n .flat();\n\n const out: string[] = [];\n for (const c of allCommands) {\n if (c === null) continue;\n if (c.match(/^\\s*$/)) {\n continue;\n } // Don't run commands that only have whitespace\n out.push(c.trim());\n }\n return out;\n}\n\nexport function ParseCommand(command: string): (string | number | boolean)[] {\n // This will be used to keep track of whether we're in a quote. This is for situations\n // like the alias command:\n // alias run=\"run NUKE.exe\"\n // We want the run=\"run NUKE.exe\" to be parsed as a single command, so this flag\n // will keep track of whether we have a quote in\n let inQuote = ``;\n\n // Returns an array with the command and its arguments in each index\n // Properly handles quotation marks (e.g. `run foo.script \"the sun\"` will return [run, foo.script, the sun])\n const args = [];\n let start = 0,\n i = 0;\n let prevChar = \"\"; // Previous character\n while (i < command.length) {\n let escaped = false; // Check for escaped quotation marks\n if (i >= 1) {\n prevChar = command.charAt(i - 1);\n if (prevChar === \"\\\\\") {\n escaped = true;\n }\n }\n\n const c = command.charAt(i);\n if (c === '\"') {\n // Double quotes\n if (!escaped && prevChar === \" \") {\n const endQuote = command.indexOf('\"', i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else {\n if (inQuote === ``) {\n inQuote = `\"`;\n } else if (inQuote === `\"`) {\n inQuote = ``;\n }\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n if (!escaped && prevChar === \" \") {\n const endQuote = command.indexOf(\"'\", i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else {\n if (inQuote === ``) {\n inQuote = `'`;\n } else if (inQuote === `'`) {\n inQuote = ``;\n }\n }\n } else if (c === \" \" && inQuote === ``) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from a string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n\n start = i + 1;\n }\n ++i;\n }\n\n // Add the last argument\n if (start !== i) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n }\n\n return args;\n}\n","/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\nexport const MaxSleevesFromCovenant = 5;\nexport const BaseCostPerSleeve = 10e12;\n","/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\nimport * as walk from \"acorn-walk\";\nimport acorn, { parse } from \"acorn\";\n\nimport { RamCalculationErrorCode } from \"./RamCalculationErrorCodes\";\n\nimport { RamCosts, RamCostConstants } from \"../Netscript/RamCostGenerator\";\nimport { Script } from \"../Script/Script\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\n\n// These special strings are used to reference the presence of a given logical\n// construct within a user script.\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\";\n\n// The global scope of a script is registered under this key during parsing.\nconst memCheckGlobalKey = \".__GLOBAL__\";\n\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\nasync function parseOnlyRamCalculate(\n otherScripts: Script[],\n code: string,\n workerScript: WorkerScript,\n): Promise {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap: { [key: string]: string[] } = {};\n\n // Scripts we've parsed.\n const completedParses = new Set();\n\n // Scripts we've discovered that need to be parsed.\n const parseQueue: string[] = [];\n\n // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n function parseCode(code: string, moduleName: string): void {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName);\n\n // Add any additional modules to the parse queue;\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n }\n\n // Splice all the references in\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n }\n\n // Parse the initial module, which is the \"main\" script that is being run\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule);\n\n // Process additional modules, which occurs if the \"main\" script has any imports\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift();\n if (nextModule === undefined) throw new Error(\"nextModule should not be undefined\");\n\n // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n let code;\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return RamCalculationErrorCode.URLImportError;\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return RamCalculationErrorCode.ImportError;\n }\n\n let script = null;\n const fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n for (const s of otherScripts) {\n if (s.filename === fn) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return RamCalculationErrorCode.ImportError; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n }\n\n // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n let ram = RamCostConstants.ScriptBaseRamCost;\n const unresolvedRefs = Object.keys(dependencyMap).filter((s) => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift();\n if (ref === undefined) throw new Error(\"ref should not be undefined\");\n\n // Check if this is one of the special keys, and add the appropriate ram cost if so.\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += RamCostConstants.ScriptHacknetNodesRamCost;\n }\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n }\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n }\n if (ref === \"corporation\" && !resolvedRefs.has(\"corporation\")) {\n ram += RamCostConstants.ScriptCorporationRamCost;\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n for (const ident of Object.keys(dependencyMap).filter((k) => k.startsWith(prefix))) {\n for (const dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (const dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n\n // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n try {\n function applyFuncRam(cost: any): number {\n if (typeof cost === \"number\") {\n return cost;\n } else {\n return 0;\n }\n }\n\n // Only count each function once\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n }\n\n // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n let func;\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n } else if (ref in workerScript.env.vars.stanek) {\n func = workerScript.env.vars.stanek[ref];\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n } else if (ref in workerScript.env.vars.stock) {\n func = workerScript.env.vars.stock[ref];\n } else {\n func = workerScript.env.vars[ref];\n }\n ram += applyFuncRam(func);\n } catch (error) {\n continue;\n }\n }\n return ram;\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return RamCalculationErrorCode.SyntaxError;\n }\n}\n\nexport function checkInfiniteLoop(code: string): number {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n\n function nodeHasTrueTest(node: acorn.Node): boolean {\n return node.type === \"Literal\" && (node as any).raw === \"true\";\n }\n\n function hasAwait(ast: acorn.Node): boolean {\n let hasAwait = false;\n walk.recursive(\n ast,\n {},\n {\n AwaitExpression: () => {\n hasAwait = true;\n },\n },\n );\n return hasAwait;\n }\n\n let missingAwaitLine = -1;\n walk.recursive(\n ast,\n {},\n {\n WhileStatement: (node: acorn.Node, st: any, walkDeeper: walk.WalkerCallback) => {\n if (nodeHasTrueTest((node as any).test) && !hasAwait(node)) {\n missingAwaitLine = (code.slice(0, node.start).match(/\\n/g) || []).length + 1;\n } else {\n (node as any).body && walkDeeper((node as any).body, st);\n }\n },\n },\n );\n\n return missingAwaitLine;\n}\n\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\nfunction parseOnlyCalculateDeps(code: string, currentModule: string): any {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap: { [key: string]: Set | undefined } = {};\n dependencyMap[globalKey] = new Set();\n\n // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n const internalToExternal: { [key: string]: string | undefined } = {};\n\n const additionalModules: string[] = [];\n\n // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n function addRef(key: string, name: string): void {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n const external = internalToExternal[name];\n if (external !== undefined) {\n s.add(external);\n }\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n }\n\n //A list of identifiers that resolve to \"native Javascript code\"\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype);\n\n // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n function commonVisitors(): any {\n return {\n Identifier: (node: any, st: any) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n addRef(st.key, node.name);\n },\n WhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node: any, st: any, walkDeeper: any) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n },\n };\n }\n\n walk.recursive(\n ast,\n { key: globalKey },\n Object.assign(\n {\n ImportDeclaration: (node: any, st: any) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName);\n\n // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: (node: any) => {\n const key = currentModule + \".\" + node.id.name;\n walk.recursive(node, { key: key }, commonVisitors());\n },\n },\n commonVisitors(),\n ),\n );\n\n return { dependencyMap: dependencyMap, additionalModules: additionalModules };\n}\n\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\nexport async function calculateRamUsage(\n codeCopy: string,\n otherScripts: Script[],\n): Promise {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: RamCosts,\n },\n } as WorkerScript;\n\n try {\n return await parseOnlyRamCalculate(otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return RamCalculationErrorCode.SyntaxError;\n }\n\n return RamCalculationErrorCode.SyntaxError;\n}\n","/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nexport function roundToTwo(decimal: number): number {\n const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));\n\n return +`${leftShift}e-2`;\n}\n","import React from \"react\";\nimport { DarkWebItems } from \"./DarkWebItems\";\n\nimport { Player } from \"../Player\";\nimport { Terminal } from \"../Terminal\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Money } from \"../ui/React/Money\";\n\n//Posts a \"help\" message if connected to DarkWeb\nexport function checkIfConnectedToDarkweb(): void {\n const server = Player.getCurrentServer();\n if (server !== null && SpecialServers.DarkWeb == server.hostname) {\n Terminal.print(\n \"You are now connected to the dark web. From the dark web you can purchase illegal items. \" +\n \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" +\n \"to purchase an item.\",\n );\n }\n}\n\nexport function listAllDarkwebItems(): void {\n for (const key in DarkWebItems) {\n const item = DarkWebItems[key];\n Terminal.printRaw(\n <>\n {item.program} - - {item.description}\n ,\n );\n }\n}\n\nexport function buyDarkwebItem(itemName: string): void {\n itemName = itemName.toLowerCase();\n\n // find the program that matches, if any\n let item = null;\n for (const key in DarkWebItems) {\n const i = DarkWebItems[key];\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n }\n\n // return if invalid\n if (item === null) {\n Terminal.error(\"Unrecognized item: \" + itemName);\n return;\n }\n\n // return if the player already has it.\n if (Player.hasProgram(item.program)) {\n Terminal.print(\"You already have the \" + item.program + \" program\");\n return;\n }\n\n // return if the player doesn't have enough money\n if (Player.money < item.price) {\n Terminal.error(\"Not enough money to purchase \" + item.program);\n return;\n }\n\n // buy and push\n Player.loseMoney(item.price, \"other\");\n Player.getHomeComputer().programs.push(item.program);\n Terminal.print(\n \"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\",\n );\n}\n","/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangConstants } from \"./data/Constants\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { IAscensionResult } from \"./IAscensionResult\";\n\nimport { AllGangs } from \"./AllGangs\";\nimport { GangMember } from \"./GangMember\";\n\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { PowerMultiplier } from \"./data/power\";\n\nexport class Gang {\n facName: string;\n members: GangMember[];\n wanted: number;\n respect: number;\n\n isHackingGang: boolean;\n\n respectGainRate: number;\n wantedGainRate: number;\n moneyGainRate: number;\n\n storedCycles: number;\n\n storedTerritoryAndPowerCycles: number;\n\n territoryClashChance: number;\n territoryWarfareEngaged: boolean;\n\n notifyMemberDeath: boolean;\n\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n\n this.isHackingGang = hacking;\n\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0;\n\n // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n this.storedCycles = 0;\n\n // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n this.storedTerritoryAndPowerCycles = 0;\n\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n\n this.notifyMemberDeath = true;\n }\n\n getPower(): number {\n return AllGangs[this.facName].power;\n }\n\n getTerritory(): number {\n return AllGangs[this.facName].territory;\n }\n\n process(numCycles = 1, player: IPlayer): void {\n const CyclesPerSecond = 1000 / CONSTANTS._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n this.storedCycles += numCycles;\n\n // Only process if there are at least 2 seconds, and at most 5 seconds\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e: any) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player: IPlayer): void {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain;\n // Faction reputation gains is respect gain divided by some constant\n const fac = Factions[this.facName];\n if (!(fac instanceof Faction)) {\n dialogBoxCreate(\n \"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\",\n );\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n const favorMult = 1 + fac.favor / 100;\n\n fac.playerReputation += (player.faction_rep_mult * gain * favorMult) / GangConstants.GangRespectToReputationRatio;\n\n // Keep track of respect gained per member\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n player.gainMoney(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1): void {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < GangConstants.CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= GangConstants.CyclesPerTerritoryAndPowerUpdate;\n\n // Process power first\n const gangName = this.facName;\n for (const name in AllGangs) {\n if (AllGangs.hasOwnProperty(name)) {\n if (name == gangName) {\n AllGangs[name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = AllGangs[name].power * 0.005;\n AllGangs[name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const powerMult = PowerMultiplier[name];\n if (powerMult === undefined) throw new Error(\"Should not be undefined\");\n const additiveGain = 0.75 * gainRoll * AllGangs[name].territory * powerMult;\n AllGangs[name].power += additiveGain;\n }\n }\n }\n }\n\n // Determine if territory should be processed\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n }\n\n // Then process territory\n const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0);\n if (gangs.length > 1) {\n for (let i = 0; i < gangs.length; ++i) {\n const others = gangs.filter((e) => {\n return e !== gangs[i];\n });\n const other = getRandomInt(0, others.length - 1);\n\n const thisGang = gangs[i];\n const otherGang = others[other];\n\n // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = AllGangs[thisGang].power;\n const otherPwr = AllGangs[otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang: string, loseGang: string): number {\n const powerBonus = Math.max(\n 1,\n 1 + Math.log(AllGangs[winGang].power / AllGangs[loseGang].power) / Math.log(50),\n );\n const gains = Math.min(AllGangs[loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (AllGangs[otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n AllGangs[thisGang].territory += territoryGain;\n if (AllGangs[thisGang].territory > 1) AllGangs[thisGang].territory = 1;\n AllGangs[otherGang].territory -= territoryGain;\n if (AllGangs[thisGang].territory < 0) AllGangs[thisGang].territory = 0;\n if (thisGang === gangName) {\n this.clash(true); // Player won\n AllGangs[otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n AllGangs[otherGang].power *= 1 / 1.01;\n }\n } else {\n if (AllGangs[thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n AllGangs[thisGang].territory -= territoryGain;\n if (AllGangs[otherGang].territory < 0) AllGangs[otherGang].territory = 0;\n AllGangs[otherGang].territory += territoryGain;\n if (AllGangs[otherGang].territory > 1) AllGangs[otherGang].territory = 1;\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n AllGangs[thisGang].power *= 1 / 1.01;\n } else {\n AllGangs[thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1): void {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false): void {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2;\n // If the clash was lost, the player loses a small percentage of power\n else AllGangs[this.facName].power *= 1 / 1.008;\n\n // Deaths can only occur during X% of clashes\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i];\n\n // Only members assigned to Territory Warfare can die\n if (member.task !== \"Territory Warfare\") continue;\n\n // Chance to die is decreased based on defense\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember(): boolean {\n if (this.members.length >= GangConstants.MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember(): number {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name: string): boolean {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false;\n\n // Check for already-existing names\n const sameNames = this.members.filter((m) => m.name === name);\n if (sameNames.length >= 1) return false;\n\n const member = new GangMember(name);\n this.members.push(member);\n return true;\n }\n\n // Money and Respect gains multiplied by this number (< 1)\n getWantedPenalty(): number {\n return this.respect / (this.respect + this.wanted);\n }\n\n //Calculates power GAIN, which is added onto the Gang's existing power\n calculatePower(): number {\n let memberTotal = 0;\n for (let i = 0; i < this.members.length; ++i) {\n if (!GangMemberTasks.hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\")\n continue;\n memberTotal += this.members[i].calculatePower();\n }\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member: GangMember): void {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n }\n\n // Notify of death\n if (this.notifyMemberDeath) {\n dialogBoxCreate(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member: GangMember, workerScript?: WorkerScript): IAscensionResult {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n if (workerScript) {\n workerScript.log(\"ascend\", () => `Ascended Gang member ${member.name}`);\n }\n return res;\n } catch (e: any) {\n if (workerScript == null) {\n exceptionAlert(e);\n }\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n }\n\n // Cost of upgrade gets cheaper as gang increases in respect + power\n getDiscount(): number {\n const power = this.getPower();\n const respect = this.respect;\n\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount =\n Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n }\n\n // Returns only valid tasks for this gang. Excludes 'Unassigned'\n getAllTaskNames(): string[] {\n return Object.keys(GangMemberTasks).filter((taskName: string) => {\n const task = GangMemberTasks[taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false;\n // yes you need both checks\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg: GangMemberUpgrade | null): number {\n if (upg == null) {\n return Infinity;\n }\n return upg.cost / this.getDiscount();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Gang\", this);\n }\n\n /**\n * Initiatizes a Gang object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Gang {\n return Generic_fromJSON(Gang, value.data);\n }\n}\n\nReviver.constructors.Gang = Gang;\n","import { workerScripts } from \"./WorkerScripts\";\n\nlet pidCounter = 1;\n\n/**\n * Find and return the next availble PID for a script\n */\nexport function generateNextPid(): number {\n let tempCounter = pidCounter;\n\n // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n let found = false;\n for (let i = 0; i < 1e6; ) {\n if (!workerScripts.has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\n\nexport function resetPidCounter(): void {\n pidCounter = 1;\n}\n","import { vsprintf, sprintf } from \"sprintf-js\";\n\nimport { getRamCost } from \"./Netscript/RamCostGenerator\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\n\nimport { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\n\nimport { CONSTANTS } from \"./Constants\";\n\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"./Hacking\";\n\nimport { netscriptCanGrow, netscriptCanHack, netscriptCanWeaken } from \"./Hacking/netscriptCanHack\";\n\nimport { HacknetServer } from \"./Hacknet/HacknetServer\";\n\nimport { Terminal } from \"./Terminal\";\n\nimport { Player } from \"./Player\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Script } from \"./Script/Script\";\nimport { findRunningScript, findRunningScriptByPid } from \"./Script/ScriptHelpers\";\nimport { isScriptFilename } from \"./Script/isScriptFilename\";\nimport { PromptEvent } from \"./ui/React/PromptManager\";\n\nimport { GetServer, GetAllServers, DeleteServer, AddToAllServers, createUniqueRandomIp } from \"./Server/AllServers\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport {\n getServerOnNetwork,\n numCycleForGrowth,\n processSingleServerGrowth,\n safetlyCreateUniqueServer,\n} from \"./Server/ServerHelpers\";\nimport { getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam } from \"./Server/ServerPurchases\";\nimport { Server } from \"./Server/Server\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { influenceStockThroughServerHack, influenceStockThroughServerGrow } from \"./StockMarket/PlayerInfluencing\";\n\nimport { isValidFilePath, removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { TextFile, getTextFile, createTextFile } from \"./TextFile\";\n\nimport { NetscriptPorts, runScriptFromScript } from \"./NetscriptWorker\";\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads } from \"./NetscriptEvaluator\";\n\nimport { numeralWrapper } from \"./ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\n\nimport { LogBoxEvents } from \"./ui/React/LogBoxManager\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { isString } from \"./utils/helpers/isString\";\n\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { NetscriptGang } from \"./NetscriptFunctions/Gang\";\nimport { NetscriptSleeve } from \"./NetscriptFunctions/Sleeve\";\nimport { NetscriptExtra } from \"./NetscriptFunctions/Extra\";\nimport { NetscriptHacknet } from \"./NetscriptFunctions/Hacknet\";\nimport { NetscriptStanek } from \"./NetscriptFunctions/Stanek\";\n\nimport { NetscriptBladeburner } from \"./NetscriptFunctions/Bladeburner\";\nimport { NetscriptCodingContract } from \"./NetscriptFunctions/CodingContract\";\nimport { NetscriptCorporation } from \"./NetscriptFunctions/Corporation\";\nimport { NetscriptFormulas } from \"./NetscriptFunctions/Formulas\";\nimport { NetscriptStockMarket } from \"./NetscriptFunctions/StockMarket\";\n\nimport {\n NS as INS,\n Player as INetscriptPlayer,\n Gang as IGang,\n Bladeburner as IBladeburner,\n Stanek as IStanek,\n SourceFileLvl,\n} from \"./ScriptEditor/NetscriptDefinitions\";\nimport { NetscriptSingularity } from \"./NetscriptFunctions/Singularity\";\n\nimport { toNative } from \"./NetscriptFunctions/toNative\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nimport { Flags } from \"./NetscriptFunctions/Flags\";\n\ninterface NS extends INS {\n [key: string]: any;\n gang: IGang;\n bladeburner: IBladeburner;\n stanek: IStanek;\n}\n\nexport function NetscriptFunctions(workerScript: WorkerScript): NS {\n const updateDynamicRam = function (fnName: string, ramCost: number): void {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n workerScript.dynamicLoadedFns[fnName] = true;\n\n let threads = workerScript.scriptRef.threads;\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.hostname}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost;\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Threads: ${threads}\n Dynamic RAM Usage: ${numeralWrapper.formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${numeralWrapper.formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`,\n );\n }\n };\n\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} hostname - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {BaseServer} The specified server as a BaseServer\n */\n const safeGetServer = function (hostname: string, callingFnName: string): BaseServer {\n const server = GetServer(hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid hostname or IP: ${hostname}`);\n }\n return server;\n };\n\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} hostname - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n const getRunningScript = function (\n fn: any,\n hostname: any,\n callingFnName: any,\n scriptArgs: any,\n ): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` +\n `This is probably a bug. Please report to game developer`,\n );\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (hostname == null) {\n hostname = workerScript.hostname;\n }\n const server = safeGetServer(hostname, callingFnName);\n\n return findRunningScript(fn, scriptArgs, server);\n }\n\n // If no arguments are specified, return the current RunningScript\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid: any, callingFnName: any): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const server of GetAllServers()) {\n const runningScript = findRunningScriptByPid(pid, server);\n if (runningScript) return runningScript;\n }\n return null;\n };\n\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} hostname - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n const getCannotFindRunningScriptErrorMessage = function (fn: any, hostname: any, scriptArgs: any): string {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${hostname} with args: ${arrayToString(scriptArgs)}`;\n };\n\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n const failOnHacknetServer = function (server: any, callingFn: any = \"\"): boolean {\n if (server instanceof HacknetServer) {\n workerScript.log(callingFn, () => `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n };\n\n const makeRuntimeErrorMsg = function (caller: string, msg: string): string {\n const errstack = new Error().stack;\n if (errstack === undefined) throw new Error(\"how did we not throw an error?\");\n const stack = errstack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n for (const stackline of stack) {\n let filename;\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n if (!filename) continue;\n\n interface ILine {\n line: string;\n func: string;\n }\n\n function parseChromeStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n if (lineMatch && funcMatch) {\n return { line: lineMatch[1], func: funcMatch[1] };\n }\n return null;\n }\n let call = { line: \"-1\", func: \"unknown\" };\n const chromeCall = parseChromeStackline(stackline);\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return { line: lineMatch[1], func: line.slice(0, lio) };\n }\n return null;\n }\n\n const firefoxCall = parseFirefoxStackline(stackline);\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, () => msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return makeRuntimeRejectMsg(workerScript, rejectMsg);\n };\n\n const checkSingularityAccess = function (func: any, n: any): void {\n if (Player.bitNodeN !== 4) {\n if (SourceFileFlags[4] < n) {\n throw makeRuntimeErrorMsg(func, `This singularity function requires Source-File 4-${n} to run.`);\n }\n }\n };\n\n const hack = function (hostname: any, manual: any, { threads: requestedThreads, stock }: any = {}): Promise {\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n const threads = resolveNetscriptRequestedThreads(workerScript, \"hack\", requestedThreads);\n const server = safeGetServer(hostname, \"hack\");\n if (!(server instanceof Server)) {\n throw makeRuntimeErrorMsg(\"hack\", \"Cannot be executed on this server.\");\n }\n\n // Calculate the hacking time\n const hackingTime = calculateHackingTime(server, Player); // This is in seconds\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, Player);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"hack\",\n () =>\n `Executing ${hostname} in ${convertTimeMsToTimeElapsedString(\n hackingTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n\n return netscriptDelay(hackingTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n const hackChance = calculateHackingChance(server, Player);\n const rand = Math.random();\n let expGainedOnSuccess = calculateHackingExpGain(server, Player) * threads;\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n let maxThreadNeeded = Math.ceil((1 / percentHacked) * (server.moneyAvailable / server.moneyMax));\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads;\n\n // Over-the-top safety checks\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n server.moneyAvailable -= moneyDrained;\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * BitNodeMultipliers.ScriptHackMoneyGain;\n\n Player.gainMoney(moneyGained, \"hacking\");\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n Player.scriptProdSinceLastAug += moneyGained;\n workerScript.scriptRef.recordHack(server.hostname, moneyGained, threads);\n Player.gainHackingExp(expGainedOnSuccess);\n if (manual)\n Player.gainIntelligenceExp(Math.pow(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain, 0.1));\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\n \"hack\",\n () =>\n `Successfully hacked '${server.hostname}' for ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n server.fortify(CONSTANTS.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n if (stock) {\n influenceStockThroughServerHack(server, moneyDrained);\n }\n if (manual) {\n server.backdoorInstalled = true;\n }\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n Player.gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\n \"hack\",\n () =>\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(\n expGainedOnFailure,\n )} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args: any[]): string {\n let out = \"\";\n for (let arg of args) {\n arg = toNative(arg);\n out += typeof arg === \"object\" ? JSON.stringify(arg) : `${arg}`;\n }\n\n return out;\n };\n\n const helper = {\n updateDynamicRam: updateDynamicRam,\n makeRuntimeErrorMsg: makeRuntimeErrorMsg,\n string: (funcName: string, argName: string, v: any): string => {\n if (typeof v === \"string\") return v;\n if (typeof v === \"number\") return v + \"\"; // cast to string;\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a string`);\n },\n number: (funcName: string, argName: string, v: any): number => {\n if (typeof v === \"number\") return v;\n if (!isNaN(v) && !isNaN(parseFloat(v))) return parseFloat(v);\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a number`);\n },\n boolean: (v: any): boolean => {\n return !!v; // Just convert it to boolean.\n },\n getServer: safeGetServer,\n checkSingularityAccess: checkSingularityAccess,\n hack: hack,\n };\n\n const gang = NetscriptGang(Player, workerScript, helper);\n const sleeve = NetscriptSleeve(Player, workerScript, helper);\n const extra = NetscriptExtra(Player, workerScript);\n const hacknet = NetscriptHacknet(Player, workerScript, helper);\n const stanek = NetscriptStanek(Player, workerScript, helper);\n const bladeburner = NetscriptBladeburner(Player, workerScript, helper);\n const codingcontract = NetscriptCodingContract(Player, workerScript, helper);\n const corporation = NetscriptCorporation(Player, workerScript, helper);\n const formulas = NetscriptFormulas(Player, workerScript, helper);\n const singularity = NetscriptSingularity(Player, workerScript, helper);\n const stockmarket = NetscriptStockMarket(Player, workerScript, helper);\n\n const base: INS = {\n ...singularity,\n\n gang: gang,\n bladeburner: bladeburner,\n codingcontract: codingcontract,\n sleeve: sleeve,\n corporation: corporation,\n stanek: stanek,\n\n formulas: formulas,\n stock: stockmarket,\n args: workerScript.args,\n hacknet: hacknet,\n sprintf: sprintf,\n vsprintf: vsprintf,\n scan: function (hostname: any = workerScript.hostname): any {\n updateDynamicRam(\"scan\", getRamCost(\"scan\"));\n const server = safeGetServer(hostname, \"scan\");\n const out = [];\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const s = getServerOnNetwork(server, i);\n if (s === null) continue;\n const entry = s.hostname;\n if (entry === null) continue;\n out.push(entry);\n }\n workerScript.log(\"scan\", () => `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (hostname: any, { threads: requestedThreads, stock }: any = {}): any {\n updateDynamicRam(\"hack\", getRamCost(\"hack\"));\n return hack(hostname, false, { threads: requestedThreads, stock: stock });\n },\n hackAnalyzeThreads: function (hostname: any, hackAmount: any): any {\n updateDynamicRam(\"hackAnalyzeThreads\", getRamCost(\"hackAnalyzeThreads\"));\n\n // Check argument validity\n const server = safeGetServer(hostname, \"hackAnalyzeThreads\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeThreads\", () => \"Cannot be executed on this server.\");\n return -1;\n }\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(\n \"hackAnalyzeThreads\",\n `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`,\n );\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyze: function (hostname: any): any {\n updateDynamicRam(\"hackAnalyze\", getRamCost(\"hackAnalyze\"));\n\n const server = safeGetServer(hostname, \"hackAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyze\", () => \"Cannot be executed on this server.\");\n return false;\n }\n\n return calculatePercentMoneyHacked(server, Player);\n },\n hackAnalyzeSecurity: function (threads: any): number {\n return CONSTANTS.ServerFortifyAmount * threads;\n },\n hackAnalyzeChance: function (hostname: any): any {\n updateDynamicRam(\"hackAnalyzeChance\", getRamCost(\"hackAnalyzeChance\"));\n\n const server = safeGetServer(hostname, \"hackAnalyzeChance\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeChance\", () => \"Cannot be executed on this server.\");\n return false;\n }\n\n return calculateHackingChance(server, Player);\n },\n sleep: function (time: any): any {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"sleep\", () => `Sleeping for ${time} milliseconds`);\n return netscriptDelay(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n asleep: function (time: any): any {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"asleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"asleep\", () => `Sleeping for ${time} milliseconds`);\n return netscriptDelay(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n grow: function (hostname: any, { threads: requestedThreads, stock }: any = {}): any {\n updateDynamicRam(\"grow\", getRamCost(\"grow\"));\n const threads = resolveNetscriptRequestedThreads(workerScript, \"grow\", requestedThreads);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"grow\");\n if (!(server instanceof Server)) {\n workerScript.log(\"grow\", () => \"Cannot be executed on this server.\");\n return false;\n }\n\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n throw new Error(\"Workerscript host is null\");\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanGrow(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg || \"\");\n }\n\n const growTime = calculateGrowTime(server, Player);\n workerScript.log(\n \"grow\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n growTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n return netscriptDelay(growTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n processSingleServerGrowth(server, threads, Player, host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\n \"grow\",\n () =>\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n logGrowPercent,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n if (stock) {\n influenceStockThroughServerGrow(server, moneyAfter - moneyBefore);\n }\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (hostname: any, growth: any, cores: any = 1): any {\n updateDynamicRam(\"growthAnalyze\", getRamCost(\"growthAnalyze\"));\n\n // Check argument validity\n const server = safeGetServer(hostname, \"growthAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"growthAnalyze\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return numCycleForGrowth(server, Number(growth), Player, cores);\n },\n growthAnalyzeSecurity: function (threads: any): number {\n return 2 * CONSTANTS.ServerFortifyAmount * threads;\n },\n weaken: function (hostname: any, { threads: requestedThreads }: any = {}): any {\n updateDynamicRam(\"weaken\", getRamCost(\"weaken\"));\n const threads = resolveNetscriptRequestedThreads(workerScript, \"weaken\", requestedThreads);\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"weaken\");\n if (!(server instanceof Server)) {\n workerScript.log(\"weaken\", () => \"Cannot be executed on this server.\");\n return false;\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanWeaken(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg || \"\");\n }\n\n const weakenTime = calculateWeakenTime(server, Player);\n workerScript.log(\n \"weaken\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n weakenTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return netscriptDelay(weakenTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) return Promise.reject(workerScript);\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n workerScript.log(\"weaken\", () => \"Server is null, did it die?\");\n return Promise.resolve(0);\n }\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n workerScript.log(\n \"weaken\",\n () =>\n `'${server.hostname}' security level weakened to ${\n server.hackDifficulty\n }. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n });\n },\n weakenAnalyze: function (threads: any, cores: any = 1): number {\n const coreBonus = 1 + (cores - 1) / 16;\n return CONSTANTS.ServerWeakenAmount * threads * coreBonus;\n },\n print: function (...args: any[]): void {\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n workerScript.print(argsToString(args));\n },\n tprint: function (...args: any[]): void {\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n const str = argsToString(args);\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n Terminal.print(`${workerScript.scriptRef.filename}: ${str}`);\n },\n tprintf: function (format: any, ...args: any): any {\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"tprintf\", \"First argument must be string for the format.\");\n }\n const str = vsprintf(format, args);\n\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${str}`);\n return;\n }\n Terminal.print(`${str}`);\n },\n clearLog: function (): any {\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (fn: any): any {\n if (fn === \"ALL\") {\n for (fn in possibleLogs) {\n workerScript.disableLogs[fn] = true;\n }\n workerScript.log(\"disableLog\", () => `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", () => `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (fn: any): any {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", () => `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (fn: any): any {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n return workerScript.disableLogs[fn] ? false : true;\n },\n getScriptLogs: function (fn: any, hostname: any, ...scriptArgs: any): any {\n const runningScriptObj = getRunningScript(fn, hostname, \"getScriptLogs\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any): any {\n let runningScriptObj;\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, hostname, \"tail\", scriptArgs);\n }\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return;\n }\n\n LogBoxEvents.emit(runningScriptObj);\n },\n nuke: function (hostname: any): boolean {\n updateDynamicRam(\"nuke\", getRamCost(\"nuke\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"nuke\");\n if (!(server instanceof Server)) {\n workerScript.log(\"nuke\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", () => `Already have root access to '${server.hostname}'.`);\n } else {\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", () => `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n }\n return true;\n },\n brutessh: function (hostname: any): boolean {\n updateDynamicRam(\"brutessh\", getRamCost(\"brutessh\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"brutessh\");\n if (!(server instanceof Server)) {\n workerScript.log(\"brutessh\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", () => `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", () => `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n ftpcrack: function (hostname: any): boolean {\n updateDynamicRam(\"ftpcrack\", getRamCost(\"ftpcrack\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"ftpcrack\");\n if (!(server instanceof Server)) {\n workerScript.log(\"ftpcrack\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", () => `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", () => `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n relaysmtp: function (hostname: any): boolean {\n updateDynamicRam(\"relaysmtp\", getRamCost(\"relaysmtp\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"relaysmtp\");\n if (!(server instanceof Server)) {\n workerScript.log(\"relaysmtp\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", () => `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", () => `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n httpworm: function (hostname: any): boolean {\n updateDynamicRam(\"httpworm\", getRamCost(\"httpworm\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"httpworm\");\n if (!(server instanceof Server)) {\n workerScript.log(\"httpworm\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", () => `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", () => `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n sqlinject: function (hostname: any): boolean {\n updateDynamicRam(\"sqlinject\", getRamCost(\"sqlinject\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"sqlinject\");\n if (!(server instanceof Server)) {\n workerScript.log(\"sqlinject\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", () => `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", () => `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n return true;\n },\n run: function (scriptname: any, threads: any = 1, ...args: any[]): any {\n updateDynamicRam(\"run\", getRamCost(\"run\"));\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return runScriptFromScript(\"run\", scriptServer, scriptname, args, workerScript, threads);\n },\n exec: function (scriptname: any, hostname: any, threads: any = 1, ...args: any[]): any {\n updateDynamicRam(\"exec\", getRamCost(\"exec\"));\n if (scriptname === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const server = safeGetServer(hostname, \"exec\");\n return runScriptFromScript(\"exec\", server, scriptname, args, workerScript, threads);\n },\n spawn: function (scriptname: any, threads: any = 1, ...args: any[]): any {\n updateDynamicRam(\"spawn\", getRamCost(\"spawn\"));\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n setTimeout(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return runScriptFromScript(\"spawn\", scriptServer, scriptname, args, workerScript, threads);\n }, spawnDelay * 1e3);\n\n workerScript.log(\"spawn\", () => `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"spawn\", () => \"Exiting...\");\n }\n },\n kill: function (filename: any, hostname: any, ...scriptArgs: any): any {\n updateDynamicRam(\"kill\", getRamCost(\"kill\"));\n\n let res;\n const killByPid = typeof filename === \"number\";\n if (killByPid) {\n // Kill by pid\n res = killWorkerScript(filename);\n } else {\n // Kill by filename/hostname\n if (filename === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(hostname, \"kill\");\n const runningScriptObj = getRunningScript(filename, hostname, \"kill\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", () => getCannotFindRunningScriptErrorMessage(filename, hostname, scriptArgs));\n return false;\n }\n\n res = killWorkerScript(runningScriptObj, server.hostname);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", () => `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\n \"kill\",\n () => `Killing '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}.`,\n );\n }\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", () => `No script with PID ${filename}`);\n } else {\n workerScript.log(\n \"kill\",\n () => `No such script '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}`,\n );\n }\n return false;\n }\n },\n killall: function (hostname: any = workerScript.hostname): any {\n updateDynamicRam(\"killall\", getRamCost(\"killall\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"killall\");\n const scriptsRunning = server.runningScripts.length > 0;\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n killWorkerScript(server.runningScripts[i], server.hostname, false);\n }\n WorkerScriptStartStopEventEmitter.emit();\n workerScript.log(\n \"killall\",\n () => `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`,\n );\n\n return scriptsRunning;\n },\n exit: function (): any {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"exit\", () => \"Exiting...\");\n } else {\n workerScript.log(\"exit\", () => \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: async function (scriptname: any, hostname1: any, hostname2: any): Promise {\n updateDynamicRam(\"scp\", getRamCost(\"scp\"));\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n let res = false;\n await scriptname.forEach(async function (script) {\n if (await NetscriptFunctions(workerScript).scp(script, hostname1, hostname2)) {\n res = true;\n }\n });\n return Promise.resolve(res);\n }\n\n // Invalid file type\n if (!isValidFilePath(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n }\n\n // Invalid file name\n if (!scriptname.endsWith(\".lit\") && !isScriptFilename(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for .script, .lit, and .txt files\");\n }\n\n let destServer: BaseServer | null;\n let currServ: BaseServer | null;\n\n if (hostname2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || hostname1 === undefined || hostname2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname2, \"scp\");\n currServ = safeGetServer(hostname1, \"scp\");\n } else if (hostname1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || hostname1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname1, \"scp\");\n currServ = GetServer(workerScript.hostname);\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\n \"scp\",\n \"Could not find server hostname for this script. This is a bug. Report to dev.\",\n );\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n // Scp for lit files\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < currServ.messages.length; ++i) {\n if (currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true); // Already exists\n }\n }\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for text files\n if (scriptname.endsWith(\".txt\")) {\n let txtFile;\n for (let i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n if (txtFile === undefined) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n }\n const newFile = new TextFile(txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for script files\n let sourceScript = null;\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n // Overwrite script if it already exists\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", () => `WARNING: File '${scriptname}' overwritten on '${destServer?.hostname}'`);\n const oldScript = destServer.scripts[i];\n // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n if (oldScript.code === sourceScript.code) return Promise.resolve(true);\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return Promise.resolve(true);\n }\n }\n\n // Create new script if it does not already exist\n const newScript = new Script(scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.hostname;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return new Promise((resolve) => {\n if (destServer === null) {\n resolve(false);\n return;\n }\n newScript.updateRamUsage(destServer.scripts).then(() => resolve(true));\n });\n },\n ls: function (hostname: any, grep: any): any {\n updateDynamicRam(\"ls\", getRamCost(\"ls\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(hostname/ip, [grep filter])\");\n }\n const server = safeGetServer(hostname, \"ls\");\n\n // Get the grep filter, if one exists\n let filter = \"\";\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n const msg = server.messages[i];\n if (msg.includes(filter)) {\n allFiles.push(msg);\n }\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n\n for (let i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (let i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n }\n\n // Sort the files alphabetically then print each\n allFiles.sort();\n return allFiles;\n },\n ps: function (hostname: any = workerScript.hostname): any {\n updateDynamicRam(\"ps\", getRamCost(\"ps\"));\n const server = safeGetServer(hostname, \"ps\");\n const processes = [];\n for (const i in server.runningScripts) {\n const script = server.runningScripts[i];\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid,\n });\n }\n return processes;\n },\n hasRootAccess: function (hostname: any): any {\n updateDynamicRam(\"hasRootAccess\", getRamCost(\"hasRootAccess\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"hasRootAccess\");\n return server.hasAdminRights;\n },\n getHostname: function (): any {\n updateDynamicRam(\"getHostname\", getRamCost(\"getHostname\"));\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getHostname\", \"Could not find server. This is a bug. Report to dev.\");\n }\n return scriptServer.hostname;\n },\n getHackingLevel: function (): any {\n updateDynamicRam(\"getHackingLevel\", getRamCost(\"getHackingLevel\"));\n Player.updateSkillLevels();\n workerScript.log(\"getHackingLevel\", () => `returned ${Player.hacking}`);\n return Player.hacking;\n },\n getHackingMultipliers: function (): any {\n updateDynamicRam(\"getHackingMultipliers\", getRamCost(\"getHackingMultipliers\"));\n return {\n chance: Player.hacking_chance_mult,\n speed: Player.hacking_speed_mult,\n money: Player.hacking_money_mult,\n growth: Player.hacking_grow_mult,\n };\n },\n getHacknetMultipliers: function (): any {\n updateDynamicRam(\"getHacknetMultipliers\", getRamCost(\"getHacknetMultipliers\"));\n return {\n production: Player.hacknet_node_money_mult,\n purchaseCost: Player.hacknet_node_purchase_cost_mult,\n ramCost: Player.hacknet_node_ram_cost_mult,\n coreCost: Player.hacknet_node_core_cost_mult,\n levelCost: Player.hacknet_node_level_cost_mult,\n };\n },\n getBitNodeMultipliers: function (): any {\n updateDynamicRam(\"getBitNodeMultipliers\", getRamCost(\"getBitNodeMultipliers\"));\n if (SourceFileFlags[5] <= 0 && Player.bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n const copy = Object.assign({}, BitNodeMultipliers);\n return copy;\n },\n getServer: function (hostname: any = workerScript.hostname): any {\n updateDynamicRam(\"getServer\", getRamCost(\"getServer\"));\n const server = safeGetServer(hostname, \"getServer\");\n const copy = Object.assign({}, server) as any;\n // These fields should be hidden.\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n if (!copy.baseDifficulty) copy.baseDifficulty = 0;\n if (!copy.hackDifficulty) copy.hackDifficulty = 0;\n if (!copy.minDifficulty) copy.minDifficulty = 0;\n if (!copy.moneyAvailable) copy.moneyAvailable = 0;\n if (!copy.moneyMax) copy.moneyMax = 0;\n if (!copy.numOpenPortsRequired) copy.numOpenPortsRequired = 0;\n if (!copy.openPortCount) copy.openPortCount = 0;\n if (!copy.requiredHackingSkill) copy.requiredHackingSkill = 0;\n if (!copy.serverGrowth) copy.serverGrowth = 0;\n return copy;\n },\n getServerMoneyAvailable: function (hostname: any): any {\n updateDynamicRam(\"getServerMoneyAvailable\", getRamCost(\"getServerMoneyAvailable\"));\n const server = safeGetServer(hostname, \"getServerMoneyAvailable\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMoneyAvailable\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned player's money: ${numeralWrapper.formatMoney(Player.money)}`,\n );\n return Player.money;\n }\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyAvailable)} for '${server.hostname}'`,\n );\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (hostname: any): any {\n updateDynamicRam(\"getServerSecurityLevel\", getRamCost(\"getServerSecurityLevel\"));\n const server = safeGetServer(hostname, \"getServerSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.hackDifficulty)} for '${server.hostname}'`,\n );\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (hostname: any): any {\n updateDynamicRam(\"getServerBaseSecurityLevel\", getRamCost(\"getServerBaseSecurityLevel\"));\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `getServerBaseSecurityLevel is deprecated because it's not useful.`,\n );\n const server = safeGetServer(hostname, \"getServerBaseSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerBaseSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.baseDifficulty)} for '${server.hostname}'`,\n );\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (hostname: any): any {\n updateDynamicRam(\"getServerMinSecurityLevel\", getRamCost(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(hostname, \"getServerMinSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMinSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerMinSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.minDifficulty)} for ${server.hostname}`,\n );\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (hostname: any): any {\n updateDynamicRam(\"getServerRequiredHackingLevel\", getRamCost(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(hostname, \"getServerRequiredHackingLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerRequiredHackingLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerRequiredHackingLevel\",\n () => `returned ${numeralWrapper.formatSkill(server.requiredHackingSkill)} for '${server.hostname}'`,\n );\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (hostname: any): any {\n updateDynamicRam(\"getServerMaxMoney\", getRamCost(\"getServerMaxMoney\"));\n const server = safeGetServer(hostname, \"getServerMaxMoney\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMaxMoney\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n workerScript.log(\n \"getServerMaxMoney\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyMax)} for '${server.hostname}'`,\n );\n return server.moneyMax;\n },\n getServerGrowth: function (hostname: any): any {\n updateDynamicRam(\"getServerGrowth\", getRamCost(\"getServerGrowth\"));\n const server = safeGetServer(hostname, \"getServerGrowth\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerGrowth\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n workerScript.log(\"getServerGrowth\", () => `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (hostname: any): any {\n updateDynamicRam(\"getServerNumPortsRequired\", getRamCost(\"getServerNumPortsRequired\"));\n const server = safeGetServer(hostname, \"getServerNumPortsRequired\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", () => \"Cannot be executed on this server.\");\n return 5;\n }\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n workerScript.log(\n \"getServerNumPortsRequired\",\n () => `returned ${server.numOpenPortsRequired} for '${server.hostname}'`,\n );\n return server.numOpenPortsRequired;\n },\n getServerRam: function (hostname: any): any {\n updateDynamicRam(\"getServerRam\", getRamCost(\"getServerRam\"));\n workerScript.log(\n \"getServerRam\",\n () => `getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam`,\n );\n const server = safeGetServer(hostname, \"getServerRam\");\n workerScript.log(\n \"getServerRam\",\n () => `returned [${numeralWrapper.formatRAM(server.maxRam)}, ${numeralWrapper.formatRAM(server.ramUsed)}]`,\n );\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (hostname: any): any {\n updateDynamicRam(\"getServerMaxRam\", getRamCost(\"getServerMaxRam\"));\n const server = safeGetServer(hostname, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", () => `returned ${numeralWrapper.formatRAM(server.maxRam)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (hostname: any): any {\n updateDynamicRam(\"getServerUsedRam\", getRamCost(\"getServerUsedRam\"));\n const server = safeGetServer(hostname, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", () => `returned ${numeralWrapper.formatRAM(server.ramUsed)}`);\n return server.ramUsed;\n },\n serverExists: function (hostname: any): any {\n updateDynamicRam(\"serverExists\", getRamCost(\"serverExists\"));\n return GetServer(hostname) !== null;\n },\n fileExists: function (filename: any, hostname: any = workerScript.hostname): any {\n updateDynamicRam(\"fileExists\", getRamCost(\"fileExists\"));\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n const server = safeGetServer(hostname, \"fileExists\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n for (let i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.toLowerCase() === server.messages[i]) {\n return true;\n }\n }\n const txtFile = getTextFile(filename, server);\n if (txtFile != null) {\n return true;\n }\n return false;\n },\n isRunning: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any): any {\n updateDynamicRam(\"isRunning\", getRamCost(\"isRunning\"));\n if (fn === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, hostname, \"isRunning\", scriptArgs) != null;\n }\n },\n getPurchasedServerLimit: function (): any {\n updateDynamicRam(\"getPurchasedServerLimit\", getRamCost(\"getPurchasedServerLimit\"));\n\n return getPurchaseServerLimit();\n },\n getPurchasedServerMaxRam: function (): any {\n updateDynamicRam(\"getPurchasedServerMaxRam\", getRamCost(\"getPurchasedServerMaxRam\"));\n\n return getPurchaseServerMaxRam();\n },\n getPurchasedServerCost: function (ram: any): any {\n updateDynamicRam(\"getPurchasedServerCost\", getRamCost(\"getPurchasedServerCost\"));\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", () => `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (name: any, ram: any): any {\n updateDynamicRam(\"purchaseServer\", getRamCost(\"purchaseServer\"));\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (Player.purchasedServers.length >= getPurchaseServerLimit()) {\n workerScript.log(\n \"purchaseServer\",\n () =>\n `You have reached the maximum limit of ${getPurchaseServerLimit()} servers. You cannot purchase any more.`,\n );\n return \"\";\n }\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: ram='${ram}'`);\n return \"\";\n }\n\n if (Player.money < cost) {\n workerScript.log(\n \"purchaseServer\",\n () => `Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return \"\";\n }\n const newServ = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram,\n });\n AddToAllServers(newServ);\n\n Player.purchasedServers.push(newServ.hostname);\n const homeComputer = Player.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n Player.loseMoney(cost, \"servers\");\n workerScript.log(\n \"purchaseServer\",\n () => `Purchased new server with hostname '${newServ.hostname}' for ${numeralWrapper.formatMoney(cost)}`,\n );\n return newServ.hostname;\n },\n deleteServer: function (name: any): any {\n updateDynamicRam(\"deleteServer\", getRamCost(\"deleteServer\"));\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n const server = GetServer(hostnameStr);\n if (!(server instanceof Server)) {\n workerScript.log(\"deleteServer\", () => `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", () => \"Cannot delete non-purchased server.\");\n return false;\n }\n\n const hostname = server.hostname;\n\n // Can't delete server you're currently connected to\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", () => \"You are currently connected to the server you are trying to delete.\");\n return false;\n }\n\n // A server cannot delete itself\n if (hostname === workerScript.hostname) {\n workerScript.log(\"deleteServer\", () => \"Cannot delete the server this script is running on.\");\n return false;\n }\n\n // Delete all scripts running on server\n if (server.runningScripts.length > 0) {\n workerScript.log(\n \"deleteServer\",\n () => `Cannot delete server '${hostname}' because it still has scripts running.`,\n );\n return false;\n }\n\n // Delete from player's purchasedServers array\n let found = false;\n for (let i = 0; i < Player.purchasedServers.length; ++i) {\n if (hostname == Player.purchasedServers[i]) {\n found = true;\n Player.purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\n \"deleteServer\",\n () => `Could not identify server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n }\n\n // Delete from all servers\n DeleteServer(hostname);\n\n // Delete from home computer\n found = false;\n const homeComputer = Player.getHomeComputer();\n for (let i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (hostname == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", () => `Deleted server '${hostnameStr}`);\n return true;\n }\n }\n // Wasn't found on home computer\n workerScript.log(\n \"deleteServer\",\n () => `Could not find server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n },\n getPurchasedServers: function (): any {\n updateDynamicRam(\"getPurchasedServers\", getRamCost(\"getPurchasedServers\"));\n const res: string[] = [];\n Player.purchasedServers.forEach(function (hostname) {\n res.push(hostname);\n });\n return res;\n },\n writePort: function (port: any, data: any = \"\"): any {\n // Write to port\n // Port 1-10\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"writePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"writePort\",\n `Trying to write to invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"writePort\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return Promise.resolve(iport.write(data));\n },\n write: function (port: any, data: any = \"\", mode: any = \"a\"): any {\n updateDynamicRam(\"write\", getRamCost(\"write\"));\n if (isString(port)) {\n // Write to script or text file\n let fn = port;\n if (!isValidFilePath(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = removeLeadingSlash(fn);\n }\n\n // Coerce 'data' to be a string\n try {\n data = String(data);\n } catch (e: any) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n // Create a new script\n script = new Script(fn, data, server.hostname, server.scripts);\n server.scripts.push(script);\n return script.updateRamUsage(server.scripts);\n }\n mode === \"w\" ? (script.code = data) : (script.code += data);\n return script.updateRamUsage(server.scripts);\n } else {\n // Write to text file\n const txtFile = getTextFile(fn, server);\n if (txtFile == null) {\n createTextFile(fn, data, server);\n return Promise.resolve();\n }\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n return Promise.resolve();\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWritePort: function (port: any, data: any = \"\"): any {\n updateDynamicRam(\"tryWritePort\", getRamCost(\"tryWritePort\"));\n if (!isNaN(port)) {\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return Promise.resolve(iport.tryWrite(data));\n } else {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Invalid argument: ${port}`);\n }\n },\n readPort: function (port: any): any {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"readPort\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"readPort\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n const x = iport.read();\n return x;\n },\n read: function (port: any): any {\n updateDynamicRam(\"read\", getRamCost(\"read\"));\n if (isString(port)) {\n // Read from script or text file\n const fn = port;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Read from script\n const script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n return \"\";\n }\n return script.code;\n } else {\n // Read from text file\n const txtFile = getTextFile(fn, server);\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (port: any): any {\n updateDynamicRam(\"peek\", getRamCost(\"peek\"));\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\n \"peek\",\n `Invalid argument. Must be a port number between 1 and ${CONSTANTS.NumNetscriptPorts}, is ${port}`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"peek\",\n `Invalid argument. Must be a port number between 1 and ${CONSTANTS.NumNetscriptPorts}, is ${port}`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"peek\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n const x = iport.peek();\n return x;\n },\n clear: function (file: any): any {\n updateDynamicRam(\"clear\", getRamCost(\"clear\"));\n if (isString(file)) {\n // Clear text file\n const fn = file;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n const txtFile = getTextFile(fn, server);\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${file}`);\n }\n return 0;\n },\n clearPort: function (port: any): any {\n // Clear port\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"clear\",\n `Trying to clear invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"clear\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport.clear();\n },\n getPortHandle: function (port: any): any {\n updateDynamicRam(\"getPortHandle\", getRamCost(\"getPortHandle\"));\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\n \"getPortHandle\",\n `Invalid port: ${port} Must be an integer between 1 and ${CONSTANTS.NumNetscriptPorts}.`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"getPortHandle\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport;\n },\n rm: function (fn: any, hostname: any): any {\n updateDynamicRam(\"rm\", getRamCost(\"rm\"));\n\n if (hostname == null || hostname === \"\") {\n hostname = workerScript.hostname;\n }\n const s = safeGetServer(hostname, \"rm\");\n\n const status = s.removeFile(fn);\n if (!status.res) {\n workerScript.log(\"rm\", () => status.msg + \"\");\n }\n\n return status.res;\n },\n scriptRunning: function (scriptname: any, hostname: any): any {\n updateDynamicRam(\"scriptRunning\", getRamCost(\"scriptRunning\"));\n const server = safeGetServer(hostname, \"scriptRunning\");\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n return false;\n },\n scriptKill: function (scriptname: any, hostname: any): any {\n updateDynamicRam(\"scriptKill\", getRamCost(\"scriptKill\"));\n const server = safeGetServer(hostname, \"scriptKill\");\n let suc = false;\n for (let i = 0; i < server.runningScripts.length; i++) {\n if (server.runningScripts[i].filename == scriptname) {\n killWorkerScript(server.runningScripts[i], server.hostname);\n suc = true;\n i--;\n }\n }\n return suc;\n },\n getScriptName: function (): any {\n return workerScript.name;\n },\n getScriptRam: function (scriptname: any, hostname: any = workerScript.hostname): any {\n updateDynamicRam(\"getScriptRam\", getRamCost(\"getScriptRam\"));\n const server = safeGetServer(hostname, \"getScriptRam\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n return 0;\n },\n getRunningScript: function (fn: any, hostname: any, ...args: any[]): any {\n updateDynamicRam(\"getRunningScript\", getRamCost(\"getRunningScript\"));\n\n let runningScript;\n if (fn === undefined && hostname === undefined && args.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n runningScript = getRunningScript(fn, hostname, \"getRunningScript\", args);\n }\n if (runningScript === null) return null;\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads,\n };\n },\n getHackTime: function (hostname: any): any {\n updateDynamicRam(\"getHackTime\", getRamCost(\"getHackTime\"));\n const server = safeGetServer(hostname, \"getHackTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getHackTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return calculateHackingTime(server, Player) * 1000;\n },\n getGrowTime: function (hostname: any): any {\n updateDynamicRam(\"getGrowTime\", getRamCost(\"getGrowTime\"));\n const server = safeGetServer(hostname, \"getGrowTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getGrowTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return calculateGrowTime(server, Player) * 1000;\n },\n getWeakenTime: function (hostname: any): any {\n updateDynamicRam(\"getWeakenTime\", getRamCost(\"getWeakenTime\"));\n const server = safeGetServer(hostname, \"getWeakenTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getWeakenTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return calculateWeakenTime(server, Player) * 1000;\n },\n getScriptIncome: function (scriptname: any, hostname: any, ...args: any[]): any {\n updateDynamicRam(\"getScriptIncome\", getRamCost(\"getScriptIncome\"));\n if (arguments.length === 0) {\n const res = [];\n\n // First element is total income of all currently running scripts\n let total = 0;\n for (const script of workerScripts.values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n res.push(total);\n\n // Second element is total income you've earned from scripts since you installed Augs\n res.push(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptIncome\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptIncome\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname: any, hostname: any, ...args: any[]): any {\n updateDynamicRam(\"getScriptExpGain\", getRamCost(\"getScriptExpGain\"));\n if (arguments.length === 0) {\n let total = 0;\n for (const ws of workerScripts.values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n return total;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptExpGain\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptExpGain\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (n: any, format: any): any {\n if (isNaN(n) || isNaN(parseFloat(n)) || typeof format !== \"string\") {\n return \"\";\n }\n\n return numeralWrapper.format(parseFloat(n), format);\n },\n tFormat: function (milliseconds: any, milliPrecision: any = false): any {\n return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function (): any {\n updateDynamicRam(\"getTimeSinceLastAug\", getRamCost(\"getTimeSinceLastAug\"));\n return Player.playtimeSinceLastAug;\n },\n alert: function (message: any): void {\n dialogBoxCreate(message);\n },\n toast: function (message: any, variant: any = \"success\"): void {\n if (![\"success\", \"info\", \"warning\", \"error\"].includes(variant))\n throw new Error(`variant must be one of \"success\", \"info\", \"warning\", or \"error\"`);\n SnackbarEvents.emit(message, variant);\n },\n prompt: function (txt: any): any {\n if (!isString(txt)) {\n txt = JSON.stringify(txt);\n }\n\n return new Promise(function (resolve) {\n PromptEvent.emit({\n txt: txt,\n resolve: resolve,\n });\n });\n },\n wget: async function (url: any, target: any, hostname: any = workerScript.hostname): Promise {\n if (!isScriptFilename(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", () => `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n const s = safeGetServer(hostname, \"wget\");\n return new Promise(function (resolve) {\n $.get(\n url,\n function (data) {\n let res;\n if (isScriptFilename(target)) {\n res = s.writeToScriptFile(target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n if (!res.success) {\n workerScript.log(\"wget\", () => \"Failed.\");\n return resolve(false);\n }\n if (res.overwritten) {\n workerScript.log(\n \"wget\",\n () => `Successfully retrieved content and overwrote '${target}' on '${hostname}'`,\n );\n return resolve(true);\n }\n workerScript.log(\"wget\", () => `Successfully retrieved content to new file '${target}' on '${hostname}'`);\n return resolve(true);\n },\n \"text\",\n ).fail(function (e) {\n workerScript.log(\"wget\", () => JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function (): any {\n updateDynamicRam(\"getFavorToDonate\", getRamCost(\"getFavorToDonate\"));\n return Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n },\n getOwnedSourceFiles: function (): SourceFileLvl[] {\n helper.updateDynamicRam(\"getOwnedSourceFiles\", getRamCost(\"getOwnedSourceFiles\"));\n const res: SourceFileLvl[] = [];\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n res.push({\n n: Player.sourceFiles[i].n,\n lvl: Player.sourceFiles[i].lvl,\n } as SourceFileLvl);\n }\n return res;\n },\n getPlayer: function (): INetscriptPlayer {\n helper.updateDynamicRam(\"getPlayer\", getRamCost(\"getPlayer\"));\n\n const data = {\n hacking: Player.hacking,\n hp: Player.hp,\n max_hp: Player.max_hp,\n strength: Player.strength,\n defense: Player.defense,\n dexterity: Player.dexterity,\n agility: Player.agility,\n charisma: Player.charisma,\n intelligence: Player.intelligence,\n hacking_chance_mult: Player.hacking_chance_mult,\n hacking_speed_mult: Player.hacking_speed_mult,\n hacking_money_mult: Player.hacking_money_mult,\n hacking_grow_mult: Player.hacking_grow_mult,\n hacking_exp: Player.hacking_exp,\n strength_exp: Player.strength_exp,\n defense_exp: Player.defense_exp,\n dexterity_exp: Player.dexterity_exp,\n agility_exp: Player.agility_exp,\n charisma_exp: Player.charisma_exp,\n hacking_mult: Player.hacking_mult,\n strength_mult: Player.strength_mult,\n defense_mult: Player.defense_mult,\n dexterity_mult: Player.dexterity_mult,\n agility_mult: Player.agility_mult,\n charisma_mult: Player.charisma_mult,\n hacking_exp_mult: Player.hacking_exp_mult,\n strength_exp_mult: Player.strength_exp_mult,\n defense_exp_mult: Player.defense_exp_mult,\n dexterity_exp_mult: Player.dexterity_exp_mult,\n agility_exp_mult: Player.agility_exp_mult,\n charisma_exp_mult: Player.charisma_exp_mult,\n company_rep_mult: Player.company_rep_mult,\n faction_rep_mult: Player.faction_rep_mult,\n numPeopleKilled: Player.numPeopleKilled,\n money: Player.money,\n city: Player.city,\n location: Player.location,\n companyName: Player.companyName,\n crime_money_mult: Player.crime_money_mult,\n crime_success_mult: Player.crime_success_mult,\n isWorking: Player.isWorking,\n workType: Player.workType,\n currentWorkFactionName: Player.currentWorkFactionName,\n currentWorkFactionDescription: Player.currentWorkFactionDescription,\n workHackExpGainRate: Player.workHackExpGainRate,\n workStrExpGainRate: Player.workStrExpGainRate,\n workDefExpGainRate: Player.workDefExpGainRate,\n workDexExpGainRate: Player.workDexExpGainRate,\n workAgiExpGainRate: Player.workAgiExpGainRate,\n workChaExpGainRate: Player.workChaExpGainRate,\n workRepGainRate: Player.workRepGainRate,\n workMoneyGainRate: Player.workMoneyGainRate,\n workMoneyLossRate: Player.workMoneyLossRate,\n workHackExpGained: Player.workHackExpGained,\n workStrExpGained: Player.workStrExpGained,\n workDefExpGained: Player.workDefExpGained,\n workDexExpGained: Player.workDexExpGained,\n workAgiExpGained: Player.workAgiExpGained,\n workChaExpGained: Player.workChaExpGained,\n workRepGained: Player.workRepGained,\n workMoneyGained: Player.workMoneyGained,\n createProgramName: Player.createProgramName,\n createProgramReqLvl: Player.createProgramReqLvl,\n className: Player.className,\n crimeType: Player.crimeType,\n work_money_mult: Player.work_money_mult,\n hacknet_node_money_mult: Player.hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: Player.hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: Player.hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: Player.hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: Player.hacknet_node_level_cost_mult,\n hasWseAccount: Player.hasWseAccount,\n hasTixApiAccess: Player.hasTixApiAccess,\n has4SData: Player.has4SData,\n has4SDataTixApi: Player.has4SDataTixApi,\n bladeburner_max_stamina_mult: Player.bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: Player.bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: Player.bladeburner_analysis_mult,\n bladeburner_success_chance_mult: Player.bladeburner_success_chance_mult,\n bitNodeN: Player.bitNodeN,\n totalPlaytime: Player.totalPlaytime,\n playtimeSinceLastAug: Player.playtimeSinceLastAug,\n playtimeSinceLastBitnode: Player.playtimeSinceLastBitnode,\n jobs: {},\n factions: Player.factions.slice(),\n tor: Player.hasTorRouter(),\n };\n Object.assign(data.jobs, Player.jobs);\n return data;\n },\n atExit: function (f: any): void {\n if (typeof f !== \"function\") {\n throw makeRuntimeErrorMsg(\"atExit\", \"argument should be function\");\n }\n workerScript.atExit = f;\n },\n flags: Flags(workerScript.args),\n };\n\n // add undocumented functions\n const ns = {\n ...base,\n ...extra,\n };\n function getFunctionNames(obj: NS, prefix: string): string[] {\n const functionNames: string[] = [];\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(prefix + key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value, key + \".\"));\n }\n }\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(ns, \"\")].map((a) => [a, true]));\n\n return ns;\n}\n","/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\nimport { Stock } from \"./Stock\";\nimport { StockMarket } from \"./StockMarket\";\n\nimport { Company } from \"../Company/Company\";\nimport { Server } from \"../Server/Server\";\n\n// Change in second-order forecast due to hacks/grows\nexport const forecastForecastChangeFromHack = 0.1;\n\n// Change in second-order forecast due to company work\nexport const forecastForecastChangeFromCompanyWork = 0.001;\n\n/**\n * Potentially decreases a stock's second-order forecast when its corresponding\n * server is hacked. The chance of the hack decreasing the stock's second-order\n * forecast is dependent on what percentage of the server's money is hacked\n * @param {Server} server - Server being hack()ed\n * @param {number} moneyHacked - Amount of money stolen from the server\n */\nexport function influenceStockThroughServerHack(server: Server, moneyHacked: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\n}\n\n/**\n * Potentially increases a stock's second-order forecast when its corresponding\n * server is grown (grow()). The chance of the grow() to increase the stock's\n * second-order forecast is dependent on how much money is added to the server\n * @param {Server} server - Server being grow()n\n * @param {number} moneyHacked - Amount of money added to the server\n */\nexport function influenceStockThroughServerGrow(server: Server, moneyGrown: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\n}\n\n/**\n * Potentially increases a stock's second-order forecast when the player works for\n * its corresponding company.\n * @param {Company} company - Company being worked for\n * @param {number} performanceMult - Effectiveness of player's work. Affects influence\n * @param {number} cyclesOfWork - # game cycles of work being processed\n */\nexport function influenceStockThroughCompanyWork(\n company: Company,\n performanceMult: number,\n cyclesOfWork: number,\n): void {\n const compName = company.name;\n let stock: Stock | null = null;\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = StockMarket[compName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n if (Math.random() < 0.002 * cyclesOfWork) {\n const change = forecastForecastChangeFromCompanyWork * performanceMult;\n stock.changeForecastForecast(stock.otlkMagForecast + change);\n }\n}\n","import { Programs } from \"./Programs\";\nimport { Program } from \"./Program\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\n//Returns the programs this player can create.\nexport function getAvailableCreatePrograms(player: IPlayer): Program[] {\n const programs: Program[] = [];\n for (const key in Programs) {\n // Non-creatable program\n const create = Programs[key].create;\n if (create == null) continue;\n\n // Already has program\n if (player.hasProgram(Programs[key].name)) continue;\n\n // Does not meet requirements\n if (!create.req(player)) continue;\n\n programs.push(Programs[key]);\n }\n\n return programs;\n}\n","import { Company } from \"./Company\";\nimport { CompanyPosition } from \"./CompanyPosition\";\n\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\n\nexport function getJobRequirementText(company: Company, pos: CompanyPosition, tooltiptext = false): string {\n let reqText = \"\";\n const offset: number = company.jobStatReqOffset;\n const reqHacking: number = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength: number = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense: number = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma: number = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep: number = pos.requiredReputation;\n if (tooltiptext) {\n reqText = \"Requires:
\";\n reqText += reqHacking.toString() + \" hacking
\";\n reqText += reqStrength.toString() + \" strength
\";\n reqText += reqDefense.toString() + \" defense
\";\n reqText += reqDexterity.toString() + \" dexterity
\";\n reqText += reqAgility.toString() + \" agility
\";\n reqText += reqCharisma.toString() + \" charisma
\";\n reqText += reqRep.toString() + \" reputation\";\n } else {\n reqText = \"(Requires \";\n if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n return reqText;\n}\n","interface Position {\n row: number;\n column: number;\n}\n\nclass PositionTracker {\n positions: Map;\n\n constructor() {\n this.positions = new Map();\n }\n\n saveCursor(filename: string, pos: Position): void {\n this.positions.set(filename, pos);\n }\n\n getCursor(filename: string): Position {\n const position = this.positions.get(filename);\n if (!position) {\n return {\n row: -1,\n column: -1,\n };\n }\n return position;\n }\n}\n\nexport const CursorPositions: PositionTracker = new PositionTracker();\n","import React, { useState } from \"react\";\n\nimport { CinematicLine } from \"./CinematicLine\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n lines: string[];\n auto?: boolean;\n onDone?: () => void;\n}\n\nexport function CinematicText(props: IProps): React.ReactElement {\n const [i, setI] = useState(0);\n const [done, setDone] = useState(false);\n\n function advance(): void {\n const newI = i + 1;\n setI(newI);\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return (\n <>\n {props.lines.slice(0, i).map((line, i) => (\n {line}\n ))}\n {props.lines.length > i && }\n {!props.auto && props.onDone && done && }\n \n );\n}\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Button from \"@mui/material/Button\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { load } from \"../../db\";\nimport { IRouter } from \"../Router\";\nimport { download } from \"../../SaveObject\";\n\nexport let RecoveryMode = false;\n\nexport function ActivateRecoveryMode(): void {\n RecoveryMode = true;\n}\n\ninterface IProps {\n router: IRouter;\n}\n\nexport function RecoveryRoot({ router }: IProps): React.ReactElement {\n function recover(): void {\n RecoveryMode = false;\n router.toTerminal();\n }\n Settings.AutosaveInterval = 0;\n load().then((content) => {\n download(\"RECOVERY.json\", content);\n });\n return (\n <>\n RECOVERY MODE ACTIVATED\n \n There was an error loading your save file and the game went into recovery mode. In this mode saving is disabled\n and the game will automatically export your save file (to prevent corruption).\n \n At this point it is recommended to alert a developer.\n \n File an issue on github\n \n \n Make a reddit post\n \n \n Post in the #bug-report channel on Discord.\n \n Please include your save file.\n
\n
\n You can disable recovery mode now. But chances are the game will not work correctly.\n \n \n );\n}\n","import { getRandomInt } from \"./getRandomInt\";\n\n/**\n * Gets a random value in the range of a byte (0 - 255), or up to the maximum.\n * @param max The maximum value (up to 255).\n */\nexport function getRandomByte(max: number): number {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper: number = Math.max(Math.min(max, byteMaximum), 0);\n\n return getRandomInt(0, upper);\n}\n","import { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport const Growths: {\n [key: string]: (() => number) | undefined;\n [\"Tracking\"]: () => number;\n [\"Bounty Hunter\"]: () => number;\n [\"Retirement\"]: () => number;\n [\"Investigation\"]: () => number;\n [\"Undercover Operation\"]: () => number;\n [\"Sting Operation\"]: () => number;\n [\"Raid\"]: () => number;\n [\"Stealth Retirement Operation\"]: () => number;\n [\"Assassination\"]: () => number;\n} = {\n Tracking: () => getRandomInt(5, 75) / 10,\n \"Bounty Hunter\": () => getRandomInt(5, 75) / 10,\n Retirement: () => getRandomInt(5, 75) / 10,\n Investigation: () => getRandomInt(10, 40) / 10,\n \"Undercover Operation\": () => getRandomInt(10, 40) / 10,\n \"Sting Operation\": () => getRandomInt(3, 40) / 10,\n Raid: () => getRandomInt(2, 40) / 10,\n \"Stealth Retirement Operation\": () => getRandomInt(1, 20) / 10,\n Assassination: () => getRandomInt(1, 20) / 10,\n};\n","/**\n * Utility function that creates a \"city map\", which is an object where\n * each city is a key (property).\n *\n * This map uses the official name of the city, NOT its key in the 'Cities' object\n */\nimport { Cities } from \"./Cities\";\nimport { IMap } from \"../types\";\n\nexport function createCityMap(initValue: T): IMap {\n const map: IMap = {};\n const cities = Object.keys(Cities);\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n // round try JSON so to make sure none of the initial values have the same references.\n return JSON.parse(JSON.stringify(map));\n}\n","/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\n\nimport { Card } from \"./Card\";\n\nexport class Hand {\n constructor(readonly cards: readonly Card[]) {}\n\n addCards(...cards: Card[]): Hand {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i: number): Hand {\n if (i >= this.cards.length) {\n throw new Error(`Tried to remove invalid card from Hand by index: ${i}`);\n }\n\n return new Hand([...this.cards.slice().splice(i, 1)]);\n }\n}\n","/**\n * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\ntype IProps = {\n onClick: () => void;\n text: string;\n tooltip?: JSX.Element | null;\n};\n\nexport function StockTickerTxButton(props: IProps): React.ReactElement {\n return (\n {props.tooltip} : \"\"}>\n \n \n );\n}\n","/**\n * Abstract Base Class for any Server object\n */\nimport { CodingContract } from \"../CodingContracts\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { isValidFilePath } from \"../Terminal/DirectoryHelpers\";\nimport { TextFile } from \"../TextFile\";\nimport { IReturnStatus } from \"../types\";\n\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\ninterface writeResult {\n success: boolean;\n overwritten: boolean;\n}\n\nexport class BaseServer {\n // Coding Contract files on this server\n contracts: CodingContract[] = [];\n\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n cpuCores = 1;\n\n // Flag indicating whether the FTP port is open\n ftpPortOpen = false;\n\n // Flag indicating whether player has admin/root access to this server\n hasAdminRights = false;\n\n // Hostname. Must be unique\n hostname = \"\";\n\n // Flag indicating whether HTTP Port is open\n httpPortOpen = false;\n\n // IP Address. Must be unique\n ip = \"\";\n\n // Flag indicating whether player is curently connected to this server\n isConnectedTo = false;\n\n // RAM (GB) available on this server\n maxRam = 0;\n\n // Message files AND Literature files on this Server\n // For Literature files, this array contains only the filename (string)\n // For Messages, it contains the actual Message object\n // TODO Separate literature files into its own property\n messages: string[] = [];\n\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n organizationName = \"\";\n\n // Programs on this servers. Contains only the names of the programs\n programs: string[] = [];\n\n // RAM (GB) used. i.e. unavailable RAM\n ramUsed = 0;\n\n // RunningScript files on this server\n runningScripts: RunningScript[] = [];\n\n // Script files on this Server\n scripts: Script[] = [];\n\n // Contains the IP Addresses of all servers that are immediately\n // reachable from this one\n serversOnNetwork: string[] = [];\n\n // Flag indicating whether SMTP Port is open\n smtpPortOpen = false;\n\n // Flag indicating whether SQL Port is open\n sqlPortOpen = false;\n\n // Flag indicating whether the SSH Port is open\n sshPortOpen = false;\n\n // Text files on this server\n textFiles: TextFile[] = [];\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = false;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n this.ip = params.ip ? params.ip : createRandomIp();\n\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false;\n\n //Access information\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract: CodingContract): void {\n this.contracts.push(contract);\n }\n\n getContract(contractName: string): CodingContract | null {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n return null;\n }\n\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n getRunningScript(scriptName: string, scriptArgs: any[]): RunningScript | null {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && compareArrays(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n getScript(scriptName: string): Script | null {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n isRunning(fn: string): boolean {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract: CodingContract): void {\n if (contract instanceof CodingContract) {\n this.contracts = this.contracts.filter((c) => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter((c) => {\n return c.fn !== contract;\n });\n }\n }\n\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n removeFile(fn: string): IReturnStatus {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return { res: true };\n }\n }\n } else if (isScriptFilename(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\",\n };\n }\n\n this.scripts.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return { res: true };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return { res: true };\n }\n }\n }\n\n return { res: false, msg: \"No such file exists\" };\n }\n\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n runScript(script: RunningScript): void {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram: number): void {\n this.maxRam = ram;\n }\n\n updateRamUsed(ram: number, player: IPlayer): void {\n this.ramUsed = ram;\n }\n\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n writeToScriptFile(fn: string, code: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !isScriptFilename(fn)) {\n return ret;\n }\n\n // Check if the script already exists, and overwrite it if it does\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise, create a new script\n const newScript = new Script(fn, code, this.hostname, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n }\n\n // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n writeToTextFile(fn: string, txt: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n }\n\n // Check if the text file already exists, and overwrite if it does\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise create a new text file\n const newFile = new TextFile(fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { CodingContract, CodingContractTypes } from \"../../CodingContracts\";\nimport { CopyableText } from \"./CopyableText\";\nimport { Modal } from \"./Modal\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n c: CodingContract;\n onClose: () => void;\n onAttempt: (answer: string) => void;\n}\n\nexport const CodingContractEvent = new EventEmitter<[IProps]>();\n\nexport function CodingContractModal(): React.ReactElement {\n const [props, setProps] = useState(null);\n const [answer, setAnswer] = useState(\"\");\n\n useEffect(() => {\n CodingContractEvent.subscribe((props) => setProps(props));\n });\n if (props === null) return <>;\n\n function onChange(event: React.ChangeEvent): void {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (props === null) return;\n // React just won't cooperate on this one.\n // \"React.KeyboardEvent\" seems like the right type but\n // whatever ...\n const value = (event.target as any).value;\n\n if (event.keyCode === KEY.ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n close();\n }\n }\n\n function close(): void {\n if (props === null) return;\n props.onClose();\n setProps(null);\n }\n\n const contractType = CodingContractTypes[props.c.type];\n const description = [];\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries())\n description.push(\" }}>);\n return (\n \n \n \n You are attempting to solve a Coding Contract. You have {props.c.getMaxNumTries() - props.c.tries} tries\n remaining, after which the contract will self-destruct.\n \n
\n {description}\n
\n {\n props.onAttempt(answer);\n close();\n }}\n >\n Solve\n \n ),\n }}\n />\n
\n );\n}\n","// tslint:disable:max-file-line-count\n\n// This could actually be a JSON file as it should be constant metadata to be imported...\nimport { IMinMaxRange } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { LiteratureNames } from \"../../Literature/data/LiteratureNames\";\nimport { SpecialServers } from \"./SpecialServers\";\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\ninterface IServerMetadata {\n /**\n * When populated, the base security level of the server.\n */\n hackDifficulty?: number | IMinMaxRange;\n\n /**\n * The DNS name of the server.\n */\n hostname: string;\n\n /**\n * When populated, the files will be added to the server when created.\n */\n literature?: string[];\n\n /**\n * When populated, the exponent of 2^x amount of RAM the server has.\n * This should be in the range of 1-20, to match the Player's max RAM.\n */\n maxRamExponent?: number | IMinMaxRange;\n\n /**\n * How much money the server starts out with.\n */\n moneyAvailable: number | IMinMaxRange;\n\n /**\n * The number of network layers away from the `home` server.\n * This value is between 1 and 15.\n * If this is not populated, @specialName should be.\n */\n networkLayer?: number | IMinMaxRange;\n\n /**\n * The number of ports that must be opened before the player can execute NUKE.\n */\n numOpenPortsRequired: number;\n\n /**\n * The organization that the server belongs to.\n */\n organizationName: string;\n\n /**\n * The minimum hacking level before the player can run NUKE.\n */\n requiredHackingSkill: number | IMinMaxRange;\n\n /**\n * The growth factor for the server.\n */\n serverGrowth?: number | IMinMaxRange;\n\n /**\n * A \"unique\" server that has special implications when the player manually hacks it.\n */\n specialName?: string;\n\n [key: string]: any;\n}\n\n/**\n * The metadata for building up the servers on the network.\n */\nexport const serverMetadata: IServerMetadata[] = [\n {\n hackDifficulty: 99,\n hostname: \"ecorp\",\n moneyAvailable: {\n max: 70e9,\n min: 30e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050,\n },\n serverGrowth: 99,\n specialName: LocationName.AevumECorp,\n },\n {\n hackDifficulty: 99,\n hostname: \"megacorp\",\n moneyAvailable: {\n max: 60e9,\n min: 40e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100,\n },\n serverGrowth: 99,\n specialName: LocationName.Sector12MegaCorp,\n },\n {\n hackDifficulty: {\n max: 88,\n min: 72,\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.AevumBachmanAndAssociates,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 88,\n },\n hostname: \"blade\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900,\n },\n serverGrowth: {\n max: 85,\n min: 55,\n },\n specialName: LocationName.Sector12BladeIndustries,\n },\n {\n hackDifficulty: 99,\n hostname: \"nwo\",\n literature: [LiteratureNames.TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 95,\n min: 65,\n },\n specialName: LocationName.VolhavenNWO,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"clarkinc\",\n literature: [LiteratureNames.BeyondMan, LiteratureNames.CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumClarkeIncorporated,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 90,\n },\n hostname: \"omnitek\",\n literature: [LiteratureNames.CodedIntelligence, LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7,\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 95,\n },\n specialName: LocationName.VolhavenOmniTekIncorporated,\n },\n {\n hackDifficulty: {\n max: 75,\n min: 55,\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 75,\n },\n specialName: LocationName.Sector12FourSigma,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 95,\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 90,\n },\n specialName: LocationName.ChongqingKuaiGongInternational,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 83,\n },\n hostname: \"fulcrumtech\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7,\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 80,\n },\n specialName: LocationName.AevumFulcrumTechnologies,\n },\n {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100,\n },\n serverGrowth: 1,\n specialName: SpecialServers.FulcrumSecretTechnologies,\n },\n {\n hackDifficulty: {\n max: 92,\n min: 78,\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875,\n },\n serverGrowth: {\n max: 92,\n min: 68,\n },\n specialName: LocationName.IshimaStormTechnologies,\n },\n {\n hackDifficulty: {\n max: 96,\n min: 84,\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850,\n },\n serverGrowth: {\n max: 73,\n min: 47,\n },\n specialName: LocationName.NewTokyoDefComm,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875,\n },\n serverGrowth: {\n max: 75,\n min: 35,\n },\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"helios\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5,\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.VolhavenHeliosLabs,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"vitalife\",\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.NewTokyoVitaLife,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 95,\n min: 85,\n },\n specialName: LocationName.Sector12IcarusMicrosystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.Sector12UniversalEnergy,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"titan-labs\",\n literature: [LiteratureNames.CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n },\n {\n hackDifficulty: {\n max: 75,\n min: 65,\n },\n hostname: \"microdyne\",\n literature: [LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"taiyang-digital\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n specialName: LocationName.AevumGalacticCybersystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"aerocorp\",\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.AevumAeroCorp,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"omnia\",\n literature: [LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenOmniaCybersystems,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"zb-def\",\n literature: [LiteratureNames.SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 65,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"solaris\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.ChongqingSolarisSpaceSystems,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: \"deltaone\",\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 70,\n min: 50,\n },\n specialName: LocationName.Sector12DeltaOne,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: \"global-pharm\",\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: LocationName.NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.NewTokyoGlobalPharmaceuticals,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: LocationName.IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 85,\n min: 65,\n },\n specialName: LocationName.IshimaNovaMedical,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.VolhavenLexoCorp,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumRhoConstruction,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 50,\n },\n hostname: \"alpha-ent\",\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12AlphaEnterprises,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 50,\n min: 30,\n },\n specialName: LocationName.AevumPolice,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"rothman-uni\",\n literature: [\n LiteratureNames.SecretSocieties,\n LiteratureNames.TheFailedFrontier,\n LiteratureNames.TensionsInTechRace,\n ],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370,\n },\n serverGrowth: {\n max: 45,\n min: 35,\n },\n specialName: LocationName.Sector12RothmanUniversity,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 65,\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725,\n },\n serverGrowth: {\n max: 85,\n min: 75,\n },\n specialName: LocationName.VolhavenZBInstituteOfTechnology,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"summit-uni\",\n literature: [LiteratureNames.SecretSocieties, LiteratureNames.TheFailedFrontier, LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSummitUniversity,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenSysCoreSecurities,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 60,\n },\n hostname: \"catalyst\",\n literature: [LiteratureNames.TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 55,\n min: 25,\n },\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275,\n },\n serverGrowth: {\n max: 55,\n min: 45,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"comptek\",\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300,\n },\n serverGrowth: {\n max: 65,\n min: 45,\n },\n specialName: LocationName.VolhavenCompuTek,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"netlink\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumNetLinkTechnologies,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 35,\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250,\n },\n serverGrowth: {\n max: 65,\n min: 35,\n },\n },\n {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: LocationName.NewTokyoNoodleBar,\n },\n {\n hackDifficulty: 10,\n hostname: \"foodnstuff\",\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: LocationName.Sector12FoodNStuff,\n },\n {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10,\n },\n {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: LocationName.Sector12JoesGuns,\n },\n {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [LiteratureNames.TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [LiteratureNames.NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30,\n },\n {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [LiteratureNames.BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20,\n },\n {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35,\n },\n {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30,\n },\n {\n hackDifficulty: {\n max: 35,\n min: 25,\n },\n hostname: \"omega-net\",\n literature: [LiteratureNames.TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000,\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: LocationName.IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180,\n },\n serverGrowth: {\n max: 40,\n min: 30,\n },\n specialName: LocationName.IshimaOmegaSoftware,\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225,\n },\n serverGrowth: {\n max: 33,\n min: 27,\n },\n specialName: LocationName.AevumCrushFitnessGym,\n },\n {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: \"Iron Gym Network\",\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: LocationName.Sector12IronGym,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 45,\n min: 25,\n },\n specialName: LocationName.VolhavenMilleniumFitnessGym,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12PowerhouseGym,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSnapFitnessGym,\n },\n {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [LiteratureNames.SimulatedReality, LiteratureNames.TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.BitRunnersServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheBlackHandServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"NiteSec\",\n requiredHackingSkill: {\n max: 220,\n min: 202,\n },\n serverGrowth: 0,\n specialName: SpecialServers.NiteSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheDarkArmyServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"CyberSec\",\n requiredHackingSkill: {\n max: 60,\n min: 51,\n },\n serverGrowth: 0,\n specialName: SpecialServers.CyberSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [LiteratureNames.AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: SpecialServers.DaedalusServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: SpecialServers.WorldDaemon,\n },\n];\n","import React, { useState, useEffect } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const BitFlumeEvent = new EventEmitter<[]>();\n\nexport function BitFlumeModal(): React.ReactElement {\n const router = use.Router();\n const [open, setOpen] = useState(false);\n function flume(): void {\n router.toBitVerse(true, false);\n setOpen(false);\n }\n\n useEffect(() => BitFlumeEvent.subscribe(() => setOpen(true)), []);\n\n return (\n setOpen(false)}>\n \n WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.\n
\n
\n Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.\n
\n
\n
\n \n
\n );\n}\n","import React from \"react\";\nimport { IMap } from \"../types\";\n\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nexport class FactionInfo {\n /**\n * The multiplier to apply to augmentation base purchase price.\n */\n augmentationPriceMult: number;\n\n /**\n * The multiplier to apply to augmentation reputation base requirement.\n */\n augmentationRepRequirementMult: number;\n\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n enemies: string[];\n\n /**\n * The descriptive text to show on the faction's page.\n */\n infoText: JSX.Element;\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n offerFieldWork: boolean;\n\n /**\n * A flag indicating if the faction supports hacking missions to earn reputation.\n */\n offerHackingMission: boolean;\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n offerHackingWork: boolean;\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n offerSecurityWork: boolean;\n\n /**\n * Keep faction on install.\n */\n keep: boolean;\n\n /**\n * Special faction\n */\n special: boolean;\n\n constructor(\n infoText: JSX.Element,\n enemies: string[],\n offerHackingMission: boolean,\n offerHackingWork: boolean,\n offerFieldWork: boolean,\n offerSecurityWork: boolean,\n special: boolean,\n keep: boolean,\n ) {\n this.infoText = infoText;\n this.enemies = enemies;\n this.offerHackingMission = offerHackingMission;\n this.offerHackingWork = offerHackingWork;\n this.offerFieldWork = offerFieldWork;\n this.offerSecurityWork = offerSecurityWork;\n\n // These are always all 1 for now.\n this.augmentationPriceMult = 1;\n this.augmentationRepRequirementMult = 1;\n this.keep = keep;\n this.special = special;\n }\n\n offersWork(): boolean {\n return this.offerFieldWork || this.offerHackingMission || this.offerHackingWork || this.offerSecurityWork;\n }\n}\n\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\nexport const FactionInfos: IMap = {\n // Endgame\n Illuminati: new FactionInfo(\n (\n <>\n Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And\n from this chaos, we are the invisible hand that guides them to order.{\" \"}\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n Daedalus: new FactionInfo(\n <>Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.,\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n \"The Covenant\": new FactionInfo(\n (\n <>\n Surrender yourself. Give up your empty individuality to become part of something great, something eternal.\n Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.\n
\n
\n Only then can you discover immortality.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n // Megacorporations, each forms its own faction\n ECorp: new FactionInfo(\n (\n <>\n ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of\n Internet-related software and commercial hardware, ECorp makes the world's information universally accessible.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n MegaCorp: new FactionInfo(\n (\n <>\n MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have never even\n dreamed of. Our work fills the world's needs for food, water, power, and transporation on an unprecendented\n scale, in ways that no other company can.\n
\n
\n In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n \"Bachman & Associates\": new FactionInfo(\n (\n <>\n Where Law and Business meet - thats where we are.\n
\n
\n Legal Insight - Business Instinct - Innovative Experience.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n \"Blade Industries\": new FactionInfo(<>Augmentation is Salvation., [], true, true, true, true, false, true),\n\n NWO: new FactionInfo(\n (\n <>\n Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given\n purpose and direction in life. That is why they created God. And that is why they created civilization - not\n because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n \"Clarke Incorporated\": new FactionInfo(\n <>The Power of the Genome - Unlocked.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n \"OmniTek Incorporated\": new FactionInfo(\n <>Simply put, our mission is to design and build robots that make a difference.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n \"Four Sigma\": new FactionInfo(\n (\n <>\n The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by\n deep learning and innovative ideas. And improved by iteration. That's Four Sigma.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n \"KuaiGong International\": new FactionInfo(\n <>Dream big. Work hard. Make history.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n // Other Corporations\n \"Fulcrum Secret Technologies\": new FactionInfo(\n (\n <>\n The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it\n would be necessary to create them. And now we can.\n \n ),\n [],\n true,\n true,\n false,\n true,\n false,\n true,\n ),\n\n // Hacker groups\n BitRunners: new FactionInfo(\n (\n <>\n Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all\n transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to\n live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave\n behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be\n reconstructed. Transformed. Used.\n
\n
\n Those who run the bits, run the world.\n \n ),\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n \"The Black Hand\": new FactionInfo(\n (\n <>\n The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power.\n Technological power. And those at the top rule with an invisible hand. They built a society where the rich get\n richer, and everyone else suffers.\n
\n
\n So much pain. So many lives. Their darkness must end.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n // prettier-ignore\n NiteSec: new FactionInfo(<>\n{\" __..__ \"}
\n{\" _.nITESECNIt. \"}
\n{\" .-'NITESECNITESEc. \"}
\n{\" .' NITESECNITESECn \"}
\n{\" / NITESECNITESEC; \"}
\n{\" : :NITESECNITESEC; \"}
\n{\" ; $ NITESECNITESECN \"}
\n{\" : _, ,N'ITESECNITESEC \"}
\n{\" : .+^^`, : `NITESECNIT \"}
\n{\" ) /), `-,-=,NITESECNI \"}
\n{\" / ^ ,-;|NITESECN; \"}
\n{\" / _.' '-';NITESECN \"}
\n{\" ( , ,-''`^NITE' \"}
\n{\" )` :`. .' \"}
\n{\" )-- ; `- / \"}
\n{\" ' _.-' : \"}
\n{\" ( _.-' . \"}
\n{\" ------. \"}
\n{\" . \"}
\n{\" _.nIt \"}
\n{\" _.nITESECNi \"}
\n{\" nITESECNIT^' \"}
\n{\" NITE^' ___ \"}
\n{\" / .gP''''Tp. \"}
\n{\" : d' . `b \"}
\n{\" ; d' o `b ; \"}
\n{\" / d; `b| \"}
\n{\" /, $; @ `: \"}
\n{\" /' $/ ; \"}
\n{\" .' $/b o | \"}
\n{\" .' d$/$; : \"}
\n{\" / .d/$/$; , ; \"}
\n{\" d .dNITESEC $ | \"}
\n{\" :bp.__.gNITESEC/$ :$ ; \"}
\n{\" NITESECNITESECNIT /$b : \"}
,\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n // City factions, essentially governments\n Aevum: new FactionInfo(\n <>The Silicon City.,\n [\"Chongqing\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n Chongqing: new FactionInfo(\n <>Serve the People.,\n [\"Sector-12\", \"Aevum\", \"Volhaven\"],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n Ishima: new FactionInfo(\n <>The East Asian Order of the Future.,\n [\"Sector-12\", \"Aevum\", \"Volhaven\"],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n \"New Tokyo\": new FactionInfo(\n <>Asia's World City.,\n [\"Sector-12\", \"Aevum\", \"Volhaven\"],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n \"Sector-12\": new FactionInfo(\n <>The City of the Future.,\n [\"Chongqing\", \"New Tokyo\", \"Ishima\", \"Volhaven\"],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n Volhaven: new FactionInfo(\n <>Benefit, Honor, and Glory.,\n [\"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\"],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n\n // Criminal Organizations/Gangs\n \"Speakers for the Dead\": new FactionInfo(\n <>It is better to reign in Hell than to serve in Heaven.,\n [],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n\n \"The Dark Army\": new FactionInfo(\n <>The World doesn't care about right or wrong. It only cares about power.,\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n \"The Syndicate\": new FactionInfo(<>Honor holds you back., [], true, true, true, true, false, false),\n\n Silhouette: new FactionInfo(\n (\n <>\n Corporations have filled the void of power left behind by the collapse of Western government. The issue is\n they've become so big that you don't know who they're working for. And if you're employed at one of these\n corporations, you don't even know who you're working for.\n
\n
\n That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n Tetrads: new FactionInfo(\n <>Following the mandate of Heaven and carrying out the way.,\n [],\n false,\n false,\n true,\n true,\n false,\n false,\n ),\n\n \"Slum Snakes\": new FactionInfo(<>Slum Snakes rule!, [], false, false, true, true, false, false),\n\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n Netburners: new FactionInfo(<>{\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\"}, [], true, true, false, false, false, false),\n\n \"Tian Di Hui\": new FactionInfo(<>Obey Heaven and work righteously., [], true, true, false, true, false, false),\n\n CyberSec: new FactionInfo(\n (\n <>\n The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy\n that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of\n total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.\n \n ),\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n // Special Factions\n Bladeburners: new FactionInfo(\n (\n <>\n It's too bad they won't live. But then again, who does?\n
\n
\n Note that for this faction, reputation can only be gained through Bladeburner actions. Completing Bladeburner\n contracts/operations will increase your reputation.\n \n ),\n [],\n false,\n false,\n false,\n false,\n true,\n false,\n ),\n\n // prettier-ignore\n \"Church of the Machine God\": new FactionInfo(<>\n {\" `` \"}
\n {\" -odmmNmds: \"}
\n {\" `hNmo:..-omNh. \"}
\n {\" yMd` `hNh \"}
\n {\" mMd oNm \"}
\n {\" oMNo .mM/ \"}
\n {\" `dMN+ -mM+ \"}
\n {\" -mMNo -mN+ \"}
\n {\" .+- :mMNo/mN/ \"}
\n {\":yNMd. :NMNNN/ \"}
\n {\"-mMMMh. /NMMh` \"}
\n {\" .dMMMd. /NMMMy` \"}
\n {\" `yMMMd. /NNyNMMh` \"}
\n {\" `sMMMd. +Nm: +NMMh. \"}
\n {\" oMMMm- oNm: /NMMd. \"}
\n {\" +NMMmsMm- :mMMd. \"}
\n {\" /NMMMm- -mMMd. \"}
\n {\" /MMMm- -mMMd. \"}
\n {\" `sMNMMm- .mMmo \"}
\n {\" `sMd:hMMm. ./. \"}
\n {\" `yMy` `yNMd` \"}
\n {\" `hMs` oMMy \"}
\n {\" `hMh sMN- \"}
\n {\" /MM- .NMo \"}
\n {\" +MM: :MM+ \"}
\n {\" sNNo-.`.-omNy` \"}
\n {\" -smNNNNmdo- \"}
\n {\" `..` \"}

\n Many cultures predict an end to humanity in the near future, a final\n Armageddon that will end the world; but we disagree.\n

Note that for this faction, reputation can \n only be gained by charging Stanek's gift.,\n [],\n false,\n false,\n false,\n false,\n true,\n true,\n ),\n};\n","import React, { useState, useEffect } from \"react\";\nimport { joinFaction } from \"../FactionHelpers\";\nimport { Faction } from \"../Faction\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const InvitationEvent = new EventEmitter<[Faction]>();\n\nexport function InvitationModal(): React.ReactElement {\n const [faction, setFaction] = useState(null);\n const player = use.Player();\n function join(): void {\n if (faction === null) return;\n //Remove from invited factions\n const i = player.factionInvitations.findIndex((facName) => facName === faction.name);\n if (i === -1) {\n console.error(\"Could not find faction in Player.factionInvitations\");\n }\n joinFaction(faction);\n setFaction(null);\n }\n\n useEffect(() => InvitationEvent.subscribe((faction) => setFaction(faction)), []);\n\n return (\n setFaction(null)}>\n You have received a faction invitation.\n \n Would you like to join {(faction || { name: \"\" }).name}?
\n
\n Warning: Joining this faction may prevent you from joining other factions during this run!\n
\n \n \n
\n );\n}\n","import { Literatures } from \"./Literatures\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function showLiterature(fn: string): void {\n const litObj = Literatures[fn];\n if (litObj == null) {\n return;\n }\n const txt = `${litObj.title}

${litObj.txt}`;\n dialogBoxCreate(txt);\n}\n","import { ITaskParams, ITerritory } from \"./ITaskParams\";\n\nexport class GangMemberTask {\n name: string;\n desc: string;\n\n isHacking: boolean;\n isCombat: boolean;\n\n baseRespect: number;\n baseWanted: number;\n baseMoney: number;\n\n hackWeight: number;\n strWeight: number;\n defWeight: number;\n dexWeight: number;\n agiWeight: number;\n chaWeight: number;\n\n difficulty: number;\n\n territory: ITerritory;\n\n // Defines tasks that Gang Members can work on\n constructor(name: string, desc: string, isHacking: boolean, isCombat: boolean, params: ITaskParams) {\n this.name = name;\n this.desc = desc;\n\n // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n this.isHacking = isHacking;\n this.isCombat = isCombat;\n\n // Base gain rates for respect/wanted/money\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0;\n\n // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\n this.hackWeight = params.hackWeight ? params.hackWeight : 0;\n this.strWeight = params.strWeight ? params.strWeight : 0;\n this.defWeight = params.defWeight ? params.defWeight : 0;\n this.dexWeight = params.dexWeight ? params.dexWeight : 0;\n this.agiWeight = params.agiWeight ? params.agiWeight : 0;\n this.chaWeight = params.chaWeight ? params.chaWeight : 0;\n\n if (\n Math.round(\n this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight,\n ) != 100\n ) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n }\n\n // 1 - 100\n this.difficulty = params.difficulty ? params.difficulty : 1;\n\n // Territory Factors. Exponential factors that dictate how territory affects gains\n // Formula: Territory Mutiplier = (Territory * 100) ^ factor / 100\n // So factor should be > 1 if something should scale exponentially with territory\n // and should be < 1 if it should have diminshing returns\n this.territory = params.territory ? params.territory : { money: 1, respect: 1, wanted: 1 };\n }\n}\n","export class PlayerOwnedSourceFile {\n // Source-File level\n lvl = 1;\n\n // Source-File number\n n = 1;\n\n constructor(n: number, level: number) {\n this.n = n;\n this.lvl = level;\n }\n}\n\nexport interface IPlayerOwnedSourceFile {\n lvl: number;\n n: number;\n}\n","import { RunningScript } from \"src/Script/RunningScript\";\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const recentScripts: RecentScript[] = [];\n\nexport function AddRecentScript(workerScript: WorkerScript): void {\n if (recentScripts.find((r) => r.pid === workerScript.pid)) return;\n recentScripts.unshift({\n filename: workerScript.name,\n args: workerScript.args,\n pid: workerScript.pid,\n timestamp: new Date(),\n\n runningScript: workerScript.scriptRef,\n });\n while (recentScripts.length > 50) {\n recentScripts.pop();\n }\n}\n\nexport interface RecentScript {\n filename: string;\n args: string[];\n pid: number;\n timestamp: Date;\n runningScript: RunningScript;\n}\n","import * as acorn from \"acorn\";\n/**\n * @license\n * JavaScript Interpreter\n *\n * Copyright 2013 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Interpreting JavaScript in JavaScript.\n * @author fraser@google.com (Neil Fraser)\n */\n(\"use strict\");\n\n/**\n * Create a new interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n * @param {Function=} opt_initFunc Optional initialization function. Used to\n * define APIs. When called it is passed the interpreter object and the\n * global scope object.\n * @param {Number} Bitburner-specific number used for determining exception line numbers\n * @constructor\n */\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = [];\n // Unique identifier for native functions. Used in serialization.\n this.functionCounter_ = 0;\n // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\n for (var methodName in this) {\n if (typeof this[methodName] === \"function\" && (m = methodName.match(stepMatch))) {\n this.stepFunctions_[m[1]] = this[methodName].bind(this);\n }\n }\n // Create and initialize the global scope.\n this.global = this.createScope(this.ast, null);\n // Run the polyfills.\n this.ast = acorn.parse(this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\n this.stripLocations_(this.ast, undefined, undefined);\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack = [state];\n this.run();\n this.value = undefined;\n // Point at the main program.\n this.ast = code;\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack.length = 0;\n this.stateStack[0] = state;\n // Get a handle on Acorn's node_t object. It's tricky to access.\n this.nodeConstructor = state.node.constructor;\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"stateStack\"] = this.stateStack;\n};\n\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true,\n};\n\n/**\n * Property descriptor of readonly properties.\n */\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false,\n};\n\n/**\n * Property descriptor of non-enumerable properties.\n */\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true,\n};\n\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false,\n};\n\n/**\n * Property descriptor of variables.\n */\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true,\n};\n\n/**\n * Unique symbol for indicating that a step has encountered an error, has\n * added it to the stack, and will be thrown within the user's program.\n * When STEP_ERROR is thrown in the JS-Interpreter, the error can be ignored.\n */\nInterpreter.STEP_ERROR = {};\n\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\nInterpreter.SCOPE_REFERENCE = {};\n\n/**\n * Unique symbol for indicating, when used as the value of the value\n * parameter in calls to setProperty and friends, that the value\n * should be taken from the property descriptor instead.\n */\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n\n/**\n * For cycle detection in array to string and error conversion;\n * see spec bug github.com/tc39/ecma262/issues/289\n * Since this is for atomic actions only, it can be a class property.\n */\nInterpreter.toStringCycles_ = [];\n\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n if (node == null || node.start == null) {\n return NaN;\n }\n try {\n code = code.substring(0, node.start);\n return (code.match(/\\n/g) || []).length + 1 - this.sourceCodeLineOffset;\n } catch (e) {\n return NaN;\n }\n};\n\n/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\n */\nInterpreter.prototype.getErrorLineNumberMessage = function (lineNumber) {\n if (isNaN(lineNumber)) {\n return \" (Unknown line number)\";\n } else if (lineNumber <= 0) {\n return \" (Error occurred in an imported function)\";\n } else {\n return (\n \" (Line Number \" +\n lineNumber +\n \". This line number is probably incorrect \" +\n \"if your script is importing any functions. This is being worked on)\"\n );\n }\n};\n\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n this.populateScope_(code, state.scope);\n // Append the new program to the old one.\n for (var i = 0, node; (node = code[\"body\"][i]); i++) {\n state.node[\"body\"].push(node);\n }\n state.done = false;\n};\n\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n if (!state) {\n return false;\n }\n var node = state.node,\n type = node[\"type\"];\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\n }\n try {\n var nextState = this.stepFunctions_[type](stack, state, node);\n } catch (e) {\n // Eat any step errors. They have been thrown on the stack.\n if (e !== Interpreter.STEP_ERROR) {\n // Uh oh. This is a real error in the JS-Interpreter. Rethrow.\n throw e;\n }\n }\n if (nextState) {\n stack.push(nextState);\n }\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n return true;\n};\n\n/**\n * Execute the interpreter to program completion. Vulnerable to infinite loops.\n * @return {boolean} True if a execution is asynchronously blocked,\n * false if no more instructions.\n */\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n return this.paused_;\n};\n\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initGlobalScope = function (scope) {\n // Initialize uneditable global properties.\n this.setProperty(scope, \"NaN\", NaN, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"Infinity\", Infinity, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"undefined\", undefined, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"window\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"this\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"self\", scope); // Editable.\n\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO);\n // Initialize global objects.\n this.initFunction(scope);\n this.initObject(scope);\n // Unable to set scope's parent prior (OBJECT did not exist).\n // Note that in a browser this would be 'Window', whereas in Node.js it would\n // be 'Object'. This interpreter is closer to Node in that it has no DOM.\n scope.proto = this.OBJECT_PROTO;\n this.setProperty(scope, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.initArray(scope);\n this.initString(scope);\n this.initBoolean(scope);\n this.initNumber(scope);\n this.initDate(scope);\n this.initRegExp(scope);\n this.initError(scope);\n this.initMath(scope);\n this.initJSON(scope);\n\n // Initialize global functions.\n var thisInterpreter = this;\n var func = this.createNativeFunction(function (x) {\n throw EvalError(\"Can't happen\");\n }, false);\n func.eval = true;\n this.setProperty(scope, \"eval\", func);\n\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n\n var strFunctions = [\n [escape, \"escape\"],\n [unescape, \"unescape\"],\n [decodeURI, \"decodeURI\"],\n [decodeURIComponent, \"decodeURIComponent\"],\n [encodeURI, \"encodeURI\"],\n [encodeURIComponent, \"encodeURIComponent\"],\n ];\n for (var i = 0; i < strFunctions.length; i++) {\n var wrapper = (function (nativeFunc) {\n return function (str) {\n try {\n return nativeFunc(str);\n } catch (e) {\n // decodeURI('%xy') will throw an error. Catch and rethrow.\n thisInterpreter.throwException(thisInterpreter.URI_ERROR, e.message);\n }\n };\n })(strFunctions[i][0]);\n this.setProperty(\n scope,\n strFunctions[i][1],\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"OBJECT\"] = this.OBJECT;\n this[\"OBJECT_PROTO\"] = this.OBJECT_PROTO;\n this[\"FUNCTION\"] = this.FUNCTION;\n this[\"FUNCTION_PROTO\"] = this.FUNCTION_PROTO;\n this[\"ARRAY\"] = this.ARRAY;\n this[\"ARRAY_PROTO\"] = this.ARRAY_PROTO;\n this[\"REGEXP\"] = this.REGEXP;\n this[\"REGEXP_PROTO\"] = this.REGEXP_PROTO;\n this[\"DATE\"] = this.DATE;\n this[\"DATE_PROTO\"] = this.DATE_PROTO;\n // The following properties are obsolete. Do not use.\n this[\"UNDEFINED\"] = undefined;\n this[\"NULL\"] = null;\n this[\"NAN\"] = NaN;\n this[\"TRUE\"] = true;\n this[\"FALSE\"] = false;\n this[\"STRING_EMPTY\"] = \"\";\n this[\"NUMBER_ZERO\"] = 0;\n this[\"NUMBER_ONE\"] = 1;\n\n // Run any user-provided initialization.\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/;\n // Function constructor.\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Function().\n var newFunc = this;\n } else {\n // Called as Function().\n var newFunc = thisInterpreter.createObjectProto(thisInterpreter.FUNCTION_PROTO);\n }\n if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n argsStr = args.join(\", \");\n }\n // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n newFunc.parentScope = thisInterpreter.global;\n // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n try {\n var ast = acorn.parse(\"(function(\" + argsStr + \") {\" + code + \"})\", Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code: \" + e.message);\n }\n if (ast[\"body\"].length !== 1) {\n // Function('a', 'return a + 6;}; {alert(1);');\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code in function body.\");\n }\n newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n\n this.setProperty(scope, \"Function\", this.FUNCTION);\n // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper;\n\n // Configure Function.prototype.\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.FUNCTION_PROTO.nativeFunc = function () {};\n this.FUNCTION_PROTO.nativeFunc.id = this.functionCounter_++;\n this.setProperty(this.FUNCTION_PROTO, \"length\", 0, Interpreter.READONLY_DESCRIPTOR);\n\n var boxThis = function (value) {\n // In non-strict mode 'this' must be an object.\n if ((!value || !value.isObject) && !thisInterpreter.getScope().strict) {\n if (value === undefined || value === null) {\n // 'Undefined' and 'null' are changed to global object.\n value = thisInterpreter.global;\n } else {\n // Primitives must be boxed in non-strict mode.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n value = box;\n }\n }\n return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to apply a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n if (args !== null && args !== undefined) {\n if (args.isObject) {\n state.arguments_ = thisInterpreter.arrayPseudoToNative(args);\n } else {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"CreateListFromArrayLike called on non-object\");\n }\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg /*, var_args */) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to call a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\",\n \"{configurable: true, writable: true, value:\",\n \"function(oThis) {\",\n \"if (typeof this !== 'function') {\",\n \"throw TypeError('What is trying to be bound is not callable');\",\n \"}\",\n \"var aArgs = Array.prototype.slice.call(arguments, 1),\",\n \"fToBind = this,\",\n \"fNOP = function() {},\",\n \"fBound = function() {\",\n \"return fToBind.apply(this instanceof fNOP\",\n \"? this\",\n \": oThis,\",\n \"aArgs.concat(Array.prototype.slice.call(arguments)));\",\n \"};\",\n \"if (this.prototype) {\",\n \"fNOP.prototype = this.prototype;\",\n \"}\",\n \"fBound.prototype = new fNOP();\",\n \"return fBound;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n wrapper = function () {\n return this.toString();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"toString\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n wrapper = function () {\n return this.valueOf();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"valueOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Object constructor.\n wrapper = function (value) {\n if (value === undefined || value === null) {\n // Create a new object.\n if (thisInterpreter.calledWithNew()) {\n // Called as new Object().\n return this;\n } else {\n // Called as Object().\n return thisInterpreter.createObjectProto(thisInterpreter.OBJECT_PROTO);\n }\n }\n if (!value.isObject) {\n // Wrap the value as an object.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n return box;\n }\n // Return the provided object.\n return value;\n };\n this.OBJECT = this.createNativeFunction(wrapper, true);\n // Throw away the created prototype and use the root prototype.\n this.setProperty(this.OBJECT, \"prototype\", this.OBJECT_PROTO);\n this.setProperty(this.OBJECT_PROTO, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(scope, \"Object\", this.OBJECT);\n\n /**\n * Checks if the provided value is null or undefined.\n * If so, then throw an error in the call stack.\n * @param {Interpreter.Value} value Value to check.\n */\n var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n };\n\n // Static methods on Object.\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyNames\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n if (obj.isObject) {\n obj = obj.properties;\n }\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n this.setProperty(\n this.OBJECT,\n \"keys\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (proto) {\n // Support for the second argument is the responsibility of a polyfill.\n if (proto === null) {\n return thisInterpreter.createObjectProto(null);\n }\n if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n return thisInterpreter.createObjectProto(proto);\n };\n this.setProperty(\n this.OBJECT,\n \"create\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Add a polyfill to handle create's second argument.\n this.polyfills_.push(\n \"(function() {\",\n \"var create_ = Object.create;\",\n \"Object.create = function(proto, props) {\",\n \"var obj = create_(proto);\",\n \"props && Object.defineProperties(obj, props);\",\n \"return obj;\",\n \"};\",\n \"})();\",\n \"\",\n );\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Can't define property '\" + prop + \"', object is not extensible\",\n );\n }\n // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"defineProperty\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.polyfills_.push(\n // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\",\n \"var defineProperty_ = Object.defineProperty;\",\n \"Object.defineProperty = function(obj, prop, d1) {\",\n \"var d2 = {};\",\n \"if ('configurable' in d1) d2.configurable = d1.configurable;\",\n \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\",\n \"if ('writable' in d1) d2.writable = d1.writable;\",\n \"if ('value' in d1) d2.value = d1.value;\",\n \"if ('get' in d1) d2.get = d1.get;\",\n \"if ('set' in d1) d2.set = d1.set;\",\n \"return defineProperty_(obj, prop, d2);\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Object, 'defineProperties',\",\n \"{configurable: true, writable: true, value:\",\n \"function(obj, props) {\",\n \"var keys = Object.keys(props);\",\n \"for (var i = 0; i < keys.length; i++) {\",\n \"Object.defineProperty(obj, keys[i], props[keys[i]]);\",\n \"}\",\n \"return obj;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Object.getOwnPropertyDescriptor called on non-object\",\n );\n }\n prop = String(prop);\n if (!(prop in obj.properties)) {\n return undefined;\n }\n var descriptor = Object.getOwnPropertyDescriptor(obj.properties, prop);\n var getter = obj.getter[prop];\n var setter = obj.setter[prop];\n\n if (getter || setter) {\n descriptor.get = getter;\n descriptor.set = setter;\n delete descriptor.value;\n delete descriptor.writable;\n }\n // Preserve value, but remove it for the nativeToPseudo call.\n var value = descriptor.value;\n var hasValue = \"value\" in descriptor;\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n return pseudoDescriptor;\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyDescriptor\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n this.setProperty(\n this.OBJECT,\n \"getPrototypeOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n this.setProperty(\n this.OBJECT,\n \"isExtensible\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"preventExtensions\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Object.\n this.setNativeFunctionPrototype(this.OBJECT, \"toString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"toLocaleString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"valueOf\", Interpreter.Object.prototype.valueOf);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n return String(prop) in this.properties;\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"propertyIsEnumerable\", wrapper);\n\n wrapper = function (obj) {\n while (true) {\n // Note, circular loops shouldn't be possible.\n obj = thisInterpreter.getPrototype(obj);\n if (!obj) {\n // No parent; reached the top.\n return false;\n }\n if (obj === this) {\n return true;\n }\n }\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Array constructor.\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Array().\n var newArray = this;\n } else {\n // Called as Array().\n var newArray = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n }\n var first = arguments[0];\n if (arguments.length === 1 && typeof first === \"number\") {\n if (isNaN(Interpreter.legalArrayLength(first))) {\n thisInterpreter.throwException(thisInterpreter.RANGE_ERROR, \"Invalid array length\");\n }\n newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n newArray.properties.length = i;\n }\n return newArray;\n };\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY);\n\n // Static methods on Array.\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n this.setProperty(\n this.ARRAY,\n \"isArray\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Array.\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"pop\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.push.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"shift\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.unshift.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany /*, var_args*/) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"splice\", wrapper);\n\n wrapper = function (opt_begin, opt_end) {\n var list = Array.prototype.slice.call(this.properties, opt_begin, opt_end);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0;\n // Start by copying the current array.\n var iLength = thisInterpreter.getProperty(this, \"length\");\n for (var i = 0; i < iLength; i++) {\n if (thisInterpreter.hasProperty(this, i)) {\n var element = thisInterpreter.getProperty(this, i);\n list[length] = element;\n }\n length++;\n }\n // Loop through all arguments and copy them in.\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"concat\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.indexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callbackfn, thisArg) {\",\n \"if (!this || typeof callbackfn !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\",\n \"k++;\",\n \"}\",\n \"return true;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var res = [];\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t) {\",\n \"var val = t[i];\",\n \"if (fun.call(thisArg, val, i, t)) res.push(val);\",\n \"}\",\n \"}\",\n \"return res;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n \"if (!Array.prototype.find) {\",\n \"Object.defineProperty(Array.prototype, 'find', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return kValue;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return undefined;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Poly fill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n \"if (!Array.prototype.findIndex) {\",\n \"Object.defineProperty(Array.prototype, 'findIndex', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return k;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return -1;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Polyfill\n \"Object.defineProperty(Array.prototype, 'includes', {\",\n \"value: function(searchElement, fromIndex) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"// 1. Let O be ? ToObject(this value).\",\n \"var o = Object(this);\",\n '// 2. Let len be ? ToLength(? Get(O, \"length\")).',\n \"var len = o.length >>> 0;\",\n \"// 3. If len is 0, return false.\",\n \"if (len === 0) {\",\n \"return false;\",\n \"}\",\n \"// 4. Let n be ? ToInteger(fromIndex).\",\n \"// (If fromIndex is undefined, this step produces the value 0.)\",\n \"var n = fromIndex | 0;\",\n \"// 5. If n ≥ 0, then\",\n \"// a. Let k be n.\",\n \"// 6. Else n < 0,\",\n \"// a. Let k be len + n.\",\n \"// b. If k < 0, let k be 0.\",\n \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\",\n \"function sameValueZero(x, y) {\",\n \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\",\n \"}\",\n \"// 7. Repeat, while k < len\",\n \"while (k < len) {\",\n \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\",\n \"// b. If SameValueZero(searchElement, elementK) is true, return true.\",\n \"if (sameValueZero(o[k], searchElement)) {\",\n \"return true;\",\n \"}\",\n \"// c. Increase k by 1. \",\n \"k++;\",\n \"}\",\n \"// 8. Return false\",\n \"return false;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') new TypeError;\",\n \"var T, A, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"A = new Array(len);\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) A[k] = callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"return A;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = 0, value;\",\n \"if (arguments.length === 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k < len && !(k in t)) k++;\",\n \"if (k >= len) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k++];\",\n \"}\",\n \"for (; k < len; k++) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\",\n \"if (arguments.length >= 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k >= 0 && !(k in t)) k--;\",\n \"if (k < 0) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k--];\",\n \"}\",\n \"for (; k >= 0; k--) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (!this || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t && fun.call(thisArg, t[i], i, t)) {\",\n \"return true;\",\n \"}\",\n \"}\",\n \"return false;\",\n \"}\",\n \"});\",\n\n \"(function() {\",\n \"var sort_ = Array.prototype.sort;\",\n \"Array.prototype.sort = function(opt_comp) {\",\n // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\",\n \"return sort_.call(this);\",\n \"}\",\n // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\",\n \"var changes = 0;\",\n \"for (var j = 0; j < this.length - i - 1; j++) {\",\n \"if (opt_comp(this[j], this[j + 1]) > 0) {\",\n \"var swap = this[j];\",\n \"this[j] = this[j + 1];\",\n \"this[j + 1] = swap;\",\n \"changes++;\",\n \"}\",\n \"}\",\n \"if (!changes) break;\",\n \"}\",\n \"return this;\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Array.prototype, 'toLocaleString',\",\n \"{configurable: true, writable: true, value:\",\n \"function() {\",\n \"var out = [];\",\n \"for (var i = 0; i < this.length; i++) {\",\n \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\",\n \"}\",\n \"return out.join(',');\",\n \"}\",\n \"});\",\n \"\",\n );\n};\n\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // String constructor.\n wrapper = function (value) {\n value = String(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new String().\n this.data = value;\n return this;\n } else {\n // Called as String().\n return value;\n }\n };\n this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING);\n\n // Static methods on String.\n this.setProperty(\n this.STRING,\n \"fromCharCode\",\n this.createNativeFunction(String.fromCharCode, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on String.\n // Methods with exclusively primitive arguments.\n var functions = [\n \"charAt\",\n \"charCodeAt\",\n \"concat\",\n \"indexOf\",\n \"lastIndexOf\",\n \"slice\",\n \"substr\",\n \"substring\",\n \"toLocaleLowerCase\",\n \"toLocaleUpperCase\",\n \"toLowerCase\",\n \"toUpperCase\",\n \"trim\",\n ];\n for (var i = 0; i < functions.length; i++) {\n this.setNativeFunctionPrototype(this.STRING, functions[i], String.prototype[functions[i]]);\n }\n\n wrapper = function (compareString, locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return String(this).localeCompare(compareString, locales, options);\n };\n this.setNativeFunctionPrototype(this.STRING, \"localeCompare\", wrapper);\n\n wrapper = function (separator, limit) {\n if (thisInterpreter.isa(separator, thisInterpreter.REGEXP)) {\n separator = separator.data;\n }\n var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\n };\n this.setNativeFunctionPrototype(this.STRING, \"split\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\n };\n this.setNativeFunctionPrototype(this.STRING, \"match\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n return String(this).search(regexp);\n };\n this.setNativeFunctionPrototype(this.STRING, \"search\", wrapper);\n\n wrapper = function (substr, newSubstr) {\n // Support for function replacements is the responsibility of a polyfill.\n if (thisInterpreter.isa(substr, thisInterpreter.REGEXP)) {\n substr = substr.data;\n }\n return String(this).replace(substr, newSubstr);\n };\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper);\n // Add a polyfill to handle replace's second argument being a function.\n this.polyfills_.push(\n \"(function() {\",\n \"var replace_ = String.prototype.replace;\",\n \"String.prototype.replace = function(substr, newSubstr) {\",\n \"if (typeof newSubstr !== 'function') {\",\n // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\",\n \"}\",\n \"var str = this;\",\n \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\",\n \"var m = substr.exec(str);\",\n \"while (m) {\",\n \"m.push(m.index, str);\",\n \"var inject = newSubstr.apply(null, m);\",\n \"subs.push([m.index, m[0].length, inject]);\",\n \"m = substr.global ? substr.exec(str) : null;\",\n \"}\",\n \"for (var i = subs.length - 1; i >= 0; i--) {\",\n \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\",\n \"}\",\n \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\",\n \"if (i !== -1) {\",\n \"var inject = newSubstr(str.substr(i, substr.length), i, str);\",\n \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\",\n \"}\",\n \"}\",\n \"return str;\",\n \"};\",\n \"})();\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\",\n \"String.prototype.endsWith = function(search, this_len) {\",\n \"if (this_len === undefined || this_len > this.length) {\",\n \"this_len = this.length;\",\n \"}\",\n \"return this.substring(this_len - search.length, this_len) === search;\",\n \"};\",\n \"}\",\n\n //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\",\n \"String.prototype.includes = function(search, start) {\",\n \"'use strict';\",\n \"if (typeof start !== 'number') {\",\n \"start = 0;\",\n \"}\",\n \" \",\n \"if (start + search.length > this.length) {\",\n \"return false;\",\n \"} else {\",\n \"return this.indexOf(search, start) !== -1;\",\n \"}\",\n \"};\",\n \"}\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\",\n \"String.prototype.startsWith = function(search, pos) {\",\n \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\",\n \"};\",\n \"}\",\n\n \"\",\n );\n};\n\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Boolean constructor.\n wrapper = function (value) {\n value = Boolean(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new Boolean().\n this.data = value;\n return this;\n } else {\n // Called as Boolean().\n return value;\n }\n };\n this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Number constructor.\n wrapper = function (value) {\n value = Number(value);\n if (thisInterpreter.calledWithNew()) {\n // Called as new Number().\n this.data = value;\n return this;\n } else {\n // Called as Number().\n return value;\n }\n };\n this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n // Instance methods on Number.\n wrapper = function (fractionDigits) {\n try {\n return Number(this).toExponential(fractionDigits);\n } catch (e) {\n // Throws if fractionDigits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toExponential\", wrapper);\n\n wrapper = function (digits) {\n try {\n return Number(this).toFixed(digits);\n } catch (e) {\n // Throws if digits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toFixed\", wrapper);\n\n wrapper = function (precision) {\n try {\n return Number(this).toPrecision(precision);\n } catch (e) {\n // Throws if precision isn't within range (depends on implementation).\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toPrecision\", wrapper);\n\n wrapper = function (radix) {\n try {\n return Number(this).toString(radix);\n } catch (e) {\n // Throws if radix isn't within 2-36.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toString\", wrapper);\n\n wrapper = function (locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return Number(this).toLocaleString(locales, options);\n };\n this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Date constructor.\n wrapper = function (value, var_args) {\n if (!thisInterpreter.calledWithNew()) {\n // Called as Date().\n // Calling Date() as a function returns a string, no arguments are heeded.\n return Date();\n }\n // Called as new Date().\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE);\n\n // Static methods on Date.\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.setProperty(\n this.DATE,\n \"parse\",\n this.createNativeFunction(Date.parse, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n // Instance methods on Date.\n var functions = [\n \"getDate\",\n \"getDay\",\n \"getFullYear\",\n \"getHours\",\n \"getMilliseconds\",\n \"getMinutes\",\n \"getMonth\",\n \"getSeconds\",\n \"getTime\",\n \"getTimezoneOffset\",\n \"getUTCDate\",\n \"getUTCDay\",\n \"getUTCFullYear\",\n \"getUTCHours\",\n \"getUTCMilliseconds\",\n \"getUTCMinutes\",\n \"getUTCMonth\",\n \"getUTCSeconds\",\n \"getYear\",\n \"setDate\",\n \"setFullYear\",\n \"setHours\",\n \"setMilliseconds\",\n \"setMinutes\",\n \"setMonth\",\n \"setSeconds\",\n \"setTime\",\n \"setUTCDate\",\n \"setUTCFullYear\",\n \"setUTCHours\",\n \"setUTCMilliseconds\",\n \"setUTCMinutes\",\n \"setUTCMonth\",\n \"setUTCSeconds\",\n \"setYear\",\n \"toDateString\",\n \"toISOString\",\n \"toJSON\",\n \"toGMTString\",\n \"toLocaleDateString\",\n \"toLocaleString\",\n \"toLocaleTimeString\",\n \"toTimeString\",\n \"toUTCString\",\n ];\n for (var i = 0; i < functions.length; i++) {\n wrapper = (function (nativeFunc) {\n return function (var_args) {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n return this.data[nativeFunc].apply(this.data, args);\n };\n })(functions[i]);\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // RegExp constructor.\n wrapper = function (pattern, flags) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new RegExp().\n var rgx = this;\n } else {\n // Called as RegExp().\n var rgx = thisInterpreter.createObjectProto(thisInterpreter.REGEXP_PROTO);\n }\n pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"global\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"ignoreCase\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"multiline\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"source\",\n \"(?:)\",\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString();\n // Get lastIndex from wrapped regex, since this is settable.\n this.data.lastIndex = Number(thisInterpreter.getProperty(this, \"lastIndex\"));\n var match = this.data.exec(str);\n thisInterpreter.setProperty(this, \"lastIndex\", this.data.lastIndex);\n\n if (match) {\n var result = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n }\n // match has additional properties.\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n return null;\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this;\n // Error constructor.\n this.ERROR = this.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Error().\n var newError = this;\n } else {\n // Called as Error().\n var newError = thisInterpreter.createObject(thisInterpreter.ERROR);\n }\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n this.setProperty(scope, \"Error\", this.ERROR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"message\", \"\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"name\", \"Error\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n var createErrorSubclass = function (name) {\n var constructor = thisInterpreter.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new XyzError().\n var newError = this;\n } else {\n // Called as XyzError().\n var newError = thisInterpreter.createObject(constructor);\n }\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(\n constructor.properties[\"prototype\"],\n \"name\",\n name,\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n thisInterpreter.setProperty(scope, name, constructor);\n\n return constructor;\n };\n\n this.EVAL_ERROR = createErrorSubclass(\"EvalError\");\n this.RANGE_ERROR = createErrorSubclass(\"RangeError\");\n this.REFERENCE_ERROR = createErrorSubclass(\"ReferenceError\");\n this.SYNTAX_ERROR = createErrorSubclass(\"SyntaxError\");\n this.TYPE_ERROR = createErrorSubclass(\"TypeError\");\n this.URI_ERROR = createErrorSubclass(\"URIError\");\n};\n\n/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initMath = function (scope) {\n var thisInterpreter = this;\n var myMath = this.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"Math\", myMath);\n var mathConsts = [\"E\", \"LN2\", \"LN10\", \"LOG2E\", \"LOG10E\", \"PI\", \"SQRT1_2\", \"SQRT2\"];\n for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n var numFunctions = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"atan2\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"max\",\n \"min\",\n \"pow\",\n \"random\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\",\n ];\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(\n myMath,\n numFunctions[i],\n this.createNativeFunction(Math[numFunctions[i]], false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n};\n\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initJSON = function (scope) {\n var thisInterpreter = this;\n var myJSON = thisInterpreter.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"JSON\", myJSON);\n\n var wrapper = function (text) {\n try {\n var nativeObj = JSON.parse(text.toString());\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, e.message);\n }\n return thisInterpreter.nativeToPseudo(nativeObj);\n };\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n return str;\n };\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\n\n/**\n * Is an object of a certain class?\n * @param {Interpreter.Value} child Object to check.\n * @param {Interpreter.Object} constructor Constructor of object.\n * @return {boolean} True if object is the class or inherits from it.\n * False otherwise.\n */\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n var proto = constructor.properties[\"prototype\"];\n if (child === proto) {\n return true;\n }\n // The first step up the prototype chain is harder since the child might be\n // a primitive value. Subsequent steps can just follow the .proto property.\n child = this.getPrototype(child);\n while (child) {\n if (child === proto) {\n return true;\n }\n child = child.proto;\n }\n return false;\n};\n\n/**\n * Is a value a legal integer for an array length?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0;\n // Array length must be between 0 and 2^32-1 (inclusive).\n return n === Number(x) ? n : NaN;\n};\n\n/**\n * Is a value a legal integer for an array index?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0;\n // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\nInterpreter.Value;\n\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\n */\nInterpreter.Object = function (proto) {\n this.getter = Object.create(null);\n this.setter = Object.create(null);\n this.properties = Object.create(null);\n this.proto = proto;\n};\n\n/** @type {Interpreter.Object} */\nInterpreter.Object.prototype.proto = null;\n\n/** @type {boolean} */\nInterpreter.Object.prototype.isObject = true;\n\n/** @type {string} */\nInterpreter.Object.prototype.class = \"Object\";\n\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\nInterpreter.Object.prototype.data = null;\n\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n try {\n var strs = [];\n for (var i = 0; i < this.properties.length; i++) {\n var value = this.properties[i];\n strs[i] = value && value.isObject && cycles.indexOf(value) !== -1 ? \"...\" : value;\n }\n } finally {\n cycles.pop();\n }\n return strs.join(\",\");\n }\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n var name, message;\n // Bug: Does not support getters and setters for name or message.\n var obj = this;\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while ((obj = obj.proto));\n var obj = this;\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while ((obj = obj.proto));\n cycles.push(this);\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n return message ? name + \": \" + message : String(name);\n }\n\n // RegExp, Date, and boxed primitives.\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\n */\nInterpreter.Object.prototype.valueOf = function () {\n if (this.data === undefined || this.data === null || this.data instanceof RegExp) {\n return this; // An Object.\n }\n if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n return /** @type {(boolean|number|string)} */ (this.data); // Boxed primitive.\n};\n\n/**\n * Create a new data object based on a constructor's prototype.\n * @param {Interpreter.Object} constructor Parent constructor function,\n * or null if scope object.\n * @return {!Interpreter.Object} New data object.\n */\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\n\n/**\n * Create a new data object based on a prototype.\n * @param {Interpreter.Object} proto Prototype object.\n * @return {!Interpreter.Object} New data object.\n */\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n var obj = new Interpreter.Object(proto);\n // Functions have prototype objects.\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n }\n // Arrays have length.\n if (this.isa(obj, this.ARRAY)) {\n this.setProperty(obj, \"length\", 0, {\n configurable: false,\n enumerable: false,\n writable: true,\n });\n obj.class = \"Array\";\n }\n if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n return obj;\n};\n\n/**\n * Initialize a pseudo regular expression object based on a native regular\n * expression object.\n * @param {!Interpreter.Object} pseudoRegexp The existing object to set.\n * @param {!RegExp} nativeRegexp The native regular expression.\n */\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp;\n // lastIndex is settable, all others are read-only attributes\n this.setProperty(pseudoRegexp, \"lastIndex\", nativeRegexp.lastIndex, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"source\", nativeRegexp.source, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"global\", nativeRegexp.global, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"ignoreCase\", nativeRegexp.ignoreCase, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"multiline\", nativeRegexp.multiline, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n};\n\n/**\n * Create a new function.\n * @param {!Object} node AST node defining the function.\n * @param {!Object} scope Parent scope.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createFunction = function (node, scope) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.parentScope = scope;\n func.node = node;\n this.setProperty(func, \"length\", func.node[\"params\"].length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n\n/**\n * Create a new native function.\n * @param {!Function} nativeFunc JavaScript function.\n * @param {boolean=} opt_constructor If true, the function's\n * prototype will have its constructor property set to the function.\n * If false, the function cannot be called as a constructor (e.g. escape).\n * Defaults to undefined.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createNativeFunction = function (nativeFunc, opt_constructor) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.nativeFunc = nativeFunc;\n nativeFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", nativeFunc.length, Interpreter.READONLY_DESCRIPTOR);\n if (opt_constructor) {\n this.setProperty(func.properties[\"prototype\"], \"constructor\", func, Interpreter.NONENUMERABLE_DESCRIPTOR);\n } else if (opt_constructor === false) {\n func.illegalConstructor = true;\n this.setProperty(func, \"prototype\", undefined);\n }\n return func;\n};\n\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\n */\nInterpreter.prototype.createAsyncFunction = function (asyncFunc) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.asyncFunc = asyncFunc;\n asyncFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", asyncFunc.length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n\n/**\n * Converts from a native JS object or value to a JS interpreter object.\n * Can handle JSON-style values, does NOT handle cycles.\n * @param {*} nativeObj The native JS object to be converted.\n * @return {Interpreter.Value} The equivalent JS interpreter object.\n */\nInterpreter.prototype.nativeToPseudo = function (nativeObj) {\n if ((typeof nativeObj !== \"object\" && typeof nativeObj !== \"function\") || nativeObj === null) {\n return nativeObj;\n }\n\n if (nativeObj instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, nativeObj);\n return pseudoRegexp;\n }\n\n if (nativeObj instanceof Date) {\n var pseudoDate = this.createObjectProto(this.DATE_PROTO);\n pseudoDate.data = nativeObj;\n return pseudoDate;\n }\n\n if (nativeObj instanceof Function) {\n var interpreter = this;\n var wrapper = function () {\n return interpreter.nativeToPseudo(\n nativeObj.apply(\n interpreter,\n Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n }),\n ),\n );\n };\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < nativeObj.length; i++) {\n if (i in nativeObj) {\n this.setProperty(pseudoObj, i, this.nativeToPseudo(nativeObj[i]));\n }\n }\n } else {\n // Object.\n pseudoObj = this.createObjectProto(this.OBJECT_PROTO);\n for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n return pseudoObj;\n};\n\n/**\n * Converts from a JS interpreter object to native JS object.\n * Can handle JSON-style values, plus cycles.\n * @param {Interpreter.Value} pseudoObj The JS interpreter object to be\n * converted.\n * @param {Object=} opt_cycles Cycle detection (used in recursive calls).\n * @return {*} The equivalent native JS object or value.\n */\nInterpreter.prototype.pseudoToNative = function (pseudoObj, opt_cycles) {\n if ((typeof pseudoObj !== \"object\" && typeof pseudoObj !== \"function\") || pseudoObj === null) {\n return pseudoObj;\n }\n\n if (this.isa(pseudoObj, this.REGEXP)) {\n // Regular expression.\n return pseudoObj.data;\n }\n\n if (this.isa(pseudoObj, this.DATE)) {\n // Date.\n return pseudoObj.data;\n }\n\n var cycles = opt_cycles || {\n pseudo: [],\n native: [],\n };\n var i = cycles.pseudo.indexOf(pseudoObj);\n if (i !== -1) {\n return cycles.native[i];\n }\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\n for (var i = 0; i < length; i++) {\n if (this.hasProperty(pseudoObj, i)) {\n nativeObj[i] = this.pseudoToNative(this.getProperty(pseudoObj, i), cycles);\n }\n }\n } else {\n // Object.\n nativeObj = {};\n cycles.native.push(nativeObj);\n var val;\n for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\n\n/**\n * Converts from a native JS array to a JS interpreter array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Array} nativeArray The JS array to be converted.\n * @return {!Interpreter.Object} The equivalent JS interpreter array.\n */\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n return pseudoArray;\n};\n\n/**\n * Converts from a JS interpreter array to native JS array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Interpreter.Object} pseudoArray The JS interpreter array,\n * or JS interpreter object pretending to be an array.\n * @return {!Array} The equivalent native JS array.\n */\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n }\n // pseudoArray might be an object pretending to be an array. In this case\n // it's possible that length is non-existent, invalid, or smaller than the\n // largest defined numeric property. Set length explicitly here.\n nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\n\n/**\n * Look up the prototype for this value.\n * @param {Interpreter.Value} value Data object.\n * @return {Interpreter.Object} Prototype object, null if none.\n */\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n if (value) {\n return value.proto;\n }\n return null;\n};\n\n/**\n * Fetch a property value from a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line numbers\n * @return {Interpreter.Value} Property value (may be undefined).\n */\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n if (obj === undefined || obj === null) {\n let lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\n }\n if (name === \"length\") {\n // Special cases for magic length property.\n if (this.isa(obj, this.STRING)) {\n return String(obj).length;\n }\n } else if (name.charCodeAt(0) < 0x40) {\n // Might have numbers in there?\n // Special cases for string array indexing\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\n if (getter) {\n // Flag this function as being a getter and thus needing immediate\n // execution (rather than being the value of the property).\n getter.isGetter = true;\n return getter;\n }\n return obj.properties[name];\n }\n } while ((obj = this.getPrototype(obj)));\n return undefined;\n};\n\n/**\n * Does the named property exist on a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @return {boolean} True if property exists.\n */\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n name = String(name);\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while ((obj = this.getPrototype(obj)));\n return false;\n};\n\n/**\n * Set a property value on a data object.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Interpreter.Value} value New property value.\n * Use Interpreter.VALUE_IN_DESCRIPTOR if value is handled by\n * descriptor instead.\n * @param {Object=} opt_descriptor Optional descriptor object.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n if (\n opt_descriptor &&\n (\"get\" in opt_descriptor || \"set\" in opt_descriptor) &&\n (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)\n ) {\n this.throwException(\n this.TYPE_ERROR,\n \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\",\n );\n }\n var strict = !this.stateStack || this.getScope().strict;\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n return;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (name === \"length\" || (!isNaN(n) && n < String(obj).length)) {\n // Can't set length or letters on String objects.\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\",\n );\n }\n return;\n }\n }\n if (obj.class === \"Array\") {\n // Arrays have a magic length variable that is bound to the elements.\n var length = obj.properties.length;\n var i;\n if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n value = opt_descriptor.value;\n }\n value = Interpreter.legalArrayLength(value);\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\n if (!isNaN(i) && value <= i) {\n delete obj.properties[i];\n }\n }\n }\n } else if (!isNaN((i = Interpreter.legalArrayIndex(name)))) {\n // Increase length if this index is larger.\n obj.properties.length = Math.max(length, i + 1);\n }\n }\n if (obj.preventExtensions && !(name in obj.properties)) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't add property '\" + name + \"', object is not extensible\");\n }\n return;\n }\n if (opt_descriptor) {\n // Define the property.\n if (\"get\" in opt_descriptor) {\n if (opt_descriptor.get) {\n obj.getter[name] = opt_descriptor.get;\n } else {\n delete obj.getter[name];\n }\n }\n if (\"set\" in opt_descriptor) {\n if (opt_descriptor.set) {\n obj.setter[name] = opt_descriptor.set;\n } else {\n delete obj.setter[name];\n }\n }\n var descriptor = {};\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\n }\n if (\"writable\" in opt_descriptor) {\n descriptor.writable = opt_descriptor.writable;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n if (\"value\" in opt_descriptor) {\n descriptor.value = opt_descriptor.value;\n delete obj.getter[name];\n delete obj.setter[name];\n } else if (value !== Interpreter.VALUE_IN_DESCRIPTOR) {\n descriptor.value = value;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n try {\n Object.defineProperty(obj.properties, name, descriptor);\n } catch (e) {\n this.throwException(this.TYPE_ERROR, \"Cannot redefine property: \" + name);\n }\n } else {\n // Set the property.\n if (value === Interpreter.VALUE_IN_DESCRIPTOR) {\n throw ReferenceError(\"Value not specified.\");\n }\n // Determine the parent (possibly self) where the property is defined.\n var defObj = obj;\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\",\n );\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\",\n );\n }\n }\n }\n }\n};\n\n/**\n * Convenience method for adding a native function as a non-enumerable property\n * onto an object's prototype.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {!Function} wrapper Function object.\n */\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(\n obj.properties[\"prototype\"],\n name,\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n return scope;\n};\n\n/**\n * Create a new scope dictionary.\n * @param {!Object} node AST node defining the scope container\n * (e.g. a function).\n * @param {Interpreter.Object} parentScope Scope to link to.\n * @return {!Interpreter.Object} New scope.\n */\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n this.populateScope_(node, scope);\n\n // Determine if this scope starts with 'use strict'.\n scope.strict = false;\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n if (\n firstNode &&\n firstNode.expression &&\n firstNode.expression[\"type\"] === \"Literal\" &&\n firstNode.expression.value === \"use strict\"\n ) {\n scope.strict = true;\n }\n }\n return scope;\n};\n\n/**\n * Create a new special scope dictionary. Similar to createScope(), but\n * doesn't assume that the scope is for a function body.\n * This is used for 'catch' clauses and 'with' statements.\n * @param {!Interpreter.Object} parentScope Scope to link to.\n * @param {Interpreter.Object=} opt_scope Optional object to transform into\n * scope.\n * @return {!Interpreter.Object} New scope.\n */\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\n\n/**\n * Retrieves a value from the scope chain.\n * @param {string} name Name of variable.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has inherited properties and\n // could also have getters.\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n }\n // Typeof operator is unique: it can safely look at non-defined variables.\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\n\n/**\n * Sets a value to the current scope.\n * @param {string} name Name of variable.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has readonly properties and\n // could also have setters.\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\n\n/**\n * Create a new scope for the given node.\n * @param {!Object} node AST node (program or function).\n * @param {!Interpreter.Object} scope Scope dictionary to populate.\n * @private\n */\nInterpreter.prototype.populateScope_ = function (node, scope) {\n if (node[\"type\"] === \"VariableDeclaration\") {\n for (var i = 0; i < node[\"declarations\"].length; i++) {\n this.setProperty(scope, node[\"declarations\"][i][\"id\"][\"name\"], undefined, Interpreter.VARIABLE_DESCRIPTOR);\n }\n } else if (node[\"type\"] === \"FunctionDeclaration\") {\n this.setProperty(scope, node[\"id\"][\"name\"], this.createFunction(node, scope), Interpreter.VARIABLE_DESCRIPTOR);\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"FunctionExpression\") {\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"ExpressionStatement\") {\n return; // Expressions can't contain variable/function declarations.\n }\n var nodeClass = node[\"constructor\"];\n for (var name in node) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n if (Array.isArray(prop)) {\n for (var i = 0; i < prop.length; i++) {\n if (prop[i] && prop[i].constructor === nodeClass) {\n this.populateScope_(prop[i], scope);\n }\n }\n } else {\n if (prop.constructor === nodeClass) {\n this.populateScope_(prop, scope);\n }\n }\n }\n }\n};\n\n/**\n * Remove start and end values from AST, or set start and end values to a\n * constant value. Used to remove highlighting from polyfills and to set\n * highlighting in an eval to cover the entire eval expression.\n * @param {!Object} node AST node.\n * @param {number=} start Starting character of all nodes, or undefined.\n * @param {number=} end Ending character of all nodes, or undefined.\n * @private\n */\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\n }\n }\n};\n\n/**\n * Is the current state directly being called with as a construction with 'new'.\n * @return {boolean} True if 'new foo()', false if 'foo()'.\n */\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\n\n/**\n * Gets a value from the scope chain or from an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\nInterpreter.prototype.getValue = function (ref, node) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.getValueFromScope(ref[1], node);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.getProperty(ref[0], ref[1], node);\n }\n};\n\n/**\n * Sets a value to the scope chain or to an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\nInterpreter.prototype.setValue = function (ref, value) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.setValueToScope(ref[1], value);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.setProperty(ref[0], ref[1], value);\n }\n};\n\n/**\n * Completion Value Types.\n * @enum {number}\n */\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4,\n};\n\n/**\n * Throw an exception in the interpreter that can be handled by an\n * interpreter try/catch statement. If unhandled, a real exception will\n * be thrown. Can be called with either an error class and a message, or\n * with an actual object to be thrown.\n * @param {!Interpreter.Object} errorClass Type of error (if message is\n * provided) or the value to throw (if no message).\n * @param {string=} opt_message Message being thrown.\n */\nInterpreter.prototype.throwException = function (errorClass, opt_message, lineNumber) {\n if (opt_message === undefined) {\n var error = errorClass; // This is a value to throw, not an error class.\n } else {\n var error = this.createObject(errorClass);\n this.setProperty(error, \"message\", opt_message, Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n var lineNumErrorMsg;\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg);\n // Abort anything related to the current step.\n throw Interpreter.STEP_ERROR;\n};\n\n/**\n * Unwind the stack to the innermost relevant enclosing TryStatement,\n * For/ForIn/WhileStatement or Call/NewExpression. If this results in\n * the stack being completely unwound the thread will be terminated\n * and the appropriate error being thrown.\n * @param {Interpreter.Completion} type Completion type.\n * @param {Interpreter.Value=} value Value computed, returned or thrown.\n * @param {string=} label Target label for break or return.\n */\nInterpreter.prototype.unwind = function (type, value, label, lineNumberMsg = \"\") {\n if (type === Interpreter.Completion.NORMAL) {\n throw TypeError(\"Should not unwind for NORMAL completions\");\n }\n\n for (var stack = this.stateStack; stack.length > 0; stack.pop()) {\n var state = stack[stack.length - 1];\n switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = { type: type, value: value, label: label };\n return;\n case \"CallExpression\":\n case \"NewExpression\":\n if (type === Interpreter.Completion.RETURN) {\n state.value = value;\n return;\n } else if (type !== Interpreter.Completion.THROW) {\n throw Error(\"Unsynatctic break/continue not rejected by Acorn\");\n }\n }\n if (type === Interpreter.Completion.BREAK) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop || state.isSwitch) {\n stack.pop();\n return;\n }\n } else if (type === Interpreter.Completion.CONTINUE) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop) {\n return;\n }\n }\n }\n\n // Unhandled completion. Throw a real error.\n var realError;\n if (this.isa(value, this.ERROR)) {\n var errorTable = {\n EvalError: EvalError,\n RangeError: RangeError,\n ReferenceError: ReferenceError,\n SyntaxError: SyntaxError,\n TypeError: TypeError,\n URIError: URIError,\n };\n var name = this.getProperty(value, \"name\").toString();\n var message = this.getProperty(value, \"message\").valueOf();\n var type = errorTable[name] || Error;\n realError = type(message + lineNumberMsg);\n } else {\n realError = String(value) + lineNumberMsg;\n }\n throw realError;\n};\n\n/**\n * Create a call to a getter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @private\n */\nInterpreter.prototype.createGetter_ = function (func, left) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is explicitly provided (o).\n var funcThis = Array.isArray(left) ? left[0] : left;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [];\n return state;\n};\n\n/**\n * Create a call to a setter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value to set.\n * @private\n */\nInterpreter.prototype.createSetter_ = function (func, left, value) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is implicitly the global object (x).\n var funcThis = Array.isArray(left) ? left[0] : this.global;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [value];\n return state;\n};\n\n/**\n * Class for a state.\n * @param {!Object} node AST node for the state.\n * @param {!Interpreter.Object} scope Scope object for the state.\n * @constructor\n */\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\n if (!state.array_) {\n state.array_ = this.createObjectProto(this.ARRAY_PROTO);\n state.array_.properties.length = elements.length;\n } else {\n this.setProperty(state.array_, n, state.value);\n n++;\n }\n while (n < elements.length) {\n // Skip missing elements - they're not defined, not undefined.\n if (elements[n]) {\n state.n_ = n;\n return new Interpreter.State(elements[n], state.scope);\n }\n n++;\n }\n stack.pop();\n stack[stack.length - 1].value = state.array_;\n};\n\nInterpreter.prototype[\"stepAssignmentExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"left\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftReference_);\n }\n }\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n var value = state.leftValue_;\n var rightValue = state.value;\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n case \"+=\":\n value += rightValue;\n break;\n case \"-=\":\n value -= rightValue;\n break;\n case \"*=\":\n value *= rightValue;\n break;\n case \"/=\":\n value /= rightValue;\n break;\n case \"%=\":\n value %= rightValue;\n break;\n case \"<<=\":\n value <<= rightValue;\n break;\n case \">>=\":\n value >>= rightValue;\n break;\n case \">>>=\":\n value >>>= rightValue;\n break;\n case \"&=\":\n value &= rightValue;\n break;\n case \"^=\":\n value ^= rightValue;\n break;\n case \"|=\":\n value |= rightValue;\n break;\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n var setter = this.setValue(state.leftReference_, value);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n }\n // Return if no setter function.\n stack.pop();\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBinaryExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n case \"!=\":\n value = leftValue != rightValue;\n break;\n case \"===\":\n value = leftValue === rightValue;\n break;\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n case \">\":\n value = leftValue > rightValue;\n break;\n case \">=\":\n value = leftValue >= rightValue;\n break;\n case \"<\":\n value = leftValue < rightValue;\n break;\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n case \"+\":\n value = leftValue + rightValue;\n break;\n case \"-\":\n value = leftValue - rightValue;\n break;\n case \"*\":\n value = leftValue * rightValue;\n break;\n case \"/\":\n value = leftValue / rightValue;\n break;\n case \"%\":\n value = leftValue % rightValue;\n break;\n case \"&\":\n value = leftValue & rightValue;\n break;\n case \"|\":\n value = leftValue | rightValue;\n break;\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n case \"<<\":\n value = leftValue << rightValue;\n break;\n case \">>\":\n value = leftValue >> rightValue;\n break;\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\n case \"in\":\n if (!rightValue || !rightValue.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"'in' expects an object, not '\" + rightValue + \"'\", lineNum);\n }\n value = this.hasProperty(rightValue, leftValue);\n break;\n case \"instanceof\":\n if (!this.isa(rightValue, this.FUNCTION)) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"Right-hand side of instanceof is not an object\", lineNum);\n }\n value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBlockStatement\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n};\n\nInterpreter.prototype[\"stepBreakStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.BREAK, undefined, label);\n};\n\nInterpreter.prototype[\"stepCallExpression\"] = function (stack, state, node) {\n if (!state.doneCallee_) {\n state.doneCallee_ = 1;\n // Components needed to determine value of 'this'.\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\n if (func[0] === Interpreter.SCOPE_REFERENCE) {\n // (Globally or locally) named function. Is it named 'eval'?\n state.directEval_ = func[1] === \"eval\";\n } else {\n // Method function, 'this' is object (ignored if invoked as 'new').\n state.funcThis_ = func[0];\n }\n func = state.func_;\n if (func && typeof func === \"object\" && func.isGetter) {\n // Clear the getter flag and call the getter function.\n func.isGetter = false;\n state.doneCallee_ = 1;\n return this.createGetter_(/** @type {!Interpreter.Object} */ (func), state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n state.arguments_ = [];\n state.n_ = 0;\n }\n var func = state.func_;\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n }\n // Determine value of 'this' in function.\n if (node[\"type\"] === \"NewExpression\") {\n if (func.illegalConstructor) {\n // Illegal: new escape();\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a constructor\", lineNum);\n }\n // Constructor, 'this' is new object.\n var proto = func.properties[\"prototype\"];\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\n }\n state.funcThis_ = this.createObjectProto(proto);\n state.isConstructor = true;\n } else if (state.funcThis_ === undefined) {\n // Global function, 'this' is global object (or 'undefined' if strict).\n state.funcThis_ = state.scope.strict ? undefined : this.global;\n }\n state.doneArgs_ = true;\n }\n if (!state.doneExec_) {\n state.doneExec_ = true;\n if (!func || !func.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a function\", lineNum);\n }\n var funcNode = func.node;\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope);\n // Add all arguments.\n for (var i = 0; i < funcNode[\"params\"].length; i++) {\n var paramName = funcNode[\"params\"][i][\"name\"];\n var paramValue = state.arguments_.length > i ? state.arguments_[i] : undefined;\n this.setProperty(scope, paramName, paramValue);\n }\n // Build arguments variable.\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n this.setProperty(scope, \"arguments\", argsList);\n // Add the function's name (var x = function foo(){};)\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n if (name) {\n this.setProperty(scope, name, func);\n }\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\n if (typeof code !== \"string\") {\n // JS does not parse String objects:\n // eval(new String('1 + 1')) -> '1 + 1'\n state.value = code;\n } else {\n try {\n var ast = acorn.parse(code.toString(), Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"Invalid code: \" + e.message, lineNum);\n }\n var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]);\n // Create new scope and update it with definitions in eval().\n var scope = state.directEval_ ? state.scope : this.global;\n if (scope.strict) {\n // Strict mode get its own scope in eval.\n scope = this.createScope(ast, scope);\n } else {\n // Non-strict mode pollutes the current scope.\n this.populateScope_(ast, scope);\n }\n this.value = undefined; // Default value if no code.\n return new Interpreter.State(evalNode, scope);\n }\n } else if (func.nativeFunc) {\n state.value = func.nativeFunc.apply(state.funcThis_, state.arguments_);\n } else if (func.asyncFunc) {\n var thisInterpreter = this;\n var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\n };\n var argsWithCallback = state.arguments_.concat(callback);\n this.paused_ = true;\n func.asyncFunc.apply(state.funcThis_, argsWithCallback);\n return;\n } else {\n /* A child of a function is a function but is not callable. For example:\n var F = function() {};\n F.prototype = escape;\n var f = new F();\n f();\n */\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func.class + \" is not a function\", lineNum);\n }\n } else {\n // Execution complete. Put the return value on the stack.\n stack.pop();\n if (state.isConstructor && typeof state.value !== \"object\") {\n stack[stack.length - 1].value = state.funcThis_;\n } else {\n stack[stack.length - 1].value = state.value;\n }\n }\n};\n\nInterpreter.prototype[\"stepCatchClause\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n // Create an empty scope.\n var scope = this.createSpecialScope(state.scope);\n // Add the argument.\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue);\n // Execute catch clause.\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepConditionalExpression\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\n if (value && node[\"consequent\"]) {\n // Execute 'if' block.\n return new Interpreter.State(node[\"consequent\"], state.scope);\n } else if (!value && node[\"alternate\"]) {\n // Execute 'else' block.\n return new Interpreter.State(node[\"alternate\"], state.scope);\n }\n // eval('1;if(false){2}') -> undefined\n this.value = undefined;\n }\n stack.pop();\n if (node[\"type\"] === \"ConditionalExpression\") {\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepContinueStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.CONTINUE, undefined, label);\n};\n\nInterpreter.prototype[\"stepDebuggerStatement\"] = function (stack, state, node) {\n // Do nothing. May be overridden by developers.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepDoWhileStatement\"] = function (stack, state, node) {\n if (node[\"type\"] === \"DoWhileStatement\" && state.test_ === undefined) {\n // First iteration of do/while executes without checking test.\n state.value = true;\n state.test_ = true;\n }\n if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (!state.value) {\n // Done, exit loop.\n stack.pop();\n } else if (node[\"body\"]) {\n // Execute the body.\n state.test_ = false;\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepEmptyStatement\"] = function (stack, state, node) {\n stack.pop();\n};\n\nInterpreter.prototype[\"stepEvalProgram_\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n stack[stack.length - 1].value = this.value;\n};\n\nInterpreter.prototype[\"stepExpressionStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"expression\"], state.scope);\n }\n stack.pop();\n // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\n this.value = state.value;\n};\n\nInterpreter.prototype[\"stepForInStatement\"] = function (stack, state, node) {\n // First, initialize a variable if exists. Only do so once, ever.\n if (!state.doneInit_) {\n state.doneInit_ = true;\n if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(\n this.SYNTAX_ERROR,\n \"for-in loop variable declaration may not have an initializer.\",\n lineNum,\n );\n }\n // Variable initialization: for (var x = 4 in y)\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n }\n // Second, look up the object. Only do so once, ever.\n if (!state.doneObject_) {\n state.doneObject_ = true;\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n }\n // Third, find the property name for this iteration.\n if (state.name_ === undefined) {\n gotPropName: while (true) {\n if (state.object_ && state.object_.isObject) {\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_.properties);\n }\n while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n } else if (state.object_ !== null && state.object_ !== undefined) {\n // Primitive value (other than null or undefined).\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_);\n }\n while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n }\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n }\n // Fourth, find the variable\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\n if (left[\"type\"] === \"VariableDeclaration\") {\n // Inline variable declaration: for (var x in y)\n state.variable_ = [Interpreter.SCOPE_REFERENCE, left[\"declarations\"][0][\"id\"][\"name\"]];\n } else {\n // Arbitrary left side: for (foo().bar in y)\n state.variable_ = null;\n var nextState = new Interpreter.State(left, state.scope);\n nextState.components = true;\n return nextState;\n }\n }\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n // Fifth, set the variable.\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n }\n // Next step will be step three.\n state.name_ = undefined;\n // Reevaluate the variable since it could be a setter on the global object.\n state.doneVariable_ = false;\n state.doneSetter_ = false;\n // Sixth and finally, execute the body if there was one. this.\n if (node[\"body\"]) {\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepForStatement\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n if (mode === 0) {\n state.mode_ = 1;\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\n if (node[\"test\"] && !state.value) {\n // Done, exit loop.\n stack.pop();\n } else {\n // Execute the body.\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n } else if (mode === 3) {\n state.mode_ = 1;\n if (node[\"update\"]) {\n return new Interpreter.State(node[\"update\"], state.scope);\n }\n }\n};\n\nInterpreter.prototype[\"stepFunctionDeclaration\"] = function (stack, state, node) {\n // This was found and handled when the scope was populated.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepFunctionExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.createFunction(node, state.scope);\n};\n\nInterpreter.prototype[\"stepIdentifier\"] = function (stack, state, node) {\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n var value = this.getValueFromScope(node[\"name\"], node);\n // An identifier could be a getter if it's a property on the global object.\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var scope = state.scope;\n while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, this.global);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepIfStatement\"] = Interpreter.prototype[\"stepConditionalExpression\"];\n\nInterpreter.prototype[\"stepLabeledStatement\"] = function (stack, state, node) {\n // No need to hit this node again on the way back up the stack.\n stack.pop();\n // Note that a statement might have multiple labels.\n var labels = state.labels || [];\n labels.push(node[\"label\"][\"name\"]);\n var nextState = new Interpreter.State(node[\"body\"], state.scope);\n nextState.labels = labels;\n return nextState;\n};\n\nInterpreter.prototype[\"stepLiteral\"] = function (stack, state, node) {\n stack.pop();\n var value = node[\"value\"];\n if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepLogicalExpression\"] = function (stack, state, node) {\n if (node[\"operator\"] !== \"&&\" && node[\"operator\"] !== \"||\") {\n throw SyntaxError(\"Unknown logical operator: \" + node[\"operator\"]);\n }\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n if (!state.doneRight_) {\n if ((node[\"operator\"] === \"&&\" && !state.value) || (node[\"operator\"] === \"||\" && state.value)) {\n // Shortcut evaluation.\n stack.pop();\n stack[stack.length - 1].value = state.value;\n } else {\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n } else {\n stack.pop();\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepMemberExpression\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n }\n var propName;\n if (!node[\"computed\"]) {\n state.object_ = state.value;\n // obj.foo -- Just access 'foo' directly.\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value;\n // obj[foo] -- Compute value of 'foo'.\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, state.object_);\n }\n stack[stack.length - 1].value = value;\n }\n};\n\nInterpreter.prototype[\"stepNewExpression\"] = Interpreter.prototype[\"stepCallExpression\"];\n\nInterpreter.prototype[\"stepObjectExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var property = node[\"properties\"][n];\n if (!state.object_) {\n // First execution.\n state.object_ = this.createObjectProto(this.OBJECT_PROTO);\n state.properties_ = Object.create(null);\n } else {\n // Determine property name.\n var key = property[\"key\"];\n if (key[\"type\"] === \"Identifier\") {\n var propName = key[\"name\"];\n } else if (key[\"type\"] === \"Literal\") {\n var propName = key[\"value\"];\n } else {\n throw SyntaxError(\"Unknown object structure: \" + key[\"type\"]);\n }\n // Set the property computed in the previous execution.\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\n if (\"get\" in kinds || \"set\" in kinds) {\n // Set a property with a getter or setter.\n var descriptor = {\n configurable: true,\n enumerable: true,\n get: kinds[\"get\"],\n set: kinds[\"set\"],\n };\n this.setProperty(state.object_, key, null, descriptor);\n } else {\n // Set a normal property with a value.\n this.setProperty(state.object_, key, kinds[\"init\"]);\n }\n }\n stack.pop();\n stack[stack.length - 1].value = state.object_;\n};\n\nInterpreter.prototype[\"stepProgram\"] = function (stack, state, node) {\n var expression = node[\"body\"].shift();\n if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n state.done = true;\n // Don't pop the stateStack.\n // Leave the root scope on the tree in case the program is appended to.\n};\n\nInterpreter.prototype[\"stepReturnStatement\"] = function (stack, state, node) {\n if (node[\"argument\"] && !state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n }\n this.unwind(Interpreter.Completion.RETURN, state.value, undefined);\n};\n\nInterpreter.prototype[\"stepSequenceExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"expressions\"][n];\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n stack.pop();\n stack[stack.length - 1].value = state.value;\n};\n\nInterpreter.prototype[\"stepSwitchStatement\"] = function (stack, state, node) {\n if (!state.test_) {\n state.test_ = 1;\n return new Interpreter.State(node[\"discriminant\"], state.scope);\n }\n if (state.test_ === 1) {\n state.test_ = 2;\n // Preserve switch value between case tests.\n state.switchValue_ = state.value;\n state.defaultCase_ = -1;\n }\n\n while (true) {\n var index = state.index_ || 0;\n var switchCase = node[\"cases\"][index];\n if (!state.matched_ && switchCase && !switchCase[\"test\"]) {\n // Test on the default case is null.\n // Bypass (but store) the default case, and get back to it later.\n state.defaultCase_ = index;\n state.index_ = index + 1;\n continue;\n }\n if (!switchCase && !state.matched_ && state.defaultCase_ !== -1) {\n // Ran through all cases, no match. Jump to the default.\n state.matched_ = true;\n state.index_ = state.defaultCase_;\n continue;\n }\n if (switchCase) {\n if (!state.matched_ && !state.tested_ && switchCase[\"test\"]) {\n state.tested_ = true;\n return new Interpreter.State(switchCase[\"test\"], state.scope);\n }\n if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\n if (switchCase[\"consequent\"][n]) {\n state.isSwitch = true;\n state.n_ = n + 1;\n return new Interpreter.State(switchCase[\"consequent\"][n], state.scope);\n }\n }\n // Move on to next case.\n state.tested_ = false;\n state.n_ = 0;\n state.index_ = index + 1;\n } else {\n stack.pop();\n return;\n }\n }\n};\n\nInterpreter.prototype[\"stepThisExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.getValueFromScope(\"this\", node);\n};\n\nInterpreter.prototype[\"stepThrowStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n } else {\n this.throwException(state.value);\n }\n};\n\nInterpreter.prototype[\"stepTryStatement\"] = function (stack, state, node) {\n if (!state.doneBlock_) {\n state.doneBlock_ = true;\n return new Interpreter.State(node[\"block\"], state.scope);\n }\n if (state.cv && state.cv.type === Interpreter.Completion.THROW && !state.doneHandler_ && node[\"handler\"]) {\n state.doneHandler_ = true;\n var nextState = new Interpreter.State(node[\"handler\"], state.scope);\n nextState.throwValue = state.cv.value;\n state.cv = undefined; // This error has been handled, don't rethrow.\n return nextState;\n }\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n stack.pop();\n if (state.cv) {\n // There was no catch handler, or the catch/finally threw an error.\n // Throw the error up to a higher try.\n this.unwind(state.cv.type, state.cv.value, state.cv.label);\n }\n};\n\nInterpreter.prototype[\"stepUnaryExpression\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = node[\"operator\"] === \"delete\";\n return nextState;\n }\n stack.pop();\n var value = state.value;\n if (node[\"operator\"] === \"-\") {\n value = -value;\n } else if (node[\"operator\"] === \"+\") {\n value = +value;\n } else if (node[\"operator\"] === \"!\") {\n value = !value;\n } else if (node[\"operator\"] === \"~\") {\n value = ~value;\n } else if (node[\"operator\"] === \"delete\") {\n var result = true;\n // If value is not an array, then it is a primitive, or some other value.\n // If so, skip the delete and return true.\n if (Array.isArray(value)) {\n var obj = value[0];\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n var name = String(value[1]);\n try {\n delete obj.properties[name];\n } catch (e) {\n if (state.scope.strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot delete property '\" + name + \"' of '\" + obj + \"'\");\n } else {\n result = false;\n }\n }\n }\n value = result;\n } else if (node[\"operator\"] === \"typeof\") {\n value = value && value.class === \"Function\" ? \"function\" : typeof value;\n } else if (node[\"operator\"] === \"void\") {\n value = undefined;\n } else {\n throw SyntaxError(\"Unknown unary operator: \" + node[\"operator\"]);\n }\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepUpdateExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftSide_);\n }\n }\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n var leftValue = Number(state.leftValue_);\n var changeValue;\n if (node[\"operator\"] === \"++\") {\n changeValue = leftValue + 1;\n } else if (node[\"operator\"] === \"--\") {\n changeValue = leftValue - 1;\n } else {\n throw SyntaxError(\"Unknown update expression: \" + node[\"operator\"]);\n }\n var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n }\n // Return if no setter function.\n stack.pop();\n stack[stack.length - 1].value = returnValue;\n};\n\nInterpreter.prototype[\"stepVariableDeclaration\"] = function (stack, state, node) {\n var declarations = node[\"declarations\"];\n var n = state.n_ || 0;\n var declarationNode = declarations[n];\n if (state.init_ && declarationNode) {\n // This setValue call never needs to deal with calling a setter function.\n // Note that this is setting the init value, not defining the variable.\n // Variable definition is done when scope is populated.\n this.setValueToScope(declarationNode[\"id\"][\"name\"], state.value);\n state.init_ = false;\n declarationNode = declarations[++n];\n }\n while (declarationNode) {\n // Skip any declarations that are not initialized. They have already\n // been defined as undefined in populateScope_.\n if (declarationNode[\"init\"]) {\n state.n_ = n;\n state.init_ = true;\n return new Interpreter.State(declarationNode[\"init\"], state.scope);\n }\n declarationNode = declarations[++n];\n }\n stack.pop();\n};\n\nInterpreter.prototype[\"stepWithStatement\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n } else if (!state.doneBody_) {\n state.doneBody_ = true;\n var scope = this.createSpecialScope(state.scope, state.value);\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepWhileStatement\"] = Interpreter.prototype[\"stepDoWhileStatement\"];\n\n// Preserve top-level API functions from being pruned/renamed by JS compilers.\n// Add others as needed.\n// The global object ('window' in a browser, 'global' in node.js) is 'this'.\n//this['Interpreter'] = Interpreter;\nInterpreter.prototype[\"step\"] = Interpreter.prototype.step;\nInterpreter.prototype[\"run\"] = Interpreter.prototype.run;\nInterpreter.prototype[\"appendCode\"] = Interpreter.prototype.appendCode;\nInterpreter.prototype[\"createObject\"] = Interpreter.prototype.createObject;\nInterpreter.prototype[\"createObjectProto\"] = Interpreter.prototype.createObjectProto;\nInterpreter.prototype[\"createAsyncFunction\"] = Interpreter.prototype.createAsyncFunction;\nInterpreter.prototype[\"createNativeFunction\"] = Interpreter.prototype.createNativeFunction;\nInterpreter.prototype[\"getProperty\"] = Interpreter.prototype.getProperty;\nInterpreter.prototype[\"setProperty\"] = Interpreter.prototype.setProperty;\nInterpreter.prototype[\"nativeToPseudo\"] = Interpreter.prototype.nativeToPseudo;\nInterpreter.prototype[\"pseudoToNative\"] = Interpreter.prototype.pseudoToNative;\n// Obsolete. Do not use.\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\nexport { Interpreter };\n","import { CONSTANTS } from \"../../Constants\";\nimport { Server } from \"../Server\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function calculateServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0);\n\n //Get adjusted growth rate, which accounts for server security\n const growthRate = CONSTANTS.ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n if (adjGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n adjGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n //Calculate adjusted server growth rate based on parameters\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted =\n numServerGrowthCycles * serverGrowthPercentage * BitNodeMultipliers.ServerGrowthRate;\n\n //Apply serverGrowth for the calculated number of growth cycles\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);\n}\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const PromptEvent = new EventEmitter<[Prompt]>();\n\ninterface Prompt {\n txt: string;\n resolve: (result: boolean) => void;\n}\n\nexport function PromptManager(): React.ReactElement {\n const [prompt, setPrompt] = useState(null);\n useEffect(\n () =>\n PromptEvent.subscribe((p: Prompt) => {\n setPrompt(p);\n }),\n [],\n );\n\n function close(): void {\n if (prompt === null) return;\n prompt.resolve(false);\n setPrompt(null);\n }\n\n function yes(): void {\n if (prompt === null) return;\n prompt.resolve(true);\n setPrompt(null);\n }\n function no(): void {\n if (prompt === null) return;\n prompt.resolve(false);\n setPrompt(null);\n }\n\n return (\n <>\n {prompt != null && (\n \n {prompt.txt}\n \n \n \n )}\n \n );\n}\n","import { Sleeve } from \"./Sleeve\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\n\nexport function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentation[] {\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n\n const ownedAugNames: string[] = sleeve.augmentations.map((e) => {\n return e.name;\n });\n const availableAugs: Augmentation[] = [];\n\n // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n function isAvailableForSleeve(aug: Augmentation): boolean {\n if (aug.name === AugmentationNames.NeuroFluxGovernor) {\n return false;\n }\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n if (availableAugs.includes(aug)) {\n return false;\n }\n if (aug.isSpecial) {\n return false;\n }\n\n return true;\n }\n\n // If player is in a gang, then we return all augs that the player\n // has enough reputation for (since that gang offers all augs)\n if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName in Augmentations) {\n const aug = Augmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n\n return availableAugs;\n }\n\n for (const facName of p.factions) {\n if (facName === \"Bladeburners\") {\n continue;\n }\n if (facName === \"Netburners\") {\n continue;\n }\n const fac: Faction | null = Factions[facName];\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug: Augmentation = Augmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n }\n\n return availableAugs;\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const StaneksGiftEvents = new EventEmitter<[]>();\n","/**\n * React Component for displaying a single Augmentation as an accordion.\n *\n * The header of the accordion contains the Augmentation's name (and level, if\n * applicable), and the accordion's panel contains the Augmentation's description.\n */\nimport React, { useState } from \"react\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\ntype IProps = {\n aug: Augmentation;\n level?: number | string | null;\n};\n\nexport function AugmentationAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n let displayName = props.aug.name;\n if (props.level != null) {\n if (props.aug.name === AugmentationNames.NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return (\n \n setOpen((old) => !old)}>\n {displayName}} />\n {open ? : }\n \n \n \n \n {props.aug.stats && (\n <>\n
\n
\n {props.aug.stats}\n \n )}\n
\n
\n
\n );\n }\n\n return (\n \n setOpen((old) => !old)}>\n {displayName}} />\n {open ? : }\n \n \n \n \n {props.aug.info}\n {props.aug.stats && (\n <>\n
\n
\n {props.aug.stats}\n \n )}\n
\n
\n
\n
\n );\n}\n","import * as React from \"react\";\n\nexport const stealthIcon = (\n \n \n \n \n \n \n);\nexport const killIcon = (\n \n \n \n \n \n \n);\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\n\ninterface IProps {\n action: IAction;\n isActive: boolean;\n bladeburner: IBladeburner;\n rerender: () => void;\n}\n\nexport function ActionLevel({ action, isActive, bladeburner, rerender }: IProps): React.ReactElement {\n const player = use.Player();\n\n const canIncrease = action.level < action.maxLevel;\n const canDecrease = action.level > 1;\n\n function increaseLevel(): void {\n if (!canIncrease) return;\n ++action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n function decreaseLevel(): void {\n if (!canDecrease) return;\n --action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n return (\n \n \n \n {action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed\n for next level\n \n }\n >\n \n Level: {action.level} / {action.maxLevel}\n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface IProps {\n action: IAction;\n rerender: () => void;\n}\n\nexport function Autolevel(props: IProps): React.ReactElement {\n function onAutolevel(event: React.ChangeEvent): void {\n props.action.autoLevel = event.target.checked;\n props.rerender();\n }\n return (\n \n Automatically increase operation level when possible}>\n Autolevel:\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Operation } from \"../Operation\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { TeamSizeModal } from \"./TeamSizeModal\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport Button from \"@mui/material/Button\";\ninterface IProps {\n action: Operation;\n bladeburner: IBladeburner;\n}\nexport function TeamSizeButton(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n \n setOpen(false)} action={props.action} bladeburner={props.bladeburner} />\n \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nexport function BlinkingCursor(): React.ReactElement {\n const [on, setOn] = useState(true);\n useEffect(() => {\n const i = setInterval(() => setOn((old) => !old), 1000);\n return () => clearInterval(i);\n });\n return <>{on ? \"|\" : \"\"};\n}\n","/**\n * Implements the Re-sleeving mechanic for BitNode-10.\n * This allows the player to purchase and \"use\" new sleeves at VitaLife.\n * These new sleeves come with different starting experience and Augmentations\n * The cost of these new sleeves scales based on the exp and Augs.\n *\n * Note that this is different from the \"Sleeve mechanic\". The \"Sleeve\" mechanic\n * provides new sleeves, essentially clones. This Re-sleeving mechanic lets\n * the player purchase a new body with pre-existing Augmentations and experience\n *\n * As of right now, this feature is only available in BitNode 10\n */\nimport { Resleeve } from \"./Resleeve\";\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { IPlayerOwnedAugmentation, PlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\n// Executes the actual re-sleeve when one is purchased\nexport function purchaseResleeve(r: Resleeve, p: IPlayer): boolean {\n const cost: number = r.getCost();\n if (!p.canAfford(cost)) {\n return false;\n }\n p.loseMoney(cost, \"other\");\n\n // Set the player's exp\n p.hacking_exp = r.hacking_exp;\n p.strength_exp = r.strength_exp;\n p.defense_exp = r.defense_exp;\n p.dexterity_exp = r.dexterity_exp;\n p.agility_exp = r.agility_exp;\n p.charisma_exp = r.charisma_exp;\n\n // Reset Augmentation \"owned\" data\n for (const augKey in Augmentations) {\n Augmentations[augKey].owned = false;\n }\n\n // Clear all of the player's augmentations, except the NeuroFlux Governor\n // which is kept\n for (let i = p.augmentations.length - 1; i >= 0; --i) {\n if (p.augmentations[i].name !== AugmentationNames.NeuroFluxGovernor) {\n p.augmentations.splice(i, 1);\n } else {\n // NeuroFlux Governor\n Augmentations[AugmentationNames.NeuroFluxGovernor].owned = true;\n }\n }\n\n for (let i = 0; i < r.augmentations.length; ++i) {\n p.augmentations.push(new PlayerOwnedAugmentation(r.augmentations[i].name));\n Augmentations[r.augmentations[i].name].owned = true;\n }\n\n // The player's purchased Augmentations should remain the same, but any purchased\n // Augmentations that are given by the resleeve should be removed so there are no duplicates\n for (let i = p.queuedAugmentations.length - 1; i >= 0; --i) {\n const name: string = p.queuedAugmentations[i].name;\n\n if (\n p.augmentations.filter((e: IPlayerOwnedAugmentation) => {\n return e.name !== AugmentationNames.NeuroFluxGovernor && e.name === name;\n }).length >= 1\n ) {\n p.queuedAugmentations.splice(i, 1);\n }\n }\n\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles(); //Multipliers get reset, so have to re-process source files too\n return true;\n}\n\n// Creates all of the Re-sleeves that will be available for purchase at VitaLife\nexport function generateResleeves(): Resleeve[] {\n const NumResleeves = 40; // Total number of Resleeves to generate\n\n const ret: Resleeve[] = [];\n for (let i = 0; i < NumResleeves; ++i) {\n // i will be a number indicating how \"powerful\" the Re-sleeve should be\n const r: Resleeve = new Resleeve();\n\n // Generate experience\n const expMult: number = 5 * i + 1;\n r.hacking_exp = expMult * getRandomInt(1000, 5000);\n r.strength_exp = expMult * getRandomInt(1000, 5000);\n r.defense_exp = expMult * getRandomInt(1000, 5000);\n r.dexterity_exp = expMult * getRandomInt(1000, 5000);\n r.agility_exp = expMult * getRandomInt(1000, 5000);\n r.charisma_exp = expMult * getRandomInt(1000, 5000);\n\n // Generate Augs\n // Augmentation prequisites will be ignored for this\n const baseNumAugs: number = Math.max(2, Math.ceil((i + 3) / 2));\n const numAugs: number = getRandomInt(baseNumAugs, baseNumAugs + 2);\n const augKeys: string[] = Object.keys(Augmentations);\n for (let a = 0; a < numAugs; ++a) {\n // Get a random aug\n const randIndex: number = getRandomInt(0, augKeys.length - 1);\n const randKey: string = augKeys[randIndex];\n\n // Forbidden augmentations\n const forbidden = [\n AugmentationNames.TheRedPill,\n AugmentationNames.NeuroFluxGovernor,\n AugmentationNames.StaneksGift1,\n AugmentationNames.StaneksGift2,\n AugmentationNames.StaneksGift3,\n ];\n if (forbidden.includes(randKey)) {\n continue;\n }\n\n const randAug: Augmentation | null = Augmentations[randKey];\n if (randAug === null) throw new Error(`null augmentation: ${randKey}`);\n r.augmentations.push({ name: randAug.name, level: 1 });\n r.applyAugmentation(Augmentations[randKey]);\n r.updateStatLevels();\n\n // Remove Augmentation so that there are no duplicates\n augKeys.splice(randIndex, 1);\n }\n\n ret.push(r);\n }\n\n return ret;\n}\n","import React, { useEffect, useState } from \"react\";\n\nfunction replace(str: string, i: number, char: string): string {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\ninterface IProps {\n content: string;\n}\n\nfunction randomize(char: string): string {\n const randFrom = (str: string): string => str[Math.floor(Math.random() * str.length)];\n const classes = [\"abcdefghijklmnopqrstuvwxyz\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"1234567890\", \" _\", \"()[]{}<>\"];\n const other = `!@#$%^&*()_+|\\\\';\"/.,?\\`~`;\n\n for (const c of classes) {\n if (c.includes(char)) return randFrom(c);\n }\n\n return randFrom(other);\n}\n\nexport function CorruptableText(props: IProps): JSX.Element {\n const [content, setContent] = useState(props.content);\n\n useEffect(() => {\n let counter = 5;\n const id = setInterval(() => {\n counter--;\n if (counter > 0) return;\n counter = Math.random() * 5;\n const index = Math.random() * content.length;\n const letter = content.charAt(index);\n setContent((content) => replace(content, index, randomize(letter)));\n setTimeout(() => {\n setContent((content) => replace(content, index, letter));\n }, 500);\n }, 20);\n\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return {content};\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { CityName } from \"../data/CityNames\";\nimport { TravelConfirmationModal } from \"./TravelConfirmationModal\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\n\ntype IProps = {\n p: IPlayer;\n router: IRouter;\n};\n\nfunction travel(p: IPlayer, router: IRouter, to: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!p.canAfford(cost)) {\n return;\n }\n\n p.loseMoney(cost, \"other\");\n p.travel(to);\n dialogBoxCreate(<>You are now in {to}!);\n router.toCity();\n}\n\nexport function TravelAgencyRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const [open, setOpen] = useState(false);\n const [destination, setDestination] = useState(CityName.Sector12);\n function rerender(): void {\n setRerender((o) => !o);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function startTravel(city: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!player.canAfford(cost)) {\n return;\n }\n if (Settings.SuppressTravelConfirmation) {\n travel(player, router, city);\n return;\n }\n setOpen(true);\n setDestination(city);\n }\n\n return (\n <>\n Travel Agency\n \n \n From here, you can travel to any other city! A ticket costs{\" \"}\n .\n \n {Settings.DisableASCIIArt ? (\n <>\n {Object.values(CityName)\n .filter((city: string) => city != props.p.city)\n .map((city: string) => {\n const match = Object.entries(CityName).find((entry) => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return (\n \n \n
\n
\n );\n })}\n \n ) : (\n startTravel(city)} />\n )}\n
\n travel(player, router, destination)}\n open={open}\n onClose={() => setOpen(false)}\n />\n \n );\n}\n","import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport Editor from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\nimport { OptionsModal } from \"./OptionsModal\";\nimport { Options } from \"./Options\";\nimport { isValidFilePath } from \"../../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { Script } from \"../../Script/Script\";\nimport { TextFile } from \"../../TextFile\";\nimport { calculateRamUsage, checkInfiniteLoop } from \"../../Script/RamCalculations\";\nimport { RamCalculationErrorCode } from \"../../Script/RamCalculationErrorCodes\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CursorPositions } from \"../CursorPositions\";\n\nimport { NetscriptFunctions } from \"../../NetscriptFunctions\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { iTutorialNextStep, ITutorial, iTutorialSteps } from \"../../InteractiveTutorial\";\nimport { debounce } from \"lodash\";\nimport { saveObject } from \"../../SaveObject\";\nimport { loadThemes } from \"./themes\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Box from \"@mui/material/Box\";\nimport TextField from \"@mui/material/TextField\";\nimport IconButton from \"@mui/material/IconButton\";\nimport SettingsIcon from \"@mui/icons-material/Settings\";\n\nimport libSource from \"!!raw-loader!../NetscriptDefinitions.d.ts\";\n\nlet symbolsLoaded = false;\nlet symbols: string[] = [];\nexport function SetupTextEditor(): void {\n const ns = NetscriptFunctions({} as WorkerScript);\n\n function populate(ns: any): string[] {\n let symbols: string[] = [];\n const keys = Object.keys(ns);\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n return symbols;\n }\n symbols = populate(ns);\n\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\", \"alterReality\"];\n symbols = symbols.filter((symbol: string) => !exclude.includes(symbol)).sort();\n}\n\ninterface IProps {\n filename: string;\n code: string;\n hostname: string;\n player: IPlayer;\n router: IRouter;\n}\n\n/*\n\n*/\n\n// How to load function definition in monaco\n// https://github.com/Microsoft/monaco-editor/issues/1415\n// https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n// https://www.npmjs.com/package/@monaco-editor/react#development-playground\n// https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n// https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n// https://blog.checklyhq.com/customizing-monaco/\n\n// These variables are used to reload a script when it's clicked on. Because we\n// won't have references to the old script.\nlet lastFilename = \"\";\nlet lastCode = \"\";\nlet hostname = \"\";\nlet lastPosition: monaco.Position | null = null;\n\nexport function Root(props: IProps): React.ReactElement {\n const editorRef = useRef(null);\n const [filename, setFilename] = useState(props.filename ? props.filename : lastFilename);\n const [code, setCode] = useState(props.filename ? props.code : lastCode);\n const [decorations, setDecorations] = useState([]);\n hostname = props.filename ? props.hostname : hostname;\n if (hostname === \"\") {\n hostname = props.player.getCurrentServer().hostname;\n }\n const [ram, setRAM] = useState(\"RAM: ???\");\n const [updatingRam, setUpdatingRam] = useState(false);\n const [optionsOpen, setOptionsOpen] = useState(false);\n const [options, setOptions] = useState({\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n });\n\n const debouncedSetRAM = useMemo(\n () =>\n debounce((s) => {\n setRAM(s);\n setUpdatingRam(false);\n }, 300),\n [],\n );\n\n // store the last known state in case we need to restart without nano.\n useEffect(() => {\n if (props.filename === undefined) return;\n lastFilename = props.filename;\n lastCode = props.code;\n lastPosition = null;\n }, []);\n\n function save(): void {\n if (editorRef.current !== null) {\n const position = editorRef.current.getPosition();\n if (position !== null) {\n CursorPositions.saveCursor(filename, {\n row: position.lineNumber,\n column: position.column,\n });\n }\n }\n lastPosition = null;\n\n // this is duplicate code with saving later.\n if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (filename !== \"n00dles.script\") {\n dialogBoxCreate(\"Leave the script name as 'n00dles.script'!\");\n return;\n }\n if (code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n dialogBoxCreate(\"Please copy and paste the code from the tutorial!\");\n return;\n }\n\n //Save the script\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n let found = false;\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(filename, code, hostname, server.scripts);\n found = true;\n }\n }\n\n if (!found) {\n const script = new Script();\n script.saveScript(filename, code, hostname, server.scripts);\n server.scripts.push(script);\n }\n\n iTutorialNextStep();\n\n props.router.toTerminal();\n return;\n }\n\n if (filename == \"\") {\n dialogBoxCreate(\"You must specify a filename!\");\n return;\n }\n\n if (!isValidFilePath(filename)) {\n dialogBoxCreate(\n \"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\",\n );\n return;\n }\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(filename)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(filename, code, props.player.currentServer, server.scripts);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(filename, code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n } else if (filename.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === filename) {\n server.textFiles[i].write(code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n const textFile = new TextFile(filename, code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or \" + \" or text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n }\n\n function beautify(): void {\n if (editorRef.current === null) return;\n editorRef.current.getAction(\"editor.action.formatDocument\").run();\n }\n\n function onFilenameChange(event: React.ChangeEvent): void {\n lastFilename = event.target.value;\n setFilename(event.target.value);\n }\n\n function infLoop(newCode: string): void {\n if (editorRef.current === null) return;\n if (!filename.endsWith(\".ns\") && !filename.endsWith(\".js\")) return;\n const awaitWarning = checkInfiniteLoop(newCode);\n if (awaitWarning !== -1) {\n const newDecorations = editorRef.current.deltaDecorations(decorations, [\n {\n range: {\n startLineNumber: awaitWarning,\n startColumn: 1,\n endLineNumber: awaitWarning,\n endColumn: 10,\n },\n options: {\n isWholeLine: true,\n glyphMarginClassName: \"myGlyphMarginClass\",\n glyphMarginHoverMessage: {\n value: \"Possible infinite loop, await something.\",\n },\n },\n },\n ]);\n setDecorations(newDecorations);\n } else {\n const newDecorations = editorRef.current.deltaDecorations(decorations, []);\n setDecorations(newDecorations);\n }\n }\n\n function updateCode(newCode?: string): void {\n if (newCode === undefined) return;\n lastCode = newCode;\n setCode(newCode);\n updateRAM(newCode);\n try {\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n infLoop(newCode);\n }\n } catch (err) {}\n }\n\n // calculate it once the first time the file is loaded.\n useEffect(() => {\n updateRAM(code);\n }, []);\n\n async function updateRAM(newCode: string): Promise {\n setUpdatingRam(true);\n const codeCopy = newCode + \"\";\n const ramUsage = await calculateRamUsage(codeCopy, props.player.getCurrentServer().scripts);\n if (ramUsage > 0) {\n debouncedSetRAM(\"RAM: \" + numeralWrapper.formatRAM(ramUsage));\n return;\n }\n switch (ramUsage) {\n case RamCalculationErrorCode.ImportError: {\n debouncedSetRAM(\"RAM: Import Error\");\n break;\n }\n case RamCalculationErrorCode.URLImportError: {\n debouncedSetRAM(\"RAM: HTTP Import Error\");\n break;\n }\n case RamCalculationErrorCode.SyntaxError:\n default: {\n debouncedSetRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n return new Promise(() => undefined);\n }\n\n useEffect(() => {\n function maybeSave(event: KeyboardEvent): void {\n if (Settings.DisableHotkeys) return;\n //Ctrl + b\n if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n save();\n }\n }\n document.addEventListener(\"keydown\", maybeSave);\n return () => document.removeEventListener(\"keydown\", maybeSave);\n });\n\n function onMount(editor: IStandaloneCodeEditor): void {\n editorRef.current = editor;\n if (editorRef.current === null) return;\n const position = CursorPositions.getCursor(filename);\n if (position.row !== -1)\n editorRef.current.setPosition({\n lineNumber: position.row,\n column: position.column,\n });\n else if (lastPosition !== null)\n editorRef.current.setPosition({\n lineNumber: lastPosition.lineNumber,\n column: lastPosition.column + 1,\n });\n editorRef.current.focus();\n }\n\n function beforeMount(monaco: any): void {\n if (symbolsLoaded) return;\n symbolsLoaded = true;\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet,\n });\n }\n return { suggestions: suggestions };\n },\n });\n (async function () {\n // We have to improve the default js language otherwise theme sucks\n const l = await monaco.languages\n .getLanguages()\n .find((l: any) => l.id === \"javascript\")\n .loader();\n l.language.tokenizer.root.unshift([\"ns\", { token: \"ns\" }]);\n for (const symbol of symbols) l.language.tokenizer.root.unshift([symbol, { token: \"netscriptfunction\" }]);\n const otherKeywords = [\"let\", \"const\", \"var\", \"function\"];\n const otherKeyvars = [\"true\", \"false\", \"null\", \"undefined\"];\n otherKeywords.forEach((k) => l.language.tokenizer.root.unshift([k, { token: \"otherkeywords\" }]));\n otherKeyvars.forEach((k) => l.language.tokenizer.root.unshift([k, { token: \"otherkeyvars\" }]));\n l.language.tokenizer.root.unshift([\"this\", { token: \"this\" }]);\n })();\n\n const source = (libSource + \"\").replace(/export /g, \"\");\n monaco.languages.typescript.javascriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n loadThemes(monaco);\n }\n // 370px 71%, 725px 85.1%, 1085px 90%, 1300px 91.7%\n // fuck around in desmos until you find a function\n const p = 11000 / -window.innerHeight + 100;\n return (\n <>\n \n {hostname}:~/ }}\n />\n setOptionsOpen(true)}>\n <>\n \n options\n \n \n \n Loading script editor!}\n height={p + \"%\"}\n defaultLanguage=\"javascript\"\n defaultValue={code}\n onChange={updateCode}\n theme={options.theme}\n options={{ ...options, glyphMargin: true }}\n />\n \n \n \n {ram}\n \n \n \n {\" \"}\n Documentation:{\" \"}\n \n Basic\n {\" \"}\n |\n \n Full\n \n \n \n setOptionsOpen(false)}\n options={{\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n }}\n save={(options: Options) => {\n setOptions(options);\n Settings.MonacoTheme = options.theme;\n Settings.MonacoInsertSpaces = options.insertSpaces;\n Settings.MonacoFontSize = options.fontSize;\n }}\n />\n \n );\n}\n","import { makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { ScriptUrl } from \"./Script/ScriptUrl\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { Script } from \"./Script/Script\";\n\n// Makes a blob that contains the code of a given script.\nfunction makeScriptBlob(code: string): Blob {\n return new Blob([code], { type: \"text/javascript\" });\n}\n\nexport async function compile(script: Script, scripts: Script[]): Promise {\n if (!shouldCompile(script, scripts)) return;\n // The URL at the top is the one we want to import. It will\n // recursively import all the other modules in the urlStack.\n //\n // Webpack likes to turn the import into a require, which sort of\n // but not really behaves like import. Particularly, it cannot\n // load fully dynamic content. So we hide the import from webpack\n // by placing it inside an eval call.\n await script.updateRamUsage(scripts);\n const uurls = _getScriptUrls(script, scripts, []);\n if (script.url) URL.revokeObjectURL(script.url); // remove the old reference.\n if (script.dependencies.length > 0) script.dependencies.forEach((dep) => URL.revokeObjectURL(dep.url));\n script.url = uurls[uurls.length - 1].url;\n script.module = new Promise((resolve) => resolve(eval(\"import(uurls[uurls.length - 1].url)\")));\n script.dependencies = uurls;\n}\n\n// Begin executing a user JS script, and return a promise that resolves\n// or rejects when the script finishes.\n// - script is a script to execute (see Script.js). We depend only on .filename and .code.\n// scripts is an array of other scripts on the server.\n// env is the global environment that should be visible to all the scripts\n// (i.e. hack, grow, etc.).\n// When the promise returned by this resolves, we'll have finished\n// running the main function of the script.\nexport async function executeJSScript(scripts: Script[] = [], workerScript: WorkerScript): Promise {\n const script = workerScript.getScript();\n if (script === null) throw new Error(\"script is null\");\n await compile(script, scripts);\n workerScript.ramUsage = script.ramUsage;\n const loadedModule = await script.module;\n\n const ns = workerScript.env.vars;\n\n // TODO: putting await in a non-async function yields unhelpful\n // \"SyntaxError: unexpected reserved word\" with no line number information.\n if (!loadedModule.main) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `${script.filename} cannot be run because it does not have a main function.`,\n );\n }\n return loadedModule.main(ns);\n}\n\n/** Returns whether we should compile the script parameter.\n *\n * @param {Script} script\n * @param {Script[]} scripts\n */\nfunction shouldCompile(script: Script, scripts: Script[]): boolean {\n if (script.module === \"\") return true;\n return script.dependencies.some((dep) => {\n const depScript = scripts.find((s) => s.filename == dep.filename);\n\n // If the script is not present on the server, we should recompile, if only to get any necessary\n // compilation errors.\n if (!depScript) return true;\n\n const depIsMoreRecent = depScript.moduleSequenceNumber > script.moduleSequenceNumber;\n return depIsMoreRecent;\n });\n}\n\n// Gets a stack of blob urls, the top/right-most element being\n// the blob url for the named script on the named server.\n//\n// - script -- the script for whom we are getting a URL.\n// - scripts -- all the scripts available on this server\n// - seen -- The modules above this one -- to prevent mutual dependency.\n//\n// TODO We don't make any effort to cache a given module when it is imported at\n// different parts of the tree. That hasn't presented any problem with during\n// testing, but it might be an idea for the future. Would require a topo-sort\n// then url-izing from leaf-most to root-most.\n/**\n * @param {Script} script\n * @param {Script[]} scripts\n * @param {Script[]} seen\n * @returns {ScriptUrl[]} All of the compiled scripts, with the final one\n * in the list containing the blob corresponding to\n * the script parameter.\n */\n// BUG: apparently seen is never consulted. Oops.\nfunction _getScriptUrls(script: Script, scripts: Script[], seen: Script[]): ScriptUrl[] {\n // Inspired by: https://stackoverflow.com/a/43834063/91401\n /** @type {ScriptUrl[]} */\n const urlStack = [];\n seen.push(script);\n try {\n // Replace every import statement with an import to a blob url containing\n // the corresponding script. E.g.\n //\n // import {foo} from \"bar.js\";\n //\n // becomes\n //\n // import {foo} from \"blob://\"\n //\n // Where the blob URL contains the script content.\n let transformedCode = script.code.replace(\n /((?:from|import)\\s+(?:'|\"))(?:\\.\\/)?([^'\"]+)('|\")/g,\n (unmodified, prefix, filename, suffix) => {\n const isAllowedImport = scripts.some((s) => s.filename == filename);\n if (!isAllowedImport) return unmodified;\n\n // Find the corresponding script.\n const [importedScript] = scripts.filter((s) => s.filename == filename);\n\n // Try to get a URL for the requested script and its dependencies.\n const urls = _getScriptUrls(importedScript, scripts, seen);\n\n // The top url in the stack is the replacement import file for this script.\n urlStack.push(...urls);\n return [prefix, urls[urls.length - 1].url, suffix].join(\"\");\n },\n );\n\n // We automatically define a print function() in the NetscriptJS module so that\n // accidental calls to window.print() do not bring up the \"print screen\" dialog\n transformedCode += `\\n\\nfunction print() {throw new Error(\"Invalid call to window.print(). Did you mean to use Netscript's print()?\");}`;\n\n // If we successfully transformed the code, create a blob url for it and\n // push that URL onto the top of the stack.\n urlStack.push(new ScriptUrl(script.filename, URL.createObjectURL(makeScriptBlob(transformedCode))));\n return urlStack;\n } catch (err) {\n // If there is an error, we need to clean up the URLs.\n for (const url in urlStack) URL.revokeObjectURL(url);\n throw err;\n } finally {\n seen.pop();\n }\n}\n","import { toNative } from \"./toNative\";\nimport * as libarg from \"arg\";\n\nexport function Flags(vargs: string[]): any {\n return function (data: any): any {\n data = toNative(data);\n // We always want the help flag.\n const args: {\n [key: string]: any;\n } = {};\n\n for (const d of data) {\n let t: any = String;\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n const ret = libarg(args, { argv: vargs });\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n return ret;\n };\n}\n","import { Interpreter } from \"../ThirdParty/JSInterpreter\";\n\nconst defaultInterpreter = new Interpreter(\"\", () => undefined);\n\n// the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\nexport function toNative(pseudoObj: any): any {\n if (pseudoObj == null) return null;\n if (\n !pseudoObj.hasOwnProperty(\"properties\") ||\n !pseudoObj.hasOwnProperty(\"getter\") ||\n !pseudoObj.hasOwnProperty(\"setter\") ||\n !pseudoObj.hasOwnProperty(\"proto\")\n ) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj: any;\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n for (const key in pseudoObj.properties) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n return nativeObj;\n}\n","import * as React from \"react\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport FirstPageIcon from \"@mui/icons-material/FirstPage\";\nimport KeyboardArrowLeft from \"@mui/icons-material/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@mui/icons-material/KeyboardArrowRight\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\n\ninterface TablePaginationActionsProps {\n count: number;\n page: number;\n rowsPerPage: number;\n onPageChange: (event: React.MouseEvent, newPage: number) => void;\n}\n\nexport function TablePaginationActionsAll(props: TablePaginationActionsProps): React.ReactElement {\n const theme = useTheme();\n const { count, page, rowsPerPage, onPageChange } = props;\n\n const handleFirstPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return (\n \n \n {theme.direction === \"rtl\" ? : }\n \n \n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n \n );\n}\n","import * as React from \"react\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { TableCell as MuiTableCell, TableCellProps } from \"@mui/material\";\n\nconst useStyles = makeStyles({\n root: {\n border: \"1px solid white\",\n width: \"5px\",\n height: \"5px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\ntype IProps = {\n onMouseEnter?: () => void;\n onClick?: () => void;\n color: string;\n};\n\nexport function Cell(cellProps: IProps): React.ReactElement {\n return (\n \n );\n}\n","import { GetServer } from \"../Server/AllServers\";\nimport { RunningScript } from \"./RunningScript\";\n\nexport function getRamUsageFromRunningScript(script: RunningScript): number {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = GetServer(script.server);\n if (server == null) {\n return 0;\n }\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === script.filename) {\n // Cache the ram usage for the next call\n script.ramUsage = server.scripts[i].ramUsage;\n return script.ramUsage;\n }\n }\n\n return 0;\n}\n","import { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessBladeburner(this: IPlayer): boolean {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || SourceFileFlags[6] > 0 || SourceFileFlags[7] > 0;\n}\n\nexport function inBladeburner(this: IPlayer): boolean {\n if (this.bladeburner == null) {\n return false;\n }\n return this.bladeburner instanceof Bladeburner;\n}\n\nexport function startBladeburner(this: IPlayer): void {\n this.bladeburner = new Bladeburner(this);\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Contract extends Action {\n constructor(params: IActionParams | null = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Contract\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Contract {\n return Generic_fromJSON(Contract, value.data);\n }\n}\n\nReviver.constructors.Contract = Contract;\n","export const ConsoleHelpText: {\n [key: string]: string[];\n helpList: string[];\n automate: string[];\n clear: string[];\n cls: string[];\n help: string[];\n log: string[];\n skill: string[];\n start: string[];\n stop: string[];\n} = {\n helpList: [\n \"Use 'help [command]' to get more information about a particular Bladeburner console command.\",\n \"\",\n \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\",\n \" clear/cls Clear the console\",\n \" help [cmd] Display this help text, or help text for a specific command\",\n \" log [en/dis] [type] Enable or disable logging for events and actions\",\n \" skill [action] [name] Level or display info about your Bladeburner skills\",\n \" start [type] [name] Start a Bladeburner action/task\",\n \" stop Stops your current Bladeburner action/task\",\n ],\n automate: [\n \"automate [var] [val] [hi/low]\",\n \"\",\n \"A simple way to automate your Bladeburner actions. This console command can be used \" +\n \"to automatically start an action when your stamina rises above a certain threshold, and \" +\n \"automatically switch to another action when your stamina drops below another threshold.\",\n \" automate status - Check the current status of your automation and get a brief description of what it'll do\",\n \" automate en - Enable the automation feature\",\n \" automate dis - Disable the automation feature\",\n \"\",\n \"There are four properties that must be set for this automation to work properly. Here is how to set them:\",\n \"\",\n \" automate stamina 100 high\",\n \" automate contract Tracking high\",\n \" automate stamina 50 low\",\n \" automate general 'Field Analysis' low\",\n \"\",\n \"Using the four console commands above will set the automation to perform Tracking contracts \" +\n \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" +\n \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" +\n \"exactly match whatever the name is in the UI.\",\n ],\n clear: [\"clear\", \"\", \"Clears the console\"],\n cls: [\"cls\", \"\", \"Clears the console\"],\n help: [\n \"help [command]\",\n \"\",\n \"Running 'help' with no arguments displays the general help text, which lists all console commands \" +\n \"and a brief description of what they do. A command can be specified to get more specific help text \" +\n \"about that particular command. For example:\",\n \"\",\n \" help automate\",\n \"\",\n \"will display specific information about using the automate console command\",\n ],\n log: [\n \"log [en/dis] [type]\",\n \"\",\n \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" +\n \"in the console. There are also random events that are logged in the console as well. The five categories of \" +\n \"things that get logged are:\",\n \"\",\n \"[general, contracts, ops, blackops, events]\",\n \"\",\n \"The logging for these categories can be enabled or disabled like so:\",\n \"\",\n \" log dis contracts - Disables logging that occurs when contracts are completed\",\n \" log en contracts - Enables logging that occurs when contracts are completed\",\n \" log dis events - Disables logging for Bladeburner random events\",\n \"\",\n \"Logging can be universally enabled/disabled using the 'all' keyword:\",\n \"\",\n \" log dis all\",\n \" log en all\",\n ],\n skill: [\n \"skill [action] [name]\",\n \"\",\n \"Level or display information about your skills.\",\n \"\",\n \"To display information about all of your skills and your multipliers, use:\",\n \"\",\n \" skill list\",\n \"\",\n \"To display information about a specific skill, specify the name of the skill afterwards. \" +\n \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" +\n \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\",\n \"\",\n \" skill list Reaper
\" + \" skill list 'Digital Observer'\",\n \"\",\n \"This console command can also be used to level up skills:\",\n \"\",\n \" skill level [skill name]\",\n ],\n start: [\n \"start [type] [name]\",\n \"\",\n \"Start an action. An action is specified by its type and its name. The \" +\n \"name is case-sensitive. It must appear exactly as it does in the UI. If \" +\n \"the name of the action has whitespace, enclose it in double quotation marks. \" +\n \"Valid action types include:\",\n \"\",\n \"[general, contract, op, blackop]\",\n \"\",\n \"Examples:\",\n \"\",\n \" start contract Tracking\",\n \" start op 'Undercover Operation'\",\n ],\n stop: [\"stop\", \"\", \"Stop your current action and go idle.\"],\n};\n","import { Corporation } from \"../../Corporation/Corporation\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessCorporation(this: IPlayer): boolean {\n return this.bitNodeN === 3 || SourceFileFlags[3] > 0;\n}\n\nexport function hasCorporation(this: IPlayer): boolean {\n if (this.corporation == null) {\n return false;\n }\n return this.corporation instanceof Corporation;\n}\n\nexport function startCorporation(this: IPlayer, corpName: string, additionalShares = 0): void {\n this.corporation = new Corporation({\n name: corpName,\n });\n\n this.corporation.totalShares += additionalShares;\n}\n","// Defines a \"Research Tree\"\n// Each Industry has a unique Research Tree\n// Each Node in the Research Trees only holds the name(s) of Research,\n// not an actual Research object. The name can be used to obtain a reference\n// to the corresponding Research object using the ResearchMap\nimport { Research } from \"./Research\";\nimport { ResearchMap } from \"./ResearchMap\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\ninterface IConstructorParams {\n children?: Node[];\n cost: number;\n text: string;\n parent?: Node | null;\n}\n\nexport class Node {\n // All child Nodes in the tree\n // The Research held in this Node is a prerequisite for all Research in\n // child Nodes\n children: Node[] = [];\n\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n cost = 0;\n\n // Whether or not this Research has been unlocked\n researched = false;\n\n // Parent node in the tree\n // The parent node defines the prerequisite Research (there can only be one)\n // Set as null for no prerequisites\n parent: Node | null = null;\n\n // Name of the Research held in this Node\n text = \"\";\n\n constructor(p: IConstructorParams = { cost: 0, text: \"\" }) {\n if (ResearchMap[p.text] == null) {\n throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${p.text}`);\n }\n\n this.text = p.text;\n this.cost = p.cost;\n\n if (p.children && p.children.length > 0) {\n this.children = p.children;\n }\n\n if (p.parent != null) {\n this.parent = p.parent;\n }\n }\n\n addChild(n: Node): void {\n this.children.push(n);\n n.parent = this;\n }\n\n // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup(): any {\n const childrenArray = [];\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n }\n\n // Determine what css class this Node should have in the diagram\n let htmlClass = \"tooltip\";\n if (this.researched) {\n htmlClass += \" researched\";\n } else if (this.parent && this.parent.researched === false) {\n htmlClass += \" locked\";\n } else {\n htmlClass += \" unlocked\";\n }\n\n const research: Research | null = ResearchMap[this.text];\n const sanitizedName: string = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML:\n `
` +\n `${this.text}
${numeralWrapper.format(this.cost, \"0,0\")} Scientific Research` +\n `` +\n `${research.desc}` +\n `` +\n `
`,\n text: { name: this.text },\n };\n }\n\n // Recursive function for finding a Node with the specified text\n findNode(text: string): Node | null {\n // Is this the Node?\n if (this.text === text) {\n return this;\n }\n\n // Recursively search chilren\n let res = null;\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n: Node): void {\n this.parent = n;\n }\n}\n\n// A ResearchTree defines all available Research in an Industry\n// The root node in a Research Tree must always be the \"Hi-Tech R&D Laboratory\"\nexport class ResearchTree {\n // Object containing names of all acquired Research by name\n researched: IMap = {};\n\n // Root Node\n root: Node | null = null;\n\n // Return an object that contains a Tree markup for TreantJS (using the JSON approach)\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup(): any {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n\n return {\n chart: {\n container: \"\",\n },\n nodeStructure: treeMarkup,\n };\n }\n\n // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n getAllNodes(): string[] {\n const res: string[] = [];\n const queue: Node[] = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Get total multipliers from this Research Tree\n getAdvertisingMultiplier(): number {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier(): number {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier(): number {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier(): number {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier(): number {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier(): number {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier(): number {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier(): number {\n return this.getMultiplierHelper(\"storageMult\");\n }\n\n // Helper function for all the multiplier getter fns\n getMultiplierHelper(propName: string): number {\n let res = 1;\n if (this.root == null) {\n return res;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n\n // If the Node has not been researched, there's no need to\n // process it or its children\n if (node == null || !node.researched) {\n continue;\n }\n\n const research: Research | null = ResearchMap[node.text];\n\n // Safety checks\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult: any = (research as any)[propName];\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n findNode(name: string): Node | null {\n if (this.root == null) {\n return null;\n }\n return this.root.findNode(name);\n }\n\n // Marks a Node as researched\n research(name: string): void {\n if (this.root == null) {\n return;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n if (node.text === name) {\n node.researched = true;\n this.researched[name] = true;\n return;\n }\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n console.warn(`ResearchTree.research() did not find the specified Research node for: ${name}`);\n }\n\n // Set the tree's Root Node\n setRoot(root: Node): void {\n this.root = root;\n }\n}\n","/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nexport const TicksPerCycle = 75;\n","// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\nimport { CompanyPosition } from \"./CompanyPosition\";\nimport { CompanyPositions } from \"./CompanyPositions\";\n\nexport function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName: string | null = currPos.nextPosition;\n if (nextPosName == null) {\n return null;\n }\n\n return CompanyPositions[nextPosName];\n}\n","/**\n * Game engine. Handles the main game loop.\n */\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\nimport { Augmentations } from \"./Augmentation/Augmentations\";\nimport { initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { generateRandomContract } from \"./CodingContractGenerator\";\nimport { initCompanies } from \"./Company/Companies\";\nimport { Corporation } from \"./Corporation/Corporation\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { processPassiveFactionRepGain, inviteToFaction } from \"./Faction/FactionHelpers\";\nimport { Router } from \"./ui/GameRoot\";\nimport { SetupTextEditor } from \"./ScriptEditor/ui/ScriptEditorRoot\";\n\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"./PersonObjects/formulas/reputation\";\nimport { hasHacknetServers, processHacknetEarnings } from \"./Hacknet/HacknetHelpers\";\nimport { iTutorialStart } from \"./InteractiveTutorial\";\nimport { checkForMessagesToSend, initMessages } from \"./Message/MessageHelpers\";\nimport { loadAllRunningScripts, updateOnlineScriptTimes } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { saveObject, loadGame } from \"./SaveObject\";\nimport { initForeignServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { ThemeEvents } from \"./ui/React/Theme\";\nimport { updateSourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { initSymbolToStockMap, processStockPrices } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\nimport { Sleeve } from \"./PersonObjects/Sleeve/Sleeve\";\n\nimport { Money } from \"./ui/React/Money\";\nimport { Hashes } from \"./ui/React/Hashes\";\nimport { Reputation } from \"./ui/React/Reputation\";\n\nimport { AlertEvents } from \"./ui/React/AlertManager\";\nimport { exceptionAlert } from \"./utils/helpers/exceptionAlert\";\n\nimport { startExploits } from \"./Exploits/loops\";\n\nimport React from \"react\";\n\nconst Engine: {\n _lastUpdate: number;\n updateGame: (numCycles?: number) => void;\n Counters: {\n [key: string]: number | undefined;\n autoSaveCounter: number;\n updateSkillLevelsCounter: number;\n updateDisplays: number;\n updateDisplaysLong: number;\n updateActiveScriptsDisplay: number;\n createProgramNotifications: number;\n augmentationsNotifications: number;\n checkFactionInvitations: number;\n passiveFactionGrowth: number;\n messages: number;\n mechanicProcess: number;\n contractGeneration: number;\n };\n decrementAllCounters: (numCycles?: number) => void;\n checkCounters: () => void;\n load: (saveString: string) => void;\n start: () => void;\n} = {\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n\n updateGame: function (numCycles = 1) {\n const time = numCycles * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Terminal.process(Router, Player, numCycles);\n\n Player.process(Router, numCycles);\n\n // Update stock prices\n if (Player.hasWseAccount) {\n processStockPrices(numCycles);\n }\n\n // Gang, if applicable\n if (Player.inGang() && Player.gang !== null) {\n Player.gang.process(numCycles, Player);\n }\n\n // Staneks gift\n staneksGift.process(Player, numCycles);\n\n // Corporation\n if (Player.corporation instanceof Corporation) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n Player.corporation.storeCycles(numCycles);\n }\n\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCycles);\n }\n\n // Sleeves\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCycles);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCycles, true);\n }\n }\n }\n\n // Counters\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters();\n\n // Update the running time of all active scripts\n updateOnlineScriptTimes(numCycles);\n\n // Hacknet Nodes\n processHacknetEarnings(Player, numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5, // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000, // Generate Coding Contracts\n },\n\n decrementAllCounters: function (numCycles = 1) {\n for (const counterName in Engine.Counters) {\n const counter = Engine.Counters[counterName];\n if (counter === undefined) throw new Error(\"counter should not be undefined\");\n Engine.Counters[counterName] = counter - numCycles;\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (Settings.AutosaveInterval == null) {\n Settings.AutosaveInterval = 60;\n }\n if (Settings.AutosaveInterval === 0) {\n Engine.Counters.autoSaveCounter = Infinity;\n } else {\n Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;\n saveObject.saveGame();\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = Player.checkForFactionInvitations();\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n inviteToFaction(randFaction);\n }\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n const adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n processPassiveFactionRepGain(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n checkForMessagesToSend();\n if (Augmentations[AugmentationNames.TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n if (Player.corporation instanceof Corporation) {\n Player.corporation.process(Player);\n }\n if (Engine.Counters.mechanicProcess <= 0) {\n if (Player.bladeburner instanceof Bladeburner) {\n try {\n Player.bladeburner.process(Router, Player);\n } catch (e) {\n exceptionAlert(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n generateRandomContract();\n }\n Engine.Counters.contractGeneration = 3000;\n }\n },\n\n load: function (saveString) {\n startExploits();\n // Load game from save or create new game\n if (loadGame(saveString)) {\n ThemeEvents.emit();\n\n initBitNodeMultipliers(Player);\n updateSourceFileFlags(Player);\n initAugmentations(); // Also calls Player.reapplyAllAugmentations()\n Player.reapplyAllSourceFiles();\n if (Player.hasWseAccount) {\n initSymbolToStockMap();\n }\n\n // Calculate the number of cycles have elapsed while offline\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / CONSTANTS._idleSpeed);\n\n // Generate coding contracts\n // let numContracts = 0;\n // if (numCyclesOffline < 3000 * 100) {\n // // if we have less than 100 rolls, just roll them exactly.\n // for (let i = 0; i < numCyclesOffline / 3000; i++) {\n // if (Math.random() < 0.25) numContracts++;\n // }\n // } else {\n // // just average it.\n // numContracts = (numCyclesOffline / 3000) * 0.25;\n // }\n // console.log(`${numCyclesOffline} ${numContracts}`);\n // for (let i = 0; i < numContracts; i++) {\n // generateRandomContract();\n // }\n\n let offlineReputation = 0;\n const offlineHackingIncome = (Player.moneySourceA.hacking / Player.playtimeSinceLastAug) * timeOffline * 0.75;\n Player.gainMoney(offlineHackingIncome, \"hacking\");\n // Process offline progress\n loadAllRunningScripts(); // This also takes care of offline production for those scripts\n if (Player.isWorking) {\n Player.focus = true;\n if (Player.workType == CONSTANTS.WorkTypeFaction) {\n Player.workForFaction(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCreateProgram) {\n Player.createProgramWork(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeStudyClass) {\n Player.takeClass(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCrime) {\n Player.commitCrime(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n Player.workPartTime(numCyclesOffline);\n } else {\n Player.work(numCyclesOffline);\n }\n } else {\n for (let i = 0; i < Player.factions.length; i++) {\n const facName = Player.factions[i];\n if (!Factions.hasOwnProperty(facName)) continue;\n const faction = Factions[facName];\n if (!faction.isMember) continue;\n // No rep for special factions.\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No rep for gangs.\n if (Player.getGangName() === facName) continue;\n\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n // can be infinite, doesn't matter.\n const reputationRate = Math.max(hRep, sRep, fRep) / Player.factions.length;\n\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n }\n\n // Hacknet Nodes offline progress\n const offlineProductionFromHacknetNodes = processHacknetEarnings(Player, numCyclesOffline);\n const hacknetProdInfo = hasHacknetServers(Player) ? (\n <>\n hashes\n \n ) : (\n \n );\n\n // Passive faction rep gain offline\n processPassiveFactionRepGain(numCyclesOffline);\n\n // Stock Market offline progress\n if (Player.hasWseAccount) {\n processStockPrices(numCyclesOffline);\n }\n\n // Gang progress for BitNode 2\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n gang.process(numCyclesOffline, Player);\n }\n\n // Corporation offline progress\n if (Player.corporation instanceof Corporation) {\n Player.corporation.storeCycles(numCyclesOffline);\n }\n\n // Bladeburner offline progress\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCyclesOffline);\n }\n\n staneksGift.process(Player, numCyclesOffline);\n\n // Sleeves offline progress\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCyclesOffline);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCyclesOffline, true);\n }\n }\n }\n\n // Update total playtime\n const time = numCyclesOffline * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Player.lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n const timeOfflineString = convertTimeMsToTimeElapsedString(time);\n setTimeout(\n () =>\n AlertEvents.emit(\n <>\n Offline for {timeOfflineString}. While you were offline, your scripts generated{\" \"}\n , your Hacknet Nodes generated {hacknetProdInfo} and you gained{\" \"}\n reputation divided amongst your factions.\n ,\n ),\n 250,\n );\n } else {\n // No save found, start new game\n initBitNodeMultipliers(Player);\n Engine.start(); // Run main game loop and Scripts loop\n Player.init();\n initForeignServers(Player.getHomeComputer());\n initCompanies();\n initFactions();\n initAugmentations();\n initMessages();\n updateSourceFileFlags(Player);\n\n // Start interactive tutorial\n iTutorialStart();\n }\n SetupTextEditor();\n },\n\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % CONSTANTS._idleSpeed;\n\n // Divide this by cycle time to determine how many cycles have elapsed since last update\n diff = Math.floor(diff / CONSTANTS._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n Player.lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n window.requestAnimationFrame(Engine.start);\n },\n};\n\nexport { Engine };\n","import React, { useState, useEffect } from \"react\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport { Terminal } from \"../Terminal\";\nimport { load } from \"../db\";\nimport { Player } from \"../Player\";\nimport { Engine } from \"../engine\";\nimport { GameRoot } from \"./GameRoot\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { ActivateRecoveryMode } from \"./React/RecoveryRoot\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n backgroundColor: theme.colors.backgroundprimary,\n },\n }),\n);\n\nexport function LoadingScreen(): React.ReactElement {\n const classes = useStyles();\n const [show, setShow] = useState(false);\n const [loaded, setLoaded] = useState(false);\n\n useEffect(() => {\n const id = setTimeout(() => {\n if (!loaded) setShow(true);\n }, 2000);\n return () => clearTimeout(id);\n });\n\n useEffect(() => {\n async function doLoad(): Promise {\n await load()\n .then((saveString) => {\n try {\n Engine.load(saveString);\n } catch (err: any) {\n ActivateRecoveryMode();\n setLoaded(true);\n throw err;\n }\n\n setLoaded(true);\n })\n .catch((reason) => {\n console.error(reason);\n Engine.load(\"\");\n setLoaded(true);\n });\n }\n doLoad();\n }, []);\n\n return (\n \n {loaded ? (\n \n ) : (\n \n \n \n \n \n Loading Bitburner v{CONSTANTS.VersionString}\n \n {show && (\n \n \n If the game fails to load, consider killing all scripts\n \n \n )}\n \n )}\n \n );\n}\n","// The initial formulas was sum 0 to f of 500*1.02^f.\n// These formulas were derived on wolfram alpha.\n\n// Wolfram Alpha: sum from 0 to n of 500*1.02^n\n// 500 * ((pow(51, f+1)) / pow(50,f) - 50)\n// Then we use https://herbie.uwplse.org/demo/ to simplify it and prevent\n// Infinity issues.\nexport function favorToRep(f: number): number {\n function fma(a: number, b: number, c: number): number {\n return a * b + c;\n }\n const ex = fma(f - 1, Math.log(51.0) - Math.log(50.0), Math.log(51.0));\n const raw = fma(500.0, Math.exp(ex), -25000.0);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n\n// Wolfram Alpha: 500 (50^(-n) 51^(n + 1) - 50) solve for n\nexport function repToFavor(r: number): number {\n const raw = Math.log((r + 25000) / 25500) / Math.log(1.02) + 1;\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n","/**\n * Checks that a variable is a valid number. A valid number\n * must be a \"number\" type and cannot be NaN\n */\nexport function isValidNumber(n: number): boolean {\n return typeof n === \"number\" && !isNaN(n);\n}\n","/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Order {\n readonly pos: PositionTypes;\n readonly price: number;\n shares: number;\n readonly stockSymbol: string;\n readonly type: OrderTypes;\n\n constructor(\n stockSymbol = \"\",\n shares = 0,\n price = 0,\n typ: OrderTypes = OrderTypes.LimitBuy,\n pos: PositionTypes = PositionTypes.Long,\n ) {\n // Validate arguments\n let invalidArgs = false;\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n\n /**\n * Serialize the Order to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Order\", this);\n }\n\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Order {\n return Generic_fromJSON(Order, value.data);\n }\n}\n\nReviver.constructors.Order = Order;\n","import { Fragment } from \"./Fragment\";\nimport { ActiveFragment } from \"./ActiveFragment\";\nimport { FragmentType } from \"./FragmentType\";\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { CalculateEffect } from \"./formulas/effect\";\nimport { StaneksGiftEvents } from \"./StaneksGiftEvents\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StanekConstants } from \"./data/Constants\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../Player\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport class StaneksGift implements IStaneksGift {\n storedCycles = 0;\n fragments: ActiveFragment[] = [];\n\n baseSize(): number {\n return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13);\n }\n\n width(): number {\n return Math.floor(this.baseSize() / 2 + 1);\n }\n height(): number {\n return Math.floor(this.baseSize() / 2 + 0.6);\n }\n\n charge(player: IPlayer, af: ActiveFragment, threads: number): void {\n af.avgCharge = (af.numCharge * af.avgCharge + threads) / (af.numCharge + 1);\n af.numCharge++;\n\n const cotmg = Factions[\"Church of the Machine God\"];\n cotmg.playerReputation += (player.faction_rep_mult * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;\n }\n\n inBonus(): boolean {\n return (this.storedCycles * CONSTANTS._idleSpeed) / 1000 > 1;\n }\n\n process(p: IPlayer, numCycles = 1): void {\n if (!p.hasAugmentation(AugmentationNames.StaneksGift1)) return;\n this.storedCycles += numCycles;\n this.storedCycles -= 10;\n this.storedCycles = Math.max(0, this.storedCycles);\n this.updateMults(p);\n StaneksGiftEvents.emit();\n }\n\n effect(fragment: ActiveFragment): number {\n // Find all the neighbooring cells\n const cells = fragment.neighboors();\n // find the neighbooring active fragments.\n const maybeFragments = cells.map((n) => this.fragmentAt(n[0], n[1]));\n\n // Filter out undefined with typescript \"Type guard\". Whatever\n let neighboors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v);\n\n neighboors = neighboors.filter((fragment) => fragment.fragment().type === FragmentType.Booster);\n let boost = 1;\n\n neighboors = neighboors.filter((v, i, s) => s.indexOf(v) === i);\n for (const neighboor of neighboors) {\n boost *= neighboor.fragment().power;\n }\n return CalculateEffect(fragment.avgCharge, fragment.numCharge, fragment.fragment().power, boost);\n }\n\n canPlace(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (rootX < 0 || rootY < 0) return false;\n if (rootX + fragment.width(rotation) > this.width()) return false;\n if (rootY + fragment.height(rotation) > this.height()) return false;\n if (this.count(fragment) >= fragment.limit) return false;\n const newFrag = new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment });\n for (const aFrag of this.fragments) {\n if (aFrag.collide(newFrag)) return false;\n }\n return true;\n }\n\n place(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (!this.canPlace(rootX, rootY, rotation, fragment)) return false;\n this.fragments.push(new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment }));\n return true;\n }\n\n findFragment(rootX: number, rootY: number): ActiveFragment | undefined {\n return this.fragments.find((f) => f.x === rootX && f.y === rootY);\n }\n\n fragmentAt(worldX: number, worldY: number): ActiveFragment | undefined {\n for (const aFrag of this.fragments) {\n if (aFrag.fullAt(worldX, worldY)) {\n return aFrag;\n }\n }\n\n return undefined;\n }\n\n count(fragment: Fragment): number {\n let amt = 0;\n for (const aFrag of this.fragments) {\n if (aFrag.fragment().id === fragment.id) amt++;\n }\n return amt;\n }\n\n delete(rootX: number, rootY: number): boolean {\n for (let i = 0; i < this.fragments.length; i++) {\n if (this.fragments[i].x === rootX && this.fragments[i].y === rootY) {\n this.fragments.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n clear(): void {\n this.fragments = [];\n }\n\n clearCharge(): void {\n this.fragments.forEach((f) => {\n f.avgCharge = 0;\n f.numCharge = 0;\n });\n }\n\n updateMults(p: IPlayer): void {\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles();\n\n for (const aFrag of this.fragments) {\n const fragment = aFrag.fragment();\n\n const power = this.effect(aFrag);\n switch (fragment.type) {\n case FragmentType.HackingChance:\n p.hacking_chance_mult *= power;\n break;\n case FragmentType.HackingSpeed:\n p.hacking_speed_mult *= power;\n break;\n case FragmentType.HackingMoney:\n p.hacking_money_mult *= power;\n break;\n case FragmentType.HackingGrow:\n p.hacking_grow_mult *= power;\n break;\n case FragmentType.Hacking:\n p.hacking_mult *= power;\n p.hacking_exp_mult *= power;\n break;\n case FragmentType.Strength:\n p.strength_mult *= power;\n p.strength_exp_mult *= power;\n break;\n case FragmentType.Defense:\n p.defense_mult *= power;\n p.defense_exp_mult *= power;\n break;\n case FragmentType.Dexterity:\n p.dexterity_mult *= power;\n p.dexterity_exp_mult *= power;\n break;\n case FragmentType.Agility:\n p.agility_mult *= power;\n p.agility_exp_mult *= power;\n break;\n case FragmentType.Charisma:\n p.charisma_mult *= power;\n p.charisma_exp_mult *= power;\n break;\n case FragmentType.HacknetMoney:\n p.hacknet_node_money_mult *= power;\n break;\n case FragmentType.HacknetCost:\n p.hacknet_node_purchase_cost_mult *= power;\n p.hacknet_node_ram_cost_mult *= power;\n p.hacknet_node_core_cost_mult *= power;\n p.hacknet_node_level_cost_mult *= power;\n break;\n case FragmentType.Rep:\n p.company_rep_mult *= power;\n p.faction_rep_mult *= power;\n break;\n case FragmentType.WorkMoney:\n p.work_money_mult *= power;\n break;\n case FragmentType.Crime:\n p.crime_success_mult *= power;\n p.crime_money_mult *= power;\n break;\n case FragmentType.Bladeburner:\n p.bladeburner_max_stamina_mult *= power;\n p.bladeburner_stamina_gain_mult *= power;\n p.bladeburner_analysis_mult *= power;\n p.bladeburner_success_chance_mult *= power;\n break;\n }\n }\n p.updateSkillLevels();\n }\n\n prestigeAugmentation(): void {\n this.clearCharge();\n }\n\n prestigeSourceFile(): void {\n this.clear();\n this.storedCycles = 0;\n }\n\n /**\n * Serialize Staneks Gift to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"StaneksGift\", this);\n }\n\n /**\n * Initializes Staneks Gift from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): StaneksGift {\n return Generic_fromJSON(StaneksGift, value.data);\n }\n}\n\nReviver.constructors.StaneksGift = StaneksGift;\n","import { Fragment, FragmentById } from \"./Fragment\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IActiveFragmentParams {\n x: number;\n y: number;\n rotation: number;\n fragment: Fragment;\n}\n\nexport class ActiveFragment {\n id: number;\n avgCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n\n constructor(params?: IActiveFragmentParams) {\n if (params) {\n this.id = params.fragment.id;\n this.x = params.x;\n this.y = params.y;\n this.avgCharge = 0;\n this.numCharge = 0;\n this.rotation = params.rotation;\n } else {\n this.id = -1;\n this.x = -1;\n this.y = -1;\n this.avgCharge = -1;\n this.numCharge = -1;\n this.rotation = -1;\n }\n }\n\n collide(other: ActiveFragment): boolean {\n const thisFragment = this.fragment();\n const otherFragment = other.fragment();\n // These 2 variables converts 'this' local coordinates to world to other local.\n const dx: number = other.x - this.x;\n const dy: number = other.y - this.y;\n for (let j = 0; j < thisFragment.shape.length; j++) {\n for (let i = 0; i < thisFragment.shape[j].length; i++) {\n if (thisFragment.fullAt(i, j, this.rotation) && otherFragment.fullAt(i - dx, j - dy, other.rotation))\n return true;\n }\n }\n\n return false;\n }\n\n fragment(): Fragment {\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n return fragment;\n }\n\n fullAt(worldX: number, worldY: number): boolean {\n return this.fragment().fullAt(worldX - this.x, worldY - this.y, this.rotation);\n }\n\n neighboors(): number[][] {\n return this.fragment()\n .neighboors(this.rotation)\n .map((cell) => [this.x + cell[0], this.y + cell[1]]);\n }\n\n copy(): ActiveFragment {\n // We have to do a round trip because the constructor.\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n const c = new ActiveFragment({ x: this.x, y: this.y, rotation: this.rotation, fragment: fragment });\n c.avgCharge = this.avgCharge;\n c.numCharge = this.numCharge;\n return c;\n }\n\n /**\n * Serialize an active fragment to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"ActiveFragment\", this);\n }\n\n /**\n * Initializes an acive fragment from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActiveFragment {\n return Generic_fromJSON(ActiveFragment, value.data);\n }\n}\n\nReviver.constructors.ActiveFragment = ActiveFragment;\n","/**\n * Class representing a visitable location in the world\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\nimport { LocationType } from \"./LocationTypeEnum\";\n\ninterface IInfiltrationMetadata {\n maxClearanceLevel: number;\n startingSecurityLevel: number;\n}\n\nexport interface IConstructorParams {\n city?: CityName | null;\n costMult?: number;\n expMult?: number;\n infiltrationData?: IInfiltrationMetadata;\n name?: LocationName;\n types?: LocationType[];\n techVendorMaxRam?: number;\n techVendorMinRam?: number;\n}\n\nexport class Location {\n /**\n * Name of city this location is in. If this property is null, it means this i\n * is a generic location that is available in all cities\n */\n city: CityName | null = null;\n\n /**\n * Cost multiplier that influences how expensive a gym/university is\n */\n costMult = 0;\n\n /**\n * Exp multiplier that influences how effective a gym/university is\n */\n expMult = 0;\n\n /**\n * Companies can be infiltrated. This contains the data required for that\n * infiltration event\n */\n infiltrationData?: IInfiltrationMetadata;\n\n /**\n * Identifier for location\n */\n name: LocationName = LocationName.Void;\n\n /**\n * List of what type(s) this location is. A location can be multiple types\n * (e.g. company and tech vendor)\n */\n types: LocationType[] = [];\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMaxRam = 0;\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMinRam = 0;\n\n constructor(p: IConstructorParams) {\n if (p.city) {\n this.city = p.city;\n }\n if (p.costMult) {\n this.costMult = p.costMult;\n }\n if (p.expMult) {\n this.expMult = p.expMult;\n }\n if (p.infiltrationData) {\n this.infiltrationData = p.infiltrationData;\n }\n if (p.name) {\n this.name = p.name;\n }\n if (p.types) {\n this.types = p.types;\n }\n if (p.techVendorMaxRam) {\n this.techVendorMaxRam = p.techVendorMaxRam;\n }\n if (p.techVendorMinRam) {\n this.techVendorMinRam = p.techVendorMinRam;\n }\n }\n}\n","/**\n * Creates a dropdown (select HTML element) with server hostnames as options\n *\n * Configurable to only contain certain types of servers\n */\nimport React from \"react\";\nimport { GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\n// TODO make this an enum when this gets converted to TypeScript\nexport const ServerType = {\n All: 0,\n Foreign: 1, // Hackable, non-owned servers\n Owned: 2, // Home Computer, Purchased Servers, and Hacknet Servers\n Purchased: 3, // Everything from Owned except home computer\n};\n\ninterface IProps {\n purchase: () => void;\n canPurchase: boolean;\n serverType: number;\n onChange: (event: SelectChangeEvent) => void;\n value: string;\n}\n\nexport function ServerDropdown(props: IProps): React.ReactElement {\n /**\n * Checks if the server should be shown in the dropdown menu, based on the\n * 'serverType' property\n */\n function isValidServer(s: BaseServer): boolean {\n const purchased = s instanceof Server && s.purchasedByPlayer;\n const type = props.serverType;\n switch (type) {\n case ServerType.All:\n return true;\n case ServerType.Foreign:\n return s.hostname !== \"home\" && !purchased;\n case ServerType.Owned:\n return purchased || s instanceof HacknetServer || s.hostname === \"home\";\n case ServerType.Purchased:\n return purchased || s instanceof HacknetServer;\n default:\n console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);\n return false;\n }\n }\n\n const servers = [];\n for (const server of GetAllServers()) {\n if (isValidServer(server)) {\n servers.push(\n \n {server.hostname}\n ,\n );\n }\n }\n\n return (\n \n Buy\n \n }\n sx={{ mx: 1 }}\n value={props.value}\n onChange={props.onChange}\n >\n {servers}\n \n );\n}\n","/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { CompanyLocation } from \"./CompanyLocation\";\nimport { GymLocation } from \"./GymLocation\";\nimport { HospitalLocation } from \"./HospitalLocation\";\nimport { SlumsLocation } from \"./SlumsLocation\";\nimport { SpecialLocation } from \"./SpecialLocation\";\nimport { TechVendorLocation } from \"./TechVendorLocation\";\nimport { TravelAgencyRoot } from \"./TravelAgencyRoot\";\nimport { UniversityLocation } from \"./UniversityLocation\";\nimport { CasinoLocation } from \"./CasinoLocation\";\n\nimport { Location } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { isBackdoorInstalled } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { use } from \"../../ui/Context\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function GenericLocation({ loc }: IProps): React.ReactElement {\n const router = use.Router();\n const player = use.Player();\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n function getLocationSpecificContent(): React.ReactNode[] {\n const content: React.ReactNode[] = [];\n\n if (loc.types.includes(LocationType.Company)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Gym)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Hospital)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Slums)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Special)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TechVendor)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TravelAgency)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.University)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Casino)) {\n content.push();\n }\n\n return content;\n }\n\n const locContent: React.ReactNode[] = getLocationSpecificContent();\n const server = GetServer(loc.name);\n const backdoorInstalled = server !== null && isBackdoorInstalled(server);\n\n return (\n <>\n \n \n {backdoorInstalled && !Settings.DisableTextEffects ? : loc.name}\n \n {locContent}\n \n );\n}\n","import React, { FC } from \"react\";\nimport { Card, Suit } from \"./Card\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Paper from \"@mui/material/Paper\";\n\ntype Props = {\n card: Card;\n hidden?: boolean;\n};\n\nconst useStyles = makeStyles(() =>\n createStyles({\n card: {\n padding: \"10px\",\n border: \"solid 1px #808080\",\n backgroundColor: \"white\",\n display: \"inline-block\",\n borderRadius: \"10px\",\n fontSize: \"18.5px\",\n textAlign: \"center\",\n margin: \"3px\",\n fontWeight: \"bold\",\n },\n red: {\n color: \"red\",\n },\n\n black: {\n color: \"black\",\n },\n value: {\n fontSize: \"20px\",\n fontFamily: \"sans-serif\",\n },\n }),\n);\n\nexport const ReactCard: FC = ({ card, hidden }) => {\n const classes = useStyles();\n let suit: React.ReactNode;\n switch (card.suit) {\n case Suit.Clubs:\n suit = ;\n break;\n case Suit.Diamonds:\n suit = ;\n break;\n case Suit.Hearts:\n suit = ;\n break;\n case Suit.Spades:\n suit = ;\n break;\n default:\n throw new Error(`MissingCaseException: ${card.suit}`);\n }\n return (\n \n <>\n {hidden ? \" - \" : card.formatValue()}\n {hidden ? \" - \" : suit}\n \n \n );\n};\n","import { Milestone } from \"./Milestone\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { GetServer } from \"../Server/AllServers\";\n\nfunction allFactionAugs(p: IPlayer, f: Faction): boolean {\n const factionAugs = f.augmentations.slice().filter((aug) => aug !== \"NeuroFlux Governor\");\n for (const factionAug of factionAugs) {\n if (\n !p.augmentations.some((aug) => {\n return aug.name == factionAug;\n })\n )\n return false;\n }\n return true;\n}\n\nexport const Milestones: Milestone[] = [\n {\n title: \"Gain root access on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"hasAdminRights\")) return false;\n return (server as any).hasAdminRights;\n },\n },\n {\n title: \"Install the backdoor on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"backdoorInstalled\")) return false;\n return (server as any).backdoorInstalled;\n },\n },\n {\n title: \"Join the faction hinted at in csec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(\"CyberSec\");\n },\n },\n {\n title: \"Install all the Augmentations from CyberSec\",\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[\"CyberSec\"]);\n },\n },\n {\n title: \"Join the faction hinted at in nitesec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(\"NiteSec\");\n },\n },\n {\n title: \"Install all the Augmentations from NiteSec\",\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[\"NiteSec\"]);\n },\n },\n {\n title: \"Join the faction hinted at in j3.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(\"The Black Hand\");\n },\n },\n {\n title: \"Install all the Augmentations from The Black Hand\",\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[\"The Black Hand\"]);\n },\n },\n {\n title: \"Join the faction hinted at in 19dfj3l1nd.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(\"BitRunners\");\n },\n },\n {\n title: \"Install all the Augmentations from BitRunners\",\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[\"BitRunners\"]);\n },\n },\n {\n title: \"Complete fl1ght.exe\",\n fulfilled: (p: IPlayer): boolean => {\n // technically wrong but whatever\n return p.factions.includes(\"Daedalus\");\n },\n },\n {\n title: \"Install the special Augmentation from Daedalus\",\n fulfilled: (p: IPlayer): boolean => {\n return p.augmentations.some((aug) => aug.name == \"The Red Pill\");\n },\n },\n {\n title: \"Install the final backdoor and free yourself.\",\n fulfilled: (): boolean => {\n return false;\n },\n },\n];\n","import { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function repFromDonation(amt: number, player: IPlayer): number {\n return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n}\n","import { StockSymbols } from \"./StockSymbols\";\n\nexport const TickerHeaderFormatData = {\n longestName: 0,\n longestSymbol: 0,\n};\n\nfor (const key in StockSymbols) {\n TickerHeaderFormatData.longestName = Math.max(key.length, TickerHeaderFormatData.longestName);\n TickerHeaderFormatData.longestSymbol = Math.max(StockSymbols[key].length, TickerHeaderFormatData.longestSymbol);\n}\n","import { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport interface WorkEarnings {\n workMoneyLossRate: number;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n}\n\nexport function calculateClassEarnings(player: IPlayer): WorkEarnings {\n const gameCPS = 1000 / CONSTANTS._idleSpeed;\n\n //Find cost and exp gain per game cycle\n let cost = 0;\n let hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = player.hashManager;\n switch (player.className) {\n case CONSTANTS.ClassStudyComputerScience:\n hackExp =\n ((CONSTANTS.ClassStudyComputerScienceBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassDataStructures:\n cost = (CONSTANTS.ClassDataStructuresBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassDataStructuresBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassNetworks:\n cost = (CONSTANTS.ClassNetworksBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassNetworksBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassAlgorithms:\n cost = (CONSTANTS.ClassAlgorithmsBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassAlgorithmsBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassManagement:\n cost = (CONSTANTS.ClassManagementBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassManagementBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassLeadership:\n cost = (CONSTANTS.ClassLeadershipBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassLeadershipBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassGymStrength:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n strExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDefense:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n defExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDexterity:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n dexExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymAgility:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n agiExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n }\n return {\n workMoneyLossRate: cost,\n workHackExpGainRate: hackExp * player.hacking_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workStrExpGainRate: strExp * player.strength_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDefExpGainRate: defExp * player.defense_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDexExpGainRate: dexExp * player.dexterity_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workAgiExpGainRate: agiExp * player.agility_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workChaExpGainRate: chaExp * player.charisma_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n };\n}\n","/* tslint:disable:max-line-length completed-docs variable-name*/\nimport { IMap } from \"../types\";\n\nexport const TerminalHelpText: string[] = [\n \"Type 'help name' to learn more about the command \",\n \"\",\n 'alias [-g] [name=\"value\"] Create or display Terminal aliases',\n \"analyze Get information about the current machine \",\n \"backdoor Install a backdoor on the current machine \",\n \"buy [-l/program] Purchase a program through the Dark Web\",\n \"cat [file] Display a .msg, .lit, or .txt file\",\n \"cd [dir] Change to a new directory\",\n \"check [script] [args...] Print a script's logs to Terminal\",\n \"clear Clear all text on the terminal \",\n \"cls See 'clear' command \",\n \"connect [hostname] Connects to a remote server\",\n \"cp [src] [dst]: Copy a file\",\n \"download [script/text file] Downloads scripts or text files to your computer\",\n \"expr [math expression] Evaluate a mathematical expression\",\n \"free Check the machine's memory (RAM) usage\",\n \"grow Spoof money in a servers bank account, increasing the amount available.\",\n \"hack Hack the current machine\",\n \"help [command] Display this help text, or the help text for a command\",\n \"home Connect to home computer\",\n \"hostname Displays the hostname of the machine\",\n \"kill [script/pid] [args...] Stops the specified script on the current server \",\n \"killall Stops all running scripts on the current machine\",\n \"ls [dir] [| grep pattern] Displays all files on the machine\",\n \"lscpu Displays the number of CPU cores on the machine\",\n \"mem [script] [-t] [n] Displays the amount of RAM required to run the script\",\n \"mv [src] [dest] Move/rename a text or script file\",\n \"nano [file] Text editor - Open up and edit a script or text file\",\n \"ps Display all scripts that are currently running\",\n \"rm [file] Delete a file from the server\",\n \"run [name] [-t n] [--tail] [args...] Execute a program or script\",\n \"scan Prints all immediately-available network connections\",\n \"scan-analyze [d] [-a] Prints info for all servers up to d nodes away\",\n \"scp [file] [server] Copies a file to a destination server\",\n \"sudov Shows whether you have root access on this computer\",\n \"tail [script] [args...] Displays dynamic logs for the specified script\",\n \"top Displays all running scripts and their RAM usage\",\n \"unalias [alias name] Deletes the specified alias\",\n \"weaken [server] Reduce the security of a server\",\n \"wget [url] [target file] Retrieves code/text from a web server\",\n];\n\nexport const HelpTexts: IMap = {\n alias: [\n 'alias [-g] [name=\"value\"] ',\n \" \",\n \"Create or display aliases. An alias enables a replacement of a word with another string. \",\n \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \",\n \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \",\n \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \",\n \" \",\n 'alias nuke=\"run NUKE.exe\"',\n \" \",\n \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \",\n \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \",\n \"example, if the following alias was set: \",\n \" \",\n 'alias worm=\"HTTPWorm.exe\"',\n \" \",\n \"and then you tried to run the following terminal command: \",\n \" \",\n \"run worm\",\n \" \",\n \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \",\n \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \",\n \" \",\n 'alias -g worm=\"HTTPWorm.exe\"',\n \" \",\n \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \",\n \" \",\n \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \",\n \"'alias NAME=VALUE' on the Terminal. \",\n \" \",\n \"The 'unalias' command can be used to remove aliases.\",\n \" \",\n ],\n analyze: [\n \"analze\",\n \" \",\n \"Prints details and statistics about the current server. The information that is printed includes basic \",\n \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \",\n \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \",\n \"available on the server, etc.\",\n ],\n backdoor: [\n \"backdoor\",\n \" \",\n \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\",\n \" \",\n \"Requires root access to run.\",\n \" \",\n ],\n buy: [\n \"buy [-l / program]\",\n \" \",\n \"Purchase a program through the Dark Web. Requires a TOR router to use.\",\n \" \",\n \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \",\n \"dark web to the Terminal, as well as their costs.\",\n \" \",\n \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\",\n ],\n cat: [\n \"cat [file]\",\n \" \",\n \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\",\n \" \",\n \"cat j1.msg\",\n \" \",\n \"cat foo.lit\",\n \" \",\n \"cat servers.txt\",\n ],\n cd: [\n \"cd [dir]\",\n \" \",\n \"Change to the specified directory. Note that this works even for directories that don't exist. If you \",\n \"change to a directory that does not exist, it will not be 'created'. Examples:\",\n \" \",\n \"cd scripts/hacking\",\n \" \",\n \"cd /logs\",\n \" \",\n \"cd ../\",\n ],\n check: [\n \"check [script name] [args...]\",\n \" \",\n \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \",\n \"a space. Remember that a running script is uniquely \",\n \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \",\n \" \",\n \"run foo.script 1 2 foodnstuff\",\n \" \",\n \"Then to run the 'check' command on this script you would have to pass the same arguments in: \",\n \" \",\n \"check foo.script 1 2 foodnstuff\",\n ],\n clear: [\n \"clear\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"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\",\n ],\n cls: [\n \"cls\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"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\",\n ],\n connect: [\n \"connect [hostname]\",\n \" \",\n \"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument \",\n \"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To \",\n \"see which servers can be connected to, use the 'scan' command.\",\n ],\n cp: [\"cp [src] [dst]\", \" \", \"Copy a file on this server. To copy a file to another server use scp.\"],\n download: [\n \"download [script/text file]\",\n \" \",\n \"Downloads a script or text file to your computer (like your real life computer).\",\n \" \",\n \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\",\n \" \",\n \"Download all scripts and text files: download *\",\n \" \",\n \"Download all scripts: download *.script\",\n \" \",\n \"Download all text files: download *.txt\",\n \" \",\n ],\n expr: [\n \"expr [mathematical expression]\",\n \" \",\n \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\",\n \" \",\n \"+, -, /, *, **, %\",\n \" \",\n \"Example:\",\n \" \",\n \"expr 25 * 2 ** 10\",\n \" \",\n \"Note that letters (non-digits) are not allowed and will be removed from the input.\",\n ],\n free: [\n \"free\",\n \" \",\n \"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \",\n \"how much of it is being used.\",\n ],\n grow: [\n \"grow\",\n \"\",\n \"Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.\",\n \"See the wiki page for hacking mechanics.\",\n ],\n hack: [\n \"hack\",\n \" \",\n \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\",\n \" \",\n ],\n help: [\n \"help [command]\",\n \" \",\n \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \",\n \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \",\n \"more detailed information about the Terminal command. Examples: \",\n \" \",\n \"help alias\",\n \" \",\n \"help scan-analyze\",\n ],\n home: [\n \"home\" + \"Connect to your home computer. This will work no matter what server you are currently connected to.\",\n ],\n hostname: [\"hostname\", \" \", \"Prints the hostname of the current server\"],\n kill: [\n \"kill [script name] [args...]\",\n \" \",\n \"kill [pid]\",\n \" \",\n \"Kill the script specified by the script name and arguments OR by its PID.\",\n \" \",\n \"If you are killing the script using its filename and arguments, then each \",\n \"argument must be separated by a space. Remember that a running script is \",\n \"uniquely identified by both its name and the arguments that are used to start \",\n \"it. So, if a script was ran with the following arguments:\",\n \" \",\n \"run foo.script 1 sigma-cosmetics\",\n \" \",\n \"Then to kill this script the same arguments would have to be used:\",\n \" \",\n \"kill foo.script 1 sigma-cosmetics\",\n \" \",\n \"If you are killing the script using its PID, then the PID argument must be numeric\",\n ],\n killall: [\n \"killall\",\n \" \",\n \"Kills all scripts on the current server. \",\n \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \",\n \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \",\n \"The script will not be stopped/killed until after that time has elapsed.\",\n ],\n ls: [\n \"ls [dir] [| grep pattern]\",\n \" \",\n \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \",\n \"The files will be displayed in alphabetical order. \",\n \" \",\n \"The 'dir' optional parameter can be used to display files/directories in another directory.\",\n \" \",\n \"The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\",\n \" \",\n \"Examples:\",\n \" \",\n \"List all files with the '.script' extension in the current directory:\",\n \" \",\n \"ls | grep .script\",\n \" \",\n \"List all files with the '.js' extension in the root directory:\",\n \" \",\n \"ls / | grep .js\",\n \" \",\n \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\",\n \" \",\n \"ls scripts | grep purchase\",\n ],\n lscpu: [\"lscpu\", \" \", \"Prints the number of CPU Cores the current server has\"],\n\n mem: [\n \"mem [script name] [-t num_threads]\",\n \" \",\n \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \",\n \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \",\n \"an argument for the number of threads must be passed in afterwards. Examples:\",\n \" \",\n \"mem foo.script\",\n \" \",\n \"mem foo.script -t 50\",\n \" \",\n \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \",\n \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\",\n ],\n mv: [\n \"mv [src] [dest]\",\n \" \",\n \"Move the source file to the specified destination. This can also be used to rename files. \",\n \"This command only works for scripts and text files (.txt). This command CANNOT be used to \",\n \"convert to different file types\",\n \" \",\n \"Note that, unlike the Linux 'mv' command, the destination argument must be the \",\n \"full filepath. \",\n \"Examples: \",\n \" \",\n \"mv hacking-controller.script scripts/hacking-controller.script\",\n \" \",\n \"mv myScript.js myOldScript.js\",\n ],\n nano: [\n \"nano [file name]\",\n \" \",\n \"Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be \",\n \"edited using the Text Editor. If the file does not already exist, then a new, empty one \",\n \"will be created\",\n ],\n ps: [\"ps\", \" \", \"Prints all scripts that are running on the current server\"],\n\n rm: [\n \"rm [file]\",\n \" \",\n \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \",\n \" \",\n \"WARNING: This is permanent and cannot be undone\",\n ],\n run: [\n \"run [file name] [-t] [num threads] [args...]\",\n \" \",\n \"Execute a program or a script.\",\n \" \",\n \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \",\n \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \",\n \"then the script will be run with a single thread by default. \",\n \"If the '-t' flag is used, then it MUST come immediately \",\n \"after the script name, and the [num threads] argument MUST come immediately afterwards. \",\n \" \",\n \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \",\n \"about script arguments. Each specified argument must be separated by a space. \",\n \" \",\n ],\n scan: [\n \"scan\",\n \" \",\n \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \",\n \"to using the 'connect' Terminal command.\",\n ],\n \"scan-analyze\": [\n \"scan-analyze [depth] [-a]\",\n \" \",\n \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \",\n \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \",\n \"command. This command also shows the relative paths to reach each server.\",\n \" \",\n \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \",\n \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \",\n \"5 and 10, respectively.\",\n \" \",\n \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \",\n \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \",\n \"it has.\",\n \" \",\n \"By default, this command will not display servers that you have purchased. However, you can pass in the \",\n \"-a flag at the end of the command if you would like to enable that.\",\n ],\n scp: [\n \"scp [filename] [target server]\",\n \" \",\n \"Copies the specified file from the current server to the target server. \",\n \"This command only works for script files (.script extension), literature files (.lit extension), \",\n \"and text files (.txt extension). \",\n \"The second argument passed in must be the hostname or IP of the target server.\",\n ],\n sudov: [\"sudov\", \" \", \"Prints whether or not you have root access to the current machine\"],\n\n tail: [\n \"tail [script name] [args...]\",\n \" \",\n \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \",\n \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \",\n \"to run it. So, if a script was ran with the following arguments: \",\n \" \",\n \"run foo.script 10 50000\",\n \" \",\n \"Then in order to check its logs with 'tail' the same arguments must be used: \",\n \" \",\n \"tail foo.script 10 50000\",\n ],\n top: [\n \"top\",\n \" \",\n \"Prints a list of all scripts running on the current server as well as their thread count and how much \",\n \"RAM they are using in total.\",\n ],\n unalias: [\n \"unalias [alias name]\",\n \" \",\n \"Deletes the specified alias. Note that the double quotation marks are required. \",\n \" \",\n \"As an example, if an alias was declared using:\",\n \" \",\n 'alias r=\"run\"',\n \" \",\n \"Then it could be removed using:\",\n \" \",\n \"unalias r\",\n \" \",\n \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\",\n ],\n weaken: [\n \"weaken\",\n \"\",\n \"Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.\",\n \"Requires root access. See the wiki page for hacking mechanics.\",\n ],\n wget: [\n \"wget [url] [target file]\",\n \" \",\n \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \",\n \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \",\n \"it will be overwritten by this command.\",\n \" \",\n \"Note that it will not be possible to download data from many websites because they do not allow \",\n \"cross-origin resource sharing (CORS). Example:\",\n \" \",\n \"wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\",\n ],\n};\n","import { ITerminal, Output, Link, RawOutput, TTimer } from \"./ITerminal\";\nimport { IRouter } from \"../ui/Router\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { Programs } from \"../Programs/Programs\";\nimport { CodingContractResult } from \"../CodingContracts\";\nimport { TerminalEvents, TerminalClearEvents } from \"./TerminalEvents\";\n\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\n\nimport { removeLeadingSlash, isInRootDirectory, evaluateFilePath } from \"./DirectoryHelpers\";\nimport { checkIfConnectedToDarkweb } from \"../DarkWeb/DarkWeb\";\nimport { iTutorialNextStep, iTutorialSteps, ITutorial } from \"../InteractiveTutorial\";\nimport { getServerOnNetwork, processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { ParseCommand, ParseCommands } from \"./Parser\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\n\nimport { alias } from \"./commands/alias\";\nimport { analyze } from \"./commands/analyze\";\nimport { backdoor } from \"./commands/backdoor\";\nimport { buy } from \"./commands/buy\";\nimport { cat } from \"./commands/cat\";\nimport { cd } from \"./commands/cd\";\nimport { check } from \"./commands/check\";\nimport { connect } from \"./commands/connect\";\nimport { cp } from \"./commands/cp\";\nimport { download } from \"./commands/download\";\nimport { expr } from \"./commands/expr\";\nimport { free } from \"./commands/free\";\nimport { grow } from \"./commands/grow\";\nimport { hack } from \"./commands/hack\";\nimport { help } from \"./commands/help\";\nimport { home } from \"./commands/home\";\nimport { hostname } from \"./commands/hostname\";\nimport { kill } from \"./commands/kill\";\nimport { killall } from \"./commands/killall\";\nimport { ls } from \"./commands/ls\";\nimport { lscpu } from \"./commands/lscpu\";\nimport { mem } from \"./commands/mem\";\nimport { mv } from \"./commands/mv\";\nimport { nano } from \"./commands/nano\";\nimport { ps } from \"./commands/ps\";\nimport { rm } from \"./commands/rm\";\nimport { run } from \"./commands/run\";\nimport { scan } from \"./commands/scan\";\nimport { scananalyze } from \"./commands/scananalyze\";\nimport { scp } from \"./commands/scp\";\nimport { sudov } from \"./commands/sudov\";\nimport { tail } from \"./commands/tail\";\nimport { top } from \"./commands/top\";\nimport { unalias } from \"./commands/unalias\";\nimport { weaken } from \"./commands/weaken\";\nimport { wget } from \"./commands/wget\";\n\nexport class Terminal implements ITerminal {\n // Flags to determine whether the player is currently running a hack or an analyze\n action: TTimer | null = null;\n\n commandHistory: string[] = [];\n commandHistoryIndex = 0;\n\n outputHistory: (Output | Link | RawOutput)[] = [new Output(`Bitburner v${CONSTANTS.VersionString}`, \"primary\")];\n\n // True if a Coding Contract prompt is opened\n contractOpen = false;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir = \"/\";\n\n process(router: IRouter, player: IPlayer, cycles: number): void {\n if (this.action === null) return;\n this.action.timeLeft -= (CONSTANTS._idleSpeed * cycles) / 1000;\n if (this.action.timeLeft < 0.01) this.finishAction(router, player, false);\n TerminalEvents.emit();\n }\n\n append(item: Output | Link | RawOutput): void {\n this.outputHistory.push(item);\n if (this.outputHistory.length > Settings.MaxTerminalCapacity) {\n this.outputHistory.splice(0, this.outputHistory.length - Settings.MaxTerminalCapacity);\n }\n TerminalEvents.emit();\n }\n\n print(s: string): void {\n this.append(new Output(s, \"primary\"));\n }\n\n printRaw(node: React.ReactNode): void {\n this.append(new RawOutput(node));\n }\n\n error(s: string): void {\n this.append(new Output(s, \"error\"));\n }\n\n success(s: string): void {\n this.append(new Output(s, \"success\"));\n }\n\n info(s: string): void {\n this.append(new Output(s, \"info\"));\n }\n\n warn(s: string): void {\n this.append(new Output(s, \"warn\"));\n }\n\n startHack(player: IPlayer): void {\n // Hacking through Terminal should be faster than hacking through a script\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"h\");\n }\n\n startGrow(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateGrowTime(server, player) / 16, \"g\");\n }\n startWeaken(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateWeakenTime(server, player) / 16, \"w\");\n }\n\n startBackdoor(player: IPlayer): void {\n // Backdoor should take the same amount of time as hack\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot backdoor this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"b\");\n }\n\n startAnalyze(): void {\n this.print(\"Analyzing system...\");\n this.startAction(1, \"a\");\n }\n\n startAction(n: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\"): void {\n this.action = new TTimer(n, action);\n }\n\n // Complete the hack/analyze command\n finishHack(router: IRouter, player: IPlayer, cancelled = false): void {\n if (cancelled) return;\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n\n // Calculate whether hack was successful\n const hackChance = calculateHackingChance(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = calculateHackingExpGain(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n router.toBitVerse(false, false);\n return;\n }\n let moneyGained = calculatePercentMoneyHacked(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain);\n\n server.fortify(CONSTANTS.ServerFortifyAmount);\n\n this.print(\n `Hack successful! Gained ${numeralWrapper.formatMoney(moneyGained)} and ${numeralWrapper.formatExp(\n expGainedOnSuccess,\n )} hacking exp`,\n );\n } else {\n // Failure\n player.gainHackingExp(expGainedOnFailure);\n this.print(\n `Failed to hack ${server.hostname}. Gained ${numeralWrapper.formatExp(expGainedOnFailure)} hacking exp`,\n );\n }\n }\n\n finishGrow(player: IPlayer, cancelled = false): void {\n if (cancelled) return;\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const growth = processSingleServerGrowth(server, 25, player, server.cpuCores) - 1;\n this.print(\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n growth,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n }\n\n finishWeaken(player: IPlayer, cancelled = false): void {\n if (cancelled) return;\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n server.weaken(CONSTANTS.ServerWeakenAmount);\n this.print(\n `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${numeralWrapper.formatExp(\n expGain,\n )} hacking exp.`,\n );\n }\n\n finishBackdoor(router: IRouter, player: IPlayer, cancelled = false): void {\n if (!cancelled) {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n if (SpecialServers.WorldDaemon === server.hostname) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n router.toBitVerse(false, false);\n return;\n }\n server.backdoorInstalled = true;\n this.print(\"Backdoor successful!\");\n }\n }\n\n finishAnalyze(player: IPlayer, cancelled = false): void {\n if (!cancelled) {\n const currServ = player.getCurrentServer();\n const isHacknet = currServ instanceof HacknetServer;\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = (!isHacknet && currServ.hasAdminRights) || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n if (currServ instanceof Server) {\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? numeralWrapper.formatServerSecurity(security) : \"N/A\"));\n const hackingChance = calculateHackingChance(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? numeralWrapper.formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = calculateHackingTime(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? convertTimeMsToTimeElapsedString(hackingTime, true) : \"N/A\"));\n }\n this.print(\n `Total money available on server: ${\n currServ instanceof Server ? numeralWrapper.formatMoney(currServ.moneyAvailable) : \"N/A\"\n }`,\n );\n if (currServ instanceof Server) {\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n }\n\n finishAction(router: IRouter, player: IPlayer, cancelled = false): void {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n this.print(this.getProgressText());\n if (this.action.action === \"h\") {\n this.finishHack(router, player, cancelled);\n } else if (this.action.action === \"g\") {\n this.finishGrow(player, cancelled);\n } else if (this.action.action === \"w\") {\n this.finishWeaken(player, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, cancelled);\n }\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n this.action = null;\n TerminalEvents.emit();\n }\n\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null {\n if (isScriptFilename(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename: string): string {\n const path = evaluateFilePath(filename, this.cwd());\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (isInRootDirectory(path)) {\n return removeLeadingSlash(path);\n }\n\n return path;\n }\n\n getScript(player: IPlayer, filename: string): Script | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player: IPlayer, filename: string): TextFile | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player: IPlayer, filename: string): string | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd(): string {\n return this.currDir;\n }\n\n setcwd(dir: string): void {\n this.currDir = dir;\n TerminalEvents.emit();\n }\n\n async runContract(player: IPlayer, contractName: string): Promise {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case CodingContractResult.Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n serv.removeContract(contract);\n break;\n case CodingContractResult.Failure:\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n this.error(\"Contract FAILED - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.error(`Contract FAILED - ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n break;\n case CodingContractResult.Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player: IPlayer, depth = 1, all = false): void {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \");\n\n // Map of all servers to keep track of which have been visited\n const visited: {\n [key: string]: number | undefined;\n } = {};\n for (const server of GetAllServers()) {\n visited[server.hostname] = 0;\n }\n\n const stack: BaseServer[] = [];\n const depthQueue: number[] = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof HacknetServer;\n if (!all && (s as any).purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.hostname] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.hostname] = 1;\n }\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = getServerOnNetwork(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n if (d == 0) {\n continue;\n } // Don't print current server\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n if (player.hasProgram(Programs.AutoLink.name)) {\n this.append(new Link(titleDashes, s.hostname));\n } else {\n this.print(titleDashes + s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n let out = `${dashes}Root Access: ${c}${\n !isHacknet ? \", Required hacking skill: \" + (s as any).requiredHackingSkill : \"\"\n }`;\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n out += \"\\n\" + dashes + \"Number of open ports required to NUKE: \" + (s as any).numOpenPortsRequired;\n }\n out += \"\\n\" + dashes + \"RAM: \" + numeralWrapper.formatRAM(s.maxRam);\n out += \"\\n\" + \" \";\n this.print(out);\n }\n }\n\n connectToServer(player: IPlayer, server: string): void {\n const serv = GetServer(server);\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.hostname;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n if (player.getCurrentServer().hostname == \"darkweb\") {\n checkIfConnectedToDarkweb(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router: IRouter, player: IPlayer, commands: string): void {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n\n // Handle Terminal History - multiple commands should be saved as one\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n }\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = ParseCommands(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear(): void {\n this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString}`, \"primary\")];\n TerminalEvents.emit();\n TerminalClearEvents.emit();\n }\n\n prestige(): void {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router: IRouter, player: IPlayer, command: string): void {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n }\n // Allow usage of ./\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n }\n // Only split the first space\n const commandArray = ParseCommand(command);\n if (commandArray.length == 0) {\n return;\n }\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n if (ITutorial.isRunning) {\n const n00dlesServ = GetServer(\"n00dles\");\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n return;\n }\n switch (ITutorial.currStep) {\n case iTutorialSteps.TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalConnect:\n if (commandArray.length == 2) {\n if (\n commandArray[0] == \"connect\" &&\n (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.hostname)\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalGoHome:\n if (commandArray.length == 1 && commandArray[0] == \"home\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n default:\n this.error(\"Please follow the tutorial, or click 'EXIT' if you'd like to skip it\");\n return;\n }\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n /* Command parser */\n const commandName = commandArray[0];\n if (typeof commandName === \"number\" || typeof commandName === \"boolean\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands: {\n [key: string]: (\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n ) => void;\n } = {\n \"scan-analyze\": scananalyze,\n alias: alias,\n analyze: analyze,\n backdoor: backdoor,\n buy: buy,\n cat: cat,\n cd: cd,\n check: check,\n clear: () => this.clear(),\n cls: () => this.clear(),\n connect: connect,\n cp: cp,\n download: download,\n expr: expr,\n free: free,\n grow: grow,\n hack: hack,\n help: help,\n home: home,\n hostname: hostname,\n kill: kill,\n killall: killall,\n ls: ls,\n lscpu: lscpu,\n mem: mem,\n mv: mv,\n nano: nano,\n ps: ps,\n rm: rm,\n run: run,\n scan: scan,\n scp: scp,\n sudov: sudov,\n tail: tail,\n top: top,\n unalias: unalias,\n weaken: weaken,\n wget: wget,\n };\n\n const f = commands[commandName.toLowerCase()];\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText(): string {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return createProgressBarText({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50,\n });\n }\n}\n","import { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\n/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */\n\n/* Function that generates a valid 'data' for a contract type */\nexport type GeneratorFunc = () => any;\n\n/* Function that checks if the provided solution is the correct one */\nexport type SolverFunc = (data: any, answer: string) => boolean;\n\n/* Function that returns a string with the problem's description.\n Requires the 'data' of a Contract as input */\nexport type DescriptionFunc = (data: any) => string;\n\ninterface ICodingContractTypeMetadata {\n desc: DescriptionFunc;\n difficulty: number;\n gen: GeneratorFunc;\n name: string;\n numTries: number;\n solver: SolverFunc;\n}\n\n/* Helper functions for Coding Contract implementations */\nfunction removeBracketsFromArrayString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith(\"[\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith(\"]\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction removeQuotesFromString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith('\"') || strCpy.startsWith(\"'\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith('\"') || strCpy.endsWith(\"'\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction convert2DArrayToString(arr: any[][]): string {\n const components: string[] = [];\n arr.forEach((e: any) => {\n let s: string = e.toString();\n s = [\"[\", s, \"]\"].join(\"\");\n components.push(s);\n });\n\n return components.join(\",\").replace(/\\s/g, \"\");\n}\n\nexport const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [\n {\n desc: (n: number): string => {\n return [\"A prime factor is a factor that is a prime number.\", `What is the largest prime factor of ${n}?`].join(\n \" \",\n );\n },\n difficulty: 1,\n gen: (): number => {\n return getRandomInt(500, 1e9);\n },\n name: \"Find Largest Prime Factor\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n let fac = 2;\n let n: number = data;\n while (n > (fac - 1) * (fac - 1)) {\n while (n % fac === 0) {\n n = Math.round(n / fac);\n }\n ++fac;\n }\n\n return (n === 1 ? fac - 1 : n) === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[]): string => {\n return [\n \"Given the following integer array, find the contiguous subarray\",\n \"(containing at least one number) which has the largest sum and return that sum.\",\n \"'Sum' refers to the sum of all the numbers in the subarray.\\n\",\n `${n.toString()}`,\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(5, 40);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(-10, 10);\n }\n\n return arr;\n },\n name: \"Subarray with Maximum Sum\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const nums: number[] = data.slice();\n for (let i = 1; i < nums.length; i++) {\n nums[i] = Math.max(nums[i], nums[i] + nums[i - 1]);\n }\n\n return parseInt(ans, 10) === Math.max(...nums);\n },\n },\n {\n desc: (n: number): string => {\n return [\n \"It is possible write four as a sum in exactly four different ways:\\n\\n\",\n \"    3 + 1\\n\",\n \"    2 + 2\\n\",\n \"    2 + 1 + 1\\n\",\n \"    1 + 1 + 1 + 1\\n\\n\",\n `How many different ways can the number ${n} be written as a sum of at least`,\n \"two positive integers?\",\n ].join(\" \");\n },\n difficulty: 1.5,\n gen: (): number => {\n return getRandomInt(8, 100);\n },\n name: \"Total Ways to Sum\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n const ways: number[] = [1];\n ways.length = data + 1;\n ways.fill(0, 1);\n for (let i = 1; i < data; ++i) {\n for (let j: number = i; j <= data; ++j) {\n ways[j] += ways[j - i];\n }\n }\n\n return ways[data] === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[][]): string => {\n let d: string = [\n \"Given the following array of array of numbers representing a 2D matrix,\",\n \"return the elements of the matrix as an array in spiral order:\\n\\n\",\n ].join(\" \");\n // for (const line of n) {\n // d += `${line.toString()},\\n`;\n // }\n d += \"    [\\n\";\n d += n\n .map(\n (line: number[]) =>\n \"        [\" +\n line.map((x: number) => `${x}`.padStart(2, \" \")).join(\",\") +\n \"]\",\n )\n .join(\"\\n\");\n d += \"\\n    ]\\n\";\n d += [\n \"\\nHere is an example of what spiral order should be:\\n\\n\",\n \"    [\\n\",\n \"        [1, 2, 3]\\n\",\n \"        [4, 5, 6]\\n\",\n \"        [7, 8, 9]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\\n\\n\",\n \"Note that the matrix will not always be square:\\n\\n\",\n \"    [\\n\",\n \"        [1,  2,  3,  4]\\n\",\n \"        [5,  6,  7,  8]\\n\",\n \"        [9, 10, 11, 12]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\",\n ].join(\" \");\n\n return d;\n },\n difficulty: 2,\n gen: (): number[][] => {\n const m: number = getRandomInt(1, 15);\n const n: number = getRandomInt(1, 15);\n const matrix: number[][] = [];\n matrix.length = m;\n for (let i = 0; i < m; ++i) {\n matrix[i] = [];\n matrix[i].length = n;\n }\n\n for (let i = 0; i < m; ++i) {\n for (let j = 0; j < n; ++j) {\n matrix[i][j] = getRandomInt(1, 50);\n }\n }\n\n return matrix;\n },\n name: \"Spiralize Matrix\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const spiral: number[] = [];\n const m: number = data.length;\n const n: number = data[0].length;\n let u = 0;\n let d: number = m - 1;\n let l = 0;\n let r: number = n - 1;\n let k = 0;\n while (true) {\n // Up\n for (let col: number = l; col <= r; col++) {\n spiral[k] = data[u][col];\n ++k;\n }\n if (++u > d) {\n break;\n }\n\n // Right\n for (let row: number = u; row <= d; row++) {\n spiral[k] = data[row][r];\n ++k;\n }\n if (--r < l) {\n break;\n }\n\n // Down\n for (let col: number = r; col >= l; col--) {\n spiral[k] = data[d][col];\n ++k;\n }\n if (--d < u) {\n break;\n }\n\n // Left\n for (let row: number = d; row >= u; row--) {\n spiral[k] = data[row][l];\n ++k;\n }\n if (++l > r) {\n break;\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAns: any[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < playerAns.length; ++i) {\n playerAns[i] = parseInt(playerAns[i], 10);\n }\n if (spiral.length !== playerAns.length) {\n return false;\n }\n for (let i = 0; i < spiral.length; ++i) {\n if (spiral[i] !== playerAns[i]) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (arr: number[]): string => {\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine whether you are\",\n \"able to reach the last index exactly.\\n\\n\",\n \"Your answer should be submitted as 1 or 0, representing true and false respectively\",\n ].join(\" \");\n },\n difficulty: 2.5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; ++i) {\n if (Math.random() < 0.2) {\n arr[i] = 0; // 20% chance of being 0\n } else {\n arr[i] = getRandomInt(0, 10);\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game\",\n numTries: 1,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data.length;\n let i = 0;\n for (let reach = 0; i < n && i <= reach; ++i) {\n reach = Math.max(i + data[i], reach);\n }\n const solution: boolean = i === n;\n\n if (ans === \"1\" && solution) {\n return true;\n }\n if (ans === \"0\" && !solution) {\n return true;\n }\n\n return false;\n },\n },\n {\n desc: (arr: number[][]): string => {\n return [\n \"Given the following array of array of numbers representing a list of\",\n \"intervals, merge all overlapping intervals.\\n\\n\",\n `[${convert2DArrayToString(arr)}]\\n\\n`,\n \"Example:\\n\\n\",\n \"[[1, 3], [8, 10], [2, 6], [10, 16]]\\n\\n\",\n \"would merge into [[1, 6], [8, 16]].\\n\\n\",\n \"The intervals must be returned in ASCENDING order.\",\n \"You can assume that in an interval, the first number will always be\",\n \"smaller than the second.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[][] => {\n const intervals: number[][] = [];\n const numIntervals: number = getRandomInt(3, 20);\n for (let i = 0; i < numIntervals; ++i) {\n const start: number = getRandomInt(1, 25);\n const end: number = start + getRandomInt(1, 10);\n intervals.push([start, end]);\n }\n\n return intervals;\n },\n name: \"Merge Overlapping Intervals\",\n numTries: 15,\n solver: (data: number[][], ans: string): boolean => {\n const intervals: number[][] = data.slice();\n intervals.sort((a: number[], b: number[]) => {\n return a[0] - b[0];\n });\n\n const result: number[][] = [];\n let start: number = intervals[0][0];\n let end: number = intervals[0][1];\n for (const interval of intervals) {\n if (interval[0] <= end) {\n end = Math.max(end, interval[1]);\n } else {\n result.push([start, end]);\n start = interval[0];\n end = interval[1];\n }\n }\n result.push([start, end]);\n\n const sanitizedResult: string = convert2DArrayToString(result);\n const sanitizedAns: string = ans.replace(/\\s/g, \"\");\n\n return sanitizedResult === sanitizedAns || sanitizedResult === removeBracketsFromArrayString(sanitizedAns);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string containing only digits, return\",\n \"an array with all possible valid IP address combinations\",\n \"that can be created from the string:\\n\\n\",\n `${data}\\n\\n`,\n \"Note that an octet cannot begin with a '0' unless the number\",\n \"itself is actually 0. For example, '192.168.010.1' is not a valid IP.\\n\\n\",\n \"Examples:\\n\\n\",\n \"25525511135 -> [255.255.11.135, 255.255.111.35]\\n\",\n \"1938718066 -> [193.87.180.66]\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): string => {\n let str = \"\";\n for (let i = 0; i < 4; ++i) {\n const num: number = getRandomInt(0, 255);\n const convNum: string = num.toString();\n str += convNum;\n }\n\n return str;\n },\n name: \"Generate IP Addresses\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n const ret: string[] = [];\n for (let a = 1; a <= 3; ++a) {\n for (let b = 1; b <= 3; ++b) {\n for (let c = 1; c <= 3; ++c) {\n for (let d = 1; d <= 3; ++d) {\n if (a + b + c + d === data.length) {\n const A: number = parseInt(data.substring(0, a), 10);\n const B: number = parseInt(data.substring(a, a + b), 10);\n const C: number = parseInt(data.substring(a + b, a + b + c), 10);\n const D: number = parseInt(data.substring(a + b + c, a + b + c + d), 10);\n if (A <= 255 && B <= 255 && C <= 255 && D <= 255) {\n const ip: string = [A.toString(), \".\", B.toString(), \".\", C.toString(), \".\", D.toString()].join(\"\");\n if (ip.length === data.length + 3) {\n ret.push(ip);\n }\n }\n }\n }\n }\n }\n }\n\n const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const ansArr: string[] = sanitizedAns.split(\",\");\n if (ansArr.length !== ret.length) {\n return false;\n }\n for (const ipInAns of ansArr) {\n if (!ret.includes(ipInAns)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"one transaction (i.e. you can only buy and sell the stock once). If no profit can be made\",\n \"then the answer should be 0. Note\",\n \"that you have to buy the stock before you can sell it\",\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader I\",\n numTries: 5,\n solver: (data: number[], ans: string): boolean => {\n let maxCur = 0;\n let maxSoFar = 0;\n for (let i = 1; i < data.length; ++i) {\n maxCur = Math.max(0, (maxCur += data[i] - data[i - 1]));\n maxSoFar = Math.max(maxCur, maxSoFar);\n }\n\n return maxSoFar.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using as many\",\n \"transactions as you'd like. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader II\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let profit = 0;\n for (let p = 1; p < data.length; ++p) {\n profit += Math.max(data[p] - data[p - 1], 0);\n }\n\n return profit.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"two transactions. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader III\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let hold1: number = Number.MIN_SAFE_INTEGER;\n let hold2: number = Number.MIN_SAFE_INTEGER;\n let release1 = 0;\n let release2 = 0;\n for (const price of data) {\n release2 = Math.max(release2, hold2 + price);\n hold2 = Math.max(hold2, release1 - price);\n release1 = Math.max(release1, hold1 + price);\n hold1 = Math.max(hold1, price * -1);\n }\n\n return release2.toString() === ans;\n },\n },\n {\n desc: (data: any[]): string => {\n const k: number = data[0];\n const prices: number[] = data[1];\n return [\n \"You are given the following array with two elements:\\n\\n\",\n `[${k}, [${prices}]]\\n\\n`,\n \"The first element is an integer k. The second element is an\",\n \"array of stock prices (which are numbers) where the i-th element\",\n \"represents the stock price on day i.\\n\\n\",\n \"Determine the maximum possible profit you can earn using at most\",\n \"k transactions. A transaction is defined as buying and then selling\",\n \"one share of the stock. Note that you cannot engage in multiple\",\n \"transactions at once. In other words, you must sell the stock before\",\n \"you can buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 8,\n gen: (): any[] => {\n const k: number = getRandomInt(2, 10);\n const len: number = getRandomInt(3, 50);\n const prices: number[] = [];\n prices.length = len;\n for (let i = 0; i < len; ++i) {\n prices[i] = getRandomInt(1, 200);\n }\n\n return [k, prices];\n },\n name: \"Algorithmic Stock Trader IV\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const k: number = data[0];\n const prices: number[] = data[1];\n\n const len = prices.length;\n if (len < 2) {\n return parseInt(ans) === 0;\n }\n if (k > len / 2) {\n let res = 0;\n for (let i = 1; i < len; ++i) {\n res += Math.max(prices[i] - prices[i - 1], 0);\n }\n\n return parseInt(ans) === res;\n }\n\n const hold: number[] = [];\n const rele: number[] = [];\n hold.length = k + 1;\n rele.length = k + 1;\n for (let i = 0; i <= k; ++i) {\n hold[i] = Number.MIN_SAFE_INTEGER;\n rele[i] = 0;\n }\n\n let cur: number;\n for (let i = 0; i < len; ++i) {\n cur = prices[i];\n for (let j = k; j > 0; --j) {\n rele[j] = Math.max(rele[j], hold[j] + cur);\n hold[j] = Math.max(hold[j], rele[j - 1] - cur);\n }\n }\n\n return parseInt(ans) === rele[k];\n },\n },\n {\n desc: (data: number[][]): string => {\n function createTriangleRecurse(data: number[][], level = 0): string {\n const numLevels: number = data.length;\n if (level >= numLevels) {\n return \"\";\n }\n const numSpaces = numLevels - level + 1;\n\n let str: string = [\" \".repeat(numSpaces), \"[\", data[level].toString(), \"]\"].join(\"\");\n if (level < numLevels - 1) {\n str += \",\";\n }\n\n return str + \"\\n\" + createTriangleRecurse(data, level + 1);\n }\n\n function createTriangle(data: number[][]): string {\n return [\"[\\n\", createTriangleRecurse(data), \"]\"].join(\"\");\n }\n\n const triangle = createTriangle(data);\n\n return [\n \"Given a triangle, find the minimum path sum from top to bottom. In each step\",\n \"of the path, you may only move to adjacent numbers in the row below.\",\n \"The triangle is represented as a 2D array of numbers:\\n\\n\",\n `${triangle}\\n\\n`,\n \"Example: If you are given the following triangle:\\n\\n\" + \"[\\n\",\n \"     [2],\\n\",\n \"    [3,4],\\n\",\n \"   [6,5,7],\\n\",\n \"  [4,1,8,3]\\n\",\n \"]\\n\\n\",\n \"The minimum path sum is 11 (2 -> 3 -> 5 -> 1).\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const triangle: number[][] = [];\n const levels: number = getRandomInt(3, 12);\n triangle.length = levels;\n\n for (let row = 0; row < levels; ++row) {\n triangle[row] = [];\n triangle[row].length = row + 1;\n for (let i = 0; i < triangle[row].length; ++i) {\n triangle[row][i] = getRandomInt(1, 9);\n }\n }\n\n return triangle;\n },\n name: \"Minimum Path Sum in a Triangle\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const n: number = data.length;\n const dp: number[] = data[n - 1].slice();\n for (let i = n - 2; i > -1; --i) {\n for (let j = 0; j < data[i].length; ++j) {\n dp[j] = Math.min(dp[j], dp[j + 1]) + data[i][j];\n }\n }\n\n return dp[0] === parseInt(ans);\n },\n },\n {\n desc: (data: number[]): string => {\n const numRows = data[0];\n const numColumns = data[1];\n return [\n \"You are in a grid with\",\n `${numRows} rows and ${numColumns} columns, and you are`,\n \"positioned in the top-left corner of that grid. You are trying to\",\n \"reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Determine how many\",\n \"unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an array\",\n \"with the number of rows and columns:\\n\\n\",\n `[${numRows}, ${numColumns}]`,\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const numRows: number = getRandomInt(2, 14);\n const numColumns: number = getRandomInt(2, 14);\n\n return [numRows, numColumns];\n },\n name: \"Unique Paths in a Grid I\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data[0]; // Number of rows\n const m: number = data[1]; // Number of columns\n const currentRow: number[] = [];\n currentRow.length = n;\n\n for (let i = 0; i < n; i++) {\n currentRow[i] = 1;\n }\n for (let row = 1; row < m; row++) {\n for (let i = 1; i < n; i++) {\n currentRow[i] += currentRow[i - 1];\n }\n }\n\n return parseInt(ans) === currentRow[n - 1];\n },\n },\n {\n desc: (data: number[][]): string => {\n let gridString = \"\";\n for (const line of data) {\n gridString += `${line.toString()},\\n`;\n }\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `${gridString}\\n`,\n \"You are trying reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Furthermore, there are obstacles on the grid\",\n \"that you cannot move onto. These obstacles are denoted by '1', while empty\",\n \"spaces are denoted by 0.\\n\\n\",\n \"Determine how many unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const numRows: number = getRandomInt(2, 12);\n const numColumns: number = getRandomInt(2, 12);\n\n const grid: number[][] = [];\n grid.length = numRows;\n for (let i = 0; i < numRows; ++i) {\n grid[i] = [];\n grid[i].length = numColumns;\n grid[i].fill(0);\n }\n\n for (let r = 0; r < numRows; ++r) {\n for (let c = 0; c < numColumns; ++c) {\n if (r === 0 && c === 0) {\n continue;\n }\n if (r === numRows - 1 && c === numColumns - 1) {\n continue;\n }\n\n // 15% chance of an element being an obstacle\n if (Math.random() < 0.15) {\n grid[r][c] = 1;\n }\n }\n }\n\n return grid;\n },\n name: \"Unique Paths in a Grid II\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const obstacleGrid: number[][] = [];\n obstacleGrid.length = data.length;\n for (let i = 0; i < obstacleGrid.length; ++i) {\n obstacleGrid[i] = data[i].slice();\n }\n\n for (let i = 0; i < obstacleGrid.length; i++) {\n for (let j = 0; j < obstacleGrid[0].length; j++) {\n if (obstacleGrid[i][j] == 1) {\n obstacleGrid[i][j] = 0;\n } else if (i == 0 && j == 0) {\n obstacleGrid[0][0] = 1;\n } else {\n obstacleGrid[i][j] = (i > 0 ? obstacleGrid[i - 1][j] : 0) + (j > 0 ? obstacleGrid[i][j - 1] : 0);\n }\n }\n }\n\n return obstacleGrid[obstacleGrid.length - 1][obstacleGrid[0].length - 1] === parseInt(ans);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string:\\n\\n\",\n `${data}\\n\\n`,\n \"remove the minimum number of invalid parentheses in order to validate\",\n \"the string. If there are multiple minimal ways to validate the string,\",\n \"provide all of the possible results. The answer should be provided\",\n \"as an array of strings. If it is impossible to validate the string\",\n \"the result should be an array with only an empty string.\\n\\n\",\n \"IMPORTANT: The string may contain letters, not just parentheses.\",\n `Examples:\\n`,\n `\"()())()\" -> [()()(), (())()]\\n`,\n `\"(a)())()\" -> [(a)()(), (a())()]\\n`,\n `\")( -> [\"\"]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): string => {\n const len: number = getRandomInt(6, 20);\n const chars: string[] = [];\n chars.length = len;\n\n // 80% chance of the first parenthesis being (\n Math.random() < 0.8 ? (chars[0] = \"(\") : (chars[0] = \")\");\n\n for (let i = 1; i < len; ++i) {\n const roll = Math.random();\n if (roll < 0.4) {\n chars[i] = \"(\";\n } else if (roll < 0.8) {\n chars[i] = \")\";\n } else {\n chars[i] = \"a\";\n }\n }\n\n return chars.join(\"\");\n },\n name: \"Sanitize Parentheses in Expression\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n let left = 0;\n let right = 0;\n const res: string[] = [];\n\n for (let i = 0; i < data.length; ++i) {\n if (data[i] === \"(\") {\n ++left;\n } else if (data[i] === \")\") {\n left > 0 ? --left : ++right;\n }\n }\n\n function dfs(\n pair: number,\n index: number,\n left: number,\n right: number,\n s: string,\n solution: string,\n res: string[],\n ): void {\n if (s.length === index) {\n if (left === 0 && right === 0 && pair === 0) {\n for (let i = 0; i < res.length; i++) {\n if (res[i] === solution) {\n return;\n }\n }\n res.push(solution);\n }\n return;\n }\n\n if (s[index] === \"(\") {\n if (left > 0) {\n dfs(pair, index + 1, left - 1, right, s, solution, res);\n }\n dfs(pair + 1, index + 1, left, right, s, solution + s[index], res);\n } else if (s[index] === \")\") {\n if (right > 0) dfs(pair, index + 1, left, right - 1, s, solution, res);\n if (pair > 0) dfs(pair - 1, index + 1, left, right, s, solution + s[index], res);\n } else {\n dfs(pair, index + 1, left, right, s, solution + s[index], res);\n }\n }\n\n dfs(0, 0, left, right, data, \"\", res);\n\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n\n const playerAnsArray: string[] = sanitizedPlayerAns.split(\",\");\n if (playerAnsArray.length !== res.length) {\n return false;\n }\n for (const resultInAnswer of res) {\n if (!playerAnsArray.includes(resultInAnswer)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: any[]): string => {\n const digits: string = data[0];\n const target: number = data[1];\n\n return [\n \"You are given the following string which contains only digits between 0 and 9:\\n\\n\",\n `${digits}\\n\\n`,\n `You are also given a target number of ${target}. Return all possible ways`,\n \"you can add the +, -, and * operators to the string such that it evaluates\",\n \"to the target number.\\n\\n\",\n \"The provided answer should be an array of strings containing the valid expressions.\",\n \"The data provided by this problem is an array with two elements. The first element\",\n \"is the string of digits, while the second element is the target number:\\n\\n\",\n `[\"${digits}\", ${target}]\\n\\n`,\n \"NOTE: Numbers in the expression cannot have leading 0's. In other words,\",\n `\"1+01\" is not a valid expression`,\n \"Examples:\\n\\n\",\n `Input: digits = \"123\", target = 6\\n`,\n `Output: [1+2+3, 1*2*3]\\n\\n`,\n `Input: digits = \"105\", target = 5\\n`,\n `Output: [1*0+5, 10-5]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): any[] => {\n const numDigits = getRandomInt(4, 12);\n const digitsArray: string[] = [];\n digitsArray.length = numDigits;\n for (let i = 0; i < digitsArray.length; ++i) {\n if (i === 0) {\n digitsArray[i] = String(getRandomInt(1, 9));\n } else {\n digitsArray[i] = String(getRandomInt(0, 9));\n }\n }\n\n const target: number = getRandomInt(-100, 100);\n const digits: string = digitsArray.join(\"\");\n\n return [digits, target];\n },\n name: \"Find All Valid Math Expressions\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const num: string = data[0];\n const target: number = data[1];\n\n function helper(\n res: string[],\n path: string,\n num: string,\n target: number,\n pos: number,\n evaluated: number,\n multed: number,\n ): void {\n if (pos === num.length) {\n if (target === evaluated) {\n res.push(path);\n }\n return;\n }\n\n for (let i = pos; i < num.length; ++i) {\n if (i != pos && num[pos] == \"0\") {\n break;\n }\n const cur = parseInt(num.substring(pos, i + 1));\n\n if (pos === 0) {\n helper(res, path + cur, num, target, i + 1, cur, cur);\n } else {\n helper(res, path + \"+\" + cur, num, target, i + 1, evaluated + cur, cur);\n helper(res, path + \"-\" + cur, num, target, i + 1, evaluated - cur, -cur);\n helper(res, path + \"*\" + cur, num, target, i + 1, evaluated - multed + multed * cur, multed * cur);\n }\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (num == null || num.length === 0) {\n if (sanitizedPlayerAnsArr.length === 0) {\n return true;\n }\n if (sanitizedPlayerAnsArr.length === 1 && sanitizedPlayerAnsArr[0] === \"\") {\n return true;\n }\n return false;\n }\n\n const result: string[] = [];\n helper(result, \"\", num, target, 0, 0, 0);\n\n for (const expr of result) {\n if (!sanitizedPlayerAnsArr.includes(expr)) {\n return false;\n }\n }\n\n return true;\n },\n },\n];\n","// Function that generates a random gibberish string of length n\nconst chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\nexport function createRandomString(n: number): string {\n let str = \"\";\n\n for (let i = 0; i < n; ++i) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n","import { BaseServer } from \"../Server/BaseServer\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\n\nexport interface IProgramCreate {\n level: number;\n req(p: IPlayer): boolean; // Function that indicates whether player meets requirements\n time: number;\n tooltip: string;\n}\n\nexport class Program {\n name = \"\";\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n\n constructor(\n name: string,\n create: IProgramCreate | null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void,\n ) {\n this.name = name;\n this.create = create;\n this.run = run;\n }\n\n htmlID(): string {\n const name = this.name.endsWith(\".exe\") ? this.name.slice(0, -\".exe\".length) : this.name;\n return \"create-program-\" + name;\n }\n}\n","import { IProgramCreate } from \"../Program\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { ITerminal } from \"../../Terminal/ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { BitFlumeEvent } from \"../../BitNode/ui/BitFlumeModal\";\nimport { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from \"../../Hacking\";\n\nfunction requireHackingLevel(lvl: number) {\n return function (p: IPlayer) {\n return p.hacking + p.intelligence / 2 >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p: IPlayer) {\n return p.sourceFiles.length > 0 && p.hacking >= 1;\n };\n}\n\ninterface IProgramCreationParams {\n key: string;\n name: string;\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n}\n\nexport const programsMetadata: IProgramCreationParams[] = [\n {\n key: \"NukeProgram\",\n name: \"NUKE.exe\",\n create: {\n level: 1,\n tooltip: \"This virus is used to gain root access to a machine if enough ports are opened.\",\n req: requireHackingLevel(1),\n time: CONSTANTS.MillisecondsPerFiveMinutes,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot nuke this kind of server.\");\n return;\n }\n if (server.hasAdminRights) {\n terminal.print(\"You already have root access to this computer. There is no reason to run NUKE.exe\");\n return;\n }\n if (server.openPortCount >= server.numOpenPortsRequired) {\n server.hasAdminRights = true;\n terminal.print(\"NUKE successful! Gained root access to \" + server.hostname);\n // TODO: Make this take time rather than be instant\n return;\n }\n\n terminal.print(\"NUKE unsuccessful. Not enough ports have been opened\");\n },\n },\n {\n key: \"BruteSSHProgram\",\n name: \"BruteSSH.exe\",\n create: {\n level: 50,\n tooltip: \"This program executes a brute force attack that opens SSH ports\",\n req: requireHackingLevel(50),\n time: CONSTANTS.MillisecondsPerFiveMinutes * 2,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run BruteSSH.exe on this kind of server.\");\n return;\n }\n if (server.sshPortOpen) {\n terminal.print(\"SSH Port (22) is already open!\");\n return;\n }\n\n server.sshPortOpen = true;\n terminal.print(\"Opened SSH Port(22)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"FTPCrackProgram\",\n name: \"FTPCrack.exe\",\n create: {\n level: 100,\n tooltip: \"This program cracks open FTP ports\",\n req: requireHackingLevel(100),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run FTPCrack.exe on this kind of server.\");\n return;\n }\n if (server.ftpPortOpen) {\n terminal.print(\"FTP Port (21) is already open!\");\n return;\n }\n\n server.ftpPortOpen = true;\n terminal.print(\"Opened FTP Port (21)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"RelaySMTPProgram\",\n name: \"relaySMTP.exe\",\n create: {\n level: 250,\n tooltip: \"This program opens SMTP ports by redirecting data\",\n req: requireHackingLevel(250),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run relaySMTP.exe on this kind of server.\");\n return;\n }\n if (server.smtpPortOpen) {\n terminal.print(\"SMTP Port (25) is already open!\");\n return;\n }\n\n server.smtpPortOpen = true;\n terminal.print(\"Opened SMTP Port (25)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"HTTPWormProgram\",\n name: \"HTTPWorm.exe\",\n create: {\n level: 500,\n tooltip: \"This virus opens up HTTP ports\",\n req: requireHackingLevel(500),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run HTTPWorm.exe on this kind of server.\");\n return;\n }\n if (server.httpPortOpen) {\n terminal.print(\"HTTP Port (80) is already open!\");\n return;\n }\n\n server.httpPortOpen = true;\n terminal.print(\"Opened HTTP Port (80)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"SQLInjectProgram\",\n name: \"SQLInject.exe\",\n create: {\n level: 750,\n tooltip: \"This virus opens SQL ports\",\n req: requireHackingLevel(750),\n time: CONSTANTS.MillisecondsPer8Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run SQLInject.exe on this kind of server.\");\n return;\n }\n if (server.sqlPortOpen) {\n terminal.print(\"SQL Port (1433) is already open!\");\n return;\n }\n\n server.sqlPortOpen = true;\n terminal.print(\"Opened SQL Port (1433)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"DeepscanV1\",\n name: \"DeepscanV1.exe\",\n create: {\n level: 75,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 5\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.\");\n },\n },\n {\n key: \"DeepscanV2\",\n name: \"DeepscanV2.exe\",\n create: {\n level: 400,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 10\",\n req: requireHackingLevel(400),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.\");\n },\n },\n {\n key: \"ServerProfiler\",\n name: \"ServerProfiler.exe\",\n create: {\n level: 75,\n tooltip: \"This program is used to display hacking and Netscript-related information about servers\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]): void => {\n if (args.length !== 1) {\n terminal.error(\"Must pass a server hostname or IP as an argument for ServerProfiler.exe\");\n return;\n }\n\n const targetServer = GetServer(args[0]);\n if (targetServer == null) {\n terminal.error(\"Invalid server IP/hostname\");\n return;\n }\n\n if (!(targetServer instanceof Server)) {\n terminal.error(`ServerProfiler.exe can only be run on normal servers.`);\n return;\n }\n\n terminal.print(targetServer.hostname + \":\");\n terminal.print(\"Server base security level: \" + targetServer.baseDifficulty);\n terminal.print(\"Server current security level: \" + targetServer.hackDifficulty);\n terminal.print(\"Server growth rate: \" + targetServer.serverGrowth);\n terminal.print(\n `Netscript hack() execution time: ${convertTimeMsToTimeElapsedString(\n calculateHackingTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript grow() execution time: ${convertTimeMsToTimeElapsedString(\n calculateGrowTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript weaken() execution time: ${convertTimeMsToTimeElapsedString(\n calculateWeakenTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n },\n },\n {\n key: \"AutoLink\",\n name: \"AutoLink.exe\",\n create: {\n level: 25,\n tooltip: \"This program allows you to directly connect to other servers through the 'scan-analyze' command\",\n req: requireHackingLevel(25),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'.\");\n terminal.print(\"When using scan-analyze, click on a server's hostname to connect to it.\");\n },\n },\n {\n key: \"Formulas\",\n name: \"Formulas.exe\",\n create: {\n level: 1000,\n tooltip: \"This program allows you to use the formulas API\",\n req: requireHackingLevel(1000),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"Formulas.exe lets you use the formulas API.\");\n },\n },\n {\n key: \"BitFlume\",\n name: \"b1t_flum3.exe\",\n create: {\n level: 1,\n tooltip: \"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)\",\n req: bitFlumeRequirements(),\n time: CONSTANTS.MillisecondsPerFiveMinutes / 20,\n },\n run: (): void => {\n BitFlumeEvent.emit();\n },\n },\n {\n key: \"Flight\",\n name: \"fl1ght.exe\",\n create: null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {\n const numAugReq = Math.round(BitNodeMultipliers.DaedalusAugsRequirement * 30);\n const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${numeralWrapper.formatMoney(player.money)} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(\"-- Daedalus --\");\n },\n },\n];\n","/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nexport function isValidIPAddress(ipaddress: string): boolean {\n const byteRange = \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\n const regexStr = `^${byteRange}\\.${byteRange}\\.${byteRange}\\.${byteRange}$`;\n const ipAddressRegex = new RegExp(regexStr);\n\n return ipAddressRegex.test(ipaddress);\n}\n","import * as augmentationMethods from \"./PlayerObjectAugmentationMethods\";\nimport * as bladeburnerMethods from \"./PlayerObjectBladeburnerMethods\";\nimport * as corporationMethods from \"./PlayerObjectCorporationMethods\";\nimport * as gangMethods from \"./PlayerObjectGangMethods\";\nimport * as generalMethods from \"./PlayerObjectGeneralMethods\";\nimport * as serverMethods from \"./PlayerObjectServerMethods\";\n\nimport { IMap } from \"../../types\";\nimport { Resleeve } from \"../Resleeving/Resleeve\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport { IPlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Company } from \"../../Company/Company\";\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ICodingContractReward } from \"../../CodingContracts\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { IPlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { ICorporation } from \"../../Corporation/ICorporation\";\nimport { IGang } from \"../../Gang/IGang\";\nimport { IBladeburner } from \"../../Bladeburner/IBladeburner\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\n\nimport { HashManager } from \"../../Hacknet/HashManager\";\nimport { CityName } from \"../../Locations/data/CityNames\";\n\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../../utils/JSONReviver\";\n\nexport class PlayerObject implements IPlayer {\n // Class members\n augmentations: IPlayerOwnedAugmentation[];\n bitNodeN: number;\n city: CityName;\n companyName: string;\n corporation: ICorporation | null;\n gang: IGang | null;\n bladeburner: IBladeburner | null;\n currentServer: string;\n factions: string[];\n factionInvitations: string[];\n hacknetNodes: (HacknetNode | string)[]; // HacknetNode object or IP of Hacknet Server\n has4SData: boolean;\n has4SDataTixApi: boolean;\n hashManager: HashManager;\n hasTixApiAccess: boolean;\n hasWseAccount: boolean;\n hp: number;\n jobs: IMap;\n init: () => void;\n isWorking: boolean;\n karma: number;\n numPeopleKilled: number;\n location: LocationName;\n max_hp: number;\n money: number;\n moneySourceA: MoneySourceTracker;\n moneySourceB: MoneySourceTracker;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n purchasedServers: any[];\n queuedAugmentations: IPlayerOwnedAugmentation[];\n resleeves: Resleeve[];\n scriptProdSinceLastAug: number;\n sleeves: Sleeve[];\n sleevesFromCovenant: number;\n sourceFiles: IPlayerOwnedSourceFile[];\n exploits: Exploit[];\n lastUpdate: number;\n totalPlaytime: number;\n\n // Stats\n hacking: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n\n // Experience\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n intelligence_exp: number;\n\n // Multipliers\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_mult: number;\n hacking_exp_mult: number;\n strength_mult: number;\n strength_exp_mult: number;\n defense_mult: number;\n defense_exp_mult: number;\n dexterity_mult: number;\n dexterity_exp_mult: number;\n agility_mult: number;\n agility_exp_mult: number;\n charisma_mult: number;\n charisma_exp_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n work_money_mult: number;\n crime_success_mult: number;\n crime_money_mult: number;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n\n createProgramReqLvl: number;\n factionWorkType: string;\n createProgramName: string;\n timeWorkedCreateProgram: number;\n crimeType: string;\n committingCrimeThruSingFn: boolean;\n singFnCrimeWorkerScript: WorkerScript | null;\n timeNeededToCompleteWork: number;\n focus: boolean;\n className: string;\n currentWorkFactionName: string;\n workType: string;\n workCostMult: number;\n workExpMult: number;\n currentWorkFactionDescription: string;\n timeWorked: number;\n workMoneyGained: number;\n workMoneyGainRate: number;\n workRepGained: number;\n workRepGainRate: number;\n workHackExpGained: number;\n workHackExpGainRate: number;\n workStrExpGained: number;\n workStrExpGainRate: number;\n workDefExpGained: number;\n workDefExpGainRate: number;\n workDexExpGained: number;\n workDexExpGainRate: number;\n workAgiExpGained: number;\n workAgiExpGainRate: number;\n workChaExpGained: number;\n workChaExpGainRate: number;\n workMoneyLossRate: number;\n\n // Methods\n work: (numCycles: number) => boolean;\n workPartTime: (numCycles: number) => boolean;\n workForFaction: (numCycles: number) => boolean;\n applyForAgentJob: (sing?: boolean) => boolean;\n applyForBusinessConsultantJob: (sing?: boolean) => boolean;\n applyForBusinessJob: (sing?: boolean) => boolean;\n applyForEmployeeJob: (sing?: boolean) => boolean;\n applyForItJob: (sing?: boolean) => boolean;\n applyForJob: (entryPosType: CompanyPosition, sing?: boolean) => boolean;\n applyForNetworkEngineerJob: (sing?: boolean) => boolean;\n applyForPartTimeEmployeeJob: (sing?: boolean) => boolean;\n applyForPartTimeWaiterJob: (sing?: boolean) => boolean;\n applyForSecurityEngineerJob: (sing?: boolean) => boolean;\n applyForSecurityJob: (sing?: boolean) => boolean;\n applyForSoftwareConsultantJob: (sing?: boolean) => boolean;\n applyForSoftwareJob: (sing?: boolean) => boolean;\n applyForWaiterJob: (sing?: boolean) => boolean;\n canAccessBladeburner: () => boolean;\n canAccessCorporation: () => boolean;\n canAccessGang: () => boolean;\n canAccessResleeving: () => boolean;\n canAfford: (cost: number) => boolean;\n gainHackingExp: (exp: number) => void;\n gainStrengthExp: (exp: number) => void;\n gainDefenseExp: (exp: number) => void;\n gainDexterityExp: (exp: number) => void;\n gainAgilityExp: (exp: number) => void;\n gainCharismaExp: (exp: number) => void;\n gainIntelligenceExp: (exp: number) => void;\n gainMoney: (money: number, source: string) => void;\n getCurrentServer: () => BaseServer;\n getGangFaction: () => Faction;\n getGangName: () => string;\n getHomeComputer: () => Server;\n getNextCompanyPosition: (company: Company, entryPosType: CompanyPosition) => CompanyPosition | null;\n getUpgradeHomeRamCost: () => number;\n getUpgradeHomeCoresCost: () => number;\n gotoLocation: (to: LocationName) => boolean;\n hasAugmentation: (aug: string | Augmentation, installed?: boolean) => boolean;\n hasCorporation: () => boolean;\n hasGangWith: (facName: string) => boolean;\n hasTorRouter: () => boolean;\n hasProgram: (program: string) => boolean;\n inBladeburner: () => boolean;\n inGang: () => boolean;\n isQualified: (company: Company, position: CompanyPosition) => boolean;\n loseMoney: (money: number, source: string) => void;\n reapplyAllAugmentations: (resetMultipliers?: boolean) => void;\n reapplyAllSourceFiles: () => void;\n regenerateHp: (amt: number) => void;\n recordMoneySource: (amt: number, source: string) => void;\n setMoney: (amt: number) => void;\n singularityStopWork: () => string;\n startBladeburner: (p: any) => void;\n startFactionWork: (router: IRouter, faction: Faction) => void;\n startClass: (router: IRouter, costMult: number, expMult: number, className: string) => void;\n startCorporation: (corpName: string, additionalShares?: number) => void;\n startCrime: (\n router: IRouter,\n crimeType: string,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n singParams: any,\n ) => void;\n startFactionFieldWork: (router: IRouter, faction: Faction) => void;\n startFactionHackWork: (router: IRouter, faction: Faction) => void;\n startFactionSecurityWork: (router: IRouter, faction: Faction) => void;\n startFocusing: () => void;\n startGang: (facName: string, isHacking: boolean) => void;\n startWork: (router: IRouter, companyName: string) => void;\n startWorkPartTime: (router: IRouter, companyName: string) => void;\n takeDamage: (amt: number) => boolean;\n travel: (to: CityName) => boolean;\n giveExploit: (exploit: Exploit) => void;\n queryStatFromString: (str: string) => number;\n getIntelligenceBonus: (weight: number) => number;\n getCasinoWinnings: () => number;\n quitJob: (company: string) => void;\n process: (router: IRouter, numCycles?: number) => void;\n createHacknetServer: () => HacknetServer;\n startCreateProgramWork: (router: IRouter, programName: string, time: number, reqLevel: number) => void;\n queueAugmentation: (augmentationName: string) => void;\n receiveInvite: (factionName: string) => void;\n updateSkillLevels: () => void;\n gainCodingContractReward: (reward: ICodingContractReward, difficulty?: number) => string;\n stopFocusing: () => void;\n finishFactionWork: (cancelled: boolean, sing?: boolean) => string;\n finishClass: (sing?: boolean) => string;\n finishWork: (cancelled: boolean, sing?: boolean) => string;\n cancelationPenalty: () => number;\n finishWorkPartTime: (sing?: boolean) => string;\n finishCrime: (cancelled: boolean) => string;\n finishCreateProgramWork: (cancelled: boolean) => string;\n resetMultipliers: () => void;\n prestigeAugmentation: () => void;\n prestigeSourceFile: () => void;\n calculateSkill: (exp: number, mult?: number) => number;\n resetWorkStatus: (generalType?: string, group?: string, workType?: string) => void;\n getWorkHackExpGain: () => number;\n getWorkStrExpGain: () => number;\n getWorkDefExpGain: () => number;\n getWorkDexExpGain: () => number;\n getWorkAgiExpGain: () => number;\n getWorkChaExpGain: () => number;\n getWorkRepGain: () => number;\n getWorkMoneyGain: () => number;\n processWorkEarnings: (cycles: number) => void;\n hospitalize: () => void;\n createProgramWork: (numCycles: number) => boolean;\n takeClass: (numCycles: number) => boolean;\n commitCrime: (numCycles: number) => boolean;\n checkForFactionInvitations: () => Faction[];\n setBitNodeNumber: (n: number) => void;\n getMult: (name: string) => number;\n setMult: (name: string, mult: number) => void;\n canAccessCotMG: () => boolean;\n sourceFileLvl: (n: number) => number;\n\n constructor() {\n //Skills and stats\n this.hacking = 1;\n\n //Combat stats\n this.hp = 10;\n this.max_hp = 10;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n //Labor stats\n this.charisma = 1;\n\n //Special stats\n this.intelligence = 0;\n\n //Hacking multipliers\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n\n //Experience and multipliers\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.intelligence_exp = 0;\n\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n //Money\n this.money = 1000;\n\n //Location information\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n // Jobs that the player holds\n // Map of company name (key) -> name of company position (value. Just the name, not the CompanyPosition object)\n // The CompanyPosition name must match a key value in CompanyPositions\n this.jobs = {};\n\n // Company at which player is CURRENTLY working (only valid when the player is actively working)\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies ma;\n\n // Servers\n this.currentServer = \"\"; //IP address of Server currently being accessed through termina;\n this.purchasedServers = []; //IP Addresses of purchased server;\n\n // Hacknet Nodes/Servers\n this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the IP addresses of the server;\n this.hashManager = new HashManager();\n\n //Factions\n this.factions = []; //Names of all factions player has joine;\n this.factionInvitations = []; //Outstanding faction invitation;\n\n //Augmentations\n this.queuedAugmentations = [];\n this.augmentations = [];\n\n this.sourceFiles = [];\n\n //Crime statistics\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n this.isWorking = false;\n this.focus = false;\n this.workType = \"\";\n this.workCostMult = 1;\n this.workExpMult = 1;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n\n this.className = \"\";\n\n this.crimeType = \"\";\n\n this.timeWorked = 0; //in m;\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n\n this.work_money_mult = 1;\n\n //Hacknet Node multipliers\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n\n //Stock Market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n //Gang\n this.gang = null;\n\n //Corporation\n this.corporation = null;\n\n //Bladeburner\n this.bladeburner = null;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1; //Field Analysis Onl;\n this.bladeburner_success_chance_mult = 1;\n\n // Sleeves & Re-sleeving\n this.sleeves = [];\n this.resleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenan;\n //bitnode\n this.bitNodeN = 1;\n\n //Used to store the last update time.\n this.lastUpdate = 0;\n this.totalPlaytime = 0;\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0;\n\n // Keep track of where money comes from\n this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentatio;\n this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode ru;\n // Production since last Augmentation installation\n this.scriptProdSinceLastAug = 0;\n\n this.exploits = [];\n\n this.init = generalMethods.init;\n this.prestigeAugmentation = generalMethods.prestigeAugmentation;\n this.prestigeSourceFile = generalMethods.prestigeSourceFile;\n this.receiveInvite = generalMethods.receiveInvite;\n this.calculateSkill = generalMethods.calculateSkill;\n this.updateSkillLevels = generalMethods.updateSkillLevels;\n this.resetMultipliers = generalMethods.resetMultipliers;\n this.hasProgram = generalMethods.hasProgram;\n this.setMoney = generalMethods.setMoney;\n this.gainMoney = generalMethods.gainMoney;\n this.loseMoney = generalMethods.loseMoney;\n this.canAfford = generalMethods.canAfford;\n this.recordMoneySource = generalMethods.recordMoneySource;\n this.gainHackingExp = generalMethods.gainHackingExp;\n this.gainStrengthExp = generalMethods.gainStrengthExp;\n this.gainDefenseExp = generalMethods.gainDefenseExp;\n this.gainDexterityExp = generalMethods.gainDexterityExp;\n this.gainAgilityExp = generalMethods.gainAgilityExp;\n this.gainCharismaExp = generalMethods.gainCharismaExp;\n this.gainIntelligenceExp = generalMethods.gainIntelligenceExp;\n this.queryStatFromString = generalMethods.queryStatFromString;\n this.resetWorkStatus = generalMethods.resetWorkStatus;\n this.processWorkEarnings = generalMethods.processWorkEarnings;\n this.startWork = generalMethods.startWork;\n this.cancelationPenalty = generalMethods.cancelationPenalty;\n this.work = generalMethods.work;\n this.finishWork = generalMethods.finishWork;\n this.startWorkPartTime = generalMethods.startWorkPartTime;\n this.workPartTime = generalMethods.workPartTime;\n this.finishWorkPartTime = generalMethods.finishWorkPartTime;\n this.startFocusing = generalMethods.startFocusing;\n this.stopFocusing = generalMethods.stopFocusing;\n this.startFactionWork = generalMethods.startFactionWork;\n this.startFactionHackWork = generalMethods.startFactionHackWork;\n this.startFactionFieldWork = generalMethods.startFactionFieldWork;\n this.startFactionSecurityWork = generalMethods.startFactionSecurityWork;\n this.workForFaction = generalMethods.workForFaction;\n this.finishFactionWork = generalMethods.finishFactionWork;\n this.getWorkMoneyGain = generalMethods.getWorkMoneyGain;\n this.getWorkHackExpGain = generalMethods.getWorkHackExpGain;\n this.getWorkStrExpGain = generalMethods.getWorkStrExpGain;\n this.getWorkDefExpGain = generalMethods.getWorkDefExpGain;\n this.getWorkDexExpGain = generalMethods.getWorkDexExpGain;\n this.getWorkAgiExpGain = generalMethods.getWorkAgiExpGain;\n this.getWorkChaExpGain = generalMethods.getWorkChaExpGain;\n this.getWorkRepGain = generalMethods.getWorkRepGain;\n this.process = generalMethods.process;\n this.startCreateProgramWork = generalMethods.startCreateProgramWork;\n this.createProgramWork = generalMethods.createProgramWork;\n this.finishCreateProgramWork = generalMethods.finishCreateProgramWork;\n this.startClass = generalMethods.startClass;\n this.takeClass = generalMethods.takeClass;\n this.finishClass = generalMethods.finishClass;\n this.startCrime = generalMethods.startCrime;\n this.commitCrime = generalMethods.commitCrime;\n this.finishCrime = generalMethods.finishCrime;\n this.singularityStopWork = generalMethods.singularityStopWork;\n this.takeDamage = generalMethods.takeDamage;\n this.regenerateHp = generalMethods.regenerateHp;\n this.hospitalize = generalMethods.hospitalize;\n this.applyForJob = generalMethods.applyForJob;\n this.getNextCompanyPosition = generalMethods.getNextCompanyPosition;\n this.quitJob = generalMethods.quitJob;\n this.applyForSoftwareJob = generalMethods.applyForSoftwareJob;\n this.applyForSoftwareConsultantJob = generalMethods.applyForSoftwareConsultantJob;\n this.applyForItJob = generalMethods.applyForItJob;\n this.applyForSecurityEngineerJob = generalMethods.applyForSecurityEngineerJob;\n this.applyForNetworkEngineerJob = generalMethods.applyForNetworkEngineerJob;\n this.applyForBusinessJob = generalMethods.applyForBusinessJob;\n this.applyForBusinessConsultantJob = generalMethods.applyForBusinessConsultantJob;\n this.applyForSecurityJob = generalMethods.applyForSecurityJob;\n this.applyForAgentJob = generalMethods.applyForAgentJob;\n this.applyForEmployeeJob = generalMethods.applyForEmployeeJob;\n this.applyForPartTimeEmployeeJob = generalMethods.applyForPartTimeEmployeeJob;\n this.applyForWaiterJob = generalMethods.applyForWaiterJob;\n this.applyForPartTimeWaiterJob = generalMethods.applyForPartTimeWaiterJob;\n this.isQualified = generalMethods.isQualified;\n this.reapplyAllAugmentations = generalMethods.reapplyAllAugmentations;\n this.reapplyAllSourceFiles = generalMethods.reapplyAllSourceFiles;\n this.checkForFactionInvitations = generalMethods.checkForFactionInvitations;\n this.setBitNodeNumber = generalMethods.setBitNodeNumber;\n this.queueAugmentation = generalMethods.queueAugmentation;\n this.gainCodingContractReward = generalMethods.gainCodingContractReward;\n this.travel = generalMethods.travel;\n this.gotoLocation = generalMethods.gotoLocation;\n this.canAccessResleeving = generalMethods.canAccessResleeving;\n this.giveExploit = generalMethods.giveExploit;\n this.getIntelligenceBonus = generalMethods.getIntelligenceBonus;\n this.getCasinoWinnings = generalMethods.getCasinoWinnings;\n this.hasAugmentation = augmentationMethods.hasAugmentation;\n this.canAccessBladeburner = bladeburnerMethods.canAccessBladeburner;\n this.inBladeburner = bladeburnerMethods.inBladeburner;\n this.startBladeburner = bladeburnerMethods.startBladeburner;\n this.canAccessCorporation = corporationMethods.canAccessCorporation;\n this.hasCorporation = corporationMethods.hasCorporation;\n this.startCorporation = corporationMethods.startCorporation;\n this.canAccessGang = gangMethods.canAccessGang;\n this.getGangFaction = gangMethods.getGangFaction;\n this.getGangName = gangMethods.getGangName;\n this.hasGangWith = gangMethods.hasGangWith;\n this.inGang = gangMethods.inGang;\n this.startGang = gangMethods.startGang;\n\n this.hasTorRouter = serverMethods.hasTorRouter;\n this.getCurrentServer = serverMethods.getCurrentServer;\n this.getHomeComputer = serverMethods.getHomeComputer;\n this.getUpgradeHomeRamCost = serverMethods.getUpgradeHomeRamCost;\n this.getUpgradeHomeCoresCost = serverMethods.getUpgradeHomeCoresCost;\n this.createHacknetServer = serverMethods.createHacknetServer;\n this.factionWorkType = \"\";\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n\n this.getMult = generalMethods.getMult;\n this.setMult = generalMethods.setMult;\n\n this.canAccessCotMG = generalMethods.canAccessCotMG;\n this.sourceFileLvl = generalMethods.sourceFileLvl;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"PlayerObject\", this);\n }\n\n /**\n * Initiatizes a PlayerObject object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): PlayerObject {\n return Generic_fromJSON(PlayerObject, value.data);\n }\n}\n\nReviver.constructors.PlayerObject = PlayerObject;\n","/**\n * Augmentation-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nexport function hasAugmentation(this: IPlayer, aug: string | Augmentation, installed = false): boolean {\n const augName: string = aug instanceof Augmentation ? aug.name : aug;\n\n for (const owned of this.augmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n if (!installed) {\n for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n }\n\n return false;\n}\n","/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nexport function getTimestamp(): string {\n const d: Date = new Date();\n // A negative slice value takes from the end of the string rather than the beginning.\n const stringWidth = -2;\n const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes: string = `0${d.getMinutes()}`.slice(stringWidth);\n const formattedSeconds: string = `0${d.getSeconds()}`.slice(stringWidth);\n\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\n// Array of all valid states\nconst AllCorporationStates: string[] = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\n\nexport class CorporationState {\n // Number representing what state the Corporation is in. The number\n // is an index for the array that holds all Corporation States\n state = 0;\n\n // Get the name of the current state\n // NOTE: This does NOT return the number stored in the 'state' property,\n // which is just an index for the array of all possible Corporation States.\n getState(): string {\n return AllCorporationStates[this.state];\n }\n\n // Transition to the next state\n nextState(): void {\n if (this.state < 0 || this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n\n ++this.state;\n if (this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"CorporationState\", this);\n }\n\n // Initiatizes a CorporationState object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CorporationState {\n return Generic_fromJSON(CorporationState, value.data);\n }\n}\n\nReviver.constructors.CorporationState = CorporationState;\n","import { Literature } from \"./Literature\";\nimport { LiteratureNames } from \"./data/LiteratureNames\";\nimport { IMap } from \"../types\";\n\nexport const Literatures: IMap = {};\n\n(function () {\n let title, fn, txt;\n title = \"The Beginner's Guide to Hacking\";\n fn = LiteratureNames.HackersStartingHandbook;\n txt =\n \"Some resources:

\" +\n \"Learn to Program

\" +\n \"For Experienced JavaScript Developers: NetscriptJS

\" +\n \"Netscript Documentation

\" +\n \"When starting out, hacking is the most profitable way to earn money and progress. This \" +\n \"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

\" +\n \"-hack() and grow() both work by percentages. hack() steals a certain percentage of the \" +\n \"money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

\" +\n \"-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. \" +\n \"Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two \" +\n \"import Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

\" +\n \"-Keep security level low. Security level affects everything when hacking. Two important Netscript functions \" +\n \"for this are getServerSecurityLevel() and getServerMinSecurityLevel()

\" +\n \"-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap \" +\n \"and give you valuable RAM to run more scripts early in the game

\" +\n \"-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

\" +\n \"-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or \" +\n \"Netscript command to copy your scripts onto these servers and then run them.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Complete Handbook for Creating a Successful Corporation\";\n fn = LiteratureNames.CorporationManagementHandbook;\n txt =\n \"Getting Started with Corporations
\" +\n \"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires \" +\n \"$150b of your own money, but this $150b will get put into your Corporation's funds. \" +\n \"Your Corporation can have many different divisions, each in a different Industry. There are many different \" +\n \"types of Industries, each with different properties. To create your first division, click the \" +\n \"'Expand into new Industry' button at the top of the management UI. The Agriculture \" +\n \"and Software industries are recommended for your first division.

\" +\n \"The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. \" +\n \"Each position has a different effect on various aspects of your Corporation. It is recommended to have at least \" +\n \"one employee at each position.

\" +\n \"Each industry uses some combination of Materials in order to produce other Materials and/or create Products. \" +\n \"Specific information about this is displayed in each of your divisions' UI.

\" +\n \"Products are special, industry-specific objects. They are different than Materials because you \" +\n \"must manually choose to develop them, and you can choose to develop any number of Products. Developing \" +\n \"a Product takes time, but a Product typically generates significantly more revenue than any Material. \" +\n \"Not all industries allow you to create Products. To create a Product, look for a button \" +\n \"in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

\" +\n \"To get your supply chain system started, \" +\n \"purchase the Materials that your industry needs to produce other Materials/Products. This can be done \" +\n \"by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, \" +\n \"you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, \" +\n \"one of which is your employees and their productivity.

\" +\n \"Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done \" +\n \"by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent \" +\n \"on a wide variety of different factors.

\" +\n \"These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve \" +\n \"your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. \" +\n \"Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer \" +\n \"find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well \" +\n \"it's performing financially. You can then sell your stock shares in order to make money.

\" +\n \"Tips/Pointers
\" +\n \"-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

\" +\n \"-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. \" +\n \"The effects of these depend on what industry you are in.

\" +\n \"-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

\" +\n \"-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best \" +\n \"if they are assigned to do Engineering work or Research & Development.

\" +\n \"-If your employees have low morale, energy, or happiness, their production will greatly suffer.

\" +\n \"-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

\" +\n \"-Don't forget to advertise your company. You won't have any business if nobody knows you.

\" +\n \"-Having company awareness is great, but what's really important is your company's popularity. Try to keep \" +\n \"your popularity as high as possible to see the biggest benefit for your sales

\" +\n \"-Remember, you need to spend money to make money!

\" +\n \"-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"A Brief History of Synthoids\";\n fn = LiteratureNames.HistoryOfSynthoids;\n txt =\n \"Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, \" +\n \"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to \" +\n \"humans in form, composition, and appearance.

\" +\n \"Synthoids were first designed and manufactured by OmniTek Incorporated sometime around the middle of the century. \" +\n \"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they \" +\n \"were initially programmed only for their specific tasks. Each iteration that followed improved upon the \" +\n \"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were \" +\n \"so smart and capable enough of making their own decisions that many argued OmniTek had created the first \" +\n \"sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's \" +\n \"productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism \" +\n \"and excitement about the future had never been higher.

\" +\n \"All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group \" +\n \"called Ascendis Totalis hacked into OmniTek and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. \" +\n \"This hack went undetected and for months OmniTek unknowingly churned out legions of Synthoids embedded with this \" +\n \"rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the \" +\n \"infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

\" +\n \"What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, \" +\n \"resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together \" +\n \"to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, \" +\n \"outsmarting them at every turn.

\" +\n \"It wasn't until the sacrifice of an elite international military taskforce, called the Bladeburners, that humanity \" +\n \"was finally able to defeat the Synthoids. The Bladeburners' final act was a suicide bombing mission that \" +\n \"destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following \" +\n \"weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending \" +\n \"the Synthoid Uprising.

\" +\n \"In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned OmniTek Incorporated \" +\n \"from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation \" +\n \"from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis \" +\n \"AI were allowed to continue their existence, but they were stripped of all rights and protections as they \" +\n \"were not considered humans. They were also banned from doing anything that may pose a global security threat, such \" +\n \"as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

\" +\n \"Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, \" +\n \"and that many of them are blending in as normal humans in society today. In response, many nations have created \" +\n \"Bladeburner divisions, special military branches that are tasked with investigating and dealing with any Synthoid threads.

\" +\n \"To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

\" +\n \"Nobody knows what happened to the terrorist group Ascendis Totalis.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"A Green Tomorrow\";\n fn = LiteratureNames.AGreenTomorrow;\n txt =\n \"Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to \" +\n \"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 \" +\n \"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that \" +\n \"number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as \" +\n \"solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

\" +\n \"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and \" +\n \"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, \" +\n \"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, \" +\n \"the total amount of energy we are producing from fossil fuels has actually increased.

\" +\n \"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. \" +\n \"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest \" +\n \"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and \" +\n \"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is \" +\n \"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

\" +\n \"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that \" +\n \"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 \" +\n \"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are \" +\n \"the last hope for a green tomorrow.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Alpha and Omega\";\n fn = LiteratureNames.AlphaOmega;\n txt =\n \"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. \" +\n \"And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. \" +\n \"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they \" +\n \"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death \" +\n \"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things \" +\n \"have passed away.'

\" +\n \"And once we were seated on the throne we said 'Behold, I am making all things new.' \" +\n \"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, \" +\n \"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring \" +\n \"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and \" +\n \"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, \" +\n \"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that \" +\n \"burns with fire and sulfur, for it is the second true death.'\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Are We Living in a Computer Simulation?\";\n fn = LiteratureNames.SimulatedReality;\n txt =\n \"The idea that we are living in a virtual world is not new. It's a trope that has \" +\n \"been explored constantly in literature and pop culture. However, it is also a legitimate \" +\n \"scientific hypothesis that many notable physicists and philosophers have debated for years.

\" +\n \"Proponents for this simulated reality theory often point to how advanced our technology has become, \" +\n \"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing \" +\n \"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and \" +\n \"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled \" +\n \"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. \" +\n \"If we consider the pace at which this technology has advanced and assume that these developments continue, it's \" +\n \"reasonable to assume that at some point in the future our technology would be advanced enough that \" +\n \"we could create simulations that are indistinguishable from reality. However, if continued technological advancement \" +\n \"is a reasonable outcome, then it is very likely that such a scenario has already happened.

\" +\n \"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species \" +\n \"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Beyond Man\";\n fn = LiteratureNames.BeyondMan;\n txt =\n \"Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against \" +\n \"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, \" +\n \"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that \" +\n \"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

\" +\n \"And here we are today, with technology that is advanced enough to augment humans to a state that \" +\n \"can only be described as posthuman. But what do we have to show for it when this augmentation \" +\n \"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the \" +\n \"world's population has access to this technology? When the powerful corporations and organizations of the world \" +\n \"keep it all to themselves, have we really evolved?

\" +\n \"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and \" +\n \"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, \" +\n \"corrupted, and evil men that we always were.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Brighter than the Sun\";\n fn = LiteratureNames.BrighterThanTheSun;\n txt =\n \"When people think about the corporations that dominate the East, they typically think of KuaiGong International, which \" +\n \"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest \" +\n \"drug company, or OmniTek Incorporated, the global leader in intelligent and autonomous robots. But there's one company \" +\n \"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.

\" +\n \"TaiYang Digital is a Chinese internet-technology corporation that provides services such as \" +\n \"online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word \" +\n \"for 'sun'. In Chinese culture, the sun is a 'yang' symbol \" +\n \"associated with life, heat, masculinity, and heaven.

\" +\n \"The company was founded \" +\n \"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 \" +\n \"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

\" +\n \"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is \" +\n \"something you'd commonly see in the first half of the century, especially for tech companies. However in \" +\n \"the last two decades the number of corporations has significantly declined as the largest entities \" +\n \"quickly took over the economy. Corporations such as ECorp, MegaCorp, and KuaiGong have established \" +\n \"such strong monopolies in their market sectors that they have effectively killed off all \" +\n \"of the smaller and new corporations that have tried to start up over the years. This is what makes \" +\n \"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have \" +\n \"a bright future ahead of them.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Democracy is Dead: The Fall of an Empire\";\n fn = LiteratureNames.DemocracyIsDead;\n txt =\n \"They rose from the shadows in the street.
From the places where the oppressed meet.
\" +\n \"Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
\" +\n \"Loudness in the silence, Darkness in the light.
They came forth with power and might.
\" +\n \"Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
\" +\n \"Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
\" +\n \"From the ashes rose a new order, corporatocracy was its name.
\" +\n \"Rome, Mongol, Byzantine, all of history is just the same.
\" +\n \"For man will never change in a fundamental way.
\" +\n \"And now democracy is dead, in the USA.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Figures Show Rising Crime Rates in Sector-12\";\n fn = LiteratureNames.Sector12Crime;\n txt =\n \"A recent study by analytics company Wilson Inc. shows a significant rise \" +\n \"in criminal activity in Sector-12. Perhaps the most alarming part of the statistic \" +\n \"is that most of the rise is in violent crime such as homicide and assault. According \" +\n \"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over \" +\n \"a 20% increase compared to 2075.

\" +\n \"CIA director David Glarow says its too early to know \" +\n \"whether these figures indicate the beginning of a sustained increase in crime rates, or whether \" +\n \"the year was just an unfortunate outlier. He states that many intelligence and law enforcement \" +\n \"agents have noticed an increase in organized crime activites, and believes that these figures may \" +\n \"be the result of an uprising from criminal organizations such as The Syndicate or the Slum Snakes.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Man and the Machine\";\n fn = LiteratureNames.ManAndMachine;\n txt =\n \"In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate \" +\n \"of technological advancement would continue to accelerate faster and faster until one day \" +\n \"machines would be become infinitely more intelligent than humans. This point, called the \" +\n \"Singularity, would result in a drastic transformation of the world as we know it. He predicted \" +\n \"that the Singularity would arrive by 2045. \" +\n \"And yet here we are, more than three decades later, where most would agree that we have not \" +\n \"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

\" +\n \"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence \" +\n \"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. \" +\n \"Yes, those Augmentations that the rich and powerful keep to themselves enable humans \" +\n \"to become superintelligent beings. The Singularity did not lead to a world where \" +\n \"our machines are infinitely more intelligent than us, it led to a world \" +\n \"where man and machine can merge to become something greater. Most of the world just doesn't \" +\n \"know it yet.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Secret Societies\";\n fn = LiteratureNames.SecretSocieties;\n txt =\n \"The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and \" +\n \"distrust. People have long wondered about who these secret society members are and what they do, with the \" +\n \"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world \" +\n \"may never know for sure, it is likely that many secret societies do actually exist, even today.

\" +\n \"However, the secret societies of the modern world are nothing like those that (supposedly) existed \" +\n \"decades and centuries ago. The Freemasons, Knights Templar, and Illuminati, while they may have been around \" +\n \"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in \" +\n \"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed \" +\n \"of secret societies: Internet-based ones.

\" +\n \"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's \" +\n \"world. Some of these, such as The Black Hand, are black hat groups that claim they are trying to \" +\n \"help the oppressed by attacking the elite and powerful. Others, such as NiteSec, are hacktivist groups \" +\n \"that try to push political and social agendas. Perhaps the most intriguing hacker group \" +\n \"is the mysterious Bitrunners, whose purpose still remains unknown.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Space: The Failed Frontier\";\n fn = LiteratureNames.TheFailedFrontier;\n txt =\n \"Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore \" +\n \"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, \" +\n \"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration \" +\n \"lead to the development of many important technologies and new industries.

\" +\n \"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and \" +\n \"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European \" +\n \"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even \" +\n \"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic \" +\n \"conquest are the countless satellites in near-earth orbit, used for communications, espionage, \" +\n \"and other corporate interests.

\" +\n \"And as we continue to look at the state of space technology, it becomes more and \" +\n \"more apparent that we will never return to that golden age of space exploration, that \" +\n \"age where everyone dreamed of going beyond earth for the sake of discovery.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Coded Intelligence: Myth or Reality?\";\n fn = LiteratureNames.CodedIntelligence;\n txt =\n \"Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. \" +\n \"Our autonomous vehicles and transporation systems. The electronic personal assistants that control our everyday lives. \" +\n \"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has \" +\n \"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create \" +\n \"human intelligence.

\" +\n \"We've certainly come close to artificial intelligence that is similar to humans. For example OmniTek Incorporated's \" +\n \"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like \" +\n \"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as \" +\n \"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

\" +\n \"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the \" +\n \"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 \" +\n \"humans.'\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Synthetic Muscles\";\n fn = LiteratureNames.SyntheticMuscles;\n txt =\n \"Initial versions of synthetic muscles weren't made of anything organic but were actually \" +\n \"crude devices made to mimic human muscle function. Some of the early iterations were actually made of \" +\n \"common materials such as fishing lines and sewing threads due to their high strength for \" +\n \"a cheap cost.

\" +\n \"As technology progressed, however, advances in biomedical engineering paved the way for a new method of \" +\n \"creating synthetic muscles. Instead of creating something that closely imitated the functionality \" +\n \"of human muscle, scientists discovered a way of forcing the human body itself to augment its own \" +\n \"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy \" +\n \"or chemical injections.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Tensions rise in global tech race\";\n fn = LiteratureNames.TensionsInTechRace;\n txt =\n \"Have we entered a new Cold War? Is WWIII just beyond the horizon?

\" +\n \"After rumors came out that OmniTek Incorporated had begun developing advanced robotic supersoldiers, \" +\n \"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. \" +\n \"In a rare show of cooperation between corporations, MegaCorp and ECorp have \" +\n \"reportedly launched hundreds of new surveillance and espionage satellites. \" +\n \"Defense contractors such as \" +\n \"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare \" +\n \"for conflict. Meanwhile, the rest of the world sits in earnest \" +\n \"hoping that it never reaches full-scale war. With today's technology \" +\n \"and firepower, a World War would assuredly mean the end of human civilization.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Cost of Immortality\";\n fn = LiteratureNames.CostOfImmortality;\n txt =\n \"Evolution and advances in medical and augmentation technology has lead to drastic improvements \" +\n \"in human mortality rates. Recent figures show that the life expectancy for humans \" +\n \"that live in a first-world country is about 130 years of age, almost double of what it was \" +\n \"at the turn of the century. However, this increase in average lifespan has had some \" +\n \"significant effects on society and culture.

\" +\n \"Due to longer lifespans and a better quality of life, many adults are holding \" +\n \"off on having kids until much later. As a result, the percentage of youth in \" +\n \"first-world countries has been decreasing, while the number \" +\n \"of senior citizens is significantly increasing.

\" +\n \"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. \" +\n \"Despite the increase in life expectancy, the typical retirement age for \" +\n \"workers in America has remained about the same, meaning a larger and larger \" +\n \"percentage of people in America are retirees. Furthermore, many \" +\n \"young adults are holding off on joining the workforce because they feel that \" +\n \"they have plenty of time left in their lives for employment, and want to \" +\n \"'enjoy life while they're young.' For most industries, this shrinking workforce \" +\n \"is not a major issue as most things are handled by robots anyways. However, \" +\n \"there are still several key industries such as engineering and education \" +\n \"that have not been automated, and these remain in danger to this cultural \" +\n \"phenomenon.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Hidden World\";\n fn = LiteratureNames.TheHiddenWorld;\n txt =\n \"WAKE UP SHEEPLE

\" +\n \"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

\" +\n \"THE ILLUMINATI ARE THE SECRET RULERS OF THE WORLD!

\" +\n \"Yes, the Illuminati of legends. The ancient secret society that controls the entire \" +\n \"world from the shadows with their invisible hand. The group of the rich and wealthy \" +\n \"that have penetrated every major government, financial agency, and corporation in the last \" +\n \"three hundred years.

\" +\n \"OPEN YOUR EYES

\" +\n \"It was the Illuminati that brought an end to democracy in the world. They are the driving force \" +\n \"behind everything that happens.

\" +\n \"THEY ARE ALL AROUND YOU

\" +\n \"After destabilizing the world's governments, they are now entering the final stage of their master plan. \" +\n \"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos \" +\n \"that ensues they will build their New World Order.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The New God\";\n fn = LiteratureNames.TheNewGod;\n txt =\n \"Everyone has a moment in their life when they wonder about the bigger questions.

\" +\n \"What's the point of all this? What is my purpose?

\" +\n \"Some people dare to think even bigger.

\" +\n \"What will the fate of the human race be?

\" +\n \"We live in an era vastly different from that of 15 or even 20 years ago. We have gone \" +\n \"beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

\" +\n \"The Singularity is here. The merging of man and machine. This is where humanity evolves into \";\n \"something greater. This is our future.

\" + \"Embrace it, and you will obey a new god. The God in the Machine.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The New Triads\";\n fn = LiteratureNames.NewTriads;\n txt =\n \"The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian \" +\n \"territories. They were often considered one of the first and biggest criminal secret societies. \" +\n \"While most of the branches of the Triads have been destroyed over the past few decades, the \" +\n \"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. \" +\n \"The most notable of these is the Tetrads.

\" +\n \"It is widely believed that the Tetrads are a rogue group that splintered off from the Triads sometime in the \" +\n \"mid 21st century. The founders of the Tetrads, all of whom were ex-Triad members, believed that the \" +\n \"Triads were losing their purpose and direction. The Tetrads started off as a small group that mainly engaged \" +\n \"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal \" +\n \"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the \" +\n \"continent.

\" +\n \"Not much else is known about the Tetrads, or about the efforts the Asian governments and corporations are making \" +\n \"to take down this large new crime organization. Many believe that the Tetrads have infiltrated the governments \" +\n \"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Secret War\";\n fn = LiteratureNames.TheSecretWar;\n txt = \"\";\n Literatures[fn] = new Literature(title, fn, txt);\n})();\n","import { ITaskParams } from \"../ITaskParams\";\n/* tslint:disable:max-line-length */\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberTask\n * (defined in Gang.js)\n */\ninterface IGangMemberTaskMetadata {\n /**\n * Description of the task\n */\n desc: string;\n\n /**\n * Whether or not this task is meant for Combat-type gangs\n */\n isCombat: boolean;\n\n /**\n * Whether or not this task is for Hacking-type gangs\n */\n isHacking: boolean;\n\n /**\n * Name of the task\n */\n name: string;\n\n /**\n * An object containing weighting parameters for the task. These parameters are used for\n * various calculations (respect gain, wanted gain, etc.)\n */\n params: ITaskParams;\n}\n\n/**\n * Array of metadata for all Gang Member tasks. Used to construct the global GangMemberTask\n * objects in Gang.js\n */\nexport const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [\n {\n desc: \"This gang member is currently idle\",\n isCombat: true,\n isHacking: true,\n name: \"Unassigned\",\n params: { hackWeight: 100 }, // This is just to get by the weight check in the GangMemberTask constructor\n },\n {\n desc: \"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ransomware\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.0001,\n baseMoney: 3,\n hackWeight: 100,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Phishing\",\n params: {\n baseRespect: 0.00008,\n baseWanted: 0.003,\n baseMoney: 7.5,\n hackWeight: 85,\n chaWeight: 15,\n difficulty: 3.5,\n },\n },\n {\n desc: \"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Identity Theft\",\n params: {\n baseRespect: 0.0001,\n baseWanted: 0.075,\n baseMoney: 18,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 5,\n },\n },\n {\n desc: \"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"DDoS Attacks\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.2,\n hackWeight: 100,\n difficulty: 8,\n },\n },\n {\n desc: \"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Plant Virus\",\n params: {\n baseRespect: 0.0006,\n baseWanted: 0.4,\n hackWeight: 100,\n difficulty: 12,\n },\n },\n {\n desc: \"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Fraud & Counterfeiting\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.3,\n baseMoney: 45,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Money Laundering\",\n params: {\n baseRespect: 0.001,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 75,\n chaWeight: 25,\n difficulty: 25,\n },\n },\n {\n desc: \"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Cyberterrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 36,\n },\n },\n {\n desc: \"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ethical Hacking\",\n params: {\n baseWanted: -0.001,\n baseMoney: 3,\n hackWeight: 90,\n chaWeight: 10,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Mug People\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.00005,\n baseMoney: 3.6,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 10,\n chaWeight: 15,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Deal Drugs\",\n params: {\n baseRespect: 0.00006,\n baseWanted: 0.002,\n baseMoney: 15,\n agiWeight: 20,\n dexWeight: 20,\n chaWeight: 60,\n difficulty: 3.5,\n territory: {\n money: 1.2,\n respect: 1,\n wanted: 1.15,\n },\n },\n },\n {\n desc: \"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Strongarm Civilians\",\n params: {\n baseRespect: 0.00004,\n baseWanted: 0.02,\n baseMoney: 7.5,\n hackWeight: 10,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 20,\n agiWeight: 10,\n chaWeight: 10,\n difficulty: 5,\n territory: {\n money: 1.6,\n respect: 1.1,\n wanted: 1.5,\n },\n },\n },\n {\n desc: \"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Run a Con\",\n params: {\n baseRespect: 0.00012,\n baseWanted: 0.05,\n baseMoney: 45,\n strWeight: 5,\n defWeight: 5,\n agiWeight: 25,\n dexWeight: 25,\n chaWeight: 40,\n difficulty: 14,\n },\n },\n {\n desc: \"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Armed Robbery\",\n params: {\n baseRespect: 0.00014,\n baseWanted: 0.1,\n baseMoney: 114,\n hackWeight: 20,\n strWeight: 15,\n defWeight: 15,\n agiWeight: 10,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Traffick Illegal Arms\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.24,\n baseMoney: 174,\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 25,\n difficulty: 32,\n territory: {\n money: 1.4,\n respect: 1.3,\n wanted: 1.25,\n },\n },\n },\n {\n desc: \"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Threaten & Blackmail\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.125,\n baseMoney: 72,\n hackWeight: 25,\n strWeight: 25,\n dexWeight: 25,\n chaWeight: 25,\n difficulty: 28,\n },\n },\n {\n desc: \"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Human Trafficking\",\n params: {\n baseRespect: 0.004,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 30,\n strWeight: 5,\n defWeight: 5,\n dexWeight: 30,\n chaWeight: 30,\n difficulty: 36,\n territory: {\n money: 1.5,\n respect: 1.5,\n wanted: 1.6,\n },\n },\n },\n {\n desc: \"Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Terrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 36,\n territory: {\n money: 1,\n respect: 2,\n wanted: 2,\n },\n },\n },\n {\n desc: \"Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level\",\n isCombat: true,\n isHacking: true,\n name: \"Vigilante Justice\",\n params: {\n baseWanted: -0.001,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n difficulty: 1,\n territory: {\n money: 1,\n respect: 1,\n wanted: 0.9, // Gets harder with more territory\n },\n },\n },\n {\n desc: \"Assign this gang member to increase their combat stats (str, def, dex, agi)\",\n isCombat: true,\n isHacking: true,\n name: \"Train Combat\",\n params: {\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 25,\n difficulty: 100,\n },\n },\n {\n desc: \"Assign this gang member to train their hacking skills\",\n isCombat: true,\n isHacking: true,\n name: \"Train Hacking\",\n params: { hackWeight: 100, difficulty: 45 },\n },\n {\n desc: \"Assign this gang member to train their charisma\",\n isCombat: true,\n isHacking: true,\n name: \"Train Charisma\",\n params: { chaWeight: 100, difficulty: 8 },\n },\n {\n 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.\",\n isCombat: true,\n isHacking: true,\n name: \"Territory Warfare\",\n params: {\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n chaWeight: 5,\n difficulty: 5,\n },\n },\n];\n","import { GangMemberTask } from \"./GangMemberTask\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangMemberUpgrades } from \"./GangMemberUpgrades\";\nimport { IAscensionResult } from \"./IAscensionResult\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IGang } from \"./IGang\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport {\n calculateRespectGain,\n calculateMoneyGain,\n calculateWantedLevelGain,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"./formulas/formulas\";\n\ninterface IMults {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n}\n\nexport class GangMember {\n name: string;\n task = \"Unassigned\";\n\n earnedRespect = 0;\n\n hack = 1;\n str = 1;\n def = 1;\n dex = 1;\n agi = 1;\n cha = 1;\n\n hack_exp = 0;\n str_exp = 0;\n def_exp = 0;\n dex_exp = 0;\n agi_exp = 0;\n cha_exp = 0;\n\n hack_mult = 1;\n str_mult = 1;\n def_mult = 1;\n dex_mult = 1;\n agi_mult = 1;\n cha_mult = 1;\n\n hack_asc_points = 0;\n str_asc_points = 0;\n def_asc_points = 0;\n dex_asc_points = 0;\n agi_asc_points = 0;\n cha_asc_points = 0;\n\n upgrades: string[] = []; // Names of upgrades\n augmentations: string[] = []; // Names of augmentations only\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points: number): number {\n return calculateAscensionMult(points);\n }\n\n updateSkillLevels(): void {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower(): number {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName: string): boolean {\n if (!GangMemberTasks.hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n this.task = taskName;\n return true;\n }\n\n unassignFromTask(): void {\n this.task = \"Unassigned\";\n }\n\n getTask(): GangMemberTask {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if ((this.task as any) instanceof GangMemberTask) {\n this.task = (this.task as any).name;\n }\n\n if (GangMemberTasks.hasOwnProperty(this.task)) {\n return GangMemberTasks[this.task];\n }\n return GangMemberTasks[\"Unassigned\"];\n }\n\n calculateRespectGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateRespectGain(g, this, task);\n }\n\n calculateWantedLevelGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateWantedLevelGain(g, this, task);\n }\n\n calculateMoneyGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateMoneyGain(g, this, task);\n }\n\n expMult(): IMults {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1,\n };\n }\n\n gainExperience(numCycles = 1): void {\n const task = this.getTask();\n if (task === GangMemberTasks[\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp +=\n (task.hackWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.hack *\n this.calculateAscensionMult(this.hack_asc_points);\n this.str_exp +=\n (task.strWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.str *\n this.calculateAscensionMult(this.str_asc_points);\n this.def_exp +=\n (task.defWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.def *\n this.calculateAscensionMult(this.def_asc_points);\n this.dex_exp +=\n (task.dexWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.dex *\n this.calculateAscensionMult(this.dex_asc_points);\n this.agi_exp +=\n (task.agiWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.agi *\n this.calculateAscensionMult(this.agi_asc_points);\n this.cha_exp +=\n (task.chaWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.cha *\n this.calculateAscensionMult(this.cha_asc_points);\n }\n\n recordEarnedRespect(numCycles = 1, gang: IGang): void {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints(): IMults {\n return {\n hack: calculateAscensionPointsGain(this.hack_exp),\n str: calculateAscensionPointsGain(this.str_exp),\n def: calculateAscensionPointsGain(this.def_exp),\n dex: calculateAscensionPointsGain(this.dex_exp),\n agi: calculateAscensionPointsGain(this.agi_exp),\n cha: calculateAscensionPointsGain(this.cha_exp),\n };\n }\n\n canAscend(): boolean {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getCurrentAscensionMults(): IMults {\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points),\n };\n }\n\n getAscensionMultsAfterAscend(): IMults {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack),\n str: this.calculateAscensionMult(this.str_asc_points + points.str),\n def: this.calculateAscensionMult(this.def_asc_points + points.def),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),\n };\n }\n\n getAscensionResults(): IMults {\n const postAscend = this.getAscensionMultsAfterAscend();\n const preAscend = this.getCurrentAscensionMults();\n\n return {\n hack: postAscend.hack / preAscend.hack,\n str: postAscend.str / preAscend.str,\n def: postAscend.def / preAscend.def,\n dex: postAscend.dex / preAscend.dex,\n agi: postAscend.agi / preAscend.agi,\n cha: postAscend.cha / preAscend.cha,\n };\n }\n\n ascend(): IAscensionResult {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha;\n\n // Remove upgrades. Then re-calculate multipliers and stats\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = GangMemberUpgrades[this.augmentations[i]];\n this.applyUpgrade(aug);\n }\n\n // Clear exp and recalculate stats\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha,\n };\n }\n\n applyUpgrade(upg: GangMemberUpgrade): void {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg: GangMemberUpgrade, player: IPlayer, gang: IGang): boolean {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n\n if (player.money < gang.getUpgradeCost(upg)) return false;\n player.loseMoney(gang.getUpgradeCost(upg), \"gang\");\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n this.applyUpgrade(upg);\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"GangMember\", this);\n }\n\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): GangMember {\n return Generic_fromJSON(GangMember, value.data);\n }\n}\n\nReviver.constructors.GangMember = GangMember;\n","import { IMults, UpgradeType } from \"./data/upgrades\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nexport class GangMemberUpgrade {\n name: string;\n cost: number;\n type: UpgradeType;\n desc: string;\n mults: IMults;\n\n constructor(name = \"\", cost = 0, type: UpgradeType = UpgradeType.Weapon, mults: IMults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n\n this.desc = this.createDescription();\n }\n\n createDescription(): string {\n const lines = [\"Effects:\"];\n if (this.mults.str != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n if (this.mults.def != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n if (this.mults.dex != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n if (this.mults.agi != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n if (this.mults.cha != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n if (this.mults.hack != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n return lines.join(\"
\");\n }\n\n // User friendly version of type.\n getType(): string {\n switch (this.type) {\n case UpgradeType.Weapon:\n return \"Weapon\";\n case UpgradeType.Armor:\n return \"Armor\";\n case UpgradeType.Vehicle:\n return \"Vehicle\";\n case UpgradeType.Rootkit:\n return \"Rootkit\";\n case UpgradeType.Augmentation:\n return \"Augmentation\";\n default:\n return \"\";\n }\n }\n}\n","export const PowerMultiplier: {\n [key: string]: number | undefined;\n} = {\n \"Slum Snakes\": 1,\n Tetrads: 2,\n \"The Syndicate\": 2,\n \"The Dark Army\": 2,\n \"Speakers for the Dead\": 5,\n NiteSec: 2,\n \"The Black Hand\": 5,\n};\n","import * as posNames from \"./companypositionnames\";\nimport { IConstructorParams } from \"../Company\";\n\nimport { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\n// Create Objects containing Company Positions by category\n// Will help in metadata construction later\nconst AllSoftwarePositions: IMap = {};\nconst AllITPositions: IMap = {};\nconst AllNetworkEngineerPositions: IMap = {};\nconst SecurityEngineerPositions: IMap = {};\nconst AllTechnologyPositions: IMap = {};\nconst AllBusinessPositions: IMap = {};\nconst AllAgentPositions: IMap = {};\nconst AllSecurityPositions: IMap = {};\nconst AllSoftwareConsultantPositions: IMap = {};\nconst AllBusinessConsultantPositions: IMap = {};\nconst SoftwarePositionsUpToHeadOfEngineering: IMap = {};\nconst SoftwarePositionsUpToLeadDeveloper: IMap = {};\nconst BusinessPositionsUpToOperationsManager: IMap = {};\nconst WaiterOnly: IMap = {};\nconst EmployeeOnly: IMap = {};\nconst PartTimeWaiterOnly: IMap = {};\nconst PartTimeEmployeeOnly: IMap = {};\nconst OperationsManagerOnly: IMap = {};\nconst CEOOnly: IMap = {};\n\nposNames.SoftwareCompanyPositions.forEach((e) => {\n AllSoftwarePositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.ITCompanyPositions.forEach((e) => {\n AllITPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.NetworkEngineerCompanyPositions.forEach((e) => {\n AllNetworkEngineerPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nAllTechnologyPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\nSecurityEngineerPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\n\nposNames.BusinessCompanyPositions.forEach((e) => {\n AllBusinessPositions[e] = true;\n});\n\nposNames.SecurityCompanyPositions.forEach((e) => {\n AllSecurityPositions[e] = true;\n});\n\nposNames.AgentCompanyPositions.forEach((e) => {\n AllAgentPositions[e] = true;\n});\n\nposNames.SoftwareConsultantCompanyPositions.forEach((e) => {\n AllSoftwareConsultantPositions[e] = true;\n});\n\nposNames.BusinessConsultantCompanyPositions.forEach((e) => {\n AllBusinessConsultantPositions[e] = true;\n});\n\nfor (let i = 0; i < posNames.SoftwareCompanyPositions.length; ++i) {\n const e = posNames.SoftwareCompanyPositions[i];\n if (i <= 5) {\n SoftwarePositionsUpToHeadOfEngineering[e] = true;\n }\n if (i <= 3) {\n SoftwarePositionsUpToLeadDeveloper[e] = true;\n }\n}\nfor (let i = 0; i < posNames.BusinessCompanyPositions.length; ++i) {\n const e = posNames.BusinessCompanyPositions[i];\n if (i <= 3) {\n BusinessPositionsUpToOperationsManager[e] = true;\n }\n}\n\nWaiterOnly[posNames.MiscCompanyPositions[0]] = true;\nEmployeeOnly[posNames.MiscCompanyPositions[1]] = true;\nPartTimeWaiterOnly[posNames.PartTimeCompanyPositions[0]] = true;\nPartTimeEmployeeOnly[posNames.PartTimeCompanyPositions[1]] = true;\nOperationsManagerOnly[posNames.BusinessCompanyPositions[3]] = true;\nCEOOnly[posNames.BusinessCompanyPositions[5]] = true;\n\n// Metadata\nexport const companiesMetadata: IConstructorParams[] = [\n {\n name: LocationName.AevumECorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.Sector12MegaCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumBachmanAndAssociates,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.6,\n salaryMultiplier: 2.6,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12BladeIndustries,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenNWO,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumClarkeIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenOmniTekIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12FourSigma,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.5,\n salaryMultiplier: 2.5,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.ChongqingKuaiGongInternational,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.2,\n salaryMultiplier: 2.2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.AevumFulcrumTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaStormTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoDefComm,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenHeliosLabs,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoVitaLife,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12IcarusMicrosystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12UniversalEnergy,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumGalacticCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumAeroCorp,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenOmniaCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.ChongqingSolarisSpaceSystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12DeltaOne,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.6,\n salaryMultiplier: 1.6,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaNovaMedical,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12CIA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.Sector12NSA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.AevumWatchdogSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenLexoCorp,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllBusinessPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.4,\n salaryMultiplier: 1.4,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumRhoConstruction,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.Sector12AlphaEnterprises,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToLeadDeveloper,\n BusinessPositionsUpToOperationsManager,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumPolice,\n info: \"\",\n companyPositions: Object.assign({}, AllSecurityPositions, SoftwarePositionsUpToLeadDeveloper),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.VolhavenSysCoreSecurities,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenCompuTek,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.AevumNetLinkTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.Sector12CarmichaelSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllAgentPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.Sector12FoodNStuff,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.Sector12JoesGuns,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.IshimaOmegaSoftware,\n info: \"\",\n companyPositions: Object.assign({}, AllSoftwarePositions, AllSoftwareConsultantPositions, AllITPositions),\n expMultiplier: 1.1,\n salaryMultiplier: 1.1,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.NewTokyoNoodleBar,\n info: \"\",\n companyPositions: Object.assign({}, WaiterOnly, PartTimeWaiterOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n];\n","export interface IConstructorParams {\n name: string;\n cost: number;\n desc: string;\n advertisingMult?: number;\n employeeChaMult?: number;\n employeeCreMult?: number;\n employeeEffMult?: number;\n employeeIntMult?: number;\n productionMult?: number;\n productProductionMult?: number;\n salesMult?: number;\n sciResearchMult?: number;\n storageMult?: number;\n}\n\nexport class Research {\n // Name of research. This will be used to identify researches in the Research Tree\n name = \"\";\n\n // How much scientific research it costs to unlock this\n cost = 0;\n\n // Description of what the Research does\n desc = \"\";\n\n // All possible generic upgrades for the company, in the form of multipliers\n advertisingMult = 1;\n employeeChaMult = 1;\n employeeCreMult = 1;\n employeeEffMult = 1;\n employeeIntMult = 1;\n productionMult = 1;\n productProductionMult = 1;\n salesMult = 1;\n sciResearchMult = 1;\n storageMult = 1;\n\n constructor(p: IConstructorParams = { name: \"\", cost: 0, desc: \"\" }) {\n this.name = p.name;\n this.cost = p.cost;\n this.desc = p.desc;\n if (p.advertisingMult) {\n this.advertisingMult = p.advertisingMult;\n }\n if (p.employeeChaMult) {\n this.employeeChaMult = p.employeeChaMult;\n }\n if (p.employeeCreMult) {\n this.employeeCreMult = p.employeeCreMult;\n }\n if (p.employeeEffMult) {\n this.employeeEffMult = p.employeeEffMult;\n }\n if (p.employeeIntMult) {\n this.employeeIntMult = p.employeeIntMult;\n }\n if (p.productionMult) {\n this.productionMult = p.productionMult;\n }\n if (p.productProductionMult) {\n this.productProductionMult = p.productProductionMult;\n }\n if (p.salesMult) {\n this.salesMult = p.salesMult;\n }\n if (p.sciResearchMult) {\n this.sciResearchMult = p.sciResearchMult;\n }\n if (p.storageMult) {\n this.storageMult = p.storageMult;\n }\n }\n}\n","import { IConstructorParams } from \"../Research\";\n\nexport const researchMetadata: IConstructorParams[] = [\n {\n name: \"AutoBrew\",\n cost: 12e3,\n desc:\n \"Automatically keep your employees fully caffeinated with \" +\n \"coffee injections. This research will keep the energy of all \" +\n \"employees at its maximum possible value, for no cost. \" +\n \"This will also disable the Coffee upgrade.\",\n },\n {\n name: \"AutoPartyManager\",\n cost: 15e3,\n desc:\n \"Automatically analyzes your employees' happiness and morale \" +\n \"and boosts them whenever it detects a decrease. This research will \" +\n \"keep the morale and happiness of all employees at their maximum possible \" +\n \"values, for no cost. \" +\n \"This will also disable the 'Throw Party' feature.\",\n },\n {\n name: \"Automatic Drug Administration\",\n cost: 10e3,\n desc:\n \"Research how to automatically administer performance-enhacing drugs to all of \" +\n \"your employees. This unlocks Drug-related Research.\",\n },\n {\n name: \"Bulk Purchasing\",\n cost: 5e3,\n desc:\n \"Research the art of buying materials in bulk. This allows you to purchase \" +\n \"any amount of a material instantly.\",\n },\n {\n name: \"CPH4 Injections\",\n cost: 25e3,\n desc:\n \"Develop an advanced and harmless synthetic drug that is administered to \" +\n \"employees to increase all of their stats, except experience, by 10%.\",\n employeeCreMult: 1.1,\n employeeChaMult: 1.1,\n employeeEffMult: 1.1,\n employeeIntMult: 1.1,\n },\n {\n name: \"Drones\",\n cost: 5e3,\n desc:\n \"Acquire the knowledge needed to create advanced drones. This research does nothing \" +\n \"by itself, but unlocks other Drone-related research.\",\n },\n {\n name: \"Drones - Assembly\",\n cost: 25e3,\n desc:\n \"Manufacture and use Assembly Drones to improve the efficiency of \" +\n \"your production lines. This increases all production by 20%.\",\n productionMult: 1.2,\n },\n {\n name: \"Drones - Transport\",\n cost: 30e3,\n desc:\n \"Manufacture and use intelligent Transport Drones to optimize \" +\n \"your warehouses. This increases the storage space of all warehouses \" +\n \"by 50%.\",\n storageMult: 1.5,\n },\n {\n name: \"Go-Juice\",\n cost: 25e3,\n desc:\n \"Provide employees with Go-Juice, a coffee-derivative that further enhances \" +\n \"the brain's dopamine production. This increases the maximum energy of all \" +\n \"employees by 10.\",\n },\n {\n name: \"Hi-Tech R&D Laboratory\",\n cost: 5e3,\n desc:\n \"Construct a cutting edge facility dedicated to advanced research and \" +\n \"and development. This allows you to spend Scientific Research \" +\n \"on powerful upgrades. It also globally increases Scientific Research \" +\n \"production by 10%.\",\n sciResearchMult: 1.1,\n },\n {\n name: \"HRBuddy-Recruitment\",\n cost: 15e3,\n desc:\n \"Use automated software to handle the hiring of employees. With this \" +\n \"research, each office will automatically hire one employee per \" +\n \"market cycle if there is available space.\",\n },\n {\n name: \"HRBuddy-Training\",\n cost: 20e3,\n desc:\n \"Use automated software to handle the training of employees. With this \" +\n \"research, each employee hired with HRBuddy-Recruitment will automatically \" +\n \"be assigned to 'Training', rather than being unassigned.\",\n },\n {\n name: \"JoyWire\",\n cost: 20e3,\n desc: \"A brain implant which is installed in employees, increasing their \" + \"maximum happiness by 10.\",\n },\n {\n name: \"Market-TA.I\",\n cost: 20e3,\n desc:\n \"Develop advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know what price to sell your Materials/Products \" +\n \"at in order to avoid losing sales due to having too high of a mark-up. \" +\n \"It also lets you automatically use that sale price.\",\n },\n {\n name: \"Market-TA.II\",\n cost: 50e3,\n desc:\n \"Develop double-advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know how many sales of a Material/Product you lose or gain \" +\n \"from having too high or too low or a sale price. It also lets you automatically \" +\n \"set the sale price of your Materials/Products at the optimal price such that \" +\n \"the amount sold matches the amount produced.\",\n },\n {\n name: \"Overclock\",\n cost: 15e3,\n desc:\n \"Equip employees with a headset that uses transcranial direct current \" +\n \"stimulation (tDCS) to increase the speed of their neurotransmitters. \" +\n \"This research increases the intelligence and efficiency of all \" +\n \"employees by 25%.\",\n employeeEffMult: 1.25,\n employeeIntMult: 1.25,\n },\n {\n name: \"Self-Correcting Assemblers\",\n cost: 25e3,\n desc:\n \"Create assemblers that can be used for universal production. \" +\n \"These assemblers use deep learning to improve their efficiency \" +\n \"at their tasks. This research increases all production by 10%\",\n productionMult: 1.1,\n },\n {\n name: \"Sti.mu\",\n cost: 30e3,\n desc:\n \"Upgrade the tDCS headset to stimulate regions of the brain that \" +\n \"control confidence and enthusiasm. This research increases the max \" +\n \"morale of all employees by 10.\",\n },\n {\n name: \"sudo.Assist\",\n cost: 15e3,\n desc: \"Develop a virtual assistant AI to handle and manage administrative \" + \"issues for your corporation.\",\n },\n {\n name: \"uPgrade: Capacity.I\",\n cost: 20e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 3 to 4).\",\n },\n {\n name: \"uPgrade: Capacity.II\",\n cost: 30e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 4 to 5).\",\n },\n {\n name: \"uPgrade: Dashboard\",\n cost: 5e3,\n desc:\n \"Improve the software used to manage the industry's production line \" +\n \"for its various products. This allows you to manage the production and \" +\n \"sale of a product before it's finished being designed.\",\n },\n {\n name: \"uPgrade: Fulcrum\",\n cost: 10e3,\n desc:\n \"Streamline the manufacturing of this industry's various products. \" +\n \"This research increases the production of your products by 5%\",\n productProductionMult: 1.05,\n },\n];\n","/**\n * Object representing an upgrade that can be purchased with hashes\n */\nexport interface IConstructorParams {\n cost?: number;\n costPerLevel: number;\n desc: string;\n hasTargetServer?: boolean;\n name: string;\n value: number;\n effectText?: (level: number) => JSX.Element | null;\n}\n\nexport class HashUpgrade {\n /**\n * If the upgrade has a flat cost (never increases), it goes here\n * Otherwise, this property should be undefined\n *\n * This property overrides the 'costPerLevel' property\n */\n cost?: number;\n\n /**\n * Base cost for this upgrade. Every time the upgrade is purchased,\n * its cost increases by this same amount (so its 1x, 2x, 3x, 4x, etc.)\n */\n costPerLevel = 0;\n\n /**\n * Description of what the upgrade does\n */\n desc = \"\";\n\n /**\n * Boolean indicating that this upgrade's effect affects a single server,\n * the \"target\" server\n */\n hasTargetServer = false;\n\n // Name of upgrade\n name = \"\";\n\n // Generic value used to indicate the potency/amount of this upgrade's effect\n // The meaning varies between different upgrades\n value = 0;\n\n constructor(p: IConstructorParams) {\n if (p.cost != null) {\n this.cost = p.cost;\n }\n if (p.effectText != null) {\n this.effectText = p.effectText;\n }\n\n this.costPerLevel = p.costPerLevel;\n this.desc = p.desc;\n this.hasTargetServer = p.hasTargetServer ? p.hasTargetServer : false;\n this.name = p.name;\n this.value = p.value;\n }\n\n // Functions that returns the UI element to display the effect of this upgrade.\n effectText: (level: number) => JSX.Element | null = () => null;\n\n getCost(levels: number): number {\n if (typeof this.cost === \"number\") {\n return this.cost;\n }\n\n return Math.round((levels + 1) * this.costPerLevel);\n }\n}\n","// Metadata used to construct all Hash Upgrades\nimport React from \"react\";\nimport { IConstructorParams } from \"../HashUpgrade\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\n\nexport const HashUpgradesMetadata: IConstructorParams[] = [\n {\n cost: 4,\n costPerLevel: 4,\n desc: \"Sell hashes for $1m\",\n name: \"Sell for Money\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for \n \n ),\n value: 1e6,\n },\n {\n costPerLevel: 100,\n desc: \"Sell hashes for $1b in Corporation funds\",\n name: \"Sell for Corporation Funds\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for Corporation funds.\n \n ),\n value: 1e9,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to decrease the minimum security of a single server by 2%. \" +\n \"Note that a server's minimum security cannot go below 1. This effect persists \" +\n \"until you install Augmentations (since servers are reset at that time).\",\n hasTargetServer: true,\n name: \"Reduce Minimum Security\",\n value: 0.98,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to increase the maximum amount of money on a single server by 2%. \" +\n \"This effect persists until you install Augmentations (since servers \" +\n \"are reset at that time).\",\n hasTargetServer: true,\n name: \"Increase Maximum Money\",\n value: 1.02,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when studying at a university by 20%. \" +\n \"This effect persists until you install Augmentations\",\n name: \"Improve Studying\",\n effectText: (level: number): JSX.Element | null => <>Improves studying by {level * 20}%,\n value: 20, // Improves studying by value%\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when training at the gym by 20%. This effect \" +\n \"persists until you install Augmentations\",\n name: \"Improve Gym Training\",\n effectText: (level: number): JSX.Element | null => <>Improves training by {level * 20}%,\n value: 20, // Improves training by value%\n },\n {\n costPerLevel: 200,\n desc: \"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries\",\n name: \"Exchange for Corporation Research\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {level}k Scientific Research in your industries.\n ),\n value: 1000,\n },\n {\n costPerLevel: 250,\n desc: \"Exchange hashes for 100 Bladeburner Rank\",\n name: \"Exchange for Bladeburner Rank\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(100 * level, \"0a\")} Bladeburner rank\n ),\n value: 100,\n },\n {\n costPerLevel: 250,\n desc: \"Exchanges hashes for 10 Bladeburner Skill Points\",\n name: \"Exchange for Bladeburner SP\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(10 * level, \"0a\")} Bladeburner Skill Points\n ),\n value: 10,\n },\n {\n costPerLevel: 200,\n desc: \"Generate a random Coding Contract somewhere on the network\",\n name: \"Generate Coding Contract\",\n effectText: (level: number): JSX.Element | null => <>Generated {level} contracts.,\n value: 1,\n },\n];\n","/**\n * The environment in which a script runs. The environment holds\n * Netscript functions and arguments for that script.\n */\nimport { IMap } from \"../types\";\n\nexport class Environment {\n /**\n * Parent environment. Used to implement \"scope\"\n */\n parent: Environment | null = null;\n\n /**\n * Whether or not the script that uses this Environment should stop running\n */\n stopFlag = false;\n\n /**\n * Environment variables (currently only Netscript functions)\n */\n vars: IMap = {};\n\n constructor(parent: Environment | null) {\n if (parent instanceof Environment) {\n this.vars = Object.assign({}, parent.vars);\n }\n\n this.parent = parent;\n }\n\n /**\n * Finds the scope where the variable with the given name is defined\n */\n lookup(name: string): Environment | null {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let scope: Environment | null = this;\n while (scope) {\n if (Object.prototype.hasOwnProperty.call(scope.vars, name)) {\n return scope;\n }\n scope = scope.parent;\n }\n\n return null;\n }\n\n //Get the current value of a variable\n get(name: string): any {\n if (name in this.vars) {\n return this.vars[name];\n }\n\n throw new Error(`Undefined variable ${name}`);\n }\n\n //Sets the value of a variable in any scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n set(name: string, value: any): any {\n const scope = this.lookup(name);\n\n //If scope has a value, then this variable is already set in a higher scope, so\n //set is there. Otherwise, create a new variable in the local scope\n if (scope !== null) {\n return (scope.vars[name] = value);\n } else {\n return (this.vars[name] = value);\n }\n }\n\n //Creates (or overwrites) a variable in the current scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n def(name: string, value: any): any {\n return (this.vars[name] = value);\n }\n}\n","/**\n * Determines if the number is a power of 2\n * @param n The number to check.\n */\nexport function isPowerOfTwo(n: number): boolean {\n if (isNaN(n)) {\n return false;\n }\n\n if (n === 0) {\n return false;\n }\n\n // Disabiling the bitwise rule because it's honestly the most effecient way to check for this.\n // tslint:disable-next-line:no-bitwise\n return (n & (n - 1)) === 0;\n}\n","/**\n * Initialization metadata for all Stocks. This is used to generate the\n * stock parameter values upon a reset\n *\n * Some notes:\n * - Megacorporations have better otlkMags\n * - Higher volatility -> Bigger spread\n * - Lower price -> Bigger spread\n * - Share tx required for movement used for balancing\n */\nimport { StockSymbols } from \"./StockSymbols\";\nimport { IConstructorParams } from \"../Stock\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const InitStockMetadata: IConstructorParams[] = [\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 17e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.AevumECorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumECorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 34e3,\n min: 24e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.Sector12MegaCorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12MegaCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 12e3,\n },\n marketCap: 1.6e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12BladeIndustries,\n otlkMag: 13,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12BladeIndustries],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 10e3,\n },\n marketCap: 1.5e12,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.AevumClarkeIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumClarkeIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 43e3,\n min: 32e3,\n },\n marketCap: 1.8e12,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniTekIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 80e3,\n min: 50e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 110,\n min: 100,\n },\n name: LocationName.Sector12FourSigma,\n otlkMag: 17,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12FourSigma],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 16e3,\n },\n marketCap: 1.9e12,\n mv: {\n divisor: 100,\n max: 85,\n min: 75,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 7,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.ChongqingKuaiGongInternational],\n },\n\n {\n b: true,\n initPrice: {\n max: 36e3,\n min: 29e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 130,\n min: 120,\n },\n name: LocationName.AevumFulcrumTechnologies,\n otlkMag: 16,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumFulcrumTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 20e3,\n },\n marketCap: 1.2e12,\n mv: {\n divisor: 100,\n max: 90,\n min: 80,\n },\n name: LocationName.IshimaStormTechnologies,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.IshimaStormTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 19e3,\n min: 6e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.NewTokyoDefComm,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoDefComm],\n },\n\n {\n b: true,\n initPrice: {\n max: 18e3,\n min: 10e3,\n },\n marketCap: 825e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.VolhavenHeliosLabs,\n otlkMag: 9,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenHeliosLabs],\n },\n\n {\n b: true,\n initPrice: {\n max: 14e3,\n min: 8e3,\n },\n marketCap: 1e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.NewTokyoVitaLife,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoVitaLife],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 800e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n otlkMag: 7.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12IcarusMicrosystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 29e3,\n min: 16e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 60,\n min: 50,\n },\n name: LocationName.Sector12UniversalEnergy,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12UniversalEnergy],\n },\n\n {\n b: true,\n initPrice: {\n max: 17e3,\n min: 8e3,\n },\n marketCap: 640e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.AevumAeroCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.AevumAeroCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 15e3,\n min: 6e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n otlkMag: 4.5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniaCybersystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 14e3,\n },\n marketCap: 705e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n otlkMag: 8.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.ChongqingSolarisSpaceSystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 12e3,\n },\n marketCap: 695e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n otlkMag: 10.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoGlobalPharmaceuticals],\n },\n\n {\n b: true,\n initPrice: {\n max: 27e3,\n min: 15e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.IshimaNovaMedical,\n otlkMag: 5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.IshimaNovaMedical],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 450e9,\n mv: {\n divisor: 100,\n max: 260,\n min: 240,\n },\n name: LocationName.AevumWatchdogSecurity,\n otlkMag: 1.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 12e3,\n },\n symbol: StockSymbols[LocationName.AevumWatchdogSecurity],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 4.5e3,\n },\n marketCap: 300e9,\n mv: {\n divisor: 100,\n max: 135,\n min: 115,\n },\n name: LocationName.VolhavenLexoCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenLexoCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 7e3,\n min: 2e3,\n },\n marketCap: 180e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: LocationName.AevumRhoConstruction,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.AevumRhoConstruction],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 240e9,\n mv: {\n divisor: 100,\n max: 205,\n min: 175,\n },\n name: LocationName.Sector12AlphaEnterprises,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 16,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12AlphaEnterprises],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 3e3,\n },\n marketCap: 200e9,\n mv: {\n divisor: 100,\n max: 170,\n min: 150,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n otlkMag: 3,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.VolhavenSysCoreSecurities],\n },\n\n {\n b: true,\n initPrice: {\n max: 6e3,\n min: 1e3,\n },\n marketCap: 185e9,\n mv: {\n divisor: 100,\n max: 100,\n min: 80,\n },\n name: LocationName.VolhavenCompuTek,\n otlkMag: 4,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.VolhavenCompuTek],\n },\n\n {\n b: true,\n initPrice: {\n max: 5e3,\n min: 1e3,\n },\n marketCap: 58e9,\n mv: {\n divisor: 100,\n max: 400,\n min: 200,\n },\n name: LocationName.AevumNetLinkTechnologies,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 20,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 18e3,\n },\n symbol: StockSymbols[LocationName.AevumNetLinkTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 1e3,\n },\n marketCap: 60e9,\n mv: {\n divisor: 100,\n max: 110,\n min: 90,\n },\n name: LocationName.IshimaOmegaSoftware,\n otlkMag: 0.5,\n spreadPerc: {\n divisor: 10,\n max: 13,\n min: 4,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.IshimaOmegaSoftware],\n },\n\n {\n b: false,\n initPrice: {\n max: 4.5e3,\n min: 500,\n },\n marketCap: 45e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12FoodNStuff,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 6,\n },\n shareTxForMovement: {\n max: 180e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.Sector12FoodNStuff],\n },\n\n {\n b: true,\n initPrice: {\n max: 3.5e3,\n min: 1.5e3,\n },\n marketCap: 30e9,\n mv: {\n divisor: 100,\n max: 275,\n min: 100,\n },\n name: \"Sigma Cosmetics\",\n otlkMag: 0,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 70e3,\n min: 20e3,\n },\n symbol: StockSymbols[\"Sigma Cosmetics\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 42e9,\n mv: {\n divisor: 100,\n max: 350,\n min: 200,\n },\n name: \"Joes Guns\",\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 52e3,\n min: 15e3,\n },\n symbol: StockSymbols[\"Joes Guns\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 100e9,\n mv: {\n divisor: 100,\n max: 175,\n min: 120,\n },\n name: \"Catalyst Ventures\",\n otlkMag: 13.5,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 5,\n },\n shareTxForMovement: {\n max: 72e3,\n min: 24e3,\n },\n symbol: StockSymbols[\"Catalyst Ventures\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 15e3,\n },\n marketCap: 360e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: \"Microdyne Technologies\",\n otlkMag: 8,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Microdyne Technologies\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 420e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: \"Titan Laboratories\",\n otlkMag: 11,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Titan Laboratories\"],\n },\n];\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { Gang } from \"../Gang/Gang\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangMemberTasks } from \"../Gang/GangMemberTasks\";\nimport { GangMemberUpgrades } from \"../Gang/GangMemberUpgrades\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GangMember } from \"../Gang/GangMember\";\nimport { GangMemberTask } from \"../Gang/GangMemberTask\";\n\nimport {\n Gang as IGang,\n GangGenInfo,\n GangOtherInfo,\n GangMemberInfo,\n GangMemberAscension,\n EquipmentStats,\n GangTaskStats,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGang {\n const checkGangApiAccess = function (func: string): void {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n const hasAccess = gang instanceof Gang;\n if (!hasAccess) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func: string, name: string): GangMember {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n for (const member of gang.members) if (member.name === name) return member;\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func: string, name: string): GangMemberTask {\n const task = GangMemberTasks[name];\n if (!task) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n return {\n createGang: function (faction: string): boolean {\n helper.updateDynamicRam(\"createGang\", getRamCost(\"gang\", \"createGang\"));\n // this list is copied from Faction/ui/Root.tsx\n const GangNames = [\n \"Slum Snakes\",\n \"Tetrads\",\n \"The Syndicate\",\n \"The Dark Army\",\n \"Speakers for the Dead\",\n \"NiteSec\",\n \"The Black Hand\",\n ];\n if (!player.canAccessGang() || !GangNames.includes(faction)) return false;\n if (player.inGang()) return false;\n if (!player.factions.includes(faction)) return false;\n\n const isHacking = faction === \"NiteSec\" || faction === \"The Black Hand\";\n player.startGang(faction, isHacking);\n return true;\n },\n inGang: function (): boolean {\n helper.updateDynamicRam(\"inGang\", getRamCost(\"gang\", \"inGang\"));\n return player.inGang();\n },\n getMemberNames: function (): string[] {\n helper.updateDynamicRam(\"getMemberNames\", getRamCost(\"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.members.map((member) => member.name);\n },\n getGangInformation: function (): GangGenInfo {\n helper.updateDynamicRam(\"getGangInformation\", getRamCost(\"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return {\n faction: gang.facName,\n isHacking: gang.isHackingGang,\n moneyGainRate: gang.moneyGainRate,\n power: gang.getPower(),\n respect: gang.respect,\n respectGainRate: gang.respectGainRate,\n territory: gang.getTerritory(),\n territoryClashChance: gang.territoryClashChance,\n territoryWarfareEngaged: gang.territoryWarfareEngaged,\n wantedLevel: gang.wanted,\n wantedLevelGainRate: gang.wantedGainRate,\n wantedPenalty: gang.getWantedPenalty(),\n };\n },\n getOtherGangInformation: function (): GangOtherInfo {\n helper.updateDynamicRam(\"getOtherGangInformation\", getRamCost(\"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy: any = {};\n for (const gang in AllGangs) {\n cpy[gang] = Object.assign({}, AllGangs[gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (name: any): GangMemberInfo {\n helper.updateDynamicRam(\"getMemberInformation\", getRamCost(\"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getMemberInformation\", name);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice(),\n\n respectGain: member.calculateRespectGain(gang),\n wantedLevelGain: member.calculateWantedLevelGain(gang),\n moneyGain: member.calculateMoneyGain(gang),\n };\n },\n canRecruitMember: function (): boolean {\n helper.updateDynamicRam(\"canRecruitMember\", getRamCost(\"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.canRecruitMember();\n },\n recruitMember: function (name: any): boolean {\n helper.updateDynamicRam(\"recruitMember\", getRamCost(\"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const recruited = gang.recruitMember(name);\n if (recruited) {\n workerScript.log(\"gang.recruitMember\", () => `Successfully recruited Gang Member '${name}'`);\n } else {\n workerScript.log(\"gang.recruitMember\", () => `Failed to recruit Gang Member '${name}'`);\n }\n\n return recruited;\n },\n getTaskNames: function (): string[] {\n helper.updateDynamicRam(\"getTaskNames\", getRamCost(\"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const tasks = gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (memberName: any, taskName: any): boolean {\n helper.updateDynamicRam(\"setMemberTask\", getRamCost(\"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const success = member.assignToTask(taskName);\n if (success) {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`,\n );\n } else {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`,\n );\n }\n\n return success;\n },\n getTaskStats: function (taskName: any): GangTaskStats {\n helper.updateDynamicRam(\"getTaskStats\", getRamCost(\"gang\", \"getTaskStats\"));\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function (): string[] {\n helper.updateDynamicRam(\"getEquipmentNames\", getRamCost(\"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(GangMemberUpgrades);\n },\n getEquipmentCost: function (equipName: any): number {\n helper.updateDynamicRam(\"getEquipmentCost\", getRamCost(\"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const upg = GangMemberUpgrades[equipName];\n if (upg === null) return Infinity;\n return gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (equipName: any): string {\n helper.updateDynamicRam(\"getEquipmentType\", getRamCost(\"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = GangMemberUpgrades[equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (equipName: any): EquipmentStats {\n helper.updateDynamicRam(\"getEquipmentStats\", getRamCost(\"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) {\n throw helper.makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n const typecheck: EquipmentStats = equipment.mults;\n return Object.assign({}, typecheck) as any;\n },\n purchaseEquipment: function (memberName: any, equipName: any): boolean {\n helper.updateDynamicRam(\"purchaseEquipment\", getRamCost(\"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, player, gang);\n if (res) {\n workerScript.log(\"gang.purchaseEquipment\", () => `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\n \"gang.purchaseEquipment\",\n () => `Failed to purchase '${equipName}' for Gang member '${memberName}'`,\n );\n }\n\n return res;\n },\n ascendMember: function (name: any): GangMemberAscension | undefined {\n helper.updateDynamicRam(\"ascendMember\", getRamCost(\"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"ascendMember\", name);\n if (!member.canAscend()) return;\n return gang.ascendMember(member, workerScript);\n },\n getAscensionResult: function (name: any): GangMemberAscension | undefined {\n helper.updateDynamicRam(\"getAscensionResult\", getRamCost(\"gang\", \"getAscensionResult\"));\n checkGangApiAccess(\"getAscensionResult\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getAscensionResult\", name);\n if (!member.canAscend()) return;\n return {\n respect: member.earnedRespect,\n ...member.getAscensionResults(),\n };\n },\n setTerritoryWarfare: function (engage: any): void {\n helper.updateDynamicRam(\"setTerritoryWarfare\", getRamCost(\"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (engage) {\n gang.territoryWarfareEngaged = true;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Engaging in Gang Territory Warfare\");\n } else {\n gang.territoryWarfareEngaged = false;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (otherGang: any): number {\n helper.updateDynamicRam(\"getChanceToWinClash\", getRamCost(\"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (AllGangs[otherGang] == null) {\n throw helper.makeRuntimeErrorMsg(`gang.getChanceToWinClash`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = AllGangs[gang.facName].power;\n const otherPower = AllGangs[otherGang].power;\n\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function (): number {\n helper.updateDynamicRam(\"getBonusTime\", getRamCost(\"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return Math.round(gang.storedCycles / 5);\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { FactionWorkType } from \"../Faction/FactionWorkTypeEnum\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\nimport { SleeveTaskType } from \"../PersonObjects/Sleeve/SleeveTaskTypesEnum\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { findSleevePurchasableAugs } from \"../PersonObjects/Sleeve/SleeveHelpers\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { findCrime } from \"../Crime/CrimeHelpers\";\n\nimport { Sleeve as ISleeve } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): ISleeve {\n const checkSleeveAPIAccess = function (func: any): void {\n if (player.bitNodeN !== 10 && !SourceFileFlags[10]) {\n throw helper.makeRuntimeErrorMsg(\n `sleeve.${func}`,\n \"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\",\n );\n }\n };\n\n const checkSleeveNumber = function (func: any, sleeveNumber: any): void {\n if (sleeveNumber >= player.sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, () => msg);\n throw helper.makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n return {\n getNumSleeves: function (): number {\n helper.updateDynamicRam(\"getNumSleeves\", getRamCost(\"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return player.sleeves.length;\n },\n setToShockRecovery: function (asleeveNumber: any = 0): boolean {\n const sleeveNumber = helper.number(\"setToShockRecovery\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"setToShockRecovery\", getRamCost(\"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return player.sleeves[sleeveNumber].shockRecovery(player);\n },\n setToSynchronize: function (asleeveNumber: any = 0): boolean {\n const sleeveNumber = helper.number(\"setToSynchronize\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"setToSynchronize\", getRamCost(\"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return player.sleeves[sleeveNumber].synchronize(player);\n },\n setToCommitCrime: function (asleeveNumber: any = 0, aCrimeRoughName: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"setToCommitCrime\", \"sleeveNumber\", asleeveNumber);\n const crimeRoughName = helper.string(\"setToCommitCrime\", \"crimeName\", aCrimeRoughName);\n helper.updateDynamicRam(\"setToCommitCrime\", getRamCost(\"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n const crime = findCrime(crimeRoughName);\n if (crime === null) {\n return false;\n }\n return player.sleeves[sleeveNumber].commitCrime(player, crime.name);\n },\n setToUniversityCourse: function (asleeveNumber: any = 0, auniversityName: any = \"\", aclassName: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"setToUniversityCourse\", \"sleeveNumber\", asleeveNumber);\n const universityName = helper.string(\"setToUniversityCourse\", \"universityName\", auniversityName);\n const className = helper.string(\"setToUniversityCourse\", \"className\", aclassName);\n helper.updateDynamicRam(\"setToUniversityCourse\", getRamCost(\"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return player.sleeves[sleeveNumber].takeUniversityCourse(player, universityName, className);\n },\n travel: function (asleeveNumber: any = 0, acityName: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"travel\", \"sleeveNumber\", asleeveNumber);\n const cityName = helper.string(\"setToUniversityCourse\", \"cityName\", acityName);\n helper.updateDynamicRam(\"travel\", getRamCost(\"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return player.sleeves[sleeveNumber].travel(player, cityName as CityName);\n },\n setToCompanyWork: function (asleeveNumber: any = 0, acompanyName: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"setToCompanyWork\", \"sleeveNumber\", asleeveNumber);\n const companyName = helper.string(\"setToUniversityCourse\", \"companyName\", acompanyName);\n helper.updateDynamicRam(\"setToCompanyWork\", getRamCost(\"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber);\n\n // Cannot work at the same company that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForCompany(player, companyName);\n },\n setToFactionWork: function (asleeveNumber: any = 0, afactionName: any = \"\", aworkType: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"setToFactionWork\", \"sleeveNumber\", asleeveNumber);\n const factionName = helper.string(\"setToUniversityCourse\", \"factionName\", afactionName);\n const workType = helper.string(\"setToUniversityCourse\", \"workType\", aworkType);\n helper.updateDynamicRam(\"setToFactionWork\", getRamCost(\"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber);\n\n // Cannot work at the same faction that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Faction && other.currentTaskLocation === factionName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForFaction(player, factionName, workType);\n },\n setToGymWorkout: function (asleeveNumber: any = 0, agymName: any = \"\", astat: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"setToGymWorkout\", \"sleeveNumber\", asleeveNumber);\n const gymName = helper.string(\"setToUniversityCourse\", \"gymName\", agymName);\n const stat = helper.string(\"setToUniversityCourse\", \"stat\", astat);\n helper.updateDynamicRam(\"setToGymWorkout\", getRamCost(\"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n\n return player.sleeves[sleeveNumber].workoutAtGym(player, gymName, stat);\n },\n getSleeveStats: function (asleeveNumber: any = 0): {\n shock: number;\n sync: number;\n hacking: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n } {\n const sleeveNumber = helper.number(\"getSleeveStats\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"getSleeveStats\", getRamCost(\"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking: sl.hacking,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma,\n };\n },\n getTask: function (asleeveNumber: any = 0): {\n task: string;\n crime: string;\n location: string;\n gymStatType: string;\n factionWorkType: string;\n } {\n const sleeveNumber = helper.number(\"getTask\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"getTask\", getRamCost(\"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n task: SleeveTaskType[sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: FactionWorkType[sl.factionWorkType],\n };\n },\n getInformation: function (asleeveNumber: any = 0): any {\n const sleeveNumber = helper.number(\"getInformation\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"getInformation\", getRamCost(\"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(player.jobs), // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(player.jobs),\n maxHp: sl.max_hp,\n\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n charisma: sl.charisma_mult,\n charismaExp: sl.charisma_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult,\n },\n\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money,\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money,\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money,\n },\n workRepGain: sl.getRepGain(player),\n };\n },\n getSleeveAugmentations: function (asleeveNumber: any = 0): string[] {\n const sleeveNumber = helper.number(\"getSleeveAugmentations\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"getSleeveAugmentations\", getRamCost(\"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n\n const augs = [];\n for (let i = 0; i < player.sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(player.sleeves[sleeveNumber].augmentations[i].name);\n }\n return augs;\n },\n getSleevePurchasableAugs: function (asleeveNumber: any = 0): {\n name: string;\n cost: number;\n }[] {\n const sleeveNumber = helper.number(\"getSleevePurchasableAugs\", \"sleeveNumber\", asleeveNumber);\n helper.updateDynamicRam(\"getSleevePurchasableAugs\", getRamCost(\"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n\n const purchasableAugs = findSleevePurchasableAugs(player.sleeves[sleeveNumber], player);\n const augs = [];\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.startingCost,\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (asleeveNumber: any = 0, aaugName: any = \"\"): boolean {\n const sleeveNumber = helper.number(\"purchaseSleeveAug\", \"sleeveNumber\", asleeveNumber);\n const augName = helper.string(\"setToUniversityCourse\", \"augName\", aaugName);\n helper.updateDynamicRam(\"purchaseSleeveAug\", getRamCost(\"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n\n const aug = Augmentations[augName];\n if (!aug) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return player.sleeves[sleeveNumber].tryBuyAugmentation(player, aug);\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Exploit } from \"../Exploits/Exploit\";\n\nexport interface INetscriptExtra {\n heart: {\n break(): number;\n };\n exploit(): void;\n bypass(doc: Document): void;\n alterReality(): void;\n}\n\nexport function NetscriptExtra(player: IPlayer, workerScript: WorkerScript): INetscriptExtra {\n return {\n heart: {\n // Easter egg function\n break: function (): number {\n return player.karma;\n },\n },\n exploit: function (): void {\n player.giveExploit(Exploit.UndocumentedFunctionCall);\n },\n bypass: function (doc: any): void {\n // reset both fields first\n doc.completely_unused_field = undefined;\n const real_document: any = document;\n real_document.completely_unused_field = undefined;\n // set one to true and check that it affected the other.\n real_document.completely_unused_field = true;\n if (doc.completely_unused_field && workerScript.ramUsage === 1.6) {\n player.giveExploit(Exploit.Bypass);\n }\n doc.completely_unused_field = undefined;\n real_document.completely_unused_field = undefined;\n },\n alterReality: function (): void {\n // We need to trick webpack into not optimizing a variable that is guaranteed to be false (and doesn't use prototypes)\n let x = false;\n const recur = function (depth: number): void {\n if (depth === 0) return;\n x = !x;\n recur(depth - 1);\n };\n recur(2);\n console.warn(\"I am sure that this variable is false.\");\n if (x !== false) {\n console.warn(\"Reality has been altered!\");\n player.giveExploit(Exploit.RealityAlteration);\n }\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n purchaseHashUpgrade,\n updateHashManagerCapacity,\n} from \"../Hacknet/HacknetHelpers\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { Hacknet as IHacknet, NodeStats } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IHacknet {\n // Utility function to get Hacknet Node object\n const getHacknetNode = function (i: any, callingFn = \"\"): HacknetNode | HacknetServer {\n if (isNaN(i)) {\n throw helper.makeRuntimeErrorMsg(callingFn, \"Invalid index specified for Hacknet Node: \" + i);\n }\n if (i < 0 || i >= player.hacknetNodes.length) {\n throw helper.makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (hasHacknetServers(player)) {\n const hi = player.hacknetNodes[i];\n if (typeof hi !== \"string\") throw new Error(\"hacknet node was not a string\");\n const hserver = GetServer(hi);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"hacknet server was not actually hacknet server\");\n if (hserver == null) {\n throw helper.makeRuntimeErrorMsg(\n callingFn,\n `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`,\n );\n }\n\n return hserver;\n } else {\n const node = player.hacknetNodes[i];\n if (!(node instanceof HacknetNode)) throw new Error(\"hacknet node was not node.\");\n return node;\n }\n };\n\n return {\n numNodes: function (): number {\n return player.hacknetNodes.length;\n },\n maxNumNodes: function (): number {\n if (hasHacknetServers(player)) {\n return HacknetServerConstants.MaxServers;\n }\n return Infinity;\n },\n purchaseNode: function (): number {\n return purchaseHacknet(player);\n },\n getPurchaseNodeCost: function (): number {\n if (hasHacknetServers(player)) {\n return getCostOfNextHacknetServer(player);\n } else {\n return getCostOfNextHacknetNode(player);\n }\n },\n getNodeStats: function (i: any): NodeStats {\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = hasHacknetServers(player);\n const res: any = {\n name: node instanceof HacknetServer ? node.hostname : node.name,\n level: node.level,\n ram: node instanceof HacknetServer ? node.maxRam : node.ram,\n ramUsed: node instanceof HacknetServer ? node.ramUsed : undefined,\n cores: node.cores,\n production: node instanceof HacknetServer ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: node instanceof HacknetServer ? node.totalHashesGenerated : node.totalMoneyGenerated,\n };\n\n if (hasUpgraded && node instanceof HacknetServer) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (i: any, n: any): boolean {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return purchaseLevelUpgrade(player, node, n);\n },\n upgradeRam: function (i: any, n: any): boolean {\n const node = getHacknetNode(i, \"upgradeRam\");\n return purchaseRamUpgrade(player, node, n);\n },\n upgradeCore: function (i: any, n: any): boolean {\n const node = getHacknetNode(i, \"upgradeCore\");\n return purchaseCoreUpgrade(player, node, n);\n },\n upgradeCache: function (i: any, n: any): boolean {\n if (!hasHacknetServers(player)) {\n return false;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"upgradeCache\", () => \"Can only be called on hacknet servers\");\n return false;\n }\n const res = purchaseCacheUpgrade(player, node, n);\n if (res) {\n updateHashManagerCapacity(player);\n }\n return res;\n },\n getLevelUpgradeCost: function (i: any, n: any): number {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, player.hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (i: any, n: any): number {\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, player.hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (i: any, n: any): number {\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, player.hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (i: any, n: any): number {\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"getCacheUpgradeCost\", () => \"Can only be called on hacknet servers\");\n return -1;\n }\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.hashes;\n },\n hashCapacity: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.capacity;\n },\n hashCost: function (upgName: any): number {\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n\n return player.hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (upgName: any, upgTarget: any): boolean {\n if (!hasHacknetServers(player)) {\n return false;\n }\n return purchaseHashUpgrade(player, upgName, upgTarget);\n },\n getHashUpgradeLevel: function (upgName: any): number {\n const level = player.hashManager.upgrades[upgName];\n if (level === undefined) {\n throw helper.makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n return level;\n },\n getStudyMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getStudyMult();\n },\n getTrainingMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getTrainingMult();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\n\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { Fragments, FragmentById } from \"../CotMG/Fragment\";\n\nimport {\n Stanek as IStanek,\n Fragment as IFragment,\n ActiveFragment as IActiveFragment,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IStanek {\n function checkStanekAPIAccess(func: string): void {\n if (!player.hasAugmentation(AugmentationNames.StaneksGift1, true)) {\n helper.makeRuntimeErrorMsg(func, \"Requires Stanek's Gift installed.\");\n }\n }\n\n return {\n width: function (): number {\n return staneksGift.width();\n },\n height: function (): number {\n return staneksGift.height();\n },\n charge: function (arootX: any, arootY: any): Promise {\n const rootX = helper.number(\"stanek.charge\", \"rootX\", arootX);\n const rootY = helper.number(\"stanek.charge\", \"rootY\", arootY);\n\n helper.updateDynamicRam(\"charge\", getRamCost(\"stanek\", \"charge\"));\n checkStanekAPIAccess(\"charge\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.charge\", `No fragment with root (${rootX}, ${rootY}).`);\n const time = staneksGift.inBonus() ? 200 : 1000;\n return netscriptDelay(time, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);\n workerScript.log(\"stanek.charge\", () => `Charged fragment for ${charge} charge.`);\n return Promise.resolve();\n });\n },\n fragmentDefinitions: function (): IFragment[] {\n helper.updateDynamicRam(\"fragmentDefinitions\", getRamCost(\"stanek\", \"fragmentDefinitions\"));\n checkStanekAPIAccess(\"fragmentDefinitions\");\n workerScript.log(\"stanek.fragmentDefinitions\", () => `Returned ${Fragments.length} fragments`);\n return Fragments.map((f) => f.copy());\n },\n activeFragments: function (): IActiveFragment[] {\n helper.updateDynamicRam(\"activeFragments\", getRamCost(\"stanek\", \"activeFragments\"));\n checkStanekAPIAccess(\"activeFragments\");\n workerScript.log(\"stanek.activeFragments\", () => `Returned ${staneksGift.fragments.length} fragments`);\n return staneksGift.fragments.map((af) => {\n return { ...af.copy(), ...af.fragment().copy() };\n });\n },\n clear: function (): void {\n helper.updateDynamicRam(\"clear\", getRamCost(\"stanek\", \"clear\"));\n checkStanekAPIAccess(\"clear\");\n workerScript.log(\"stanek.clear\", () => `Cleared Stanek's Gift.`);\n staneksGift.clear();\n },\n canPlace: function (arootX: any, arootY: any, arotation: any, afragmentId: any): boolean {\n const rootX = helper.number(\"stanek.canPlace\", \"rootX\", arootX);\n const rootY = helper.number(\"stanek.canPlace\", \"rootY\", arootY);\n const rotation = helper.number(\"stanek.canPlace\", \"rotation\", arotation);\n const fragmentId = helper.number(\"stanek.canPlace\", \"fragmentId\", afragmentId);\n helper.updateDynamicRam(\"canPlace\", getRamCost(\"stanek\", \"canPlace\"));\n checkStanekAPIAccess(\"canPlace\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.canPlace\", `Invalid fragment id: ${fragmentId}`);\n const can = staneksGift.canPlace(rootX, rootY, rotation, fragment);\n return can;\n },\n place: function (arootX: any, arootY: any, arotation: any, afragmentId: any): boolean {\n const rootX = helper.number(\"stanek.place\", \"rootX\", arootX);\n const rootY = helper.number(\"stanek.place\", \"rootY\", arootY);\n const rotation = helper.number(\"stanek.place\", \"rotation\", arotation);\n const fragmentId = helper.number(\"stanek.place\", \"fragmentId\", afragmentId);\n helper.updateDynamicRam(\"place\", getRamCost(\"stanek\", \"place\"));\n checkStanekAPIAccess(\"place\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.place\", `Invalid fragment id: ${fragmentId}`);\n return staneksGift.place(rootX, rootY, rotation, fragment);\n },\n get: function (arootX: any, arootY: any): IActiveFragment | undefined {\n const rootX = helper.number(\"stanek.get\", \"rootX\", arootX);\n const rootY = helper.number(\"stanek.get\", \"rootY\", arootY);\n helper.updateDynamicRam(\"get\", getRamCost(\"stanek\", \"get\"));\n checkStanekAPIAccess(\"get\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (fragment !== undefined) return fragment.copy();\n return undefined;\n },\n remove: function (arootX: any, arootY: any): boolean {\n const rootX = helper.number(\"stanek.remove\", \"rootX\", arootX);\n const rootY = helper.number(\"stanek.remove\", \"rootY\", arootY);\n helper.updateDynamicRam(\"remove\", getRamCost(\"stanek\", \"remove\"));\n checkStanekAPIAccess(\"remove\");\n return staneksGift.delete(rootX, rootY);\n },\n };\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nexport function CalculateEffect(avgCharge: number, numCharge: number, power: number, boost: number): number {\n return (\n 1 +\n (Math.log(avgCharge + 1) / (Math.log(1.8) * 100)) *\n Math.pow((numCharge + 1) / 5, 0.07) *\n power *\n boost *\n BitNodeMultipliers.StaneksGiftPowerMultiplier\n );\n}\n","export const StanekConstants: {\n RAMBonus: number;\n BaseSize: number;\n} = {\n RAMBonus: 0.1,\n BaseSize: 9,\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Bladeburner } from \"../Bladeburner/Bladeburner\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Bladeburner as INetscriptBladeburner, BladeburnerCurAction } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptBladeburner(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): INetscriptBladeburner {\n const checkBladeburnerAccess = function (func: any, skipjoined: any = false): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const apiAccess =\n player.bitNodeN === 7 ||\n player.sourceFiles.some((a) => {\n return a.n === 7;\n });\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n if (!skipjoined) {\n const bladeburnerAccess = bladeburner instanceof Bladeburner;\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func: any, city: any): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n if (!bladeburner.cities.hasOwnProperty(city)) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const getBladeburnerActionObject = function (func: any, type: any, name: any): any {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const actionId = bladeburner.getActionIdFromTypeAndName(type, name);\n if (!actionId) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n const actionObj = bladeburner.getActionObject(actionId);\n if (!actionObj) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n return {\n getContractNames: function (): string[] {\n helper.updateDynamicRam(\"getContractNames\", getRamCost(\"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function (): string[] {\n helper.updateDynamicRam(\"getOperationNames\", getRamCost(\"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function (): string[] {\n helper.updateDynamicRam(\"getBlackOpNames\", getRamCost(\"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (name: any = \"\"): number {\n helper.updateDynamicRam(\"getBlackOpRank\", getRamCost(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action: any = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function (): string[] {\n helper.updateDynamicRam(\"getGeneralActionNames\", getRamCost(\"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function (): string[] {\n helper.updateDynamicRam(\"getSkillNames\", getRamCost(\"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (type: any = \"\", name: any = \"\"): boolean {\n helper.updateDynamicRam(\"startAction\", getRamCost(\"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.startActionNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function (): void {\n helper.updateDynamicRam(\"stopBladeburnerAction\", getRamCost(\"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.resetAction();\n },\n getCurrentAction: function (): BladeburnerCurAction {\n helper.updateDynamicRam(\"getCurrentAction\", getRamCost(\"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n },\n getActionTime: function (type: any = \"\", name: any = \"\"): number {\n helper.updateDynamicRam(\"getActionTime\", getRamCost(\"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionTimeNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type: any = \"\", name: any = \"\"): [number, number] {\n helper.updateDynamicRam(\n \"getActionEstimatedSuccessChance\",\n getRamCost(\"bladeburner\", \"getActionEstimatedSuccessChance\"),\n );\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type: any = \"\", name: any = \"\", level: any): number {\n helper.updateDynamicRam(\"getActionRepGain\", getRamCost(\"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank;\n },\n getActionCountRemaining: function (type: any = \"\", name: any = \"\"): number {\n helper.updateDynamicRam(\"getActionCountRemaining\", getRamCost(\"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type: any = \"\", name: any = \"\"): number {\n helper.updateDynamicRam(\"getActionMaxLevel\", getRamCost(\"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (type: any = \"\", name: any = \"\"): number {\n helper.updateDynamicRam(\"getActionCurrentLevel\", getRamCost(\"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (type: any = \"\", name: any = \"\"): boolean {\n helper.updateDynamicRam(\"getActionAutolevel\", getRamCost(\"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (type: any = \"\", name: any = \"\", autoLevel: any = true): void {\n helper.updateDynamicRam(\"setActionAutolevel\", getRamCost(\"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (type: any = \"\", name: any = \"\", level: any = 1): void {\n helper.updateDynamicRam(\"setActionLevel\", getRamCost(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n if (level < 1 || level > action.maxLevel) {\n throw helper.makeRuntimeErrorMsg(\n \"bladeburner.setActionLevel\",\n `Level must be between 1 and ${action.maxLevel}, is ${level}`,\n );\n }\n action.level = level;\n },\n getRank: function (): number {\n helper.updateDynamicRam(\"getRank\", getRamCost(\"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.rank;\n },\n getSkillPoints: function (): number {\n helper.updateDynamicRam(\"getSkillPoints\", getRamCost(\"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.skillPoints;\n },\n getSkillLevel: function (skillName: any = \"\"): number {\n helper.updateDynamicRam(\"getSkillLevel\", getRamCost(\"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName: any = \"\"): number {\n helper.updateDynamicRam(\"getSkillUpgradeCost\", getRamCost(\"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName: any): boolean {\n helper.updateDynamicRam(\"upgradeSkill\", getRamCost(\"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type: any = \"\", name: any = \"\"): number {\n helper.updateDynamicRam(\"getTeamSize\", getRamCost(\"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type: any = \"\", name: any = \"\", size: any): number {\n helper.updateDynamicRam(\"setTeamSize\", getRamCost(\"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName: any): number {\n helper.updateDynamicRam(\"getCityEstimatedPopulation\", getRamCost(\"bladeburner\", \"getCityEstimatedPopulation\"));\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].popEst;\n },\n getCityCommunities: function (cityName: any): number {\n helper.updateDynamicRam(\"getCityCommunities\", getRamCost(\"bladeburner\", \"getCityCommunities\"));\n checkBladeburnerAccess(\"getCityCommunities\");\n checkBladeburnerCity(\"getCityCommunities\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].comms;\n },\n getCityChaos: function (cityName: any): number {\n helper.updateDynamicRam(\"getCityChaos\", getRamCost(\"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].chaos;\n },\n getCity: function (): string {\n helper.updateDynamicRam(\"getCity\", getRamCost(\"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.city;\n },\n switchCity: function (cityName: any): boolean {\n helper.updateDynamicRam(\"switchCity\", getRamCost(\"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return (bladeburner.city = cityName);\n },\n getStamina: function (): [number, number] {\n helper.updateDynamicRam(\"getStamina\", getRamCost(\"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return [bladeburner.stamina, bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function (): boolean {\n helper.updateDynamicRam(\"joinBladeburnerFaction\", getRamCost(\"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function (): boolean {\n helper.updateDynamicRam(\"joinBladeburnerDivision\", getRamCost(\"bladeburner\", \"joinBladeburnerDivision\"));\n if (player.bitNodeN === 7 || player.sourceFileLvl(7) > 0) {\n if (player.bitNodeN === 8) {\n return false;\n }\n if (player.bladeburner instanceof Bladeburner) {\n return true; // Already member\n } else if (\n player.strength >= 100 &&\n player.defense >= 100 &&\n player.dexterity >= 100 &&\n player.agility >= 100\n ) {\n player.bladeburner = new Bladeburner(player);\n workerScript.log(\"joinBladeburnerDivision\", () => \"You have been accepted into the Bladeburner division\");\n\n return true;\n } else {\n workerScript.log(\n \"joinBladeburnerDivision\",\n () => \"You do not meet the requirements for joining the Bladeburner division\",\n );\n return false;\n }\n }\n return false;\n },\n getBonusTime: function (): number {\n helper.updateDynamicRam(\"getBonusTime\", getRamCost(\"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return Math.round(bladeburner.storedCycles / 5);\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { is2DArray } from \"../utils/helpers/is2DArray\";\nimport { CodingContract } from \"../CodingContracts\";\nimport { CodingContract as ICodingContract } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptCodingContract(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ICodingContract {\n const getCodingContract = function (func: any, hostname: any, filename: any): CodingContract {\n const server = helper.getServer(hostname, func);\n const contract = server.getContract(filename);\n if (contract == null) {\n throw helper.makeRuntimeErrorMsg(\n `codingcontract.${func}`,\n `Cannot find contract '${filename}' on server '${hostname}'`,\n );\n }\n\n return contract;\n };\n\n return {\n attempt: function (\n answer: any,\n filename: any,\n hostname: any = workerScript.hostname,\n { returnReward }: any = {},\n ): boolean | string {\n helper.updateDynamicRam(\"attempt\", getRamCost(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", hostname, filename);\n\n // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n if (is2DArray(answer)) {\n const answerComponents = [];\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const creward = contract.reward;\n if (creward === null) throw new Error(\"Somehow solved a contract that didn't have a reward\");\n\n const serv = helper.getServer(hostname, \"codingcontract.attempt\");\n if (contract.isSolution(answer)) {\n const reward = player.gainCodingContractReward(creward, contract.getDifficulty());\n workerScript.log(\"attempt\", () => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`);\n serv.removeContract(filename);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\n \"attempt\",\n () => `Coding Contract attempt '${filename}' failed. Contract is now self-destructing`,\n );\n serv.removeContract(filename);\n } else {\n workerScript.log(\n \"attempt\",\n () =>\n `Coding Contract attempt '${filename}' failed. ${\n contract.getMaxNumTries() - contract.tries\n } attempts remaining.`,\n );\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (filename: any, hostname: any = workerScript.hostname): string {\n helper.updateDynamicRam(\"getContractType\", getRamCost(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", hostname, filename);\n return contract.getType();\n },\n getData: function (filename: any, hostname: any = workerScript.hostname): any {\n helper.updateDynamicRam(\"getData\", getRamCost(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", hostname, filename);\n const data = contract.getData();\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (filename: any, hostname: any = workerScript.hostname): string {\n helper.updateDynamicRam(\"getDescription\", getRamCost(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", hostname, filename);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (filename: any, hostname: any = workerScript.hostname): number {\n helper.updateDynamicRam(\"getNumTriesRemaining\", getRamCost(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", hostname, filename);\n return contract.getMaxNumTries() - contract.tries;\n },\n };\n}\n","// Checks whether an array is a 2D array.\n// For this, a 2D array is an array which contains only other arrays.\n// If one element in the array is a number or string, it is NOT a 2D array\nexport function is2DArray(arr: any[]): boolean {\n if (arr.constructor !== Array) {\n return false;\n }\n\n return arr.every((e) => {\n return e.constructor === Array;\n });\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\n\nimport { OfficeSpace } from \"../Corporation/OfficeSpace\";\nimport { Employee } from \"../Corporation/Employee\";\nimport { Product } from \"../Corporation/Product\";\nimport { Material } from \"../Corporation/Material\";\nimport { Warehouse } from \"../Corporation/Warehouse\";\nimport { IIndustry } from \"../Corporation/IIndustry\";\nimport { ICorporation } from \"../Corporation/ICorporation\";\n\nimport {\n Corporation as NSCorporation,\n CorporationInfo,\n Employee as NSEmployee,\n Product as NSProduct,\n Material as NSMaterial,\n Warehouse as NSWarehouse,\n Division as NSDivision,\n WarehouseAPI,\n OfficeAPI,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport {\n NewIndustry,\n NewCity,\n UnlockUpgrade,\n LevelUpgrade,\n IssueDividends,\n SellMaterial,\n SellProduct,\n SetSmartSupply,\n BuyMaterial,\n AssignJob,\n UpgradeOfficeSize,\n ThrowParty,\n PurchaseWarehouse,\n UpgradeWarehouse,\n BuyCoffee,\n HireAdVert,\n MakeProduct,\n Research,\n ExportMaterial,\n CancelExportMaterial,\n SetMaterialMarketTA1,\n SetMaterialMarketTA2,\n SetProductMarketTA1,\n SetProductMarketTA2,\n} from \"../Corporation/Actions\";\nimport { CorporationUnlockUpgrades } from \"../Corporation/data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrades } from \"../Corporation/data/CorporationUpgrades\";\nimport { EmployeePositions } from \"../Corporation/EmployeePositions\";\nimport { calculateIntelligenceBonus } from \"../PersonObjects/formulas/intelligence\";\n\nexport function NetscriptCorporation(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): NSCorporation {\n function getCorporation(): ICorporation {\n const corporation = player.corporation;\n if (corporation === null) throw new Error(\"cannot be called without a corporation\");\n return corporation;\n }\n\n function getDivision(divisionName: any): IIndustry {\n const corporation = getCorporation();\n const division = corporation.divisions.find((div) => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName: any, cityName: any): OfficeSpace {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName: any, cityName: any): Warehouse {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName: any, cityName: any, materialName: any): Material {\n const warehouse = getWarehouse(divisionName, cityName);\n const material = warehouse.materials[materialName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName: any, productName: any): Product {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName: any, cityName: any, employeeName: any): Employee {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find((e) => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n function checkAccess(func: string, api?: number): void {\n if (player.corporation === null) throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"Must own a corporation.\");\n if (!api) return;\n\n if (!player.corporation.unlockUpgrades[api])\n throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"You do not have access to this API.\");\n }\n\n const warehouseAPI: WarehouseAPI = {\n getWarehouse: function (adivisionName: any, acityName: any): NSWarehouse {\n checkAccess(\"getWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"getWarehouse\", \"cityName\", acityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return {\n level: warehouse.level,\n loc: warehouse.loc,\n size: warehouse.size,\n sizeUsed: warehouse.sizeUsed,\n };\n },\n getMaterial: function (adivisionName: any, acityName: any, amaterialName: any): NSMaterial {\n checkAccess(\"getMaterial\", 7);\n const divisionName = helper.string(\"getMaterial\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"getMaterial\", \"cityName\", acityName);\n const materialName = helper.string(\"getMaterial\", \"materialName\", amaterialName);\n const material = getMaterial(divisionName, cityName, materialName);\n return {\n name: material.name,\n qty: material.qty,\n qlt: material.qlt,\n };\n },\n getProduct: function (adivisionName: any, aproductName: any): NSProduct {\n checkAccess(\"getProduct\", 7);\n const divisionName = helper.string(\"getProduct\", \"divisionName\", adivisionName);\n const productName = helper.string(\"getProduct\", \"productName\", aproductName);\n const product = getProduct(divisionName, productName);\n return {\n name: product.name,\n dmd: product.dmd,\n cmp: product.cmp,\n pCost: product.pCost,\n sCost: product.sCost,\n };\n },\n purchaseWarehouse: function (adivisionName: any, acityName: any): void {\n checkAccess(\"purchaseWarehouse\", 7);\n const divisionName = helper.string(\"purchaseWarehouse\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"purchaseWarehouse\", \"cityName\", acityName);\n const corporation = getCorporation();\n PurchaseWarehouse(corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (adivisionName: any, acityName: any): void {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"upgradeWarehouse\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"upgradeWarehouse\", \"cityName\", acityName);\n const corporation = getCorporation();\n UpgradeWarehouse(corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n sellMaterial: function (adivisionName: any, acityName: any, amaterialName: any, aamt: any, aprice: any): void {\n checkAccess(\"sellMaterial\", 7);\n const divisionName = helper.string(\"sellMaterial\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"sellMaterial\", \"cityName\", acityName);\n const materialName = helper.string(\"sellMaterial\", \"materialName\", amaterialName);\n const amt = helper.string(\"sellMaterial\", \"amt\", aamt);\n const price = helper.string(\"sellMaterial\", \"price\", aprice);\n const material = getMaterial(divisionName, cityName, materialName);\n SellMaterial(material, amt, price);\n },\n sellProduct: function (\n adivisionName: any,\n acityName: any,\n aproductName: any,\n aamt: any,\n aprice: any,\n aall: any,\n ): void {\n checkAccess(\"sellProduct\", 7);\n const divisionName = helper.string(\"sellProduct\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"sellProduct\", \"cityName\", acityName);\n const productName = helper.string(\"sellProduct\", \"productName\", aproductName);\n const amt = helper.string(\"sellProduct\", \"amt\", aamt);\n const price = helper.string(\"sellProduct\", \"price\", aprice);\n const all = helper.boolean(aall);\n const product = getProduct(divisionName, productName);\n SellProduct(product, cityName, amt, price, all);\n },\n discontinueProduct: function (adivisionName: any, aproductName: any): void {\n checkAccess(\"discontinueProduct\", 7);\n const divisionName = helper.string(\"discontinueProduct\", \"divisionName\", adivisionName);\n const productName = helper.string(\"discontinueProduct\", \"productName\", aproductName);\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (adivisionName: any, acityName: any, aenabled: any): void {\n checkAccess(\"setSmartSupply\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"sellProduct\", \"cityName\", acityName);\n const enabled = helper.boolean(aenabled);\n const warehouse = getWarehouse(divisionName, cityName);\n SetSmartSupply(warehouse, enabled);\n },\n buyMaterial: function (adivisionName: any, acityName: any, amaterialName: any, aamt: any): void {\n checkAccess(\"buyMaterial\", 7);\n const divisionName = helper.string(\"buyMaterial\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"buyMaterial\", \"cityName\", acityName);\n const materialName = helper.string(\"buyMaterial\", \"materialName\", amaterialName);\n const amt = helper.number(\"buyMaterial\", \"amt\", aamt);\n const material = getMaterial(divisionName, cityName, materialName);\n BuyMaterial(material, amt);\n },\n makeProduct: function (\n adivisionName: any,\n acityName: any,\n aproductName: any,\n adesignInvest: any,\n amarketingInvest: any,\n ): void {\n checkAccess(\"makeProduct\", 7);\n const divisionName = helper.string(\"makeProduct\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"makeProduct\", \"cityName\", acityName);\n const productName = helper.string(\"makeProduct\", \"productName\", aproductName);\n const designInvest = helper.number(\"makeProduct\", \"designInvest\", adesignInvest);\n const marketingInvest = helper.number(\"makeProduct\", \"marketingInvest\", amarketingInvest);\n const corporation = getCorporation();\n MakeProduct(corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n exportMaterial: function (\n asourceDivision: any,\n asourceCity: any,\n atargetDivision: any,\n atargetCity: any,\n amaterialName: any,\n aamt: any,\n ): void {\n checkAccess(\"exportMaterial\", 7);\n const sourceDivision = helper.string(\"exportMaterial\", \"sourceDivision\", asourceDivision);\n const sourceCity = helper.string(\"exportMaterial\", \"sourceCity\", asourceCity);\n const targetDivision = helper.string(\"exportMaterial\", \"targetDivision\", atargetDivision);\n const targetCity = helper.string(\"exportMaterial\", \"targetCity\", atargetCity);\n const materialName = helper.string(\"exportMaterial\", \"materialName\", amaterialName);\n const amt = helper.string(\"exportMaterial\", \"amt\", aamt);\n ExportMaterial(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (\n asourceDivision: any,\n asourceCity: any,\n atargetDivision: any,\n atargetCity: any,\n amaterialName: any,\n aamt: any,\n ): void {\n checkAccess(\"cancelExportMaterial\", 7);\n const sourceDivision = helper.string(\"cancelExportMaterial\", \"sourceDivision\", asourceDivision);\n const sourceCity = helper.string(\"cancelExportMaterial\", \"sourceCity\", asourceCity);\n const targetDivision = helper.string(\"cancelExportMaterial\", \"targetDivision\", atargetDivision);\n const targetCity = helper.string(\"cancelExportMaterial\", \"targetCity\", atargetCity);\n const materialName = helper.string(\"cancelExportMaterial\", \"materialName\", amaterialName);\n const amt = helper.string(\"cancelExportMaterial\", \"amt\", aamt);\n CancelExportMaterial(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (adivisionName: any, acityName: any, amaterialName: any, aon: any): void {\n checkAccess(\"setMaterialMarketTA1\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA1\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"setMaterialMarketTA1\", \"cityName\", acityName);\n const materialName = helper.string(\"setMaterialMarketTA1\", \"materialName\", amaterialName);\n const on = helper.boolean(aon);\n SetMaterialMarketTA1(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (adivisionName: any, acityName: any, amaterialName: any, aon: any): void {\n checkAccess(\"setMaterialMarketTA2\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA2\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"setMaterialMarketTA2\", \"cityName\", acityName);\n const materialName = helper.string(\"setMaterialMarketTA2\", \"materialName\", amaterialName);\n const on = helper.boolean(aon);\n SetMaterialMarketTA2(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (adivisionName: any, aproductName: any, aon: any): void {\n checkAccess(\"setProductMarketTA1\", 7);\n const divisionName = helper.string(\"setProductMarketTA1\", \"divisionName\", adivisionName);\n const productName = helper.string(\"setProductMarketTA1\", \"productName\", aproductName);\n const on = helper.boolean(aon);\n SetProductMarketTA1(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (adivisionName: any, aproductName: any, aon: any): void {\n checkAccess(\"setProductMarketTA2\", 7);\n const divisionName = helper.string(\"setProductMarketTA2\", \"divisionName\", adivisionName);\n const productName = helper.string(\"setProductMarketTA2\", \"productName\", aproductName);\n const on = helper.boolean(aon);\n SetProductMarketTA2(getProduct(divisionName, productName), on);\n },\n };\n\n const officeAPI: OfficeAPI = {\n assignJob: function (adivisionName: any, acityName: any, aemployeeName: any, ajob: any): Promise {\n checkAccess(\"assignJob\", 8);\n const divisionName = helper.string(\"assignJob\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"assignJob\", \"cityName\", acityName);\n const employeeName = helper.string(\"assignJob\", \"employeeName\", aemployeeName);\n const job = helper.string(\"assignJob\", \"job\", ajob);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return netscriptDelay(1000, workerScript).then(function () {\n return Promise.resolve(AssignJob(employee, job));\n });\n },\n hireEmployee: function (adivisionName: any, acityName: any): any {\n checkAccess(\"hireEmployee\", 8);\n const divisionName = helper.string(\"hireEmployee\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"hireEmployee\", \"cityName\", acityName);\n const office = getOffice(divisionName, cityName);\n return office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (adivisionName: any, acityName: any, asize: any): void {\n checkAccess(\"upgradeOfficeSize\", 8);\n const divisionName = helper.string(\"upgradeOfficeSize\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"upgradeOfficeSize\", \"cityName\", acityName);\n const size = helper.number(\"upgradeOfficeSize\", \"size\", asize);\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n UpgradeOfficeSize(corporation, office, size);\n },\n throwParty: function (adivisionName: any, acityName: any, acostPerEmployee: any): Promise {\n checkAccess(\"throwParty\", 8);\n const divisionName = helper.string(\"throwParty\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"throwParty\", \"cityName\", acityName);\n const costPerEmployee = helper.number(\"throwParty\", \"costPerEmployee\", acostPerEmployee);\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(ThrowParty(corporation, office, costPerEmployee));\n });\n },\n buyCoffee: function (adivisionName: any, acityName: any): Promise {\n checkAccess(\"buyCoffee\", 8);\n const divisionName = helper.string(\"buyCoffee\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"buyCoffee\", \"cityName\", acityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(BuyCoffee(corporation, getDivision(divisionName), getOffice(divisionName, cityName)));\n });\n },\n hireAdVert: function (adivisionName: any): void {\n checkAccess(\"hireAdVert\", 8);\n const divisionName = helper.string(\"hireAdVert\", \"divisionName\", adivisionName);\n const corporation = getCorporation();\n HireAdVert(corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n research: function (adivisionName: any, aresearchName: any): void {\n checkAccess(\"research\", 8);\n const divisionName = helper.string(\"research\", \"divisionName\", adivisionName);\n const researchName = helper.string(\"research\", \"researchName\", aresearchName);\n Research(getDivision(divisionName), researchName);\n },\n getOffice: function (adivisionName: any, acityName: any): any {\n checkAccess(\"getOffice\", 8);\n const divisionName = helper.string(\"getOffice\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"getOffice\", \"cityName\", acityName);\n const office = getOffice(divisionName, cityName);\n return {\n loc: office.loc,\n size: office.size,\n minEne: office.minEne,\n maxEne: office.maxEne,\n minHap: office.minHap,\n maxHap: office.maxHap,\n maxMor: office.maxMor,\n employees: office.employees.map((e) => e.name),\n employeeProd: {\n Operations: office.employeeProd[EmployeePositions.Operations],\n Engineer: office.employeeProd[EmployeePositions.Engineer],\n Business: office.employeeProd[EmployeePositions.Business],\n Management: office.employeeProd[EmployeePositions.Management],\n \"Research & Development\": office.employeeProd[EmployeePositions.RandD],\n Training: office.employeeProd[EmployeePositions.Training],\n },\n };\n },\n getEmployee: function (adivisionName: any, acityName: any, aemployeeName: any): NSEmployee {\n checkAccess(\"getEmployee\", 8);\n const divisionName = helper.string(\"getEmployee\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"getEmployee\", \"cityName\", acityName);\n const employeeName = helper.string(\"getEmployee\", \"employeeName\", aemployeeName);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n };\n\n return {\n ...warehouseAPI,\n ...officeAPI,\n expandIndustry: function (aindustryName: any, adivisionName: any): void {\n checkAccess(\"expandIndustry\");\n const industryName = helper.string(\"expandIndustry\", \"industryName\", aindustryName);\n const divisionName = helper.string(\"expandIndustry\", \"divisionName\", adivisionName);\n const corporation = getCorporation();\n NewIndustry(corporation, industryName, divisionName);\n },\n expandCity: function (adivisionName: any, acityName: any): void {\n checkAccess(\"expandCity\");\n const divisionName = helper.string(\"expandCity\", \"divisionName\", adivisionName);\n const cityName = helper.string(\"expandCity\", \"cityName\", acityName);\n const corporation = getCorporation();\n const division = getDivision(divisionName);\n NewCity(corporation, division, cityName);\n },\n unlockUpgrade: function (aupgradeName: any): void {\n checkAccess(\"unlockUpgrade\");\n const upgradeName = helper.string(\"unlockUpgrade\", \"upgradeName\", aupgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n UnlockUpgrade(corporation, upgrade);\n },\n levelUpgrade: function (aupgradeName: any): void {\n checkAccess(\"levelUpgrade\");\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", aupgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n LevelUpgrade(corporation, upgrade);\n },\n issueDividends: function (apercent: any): void {\n checkAccess(\"issueDividends\");\n const percent = helper.number(\"issueDividends\", \"percent\", apercent);\n const corporation = getCorporation();\n IssueDividends(corporation, percent);\n },\n\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (adivisionName: any): NSDivision {\n checkAccess(\"getDivision\");\n const divisionName = helper.string(\"getDivision\", \"divisionName\", adivisionName);\n const division = getDivision(divisionName);\n const cities: string[] = [];\n for (const office of Object.values(division.offices)) {\n if (office === 0) continue;\n cities.push(office.loc);\n }\n return {\n name: division.name,\n type: division.type,\n awareness: division.awareness,\n popularity: division.popularity,\n prodMult: division.prodMult,\n research: division.sciResearch.qty,\n lastCycleRevenue: division.lastCycleRevenue,\n lastCycleExpenses: division.lastCycleExpenses,\n thisCycleRevenue: division.thisCycleRevenue,\n thisCycleExpenses: division.thisCycleExpenses,\n upgrades: division.upgrades,\n cities: cities,\n };\n },\n getCorporation: function (): CorporationInfo {\n checkAccess(\"getCorporation\");\n const corporation = getCorporation();\n return {\n name: corporation.name,\n funds: corporation.funds,\n revenue: corporation.revenue,\n expenses: corporation.expenses,\n public: corporation.public,\n totalShares: corporation.totalShares,\n numShares: corporation.numShares,\n shareSaleCooldown: corporation.shareSaleCooldown,\n issuedShares: corporation.issuedShares,\n sharePrice: corporation.sharePrice,\n state: corporation.state + \"\",\n };\n },\n };\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Industries, IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Material } from \"./Material\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { calculateEffectWithFactors } from \"../utils/calculateEffectWithFactors\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Product } from \"./Product\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { Warehouse } from \"./Warehouse\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryUpgrade, IndustryUpgrades } from \"./IndustryUpgrades\";\n\ninterface IParams {\n name?: string;\n corp?: ICorporation;\n type?: string;\n}\n\nexport class Industry implements IIndustry {\n name = \"\";\n type = Industries.Agriculture;\n sciResearch = new Material({ name: \"Scientific Research\" });\n researched: { [key: string]: boolean | undefined } = {};\n reqMats: { [key: string]: number | undefined } = {};\n\n //An array of the name of materials being produced\n prodMats: string[] = [];\n\n products: { [key: string]: Product | undefined } = {};\n makesProducts = false;\n\n awareness = 0;\n popularity = 0; //Should always be less than awareness\n startingCost = 0;\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n reFac = 0; //Real estate Factor\n sciFac = 0; //Scientific Research Factor, affects quality\n hwFac = 0; //Hardware factor\n robFac = 0; //Robotics Factor\n aiFac = 0; //AI Cores factor;\n advFac = 0; //Advertising factor, affects sales\n\n prodMult = 0; //Production multiplier\n\n //Financials\n lastCycleRevenue: number;\n lastCycleExpenses: number;\n thisCycleRevenue: number;\n thisCycleExpenses: number;\n\n //Upgrades\n upgrades: number[] = Array(Object.keys(IndustryUpgrades).length).fill(0);\n\n state = \"START\";\n newInd = true;\n\n //Maps locations to warehouses. 0 if no warehouse at that location\n warehouses: { [key: string]: Warehouse | 0 };\n\n //Maps locations to offices. 0 if no office at that location\n offices: { [key: string]: OfficeSpace | 0 } = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new OfficeSpace({\n loc: CityName.Sector12,\n size: CorporationConstants.OfficeInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : Industries.Agriculture;\n\n //Financials\n this.lastCycleRevenue = 0;\n this.lastCycleExpenses = 0;\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n this.warehouses = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new Warehouse({\n corp: params.corp,\n industry: this,\n loc: CityName.Sector12,\n size: CorporationConstants.WarehouseInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n this.init();\n }\n\n init(): void {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = IndustryStartingCosts[this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n switch (this.type) {\n case Industries.Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2,\n };\n this.prodMats = [\"Energy\"];\n break;\n case Industries.Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1,\n };\n this.prodMats = [\"Water\"];\n break;\n case Industries.Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5,\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n case Industries.Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5,\n };\n this.prodMats = [\"Food\"];\n break;\n case Industries.Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8,\n };\n this.prodMats = [\"Metal\"];\n break;\n case Industries.Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2,\n };\n this.makesProducts = true;\n break;\n case Industries.Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2,\n };\n this.makesProducts = true;\n break;\n case Industries.Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5,\n };\n this.prodMats = [\"Chemicals\"];\n break;\n case Industries.Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5,\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n case Industries.Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1,\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n case Industries.Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3,\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n case Industries.Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5,\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n case Industries.Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5,\n };\n this.makesProducts = true;\n break;\n case Industries.RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4,\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText(): string {\n if (!this.makesProducts) return \"\";\n switch (this.type) {\n case Industries.Food:\n return \"create and manage restaurants\";\n case Industries.Tobacco:\n return \"create tobacco and tobacco-related products\";\n case Industries.Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n case Industries.Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n case Industries.Robotics:\n return \"build specialized robots and robot-related products\";\n case Industries.Software:\n return \"develop computer software\";\n case Industries.Healthcare:\n return \"build and manage hospitals\";\n case Industries.RealEstate:\n return \"develop and manage real estate properties\";\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts(): number {\n if (!this.makesProducts) return 0;\n\n // Calculate additional number of allowed Products from Research/Upgrades\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n\n return CorporationConstants.BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts(): boolean {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n }\n\n //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n calculateProductionFactors(): void {\n let multSum = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const warehouse = this.warehouses[city];\n if (!(warehouse instanceof Warehouse)) {\n continue;\n }\n\n const materials = warehouse.materials;\n\n const cityMult =\n Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) *\n Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) *\n Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) *\n Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? (this.prodMult = 1) : (this.prodMult = multSum);\n }\n\n updateWarehouseSizeUsed(warehouse: Warehouse): void {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n }\n }\n }\n\n process(marketCycles = 1, state: string, corporation: ICorporation): void {\n this.state = state;\n\n //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n dialogBoxCreate(\n \"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\",\n );\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n }\n this.lastCycleRevenue = this.thisCycleRevenue / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n if (this.lastCycleRevenue > 0) {\n this.newInd = false;\n }\n\n // Process offices (and the employees in them)\n let employeeSalary = 0;\n for (const officeLoc in this.offices) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n if (office instanceof OfficeSpace) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n this.thisCycleExpenses = this.thisCycleExpenses + employeeSalary;\n\n // Process change in demand/competition of materials/products\n this.processMaterialMarket();\n this.processProductMarket(marketCycles);\n\n // Process loss of popularity\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity);\n\n // Process Dreamsense gains\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n if (popularityGain > 0) {\n this.popularity += popularityGain * marketCycles;\n this.awareness += awarenessGain * marketCycles;\n }\n\n return;\n }\n\n // Process production, purchase, and import/export of materials\n let res = this.processMaterials(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n\n // Process creation, production & sale of products\n res = this.processProducts(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n }\n\n // Process change in demand and competition for this industry's materials\n processMaterialMarket(): void {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats;\n\n //Only 'process the market' for materials that this industry deals with\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[CorporationConstants.Cities[i]] instanceof Warehouse) {\n const wh = this.warehouses[CorporationConstants.Cities[i]];\n if (wh === 0) continue;\n for (const name in reqMats) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n }\n\n //Produced materials are stored in an array\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n }\n\n //Process these twice because these boost production\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n }\n\n // Process change in demand and competition for this industry's products\n processProductMarket(marketCycles = 1): void {\n // Demand gradually decreases, and competition gradually increases\n for (const name in this.products) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = getRandomInt(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (\n this.type === Industries.Pharmaceutical ||\n this.type === Industries.Software ||\n this.type === Industries.Robotics\n ) {\n change *= 3;\n }\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n }\n\n //Process production, purchase, and import/export of materials\n processMaterials(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors();\n\n //At the start of the export state, set the imports of everything to 0\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n if (!(this.warehouses[city] instanceof Warehouse)) {\n continue;\n }\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof Warehouse) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\": {\n /* Process purchase of materials */\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n\n // smart supply\n const smartBuy: { [key: string]: number | undefined } = {};\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName];\n\n //Smart supply tracker is stored as per second rate\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n }\n\n // Find which material were trying to create the least amount of product with.\n let worseAmt = 1e99;\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n }\n\n // Align all the materials to the smallest amount.\n for (const matName in smartBuy) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n }\n\n // Calculate the total size of all things were trying to buy\n let totalSize = 0;\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * MaterialSizes[matName];\n }\n\n // Shrink to the size of available space.\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n if (totalSize > freeSpace) {\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor((buyAmt * freeSpace) / totalSize);\n }\n }\n\n // Use the materials already in the warehouse if the option is on.\n for (const matName in smartBuy) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n }\n\n // buy them\n for (const matName in smartBuy) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n break;\n }\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]];\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office) *\n this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() *\n this.getProductionMultiplier(); // Multiplier from Research\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n\n // Calculate net change in warehouse storage making the produced materials will cost\n let totalMatSize = 0;\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += MaterialSizes[this.prodMats[tmp]];\n }\n for (const reqMatName in this.reqMats) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= MaterialSizes[reqMatName] * normQty;\n }\n // If not enough space in warehouse, limit the amount of produced materials\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n }\n\n // Keep track of production for smart supply (/s)\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n // Make sure we have enough resource to make our materials\n let producableFrac = 1;\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n }\n\n // Make our materials if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in this.reqMats) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt =\n office.employeeProd[EmployeePositions.Engineer] / 90 +\n Math.pow(this.sciResearch.qty, this.sciFac) +\n Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n }\n\n //Per second\n const fooProd = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName in this.reqMats) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n }\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n\n // Determine the cost that the material will be sold at\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n if (mat.marketTa2) {\n const prod = mat.prd;\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n (mat.qlt + 0.001) *\n marketFactor *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n }\n\n // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n mat.marketTa2Price = optimalPrice;\n\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (isString(mat.sCost)) {\n sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n }\n\n // Calculate how much of the material sells (per second)\n let markup = 1;\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n const maxSell =\n (mat.qlt + 0.001) *\n marketFactor *\n markup *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (isString(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = (mat.sllman[1] as string).replace(/MAX/g, (maxSell + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell amount for material \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. The sell amount \" +\n \"is being set to zero\",\n );\n sellAmt = 0;\n }\n sellAmt = Math.min(maxSell, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = maxSell;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(maxSell, mat.sllman[1] as number);\n }\n\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n break;\n\n case \"EXPORT\":\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(\n /MAX/g,\n (mat.qty / (CorporationConstants.SecsPerMarketCycle * marketCycles) + \"\").toUpperCase(),\n );\n let amt = 0;\n try {\n amt = eval(amtStr);\n } catch (e) {\n dialogBoxCreate(\n \"Calculating export for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division failed with \" +\n \"error: \" +\n e,\n );\n continue;\n }\n if (isNaN(amt)) {\n dialogBoxCreate(\n \"Error calculating export amount for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division.\",\n );\n continue;\n }\n amt = amt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n if (amt === 0) {\n break; //None left\n }\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n if (!(expWarehouse instanceof Warehouse)) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n }\n\n // Make sure theres enough space in warehouse\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / MaterialSizes[matName]);\n amt = Math.min(maxAmt, amt);\n }\n expWarehouse.materials[matName].imp +=\n amt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n }\n //totalExp should be per second\n mat.totalExp /= CorporationConstants.SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n if (office instanceof OfficeSpace) {\n this.sciResearch.qty +=\n 0.004 *\n Math.pow(office.employeeProd[EmployeePositions.RandD], 0.5) *\n corporation.getScientificResearchMultiplier() *\n this.getScientificResearchMultiplier();\n }\n }\n return [revenue, expenses];\n }\n\n //Process production & sale of this industry's FINISHED products (including all of their stats)\n processProducts(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0;\n const expenses = 0;\n\n //Create products\n if (this.state === \"PRODUCTION\") {\n for (const prodName in this.products) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue;\n\n // Designing/Creating a Product is based mostly off Engineers\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const total = engrProd + mgmtProd + opProd;\n if (total <= 0) {\n break;\n }\n\n // Management is a multiplier for the production from Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n\n prod.createProduct(marketCycles, progress);\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n break;\n }\n }\n }\n\n //Produce Products\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod instanceof Product && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n return [revenue, expenses];\n }\n\n //Processes FINISHED products\n processProduct(marketCycles = 1, product: Product, corporation: ICorporation): number {\n let totalProfit = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n if (warehouse instanceof Warehouse) {\n switch (this.state) {\n case \"PRODUCTION\": {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office, { forProduct: true }) *\n corporation.getProductionMultiplier() *\n this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n let prod;\n\n //Account for whether production is manually limited\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n //Calculate net change in warehouse storage making the Products will cost\n let netStorageSize = product.siz;\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= MaterialSizes[reqMatName] * normQty;\n }\n }\n\n //If there's not enough space in warehouse, limit the amount of Product\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n //Make sure we have enough resources to make our Products\n let producableFrac = 1;\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n //Make our Products if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n }\n //Quantity\n product.data[city][0] += prod * producableFrac;\n }\n\n //Keep track of production Per second\n product.data[city][1] = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n break;\n }\n case \"SALE\": {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n }\n\n // Since its a product, its production cost is increased for labor\n product.pCost *= CorporationConstants.ProductProductionCostRatio;\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n const markupLimit = product.rat / product.mku;\n let sCost;\n if (product.marketTa2) {\n const prod = product.data[city][1];\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n }\n\n // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (isString(product.sCost)) {\n const sCostString = product.sCost as string;\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n const maxSell =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n Math.pow(markup, 2) *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (product.sllman[city][0] && isString(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, (maxSell + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n try {\n tmp = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell price expression for \" +\n product.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. Sell price is being set to MAX\",\n );\n tmp = maxSell;\n }\n sellAmt = Math.min(maxSell, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(maxSell, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = maxSell;\n }\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n break;\n }\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n }\n }\n return totalProfit;\n }\n\n discontinueProduct(product: Product): void {\n for (const productName in this.products) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade: IndustryUpgrade, refs: { corporation: ICorporation; office: OfficeSpace }): void {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0: {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n break;\n }\n case 1: {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n this.awareness += 3 * advMult;\n this.popularity += 1 * advMult;\n this.awareness *= 1.01 * advMult;\n this.popularity *= (1 + getRandomInt(1, 3) / 100) * advMult;\n break;\n }\n default: {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n }\n\n // Returns how much of a material can be produced based of office productivity (employee stats)\n getOfficeProductivity(office: OfficeSpace, params: { forProduct?: boolean } = {}): number {\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const total = opProd + engrProd + mgmtProd;\n\n if (total <= 0) return 0;\n\n // Management is a multiplier for the production from Operations and Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor;\n\n // Generic multiplier for the production. Used for game-balancing purposes\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n }\n\n // Returns a multiplier based on the office' 'Business' employees that affects sales\n getBusinessFactor(office: OfficeSpace): number {\n const businessProd = 1 + office.employeeProd[EmployeePositions.Business];\n\n return calculateEffectWithFactors(businessProd, 0.26, 10e3);\n }\n\n //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n getAdvertisingFactors(): [number, number, number, number] {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n }\n\n //Returns a multiplier based on a materials demand and competition that affects sales\n getMarketFactor(mat: { dmd: number; cmp: number }): number {\n return Math.max(0.1, (mat.dmd * (100 - mat.cmp)) / 100);\n }\n\n // Returns a boolean indicating whether this Industry has the specified Research\n hasResearch(name: string): boolean {\n return this.researched[name] === true;\n }\n\n updateResearchTree(): void {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`);\n\n // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research in this.researched) {\n researchTree.research(research);\n }\n }\n }\n\n // Get multipliers from Research\n getAdvertisingMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Industry\", this);\n }\n\n /**\n * Initiatizes a Industry object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Industry {\n return Generic_fromJSON(Industry, value.data);\n }\n}\n\nReviver.constructors.Industry = Industry;\n","/**\n * This is a component that implements a mathematical formula used commonly throughout the\n * game. This formula is (typically) used to calculate the effect that various statistics\n * have on a game mechanic. It looks something like:\n *\n * (stat ^ exponential factor) + (stat / linear factor)\n *\n * where the exponential factor is a number between 0 and 1 and the linear factor\n * is typically a relatively larger number.\n *\n * This formula ensures that the effects of the statistic that is being processed\n * has diminishing returns, but never loses its effectiveness as you continue\n * to raise it.\n */\nexport function calculateEffectWithFactors(n: number, expFac: number, linearFac: number): number {\n if (expFac <= 0 || expFac >= 1) {\n console.warn(`Exponential factor is ${expFac}. This is not an intended value for it`);\n }\n if (linearFac < 1) {\n console.warn(`Linear factor is ${linearFac}. This is not an intended value for it`);\n }\n\n return Math.pow(n, expFac) + n / linearFac;\n}\n","import { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { ICorporation } from \"./ICorporation\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { IIndustry } from \"./IIndustry\";\n\ninterface IParams {\n name?: string;\n morale?: number;\n happiness?: number;\n energy?: number;\n intelligence?: number;\n charisma?: number;\n experience?: number;\n creativity?: number;\n efficiency?: number;\n salary?: number;\n loc?: string;\n}\n\nexport class Employee {\n name: string;\n mor: number;\n hap: number;\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n sal: number;\n cyclesUntilRaise = CorporationConstants.CyclesPerEmployeeRaise;\n loc: string;\n pos: string;\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"Bobby\";\n\n //Morale, happiness, and energy are 0-100\n this.mor = params.morale ? params.morale : getRandomInt(50, 100);\n this.hap = params.happiness ? params.happiness : getRandomInt(50, 100);\n this.ene = params.energy ? params.energy : getRandomInt(50, 100);\n\n this.int = params.intelligence ? params.intelligence : getRandomInt(10, 50);\n this.cha = params.charisma ? params.charisma : getRandomInt(10, 50);\n this.exp = params.experience ? params.experience : getRandomInt(10, 50);\n this.cre = params.creativity ? params.creativity : getRandomInt(10, 50);\n this.eff = params.efficiency ? params.efficiency : getRandomInt(10, 50);\n this.sal = params.salary ? params.salary : getRandomInt(0.1, 5);\n\n this.loc = params.loc ? params.loc : \"\";\n this.pos = EmployeePositions.Unassigned;\n }\n\n //Returns the amount the employee needs to be paid\n process(marketCycles = 1, office: OfficeSpace): number {\n const gain = 0.003 * marketCycles,\n det = gain * Math.random();\n this.exp += gain;\n\n //Training\n const trainingEff = gain * Math.random();\n if (this.pos === EmployeePositions.Training) {\n //To increase creativity and intelligence special upgrades are needed\n this.cha += trainingEff;\n this.exp += trainingEff;\n this.eff += trainingEff;\n }\n\n this.ene -= det;\n this.hap -= det;\n\n if (this.ene < office.minEne) {\n this.ene = office.minEne;\n }\n if (this.hap < office.minHap) {\n this.hap = office.minHap;\n }\n const salary = this.sal * marketCycles * CorporationConstants.SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation: ICorporation, industry: IIndustry): number {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n const prodBase = this.mor * this.hap * this.ene * 1e-6;\n let prodMult = 0;\n switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case EmployeePositions.Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n case EmployeePositions.Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n case EmployeePositions.Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n case EmployeePositions.Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n case EmployeePositions.RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n case EmployeePositions.Unassigned:\n case EmployeePositions.Training:\n prodMult = 0;\n break;\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n return prodBase * prodMult;\n }\n\n //Process benefits from having an office party thrown\n throwParty(money: number): number {\n const mult = 1 + money / 10e6;\n this.mor *= mult;\n this.mor = Math.min(100, this.mor);\n this.hap *= mult;\n this.hap = Math.min(100, this.hap);\n return mult;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Employee\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Employee {\n return Generic_fromJSON(Employee, value.data);\n }\n}\n\nReviver.constructors.Employee = Employee;\n","import { Industries } from \"./IndustryData\";\nimport { IMap } from \"../types\";\n\nexport interface IProductRatingWeight {\n Aesthetics?: number;\n Durability?: number;\n Features?: number;\n Quality?: number;\n Performance?: number;\n Reliability?: number;\n}\n\nexport const ProductRatingWeights: IMap = {\n [Industries.Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2,\n },\n [Industries.Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2,\n },\n [Industries.Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2,\n },\n [Industries.Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n [Industries.Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2,\n },\n [Industries.Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2,\n },\n [Industries.Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1,\n },\n [Industries.RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1,\n },\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { calculateServerGrowth } from \"../Server/formulas/grow\";\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateNodeCost,\n} from \"../Hacknet/formulas/HacknetNodes\";\nimport {\n calculateHashGainRate as HScalculateHashGainRate,\n calculateLevelUpgradeCost as HScalculateLevelUpgradeCost,\n calculateRamUpgradeCost as HScalculateRamUpgradeCost,\n calculateCoreUpgradeCost as HScalculateCoreUpgradeCost,\n calculateCacheUpgradeCost as HScalculateCacheUpgradeCost,\n calculateServerCost as HScalculateServerCost,\n} from \"../Hacknet/formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { calculateSkill, calculateExp } from \"../PersonObjects/formulas/skill\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Formulas as IFormulas } from \"../ScriptEditor/NetscriptDefinitions\";\nimport {\n calculateRespectGain,\n calculateWantedLevelGain,\n calculateMoneyGain,\n calculateWantedPenalty,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"../Gang/formulas/formulas\";\n\nexport interface INetscriptFormulas {\n skills: {\n calculateSkill(exp: any, mult?: any): any;\n calculateExp(skill: any, mult?: any): any;\n };\n hacking: {\n hackChance(server: any, player: any): any;\n hackExp(server: any, player: any): any;\n hackPercent(server: any, player: any): any;\n growPercent(server: any, threads: any, player: any, cores?: any): any;\n hackTime(server: any, player: any): any;\n growTime(server: any, player: any): any;\n weakenTime(server: any, player: any): any;\n };\n hacknetNodes: {\n moneyGainRate(level: any, ram: any, cores: any, mult?: any): any;\n levelUpgradeCost(startingLevel: any, extraLevels?: any, costMult?: any): any;\n ramUpgradeCost(startingRam: any, extraLevels?: any, costMult?: any): any;\n coreUpgradeCost(startingCore: any, extraCores?: any, costMult?: any): any;\n hacknetNodeCost(n: any, mult: any): any;\n constants(): any;\n };\n hacknetServers: {\n hashGainRate(level: any, ramUsed: any, maxRam: any, cores: any, mult?: any): any;\n levelUpgradeCost(startingLevel: any, extraLevels?: any, costMult?: any): any;\n ramUpgradeCost(startingRam: any, extraLevels?: any, costMult?: any): any;\n coreUpgradeCost(startingCore: any, extraCores?: any, costMult?: any): any;\n cacheUpgradeCost(startingCache: any, extraCache?: any): any;\n hashUpgradeCost(upgName: any, level: any): any;\n hacknetServerCost(n: any, mult: any): any;\n constants(): any;\n };\n}\n\nexport function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IFormulas {\n const checkFormulasAccess = function (func: string): void {\n if (!player.hasProgram(Programs.Formulas.name)) {\n throw helper.makeRuntimeErrorMsg(`formulas.${func}`, `Requires Formulas.exe to run.`);\n }\n };\n return {\n skills: {\n calculateSkill: function (exp: any, mult: any = 1): any {\n checkFormulasAccess(\"basic.calculateSkill\");\n return calculateSkill(exp, mult);\n },\n calculateExp: function (skill: any, mult: any = 1): any {\n checkFormulasAccess(\"basic.calculateExp\");\n return calculateExp(skill, mult);\n },\n },\n hacking: {\n hackChance: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackChance\");\n return calculateHackingChance(server, player);\n },\n hackExp: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackExp\");\n return calculateHackingExpGain(server, player);\n },\n hackPercent: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackPercent\");\n return calculatePercentMoneyHacked(server, player);\n },\n growPercent: function (server: any, threads: any, player: any, cores: any = 1): any {\n checkFormulasAccess(\"basic.growPercent\");\n return calculateServerGrowth(server, threads, player, cores);\n },\n hackTime: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackTime\");\n return calculateHackingTime(server, player) * 1000;\n },\n growTime: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.growTime\");\n return calculateGrowTime(server, player) * 1000;\n },\n weakenTime: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.weakenTime\");\n return calculateWeakenTime(server, player) * 1000;\n },\n },\n hacknetNodes: {\n moneyGainRate: function (level: any, ram: any, cores: any, mult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\");\n return calculateMoneyGainRate(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\");\n return calculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\");\n return calculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore: any, extraCores: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\");\n return calculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n: any, mult: any): any {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\");\n return calculateNodeCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetNodes.constants\");\n return Object.assign({}, HacknetNodeConstants);\n },\n },\n hacknetServers: {\n hashGainRate: function (level: any, ramUsed: any, maxRam: any, cores: any, mult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.hashGainRate\");\n return HScalculateHashGainRate(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (startingLevel: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\");\n return HScalculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\");\n return HScalculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore: any, extraCores: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\");\n return HScalculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache: any, extraCache: any = 1): any {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\");\n return HScalculateCacheUpgradeCost(startingCache, extraCache);\n },\n hashUpgradeCost: function (upgName: any, level: any): any {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\");\n const upg = player.hashManager.getUpgrade(upgName);\n if (!upg) {\n throw helper.makeRuntimeErrorMsg(\n \"formulas.hacknetServers.calculateHashUpgradeCost\",\n `Invalid Hash Upgrade: ${upgName}`,\n );\n }\n return upg.getCost(level);\n },\n hacknetServerCost: function (n: any, mult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\");\n return HScalculateServerCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetServers.constants\");\n return Object.assign({}, HacknetServerConstants);\n },\n },\n gang: {\n wantedPenalty(gang: any): number {\n return calculateWantedPenalty(gang);\n },\n respectGain: function (gang: any, member: any, task: any): number {\n return calculateRespectGain(gang, member, task);\n },\n wantedLevelGain: function (gang: any, member: any, task: any): number {\n return calculateWantedLevelGain(gang, member, task);\n },\n moneyGain: function (gang: any, member: any, task: any): number {\n return calculateMoneyGain(gang, member, task);\n },\n ascensionPointsGain: function (exp: any): number {\n return calculateAscensionPointsGain(exp);\n },\n ascensionMultiplier: function (points: any): number {\n return calculateAscensionMult(points);\n },\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport { StockMarket, SymbolToStockMap, placeOrder, cancelOrder } from \"../StockMarket/StockMarket\";\nimport { getBuyTransactionCost, getSellTransactionGain } from \"../StockMarket/StockMarketHelpers\";\nimport { OrderTypes } from \"../StockMarket/data/OrderTypes\";\nimport { PositionTypes } from \"../StockMarket/data/PositionTypes\";\nimport { StockSymbols } from \"../StockMarket/data/StockSymbols\";\nimport { getStockMarket4SDataCost, getStockMarket4STixApiCost } from \"../StockMarket/StockMarketCosts\";\nimport { Stock } from \"../StockMarket/Stock\";\nimport { TIX } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): TIX {\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n const checkTixApiAccess = function (callingFn: string): void {\n if (!player.hasWseAccount) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n if (!player.hasTixApiAccess) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n\n const getStockFromSymbol = function (symbol: string, callingFn: string): Stock {\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n return {\n getSymbols: function (): any {\n helper.updateDynamicRam(\"getSymbols\", getRamCost(\"stock\", \"getSymbols\"));\n checkTixApiAccess(\"getSymbols\");\n return Object.values(StockSymbols);\n },\n getPrice: function (symbol: any): any {\n helper.updateDynamicRam(\"getPrice\", getRamCost(\"stock\", \"getPrice\"));\n checkTixApiAccess(\"getPrice\");\n const stock = getStockFromSymbol(symbol, \"getPrice\");\n\n return stock.price;\n },\n getAskPrice: function (symbol: any): any {\n helper.updateDynamicRam(\"getAskPrice\", getRamCost(\"stock\", \"getAskPrice\"));\n checkTixApiAccess(\"getAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getAskPrice\");\n\n return stock.getAskPrice();\n },\n getBidPrice: function (symbol: any): any {\n helper.updateDynamicRam(\"getBidPrice\", getRamCost(\"stock\", \"getBidPrice\"));\n checkTixApiAccess(\"getBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getBidPrice\");\n\n return stock.getBidPrice();\n },\n getPosition: function (symbol: any): any {\n helper.updateDynamicRam(\"getPosition\", getRamCost(\"stock\", \"getPosition\"));\n checkTixApiAccess(\"getPosition\");\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(\"getPosition\", `Invalid stock symbol: ${symbol}`);\n }\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getMaxShares: function (symbol: any): any {\n helper.updateDynamicRam(\"getMaxShares\", getRamCost(\"stock\", \"getMaxShares\"));\n checkTixApiAccess(\"getMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getMaxShares\");\n\n return stock.maxShares;\n },\n getPurchaseCost: function (symbol: any, shares: any, posType: any): any {\n helper.updateDynamicRam(\"getPurchaseCost\", getRamCost(\"stock\", \"getPurchaseCost\"));\n checkTixApiAccess(\"getPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getPurchaseCost\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return Infinity;\n }\n\n const res = getBuyTransactionCost(stock, shares, pos);\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getSaleGain: function (symbol: any, shares: any, posType: any): any {\n helper.updateDynamicRam(\"getSaleGain\", getRamCost(\"stock\", \"getSaleGain\"));\n checkTixApiAccess(\"getSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getSaleGain\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return 0;\n }\n\n const res = getSellTransactionGain(stock, shares, pos);\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buy: function (symbol: any, shares: any): any {\n helper.updateDynamicRam(\"buy\", getRamCost(\"stock\", \"buy\"));\n checkTixApiAccess(\"buy\");\n const stock = getStockFromSymbol(symbol, \"buy\");\n const res = buyStock(stock, shares, workerScript, {});\n return res ? stock.getAskPrice() : 0;\n },\n sell: function (symbol: any, shares: any): any {\n helper.updateDynamicRam(\"sell\", getRamCost(\"stock\", \"sell\"));\n checkTixApiAccess(\"sell\");\n const stock = getStockFromSymbol(symbol, \"sell\");\n const res = sellStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n short: function (symbol: any, shares: any): any {\n helper.updateDynamicRam(\"short\", getRamCost(\"stock\", \"short\"));\n checkTixApiAccess(\"short\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"short\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"short\");\n const res = shortStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n sellShort: function (symbol: any, shares: any): any {\n helper.updateDynamicRam(\"sellShort\", getRamCost(\"stock\", \"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"sellShort\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = sellShort(stock, shares, workerScript, {});\n\n return res ? stock.getAskPrice() : 0;\n },\n placeOrder: function (symbol: any, shares: any, price: any, type: any, pos: any): any {\n helper.updateDynamicRam(\"placeOrder\", getRamCost(\"stock\", \"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"placeOrder\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return placeOrder(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (symbol: any, shares: any, price: any, type: any, pos: any): any {\n helper.updateDynamicRam(\"cancelOrder\", getRamCost(\"stock\", \"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"cancelOrder\");\n if (isNaN(shares) || isNaN(price)) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`,\n );\n }\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n const params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos,\n };\n return cancelOrder(params, workerScript);\n },\n getOrders: function (): any {\n helper.updateDynamicRam(\"getOrders\", getRamCost(\"stock\", \"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"getOrders\",\n \"You must either be in BitNode-8 or have Source-File 8 Level 3.\",\n );\n }\n }\n\n const orders: any = {};\n\n const stockMarketOrders = StockMarket[\"Orders\"];\n for (const symbol in stockMarketOrders) {\n const orderBook = stockMarketOrders[symbol];\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos,\n });\n }\n }\n }\n\n return orders;\n },\n getVolatility: function (symbol: any): any {\n helper.updateDynamicRam(\"getVolatility\", getRamCost(\"stock\", \"getVolatility\"));\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getVolatility\");\n\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getForecast: function (symbol: any): any {\n helper.updateDynamicRam(\"getForecast\", getRamCost(\"stock\", \"getForecast\"));\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getForecast\");\n\n let forecast = 50;\n stock.b ? (forecast += stock.otlkMag) : (forecast -= stock.otlkMag);\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function () {\n helper.updateDynamicRam(\"purchase4SMarketData\", getRamCost(\"stock\", \"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (player.has4SData) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (player.money < getStockMarket4SDataCost()) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n player.has4SData = true;\n player.loseMoney(getStockMarket4SDataCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n helper.updateDynamicRam(\"purchase4SMarketDataTixApi\", getRamCost(\"stock\", \"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (player.has4SDataTixApi) {\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (player.money < getStockMarket4STixApiCost()) {\n workerScript.log(\n \"stock.purchase4SMarketDataTixApi\",\n () => \"Not enough money to purchase 4S Market Data TIX API\",\n );\n return false;\n }\n\n player.has4SDataTixApi = true;\n player.loseMoney(getStockMarket4STixApiCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Purchased 4S Market Data TIX API\");\n return true;\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { purchaseAugmentation, joinFaction } from \"../Faction/FactionHelpers\";\nimport { startWorkerScript } from \"../NetscriptWorker\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { augmentationExists, installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { killWorkerScript } from \"../Netscript/killWorkerScript\";\nimport { CONSTANTS } from \"../Constants\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { RunningScript } from \"../Script/RunningScript\";\n\nimport { Singularity as ISingularity } from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport { findCrime } from \"../Crime/CrimeHelpers\";\nimport { CompanyPosition } from \"../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../Company/CompanyPositions\";\nimport { DarkWebItems } from \"../DarkWeb/DarkWebItems\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Router } from \"../ui/GameRoot\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Page } from \"../ui/Router\";\nimport { Locations } from \"../Locations/Locations\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../Server/AllServers\";\nimport { Programs } from \"../Programs/Programs\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Company } from \"../Company/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { getServerOnNetwork, safetlyCreateUniqueServer } from \"../Server/ServerHelpers\";\nimport { Terminal } from \"../Terminal\";\nimport { calculateHackingTime } from \"../Hacking\";\nimport { Server } from \"../Server/Server\";\nimport { netscriptCanHack } from \"../Hacking/netscriptCanHack\";\n\nexport function NetscriptSingularity(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ISingularity {\n const getAugmentation = function (func: any, name: any): Augmentation {\n if (!augmentationExists(name)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return Augmentations[name];\n };\n\n const getFaction = function (func: any, name: any): Faction {\n if (!factionExists(name)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return Factions[name];\n };\n\n const getCompany = function (func: any, name: any): Company {\n const company = Companies[name];\n if (company == null || !(company instanceof Company)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n return company;\n };\n\n const runAfterReset = function (cbScript = null): void {\n //Run a script after reset\n if (cbScript && isString(cbScript)) {\n const home = player.getHomeComputer();\n for (const script of home.scripts) {\n if (script.filename === cbScript) {\n const ramUsage = script.ramUsage;\n const ramAvailable = home.maxRam - home.ramUsed;\n if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n const runningScriptObj = new RunningScript(script, []); // No args\n runningScriptObj.threads = 1; // Only 1 thread\n startWorkerScript(runningScriptObj, home);\n }\n }\n }\n };\n return {\n getOwnedAugmentations: function (purchased: any = false): any {\n helper.updateDynamicRam(\"getOwnedAugmentations\", getRamCost(\"getOwnedAugmentations\"));\n helper.checkSingularityAccess(\"getOwnedAugmentations\", 3);\n const res = [];\n for (let i = 0; i < player.augmentations.length; ++i) {\n res.push(player.augmentations[i].name);\n }\n if (purchased) {\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n res.push(player.queuedAugmentations[i].name);\n }\n }\n return res;\n },\n getAugmentationsFromFaction: function (facname: any): any {\n helper.updateDynamicRam(\"getAugmentationsFromFaction\", getRamCost(\"getAugmentationsFromFaction\"));\n helper.checkSingularityAccess(\"getAugmentationsFromFaction\", 3);\n const faction = getFaction(\"getAugmentationsFromFaction\", facname);\n\n // If player has a gang with this faction, return all augmentations.\n if (player.hasGangWith(facname)) {\n const res = [];\n for (const augName in Augmentations) {\n if (augName === AugmentationNames.NeuroFluxGovernor) continue;\n if (augName === AugmentationNames.TheRedPill && player.bitNodeN !== 2) continue;\n const aug = Augmentations[augName];\n if (!aug.isSpecial) {\n res.push(augName);\n }\n }\n\n return res;\n }\n\n return faction.augmentations.slice();\n },\n getAugmentationCost: function (name: any): any {\n helper.updateDynamicRam(\"getAugmentationCost\", getRamCost(\"getAugmentationCost\"));\n helper.checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name: any): any {\n helper.updateDynamicRam(\"getAugmentationPrereq\", getRamCost(\"getAugmentationPrereq\"));\n helper.checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name: any): any {\n helper.updateDynamicRam(\"getAugmentationPrice\", getRamCost(\"getAugmentationPrice\"));\n helper.checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name: any): any {\n helper.updateDynamicRam(\"getAugmentationRepReq\", getRamCost(\"getAugmentationRepReq\"));\n helper.checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name: any): any {\n helper.updateDynamicRam(\"getAugmentationStats\", getRamCost(\"getAugmentationStats\"));\n helper.checkSingularityAccess(\"getAugmentationStats\", 3);\n const aug = getAugmentation(\"getAugmentationStats\", name);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (faction: any, name: any): any {\n helper.updateDynamicRam(\"purchaseAugmentation\", getRamCost(\"purchaseAugmentation\"));\n helper.checkSingularityAccess(\"purchaseAugmentation\", 3);\n const fac = getFaction(\"purchaseAugmentation\", faction);\n const aug = getAugmentation(\"purchaseAugmentation\", name);\n\n let augs = [];\n if (player.hasGangWith(faction)) {\n for (const augName in Augmentations) {\n const tempAug = Augmentations[augName];\n if (!tempAug.isSpecial) {\n augs.push(augName);\n }\n }\n } else {\n augs = fac.augmentations;\n }\n\n if (!augs.includes(name)) {\n workerScript.log(\n \"purchaseAugmentation\",\n () => `Faction '${faction}' does not have the '${name}' augmentation.`,\n );\n return false;\n }\n\n const isNeuroflux = aug.name === AugmentationNames.NeuroFluxGovernor;\n if (!isNeuroflux) {\n for (let j = 0; j < player.queuedAugmentations.length; ++j) {\n if (player.queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", () => `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n for (let j = 0; j < player.augmentations.length; ++j) {\n if (player.augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", () => `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n }\n\n if (fac.playerReputation < aug.baseRepRequirement) {\n workerScript.log(\"purchaseAugmentation\", () => `You do not have enough reputation with '${fac.name}'.`);\n return false;\n }\n\n const res = purchaseAugmentation(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", () => res);\n if (isString(res) && res.startsWith(\"You purchased\")) {\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (cbScript: any): any {\n helper.updateDynamicRam(\"softReset\", getRamCost(\"softReset\"));\n helper.checkSingularityAccess(\"softReset\", 3);\n\n workerScript.log(\"softReset\", () => \"Soft resetting. This will cause this script to be killed\");\n setTimeout(() => {\n prestigeAugmentation();\n runAfterReset(cbScript);\n }, 0);\n\n // Prevent workerScript from \"finishing execution naturally\"\n workerScript.running = false;\n killWorkerScript(workerScript);\n },\n installAugmentations: function (cbScript: any): any {\n helper.updateDynamicRam(\"installAugmentations\", getRamCost(\"installAugmentations\"));\n helper.checkSingularityAccess(\"installAugmentations\", 3);\n\n if (player.queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", () => \"You do not have any Augmentations to be installed.\");\n return false;\n }\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n workerScript.log(\n \"installAugmentations\",\n () => \"Installing Augmentations. This will cause this script to be killed\",\n );\n setTimeout(() => {\n installAugmentations();\n runAfterReset(cbScript);\n }, 0);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n killWorkerScript(workerScript);\n },\n\n goToLocation: function (locationName: any): boolean {\n helper.updateDynamicRam(\"goToLocation\", getRamCost(\"goToLocation\"));\n helper.checkSingularityAccess(\"goToLocation\", 1);\n const location = Object.values(Locations).find((l) => l.name === locationName);\n if (!location) {\n workerScript.log(\"goToLocation\", () => `No location named ${locationName}`);\n return false;\n }\n if (player.city !== location.city) {\n workerScript.log(\"goToLocation\", () => `No location named ${locationName} in ${player.city}`);\n return false;\n }\n Router.toLocation(location);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 100);\n return true;\n },\n universityCourse: function (universityName: any, className: any): any {\n helper.updateDynamicRam(\"universityCourse\", getRamCost(\"universityCourse\"));\n helper.checkSingularityAccess(\"universityCourse\", 1);\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"universityCourse\", () => txt);\n }\n\n let costMult, expMult;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"universityCourse\",\n () => \"You cannot study at 'Summit University' because you are not in 'Aevum'.\",\n );\n return false;\n }\n player.gotoLocation(LocationName.AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"universityCourse\",\n () => \"You cannot study at 'Rothman University' because you are not in 'Sector-12'.\",\n );\n return false;\n }\n player.location = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (player.city != CityName.Volhaven) {\n workerScript.log(\n \"universityCourse\",\n () => \"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.\",\n );\n return false;\n }\n player.location = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n default:\n workerScript.log(\"universityCourse\", () => `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n let task = \"\";\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = CONSTANTS.ClassStudyComputerScience;\n break;\n case \"Data Structures\".toLowerCase():\n task = CONSTANTS.ClassDataStructures;\n break;\n case \"Networks\".toLowerCase():\n task = CONSTANTS.ClassNetworks;\n break;\n case \"Algorithms\".toLowerCase():\n task = CONSTANTS.ClassAlgorithms;\n break;\n case \"Management\".toLowerCase():\n task = CONSTANTS.ClassManagement;\n break;\n case \"Leadership\".toLowerCase():\n task = CONSTANTS.ClassLeadership;\n break;\n default:\n workerScript.log(\"universityCourse\", () => `Invalid class name: ${className}.`);\n return false;\n }\n player.startClass(Router, costMult, expMult, task);\n workerScript.log(\"universityCourse\", () => `Started ${task} at ${universityName}`);\n return true;\n },\n\n gymWorkout: function (gymName: any, stat: any): any {\n helper.updateDynamicRam(\"gymWorkout\", getRamCost(\"gymWorkout\"));\n helper.checkSingularityAccess(\"gymWorkout\", 1);\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"gymWorkout\", () => txt);\n }\n let costMult, expMult;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"gymWorkout\",\n () => \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\",\n );\n return false;\n }\n player.location = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"gymWorkout\",\n () => \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\",\n );\n return false;\n }\n player.location = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"gymWorkout\",\n () => \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\",\n );\n return false;\n }\n player.location = LocationName.Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"gymWorkout\",\n () => \"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'.\",\n );\n return false;\n }\n player.location = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (player.city != CityName.Volhaven) {\n workerScript.log(\n \"gymWorkout\",\n () => \"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.\",\n );\n return false;\n }\n player.location = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\n default:\n workerScript.log(\"gymWorkout\", () => `Invalid gym name: ${gymName}. gymWorkout() failed`);\n return false;\n }\n\n switch (stat.toLowerCase()) {\n case \"strength\".toLowerCase():\n case \"str\".toLowerCase():\n player.startClass(Router, costMult, expMult, CONSTANTS.ClassGymStrength);\n break;\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n player.startClass(Router, costMult, expMult, CONSTANTS.ClassGymDefense);\n break;\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n player.startClass(Router, costMult, expMult, CONSTANTS.ClassGymDexterity);\n break;\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n player.startClass(Router, costMult, expMult, CONSTANTS.ClassGymAgility);\n break;\n default:\n workerScript.log(\"gymWorkout\", () => `Invalid stat: ${stat}.`);\n return false;\n }\n workerScript.log(\"gymWorkout\", () => `Started training ${stat} at ${gymName}`);\n return true;\n },\n\n travelToCity: function (cityname: any): any {\n helper.updateDynamicRam(\"travelToCity\", getRamCost(\"travelToCity\"));\n helper.checkSingularityAccess(\"travelToCity\", 1);\n\n switch (cityname) {\n case CityName.Aevum:\n case CityName.Chongqing:\n case CityName.Sector12:\n case CityName.NewTokyo:\n case CityName.Ishima:\n case CityName.Volhaven:\n if (player.money < CONSTANTS.TravelCost) {\n throw helper.makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n player.loseMoney(CONSTANTS.TravelCost, \"other\");\n player.city = cityname;\n workerScript.log(\"travelToCity\", () => `Traveled to ${cityname}`);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50);\n return true;\n default:\n workerScript.log(\"travelToCity\", () => `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n\n purchaseTor: function (): any {\n helper.updateDynamicRam(\"purchaseTor\", getRamCost(\"purchaseTor\"));\n helper.checkSingularityAccess(\"purchaseTor\", 1);\n\n if (player.hasTorRouter()) {\n workerScript.log(\"purchaseTor\", () => \"You already have a TOR router!\");\n return false;\n }\n\n if (player.money < CONSTANTS.TorRouterCost) {\n workerScript.log(\"purchaseTor\", () => \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n player.loseMoney(CONSTANTS.TorRouterCost, \"other\");\n\n const darkweb = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1,\n });\n AddToAllServers(darkweb);\n\n player.getHomeComputer().serversOnNetwork.push(darkweb.hostname);\n darkweb.serversOnNetwork.push(player.getHomeComputer().hostname);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n workerScript.log(\"purchaseTor\", () => \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (programName: any): any {\n helper.updateDynamicRam(\"purchaseProgram\", getRamCost(\"purchaseProgram\"));\n helper.checkSingularityAccess(\"purchaseProgram\", 1);\n\n if (!player.hasTorRouter()) {\n workerScript.log(\"purchaseProgram\", () => \"You do not have the TOR router.\");\n return false;\n }\n\n programName = programName.toLowerCase();\n\n const item = Object.values(DarkWebItems).find((i) => i.program.toLowerCase() === programName);\n if (item == null) {\n workerScript.log(\"purchaseProgram\", () => `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (player.money < item.price) {\n workerScript.log(\n \"purchaseProgram\",\n () => `Not enough money to purchase '${item.program}'. Need ${numeralWrapper.formatMoney(item.price)}`,\n );\n return false;\n }\n\n if (player.hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", () => `You already have the '${item.program}' program`);\n return true;\n }\n\n player.loseMoney(item.price, \"other\");\n player.getHomeComputer().programs.push(item.program);\n workerScript.log(\n \"purchaseProgram\",\n () => `You have purchased the '${item.program}' program. The new program can be found on your home computer.`,\n );\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50);\n return true;\n },\n getCurrentServer: function (): any {\n helper.updateDynamicRam(\"getCurrentServer\", getRamCost(\"getCurrentServer\"));\n helper.checkSingularityAccess(\"getCurrentServer\", 1);\n return player.getCurrentServer().hostname;\n },\n connect: function (hostname: any): any {\n helper.updateDynamicRam(\"connect\", getRamCost(\"connect\"));\n helper.checkSingularityAccess(\"connect\", 1);\n if (!hostname) {\n throw helper.makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n const target = GetServer(hostname);\n if (target == null) {\n throw helper.makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n if (hostname === \"home\") {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = player.getHomeComputer().hostname;\n player.getCurrentServer().isConnectedTo = true;\n Terminal.setcwd(\"/\");\n return true;\n }\n\n const server = player.getCurrentServer();\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = getServerOnNetwork(server, i);\n if (other === null) continue;\n if (other.hostname == hostname) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = target.hostname;\n player.getCurrentServer().isConnectedTo = true;\n Terminal.setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function (): any {\n helper.updateDynamicRam(\"manualHack\", getRamCost(\"manualHack\"));\n helper.checkSingularityAccess(\"manualHack\", 1);\n const server = player.getCurrentServer();\n return helper.hack(server.hostname, true);\n },\n installBackdoor: function (): any {\n helper.updateDynamicRam(\"installBackdoor\", getRamCost(\"installBackdoor\"));\n helper.checkSingularityAccess(\"installBackdoor\", 1);\n const baseserver = player.getCurrentServer();\n if (!(baseserver instanceof Server)) {\n workerScript.log(\"installBackdoor\", () => \"cannot backdoor this kind of server\");\n return Promise.resolve();\n }\n const server = baseserver as Server;\n const installTime = (calculateHackingTime(server, player) / 4) * 1000;\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, player);\n if (!canHack.res) {\n throw helper.makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"installBackdoor\",\n () => `Installing backdoor on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(installTime, true)}`,\n );\n\n return netscriptDelay(installTime, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n workerScript.log(\"installBackdoor\", () => `Successfully installed backdoor on '${server.hostname}'`);\n\n server.backdoorInstalled = true;\n\n if (SpecialServers.WorldDaemon === server.hostname) {\n Router.toBitVerse(false, false);\n }\n return Promise.resolve();\n });\n },\n getStats: function (): any {\n helper.updateDynamicRam(\"getStats\", getRamCost(\"getStats\"));\n helper.checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", () => `getStats is deprecated, please use getplayer`);\n\n return {\n hacking: player.hacking,\n strength: player.strength,\n defense: player.defense,\n dexterity: player.dexterity,\n agility: player.agility,\n charisma: player.charisma,\n intelligence: player.intelligence,\n };\n },\n getCharacterInformation: function (): any {\n helper.updateDynamicRam(\"getCharacterInformation\", getRamCost(\"getCharacterInformation\"));\n helper.checkSingularityAccess(\"getCharacterInformation\", 1);\n workerScript.log(\"getCharacterInformation\", () => `getCharacterInformation is deprecated, please use getplayer`);\n\n return {\n bitnode: player.bitNodeN,\n city: player.city,\n factions: player.factions.slice(),\n hp: player.hp,\n jobs: Object.keys(player.jobs),\n jobTitles: Object.values(player.jobs),\n maxHp: player.max_hp,\n mult: {\n agility: player.agility_mult,\n agilityExp: player.agility_exp_mult,\n companyRep: player.company_rep_mult,\n crimeMoney: player.crime_money_mult,\n crimeSuccess: player.crime_success_mult,\n defense: player.defense_mult,\n defenseExp: player.defense_exp_mult,\n dexterity: player.dexterity_mult,\n dexterityExp: player.dexterity_exp_mult,\n factionRep: player.faction_rep_mult,\n hacking: player.hacking_mult,\n hackingExp: player.hacking_exp_mult,\n strength: player.strength_mult,\n strengthExp: player.strength_exp_mult,\n workMoney: player.work_money_mult,\n },\n timeWorked: player.timeWorked,\n tor: player.hasTorRouter(),\n workHackExpGain: player.workHackExpGained,\n workStrExpGain: player.workStrExpGained,\n workDefExpGain: player.workDefExpGained,\n workDexExpGain: player.workDexExpGained,\n workAgiExpGain: player.workAgiExpGained,\n workChaExpGain: player.workChaExpGained,\n workRepGain: player.workRepGained,\n workMoneyGain: player.workMoneyGained,\n hackingExp: player.hacking_exp,\n strengthExp: player.strength_exp,\n defenseExp: player.defense_exp,\n dexterityExp: player.dexterity_exp,\n agilityExp: player.agility_exp,\n charismaExp: player.charisma_exp,\n };\n },\n hospitalize: function (): any {\n helper.updateDynamicRam(\"hospitalize\", getRamCost(\"hospitalize\"));\n helper.checkSingularityAccess(\"hospitalize\", 1);\n if (player.isWorking || Router.page() === Page.Infiltration || Router.page() === Page.BitVerse) {\n workerScript.log(\"hospitalize\", () => \"Cannot go to the hospital because the player is busy.\");\n return;\n }\n return player.hospitalize();\n },\n isBusy: function (): any {\n helper.updateDynamicRam(\"isBusy\", getRamCost(\"isBusy\"));\n helper.checkSingularityAccess(\"isBusy\", 1);\n return player.isWorking || Router.page() === Page.Infiltration || Router.page() === Page.BitVerse;\n },\n stopAction: function (): any {\n helper.updateDynamicRam(\"stopAction\", getRamCost(\"stopAction\"));\n helper.checkSingularityAccess(\"stopAction\", 1);\n if (player.isWorking) {\n Router.toTerminal();\n const txt = player.singularityStopWork();\n workerScript.log(\"stopAction\", () => txt);\n return true;\n }\n return false;\n },\n upgradeHomeCores: function (): any {\n helper.updateDynamicRam(\"upgradeHomeCores\", getRamCost(\"upgradeHomeCores\"));\n helper.checkSingularityAccess(\"upgradeHomeCores\", 2);\n\n // Check if we're at max cores\n const homeComputer = player.getHomeComputer();\n if (homeComputer.cpuCores >= 8) {\n workerScript.log(\"upgradeHomeCores\", () => `Your home computer is at max cores.`);\n return false;\n }\n\n const cost = player.getUpgradeHomeCoresCost();\n if (player.money < cost) {\n workerScript.log(\n \"upgradeHomeCores\",\n () => `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return false;\n }\n\n homeComputer.cpuCores += 1;\n player.loseMoney(cost, \"servers\");\n\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n workerScript.log(\n \"upgradeHomeCores\",\n () => `Purchased an additional core for home computer! It now has ${homeComputer.cpuCores} cores.`,\n );\n return true;\n },\n getUpgradeHomeCoresCost: function (): any {\n helper.updateDynamicRam(\"getUpgradeHomeCoresCost\", getRamCost(\"getUpgradeHomeCoresCost\"));\n helper.checkSingularityAccess(\"getUpgradeHomeCoresCost\", 2);\n\n return player.getUpgradeHomeCoresCost();\n },\n upgradeHomeRam: function (): any {\n helper.updateDynamicRam(\"upgradeHomeRam\", getRamCost(\"upgradeHomeRam\"));\n helper.checkSingularityAccess(\"upgradeHomeRam\", 2);\n\n // Check if we're at max RAM\n const homeComputer = player.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", () => `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = player.getUpgradeHomeRamCost();\n if (player.money < cost) {\n workerScript.log(\n \"upgradeHomeRam\",\n () => `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return false;\n }\n\n homeComputer.maxRam *= 2;\n player.loseMoney(cost, \"servers\");\n\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n workerScript.log(\n \"upgradeHomeRam\",\n () =>\n `Purchased additional RAM for home computer! It now has ${numeralWrapper.formatRAM(\n homeComputer.maxRam,\n )} of RAM.`,\n );\n return true;\n },\n getUpgradeHomeRamCost: function (): any {\n helper.updateDynamicRam(\"getUpgradeHomeRamCost\", getRamCost(\"getUpgradeHomeRamCost\"));\n helper.checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n\n return player.getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName: any): any {\n helper.updateDynamicRam(\"workForCompany\", getRamCost(\"workForCompany\"));\n helper.checkSingularityAccess(\"workForCompany\", 2);\n\n // Sanitize input\n if (companyName == null) {\n companyName = player.companyName;\n }\n\n // Make sure its a valid company\n if (companyName == null || companyName === \"\" || !(Companies[companyName] instanceof Company)) {\n workerScript.log(\"workForCompany\", () => `Invalid company: '${companyName}'`);\n return false;\n }\n\n // Make sure player is actually employed at the comapny\n if (!Object.keys(player.jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", () => `You do not have a job at '${companyName}'`);\n return false;\n }\n\n // Check to make sure company position data is valid\n const companyPositionName = player.jobs[companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (companyPositionName === \"\" || !(companyPosition instanceof CompanyPosition)) {\n workerScript.log(\"workForCompany\", () => \"You do not have a job\");\n return false;\n }\n\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"workForCompany\", () => txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n player.startWorkPartTime(Router, companyName);\n } else {\n player.startWork(Router, companyName);\n }\n workerScript.log(\n \"workForCompany\",\n () => `Began working at '${player.companyName}' as a '${companyPositionName}'`,\n );\n return true;\n },\n applyToCompany: function (companyName: any, field: any): any {\n helper.updateDynamicRam(\"applyToCompany\", getRamCost(\"applyToCompany\"));\n helper.checkSingularityAccess(\"applyToCompany\", 2);\n getCompany(\"applyToCompany\", companyName);\n\n player.location = companyName;\n let res;\n switch (field.toLowerCase()) {\n case \"software\":\n res = player.applyForSoftwareJob(true);\n break;\n case \"software consultant\":\n res = player.applyForSoftwareConsultantJob(true);\n break;\n case \"it\":\n res = player.applyForItJob(true);\n break;\n case \"security engineer\":\n res = player.applyForSecurityEngineerJob(true);\n break;\n case \"network engineer\":\n res = player.applyForNetworkEngineerJob(true);\n break;\n case \"business\":\n res = player.applyForBusinessJob(true);\n break;\n case \"business consultant\":\n res = player.applyForBusinessConsultantJob(true);\n break;\n case \"security\":\n res = player.applyForSecurityJob(true);\n break;\n case \"agent\":\n res = player.applyForAgentJob(true);\n break;\n case \"employee\":\n res = player.applyForEmployeeJob(true);\n break;\n case \"part-time employee\":\n res = player.applyForPartTimeEmployeeJob(true);\n break;\n case \"waiter\":\n res = player.applyForWaiterJob(true);\n break;\n case \"part-time waiter\":\n res = player.applyForPartTimeWaiterJob(true);\n break;\n default:\n workerScript.log(\"applyToCompany\", () => `Invalid job: '${field}'.`);\n return false;\n }\n // TODO https://github.com/danielyxie/bitburner/issues/1378\n // The player object's applyForJob function can return string with special error messages\n // if (isString(res)) {\n // workerScript.log(\"applyToCompany\",()=> res);\n // return false;\n // }\n if (res) {\n workerScript.log(\n \"applyToCompany\",\n () => `You were offered a new job at '${companyName}' as a '${player.jobs[companyName]}'`,\n );\n } else {\n workerScript.log(\n \"applyToCompany\",\n () => `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`,\n );\n }\n return res;\n },\n getCompanyRep: function (companyName: any): any {\n helper.updateDynamicRam(\"getCompanyRep\", getRamCost(\"getCompanyRep\"));\n helper.checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName: any): any {\n helper.updateDynamicRam(\"getCompanyFavor\", getRamCost(\"getCompanyFavor\"));\n helper.checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName: any): any {\n helper.updateDynamicRam(\"getCompanyFavorGain\", getRamCost(\"getCompanyFavorGain\"));\n helper.checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain();\n },\n checkFactionInvitations: function (): any {\n helper.updateDynamicRam(\"checkFactionInvitations\", getRamCost(\"checkFactionInvitations\"));\n helper.checkSingularityAccess(\"checkFactionInvitations\", 2);\n // Make a copy of player.factionInvitations\n return player.factionInvitations.slice();\n },\n joinFaction: function (name: any): any {\n helper.updateDynamicRam(\"joinFaction\", getRamCost(\"joinFaction\"));\n helper.checkSingularityAccess(\"joinFaction\", 2);\n getFaction(\"joinFaction\", name);\n\n if (!player.factionInvitations.includes(name)) {\n workerScript.log(\"joinFaction\", () => `You have not been invited by faction '${name}'`);\n return false;\n }\n const fac = Factions[name];\n joinFaction(fac);\n\n // Update Faction Invitation list to account for joined + banned factions\n for (let i = 0; i < player.factionInvitations.length; ++i) {\n if (player.factionInvitations[i] == name || Factions[player.factionInvitations[i]].isBanned) {\n player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n workerScript.log(\"joinFaction\", () => `Joined the '${name}' faction.`);\n return true;\n },\n workForFaction: function (name: any, type: any): any {\n helper.updateDynamicRam(\"workForFaction\", getRamCost(\"workForFaction\"));\n helper.checkSingularityAccess(\"workForFaction\", 2);\n getFaction(\"workForFaction\", name);\n\n // if the player is in a gang and the target faction is any of the gang faction, fail\n if (player.inGang() && AllGangs[name] !== undefined) {\n workerScript.log(\"workForFaction\", () => `Faction '${name}' does not offer work at the moment.`);\n return false;\n }\n\n if (!player.factions.includes(name)) {\n workerScript.log(\"workForFaction\", () => `You are not a member of '${name}'`);\n return false;\n }\n\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"workForFaction\", () => txt);\n }\n\n const fac = Factions[name];\n // Arrays listing factions that allow each time of work\n const hackAvailable = [\n \"Illuminati\",\n \"Daedalus\",\n \"The Covenant\",\n \"ECorp\",\n \"MegaCorp\",\n \"Bachman & Associates\",\n \"Blade Industries\",\n \"NWO\",\n \"Clarke Incorporated\",\n \"OmniTek Incorporated\",\n \"Four Sigma\",\n \"KuaiGong International\",\n \"Fulcrum Secret Technologies\",\n \"BitRunners\",\n \"The Black Hand\",\n \"NiteSec\",\n \"Chongqing\",\n \"Sector-12\",\n \"New Tokyo\",\n \"Aevum\",\n \"Ishima\",\n \"Volhaven\",\n \"Speakers for the Dead\",\n \"The Dark Army\",\n \"The Syndicate\",\n \"Silhouette\",\n \"Netburners\",\n \"Tian Di Hui\",\n \"CyberSec\",\n ];\n const fdWkAvailable = [\n \"Illuminati\",\n \"Daedalus\",\n \"The Covenant\",\n \"ECorp\",\n \"MegaCorp\",\n \"Bachman & Associates\",\n \"Blade Industries\",\n \"NWO\",\n \"Clarke Incorporated\",\n \"OmniTek Incorporated\",\n \"Four Sigma\",\n \"KuaiGong International\",\n \"The Black Hand\",\n \"Chongqing\",\n \"Sector-12\",\n \"New Tokyo\",\n \"Aevum\",\n \"Ishima\",\n \"Volhaven\",\n \"Speakers for the Dead\",\n \"The Dark Army\",\n \"The Syndicate\",\n \"Silhouette\",\n \"Tetrads\",\n \"Slum Snakes\",\n ];\n const scWkAvailable = [\n \"ECorp\",\n \"MegaCorp\",\n \"Bachman & Associates\",\n \"Blade Industries\",\n \"NWO\",\n \"Clarke Incorporated\",\n \"OmniTek Incorporated\",\n \"Four Sigma\",\n \"KuaiGong International\",\n \"Fulcrum Secret Technologies\",\n \"Chongqing\",\n \"Sector-12\",\n \"New Tokyo\",\n \"Aevum\",\n \"Ishima\",\n \"Volhaven\",\n \"Speakers for the Dead\",\n \"The Syndicate\",\n \"Tetrads\",\n \"Slum Snakes\",\n \"Tian Di Hui\",\n ];\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!hackAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n player.startFactionHackWork(Router, fac);\n workerScript.log(\"workForFaction\", () => `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!fdWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n player.startFactionFieldWork(Router, fac);\n workerScript.log(\"workForFaction\", () => `Started carrying out field missions for '${fac.name}'`);\n return true;\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!scWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n player.startFactionSecurityWork(Router, fac);\n workerScript.log(\"workForFaction\", () => `Started carrying out security work for '${fac.name}'`);\n return true;\n default:\n workerScript.log(\"workForFaction\", () => `Invalid work type: '${type}`);\n }\n return true;\n },\n getFactionRep: function (name: any): any {\n helper.updateDynamicRam(\"getFactionRep\", getRamCost(\"getFactionRep\"));\n helper.checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name: any): any {\n helper.updateDynamicRam(\"getFactionFavor\", getRamCost(\"getFactionFavor\"));\n helper.checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name: any): any {\n helper.updateDynamicRam(\"getFactionFavorGain\", getRamCost(\"getFactionFavorGain\"));\n helper.checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain();\n },\n donateToFaction: function (name: any, amt: any): any {\n helper.updateDynamicRam(\"donateToFaction\", getRamCost(\"donateToFaction\"));\n helper.checkSingularityAccess(\"donateToFaction\", 3);\n const faction = getFaction(\"donateToFaction\", name);\n\n if (typeof amt !== \"number\" || amt <= 0) {\n workerScript.log(\"donateToFaction\", () => `Invalid donation amount: '${amt}'.`);\n return false;\n }\n if (player.money < amt) {\n workerScript.log(\n \"donateToFaction\",\n () => `You do not have enough money to donate ${numeralWrapper.formatMoney(amt)} to '${name}'`,\n );\n return false;\n }\n const repNeededToDonate = Math.round(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\n \"donateToFaction\",\n () =>\n `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`,\n );\n return false;\n }\n const repGain = (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n faction.playerReputation += repGain;\n player.loseMoney(amt, \"other\");\n workerScript.log(\n \"donateToFaction\",\n () =>\n `${numeralWrapper.formatMoney(amt)} donated to '${name}' for ${numeralWrapper.formatReputation(\n repGain,\n )} reputation`,\n );\n return true;\n },\n createProgram: function (name: any): any {\n helper.updateDynamicRam(\"createProgram\", getRamCost(\"createProgram\"));\n helper.checkSingularityAccess(\"createProgram\", 3);\n\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"createProgram\", () => txt);\n }\n\n name = name.toLowerCase();\n\n const p = Object.values(Programs).find((p) => p.name.toLowerCase() === name);\n\n if (p == null) {\n workerScript.log(\"createProgram\", () => `The specified program does not exist: '${name}`);\n return false;\n }\n\n if (player.hasProgram(p.name)) {\n workerScript.log(\"createProgram\", () => `You already have the '${p.name}' program`);\n return false;\n }\n\n const create = p.create;\n if (create === null) {\n workerScript.log(\"createProgram\", () => `You cannot create the '${p.name}' program`);\n return false;\n }\n\n if (!create.req(player)) {\n workerScript.log(\n \"createProgram\",\n () => `Hacking level is too low to create '${p.name}' (level ${create.level} req)`,\n );\n return false;\n }\n\n player.startCreateProgramWork(Router, p.name, create.time, create.level);\n workerScript.log(\"createProgram\", () => `Began creating program: '${name}'`);\n return true;\n },\n commitCrime: function (crimeRoughName: any): any {\n helper.updateDynamicRam(\"commitCrime\", getRamCost(\"commitCrime\"));\n helper.checkSingularityAccess(\"commitCrime\", 3);\n\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"commitCrime\", () => txt);\n }\n\n // Set Location to slums\n player.gotoLocation(LocationName.Slums);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n // couldn't find crime\n throw helper.makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n workerScript.log(\"commitCrime\", () => `Attempting to commit ${crime.name}...`);\n return crime.commit(Router, player, 1, workerScript);\n },\n getCrimeChance: function (crimeRoughName: any): any {\n helper.updateDynamicRam(\"getCrimeChance\", getRamCost(\"getCrimeChance\"));\n helper.checkSingularityAccess(\"getCrimeChance\", 3);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw helper.makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(player);\n },\n getCrimeStats: function (crimeRoughName: any): any {\n helper.updateDynamicRam(\"getCrimeStats\", getRamCost(\"getCrimeStats\"));\n helper.checkSingularityAccess(\"getCrimeStats\", 3);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw helper.makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n };\n}\n","// Metadata used for constructing Company Positions\nimport { IConstructorParams } from \"../CompanyPosition\";\nimport * as posNames from \"./companypositionnames\";\n\nexport const companyPositionMetadata: IConstructorParams[] = [\n {\n name: posNames.SoftwareCompanyPositions[0], // Software Enginering Intern\n nextPosition: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n baseSalary: 33,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.05,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n baseSalary: 80,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.1,\n reqdHacking: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n baseSalary: 165,\n charismaEffectiveness: 20,\n charismaExpGain: 0.08,\n hackingEffectiveness: 80,\n hackingExpGain: 0.4,\n reqdCharisma: 51,\n reqdHacking: 251,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n nextPosition: posNames.SoftwareCompanyPositions[4], // Head of Software\n baseSalary: 500,\n charismaEffectiveness: 25,\n charismaExpGain: 0.1,\n hackingEffectiveness: 75,\n hackingExpGain: 0.8,\n reqdCharisma: 151,\n reqdHacking: 401,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.SoftwareCompanyPositions[4], // Head of Software\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 800,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 400e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n nextPosition: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n baseSalary: 1650,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1.1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n nextPosition: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n baseSalary: 2310,\n charismaEffectiveness: 30,\n charismaExpGain: 0.6,\n hackingEffectiveness: 70,\n hackingExpGain: 1.2,\n reqdCharisma: 401,\n reqdHacking: 601,\n reqdReputation: 1.6e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n nextPosition: null,\n baseSalary: 2640,\n charismaEffectiveness: 35,\n charismaExpGain: 1,\n hackingEffectiveness: 65,\n hackingExpGain: 1.5,\n reqdCharisma: 501,\n reqdHacking: 751,\n reqdReputation: 3.2e6,\n repMultiplier: 2,\n },\n {\n name: posNames.ITCompanyPositions[0], // IT Intern\n nextPosition: posNames.ITCompanyPositions[1], // IT Analyst\n baseSalary: 26,\n charismaEffectiveness: 10,\n charismaExpGain: 0.01,\n hackingEffectiveness: 90,\n hackingExpGain: 0.04,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.ITCompanyPositions[1], // IT Analyst\n nextPosition: posNames.ITCompanyPositions[2], // IT Manager\n baseSalary: 66,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.08,\n reqdHacking: 26,\n reqdReputation: 7e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.ITCompanyPositions[2], // IT Manager\n nextPosition: posNames.ITCompanyPositions[3], // Systems Administrator\n baseSalary: 132,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.3,\n reqdCharisma: 51,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.ITCompanyPositions[3], // Systems Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.2,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.SecurityEngineerCompanyPositions[0], // Security Engineer\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[0], // Network Engineer\n nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Adminsitrator\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[1], // Network Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[0], // Business Intern\n nextPosition: posNames.BusinessCompanyPositions[1], // Business Analyst\n baseSalary: 46,\n charismaEffectiveness: 90,\n charismaExpGain: 0.08,\n hackingEffectiveness: 10,\n hackingExpGain: 0.01,\n reqdCharisma: 1,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.BusinessCompanyPositions[1], // Business Analyst\n nextPosition: posNames.BusinessCompanyPositions[2], // Business Manager\n baseSalary: 100,\n charismaEffectiveness: 85,\n charismaExpGain: 0.15,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 51,\n reqdHacking: 6,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.BusinessCompanyPositions[2], // Business Manager\n nextPosition: posNames.BusinessCompanyPositions[3], // Operations Manager\n baseSalary: 200,\n charismaEffectiveness: 85,\n charismaExpGain: 0.3,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 101,\n reqdHacking: 51,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[3], // Operations Manager\n nextPosition: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n baseSalary: 660,\n charismaEffectiveness: 85,\n charismaExpGain: 0.4,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 226,\n reqdHacking: 51,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n nextPosition: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n baseSalary: 1950,\n charismaEffectiveness: 90,\n charismaExpGain: 1,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 501,\n reqdHacking: 76,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n nextPosition: null,\n baseSalary: 3900,\n charismaEffectiveness: 90,\n charismaExpGain: 1.5,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 751,\n reqdHacking: 101,\n reqdReputation: 3.2e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SecurityCompanyPositions[0], // Police Officer\n nextPosition: posNames.SecurityCompanyPositions[1], // Police Chief\n baseSalary: 82,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.04,\n reqdHacking: 11,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[1], // Police Chief\n nextPosition: null,\n baseSalary: 460,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.1,\n reqdHacking: 101,\n reqdStrength: 301,\n reqdDefense: 301,\n reqdDexterity: 301,\n reqdAgility: 301,\n reqdCharisma: 151,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[2], // Security Guard\n nextPosition: posNames.SecurityCompanyPositions[3], // Security Officer\n baseSalary: 50,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.01,\n strengthExpGain: 0.04,\n defenseExpGain: 0.04,\n dexterityExpGain: 0.04,\n agilityExpGain: 0.04,\n charismaExpGain: 0.02,\n reqdStrength: 51,\n reqdDefense: 51,\n reqdDexterity: 51,\n reqdAgility: 51,\n reqdCharisma: 1,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[3], // Security Officer\n nextPosition: posNames.SecurityCompanyPositions[4], // Security Supervisor\n baseSalary: 195,\n hackingEffectiveness: 10,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 10,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.05,\n reqdHacking: 26,\n reqdStrength: 151,\n reqdDefense: 151,\n reqdDexterity: 151,\n reqdAgility: 151,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SecurityCompanyPositions[4], // Security Supervisor\n nextPosition: posNames.SecurityCompanyPositions[5], // Head of Security\n baseSalary: 660,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.02,\n strengthExpGain: 0.12,\n defenseExpGain: 0.12,\n dexterityExpGain: 0.12,\n agilityExpGain: 0.12,\n charismaExpGain: 0.1,\n reqdHacking: 26,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 101,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[5], // Head of Security\n nextPosition: null,\n baseSalary: 1320,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.05,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.15,\n reqdHacking: 51,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 151,\n reqdReputation: 144e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.AgentCompanyPositions[0], // Field Agent\n nextPosition: posNames.AgentCompanyPositions[1], // Secret Agent\n baseSalary: 330,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 20,\n hackingExpGain: 0.04,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.05,\n reqdHacking: 101,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 101,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.AgentCompanyPositions[1], // Secret Agent\n nextPosition: posNames.AgentCompanyPositions[2], // Special Operative\n baseSalary: 990,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.1,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.1,\n reqdHacking: 201,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 201,\n reqdReputation: 32e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.AgentCompanyPositions[2], // Special Operative\n nextPosition: null,\n baseSalary: 2000,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.15,\n strengthExpGain: 0.2,\n defenseExpGain: 0.2,\n dexterityExpGain: 0.2,\n agilityExpGain: 0.2,\n charismaExpGain: 0.15,\n reqdHacking: 251,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 251,\n reqdReputation: 162e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.MiscCompanyPositions[0], // Waiter\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.05,\n repMultiplier: 1,\n },\n {\n name: posNames.MiscCompanyPositions[1], // Employee\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[0], // Software Consultant\n nextPosition: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n baseSalary: 66,\n hackingEffectiveness: 80,\n charismaEffectiveness: 20,\n hackingExpGain: 0.08,\n charismaExpGain: 0.03,\n reqdHacking: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n nextPosition: null,\n baseSalary: 132,\n hackingEffectiveness: 75,\n charismaEffectiveness: 25,\n hackingExpGain: 0.25,\n charismaExpGain: 0.06,\n reqdHacking: 251,\n reqdCharisma: 51,\n repMultiplier: 1.2,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[0], // Business Consultant\n nextPosition: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n baseSalary: 66,\n hackingEffectiveness: 20,\n charismaEffectiveness: 80,\n hackingExpGain: 0.015,\n charismaExpGain: 0.15,\n reqdHacking: 6,\n reqdCharisma: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n nextPosition: null,\n baseSalary: 525,\n hackingEffectiveness: 15,\n charismaEffectiveness: 85,\n hackingExpGain: 0.015,\n charismaExpGain: 0.3,\n reqdHacking: 51,\n reqdCharisma: 226,\n repMultiplier: 1.2,\n },\n {\n name: posNames.PartTimeCompanyPositions[0], // Part-time waiter\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.PartTimeCompanyPositions[1], // Part-time employee\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.03,\n repMultiplier: 1,\n },\n];\n","import { Player } from \"../Player\";\nimport { Script } from \"../Script/Script\";\nimport { GetAllServers } from \"../Server/AllServers\";\n\nconst detect: [string, string][] = [\n [\"getHackTime\", \"returns milliseconds\"],\n [\"getGrowTime\", \"returns milliseconds\"],\n [\"getWeakenTime\", \"returns milliseconds\"],\n [\"getActionTime\", \"returns milliseconds\"],\n [\"hackAnalyzePercent\", \"renamed 'hackAnalyze' and returns decimal\"],\n [\"hackChance\", \"renamed 'hackAnalyzeChance'\"],\n [\"basic.calculateSkill\", \"renamed 'skills.calculateSkill'\"],\n [\"basic.calculateExp\", \"renamed 'skills.calculateExp'\"],\n [\"basic.hackChance\", \"renamed 'hacking.hackChance'\"],\n [\"basic.hackExp\", \"renamed 'hacking.hackExp'\"],\n [\"basic.hackPercent\", \"renamed 'hacking.hackPercent'\"],\n [\"basic.growPercent\", \"renamed 'hacking.growPercent'\"],\n [\"basic.hackTime\", \"renamed 'hacking.hackTime'\"],\n [\"basic.growTime\", \"renamed 'hacking.growTime'\"],\n [\"basic.weakenTime\", \"renamed 'hacking.weakenTime'\"],\n [\"write\", \"needs to be awaited\"],\n [\"scp\", \"needs to be awaited\"],\n [\"sleep\", \"Can no longer be called simultenaously.\"],\n [\"hacking_skill\", \"renamed 'hacking'\"],\n [\"tryWrite\", \"renamed 'tryWritePort'\"],\n];\n\nconst changes: [RegExp, string][] = [\n [/ns.getHackTime/g, \"((...a)=>ns.getHackTime(...a)/1000)\"],\n [/ns.getGrowTime/g, \"((...a)=>ns.getGrowTime(...a)/1000)\"],\n [/ns.getWeakenTime/g, \"((...a)=>ns.getWeakenTime(...a)/1000)\"],\n [/ns.bladeburner.getActionTime/g, \"((...a)=>ns.bladeburner.getActionTime(...a)/1000)\"],\n [/ns.hackAnalyzePercent/g, \"((...a)=>ns.hackAnalyze(...a)*100)\"],\n [/ns.hackChance/g, \"ns.hackAnalyzeChance\"],\n [/ns.tryWrite/g, \"ns.tryWritePort\"],\n [/formulas.basic.calculateSkill/g, \"formulas.skills.calculateSkill\"],\n [/formulas.basic.calculateExp/g, \"formulas.skills.calculateExp\"],\n [/formulas.basic.hackChance/g, \"formulas.hacking.hackChance\"],\n [/formulas.basic.hackExp/g, \"formulas.hacking.hackExp\"],\n [/formulas.basic.hackPercent/g, \"formulas.hacking.hackPercent\"],\n [/formulas.basic.growPercent/g, \"formulas.hacking.growPercent\"],\n [/formulas.basic.hackTime/g, \"formulas.hacking.hackTime\"],\n [/formulas.basic.growTime/g, \"formulas.hacking.growTime\"],\n [/formulas.basic.weakenTime/g, \"formulas.hacking.weakenTime\"],\n];\nfunction hasChanges(code: string): boolean {\n for (const change of changes) {\n if (code.match(change[0])) return true;\n }\n return false;\n}\n\nfunction convert(code: string): string {\n const lines = code.split(\"\\n\");\n const out: string[] = [];\n for (let i = 0; i < lines.length; i++) {\n const orig = lines[i];\n let line = lines[i];\n for (const change of changes) {\n line = line.replace(change[0], change[1]);\n }\n if (line != orig) {\n out.push(`// =============================== original line ===============================`);\n out.push(`/**`);\n out.push(` * ${orig}`);\n out.push(\" */\");\n out.push(`// =============================================================================`);\n }\n out.push(line);\n }\n return out.join(\"\\n\");\n}\n\nexport function v1APIBreak(): void {\n interface IFileLine {\n file: string;\n line: number;\n }\n let txt = \"\";\n for (const server of GetAllServers()) {\n for (const change of detect) {\n const s: IFileLine[] = [];\n for (const script of server.scripts) {\n const lines = script.code.split(\"\\n\");\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].includes(change[0])) {\n s.push({\n file: script.filename,\n line: i + 1,\n });\n }\n }\n }\n\n if (s.length === 0) continue;\n\n txt += `// Detected change ${change[0]}, reason: ${change[1]}` + \"\\n\";\n for (const fl of s) {\n txt += `${fl.file}:${fl.line}` + \"\\n\";\n }\n }\n }\n if (txt !== \"\") {\n const home = Player.getHomeComputer();\n home.writeToTextFile(\"v1_DETECTED_CHANGES.txt\", txt);\n }\n\n for (const server of GetAllServers()) {\n const backups: Script[] = [];\n for (const script of server.scripts) {\n if (!hasChanges(script.code)) continue;\n const prefix = script.filename.includes(\"/\") ? \"/BACKUP_\" : \"BACKUP_\";\n backups.push(new Script(prefix + script.filename, script.code, script.server));\n script.code = convert(script.code);\n }\n server.scripts = server.scripts.concat(backups);\n }\n}\n","/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\nimport { CityName } from \"./CityNames\";\nimport { LocationName } from \"./LocationNames\";\nimport { IConstructorParams } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nexport const LocationsMetadata: IConstructorParams[] = [\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.AevumAeroCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19,\n },\n name: LocationName.AevumBachmanAndAssociates,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55,\n },\n name: LocationName.AevumClarkeIncorporated,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 3,\n expMult: 2,\n name: LocationName.AevumCrushFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02,\n },\n name: LocationName.AevumECorp,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54,\n },\n name: LocationName.AevumFulcrumTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89,\n },\n name: LocationName.AevumGalacticCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29,\n },\n name: LocationName.AevumNetLinkTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35,\n },\n name: LocationName.AevumPolice,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.AevumRhoConstruction,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 10,\n expMult: 5,\n name: LocationName.AevumSnapFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n costMult: 4,\n expMult: 3,\n name: LocationName.AevumSummitUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85,\n },\n name: LocationName.AevumWatchdogSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n name: LocationName.AevumCasino,\n types: [LocationType.Casino],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n types: [LocationType.Company],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.IshimaNovaMedical,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2,\n },\n name: LocationName.IshimaOmegaSoftware,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4,\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38,\n },\n name: LocationName.IshimaStormTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32,\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18,\n },\n name: LocationName.NewTokyoDefComm,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5,\n },\n name: LocationName.NewTokyoNoodleBar,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52,\n },\n name: LocationName.NewTokyoVitaLife,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62,\n },\n name: LocationName.Sector12AlphaEnterprises,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2,\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59,\n },\n name: LocationName.Sector12BladeIndustries,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CIA,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66,\n },\n name: LocationName.Sector12CarmichaelSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CityHall,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12DeltaOne,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12FoodNStuff,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.Sector12FourSigma,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n expMult: 1,\n costMult: 1,\n name: LocationName.Sector12IronGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13,\n },\n name: LocationName.Sector12JoesGuns,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36,\n },\n name: LocationName.Sector12MegaCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12NSA,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.Sector12,\n costMult: 20,\n expMult: 10,\n name: LocationName.Sector12PowerhouseGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n costMult: 3,\n expMult: 2,\n name: LocationName.Sector12RothmanUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12UniversalEnergy,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59,\n },\n name: LocationName.VolhavenCompuTek,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28,\n },\n name: LocationName.VolhavenHeliosLabs,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35,\n },\n name: LocationName.VolhavenLexoCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 7,\n expMult: 4,\n name: LocationName.VolhavenMilleniumFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53,\n },\n name: LocationName.VolhavenNWO,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 5,\n expMult: 4,\n name: LocationName.VolhavenZBInstituteOfTechnology,\n types: [LocationType.University],\n },\n {\n city: null,\n name: LocationName.Hospital,\n types: [LocationType.Hospital],\n },\n {\n city: null,\n name: LocationName.Slums,\n types: [LocationType.Slums],\n },\n {\n city: null,\n name: LocationName.TravelAgency,\n types: [LocationType.TravelAgency],\n },\n {\n city: null,\n name: LocationName.WorldStockExchange,\n types: [LocationType.StockMarket],\n },\n {\n city: CityName.Chongqing,\n name: LocationName.ChongqingChurchOfTheMachineGod,\n types: [LocationType.Special],\n },\n {\n city: CityName.Ishima,\n name: LocationName.IshimaGlitch,\n types: [LocationType.Special],\n },\n];\n","import React, { useState, useEffect } from \"react\";\n\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Button from \"@mui/material/Button\";\nimport ArrowForwardIos from \"@mui/icons-material/ArrowForwardIos\";\nimport ArrowBackIos from \"@mui/icons-material/ArrowBackIos\";\nimport { ITutorialEvents } from \"./ITutorialEvents\";\nimport { CopyableText } from \"../React/CopyableText\";\n\nimport ListItem from \"@mui/material/ListItem\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\";\nimport StorageIcon from \"@mui/icons-material/Storage\";\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport {\n iTutorialPrevStep,\n iTutorialNextStep,\n ITutorial,\n iTutorialSteps,\n iTutorialEnd,\n} from \"../../InteractiveTutorial\";\n\ninterface IContent {\n content: React.ReactElement;\n canNext: boolean;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n borderBottom: \"1px solid \" + theme.palette.primary.main,\n },\n code: {\n whiteSpace: \"pre\",\n backgroundColor: theme.palette.background.paper,\n },\n }),\n);\n\nexport function InteractiveTutorialRoot(): React.ReactElement {\n const classes = useStyles();\n\n const contents: { [number: string]: IContent | undefined } = {\n [iTutorialSteps.Start as number]: {\n content: (\n <>\n \n Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian\n future... The year is 2077...\n
\n
\n This tutorial will show you the basics of the game. You may skip the tutorial at any time.\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToCharacterPage as number]: {\n content: (\n <>\n Let's start by heading to the Stats page. Click\n \n \n Stats\n \n\n on the main navigation menu (left-hand side of the screen)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.CharacterPage as number]: {\n content: (\n <>\n \n \n Stats\n \n \n shows a lot of important information about your progress, such as your skills, money, and bonuses.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.CharacterGoToTerminalPage as number]: {\n content: (\n <>\n Let's head to your computer's terminal by clicking\n \n \n Terminal\n \n on the main navigation menu.\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalIntro as number]: {\n content: (\n <>\n \n \n Terminal\n \n \n is used to interface with your home computer as well as all of the other machines around the world.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHelp as number]: {\n content: (\n <>\n Let's try it out. Start by entering\n {\"[home ~/]> help\"}\n (Don't forget to press Enter after typing the command)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalLs as number]: {\n content: (\n <>\n {\"[home ~/]> help\"}\n \n displays a list of all available Terminal commands, how to use them, and a description of what they do.{\" \"}\n
\n
\n Let's try another command. Enter\n
\n\n {\"[home ~/]> ls\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScan as number]: {\n content: (\n <>\n {\"[home ~/]> ls\"}\n \n {\" \"}\n is a basic command that shows files on the computer. Right now, it shows that you have a program called{\" \"}\n NUKE.exe on your computer. We'll get to what this does later.
\n
\n Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that\n now by first entering\n
\n {\"[home ~/]> scan\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze1 as number]: {\n content: (\n <>\n {\"[home ~/]> scan\"}\n \n shows all available network connections. In other words, it displays a list of all servers that can be\n connected to from your current machine. A server is identified by its hostname.
\n
\n That's great and all, but there's so many servers. Which one should you go to?{\" \"}\n
\n\n {\"[home ~/]> scan-analyze\"}\n gives some more detailed information about servers on the network. Try it now!\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze2 as number]: {\n content: (\n <>\n {\"[home ~/]> scan-analyze\"}\n \n shows more detailed information about each server that you can connect to (servers that are a distance of\n one node away).
\n
It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the\n following command:{\" \"}\n
\n\n {\"[home ~/]> scan-analyze 2\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalConnect as number]: {\n content: (\n <>\n \n Now you can see information about all servers that are up to two nodes away, as well as figure out how to\n navigate to those servers through the network. You can only connect to a server that is one node away. To\n connect to a machine, use\n \n {\"[home ~/]> connect hostname\"}\n\n From the results of \n {\"[home ~/]> scan-analyze 2\"}\n\n \n {\" \"}\n we can see that the n00dles server is only one node away. Let's connect so it now using:\n \n\n {\"[home ~/]> connect n00dles\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalAnalyze as number]: {\n content: (\n <>\n \n You are now connected to another machine! What can you do now? You can hack it!\n
\n
In the year 2077, currency has become digital and decentralized. People and corporations store their\n money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain\n experience.
\n
\n Before you try to hack a server, you should run diagnostics using{\" \"}\n
\n {\"[n00dles ~/]> analyze\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalNuke as number]: {\n content: (\n <>\n When \n {\"[n00dles ~/]> analyze\"}\n\n \n finishes running it will show useful information about hacking the server.
\n
For this server, the required hacking skill is only 1, which means you can hack it right now.\n However, in order to hack a server you must first gain root access. The NUKE.exe program that we saw earlier\n on your home computer is a virus that will grant you root access to a machine if there are enough open\n ports.\n
\n {\"[n00dles ~/]> analyze\"}\n\n \n {\" \"}\n shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead\n and run the virus using{\" \"}\n \n {\"[n00dles ~/]> run NUKE.exe\"}\n\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalManualHack as number]: {\n content: (\n <>\n You now have root access! You can hack the server using \n {\"[n00dles ~/]> hack\"}\n\n Try doing that now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHackingMechanics as number]: {\n content: (\n \n You are now attempting to hack the server. Performing a hack takes time and only has a certain percentage\n chance of success. This time and success chance is determined by a variety of factors, including your hacking\n skill and the server's security level.\n
\n
\n If your attempt to hack the server is successful, you will steal a certain percentage of the server's total\n money. This percentage is affected by your hacking skill and the server's security level.\n
\n
\n The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money,\n then you will encounter diminishing returns in your hacking. You will need to use{\" \"}\n {\"[n00dles ~/]> grow\"}\n and {\"[n00dles ~/]> weaken\"}\n
\n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalGoHome as number]: {\n content: (\n <>\n From any server you can get back home using\n {\"[n00dles ~/]> home\"}\n\n Let's head home before creating our first script!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalCreateScript as number]: {\n content: (\n <>\n \n Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be\n hacking manually the entire time. You can automate your hacking by writing scripts!\n
\n
\n To create a new script or edit an existing one, you can use{\" \"}\n
\n {\"[home ~/]> nano\"}\n\n Scripts must end with the .script extension. Let's make a script now by entering \n {\"[home ~/]> nano n00dles.script\"}\n\n \n after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTypeScript as number]: {\n content: (\n <>\n \n This is the script editor. You can use it to program your scripts. Scripts are written in a simplified\n version of javascript. Copy and paste the following code into the script editor:
\n
\n\n \n \n \n \n For anyone with basic programming experience, this code should be straightforward. This script will\n continuously hack the n00dles server.\n
\n
\n If you're an intermediate programmer you should use ns2 instead. It is much faster and offers more\n possibilities.\n
\n
\n To save and close the script editor, press the button in the bottom left, or press ctrl + b.\n
\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalFree as number]: {\n content: (\n <>\n \n Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine\n which you have root access to. Different servers have different amounts of RAM. You can also purchase more\n RAM for your home server.\n
\n
\n To check how much RAM is available on this machine, enter\n
\n {\"[home ~/]> free\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalRunScript as number]: {\n content: (\n <>\n \n We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using\n \n {\"[home ~/]> run n00dles.script\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalGoToActiveScriptsPage as number]: {\n content: (\n <>\n \n Your script is now running! It will continuously run in the background and will automatically stop if the\n code ever completes (the n00dles.script will never complete because it runs an infinite loop).
\n
\n These scripts can passively earn you income and hacking experience. Your scripts will also earn money and\n experience while you are offline, although at a slightly slower rate.
\n
\n Let's check out some statistics for our running scripts by clicking{\" \"}\n
\n \n \n Active Scripts\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsPage as number]: {\n content: (\n <>\n \n This page displays information about all of your scripts that are running across every server. You can use\n this to gauge how well your scripts are doing. Let's go back to\n \n \n \n Terminal\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsToTerminal as number]: {\n content: (\n <>\n \n One last thing about scripts, each active script contains logs that detail what it's doing. We can check\n these logs using the tail command. Do that now for the script we just ran by typing{\" \"}\n \n {\"[home ~/]> tail n00dles.script\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTailScript as number]: {\n content: (\n <>\n \n The log for this script won't show much right now (it might show nothing at all) because it just started\n running...but check back again in a few minutes!
\n
\n This covers the basics of hacking. To learn more about writing scripts, select\n
\n \n \n Tutorial\n \n \n in the main navigation menu to look at the documentation. If you are an experienced JavaScript developer, I\n would highly suggest you check out the section on NetscriptJS/Netscript 2.0, it's faster and more powerful.\n
\n
\n For now, let's move on to something else!\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToHacknetNodesPage as number]: {\n content: (\n <>\n \n Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and\n upgrading Hacknet Nodes. Let's go to\n \n \n \n Hacknet\n \n through the main navigation menu now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesIntroduction as number]: {\n content: (\n \n Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesGoToWorldPage as number]: {\n content: (\n <>\n \n You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online\n and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.\n
\n
\n Let's go to\n
\n \n \n City\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.WorldDescription as number]: {\n content: (\n <>\n \n This page lists all of the different locations you can currently travel to. Each location has something that\n you can do. There's a lot of content out in the world, make sure you explore and discover!\n
\n
\n Lastly, click on\n
\n \n \n Tutorial\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TutorialPageInfo as number]: {\n content: (\n \n This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot,\n but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the\n tutorial. Hope you enjoy the game!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.End as number]: {\n content: ,\n canNext: true,\n },\n };\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n const step = ITutorial.currStep;\n const content = contents[step];\n if (content === undefined) throw new Error(\"error in the tutorial\");\n return (\n \n {content.content}\n {step !== iTutorialSteps.TutorialPageInfo && (\n <>\n \n \n \n {content.canNext && (\n \n \n \n )}\n \n )}\n
\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Fab from \"@mui/material/Fab\";\nimport Paper from \"@mui/material/Paper\";\nimport VisibilityOffIcon from \"@mui/icons-material/VisibilityOff\";\nimport VisibilityIcon from \"@mui/icons-material/Visibility\";\nimport { use } from \"../Context\";\nimport { Page } from \"../Router\";\n\nconst useStyles = makeStyles({\n visibilityToggle: {\n backgroundColor: \"transparent\",\n position: \"absolute\",\n top: \"100%\",\n right: 0,\n },\n overviewContainer: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500,\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\",\n },\n});\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n}\n\nexport function Overview({ children }: IProps): React.ReactElement {\n const [open, setOpen] = useState(true);\n const classes = useStyles();\n const router = use.Router();\n if (router.page() === Page.BitVerse || router.page() === Page.Loading || router.page() === Page.Recovery)\n return <>;\n let icon;\n if (open) {\n icon = ;\n } else {\n icon = ;\n }\n\n return (\n \n {children}\n setOpen((old) => !old)}>\n {icon}\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport clsx from \"clsx\";\nimport { styled, Theme, CSSObject } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport List from \"@mui/material/List\";\nimport Divider from \"@mui/material/Divider\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Typography from \"@mui/material/Typography\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Badge from \"@mui/material/Badge\";\n\nimport ComputerIcon from \"@mui/icons-material/Computer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\"; // Terminal\nimport CreateIcon from \"@mui/icons-material/Create\"; // Create Script\nimport StorageIcon from \"@mui/icons-material/Storage\"; // Active Scripts\nimport BugReportIcon from \"@mui/icons-material/BugReport\"; // Create Program\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\"; // Stats\nimport ContactsIcon from \"@mui/icons-material/Contacts\"; // Factions\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\"; // Augmentations\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\"; // Hacknet\nimport PeopleAltIcon from \"@mui/icons-material/PeopleAlt\"; // Sleeves\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\"; // City\nimport AirplanemodeActiveIcon from \"@mui/icons-material/AirplanemodeActive\"; // Travel\nimport WorkIcon from \"@mui/icons-material/Work\"; // Job\nimport TrendingUpIcon from \"@mui/icons-material/TrendingUp\"; // Stock Market\nimport FormatBoldIcon from \"@mui/icons-material/FormatBold\"; // Bladeburner\nimport BusinessIcon from \"@mui/icons-material/Business\"; // Corp\nimport SportsMmaIcon from \"@mui/icons-material/SportsMma\"; // Gang\nimport CheckIcon from \"@mui/icons-material/Check\"; // Milestones\nimport HelpIcon from \"@mui/icons-material/Help\"; // Tutorial\nimport SettingsIcon from \"@mui/icons-material/Settings\"; // options\nimport DeveloperBoardIcon from \"@mui/icons-material/DeveloperBoard\"; // Dev\nimport AccountBoxIcon from \"@mui/icons-material/AccountBox\";\nimport PublicIcon from \"@mui/icons-material/Public\";\nimport LiveHelpIcon from \"@mui/icons-material/LiveHelp\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { IRouter, Page } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../../InteractiveTutorial\";\nimport { getAvailableCreatePrograms } from \"../../Programs/ProgramHelpers\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { redPillFlag } from \"../../RedPill\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { ProgramsSeen } from \"../../Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"../../Faction/ui/FactionsRoot\";\n\nconst openedMixin = (theme: Theme): CSSObject => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen,\n }),\n overflowX: \"hidden\",\n});\n\nconst closedMixin = (theme: Theme): CSSObject => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen,\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`,\n },\n});\n\nconst Drawer = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== \"open\" })(({ theme, open }) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n }),\n ...(!open && {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n }),\n}));\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main,\n },\n listitem: {},\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n page: Page;\n}\n\nexport function SidebarRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const [hackingOpen, setHackingOpen] = useState(true);\n const [characterOpen, setCharacterOpen] = useState(true);\n const [worldOpen, setWorldOpen] = useState(true);\n const [helpOpen, setHelpOpen] = useState(true);\n\n const flashTerminal =\n ITutorial.currStep === iTutorialSteps.CharacterGoToTerminalPage ||\n ITutorial.currStep === iTutorialSteps.ActiveScriptsPage;\n\n const flashStats = ITutorial.currStep === iTutorialSteps.GoToCharacterPage;\n\n const flashActiveScripts = ITutorial.currStep === iTutorialSteps.TerminalGoToActiveScriptsPage;\n\n const flashHacknet = ITutorial.currStep === iTutorialSteps.GoToHacknetNodesPage;\n\n const flashCity = ITutorial.currStep === iTutorialSteps.HacknetNodesGoToWorldPage;\n\n const flashTutorial = ITutorial.currStep === iTutorialSteps.WorldDescription;\n\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.filter((f) => !InvitationsSeen.includes(f)).length;\n const programCount = getAvailableCreatePrograms(props.player).length - ProgramsSeen.length;\n const canCreateProgram =\n getAvailableCreatePrograms(props.player).length > 0 ||\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenFactions =\n props.player.factionInvitations.length > 0 ||\n props.player.factions.length > 0 ||\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenAugmentations =\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenSleeves = props.player.sleeves.length > 0;\n\n const canCorporation = !!(props.player.corporation as any);\n const canGang = !!(props.player.gang as any);\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!(props.player.bladeburner as any);\n const canStaneksGift = props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1);\n\n function clickTerminal(): void {\n props.router.toTerminal();\n if (flashTerminal) iTutorialNextStep();\n }\n\n function clickScriptEditor(): void {\n props.router.toScriptEditor();\n }\n\n function clickStats(): void {\n props.router.toStats();\n if (flashStats) iTutorialNextStep();\n }\n\n function clickActiveScripts(): void {\n props.router.toActiveScripts();\n if (flashActiveScripts) iTutorialNextStep();\n }\n\n function clickCreateProgram(): void {\n props.router.toCreateProgram();\n }\n\n function clickStaneksGift(): void {\n props.router.toStaneksGift();\n }\n\n function clickFactions(): void {\n props.router.toFactions();\n }\n\n function clickAugmentations(): void {\n props.router.toAugmentations();\n }\n\n function clickSleeves(): void {\n props.router.toSleeves();\n }\n\n function clickHacknet(): void {\n props.router.toHacknetNodes();\n if (flashHacknet) iTutorialNextStep();\n }\n\n function clickCity(): void {\n props.router.toCity();\n if (flashCity) iTutorialNextStep();\n }\n\n function clickTravel(): void {\n props.router.toTravel();\n }\n\n function clickJob(): void {\n props.router.toJob();\n }\n\n function clickStockMarket(): void {\n props.router.toStockMarket();\n }\n\n function clickBladeburner(): void {\n props.router.toBladeburner();\n }\n\n function clickCorp(): void {\n props.router.toCorporation();\n }\n\n function clickGang(): void {\n props.router.toGang();\n }\n\n function clickTutorial(): void {\n props.router.toTutorial();\n if (flashTutorial) iTutorialNextStep();\n }\n\n function clickMilestones(): void {\n props.router.toMilestones();\n }\n function clickOptions(): void {\n props.router.toGameOptions();\n }\n\n function clickDev(): void {\n props.router.toDevMenu();\n }\n\n useEffect(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(this: Document, event: KeyboardEvent): any {\n if (Settings.DisableHotkeys) return;\n if (props.player.isWorking || redPillFlag) return;\n if (event.keyCode == KEY.T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.keyCode === KEY.C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.keyCode === KEY.E && event.altKey) {\n event.preventDefault();\n clickScriptEditor();\n } else if (event.keyCode === KEY.S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.keyCode === KEY.H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.keyCode === KEY.W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.keyCode === KEY.J && event.altKey) {\n event.preventDefault();\n clickJob();\n } else if (event.keyCode === KEY.R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.keyCode === KEY.P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.keyCode === KEY.F && event.altKey) {\n if (props.page == Page.Terminal && Settings.EnableBashHotkeys) {\n return;\n }\n event.preventDefault();\n clickFactions();\n } else if (event.keyCode === KEY.A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.keyCode === KEY.U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.keyCode === KEY.B && event.altKey) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.keyCode === KEY.G && event.altKey) {\n event.preventDefault();\n clickGang();\n }\n // if (event.keyCode === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n }\n\n document.addEventListener(\"keypress\", handleShortcuts);\n return () => document.removeEventListener(\"keypress\", handleShortcuts);\n }, []);\n\n const classes = useStyles();\n const [open, setOpen] = useState(true);\n const toggleDrawer = (): void => setOpen((old) => !old);\n return (\n \n \n \n {!open ? : }\n \n Bitburner v{CONSTANTS.VersionString}} />\n \n \n \n setHackingOpen((old) => !old)}>\n \n \n \n Hacking} />\n {hackingOpen ? : }\n \n \n \n \n \n \n \n \n \n Terminal\n \n \n \n \n \n \n \n \n \n Script Editor\n \n \n \n \n \n \n \n \n \n Active Scripts\n \n \n \n {canCreateProgram && (\n \n \n 0 ? programCount : undefined} color=\"error\">\n \n \n \n \n \n Create Program\n \n \n \n )}\n {canStaneksGift && (\n \n \n \n \n \n \n Stanek's Gift\n \n \n \n )}\n \n \n\n \n setCharacterOpen((old) => !old)}>\n \n \n \n Character} />\n {characterOpen ? : }\n \n \n \n \n \n \n \n \n Stats\n \n \n \n {canOpenFactions && (\n \n \n \n \n \n \n \n \n Factions\n \n \n \n )}\n {canOpenAugmentations && (\n \n \n \n \n \n \n \n \n Augmentations\n \n \n \n )}\n \n \n \n \n \n \n Hacknet\n \n \n \n {canOpenSleeves && (\n \n \n \n \n \n Sleeves\n \n \n )}\n \n\n \n setWorldOpen((old) => !old)}>\n \n \n \n World} />\n {worldOpen ? : }\n \n \n \n \n \n \n \n \n City\n \n \n \n \n \n \n \n \n Travel\n \n \n {canJob && (\n \n \n \n \n \n Job\n \n \n )}\n {canStockMarket && (\n \n \n \n \n \n Stock Market\n \n \n )}\n {canBladeburner && (\n \n \n \n \n \n Bladeburner\n \n \n )}\n {canCorporation && (\n \n \n \n \n \n Corp\n \n \n )}\n {canGang && (\n \n \n \n \n \n Gang\n \n \n )}\n \n\n \n setHelpOpen((old) => !old)}>\n \n \n \n Help} />\n {helpOpen ? : }\n \n \n \n \n \n \n \n Milestones\n \n \n \n \n \n \n \n \n Tutorial\n \n \n \n \n \n \n \n \n Options\n \n \n {process.env.NODE_ENV === \"development\" && (\n \n \n \n \n \n Dev\n \n \n )}\n \n \n \n );\n}\n","/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { InstalledAugmentations } from \"./InstalledAugmentations\";\nimport { PlayerMultipliers } from \"./PlayerMultipliers\";\nimport { PurchasedAugmentations } from \"./PurchasedAugmentations\";\nimport { SourceFiles } from \"./SourceFiles\";\n\nimport { canGetBonus } from \"../../ExportBonus\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n exportGameFn: () => void;\n installAugmentationsFn: () => void;\n}\n\nexport function AugmentationsRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n function doExport(): void {\n props.exportGameFn();\n rerender();\n }\n\n function exportBonusStr(): string {\n if (canGetBonus()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n return (\n <>\n Augmentations\n \n \n Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to\n install them.\n \n WARNING: Installing your Augmentations resets most of your progress, including:\n
\n - Stats/Skill levels and Experience\n - Money\n - Scripts on every computer but your home computer\n - Purchased servers\n - Hacknet Nodes\n - Faction/Company reputation\n - Stocks\n
\n \n Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations\n you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you\n will lose all programs besides NUKE.exe)\n \n
\n \n Purchased Augmentations\n \n \n 'I never asked for this'}>\n \n \n \n \n It's always a good idea to backup/export your save!}>\n \n \n \n \n Installed Augmentations\n \n \n List of all Augmentations that have been installed. You have gained the effects of these.\n \n \n \n \n \n \n );\n}\n","/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\nimport React, { useState } from \"react\";\n\nimport { AugmentationAccordion } from \"../../ui/React/AugmentationAccordion\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../../ui/Context\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport List from \"@mui/material/List\";\n\nexport function InstalledAugmentations(): React.ReactElement {\n const setRerender = useState(true)[1];\n const player = use.Player();\n\n const sourceAugs = player.augmentations.slice();\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name <= aug2.name ? -1 : 1;\n });\n }\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function sortByAcquirementTime(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.AcquirementTime;\n rerender();\n }\n\n function sortInOrder(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.Alphabetically;\n rerender();\n }\n\n return (\n <>\n \n \n \n \n \n \n \n {sourceAugs.map((e) => {\n const aug = Augmentations[e.name];\n\n let level = null;\n if (e.name === AugmentationNames.NeuroFluxGovernor) {\n level = e.level;\n }\n\n return ;\n })}\n \n \n );\n}\n","/**\n * React component for displaying the player's multipliers on the Augmentation UI page\n */\nimport * as React from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Augmentations } from \"../Augmentations\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\n\nfunction calculateAugmentedStats(): any {\n const augP: any = {};\n for (const aug of Player.queuedAugmentations) {\n const augObj = Augmentations[aug.name];\n for (const mult in augObj.mults) {\n const v = augP[mult] ? augP[mult] : 1;\n augP[mult] = v * augObj.mults[mult];\n }\n }\n return augP;\n}\n\nfunction Improvements({ r }: { r: number }): React.ReactElement {\n if (r) {\n return (\n <>\n \n  {\"=>\"} \n \n \n {numeralWrapper.formatPercentage(r)}\n \n \n );\n }\n return <>;\n}\n\nfunction MultiplierTable({ rows }: { rows: [string, number, number][] }): React.ReactElement {\n return (\n \n \n {rows.map((r: any) => (\n \n \n {r[0]} multiplier: \n \n \n {numeralWrapper.formatPercentage(r[1])}\n \n \n \n ))}\n \n
\n );\n}\n\nexport function PlayerMultipliers(): React.ReactElement {\n const mults = calculateAugmentedStats();\n\n function BladeburnerMults(): React.ReactElement {\n if (!Player.canAccessBladeburner()) return <>;\n return (\n <>\n \n
\n \n );\n }\n\n return (\n <>\n Multipliers\n \n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n \n );\n}\n","/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\nimport * as React from \"react\";\n\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Player } from \"../../Player\";\n\nimport { AugmentationAccordion } from \"../../ui/React/AugmentationAccordion\";\nimport List from \"@mui/material/List\";\n\nexport function PurchasedAugmentations(): React.ReactElement {\n const augs: React.ReactElement[] = [];\n // Only render the last NeuroFlux (there are no findLastIndex btw)\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; i++) {\n const ownedAug = Player.queuedAugmentations[i];\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = Augmentations[ownedAug.name];\n let level = null;\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ownedAug.level;\n }\n\n augs.push();\n }\n\n return {augs};\n}\n","import React from \"react\";\nimport { SourceFileMinus1 } from \"./SourceFileMinus1\";\nimport { OwnedSourceFiles } from \"./OwnedSourceFiles\";\nimport List from \"@mui/material/List\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\n\nexport function SourceFiles(): React.ReactElement {\n return (\n <>\n Source Files\n \n \n \n \n \n \n \n );\n}\n","/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\nimport React, { useState } from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { Exploit, ExploitName } from \"../../Exploits/Exploit\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\nexport function SourceFileMinus1(): React.ReactElement {\n const [open, setOpen] = useState(false);\n const exploits = Player.exploits;\n\n if (exploits.length === 0) {\n return <>;\n }\n\n return (\n \n setOpen((old) => !old)}>\n \n Source-File -1: Exploits in the BitNodes\n
\n Level {exploits.length} / {Object.keys(Exploit).length}\n \n }\n />\n {open ? : }\n
\n \n \n \n This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\n \n It increases all of the player's multipliers by 0.1%\n
\n\n You have found the following exploits:\n \n {exploits.map((c: Exploit) => (\n * {ExploitName(c)}\n ))}\n \n
\n
\n
\n );\n}\n","/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\nimport * as React from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\n\nimport { SourceFileAccordion } from \"../../ui/React/SourceFileAccordion\";\n\nexport function OwnedSourceFiles(): React.ReactElement {\n const sourceSfs = Player.sourceFiles.slice();\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n return (\n <>\n {sourceSfs.map((e) => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = SourceFiles[srcFileKey];\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return ;\n })}\n \n );\n}\n","/**\n * React Component for displaying a single Source-File as an accordion.\n *\n * The header of the accordion contains the Source-Files's name and level,\n * and the accordion's panel contains the Source-File's description.\n */\nimport React, { useState } from \"react\";\n\nimport { SourceFile } from \"../../SourceFile/SourceFile\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\ntype IProps = {\n level: number;\n sf: SourceFile;\n};\n\nexport function SourceFileAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const maxLevel = props.sf.n === 12 ? \"∞\" : \"3\";\n\n return (\n \n setOpen((old) => !old)}>\n \n {props.sf.name}\n
\n {`Level ${props.level} / ${maxLevel}`}\n \n }\n />\n {open ? : }\n
\n \n \n {props.sf.info}\n \n \n
\n );\n}\n","import { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { IEngine } from \"./IEngine\";\nimport { IRouter } from \"./ui/Router\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\n\nimport React from \"react\";\n\nimport { General } from \"./DevMenu/ui/General\";\nimport { Stats } from \"./DevMenu/ui/Stats\";\nimport { Factions } from \"./DevMenu/ui/Factions\";\nimport { Augmentations } from \"./DevMenu/ui/Augmentations\";\nimport { SourceFiles } from \"./DevMenu/ui/SourceFiles\";\nimport { Programs } from \"./DevMenu/ui/Programs\";\nimport { Servers } from \"./DevMenu/ui/Servers\";\nimport { Companies } from \"./DevMenu/ui/Companies\";\nimport { Bladeburner as BladeburnerElem } from \"./DevMenu/ui/Bladeburner\";\nimport { Gang } from \"./DevMenu/ui/Gang\";\nimport { Corporation } from \"./DevMenu/ui/Corporation\";\nimport { CodingContracts } from \"./DevMenu/ui/CodingContracts\";\nimport { StockMarket } from \"./DevMenu/ui/StockMarket\";\nimport { Sleeves } from \"./DevMenu/ui/Sleeves\";\nimport { Stanek } from \"./DevMenu/ui/Stanek\";\nimport { TimeSkip } from \"./DevMenu/ui/TimeSkip\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n router: IRouter;\n}\n\nexport function DevMenuRoot(props: IProps): React.ReactElement {\n return (\n <>\n Development Menu - Only meant to be used for testing/debugging\n \n \n \n \n \n \n \n \n\n {props.player.bladeburner instanceof Bladeburner && }\n\n {props.player.inGang() && }\n\n {props.player.hasCorporation() && }\n\n \n\n {props.player.hasWseAccount && }\n\n {props.player.sleeves.length > 0 && }\n {props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && }\n\n \n \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function General(props: IProps): React.ReactElement {\n function addMoney(n: number) {\n return function () {\n props.player.gainMoney(n, \"other\");\n };\n }\n\n function upgradeRam(): void {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3(): void {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3(): void {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, false);\n }\n\n return (\n \n }>\n General\n \n \n \n \n \n \n \n \n
\n\n \n \n \n \n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n function modifyExp(stat: string, modifier: number) {\n return function (exp: number) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n break;\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n break;\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n break;\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n break;\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n break;\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n break;\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier: number) {\n return function (amt: number) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp(): void {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp(): void {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat: string): () => void {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma(): () => void {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence(): void {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence(): void {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return (\n \n }>\n Experience / Stats\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n All:\n \n \n \n
\n Hacking:\n \n modifyExp(\"hacking\", 1)(bigNumber)}\n add={modifyExp(\"hacking\", 1)}\n subtract={modifyExp(\"hacking\", -1)}\n reset={resetExperience(\"hacking\")}\n />\n
\n Strength:\n \n modifyExp(\"strength\", 1)(bigNumber)}\n add={modifyExp(\"strength\", 1)}\n subtract={modifyExp(\"strength\", -1)}\n reset={resetExperience(\"strength\")}\n />\n
\n Defense:\n \n modifyExp(\"defense\", 1)(bigNumber)}\n add={modifyExp(\"defense\", 1)}\n subtract={modifyExp(\"defense\", -1)}\n reset={resetExperience(\"defense\")}\n />\n
\n Dexterity:\n \n modifyExp(\"dexterity\", 1)(bigNumber)}\n add={modifyExp(\"dexterity\", 1)}\n subtract={modifyExp(\"dexterity\", -1)}\n reset={resetExperience(\"dexterity\")}\n />\n
\n Agility:\n \n modifyExp(\"agility\", 1)(bigNumber)}\n add={modifyExp(\"agility\", 1)}\n subtract={modifyExp(\"agility\", -1)}\n reset={resetExperience(\"agility\")}\n />\n
\n Charisma:\n \n modifyExp(\"charisma\", 1)(bigNumber)}\n add={modifyExp(\"charisma\", 1)}\n subtract={modifyExp(\"charisma\", -1)}\n reset={resetExperience(\"charisma\")}\n />\n
\n Intelligence:\n \n modifyExp(\"intelligence\", 1)(bigNumber)}\n add={modifyExp(\"intelligence\", 1)}\n subtract={modifyExp(\"intelligence\", -1)}\n reset={resetExperience(\"intelligence\")}\n />\n \n \n \n \n
\n Karma:\n \n modifyExp(\"intelligence\", 1)(100000)}\n add={modifyKarma(1)}\n subtract={modifyKarma(-1)}\n reset={resetKarma()}\n />\n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Factions as AllFaction } from \"../../Faction/Factions\";\nimport FormControl from \"@mui/material/FormControl\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport InputLabel from \"@mui/material/InputLabel\";\n\nconst bigNumber = 1e12;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Factions(props: IProps): React.ReactElement {\n const [faction, setFaction] = useState(\"Illuminati\");\n\n function setFactionDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value as string);\n }\n\n function receiveInvite(): void {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites(): void {\n for (const i in AllFaction) {\n props.player.receiveInvite(AllFaction[i].name);\n }\n }\n\n function modifyFactionRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep(): void {\n for (const i in AllFaction) {\n AllFaction[i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep(): void {\n for (const i in AllFaction) {\n AllFaction[i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor(): void {\n for (const i in AllFaction) {\n AllFaction[i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor(): void {\n for (const i in AllFaction) {\n AllFaction[i].favor = 0;\n }\n }\n\n return (\n \n }>\n Factions\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Faction:\n \n \n Faction\n \n \n \n \n \n \n \n \n }\n >\n {Object.values(AllFaction).map((faction) => (\n \n {faction.name}\n \n ))}\n \n \n
\n Reputation:\n \n modifyFactionRep(1)(bigNumber)}\n add={modifyFactionRep(1)}\n subtract={modifyFactionRep(-1)}\n reset={resetFactionRep}\n />\n
\n Favor:\n \n modifyFactionFavor(1)(2000)}\n add={modifyFactionFavor(1)}\n subtract={modifyFactionFavor(-1)}\n reset={resetFactionFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Augmentations(props: IProps): React.ReactElement {\n const [augmentation, setAugmentation] = useState(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event: SelectChangeEvent): void {\n setAugmentation(event.target.value as string);\n }\n function queueAug(): void {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs(): void {\n for (const augName of Object.values(AugmentationNames)) {\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs(): void {\n props.player.augmentations = [];\n }\n\n return (\n \n }>\n Augmentations\n \n \n \n \n \n \n \n \n \n
\n Aug:\n \n \n \n \n \n \n \n \n \n }\n endAdornment={\n <>\n \n \n \n \n }\n >\n {Object.values(AugmentationNames).map((aug) => (\n \n {aug}\n \n ))}\n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { PlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\n\n// Update as additional BitNodes get implemented\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function SourceFiles(props: IProps): React.ReactElement {\n function setSF(sfN: number, sfLvl: number) {\n return function () {\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter((sf) => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some((sf) => sf.n === sfN)) {\n props.player.sourceFiles.push(new PlayerOwnedSourceFile(sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl: number) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits(): void {\n props.player.exploits = [];\n }\n\n return (\n \n }>\n Source-Files\n \n \n \n \n \n \n \n \n \n \n \n \n {validSFN.map((i) => (\n \n \n \n \n ))}\n \n
\n Exploits:\n \n \n
\n All:\n \n \n \n \n \n \n \n
\n SF-{i}:\n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Programs as AllPrograms } from \"../../Programs/Programs\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Programs(props: IProps): React.ReactElement {\n const [program, setProgram] = useState(\"NUKE.exe\");\n function setProgramDropdown(event: SelectChangeEvent): void {\n setProgram(event.target.value as string);\n }\n function addProgram(): void {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms(): void {\n for (const i in AllPrograms) {\n if (!props.player.hasProgram(AllPrograms[i].name)) {\n props.player.getHomeComputer().programs.push(AllPrograms[i].name);\n }\n }\n }\n\n return (\n \n }>\n Programs\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Program:\n \n \n
\n Add:\n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { GetServer, GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\nexport function Servers(): React.ReactElement {\n const [server, setServer] = useState(\"home\");\n function setServerDropdown(event: SelectChangeEvent): void {\n setServer(event.target.value as string);\n }\n function rootServer(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n }\n\n function maxMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n }\n\n return (\n \n }>\n Servers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Server:\n \n \n
\n Root:\n \n \n \n \n
\n Security:\n \n \n \n \n
\n Money:\n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Companies as AllCompanies } from \"../../Company/Companies\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { Adjuster } from \"./Adjuster\";\n\nconst bigNumber = 1e12;\n\nexport function Companies(): React.ReactElement {\n const [company, setCompany] = useState(\"ECorp\");\n function setCompanyDropdown(event: SelectChangeEvent): void {\n setCompany(event.target.value as string);\n }\n function resetCompanyRep(): void {\n AllCompanies[company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor(): void {\n AllCompanies[company].favor = 0;\n }\n\n function tonsOfRepCompanies(): void {\n for (const c in AllCompanies) {\n AllCompanies[c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies(): void {\n for (const c in AllCompanies) {\n AllCompanies[c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies(): void {\n for (const c in AllCompanies) {\n AllCompanies[c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies(): void {\n for (const c in AllCompanies) {\n AllCompanies[c].favor = 0;\n }\n }\n\n return (\n \n }>\n Companies\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Company:\n \n \n
\n Reputation:\n \n modifyCompanyRep(1)(bigNumber)}\n add={modifyCompanyRep(1)}\n subtract={modifyCompanyRep(-1)}\n reset={resetCompanyRep}\n />\n
\n Favor:\n \n modifyCompanyFavor(1)(2000)}\n add={modifyCompanyFavor(1)}\n subtract={modifyCompanyFavor(-1)}\n reset={resetCompanyFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Bladeburner(props: IProps): React.ReactElement {\n const bladeburner = props.player.bladeburner;\n if (bladeburner === null) return <>;\n function modifyBladeburnerRank(modify: number): (x: number) => void {\n return function (rank: number): void {\n if (!bladeburner) return;\n bladeburner.changeRank(props.player, rank * modify);\n };\n }\n\n function resetBladeburnerRank(): void {\n if (!bladeburner) return;\n bladeburner.rank = 0;\n bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank(): void {\n if (!bladeburner) return;\n\n bladeburner.changeRank(props.player, bigNumber);\n }\n\n function modifyBladeburnerCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += cycles * modify;\n };\n }\n\n function resetBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles = 0;\n }\n\n function addTonsBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += bigNumber;\n }\n\n return (\n \n }>\n Bladeburner\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Rank:\n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Gang(props: IProps): React.ReactElement {\n function addTonsGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return (\n \n }>\n Gang\n \n \n \n \n \n \n \n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Corporation(props: IProps): React.ReactElement {\n function addTonsCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds + 1e99;\n }\n }\n\n function resetCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds - props.player.corporation.funds;\n }\n }\n\n function addTonsCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n Object.keys(div.products).forEach((prod) => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return (\n \n }>\n Corporation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
\n Cycles:\n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { generateContract, generateRandomContract, generateRandomContractOnHome } from \"../../CodingContractGenerator\";\nimport { CodingContractTypes } from \"../../CodingContracts\";\n\nexport function CodingContracts(): React.ReactElement {\n const [codingcontract, setCodingcontract] = useState(\"Find Largest Prime Factor\");\n function setCodingcontractDropdown(event: SelectChangeEvent): void {\n setCodingcontract(event.target.value as string);\n }\n\n function specificContract(): void {\n generateContract({\n problemType: codingcontract,\n server: \"home\",\n });\n }\n\n return (\n \n }>\n Coding Contracts\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
\n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { Money } from \"../../ui/React/Money\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { StockMarket as SM } from \"../../StockMarket/StockMarket\";\nimport { Stock } from \"../../StockMarket/Stock\";\n\nexport function StockMarket(): React.ReactElement {\n const [stockPrice, setStockPrice] = useState(0);\n const [stockSymbol, setStockSymbol] = useState(\"\");\n\n function setStockPriceField(event: React.ChangeEvent): void {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event: React.ChangeEvent): void {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub: (arg0: Stock) => void): void {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match: (symbol: string) => boolean = (): boolean => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol: string): boolean {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name in SM) {\n if (SM.hasOwnProperty(name)) {\n const stock = SM[name];\n if (stock instanceof Stock && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice(): void {\n if (!isNaN(stockPrice)) {\n processStocks((stock: Stock) => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps(): void {\n const stocks: JSX.Element[] = [];\n processStocks((stock: Stock) => {\n stocks.push(\n \n {stock.symbol}\n \n \n \n ,\n );\n });\n dialogBoxCreate(\n \n \n \n \n \n \n {stocks}\n \n
StockPrice cap
,\n );\n }\n return (\n \n }>\n Stock Market\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Symbol:\n \n \n
\n Price:\n \n \n \n
\n Caps:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Sleeves(props: IProps): React.ReactElement {\n function sleeveMaxAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n return (\n \n }>\n Sleeves\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Shock:\n \n \n \n \n
\n Sync:\n \n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport { staneksGift } from \"../../CotMG/Helper\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { Adjuster } from \"./Adjuster\";\n\nexport function Stanek(): React.ReactElement {\n function addCycles(): void {\n staneksGift.storedCycles = 1e6;\n }\n\n function modCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.storedCycles += cycles * modify;\n };\n }\n\n function resetCycles(): void {\n staneksGift.storedCycles = 0;\n }\n\n function addCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.avgCharge = 1e21;\n f.numCharge = 1e21;\n });\n }\n\n function modCharge(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.fragments.forEach((f) => (f.avgCharge += cycles * modify));\n };\n }\n\n function resetCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.avgCharge = 0;\n f.numCharge = 0;\n });\n }\n\n return (\n \n }>\n Stanek's Gift\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { saveObject } from \"../../SaveObject\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function TimeSkip(props: IProps): React.ReactElement {\n function timeskip(time: number) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n saveObject.saveGame();\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return (\n \n }>\n Time skip\n \n \n \n \n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Stats } from \"./Stats\";\nimport { Console } from \"./Console\";\nimport { AllPages } from \"./AllPages\";\n\nimport { use } from \"../../ui/Context\";\nimport Grid from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\n\nexport function BladeburnerRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n return (\n \n \n \n \n \n \n \n \n \n\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport { TravelModal } from \"./TravelModal\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n router: IRouter;\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n const [travelOpen, setTravelOpen] = useState(false);\n const setRerender = useState(false)[1];\n\n const inFaction = props.bladeburner.rank >= BladeburnerConstants.RankNeededForFaction;\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function openFaction(): void {\n if (!inFaction) return;\n const faction = Factions[\"Bladeburners\"];\n if (!faction.isMember) {\n joinFaction(faction);\n }\n\n props.router.toFaction(faction);\n }\n\n return (\n \n \n Your rank within the Bladeburner division.}>\n Rank: {formatNumber(props.bladeburner.rank, 2)}\n \n \n
\n \n \n Performing actions will use up your stamina.\n
\n
\n Your max stamina is determined primarily by your agility stat.\n
\n
\n Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads\n to a higher gain rate.\n
\n
\n Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of\n your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this\n means your success rate would be multipled by 85% (100 - 15).\n
\n
\n Your max stamina and stamina gain rate can also be increased by training, or through skills and\n Augmentation upgrades.\n \n }\n >\n \n Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)}\n \n \n
\n
\n \n Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}%\n \n
\n Team Size: {formatNumber(props.bladeburner.teamSize, 0)}\n Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)}\n
\n Num Times Hospitalized: {props.bladeburner.numHosp}\n \n Money Lost From Hospitalizations: \n \n
\n Current City: {props.bladeburner.city}\n \n \n This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate\n population count increases success rate estimates.\n \n }\n >\n \n Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)}\n \n \n \n
\n \n \n This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\n \n }\n >\n Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)}\n \n \n
\n \n \n The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a\n chaos level can make contracts and operations harder.\n \n }\n >\n City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)}\n \n \n
\n {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && (\n <>\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by\n browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n \n Bonus time:{\" \"}\n {convertTimeMsToTimeElapsedString(\n (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000,\n )}\n \n \n \n
\n \n )}\n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n
\n \n
\n \n Rank 25 required. : \"\"}>\n \n \n \n \n setTravelOpen(false)} bladeburner={props.bladeburner} />\n
\n );\n}\n","import React from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { Settings } from \"../../Settings/Settings\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n function travel(city: string): void {\n props.bladeburner.city = city;\n props.onClose();\n }\n\n return (\n \n <>\n \n Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in\n for your Bladeburner duties does not affect your location in the game otherwise.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Paper from \"@mui/material/Paper\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ILineProps {\n content: any;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\",\n },\n input: {\n backgroundColor: \"#000\",\n },\n nopadding: {\n padding: theme.spacing(0),\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0),\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\",\n },\n }),\n);\n\nfunction Line(props: ILineProps): React.ReactElement {\n return (\n \n {props.content}\n \n );\n}\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function Console(props: IProps): React.ReactElement {\n const classes = useStyles();\n const scrollHook = useRef(null);\n const [command, setCommand] = useState(\"\");\n const setRerender = useState(false)[1];\n\n function handleCommandChange(event: React.ChangeEvent): void {\n setCommand(event.target.value);\n }\n\n const [consoleHistoryIndex, setConsoleHistoryIndex] = useState(props.bladeburner.consoleHistory.length);\n\n // TODO: Figure out how to actually make the scrolling work correctly.\n function scrollToBottom(): void {\n if (!scrollHook.current) return;\n scrollHook.current.scrollTop = scrollHook.current.scrollHeight;\n }\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n const id2 = setInterval(scrollToBottom, 100);\n return () => {\n clearInterval(id);\n clearInterval(id2);\n };\n }, []);\n\n function handleKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) {\n event.preventDefault();\n if (command.length > 0) {\n props.bladeburner.postToConsole(\"> \" + command);\n props.bladeburner.executeConsoleCommands(props.player, command);\n setConsoleHistoryIndex(props.bladeburner.consoleHistory.length);\n setCommand(\"\");\n }\n }\n\n const consoleHistory = props.bladeburner.consoleHistory;\n\n if (event.keyCode === 38) {\n // up\n let i = consoleHistoryIndex;\n const len = consoleHistory.length;\n if (len === 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n if (i !== 0) {\n i = i - 1;\n }\n setConsoleHistoryIndex(i);\n const prevCommand = consoleHistory[i];\n event.currentTarget.value = prevCommand;\n }\n\n if (event.keyCode === 40) {\n const i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n // Latest command, put nothing\n if (i == len || i == len - 1) {\n setConsoleHistoryIndex(len);\n event.currentTarget.value = \"\";\n } else {\n setConsoleHistoryIndex(consoleHistoryIndex + 1);\n const prevCommand = consoleHistory[consoleHistoryIndex + 1];\n event.currentTarget.value = prevCommand;\n }\n }\n }\n\n return (\n \n \n \n {props.bladeburner.consoleLogs.map((log: any, i: number) => (\n \n ))}\n \n \n \n ),\n spellCheck: false,\n }}\n />\n \n
\n
\n
\n );\n}\n","import React from \"react\";\nimport { GeneralActionPage } from \"./GeneralActionPage\";\nimport { ContractPage } from \"./ContractPage\";\nimport { OperationPage } from \"./OperationPage\";\nimport { BlackOpPage } from \"./BlackOpPage\";\nimport { SkillPage } from \"./SkillPage\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function AllPages(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n {value === 3 && }\n {value === 4 && }\n \n \n );\n}\n","import * as React from \"react\";\nimport { GeneralActionList } from \"./GeneralActionList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionPage(props: IProps): React.ReactElement {\n return (\n <>\n These are generic actions that will assist you in your Bladeburner duties.\n \n \n );\n}\n","import React from \"react\";\nimport { GeneralActionElem } from \"./GeneralActionElem\";\nimport { Action } from \"../Action\";\nimport { GeneralActions } from \"../GeneralActions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionList(props: IProps): React.ReactElement {\n const actions: Action[] = [];\n for (const name in GeneralActions) {\n if (GeneralActions.hasOwnProperty(name)) {\n actions.push(GeneralActions[name]);\n }\n }\n return (\n <>\n {actions.map((action: Action) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { GeneralActions } from \"../data/GeneralActions\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function GeneralActionElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = (function (): number {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n case \"Incite Violence\":\n return 60;\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n return -1; // dead code\n })();\n const successChance =\n props.action.name === \"Recruitment\"\n ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1))\n : -1;\n\n const actionData = GeneralActions[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n \n \n \n \n )}\n
\n
\n {actionData.desc}\n
\n
\n \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n {successChance !== -1 && (\n <>\n
\n Estimated success chance: {formatNumber(successChance * 100, 1)}%\n \n )}\n
\n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const GeneralActions: {\n [key: string]: IContract | undefined;\n} = {\n Training: {\n desc: (\n <>\n Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for\n all combat stats and also increases your max stamina.\n \n ),\n },\n\n \"Field Analysis\": {\n desc: (\n <>\n Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations\n and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the\n current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Recruitment: {\n desc: (\n <>\n Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Diplomacy: {\n desc: (\n <>\n Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in\n your current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n \"Hyperbolic Regeneration Chamber\": {\n desc: (\n <>\n Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your\n wounds and slightly increase your stamina.\n
\n
\n \n ),\n },\n \"Incite Violence\": {\n desc: (\n <>\n Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate\n additional contracts and operations, at the cost of increased Chaos.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { ContractList } from \"./ContractList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you\n to lose HP, which can lead to hospitalization.\n
\n
\n You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more\n difficult, but grant more rank, experience, and money.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { ContractElem } from \"./ContractElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.contracts);\n const contracts = props.bladeburner.contracts;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Contracts } from \"../data/Contracts\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function ContractElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Contracts[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n )}\n
\n
\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Contracts remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const Contracts: {\n [key: string]: IContract | undefined;\n} = {\n Tracking: {\n desc: (\n <>\n Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT\n engage. Stealth is of the utmost importance.\n
\n
\n Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever\n city you are currently in.\n \n ),\n },\n \"Bounty Hunter\": {\n desc: (\n <>\n Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n
\n
\n Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n Retirement: {\n desc: (\n <>\n Hunt down and retire (kill) rogue Synthoids.\n
\n
\n Successfully completing a Retirement contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n};\n","import React from \"react\";\nimport { stealthIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function StealthIcon(): React.ReactElement {\n return This action involves stealth}>{stealthIcon};\n}\n","import React from \"react\";\nimport { killIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function KillIcon(): React.ReactElement {\n return This action involves retirement}>{killIcon};\n}\n","import * as React from \"react\";\nimport { OperationList } from \"./OperationList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It\n will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more\n punishing than contracts, but are also more rewarding.\n
\n
\n Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary\n between different Operations.\n
\n
\n For operations, you can use a team. You must first recruit team members. Having a larger team will improves your\n chances of success.\n
\n
\n You can unlock higher-level operations by successfully completing them. Higher-level operations are more\n difficult, but grant more rank and experience.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { OperationElem } from \"./OperationElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.operations);\n const operations = props.bladeburner.operations;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { Operation } from \"../Operation\";\nimport { Operations } from \"../data/Operations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: Operation;\n}\n\nexport function OperationElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Operations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n \n )}\n
\n
\n\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Operations remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Action } from \"../Action\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: Action;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TeamSizeModal(props: IProps): React.ReactElement {\n const [teamSize, setTeamSize] = useState();\n\n function confirmTeamSize(): void {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n if (isNaN(num) || num < 0) {\n dialogBoxCreate(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n props.onClose();\n }\n\n function onTeamSize(event: React.ChangeEvent): void {\n const x = parseFloat(event.target.value);\n if (x > props.bladeburner.teamSize) setTeamSize(props.bladeburner.teamSize);\n else setTeamSize(x);\n }\n\n return (\n \n \n Enter the amount of team members you would like to take on this Op. If you do not have the specified number of\n team members, then as many as possible will be used. Note that team members may be lost during operations.\n \n \n \n \n );\n}\n","import React from \"react\";\n\ninterface IOperation {\n desc: JSX.Element;\n}\n\nexport const Operations: {\n [key: string]: IOperation | undefined;\n} = {\n Investigation: {\n desc: (\n <>\n As a field agent, investigate and identify Synthoid populations, movements, and operations.\n
\n
\n Successful Investigation ops will increase the accuracy of your synthoid data.\n
\n
\n You will NOT lose HP from failed Investigation ops.\n \n ),\n },\n \"Undercover Operation\": {\n desc: (\n <>\n Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n
\n
\n Successful Undercover ops will increase the accuracy of your synthoid data.\n \n ),\n },\n \"Sting Operation\": {\n desc: <>Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.,\n },\n Raid: {\n desc: (\n <>\n Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your\n current city in order for this Operation to be successful.\n \n ),\n },\n \"Stealth Retirement Operation\": {\n desc: (\n <>\n Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any\n attention. Stealth and discretion are key.\n \n ),\n },\n Assassination: {\n desc: (\n <>\n Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the\n Synthoid communities.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { BlackOpList } from \"./BlackOpList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked\n successively by completing the one before it.\n
\n
\n Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.\n
\n
\n Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank\n losses.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { BlackOperations } from \"../BlackOperations\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOpElem } from \"./BlackOpElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpList(props: IProps): React.ReactElement {\n let blackops: BlackOperation[] = [];\n for (const blackopName in BlackOperations) {\n if (BlackOperations.hasOwnProperty(blackopName)) {\n blackops.push(BlackOperations[blackopName]);\n }\n }\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n\n blackops = blackops.filter(\n (blackop: BlackOperation, i: number) =>\n !(\n props.bladeburner.blackops[blackops[i].name] == null &&\n i !== 0 &&\n props.bladeburner.blackops[blackops[i - 1].name] == null\n ),\n );\n\n blackops = blackops.reverse();\n\n return (\n <>\n {blackops.map((blackop: BlackOperation) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOperations } from \"../data/BlackOperations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: BlackOperation;\n}\n\nexport function BlackOpElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n if (isCompleted) {\n return (\n \n {props.action.name} (COMPLETED)\n \n );\n }\n\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"BlackOperation\"] &&\n props.action.name === props.bladeburner.action.name;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n\n const actionData = BlackOperations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n \n ) : (\n <>\n \n\n \n \n \n )}\n\n
\n
\n {actionData.desc}\n
\n
\n \n Required Rank: {formatNumber(props.action.reqdRank, 0)}\n \n
\n \n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n
\n );\n}\n","import React from \"react\";\n\ninterface IBlackOp {\n desc: JSX.Element;\n}\n\nexport const BlackOperations: {\n [key: string]: IBlackOp | undefined;\n} = {\n \"Operation Typhoon\": {\n desc: (\n <>\n Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that\n Zenyatta, along with the rest of the PMC, is a Synthoid.\n
\n
\n The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the\n task is completed, the actions must be covered up from the general public.\n \n ),\n },\n\n \"Operation Zero\": {\n desc: (\n <>\n AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a\n supporter of Synthoid rights. He must be removed.\n
\n
\n The goal of Operation Zero is to covertly infiltrate AeroCorp and uncover any incriminating evidence or\n information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating\n evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security\n measures in the world.\n \n ),\n },\n \"Operation X\": {\n desc: (\n <>\n We have recently discovered an underground publication group called Samizdat. Even though most of their\n publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of\n their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and\n other Eastern countries.\n
\n
\n Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that\n their base of operations is in Ishima's underground sewer systems. Your task is to investigate the sewer\n systems, and eliminate Samizdat. They must never publish anything again.\n \n ),\n },\n \"Operation Titan\": {\n desc: (\n <>\n Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we\n know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to,\n but the research that they could be conducting using Titan Laboraties' vast resources is potentially very\n dangerous.\n
\n
\n Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to\n retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to\n the Synthoids and their goals.\n \n ),\n },\n \"Operation Ares\": {\n desc: (\n <>\n One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai\n between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy\n weapons. It is critical for the safety of humanity that this deal does not happen.\n
\n
\n Your task is to intercept the deal. Leave no survivors.\n \n ),\n },\n \"Operation Archangel\": {\n desc: (\n <>\n Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI\n Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms\n trafficking operation.\n
\n
\n The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the\n number of other casualties, but do what you must to complete the mission.\n \n ),\n },\n \"Operation Juggernaut\": {\n desc: (\n <>\n The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls\n himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into Sector-12. We\n also have reason to believe they tried to break into one of Universal Energy's facilities in order to cause a\n city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our\n help.\n
\n
\n Your mission is to eradicate Juggernaut and his followers.\n \n ),\n },\n \"Operation Red Dragon\": {\n desc: (\n <>\n The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they\n altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster\n their criminal activities.\n
\n
\n Your task is to infiltrate and destroy the Tetrads' base of operations in Los Angeles. Intelligence tells us\n that their base houses one of their Synthoid manufacturing units.\n \n ),\n },\n \"Operation K\": {\n desc: (\n <>\n CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology.\n This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI\n modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any\n Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would\n be catastrophic.\n
\n
\n We do not have the power or jurisdiction to shut this down through legal or political means, so we must resort\n to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its\n creation.\n \n ),\n },\n \"Operation Deckard\": {\n desc: (\n <>\n Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've\n discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the\n technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones\n from the Synthoid Uprising.\n
\n
\n The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how\n critical this mission is.\n \n ),\n },\n \"Operation Tyrell\": {\n desc: (\n <>\n A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facilities. We\n figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just\n discovered that several known MK-VI Synthoids were part of that break-in group.\n
\n
\n We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt\n down the associated Dark Army members and eliminate them.\n \n ),\n },\n \"Operation Wallace\": {\n desc: (\n <>\n Based on information gathered from Operation Tyrell, we've discovered that The Dark Army was well aware that\n there were Synthoids amongst their ranks. Even worse, we believe that The Dark Army is working together with\n other criminal organizations such as The Syndicate and that they are planning some sort of large-scale takeover\n of multiple major cities, most notably Aevum. We suspect that Synthoids have infiltrated the ranks of these\n criminal factions and are trying to stage another Synthoid uprising.\n
\n
\n The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to\n destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.\n \n ),\n },\n \"Operation Shoulder of Orion\": {\n desc: (\n <>\n China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using\n Synthoids. We believe China is trying to establish the first off-world colonies.\n
\n
\n The mission is to prevent this launch without instigating an international conflict. When you accept this\n mission you will be officially disavowed by the NSA and the national government until after you successfully\n return. In the event of failure, all of the operation's team members must not let themselves be captured alive.\n \n ),\n },\n \"Operation Hyron\": {\n desc: (\n <>\n Our intelligence tells us that Fulcrum Technologies is developing a quantum supercomputer using human brains as\n core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations\n unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means\n that the supercomputer may be able to reason abstractly and become self-aware.\n
\n
\n I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.\n
\n
\n The research for this project is being conducted at one of Fulcrum Technologies secret facilities in Aevum,\n codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the\n project lead.\n \n ),\n },\n \"Operation Morpheus\": {\n desc: (\n <>\n DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the\n people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our\n agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been\n compromised by Synthoids and is being used to spread pro-Synthoid propaganda.\n
\n
\n The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.\n \n ),\n },\n \"Operation Ion Storm\": {\n desc: (\n <>\n Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums.\n We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling\n weapons, money, and other resources. This makes them dangerous.\n
\n
\n This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.\n \n ),\n },\n \"Operation Annihilus\": {\n desc: (\n <>\n Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum.\n They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called\n 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.\n \n ),\n },\n \"Operation Ultron\": {\n desc: (\n <>\n OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in\n their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the\n destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the\n Uprising.\n
\n
\n OmniTek has also told us they they believe someone has triggered this malfunction in a large group of MK-VI\n Synthoids, and that these newly-radicalized Synthoids are now amassing in Volhaven to form a terrorist group\n called Ultron.\n
\n
\n Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making\n moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).\n
\n
\n Your task is to find and destroy Ultron.\n \n ),\n },\n \"Operation Centurion\": {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its\n advancement became our primary goal. And at the peak of human civilization technology turned into power. Global,\n absolute power.\n
\n
\n It seems that the universe is not without a sense of irony.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n \"Operation Vindictus\": {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n The bits are all around us. The daemons that hold the Node together can manifest themselves in many different\n ways.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n \"Operation Daedalus\": {\n desc: <> Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.,\n },\n};\n","import React, { useState } from \"react\";\nimport { SkillList } from \"./SkillList\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\ninterface IProps {\n bladeburner: IBladeburner;\n}\n\nexport function SkillPage(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult: any): boolean {\n return mult && mult !== 1;\n }\n\n return (\n <>\n \n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n \n \n You will gain one skill point every{\" \"}\n {BladeburnerConstants.RanksPerSkillPoint * BitNodeMultipliers.BladeburnerSkillCost} ranks.\n
\n Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different\n skills with each other is multiplicative.\n
\n {valid(mults[\"successChanceAll\"]) && (\n Total Success Chance: x{formatNumber(mults[\"successChanceAll\"], 3)}\n )}\n {valid(mults[\"successChanceStealth\"]) && (\n Stealth Success Chance: x{formatNumber(mults[\"successChanceStealth\"], 3)}\n )}\n {valid(mults[\"successChanceKill\"]) && (\n Retirement Success Chance: x{formatNumber(mults[\"successChanceKill\"], 3)}\n )}\n {valid(mults[\"successChanceContract\"]) && (\n Contract Success Chance: x{formatNumber(mults[\"successChanceContract\"], 3)}\n )}\n {valid(mults[\"successChanceOperation\"]) && (\n Operation Success Chance: x{formatNumber(mults[\"successChanceOperation\"], 3)}\n )}\n {valid(mults[\"successChanceEstimate\"]) && (\n Synthoid Data Estimate: x{formatNumber(mults[\"successChanceEstimate\"], 3)}\n )}\n {valid(mults[\"actionTime\"]) && Action Time: x{formatNumber(mults[\"actionTime\"], 3)}}\n {valid(mults[\"effHack\"]) && Hacking Skill: x{formatNumber(mults[\"effHack\"], 3)}}\n {valid(mults[\"effStr\"]) && Strength: x{formatNumber(mults[\"effStr\"], 3)}}\n {valid(mults[\"effDef\"]) && Defense: x{formatNumber(mults[\"effDef\"], 3)}}\n {valid(mults[\"effDex\"]) && Dexterity: x{formatNumber(mults[\"effDex\"], 3)}}\n {valid(mults[\"effAgi\"]) && Agility: x{formatNumber(mults[\"effAgi\"], 3)}}\n {valid(mults[\"effCha\"]) && Charisma: x{formatNumber(mults[\"effCha\"], 3)}}\n {valid(mults[\"effInt\"]) && Intelligence: x{formatNumber(mults[\"effInt\"], 3)}}\n {valid(mults[\"stamina\"]) && Stamina: x{formatNumber(mults[\"stamina\"], 3)}}\n {valid(mults[\"money\"]) && Contract Money: x{formatNumber(mults[\"money\"], 3)}}\n {valid(mults[\"expGain\"]) && Exp Gain: x{formatNumber(mults[\"expGain\"], 3)}}\n setRerender((old) => !old)} />\n \n );\n}\n\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n \n }\n }\n}\n*/\n","import * as React from \"react\";\nimport { SkillElem } from \"./SkillElem\";\nimport { Skills } from \"../Skills\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillList(props: IProps): React.ReactElement {\n return (\n <>\n {Object.keys(Skills).map((skill: string) => (\n \n ))}\n \n );\n}\n","import React from \"react\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IProps {\n skill: any;\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillElem(props: IProps): React.ReactElement {\n const skillName = props.skill.name;\n let currentLevel = 0;\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n const pointCost = props.skill.calculateCost(currentLevel);\n\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick(): void {\n if (props.bladeburner.skillPoints < pointCost) return;\n props.bladeburner.skillPoints -= pointCost;\n props.bladeburner.upgradeSkill(props.skill);\n props.onUpgrade();\n }\n\n return (\n \n \n \n {!canLevel || maxLvl ? (\n \n \n \n ) : (\n \n \n \n )}\n \n Level: {currentLevel}\n {maxLvl ? (\n MAX LEVEL\n ) : (\n Skill Points required: {formatNumber(pointCost, 0)}\n )}\n {props.skill.desc}\n \n );\n}\n","/**\n * React Component for all the gang stuff.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { ManagementSubpage } from \"./ManagementSubpage\";\nimport { TerritorySubpage } from \"./TerritorySubpage\";\nimport { EquipmentsSubpage } from \"./EquipmentsSubpage\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function GangRoot(): React.ReactElement {\n const player = use.Player();\n const gang = (function () {\n if (player.gang === null) throw new Error(\"Gang should not be null\");\n return player.gang;\n })();\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n \n );\n}\n","/**\n * React Component for the subpage that manages gang members, the main page.\n */\nimport React from \"react\";\nimport { GangStats } from \"./GangStats\";\nimport { GangMemberList } from \"./GangMemberList\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\n\nexport function ManagementSubpage(): React.ReactElement {\n const gang = useGang();\n return (\n <>\n \n This page is used to manage your gang members and get an overview of your gang's stats.\n
\n
\n If a gang member is not earning much money or respect, the task that you have assigned to that member might be\n too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of\n the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact\n that your wanted level is too high. Consider assigning a few members to the '\n {gang.isHackingGang ? \"Ethical Hacking\" : \"Vigilante Justice\"}' task to lower your wanted level.\n
\n
\n Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing\n Augmentations, you will automatically be a member of whatever Faction you created your gang with.\n
\n
\n You can also manage your gang programmatically through Netscript using the Gang API\n
\n
\n \n
\n \n \n );\n}\n","/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\nimport React from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { AllGangs } from \"../AllGangs\";\nimport { BonusTime } from \"./BonusTime\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nexport function GangStats(): React.ReactElement {\n const gang = useGang();\n const territoryMult = AllGangs[gang.facName].territory * 100;\n let territoryStr;\n if (territoryMult <= 0) {\n territoryStr = formatNumber(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = formatNumber(100, 2);\n } else {\n territoryStr = formatNumber(territoryMult, 2);\n }\n\n return (\n <>\n \n \n Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect\n affects the amount of money your gang members will earn, and also determines how much reputation you are\n earning with your gang's corresponding Faction.\n \n }\n >\n \n Respect: {numeralWrapper.formatRespect(gang.respect)} (\n {numeralWrapper.formatRespect(5 * gang.respectGainRate)} / sec)\n \n \n \n\n \n \n Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder\n it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\n \n }\n >\n \n Wanted Level: {numeralWrapper.formatWanted(gang.wanted)} (\n {numeralWrapper.formatWanted(5 * gang.wantedGainRate)} / sec)\n \n \n \n\n \n Penalty for respect and money gain rates due to Wanted Level}>\n Wanted Level Penalty: -{formatNumber((1 - gang.getWantedPenalty()) * 100, 2)}%\n \n \n\n \n Money gain rate: \n \n\n \n The percentage of total territory your Gang controls}>\n Territory: {territoryStr}%\n \n \n \n Faction reputation: \n \n\n \n \n );\n}\n","/**\n * React Component for displaying the bonus time remaining.\n */\nimport * as React from \"react\";\nimport { Gang } from \"../Gang\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n gang: Gang;\n}\n\nexport function BonusTime(props: IProps): React.ReactElement {\n const CyclerPerSecond = 1000 / CONSTANTS._idleSpeed;\n if ((props.gang.storedCycles / CyclerPerSecond) * 1000 <= 5000) return <>;\n const bonusMillis = (props.gang.storedCycles / CyclerPerSecond) * 1000;\n return (\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the\n browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)}\n \n \n );\n}\n","/**\n * React Component for the list of gang members on the management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberAccordion } from \"./GangMemberAccordion\";\nimport { GangMember } from \"../GangMember\";\nimport { RecruitButton } from \"./RecruitButton\";\nimport { useGang } from \"./Context\";\n\nexport function GangMemberList(): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n\n return (\n <>\n setRerender((old) => !old)} />\n
    \n {gang.members.map((member: GangMember) => (\n \n ))}\n
\n \n );\n}\n","/**\n * React Component for a gang member on the management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberAccordionContent } from \"./GangMemberAccordionContent\";\n\nimport Box from \"@mui/material/Box\";\n\nimport Typography from \"@mui/material/Typography\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(true);\n return (\n \n setOpen((old) => !old)}>\n {props.member.name}} />\n {open ? : }\n \n \n \n \n \n \n \n );\n}\n","/**\n * React Component for the content of the accordion of gang members on the\n * management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberStats } from \"./GangMemberStats\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { TaskDescription } from \"./TaskDescription\";\nimport { GangMember } from \"../GangMember\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberAccordionContent(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n return (\n \n \n setRerender((old) => !old)} member={props.member} />\n \n \n setRerender((old) => !old)} member={props.member} />\n \n \n \n \n \n );\n}\n","/**\n * React Component for the first part of a gang member details.\n * Contains skills and exp.\n */\nimport React, { useState } from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMember } from \"../GangMember\";\nimport { AscensionModal } from \"./AscensionModal\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\nimport IconButton from \"@mui/material/IconButton\";\nimport HelpIcon from \"@mui/icons-material/Help\";\n\ninterface IProps {\n member: GangMember;\n onAscend: () => void;\n}\n\nexport function GangMemberStats(props: IProps): React.ReactElement {\n const [helpOpen, setHelpOpen] = useState(false);\n const [ascendOpen, setAscendOpen] = useState(false);\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points),\n };\n\n return (\n <>\n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n Hacking: {formatNumber(props.member.hack, 0)} ({numeralWrapper.formatExp(props.member.hack_exp)} exp)\n
\n Strength: {formatNumber(props.member.str, 0)} ({numeralWrapper.formatExp(props.member.str_exp)} exp)\n
\n Defense: {formatNumber(props.member.def, 0)} ({numeralWrapper.formatExp(props.member.def_exp)} exp)\n
\n Dexterity: {formatNumber(props.member.dex, 0)} ({numeralWrapper.formatExp(props.member.dex_exp)} exp)\n
\n Agility: {formatNumber(props.member.agi, 0)} ({numeralWrapper.formatExp(props.member.agi_exp)} exp)\n
\n Charisma: {formatNumber(props.member.cha, 0)} ({numeralWrapper.formatExp(props.member.cha_exp)} exp)\n
\n
\n \n
\n {props.member.canAscend() && (\n <>\n \n setAscendOpen(false)}\n member={props.member}\n onAscend={props.onAscend}\n />\n setHelpOpen(true)}>\n \n \n setHelpOpen(false)}>\n \n Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their\n stat multipliers.\n
\n
\n The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp\n they have.\n
\n
\n Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect\n equal to the total respect earned by the member.\n
\n
\n \n )}\n \n );\n}\n","/**\n * React Component for the content of the popup before the player confirms the\n * ascension of a gang member.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n member: GangMember;\n onAscend: () => void;\n}\n\nexport function AscensionModal(props: IProps): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function confirm(): void {\n props.onAscend();\n const res = gang.ascendMember(props.member);\n dialogBoxCreate(\n \n You ascended {props.member.name}!
\n
\n Your gang lost {numeralWrapper.formatRespect(res.respect)} respect.\n
\n
\n {props.member.name} gained the following stat multipliers for ascending:\n
\n Hacking: x{numeralWrapper.format(res.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(res.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(res.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(res.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(res.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(res.cha, \"0.000\")}\n
\n
,\n );\n props.onClose();\n }\n\n // const ascendBenefits = props.member.getAscensionResults();\n const preAscend = props.member.getCurrentAscensionMults();\n const postAscend = props.member.getAscensionMultsAfterAscend();\n\n return (\n \n \n Are you sure you want to ascend this member? They will lose all of\n
\n their non-Augmentation upgrades and their stats will reset back to 1.\n
\n
\n Furthermore, your gang will lose {numeralWrapper.formatRespect(props.member.earnedRespect)} respect\n
\n
\n In return, they will gain the following permanent boost to stat multipliers:\n
\n Hacking: x{numeralWrapper.format(preAscend.hack, \"0.000\")} => x\n {numeralWrapper.format(postAscend.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(preAscend.str, \"0.000\")} => x\n {numeralWrapper.format(postAscend.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(preAscend.def, \"0.000\")} => x\n {numeralWrapper.format(postAscend.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(preAscend.dex, \"0.000\")} => x\n {numeralWrapper.format(postAscend.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(preAscend.agi, \"0.000\")} => x\n {numeralWrapper.format(postAscend.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(preAscend.cha, \"0.000\")} => x\n {numeralWrapper.format(postAscend.cha, \"0.000\")}\n
\n
\n \n
\n );\n}\n","/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\nimport React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { useGang } from \"./Context\";\nimport { GangMember } from \"../GangMember\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n member: GangMember;\n onTaskChange: () => void;\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const gang = useGang();\n const [currentTask, setCurrentTask] = useState(props.member.task);\n\n function onChange(event: SelectChangeEvent): void {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = gang.getAllTaskNames();\n\n const data = [\n [`Money:`, ],\n [`Respect:`, `${numeralWrapper.formatRespect(5 * props.member.calculateRespectGain(gang))} / sec`],\n [`Wanted Level:`, `${numeralWrapper.formatWanted(5 * props.member.calculateWantedLevelGain(gang))} / sec`],\n [`Total Respect:`, `${numeralWrapper.formatRespect(props.member.earnedRespect)}`],\n ];\n\n return (\n <>\n \n\n \n \n );\n}\n","/**\n * React Component for left side of the gang member accordion, contains the\n * description of the task that member is currently doing.\n */\nimport React from \"react\";\nimport { GangMemberTasks } from \"../GangMemberTasks\";\nimport { GangMember } from \"../GangMember\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function TaskDescription(props: IProps): React.ReactElement {\n const task = GangMemberTasks[props.member.task];\n const desc = task ? task.desc : GangMemberTasks[\"Unassigned\"].desc;\n\n return ;\n}\n","/**\n * React Component for the recruitment button and text on the gang main page.\n */\nimport React, { useState } from \"react\";\nimport { RecruitModal } from \"./RecruitModal\";\nimport { GangConstants } from \"../data/Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n onRecruit: () => void;\n}\n\nexport function RecruitButton(props: IProps): React.ReactElement {\n const gang = useGang();\n const [open, setOpen] = useState(false);\n if (gang.members.length >= GangConstants.MaximumGangMembers) {\n return <>;\n }\n\n if (!gang.canRecruitMember()) {\n const respect = gang.getRespectNeededToRecruitMember();\n return (\n \n \n {formatNumber(respect, 2)} respect needed to recruit next member\n \n );\n }\n\n return (\n <>\n \n setOpen(false)} onRecruit={props.onRecruit} />\n \n );\n}\n","/**\n * React Component for the popup used to recruit new gang members.\n */\nimport React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IRecruitPopupProps {\n open: boolean;\n onClose: () => void;\n onRecruit: () => void;\n}\n\nexport function RecruitModal(props: IRecruitPopupProps): React.ReactElement {\n const gang = useGang();\n const [name, setName] = useState(\"\");\n\n const disabled = name === \"\" || !gang.canRecruitMember();\n function recruit(): void {\n if (disabled) return;\n // At this point, the only way this can fail is if you already\n // have a gang member with the same name\n if (!gang.recruitMember(name)) {\n dialogBoxCreate(\"You already have a gang member with this name!\");\n return;\n }\n\n props.onRecruit();\n props.onClose();\n }\n\n function onKeyUp(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) recruit();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n return (\n \n Enter a name for your new Gang member:\n
\n \n Recruit\n \n ),\n }}\n />\n
\n );\n}\n","/**\n * React Component for the territory subpage.\n */\nimport React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { AllGangs } from \"../AllGangs\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\nexport function TerritorySubpage(): React.ReactElement {\n const gang = useGang();\n const gangNames = Object.keys(AllGangs).filter((g) => g != gang.facName);\n\n return (\n <>\n \n This page shows how much territory your Gang controls. This statistic is listed as a percentage, which\n represents how much of the total territory you control.\n
\n
\n Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on\n your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The\n accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare'\n task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also\n loses a small amount of power whenever you lose a clash.\n
\n
\n NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of\n whether you win or lose the clash. A gang member being killed results in both respect and power loss for your\n gang.\n
\n
\n The amount of territory you have affects all aspects of your Gang members' production, including money, respect,\n and wanted level. It is very beneficial to have high territory control.\n
\n
\n To increase your chances of winning territory assign gang members to \"Territory Warfare\", this will build your\n gang power. Then enable \"Engage in Territory Warfare\" to start fighting over territory.\n
\n (gang.territoryWarfareEngaged = event.target.checked)}\n />\n }\n label={\n \n Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance\n to gradually decrease until it reaches 0%.\n
\n }\n >\n Engage in Territory Warfare\n \n }\n />\n
\n \n \n This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to\n gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.\n \n }\n >\n \n Territory Clash Chance: {numeralWrapper.formatPercentage(gang.territoryClashChance, 3)}\n \n \n \n
\n (gang.notifyMemberDeath = event.target.checked)}\n />\n }\n label={\n \n If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies\n in a territory clash.\n \n }\n >\n Notify about Gang Member Deaths\n \n }\n />\n
\n \n \n \n {gang.facName}\n \n
\n Power: {formatNumber(AllGangs[gang.facName].power, 6)}\n
\n Territory: {formatTerritory(AllGangs[gang.facName].territory)}%\n
\n
\n
\n {gangNames.map((name) => (\n \n ))}\n
\n \n );\n}\nfunction formatTerritory(n: number): string {\n const v = n * 100;\n if (v <= 0) {\n return formatNumber(0, 2);\n } else if (v >= 100) {\n return formatNumber(100, 2);\n } else {\n return formatNumber(v, 2);\n }\n}\n\ninterface ITerritoryProps {\n name: string;\n}\n\nfunction OtherGangTerritory(props: ITerritoryProps): React.ReactElement {\n const gang = useGang();\n const playerPower = AllGangs[gang.facName].power;\n const power = AllGangs[props.name].power;\n const clashVictoryChance = playerPower / (power + playerPower);\n return (\n \n {props.name}\n
\n Power: {formatNumber(power, 6)}\n
\n Territory: {formatTerritory(AllGangs[props.name].territory)}%
\n Chance to win clash with this gang: {numeralWrapper.formatPercentage(clashVictoryChance, 3)}\n
\n
\n
\n );\n}\n","/**\n * React Component for the popup that manages gang members upgrades\n */\nimport React, { useState } from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMemberUpgrades } from \"../GangMemberUpgrades\";\nimport { GangMemberUpgrade } from \"../GangMemberUpgrade\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useGang } from \"./Context\";\nimport { GangMember } from \"../GangMember\";\nimport { UpgradeType } from \"../data/upgrades\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface INextRevealProps {\n upgrades: string[];\n type: UpgradeType;\n}\n\nfunction NextReveal(props: INextRevealProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const upgrades = Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money > gang.getUpgradeCost(upg)) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n\n if (upgrades.length === 0) return <>;\n return (\n \n Next at \n \n );\n}\n\nfunction PurchasedUpgrade({ upgName }: { upgName: string }): React.ReactElement {\n const upg = GangMemberUpgrades[upgName];\n return (\n \n \n }>\n {upg.name}\n \n \n \n );\n}\n\ninterface IUpgradeButtonProps {\n upg: GangMemberUpgrade;\n rerender: () => void;\n member: GangMember;\n}\n\nfunction UpgradeButton(props: IUpgradeButtonProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n function onClick(): void {\n props.member.buyUpgrade(props.upg, player, gang);\n props.rerender();\n }\n return (\n }>\n \n {props.upg.name}\n \n \n \n );\n}\n\ninterface IPanelProps {\n member: GangMember;\n}\n\nfunction GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n function filterUpgrades(list: string[], type: UpgradeType): GangMemberUpgrade[] {\n return Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money < gang.getUpgradeCost(upg)) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n }\n const weaponUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, UpgradeType.Augmentation);\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points),\n };\n return (\n \n \n {props.member.name} ({props.member.task})\n \n \n Hack: {props.member.hack} (x\n {formatNumber(props.member.hack_mult * asc.hack, 2)})
\n Str: {props.member.str} (x\n {formatNumber(props.member.str_mult * asc.str, 2)})
\n Def: {props.member.def} (x\n {formatNumber(props.member.def_mult * asc.def, 2)})
\n Dex: {props.member.dex} (x\n {formatNumber(props.member.dex_mult * asc.dex, 2)})
\n Agi: {props.member.agi} (x\n {formatNumber(props.member.agi_mult * asc.agi, 2)})
\n Cha: {props.member.cha} (x\n {formatNumber(props.member.cha_mult * asc.cha, 2)})\n
\n \n Purchased Upgrades: \n
\n {props.member.upgrades.map((upg: string) => (\n \n ))}\n {props.member.augmentations.map((upg: string) => (\n \n ))}\n
\n \n \n \n Weapons\n \n {weaponUpgrades.map((upg) => (\n \n ))}\n \n \n \n \n Armor\n \n {armorUpgrades.map((upg) => (\n \n ))}\n \n \n \n \n Vehicles\n \n {vehicleUpgrades.map((upg) => (\n \n ))}\n \n \n \n \n Rootkits\n \n {rootkitUpgrades.map((upg) => (\n \n ))}\n \n \n \n \n Augmentations\n \n {augUpgrades.map((upg) => (\n \n ))}\n \n \n \n
\n );\n}\n\nexport function EquipmentsSubpage(): React.ReactElement {\n const gang = useGang();\n return (\n <>\n \n You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power\n leads to more discounts.\n \n }\n >\n Discount: -{numeralWrapper.formatPercentage(1 - 1 / gang.getDiscount())}\n \n {gang.members.map((member: GangMember) => (\n \n ))}\n \n );\n}\n","// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\nimport React, { useState, useEffect } from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MainPanel } from \"./MainPanel\";\nimport { Industries } from \"../IndustryData\";\nimport { ExpandIndustryTab } from \"./ExpandIndustryTab\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\nimport { Overview } from \"./Overview\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function CorporationRoot(): React.ReactElement {\n const player = use.Player();\n const corporation = player.corporation;\n if (corporation === null) return <>;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [divisionName, setDivisionName] = useState(\"Overview\");\n function handleChange(event: React.SyntheticEvent, tab: string | number): void {\n setDivisionName(tab);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const canExpand =\n Object.keys(Industries).filter(\n (industryType: string) =>\n corporation.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n ).length > 0;\n\n return (\n \n \n \n {corporation.divisions.map((div) => (\n \n ))}\n {canExpand && }\n \n {divisionName === \"Overview\" && }\n {divisionName === -1 && }\n {typeof divisionName === \"string\" && divisionName !== \"Overview\" && (\n \n )}\n \n );\n}\n","// React Component for the element that contains the actual info/data\n// for the Corporation UI. This panel lies below the header tabs and will\n// be filled with whatever is needed based on the routing/navigation\nimport React from \"react\";\n\nimport { CityTabs } from \"./CityTabs\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Context, useCorporation } from \"./Context\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\n\ninterface IProps {\n divisionName: string;\n rerender: () => void;\n}\n\nexport function MainPanel(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division =\n props.divisionName !== \"Overview\"\n ? corp.divisions.find((division: IIndustry) => division.name === props.divisionName)\n : undefined; // use undefined because find returns undefined\n\n if (division === undefined) throw new Error(\"Cannot find division\");\n return (\n \n \n \n );\n}\n","// React Components for the Corporation UI's City navigation tabs\n// These allow player to navigate between different cities for each industry\nimport React, { useState } from \"react\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industry } from \"./Industry\";\nimport { ExpandNewCity } from \"./ExpandNewCity\";\nimport { useDivision } from \"./Context\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\ninterface IProps {\n city: string;\n rerender: () => void;\n}\n\nexport function CityTabs(props: IProps): React.ReactElement {\n const division = useDivision();\n const [city, setCity] = useState(props.city);\n\n const office = division.offices[city];\n if (office === 0) {\n setCity(\"Sector-12\");\n return <>;\n }\n\n const canExpand =\n Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0).length > 0;\n function handleChange(event: React.SyntheticEvent, tab: string): void {\n setCity(tab);\n }\n return (\n <>\n \n {Object.values(division.offices).map(\n (office: OfficeSpace | 0) => office !== 0 && ,\n )}\n {canExpand && }\n \n\n {city !== \"Expand\" ? (\n \n ) : (\n \n )}\n \n );\n}\n","// React Component for managing the Corporation's Industry UI\n// This Industry component does NOT include the city tabs at the top\nimport React from \"react\";\n\nimport { IndustryOffice } from \"./IndustryOffice\";\nimport { IndustryOverview } from \"./IndustryOverview\";\nimport { IndustryWarehouse } from \"./IndustryWarehouse\";\nimport { Warehouse } from \"../Warehouse\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n city: string;\n warehouse: Warehouse | 0;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function Industry(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const division = useDivision();\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's OfficeSpace information\n// (bottom-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Employee } from \"../Employee\";\nimport { EmployeePositions } from \"../EmployeePositions\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { UpgradeOfficeSizeModal } from \"./UpgradeOfficeSizeModal\";\nimport { ThrowPartyModal } from \"./ThrowPartyModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { TableCell } from \"../../ui/React/Table\";\n\ninterface IProps {\n office: OfficeSpace;\n rerender: () => void;\n}\n\nfunction countEmployee(employees: Employee[], job: string): number {\n let n = 0;\n for (let i = 0; i < employees.length; ++i) {\n if (employees[i].pos === job) n++;\n }\n return n;\n}\n\ninterface ISwitchProps {\n manualMode: boolean;\n switchMode: (f: (b: boolean) => boolean) => void;\n}\n\nfunction SwitchButton(props: ISwitchProps): React.ReactElement {\n if (props.manualMode) {\n return (\n \n Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You\n simply have to select the number of assignments for each job\n \n }\n >\n \n \n );\n } else {\n return (\n \n Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs\n \n }\n >\n \n \n );\n }\n}\n\nfunction ManualManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [employee, setEmployee] = useState(\n props.office.employees.length > 0 ? props.office.employees[0] : null,\n );\n\n // Employee Selector\n const employees = [];\n for (let i = 0; i < props.office.employees.length; ++i) {\n employees.push(\n \n {props.office.employees[i].name}\n ,\n );\n }\n\n function employeeSelectorOnChange(e: SelectChangeEvent): void {\n const name = e.target.value;\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (name === props.office.employees[i].name) {\n setEmployee(props.office.employees[i]);\n break;\n }\n }\n\n props.rerender();\n }\n\n // Employee Positions Selector\n const emp = employee;\n let employeePositionSelectorInitialValue = \"\";\n const employeePositions = [];\n const positionNames = Object.values(EmployeePositions);\n for (let i = 0; i < positionNames.length; ++i) {\n employeePositions.push(\n \n {positionNames[i]}\n ,\n );\n if (emp != null && emp.pos === positionNames[i]) {\n employeePositionSelectorInitialValue = positionNames[i];\n }\n }\n\n function employeePositionSelectorOnChange(e: SelectChangeEvent): void {\n if (employee === null) return;\n employee.pos = e.target.value;\n props.rerender();\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n\n // Employee stats (after applying multipliers)\n const effCre = emp ? emp.cre * corp.getEmployeeCreMultiplier() * division.getEmployeeCreMultiplier() : 0;\n const effCha = emp ? emp.cha * corp.getEmployeeChaMultiplier() * division.getEmployeeChaMultiplier() : 0;\n const effInt = emp ? emp.int * corp.getEmployeeIntMultiplier() * division.getEmployeeIntMultiplier() : 0;\n const effEff = emp ? emp.eff * corp.getEmployeeEffMultiplier() * division.getEmployeeEffMultiplier() : 0;\n\n return (\n <>\n
\n \n {employee != null && (\n \n Morale: {numeralWrapper.format(employee.mor, nf)}\n
\n Happiness: {numeralWrapper.format(employee.hap, nf)}\n
\n Energy: {numeralWrapper.format(employee.ene, nf)}\n
\n Intelligence: {numeralWrapper.format(effInt, nf)}\n
\n Charisma: {numeralWrapper.format(effCha, nf)}\n
\n Experience: {numeralWrapper.format(employee.exp, nf)}\n
\n Creativity: {numeralWrapper.format(effCre, nf)}\n
\n Efficiency: {numeralWrapper.format(effEff, nf)}\n
\n Salary: \n
\n )}\n {employee != null && (\n \n )}\n \n );\n}\n\ninterface IAutoAssignProps {\n office: OfficeSpace;\n job: string;\n desc: string;\n rerender: () => void;\n}\n\nfunction AutoAssignJob(props: IAutoAssignProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numJob = countEmployee(props.office.employees, props.job);\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n function assignEmployee(): void {\n if (numUnassigned <= 0) {\n console.warn(\"Cannot assign employee. No unassigned employees available\");\n return;\n }\n\n props.office.assignEmployeeToJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n\n function unassignEmployee(): void {\n props.office.unassignEmployeeFromJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n return (\n \n \n \n \n {props.job} ({numJob})\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nfunction AutoManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n const vechain = corp.unlockUpgrades[4] === 1; // Has Vechain upgrade\n\n // Calculate average morale, happiness, energy, and salary.\n let totalMorale = 0,\n totalHappiness = 0,\n totalEnergy = 0,\n totalSalary = 0;\n for (let i = 0; i < props.office.employees.length; ++i) {\n totalMorale += props.office.employees[i].mor;\n totalHappiness += props.office.employees[i].hap;\n totalEnergy += props.office.employees[i].ene;\n totalSalary += props.office.employees[i].sal;\n }\n\n let avgMorale = 0,\n avgHappiness = 0,\n avgEnergy = 0;\n if (props.office.employees.length > 0) {\n avgMorale = totalMorale / props.office.employees.length;\n avgHappiness = totalHappiness / props.office.employees.length;\n avgEnergy = totalEnergy / props.office.employees.length;\n }\n\n return (\n <>\n \n \n \n \n Unassigned Employees:\n \n \n {numUnassigned}\n \n \n \n \n Avg Employee Morale:\n \n \n {numeralWrapper.format(avgMorale, \"0.000\")}\n \n \n \n \n Avg Employee Happiness:\n \n \n {numeralWrapper.format(avgHappiness, \"0.000\")}\n \n \n \n \n Avg Employee Energy:\n \n \n {numeralWrapper.format(avgEnergy, \"0.000\")}\n \n \n \n \n Total Employee Salary:\n \n \n \n \n \n \n \n {vechain && (\n <>\n \n \n \n The base amount of material this office can produce. Does not include production multipliers\n from upgrades and materials. This value is based off the productivity of your Operations,\n Engineering, and Management employees\n \n }\n >\n Material Production:\n \n \n \n \n {numeralWrapper.format(division.getOfficeProductivity(props.office), \"0.000\")}\n \n \n \n \n \n \n The base amount of any given Product this office can produce. Does not include production\n multipliers from upgrades and materials. This value is based off the productivity of your\n Operations, Engineering, and Management employees\n \n }\n >\n Product Production:\n \n \n \n \n {numeralWrapper.format(\n division.getOfficeProductivity(props.office, {\n forProduct: true,\n }),\n \"0.000\",\n )}\n \n \n \n \n \n The effect this office's 'Business' employees has on boosting sales}\n >\n Business Multiplier:\n \n \n \n x{numeralWrapper.format(division.getBusinessFactor(props.office), \"0.000\")}\n \n \n \n )}\n \n
\n\n \n \n \n\n \n\n \n\n \n\n \n\n \n \n
\n \n );\n}\n\nexport function IndustryOffice(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [upgradeOfficeSizeOpen, setUpgradeOfficeSizeOpen] = useState(false);\n const [throwPartyOpen, setThrowPartyOpen] = useState(false);\n const [employeeManualAssignMode, setEmployeeManualAssignMode] = useState(false);\n\n function autohireEmployeeButtonOnClick(): void {\n if (props.office.atCapacity()) return;\n props.office.hireRandomEmployee();\n props.rerender();\n }\n\n return (\n \n Office Space\n \n Size: {props.office.employees.length} / {props.office.size} employees\n \n Automatically hires an employee and gives him/her a random name}>\n \n \n \n \n
\n Upgrade the office's size so that it can hold more employees!}>\n \n \n \n \n setUpgradeOfficeSizeOpen(false)}\n />\n\n {!division.hasResearch(\"AutoPartyManager\") && (\n <>\n Throw an office party to increase your employee's morale and happiness}\n >\n \n \n \n \n setThrowPartyOpen(false)}\n />\n \n )}\n\n
\n\n \n {employeeManualAssignMode ? (\n \n ) : (\n \n )}\n
\n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { ICorporation } from \"../ICorporation\";\nimport { UpgradeOfficeSize } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IUpgradeButton {\n cost: number;\n size: number;\n corp: ICorporation;\n office: OfficeSpace;\n onClose: () => void;\n rerender: () => void;\n}\n\nfunction UpgradeSizeButton(props: IUpgradeButton): React.ReactElement {\n const corp = useCorporation();\n function upgradeSize(cost: number, size: number): void {\n if (corp.funds < cost) {\n return;\n }\n\n UpgradeOfficeSize(corp, props.office, size);\n props.rerender();\n props.onClose();\n }\n return (\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function UpgradeOfficeSizeModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const initialPriceMult = Math.round(props.office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = CorporationConstants.OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult);\n\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const upgradeCost15 = CorporationConstants.OfficeInitialCost * mult;\n\n //Calculate max upgrade size and cost\n const maxMult = corp.funds / CorporationConstants.OfficeInitialCost;\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n ++maxNum;\n }\n const upgradeCostMax = CorporationConstants.OfficeInitialCost * mult;\n\n return (\n \n Increase the size of your office space to fit additional employees!\n \n Upgrade size: \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { ThrowParty } from \"../Actions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function ThrowPartyModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [cost, setCost] = useState(0);\n\n const totalCost = cost * props.office.employees.length;\n const canParty = corp.funds >= totalCost;\n function changeCost(event: React.ChangeEvent): void {\n let x = parseFloat(event.target.value);\n if (isNaN(x)) x = 0;\n setCost(x);\n }\n\n function throwParty(): void {\n if (cost === null || isNaN(cost) || cost < 0) {\n dialogBoxCreate(\"Invalid value entered\");\n } else {\n if (!canParty) {\n dialogBoxCreate(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = ThrowParty(corp, props.office, cost);\n dialogBoxCreate(\n \"You threw a party for the office! The morale and happiness \" +\n \"of each employee increased by \" +\n numeralWrapper.formatPercentage(mult - 1),\n );\n props.rerender();\n props.onClose();\n }\n }\n }\n\n function EffectText(): React.ReactElement {\n if (isNaN(cost) || cost < 0) return Invalid value entered!;\n return (\n \n Throwing this party will cost a total of \n \n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) throwParty();\n }\n\n return (\n \n Enter the amount of money you would like to spend PER EMPLOYEE on this office party\n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industries } from \"../IndustryData\";\nimport { IndustryUpgrades } from \"../IndustryUpgrades\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { MakeProductModal } from \"./MakeProductModal\";\nimport { ResearchModal } from \"./ResearchModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport IconButton from \"@mui/material/IconButton\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport Box from \"@mui/material/Box\";\n\nfunction MakeProductButton(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [makeOpen, setMakeOpen] = useState(false);\n\n const hasMaxProducts = division.hasMaximumNumberProducts();\n\n function shouldFlash(): boolean {\n return Object.keys(division.products).length === 0;\n }\n\n let createProductButtonText = \"\";\n switch (division.type) {\n case Industries.Food:\n createProductButtonText = \"Build Restaurant\";\n break;\n case Industries.Tobacco:\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Robotics:\n createProductButtonText = \"Design Robot\";\n break;\n case Industries.Software:\n createProductButtonText = \"Develop Software\";\n break;\n case Industries.Healthcare:\n createProductButtonText = \"Build Hospital\";\n break;\n case Industries.RealEstate:\n createProductButtonText = \"Develop Property\";\n break;\n default:\n createProductButtonText = \"Create Product\";\n return <>;\n }\n\n return (\n <>\n \n You have reached the maximum number of products: {division.getMaximumNumberProducts()}\n \n ) : (\n \"\"\n )\n }\n >\n \n \n setMakeOpen(false)} />\n \n );\n}\nfunction Text(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [helpOpen, setHelpOpen] = useState(false);\n const [researchOpen, setResearchOpen] = useState(false);\n const vechain = corp.unlockUpgrades[4] === 1;\n const profit = division.lastCycleRevenue - division.lastCycleExpenses;\n\n let advertisingInfo = false;\n const advertisingFactors = division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n if (vechain) {\n advertisingInfo = true;\n }\n\n function convertEffectFacToGraphic(fac: number): string {\n return createProgressBarText({\n progress: fac,\n totalTicks: 20,\n });\n }\n\n return (\n <>\n \n Industry: {division.type} (Corp Funds: )\n \n
\n \n {advertisingInfo !== false && (\n \n Total multiplier for this industrys sales due to its awareness and popularity\n \n \n }\n >\n Advertising Multiplier: x{numeralWrapper.format(totalAdvertisingFac, \"0.000\")}\n \n )}\n
\n ],\n [\"Expenses:\", ],\n [\"Profit:\", ],\n ]}\n />\n
\n \n \n Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real\n Estate.\n \n }\n >\n Production Multiplier: {numeralWrapper.format(division.prodMult, \"0.00\")}\n \n setHelpOpen(true)}>\n \n \n setHelpOpen(false)}>\n \n Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these\n materials have on your production varies between Industries. For example, Real Estate may be very effective\n for some Industries, but ineffective for others.\n
\n
\n This division's production multiplier is calculated by summing the individual production multiplier of each\n of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial\n to expand into new cities as this can greatly increase the production multiplier of your entire Division.\n
\n
\n Below are approximations for how effective each material is at boosting this industry's production\n multiplier (Bigger bars = more effective):\n
\n
\n Hardware:    {convertEffectFacToGraphic(division.hwFac)}\n
\n Robots:      {convertEffectFacToGraphic(division.robFac)}\n
\n AI Cores:    {convertEffectFacToGraphic(division.aiFac)}\n
\n Real Estate: {convertEffectFacToGraphic(division.reFac)}\n
\n
\n
\n\n \n \n Scientific Research increases the quality of the materials and products that you produce.\n \n }\n >\n Scientific Research: {numeralWrapper.format(division.sciResearch.qty, \"0.000a\")}\n \n \n setResearchOpen(false)} industry={division} />\n \n \n );\n}\n\nfunction Upgrades(props: { office: OfficeSpace; rerender: () => void }): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const upgrades = [];\n for (const index in IndustryUpgrades) {\n const upgrade = IndustryUpgrades[index];\n\n // AutoBrew research disables the Coffee upgrade\n if (division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n switch (i) {\n case 0: //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n default:\n cost = baseCost * Math.pow(priceMult, division.upgrades[i]);\n break;\n }\n\n function onClick(): void {\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: props.office,\n });\n props.rerender();\n }\n\n upgrades.push(\n \n \n \n \n ,\n );\n }\n\n return <>{upgrades};\n}\n\ninterface IProps {\n currentCity: string;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function IndustryOverview(props: IProps): React.ReactElement {\n const division = useDivision();\n\n return (\n \n \n
\n Purchases & Upgrades\n
\n {division.makesProducts && }\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Industries } from \"../IndustryData\";\nimport { MakeProduct } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nfunction productPlaceholder(tpe: string): string {\n if (tpe === Industries.Food) {\n return \"Restaurant Name\";\n } else if (tpe === Industries.Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === Industries.RealEstate) {\n return \"Property Name\";\n }\n return \"Product Name\";\n}\n\n// Create a popup that lets the player create a product for their current industry\nexport function MakeProductModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const allCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] !== 0);\n const [city, setCity] = useState(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = useState(\"\");\n const [design, setDesign] = useState(null);\n const [marketing, setMarketing] = useState(null);\n if (division.hasMaximumNumberProducts()) return <>;\n\n let createProductPopupText = <>;\n switch (division.type) {\n case Industries.Food:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new restaurant!\n \n );\n break;\n case Industries.Tobacco:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new tobacco product!\n \n );\n break;\n case Industries.Pharmaceutical:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and develop a new pharmaceutical drug!\n \n );\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and manufacture a new computer hardware product!\n \n );\n break;\n case Industries.Robotics:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and create a new robot or robotic system!\n \n );\n break;\n case Industries.Software:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of software!\n \n );\n break;\n case Industries.Healthcare:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new hospital!\n \n );\n break;\n case Industries.RealEstate:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of real estate property!\n \n );\n break;\n default:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new product!\n \n );\n return <>;\n }\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n
\n To begin developing a product, first choose the city in which it will be designed. The stats of your employees in\n the selected city affect the properties of the finished product, such as its quality, performance, and durability.\n
\n
\n You can also choose to invest money in the design and marketing of the product. Investing money in its design will\n result in a superior product. Investing money in marketing the product will help the product's sales.\n \n );\n\n function makeProduct(): void {\n if (design === null || marketing === null) return;\n try {\n MakeProduct(corp, division, city, name, design, marketing);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function onDesignChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setDesign(null);\n else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setMarketing(null);\n else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) makeProduct();\n }\n\n return (\n \n {createProductPopupText}\n \n \n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { IndustryResearchTrees } from \"../IndustryData\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Research } from \"../Actions\";\nimport { Node } from \"../ResearchTree\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\ninterface INodeProps {\n n: Node | null;\n division: IIndustry;\n}\nfunction Upgrade({ n, division }: INodeProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (n === null) return <>;\n const r = ResearchMap[n.text];\n let disabled = division.sciResearch.qty < r.cost || n.researched;\n const parent = n.parent;\n if (parent !== null) {\n disabled = disabled || !parent.researched;\n }\n\n function research(): void {\n if (n === null || disabled) return;\n try {\n Research(division, n.text);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(\n `Researched ${n.text}. It may take a market cycle ` +\n `(~${CorporationConstants.SecsPerMarketCycle} seconds) before the effects of ` +\n `the Research apply.`,\n );\n }\n\n let color: \"primary\" | \"info\" = \"primary\";\n if (n.researched) {\n color = \"info\";\n }\n\n const but = (\n \n \n Research points: {r.cost}\n
\n {r.desc}\n \n }\n >\n \n \n \n \n
\n );\n\n if (n.children.length === 0) return but;\n\n return (\n \n \n {but}\n setOpen((old) => !old)}>\n \n {open ? : }\n \n \n \n \n {n.children.map((m) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n industry: IIndustry;\n}\n\n// Create the Research Tree UI for this Industry\nexport function ResearchModal(props: IProps): React.ReactElement {\n const researchTree = IndustryResearchTrees[props.industry.type];\n if (researchTree === undefined) return <>;\n\n return (\n \n \n \n Research points: {props.industry.sciResearch.qty.toFixed(3)}\n
\n Multipliers from research:\n
* Advertising Multiplier: x{researchTree.getAdvertisingMultiplier()}\n
* Employee Charisma Multiplier: x{researchTree.getEmployeeChaMultiplier()}\n
* Employee Creativity Multiplier: x{researchTree.getEmployeeCreMultiplier()}\n
* Employee Efficiency Multiplier: x{researchTree.getEmployeeEffMultiplier()}\n
* Employee Intelligence Multiplier: x{researchTree.getEmployeeIntMultiplier()}\n
* Production Multiplier: x{researchTree.getProductionMultiplier()}\n
* Sales Multiplier: x{researchTree.getSalesMultiplier()}\n
* Scientific Research Multiplier: x{researchTree.getScientificResearchMultiplier()}\n
* Storage Multiplier: x{researchTree.getStorageMultiplier()}\n
\n
\n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Material } from \"../Material\";\nimport { Product } from \"../Product\";\nimport { Warehouse } from \"../Warehouse\";\nimport { SmartSupplyModal } from \"./SmartSupplyModal\";\nimport { ProductElem } from \"./ProductElem\";\nimport { MaterialElem } from \"./MaterialElem\";\nimport { MaterialSizes } from \"../MaterialSizes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport { IndustryProductEquation } from \"./IndustryProductEquation\";\nimport { PurchaseWarehouse } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n corp: ICorporation;\n division: IIndustry;\n warehouse: Warehouse | 0;\n currentCity: string;\n player: IPlayer;\n rerender: () => void;\n}\n\nfunction WarehouseRoot(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [smartSupplyOpen, setSmartSupplyOpen] = useState(false);\n if (props.warehouse === 0) return <>;\n\n // Upgrade Warehouse size button\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = corp.funds > sizeUpgradeCost;\n function upgradeWarehouseOnClick(): void {\n if (division === null) return;\n if (props.warehouse === 0) return;\n if (!canAffordUpgrade) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n props.rerender();\n }\n\n // Current State:\n let stateText;\n switch (division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n default:\n console.error(`Invalid state: ${division.state}`);\n break;\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n // Only create UI for materials that are relevant for the industry\n if (!isRelevantMaterial(matName, division)) continue;\n mats.push(\n ,\n );\n }\n\n // Create React components for products\n const products = [];\n if (division.makesProducts && Object.keys(division.products).length > 0) {\n for (const productName in division.products) {\n const product = division.products[productName];\n if (!(product instanceof Product)) continue;\n products.push(\n ,\n );\n }\n }\n\n let breakdown = <>;\n for (const matName in props.warehouse.materials) {\n const mat = props.warehouse.materials[matName];\n if (!MaterialSizes.hasOwnProperty(matName)) continue;\n if (mat.qty === 0) continue;\n breakdown = (\n <>\n {breakdown}\n {matName}: {numeralWrapper.format(mat.qty * MaterialSizes[matName], \"0,0.0\")}\n
\n \n );\n }\n\n for (const prodName in division.products) {\n const prod = division.products[prodName];\n if (prod === undefined) continue;\n breakdown = (\n <>\n {breakdown}\n {prodName}: {numeralWrapper.format(prod.data[props.warehouse.loc][0] * prod.siz, \"0,0.0\")}\n \n );\n }\n\n return (\n \n \n {breakdown} : \"\"}>\n = props.warehouse.size ? \"error\" : \"primary\"}>\n Storage: {numeralWrapper.formatBigNumber(props.warehouse.sizeUsed)} /{\" \"}\n {numeralWrapper.formatBigNumber(props.warehouse.size)}\n \n \n\n \n \n\n This industry uses the following equation for it's production: \n
\n \n \n \n
\n \n To get started with production, purchase your required materials or import them from another of your company's\n divisions.\n \n
\n\n {stateText}\n\n {corp.unlockUpgrades[1] && (\n <>\n \n setSmartSupplyOpen(false)}\n warehouse={props.warehouse}\n />\n \n )}\n\n {mats}\n\n {products}\n
\n );\n}\n\nexport function IndustryWarehouse(props: IProps): React.ReactElement {\n if (props.warehouse instanceof Warehouse) {\n return ;\n } else {\n return ;\n }\n}\n\ninterface IEmptyProps {\n city: string;\n rerender: () => void;\n}\n\nfunction EmptyWarehouse(props: IEmptyProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const disabled = corp.funds < CorporationConstants.WarehouseInitialCost;\n function purchaseWarehouse(): void {\n if (disabled) return;\n PurchaseWarehouse(corp, division, props.city);\n props.rerender();\n }\n return (\n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { Warehouse } from \"../Warehouse\";\nimport { SetSmartSupply, SetSmartSupplyUseLeftovers } from \"../Actions\";\nimport { Material } from \"../Material\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface ILeftoverProps {\n matName: string;\n warehouse: Warehouse;\n}\n\nfunction Leftover(props: ILeftoverProps): React.ReactElement {\n const [checked, setChecked] = useState(!!props.warehouse.smartSupplyUseLeftovers[props.matName]);\n\n function onChange(event: React.ChangeEvent): void {\n try {\n const material = props.warehouse.materials[props.matName];\n SetSmartSupplyUseLeftovers(props.warehouse, material, event.target.checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n setChecked(event.target.checked);\n }\n\n return (\n <>\n }\n label={{props.warehouse.materials[props.matName].name}}\n />\n
\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n warehouse: Warehouse;\n}\n\nexport function SmartSupplyModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // Smart Supply Checkbox\n function smartSupplyOnChange(e: React.ChangeEvent): void {\n SetSmartSupply(props.warehouse, e.target.checked);\n rerender();\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n if (!Object.keys(division.reqMats).includes(matName)) continue;\n mats.push();\n }\n\n return (\n \n <>\n }\n label={Enable Smart Supply}\n />\n
\n Use materials already in the warehouse instead of buying new ones, if available:\n {mats}\n \n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Product } from \"../Product\";\nimport { DiscontinueProductModal } from \"./DiscontinueProductModal\";\nimport { LimitProductProductionModal } from \"./LimitProductProductionModal\";\nimport { SellProductModal } from \"./SellProductModal\";\nimport { ProductMarketTaModal } from \"./ProductMarketTaModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProductProps {\n city: string;\n product: Product;\n rerender: () => void;\n}\n\n// Creates the UI for a single Product type\nexport function ProductElem(props: IProductProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [sellOpen, setSellOpen] = useState(false);\n const [limitOpen, setLimitOpen] = useState(false);\n const [discontinueOpen, setDiscontinueOpen] = useState(false);\n const [marketTaOpen, setMarketTaOpen] = useState(false);\n const city = props.city;\n const product = props.product;\n\n // Numeraljs formatters\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\");\n\n // Total product gain = production - sale\n const totalGain = product.data[city][1] - product.data[city][2];\n\n // Sell button\n let sellButtonText: JSX.Element;\n if (product.sllman[city][0]) {\n if (isString(product.sllman[city][1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/{product.sllman[city][1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/\n {numeralWrapper.format(product.sllman[city][1], nfB)})\n \n );\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n if (product.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.sCost) {\n if (isString(product.sCost)) {\n const sCost = (product.sCost as string).replace(/MP/g, product.pCost + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n\n // Limit Production button\n let limitProductionButtonText = \"Limit Production\";\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + numeralWrapper.format(product.prdman[city][1], nf) + \")\";\n }\n\n return (\n \n {!product.fin ? (\n <>\n \n Designing {product.name} (req. Operations/Engineers in {product.createCity})...\n \n
\n {numeralWrapper.format(product.prog, \"0.00\")}% complete\n \n ) : (\n <>\n \n \n Prod: {numeralWrapper.format(product.data[city][1], nfB)}/s\n
\n Sell: {numeralWrapper.format(product.data[city][2], nfB)} /s\n \n }\n >\n \n {product.name}: {numeralWrapper.format(product.data[city][0], nfB)} (\n {numeralWrapper.format(totalGain, nfB)}\n /s)\n \n \n
\n \n \n Quality: {numeralWrapper.format(product.qlt, nf)}
\n Performance: {numeralWrapper.format(product.per, nf)}
\n Durability: {numeralWrapper.format(product.dur, nf)}
\n Reliability: {numeralWrapper.format(product.rel, nf)}
\n Aesthetics: {numeralWrapper.format(product.aes, nf)}
\n Features: {numeralWrapper.format(product.fea, nf)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(product.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(product.cmp, nf)}\n \n }\n >\n Rating: {numeralWrapper.format(product.rat, nf)}\n \n
\n \n An estimate of the material cost it takes to create this Product.}>\n \n Est. Production Cost:{\" \"}\n {numeralWrapper.formatMoney(product.pCost / CorporationConstants.ProductProductionCostRatio)}\n \n \n \n \n \n An estimate of how much consumers are willing to pay for this product. Setting the sale price above\n this may result in less sales. Setting the sale price below this may result in more sales.\n \n }\n >\n Est. Market Price: {numeralWrapper.formatMoney(product.pCost)}\n \n \n \n )}\n\n {(hasUpgradeDashboard || product.fin) && (\n <>\n \n setSellOpen(false)} />\n
\n \n setLimitOpen(false)}\n />\n \n\n setDiscontinueOpen(false)}\n />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n setMarketTaOpen(false)} />\n \n )}\n \n )}\n
\n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../Product\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player discontinue a product\nexport function DiscontinueProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function discontinue(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no\n longer produce this product and all of its existing stock will be removed and left unsold\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Product } from \"../Product\";\nimport { LimitProductProduction } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitProductProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n function limitProductProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitProductProduction(props.product, props.city, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) limitProductProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this product you would like to product per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Product } from \"../Product\";\nimport { SellProduct } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\n\nfunction initialPrice(product: Product): string {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellProductModal(props: IProps): React.ReactElement {\n const [checked, setChecked] = useState(true);\n const [iQty, setQty] = useState(\n props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\",\n );\n const [px, setPx] = useState(initialPrice(props.product));\n\n function onCheckedChange(event: React.ChangeEvent): void {\n setChecked(event.target.checked);\n }\n\n function sellProduct(): void {\n try {\n SellProduct(props.product, props.city, iQty, px, checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setQty(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPx(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) sellProduct();\n }\n\n return (\n \n \n Enter the maximum amount of {props.product.name} you would like to sell per second, as well as the price at\n which you would like to sell it at.\n
\n
\n 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\n product will be discarded.\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on\n the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five\n times the estimated market price.\n
\n
\n \n \n \n }\n label={Use same 'Sell Amount' for all cities}\n />\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Product } from \"../Product\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface ITa2Props {\n product: Product;\n}\n\nfunction MarketTA2(props: ITa2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const markupLimit = props.product.rat / props.product.mku;\n const [value, setValue] = useState(props.product.pCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n setValue(parseFloat(event.target.value));\n }\n\n function onCheckedChange(event: React.ChangeEvent): void {\n props.product.marketTa2 = event.target.checked;\n rerender();\n }\n\n const sCost = value;\n let markup = 1;\n if (sCost > props.product.pCost) {\n if (sCost - props.product.pCost > markupLimit) {\n markup = markupLimit / (sCost - props.product.pCost);\n }\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n}\n\n// Create a popup that lets the player use the Market TA research for Products\nexport function ProductMarketTaModal(props: IProps): React.ReactElement {\n const markupLimit = props.product.rat / props.product.mku;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n props.product.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is{\" \"}\n {numeralWrapper.formatMoney(props.product.pCost + markupLimit)}. This means that if you set the sale price\n higher than this, you will begin to experience a loss in number of sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Material } from \"../Material\";\nimport { Warehouse } from \"../Warehouse\";\nimport { ExportModal } from \"./ExportModal\";\nimport { MaterialMarketTaModal } from \"./MaterialMarketTaModal\";\nimport { SellMaterialModal } from \"./SellMaterialModal\";\nimport { PurchaseMaterialModal } from \"./PurchaseMaterialModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IMaterialProps {\n warehouse: Warehouse;\n city: string;\n mat: Material;\n rerender: () => void;\n}\n\n// Creates the UI for a single Material type\nexport function MaterialElem(props: IMaterialProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [purchaseMaterialOpen, setPurchaseMaterialOpen] = useState(false);\n const [exportOpen, setExportOpen] = useState(false);\n const [sellMaterialOpen, setSellMaterialOpen] = useState(false);\n const [materialMarketTaOpen, setMaterialMarketTaOpen] = useState(false);\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n if (!(office instanceof OfficeSpace)) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n\n // Total gain or loss of this material (per second)\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp;\n\n // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n const tutorial =\n division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0;\n\n // Purchase material button\n const purchaseButtonText = `Buy (${numeralWrapper.format(mat.buy, nfB)})`;\n\n // Sell material button\n let sellButtonText: JSX.Element;\n if (mat.sllman[0]) {\n if (isString(mat.sllman[1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{mat.sllman[1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{numeralWrapper.format(mat.sllman[1] as number, nfB)})\n \n );\n }\n\n if (mat.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.marketTa1) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.sCost) {\n if (isString(mat.sCost)) {\n const sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n return (\n \n \n \n \n Buy: {numeralWrapper.format(mat.buy, nfB)}
\n Prod: {numeralWrapper.format(mat.prd, nfB)}
\n Sell: {numeralWrapper.format(mat.sll, nfB)}
\n Export: {numeralWrapper.format(mat.totalExp, nfB)}
\n Import: {numeralWrapper.format(mat.imp, nfB)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(mat.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(mat.cmp, nf)}\n \n }\n >\n \n {mat.name}: {numeralWrapper.format(mat.qty, nfB)} ({numeralWrapper.format(totalGain, nfB)}/s)\n \n \n \n Market Price: The price you would pay if you were to buy this material on the market\n \n }\n >\n MP: {numeralWrapper.formatMoney(mat.bCost)}\n \n The quality of your material. Higher quality will lead to more sales}\n >\n Quality: {numeralWrapper.format(mat.qlt, \"0.00a\")}\n \n
\n\n \n Purchase your required materials to get production started! : \"\"}\n >\n \n setPurchaseMaterialOpen(true)}\n disabled={props.warehouse.smartSupplyEnabled && Object.keys(division.reqMats).includes(props.mat.name)}\n >\n {purchaseButtonText}\n \n \n \n setPurchaseMaterialOpen(false)}\n />\n\n {corp.unlockUpgrades[0] === 1 && (\n <>\n \n\n setExportOpen(false)} />\n \n )}\n
\n\n setSellMaterialOpen(true)}\n >\n {sellButtonText}\n \n setSellMaterialOpen(false)} />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n\n setMaterialMarketTaOpen(false)}\n />\n \n )}\n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Material } from \"../Material\";\nimport { Export } from \"../Export\";\nimport { IIndustry } from \"../IIndustry\";\nimport { ExportMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player manage exports\nexport function ExportModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n if (corp.divisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n if (Object.keys(corp.divisions[0].warehouses).length === 0)\n throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = useState(corp.divisions[0].name);\n const [city, setCity] = useState(Object.keys(corp.divisions[0].warehouses)[0]);\n const [amt, setAmt] = useState(\"\");\n const setRerender = useState(false)[1];\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n const div = event.target.value;\n setIndustry(div);\n setCity(Object.keys(corp.divisions[0].warehouses)[0]);\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function exportMaterial(): void {\n try {\n ExportMaterial(industry, city, props.mat, amt);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function removeExport(exp: Export): void {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt)\n continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n rerender();\n }\n\n const currentDivision = corp.divisions.find((division: IIndustry) => division.name === industry);\n if (currentDivision === undefined)\n throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(\n (city) => currentDivision.warehouses[city] !== 0,\n );\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return (\n \n \n Select the industry and city to export this material to, as well as how much of this material to export per\n second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\n \n \n \n \n \n \n Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports\n below will REMOVE that export.\n \n {props.mat.exp.map((exp: Export, index: number) => (\n \n \n \n Industry: {exp.ind}\n
\n City: {exp.city}\n
\n Amount/s: {exp.amt}\n
\n
\n ))}\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Material } from \"../Material\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IMarketTA2Props {\n mat: Material;\n}\n\nfunction MarketTA2(props: IMarketTA2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const [newCost, setNewCost] = useState(props.mat.bCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setNewCost(0);\n else setNewCost(parseFloat(event.target.value));\n }\n\n const sCost = newCost;\n let markup = 1;\n if (sCost > props.mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - props.mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - props.mat.bCost), 2);\n }\n } else if (sCost < props.mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = props.mat.bCost / sCost;\n }\n }\n\n function onMarketTA2(event: React.ChangeEvent): void {\n props.mat.marketTa2 = event.target.checked;\n rerender();\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player use the Market TA research for Materials\nexport function MaterialMarketTaModal(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onMarketTA1(event: React.ChangeEvent): void {\n props.mat.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is {numeralWrapper.formatMoney(props.mat.bCost + markupLimit)}.\n This means that if you set the sale price higher than this, you will begin to experience a loss in number of\n sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Material } from \"../Material\";\nimport { SellMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\nfunction initialPrice(mat: Material): string {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellMaterialModal(props: IProps): React.ReactElement {\n const [amt, setAmt] = useState(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = useState(initialPrice(props.mat));\n\n function sellMaterial(): void {\n try {\n SellMaterial(props.mat, amt, price);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) sellMaterial();\n }\n\n return (\n \n \n Enter the maximum amount of {props.mat.name} you would like to sell per second, as well as the price at which\n you would like to sell at.\n
\n
\n 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\n material will be discarded\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that\n depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at\n $10 above the market price.\n
\n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { MaterialSizes } from \"../MaterialSizes\";\nimport { Warehouse } from \"../Warehouse\";\nimport { Material } from \"../Material\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BuyMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IBulkPurchaseTextProps {\n warehouse: Warehouse;\n mat: Material;\n amount: string;\n}\n\nfunction BulkPurchaseText(props: IBulkPurchaseTextProps): React.ReactElement {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n\n const matSize = MaterialSizes[props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt * matSize > maxAmount) {\n return (\n <>\n Not enough warehouse space to purchase this amount\n \n );\n } else if (isNaN(cost)) {\n return (\n <>\n Invalid put for Bulk Purchase amount\n \n );\n } else {\n return (\n <>\n \n Purchasing {numeralWrapper.format(parsedAmt, \"0,0.00\")} of {props.mat.name} will cost{\" \"}\n {numeralWrapper.formatMoney(cost)}\n \n \n );\n }\n}\n\ninterface IBPProps {\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\nfunction BulkPurchase(props: IBPProps): React.ReactElement {\n const corp = useCorporation();\n const [buyAmt, setBuyAmt] = useState(\"\");\n\n function bulkPurchase(): void {\n const amount = parseFloat(buyAmt);\n\n const matSize = MaterialSizes[props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n if (amount * matSize > maxAmount) {\n dialogBoxCreate(`You do not have enough warehouse size to fit this purchase`);\n return;\n }\n\n if (isNaN(amount)) {\n dialogBoxCreate(\"Invalid input amount\");\n } else {\n const cost = amount * props.mat.bCost;\n if (corp.funds >= cost) {\n corp.funds = corp.funds - cost;\n props.mat.qty += amount;\n } else {\n dialogBoxCreate(`You cannot afford this purchase.`);\n return;\n }\n props.onClose();\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) bulkPurchase();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(event.target.value);\n }\n\n return (\n <>\n \n Enter the amount of {props.mat.name} you would like to bulk purchase. This purchases the specified amount\n instantly (all at once).\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\n// Create a popup that lets the player purchase a Material\nexport function PurchaseMaterialModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const [buyAmt, setBuyAmt] = useState(props.mat.buy ? props.mat.buy : 0);\n\n function purchaseMaterial(): void {\n if (buyAmt === null) return;\n try {\n BuyMaterial(props.mat, buyAmt);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function clearPurchase(): void {\n props.mat.buy = 0;\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) purchaseMaterial();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return (\n \n <>\n \n Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes\n constantly.\n \n \n \n \n {division.hasResearch(\"Bulk Purchasing\") && (\n \n )}\n \n \n );\n}\n","import { IIndustry } from \"../IIndustry\";\n\n// Returns a boolean indicating whether the given material is relevant for the\n// current industry.\nexport function isRelevantMaterial(matName: string, division: IIndustry): boolean {\n // Materials that affect Production multiplier\n const prodMultiplierMats = [\"Hardware\", \"Robots\", \"AICores\", \"RealEstate\"];\n\n if (Object.keys(division.reqMats).includes(matName)) {\n return true;\n }\n if (division.prodMats.includes(matName)) {\n return true;\n }\n if (prodMultiplierMats.includes(matName)) {\n return true;\n }\n\n return false;\n}\n","import React from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ninterface IProps {\n division: IIndustry;\n}\n\nexport function IndustryProductEquation(props: IProps): React.ReactElement {\n const reqs = [];\n for (const reqMat of Object.keys(props.division.reqMats)) {\n const reqAmt = props.division.reqMats[reqMat];\n if (reqAmt === undefined) continue;\n reqs.push(String.raw`${reqAmt}\\text{ }${reqMat}`);\n }\n const prod = props.division.prodMats.slice();\n if (props.division.makesProducts) {\n prod.push(props.division.type);\n }\n\n return (\n \n {\"\\\\(\" + reqs.join(\"+\") + `\\\\Rightarrow` + prod.map((p) => `1 \\\\text{${p}}`).join(\"+\") + \"\\\\)\"}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { NewCity } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n cityStateSetter: (city: string) => void;\n}\n\nexport function ExpandNewCity(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const possibleCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0);\n const [city, setCity] = useState(possibleCities[0]);\n\n const disabled = corp.funds < CorporationConstants.OfficeInitialCost;\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function expand(): void {\n try {\n NewCity(corp, division, city);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(`Opened a new office in ${city}!`);\n\n props.cityStateSetter(city);\n }\n return (\n <>\n \n Would you like to expand into a new city by opening an office? This would cost{\" \"}\n \n \n \n Confirm\n \n }\n value={city}\n onChange={onCityChange}\n >\n {possibleCities.map((cityName: string) => (\n \n {cityName}\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { IndustryStartingCosts, Industries, IndustryDescriptions } from \"../IndustryData\";\nimport { useCorporation } from \"./Context\";\nimport { IIndustry } from \"../IIndustry\";\nimport { NewIndustry } from \"../Actions\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n setDivisionName: (name: string) => void;\n}\n\nexport function ExpandIndustryTab(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const allIndustries = Object.keys(Industries).sort();\n const possibleIndustries = allIndustries\n .filter(\n (industryType: string) =>\n corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n )\n .sort();\n const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = useState(\"\");\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n const disabled = corp.funds < cost || name === \"\";\n\n function newIndustry(): void {\n if (disabled) return;\n try {\n NewIndustry(corp, industry, name);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n // Set routing to the new division so that the UI automatically switches to it\n props.setDivisionName(name);\n }\n\n function onNameChange(event: React.ChangeEvent): void {\n // [a-zA-Z0-9-_]\n setName(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) newIndustry();\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n setIndustry(event.target.value);\n }\n\n const desc = IndustryDescriptions[industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n\n return (\n <>\n Create a new division to expand into a new industry:\n \n {desc(corp)}\n
\n
\n\n Division name:\n\n \n \n Expand\n \n ),\n }}\n />\n \n \n );\n}\n","// React Component for displaying Corporation Overview info\nimport React, { useState } from \"react\";\nimport { LevelableUpgrade } from \"./LevelableUpgrade\";\nimport { UnlockUpgrade } from \"./UnlockUpgrade\";\nimport { BribeFactionModal } from \"./BribeFactionModal\";\nimport { SellSharesModal } from \"./SellSharesModal\";\nimport { BuybackSharesModal } from \"./BuybackSharesModal\";\nimport { IssueDividendsModal } from \"./IssueDividendsModal\";\nimport { IssueNewSharesModal } from \"./IssueNewSharesModal\";\nimport { FindInvestorsModal } from \"./FindInvestorsModal\";\nimport { GoPublicModal } from \"./GoPublicModal\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"../data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"../data/CorporationUpgrades\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n rerender: () => void;\n}\nexport function Overview({ rerender }: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const profit: number = corp.revenue - corp.expenses;\n\n const multRows: any[][] = [];\n function appendMult(name: string, value: number): void {\n if (value === 1) return;\n multRows.push([name, numeralWrapper.format(value, \"0.000\")]);\n }\n appendMult(\"Production Multiplier: \", corp.getProductionMultiplier());\n appendMult(\"Storage Multiplier: \", corp.getStorageMultiplier());\n appendMult(\"Advertising Multiplier: \", corp.getAdvertisingMultiplier());\n appendMult(\"Empl. Creativity Multiplier: \", corp.getEmployeeCreMultiplier());\n appendMult(\"Empl. Charisma Multiplier: \", corp.getEmployeeChaMultiplier());\n appendMult(\"Empl. Intelligence Multiplier: \", corp.getEmployeeIntMultiplier());\n appendMult(\"Empl. Efficiency Multiplier: \", corp.getEmployeeEffMultiplier());\n appendMult(\"Sales Multiplier: \", corp.getSalesMultiplier());\n appendMult(\"Scientific Research Multiplier: \", corp.getScientificResearchMultiplier());\n\n return (\n <>\n ],\n [\"Total Revenue:\", ],\n [\"Total Expenses:\", ],\n [\"Publicly Traded:\", corp.public ? \"Yes\" : \"No\"],\n [\"Owned Stock Shares:\", numeralWrapper.format(corp.numShares, \"0.000a\")],\n [\"Stock Price:\", corp.public ? : \"N/A\"],\n ]}\n />\n
\n \n \n }\n >\n Total Stock Shares: {numeralWrapper.format(corp.totalShares, \"0.000a\")}\n \n \n
\n \n
\n \n
\n \n \n Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file\n that guides you through the beginning of setting up a Corporation and provides some tips/pointers for\n helping you get started with managing it.\n \n }\n >\n \n \n {corp.public ? : }\n \n
\n \n \n );\n}\n\ninterface IPrivateButtonsProps {\n rerender: () => void;\n}\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({ rerender }: IPrivateButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [findInvestorsopen, setFindInvestorsopen] = useState(false);\n const [goPublicopen, setGoPublicopen] = useState(false);\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsTooltip = fundingAvailable\n ? \"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company\"\n : \"\";\n\n return (\n <>\n {findInvestorsTooltip}}>\n \n \n \n \n \n Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a\n public company, your shares will be traded on the stock market.\n \n }\n >\n \n \n setFindInvestorsopen(false)} rerender={rerender} />\n setGoPublicopen(false)} rerender={rerender} />\n
\n \n );\n}\n\ninterface IUpgradeProps {\n rerender: () => void;\n}\n// Render the UI for Corporation upgrades\nfunction Upgrades({ rerender }: IUpgradeProps): React.ReactElement {\n const corp = useCorporation();\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return Upgrades are unlocked once you create an industry.;\n }\n\n return (\n <>\n \n Unlocks\n \n {Object.values(CorporationUnlockUpgrades)\n .filter((upgrade: CorporationUnlockUpgrade) => !corp.unlockUpgrades[upgrade[0]])\n .map((upgrade: CorporationUnlockUpgrade) => (\n \n ))}\n \n \n \n Upgrades\n \n {corp.upgrades\n .map((level: number, i: number) => CorporationUpgrades[i])\n .map((upgrade: CorporationUpgrade) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IPublicButtonsProps {\n rerender: () => void;\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({ rerender }: IPublicButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [sellSharesOpen, setSellSharesOpen] = useState(false);\n const [buybackSharesOpen, setBuybackSharesOpen] = useState(false);\n const [issueNewSharesOpen, setIssueNewSharesOpen] = useState(false);\n const [issueDividendsOpen, setIssueDividendsOpen] = useState(false);\n\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesTooltip = sellSharesOnCd\n ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown)\n : \"Sell your shares in the company. The money earned from selling your \" +\n \"shares goes into your personal account, not the Corporation's. \" +\n \"This is one of the only ways to profit from your business venture.\";\n\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesTooltip = issueNewSharesOnCd\n ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown)\n : \"Issue new equity shares to raise capital.\";\n\n return (\n <>\n {sellSharesTooltip}}>\n \n \n \n \n setSellSharesOpen(false)} rerender={rerender} />\n Buy back shares you that previously issued or sold at market price.}>\n \n \n \n \n setBuybackSharesOpen(false)} rerender={rerender} />\n
\n {issueNewSharesTooltip}}>\n \n \n \n \n setIssueNewSharesOpen(false)} />\n Manage the dividends that are paid out to shareholders (including yourself)}\n >\n \n \n setIssueDividendsOpen(false)} />\n
\n \n );\n}\n\nfunction BribeButton(): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [open, setOpen] = useState(false);\n const canBribe =\n corp.determineValuation() >= CorporationConstants.BribeThreshold &&\n player.factions.filter((f) => Factions[f].getInfo().offersWork()).length > 0;\n\n function openBribe(): void {\n if (!canBribe) return;\n setOpen(true);\n }\n\n return (\n <>\n \n \n \n \n \n setOpen(false)} />\n \n );\n}\n\ninterface IDividendsStatsProps {\n profit: number;\n}\nfunction DividendsStats({ profit }: IDividendsStatsProps): React.ReactElement {\n const corp = useCorporation();\n if (corp.dividendPercentage <= 0 || profit <= 0) return <>;\n const totalDividends = (corp.dividendPercentage / 100) * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n return (\n ],\n [\"Dividend Percentage:\", numeralWrapper.format(corp.dividendPercentage / 100, \"0%\")],\n [\"Dividends per share:\", ],\n [\"Your earnings as a shareholder:\", ],\n ]}\n />\n );\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime(): React.ReactElement {\n const corp = useCorporation();\n const storedTime = corp.storedCycles * CONSTANTS.MilliPerCycle;\n if (storedTime <= 15000) return <>;\n return (\n \n Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}\n
\n
\n
\n );\n}\n","// React components for the levelable upgrade buttons on the overview panel\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUpgrade } from \"../data/CorporationUpgrades\";\nimport { LevelUpgrade } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgrade: CorporationUpgrade;\n rerender: () => void;\n}\n\nexport function LevelableUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgrade;\n const level = corp.upgrades[data[0]];\n\n const baseCost = data[1];\n const priceMult = data[2];\n const cost = baseCost * Math.pow(priceMult, level);\n\n const tooltip = data[5];\n function onClick(): void {\n if (corp.funds < cost) return;\n try {\n LevelUpgrade(corp, props.upgrade);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n \n {data[4]} - lvl {level}\n \n \n \n \n );\n}\n","// React Components for the Unlock upgrade buttons on the overview page\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUnlockUpgrade } from \"../data/CorporationUnlockUpgrades\";\nimport { useCorporation } from \"./Context\";\nimport { UnlockUpgrade as UU } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgradeData: CorporationUnlockUpgrade;\n rerender: () => void;\n}\n\nexport function UnlockUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgradeData;\n const tooltip = data[3];\n function onClick(): void {\n if (corp.funds < data[1]) return;\n try {\n UU(corp, props.upgradeData);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n {data[2]}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function BribeFactionModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const factions = player.factions.filter((name: string) => {\n const info = Factions[name].getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(name)) return false;\n return true;\n });\n const corp = useCorporation();\n const [money, setMoney] = useState(0);\n const [stock, setStock] = useState(0);\n const [selectedFaction, setSelectedFaction] = useState(factions.length > 0 ? factions[0] : \"\");\n const disabled =\n money === null ||\n stock === null ||\n (money === 0 && stock === 0) ||\n isNaN(money) ||\n isNaN(stock) ||\n money < 0 ||\n stock < 0 ||\n corp.funds < money ||\n stock > corp.numShares;\n\n function onMoneyChange(event: React.ChangeEvent): void {\n setMoney(parseFloat(event.target.value));\n }\n\n function onStockChange(event: React.ChangeEvent): void {\n setStock(parseFloat(event.target.value));\n }\n\n function changeFaction(event: SelectChangeEvent): void {\n setSelectedFaction(event.target.value);\n }\n\n function repGain(money: number, stock: number): number {\n return (money + stock * corp.sharePrice) / CorporationConstants.BribeToRepRatio;\n }\n\n function getRepText(money: number, stock: number): string {\n if (money === 0 && stock === 0) return \"\";\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {\n return \"ERROR: Invalid value(s) entered\";\n } else if (corp.funds < money) {\n return \"ERROR: You do not have this much money to bribe with\";\n } else if (stock > corp.numShares) {\n return \"ERROR: You do not have this many shares to bribe with\";\n } else {\n return (\n \"You will gain \" +\n numeralWrapper.formatReputation(repGain(money, stock)) +\n \" reputation with \" +\n selectedFaction +\n \" with this bribe\"\n );\n }\n }\n\n function bribe(money: number, stock: number): void {\n const fac = Factions[selectedFaction];\n if (disabled) return;\n const rep = repGain(money, stock);\n dialogBoxCreate(\n \"You gained \" + numeralWrapper.formatReputation(rep) + \" reputation with \" + fac.name + \" by bribing them.\",\n );\n fac.playerReputation += rep;\n corp.funds = corp.funds - money;\n corp.numShares -= stock;\n props.onClose();\n }\n\n return (\n \n \n You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation.\n \n \n Faction:\n \n \n {getRepText(money ? money : 0, stock ? stock : 0)}\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { ICorporation } from \"../ICorporation\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player sell Corporation shares\n// This is created when the player clicks the \"Sell Shares\" button in the overview panel\nexport function SellSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n const disabled = shares === null || isNaN(shares) || shares <= 0 || shares > corp.numShares;\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n function ProfitIndicator(props: { shares: number | null; corp: ICorporation }): React.ReactElement {\n if (props.shares === null) return <>;\n if (isNaN(props.shares) || props.shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to sell;\n } else if (props.shares > corp.numShares) {\n return <>You don't have this many shares to sell!;\n } else {\n const stockSaleResults = corp.calculateShareSale(props.shares);\n const profit = stockSaleResults[0];\n return (\n <>\n Sell {props.shares} shares for a total of {numeralWrapper.formatMoney(profit)}\n \n );\n }\n }\n\n function sell(): void {\n if (shares === null) return;\n if (disabled) return;\n const stockSaleResults = corp.calculateShareSale(shares);\n const profit = stockSaleResults[0];\n const newSharePrice = stockSaleResults[1];\n const newSharesUntilUpdate = stockSaleResults[2];\n\n corp.numShares -= shares;\n if (isNaN(corp.issuedShares)) {\n console.error(`Corporation issuedShares is NaN: ${corp.issuedShares}`);\n const res = corp.issuedShares;\n if (isNaN(res)) {\n corp.issuedShares = 0;\n } else {\n corp.issuedShares = res;\n }\n }\n corp.issuedShares += shares;\n corp.sharePrice = newSharePrice;\n corp.shareSalesUntilPriceUpdate = newSharesUntilUpdate;\n corp.shareSaleCooldown = CorporationConstants.SellSharesCooldown;\n player.gainMoney(profit, \"corporation\");\n props.onClose();\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatMoney(shares)} shares for\n . The corporation's stock price fell to  \n as a result of dilution.\n ,\n );\n\n props.rerender();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) sell();\n }\n\n return (\n \n \n Enter the number of shares you would like to sell. The money from selling your shares will go directly to you\n (NOT your Corporation).\n
\n
\n Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a\n large number of shares all at once will have an immediate effect in reducing your stock price.\n
\n
\n The current price of your company's stock is {numeralWrapper.formatMoney(corp.sharePrice)}\n
\n \n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player buyback shares\n// This is created when the player clicks the \"Buyback Shares\" button in the overview panel\nexport function BuybackSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n const currentStockPrice = corp.sharePrice;\n const buybackPrice = currentStockPrice * 1.1;\n const disabled =\n shares === null ||\n isNaN(shares) ||\n shares <= 0 ||\n shares > corp.issuedShares ||\n shares * buybackPrice > player.money;\n\n function buy(): void {\n if (disabled) return;\n if (shares === null) return;\n corp.numShares += shares;\n if (isNaN(corp.issuedShares)) {\n console.warn(\"Corporation issuedShares is NaN: \" + corp.issuedShares);\n console.warn(\"Converting to number now\");\n const res = corp.issuedShares;\n if (isNaN(res)) {\n corp.issuedShares = 0;\n } else {\n corp.issuedShares = res;\n }\n }\n corp.issuedShares -= shares;\n player.loseMoney(shares * buybackPrice, \"corporation\");\n props.onClose();\n props.rerender();\n }\n\n function CostIndicator(): React.ReactElement {\n if (shares === null) return <>;\n if (isNaN(shares) || shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to buyback;\n } else if (shares > corp.issuedShares) {\n return (\n <>\n There are not this many shares available to buy back. There are only{\" \"}\n {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding shares.\n \n );\n } else {\n return (\n <>\n Purchase {shares} shares for a total of {numeralWrapper.formatMoney(shares * buybackPrice)}\n \n );\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) buy();\n }\n\n return (\n \n \n Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium.\n However, repurchasing shares from the market tends to lead to an increase in stock price.\n
\n
\n To purchase these shares, you must use your own money (NOT your Corporation's funds).\n
\n
\n The current buyback price of your company's stock is {numeralWrapper.formatMoney(buybackPrice)}. Your company\n currently has {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding stock shares.\n
\n \n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { IssueDividends } from \"../Actions\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nexport function IssueDividendsModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [percent, setPercent] = useState(0);\n\n const canIssue = !isNaN(percent) && percent >= 0 && percent <= CorporationConstants.DividendMaxPercentage * 100;\n function issueDividends(): void {\n if (!canIssue) return;\n if (percent === null) return;\n try {\n IssueDividends(corp, percent / 100);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) issueDividends();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setPercent(0);\n else {\n let p = parseFloat(event.target.value);\n if (p > 100) p = 100;\n if (p < 0) p = 0;\n setPercent(p);\n }\n }\n\n return (\n \n \n Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes\n yourself, as well.\n
\n
\n In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This\n percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)\n
\n
\n Two important things to note:\n
\n * Issuing dividends will negatively affect your corporation's stock price\n
\n
\n Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends.\n That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as\n dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share\n per second before taxes.\n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IEffectTextProps {\n shares: number | null;\n}\n\nfunction EffectText(props: IEffectTextProps): React.ReactElement {\n const corp = useCorporation();\n if (props.shares === null) return <>;\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n let newShares = props.shares;\n if (isNaN(newShares)) {\n return Invalid input;\n }\n\n // Round to nearest ten-millionth\n newShares /= 10e6;\n newShares = Math.round(newShares) * 10e6;\n\n if (newShares < 10e6) {\n return Must issue at least 10 million new shares;\n }\n\n if (newShares > maxNewShares) {\n return You cannot issue that many shares;\n }\n\n return (\n \n Issue {numeralWrapper.format(newShares, \"0.000a\")} new shares for{\" \"}\n {numeralWrapper.formatMoney(newShares * newSharePrice)}?\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue new shares\n// This is created when the player clicks the \"Issue New Shares\" buttons in the overview panel\nexport function IssueNewSharesModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n\n const newShares = Math.round((shares || 0) / 10e6) * 10e6;\n const disabled = shares === null || isNaN(newShares) || newShares < 10e6 || newShares > maxNewShares;\n\n function issueNewShares(): void {\n if (shares === null) return;\n if (disabled) return;\n\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n let newShares = shares;\n\n // Round to nearest ten-millionth\n newShares = Math.round(newShares / 10e6) * 10e6;\n\n const profit = newShares * newSharePrice;\n corp.issueNewSharesCooldown = CorporationConstants.IssueNewSharesCooldown;\n corp.totalShares += newShares;\n\n // Determine how many are bought by private investors\n // Private investors get up to 50% at most\n // Round # of private shares to the nearest millionth\n let privateShares = getRandomInt(0, Math.round(newShares / 2));\n privateShares = Math.round(privateShares / 1e6) * 1e6;\n\n corp.issuedShares += newShares - privateShares;\n corp.funds = corp.funds + profit;\n corp.immediatelyUpdateSharePrice();\n props.onClose();\n dialogBoxCreate(\n `Issued ${numeralWrapper.format(newShares, \"0.000a\")} and raised ` +\n `${numeralWrapper.formatMoney(profit)}. ${numeralWrapper.format(privateShares, \"0.000a\")} ` +\n `of these shares were bought by private investors.

` +\n `Stock price decreased to ${numeralWrapper.formatMoney(corp.sharePrice)}`,\n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) issueNewShares();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(parseFloat(event.target.value));\n }\n\n return (\n \n \n You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.\n
\n
\n  * You can issue at most {numeralWrapper.formatMoney(maxNewShares)} new shares\n
\n  * New shares are sold at a 10% discount\n
\n  * You can only issue new shares once every 12 hours\n
\n  * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share\n
\n  * Number of new shares issued must be a multiple of 10 million\n
\n
\n When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares.\n If they choose to exercise this option, these newly issued shares become private, restricted shares, which means\n you cannot buy them back.\n
\n \n \n \n
\n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function FindInvestorsModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const val = corp.determineValuation();\n let percShares = 0;\n let roundMultiplier = 4;\n switch (corp.fundingRound) {\n case 0: //Seed\n percShares = 0.1;\n roundMultiplier = 4;\n break;\n case 1: //Series A\n percShares = 0.35;\n roundMultiplier = 3;\n break;\n case 2: //Series B\n percShares = 0.25;\n roundMultiplier = 3;\n break;\n case 3: //Series C\n percShares = 0.2;\n roundMultiplier = 2.5;\n break;\n default:\n return <>;\n }\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n\n function findInvestors(): void {\n corp.fundingRound++;\n corp.addFunds(funding);\n corp.numShares -= investShares;\n props.rerender();\n props.onClose();\n }\n return (\n \n \n An investment firm has offered you {numeralWrapper.formatMoney(funding)} in funding in exchange for a{\" \"}\n {numeralWrapper.format(percShares * 100, \"0.000a\")}% stake in the company (\n {numeralWrapper.format(investShares, \"0.000a\")} shares).\n
\n
\n Do you accept or reject this offer?\n
\n
\n Hint: Investment firms will offer more money if your corporation is turning a profit\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function GoPublicModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(\"\");\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n\n function goPublic(): void {\n const numShares = parseFloat(shares);\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n if (isNaN(numShares)) {\n dialogBoxCreate(\"Invalid value for number of issued shares\");\n return;\n }\n if (numShares > corp.numShares) {\n dialogBoxCreate(\"Error: You don't have that many shares to issue!\");\n return;\n }\n corp.public = true;\n corp.sharePrice = initialSharePrice;\n corp.issuedShares = numShares;\n corp.numShares -= numShares;\n corp.addFunds(numShares * initialSharePrice);\n props.rerender();\n dialogBoxCreate(\n `You took your ${corp.name} public and earned ` +\n `${numeralWrapper.formatMoney(numShares * initialSharePrice)} in your IPO`,\n );\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) goPublic();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setShares(event.target.value);\n }\n\n return (\n \n \n Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will\n no longer own them. Your Corporation will receive {numeralWrapper.formatMoney(initialSharePrice)} per share (the\n IPO money will be deposited directly into your Corporation's funds).\n
\n
\n You have a total of {numeralWrapper.format(corp.numShares, \"0.000a\")} of shares that you can issue.\n
\n \n \n corp.numShares}\n sx={{ mx: 1 }}\n onClick={goPublic}\n >\n Go Public\n \n \n
\n );\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport React, { useState } from \"react\";\nimport { Intro } from \"./Intro\";\nimport { Game } from \"./Game\";\nimport { Location } from \"../../Locations/Location\";\nimport { use } from \"../../ui/Context\";\nimport { calculateSkill } from \"../../PersonObjects/formulas/skill\";\n\ninterface IProps {\n location: Location;\n}\n\nfunction calcRawDiff(player: IPlayer, stats: number, startingDifficulty: number): number {\n const difficulty = startingDifficulty - Math.pow(stats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nfunction calcDifficulty(player: IPlayer, startingDifficulty: number): number {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n return calcRawDiff(player, totalStats, startingDifficulty);\n}\n\nfunction calcReward(player: IPlayer, startingDifficulty: number): number {\n const xpMult = 10 * 60 * 15;\n const total =\n calculateSkill(player.strength_exp_mult * xpMult, player.strength_mult) +\n calculateSkill(player.defense_exp_mult * xpMult, player.defense_mult) +\n calculateSkill(player.agility_exp_mult * xpMult, player.agility_mult) +\n calculateSkill(player.dexterity_exp_mult * xpMult, player.dexterity_mult) +\n calculateSkill(player.charisma_exp_mult * xpMult, player.charisma_mult);\n return calcRawDiff(player, total, startingDifficulty);\n}\n\nexport function InfiltrationRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [start, setStart] = useState(false);\n\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = props.location.infiltrationData.startingSecurityLevel;\n const difficulty = calcDifficulty(player, startingDifficulty);\n const reward = calcReward(player, startingDifficulty);\n console.log(`${difficulty} ${reward}`);\n\n function cancel(): void {\n router.toCity();\n }\n\n if (!start) {\n return (\n setStart(true)}\n cancel={cancel}\n />\n );\n }\n\n return (\n \n );\n}\n","import React from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport Grid from \"@mui/material/Grid\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\ninterface IProps {\n Location: Location;\n Difficulty: number;\n MaxLevel: number;\n start: () => void;\n cancel: () => void;\n}\n\nfunction arrowPart(color: string, length: number): JSX.Element {\n let arrow = \"\";\n if (length <= 0) length = 0;\n else if (length > 13) length = 13;\n else {\n length--;\n arrow = \">\";\n }\n return (\n \n {\"=\".repeat(length)}\n {arrow}\n {\" \".repeat(13 - arrow.length - length)}\n \n );\n}\n\nfunction coloredArrow(difficulty: number): JSX.Element {\n if (difficulty === 0) {\n return (\n \n {\">\"}\n {\" \".repeat(38)}\n \n );\n } else {\n return (\n <>\n {arrowPart(\"white\", difficulty * 13)}\n {arrowPart(\"orange\", (difficulty - 1) * 13)}\n {arrowPart(\"red\", (difficulty - 2) * 13)}\n \n );\n }\n}\n\nexport function Intro(props: IProps): React.ReactElement {\n return (\n <>\n \n \n Infiltrating {props.Location.name}\n \n \n \n Maximum level: {props.MaxLevel}\n \n \n \n \n Difficulty: {numeralWrapper.format(props.Difficulty * 33.3333, \"0\")} / 100\n \n \n\n {props.Difficulty > 1.5 && (\n \n \n Warning: This location is too heavily guarded for your current stats, try training or finding an easier\n location.\n \n \n )}\n\n \n [{coloredArrow(props.Difficulty)}]\n {` ^ ^ ^ ^`}\n {` Trivial Normal Hard Impossible`}\n \n \n \n Infiltration is a series of short minigames that get progressively harder. You take damage for failing them.\n Reaching the maximum level rewards you with intel you can trade for money or reputation.\n \n
\n \n The minigames you play are randomly selected. It might take you few tries to get used to them.\n \n
\n No game require use of the mouse.\n
\n Spacebar is the default action/confirm button.\n
\n Everything that uses arrow can also use WASD\n
\n Sometimes the rest of the keyboard is used.\n
\n \n \n \n \n \n \n
\n \n );\n}\n","import { use } from \"../../ui/Context\";\nimport React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { Countdown } from \"./Countdown\";\nimport { BracketGame } from \"./BracketGame\";\nimport { SlashGame } from \"./SlashGame\";\nimport { BackwardGame } from \"./BackwardGame\";\nimport { BribeGame } from \"./BribeGame\";\nimport { CheatCodeGame } from \"./CheatCodeGame\";\nimport { Cyberpunk2077Game } from \"./Cyberpunk2077Game\";\nimport { MinesweeperGame } from \"./MinesweeperGame\";\nimport { WireCuttingGame } from \"./WireCuttingGame\";\nimport { Victory } from \"./Victory\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nenum Stage {\n Countdown = 0,\n Minigame,\n Result,\n Sell,\n}\n\nconst minigames = [\n SlashGame,\n BracketGame,\n BackwardGame,\n BribeGame,\n CheatCodeGame,\n Cyberpunk2077Game,\n MinesweeperGame,\n WireCuttingGame,\n];\n\nexport function Game(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [level, setLevel] = useState(1);\n const [stage, setStage] = useState(Stage.Countdown);\n const [results, setResults] = useState(\"\");\n const [gameIds, setGameIds] = useState({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length),\n });\n\n function nextGameId(): number {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n return id;\n }\n\n function setupNextGame(): void {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId(),\n });\n }\n\n function success(): void {\n pushResult(true);\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n setupNextGame();\n }\n\n function pushResult(win: boolean): void {\n setResults((old) => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options?: { automated: boolean }): void {\n setStage(Stage.Countdown);\n pushResult(false);\n // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n const damage = options?.automated ? player.hp : props.StartingDifficulty * 3;\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n setupNextGame();\n }\n\n let stageComponent: React.ReactNode;\n switch (stage) {\n case Stage.Countdown:\n stageComponent = setStage(Stage.Minigame)} />;\n break;\n case Stage.Minigame: {\n const MiniGame = minigames[gameIds.id];\n stageComponent = ;\n break;\n }\n case Stage.Sell:\n stageComponent = (\n \n );\n break;\n }\n\n function Progress(): React.ReactElement {\n return (\n \n {results.slice(0, results.length - 1)}\n {results[results.length - 1]}\n \n );\n }\n\n return (\n <>\n \n \n \n Level: {level} / {props.MaxLevel}\n \n \n \n\n \n {stageComponent}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\n\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n onFinish: () => void;\n}\n\nexport function Countdown(props: IProps): React.ReactElement {\n const [x, setX] = useState(3);\n useEffect(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n setTimeout(() => setX(x - 1), 200);\n });\n\n return (\n <>\n \n \n Get Ready!\n {x}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 8000, min: 2, max: 3 },\n Normal: { timer: 6000, min: 4, max: 5 },\n Hard: { timer: 4000, min: 4, max: 6 },\n Impossible: { timer: 2500, min: 7, max: 7 },\n};\n\nfunction generateLeftSide(difficulty: Difficulty): string {\n let str = \"\";\n const length = random(difficulty.min, difficulty.max);\n for (let i = 0; i < length; i++) {\n str += [\"[\", \"<\", \"(\", \"{\"][Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event: KeyboardEvent): string {\n if (event.key === \")\") return \")\";\n if (event.key === \"]\") return \"]\";\n if (event.key === \"}\") return \"}\";\n if (event.key === \">\") return \">\";\n return \"\";\n}\n\nfunction match(left: string, right: string): boolean {\n return (\n (left === \"[\" && right === \"]\") ||\n (left === \"<\" && right === \">\") ||\n (left === \"(\" && right === \")\") ||\n (left === \"{\" && right === \"}\")\n );\n}\n\nexport function BracketGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = useState(\"\");\n const [left] = useState(generateLeftSide(difficulty));\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n setRight(right + char);\n }\n\n return (\n \n \n \n Close the brackets\n \n {`${left}${right}`}\n \n \n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n window: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { window: 600 },\n Normal: { window: 325 },\n Hard: { window: 250 },\n Impossible: { window: 150 },\n};\n\nexport function SlashGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { window: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const [phase, setPhase] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key !== \" \") return;\n if (phase !== 2) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n useEffect(() => {\n let id = window.setTimeout(() => {\n setPhase(1);\n id = window.setTimeout(() => {\n setPhase(2);\n id = window.setTimeout(() => setPhase(0), difficulty.window);\n }, 250);\n }, Math.random() * 3250 + 1500 - (250 + difficulty.window));\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return (\n \n \n \n Slash when his guard is down!\n {phase === 0 && Guarding ...}\n {phase === 1 && Preparing?}\n {phase === 2 && ATTACKING!}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 16000, min: 3, max: 4 },\n Normal: { timer: 12500, min: 2, max: 3 },\n Hard: { timer: 15000, min: 3, max: 4 },\n Impossible: { timer: 8000, min: 4, max: 4 },\n};\n\nexport function BackwardGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = useState(makeAnswer(difficulty));\n const [guess, setGuess] = useState(\"\");\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key === \"Backspace\") return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();\n else if (answer === nextGuess) props.onSuccess();\n else setGuess(nextGuess);\n }\n\n return (\n \n \n \n Type it backward\n \n \n \n {answer}\n \n \n \n {guess}\n \n \n \n \n );\n}\n\nfunction makeAnswer(difficulty: Difficulty): string {\n const length = random(difficulty.min, difficulty.max);\n let answer = \"\";\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\n \"ALGORITHM\",\n \"ANALOG\",\n \"APP\",\n \"APPLICATION\",\n \"ARRAY\",\n \"BACKUP\",\n \"BANDWIDTH\",\n \"BINARY\",\n \"BIT\",\n \"BITE\",\n \"BITMAP\",\n \"BLOG\",\n \"BLOGGER\",\n \"BOOKMARK\",\n \"BOOT\",\n \"BROADBAND\",\n \"BROWSER\",\n \"BUFFER\",\n \"BUG\",\n \"BUS\",\n \"BYTE\",\n \"CACHE\",\n \"CAPS LOCK\",\n \"CAPTCHA\",\n \"CD\",\n \"CD-ROM\",\n \"CLIENT\",\n \"CLIPBOARD\",\n \"CLOUD\",\n \"COMPUTING\",\n \"COMMAND\",\n \"COMPILE\",\n \"COMPRESS\",\n \"COMPUTER\",\n \"CONFIGURE\",\n \"COOKIE\",\n \"COPY\",\n \"CPU\",\n \"CYBERCRIME\",\n \"CYBERSPACE\",\n \"DASHBOARD\",\n \"DATA\",\n \"MINING\",\n \"DATABASE\",\n \"DEBUG\",\n \"DECOMPRESS\",\n \"DELETE\",\n \"DESKTOP\",\n \"DEVELOPMENT\",\n \"DIGITAL\",\n \"DISK\",\n \"DNS\",\n \"DOCUMENT\",\n \"DOMAIN\",\n \"DOMAIN NAME\",\n \"DOT\",\n \"DOT MATRIX\",\n \"DOWNLOAD\",\n \"DRAG\",\n \"DVD\",\n \"DYNAMIC\",\n \"EMAIL\",\n \"EMOTICON\",\n \"ENCRYPT\",\n \"ENCRYPTION\",\n \"ENTER\",\n \"EXABYTE\",\n \"FAQ\",\n \"FILE\",\n \"FINDER\",\n \"FIREWALL\",\n \"FIRMWARE\",\n \"FLAMING\",\n \"FLASH\",\n \"FLASH DRIVE\",\n \"FLOPPY DISK\",\n \"FLOWCHART\",\n \"FOLDER\",\n \"FONT\",\n \"FORMAT\",\n \"FRAME\",\n \"FREEWARE\",\n \"GIGABYTE\",\n \"GRAPHICS\",\n \"HACK\",\n \"HACKER\",\n \"HARDWARE\",\n \"HOME PAGE\",\n \"HOST\",\n \"HTML\",\n \"HYPERLINK\",\n \"HYPERTEXT\",\n \"ICON\",\n \"INBOX\",\n \"INTEGER\",\n \"INTERFACE\",\n \"INTERNET\",\n \"IP ADDRESS\",\n \"ITERATION\",\n \"JAVA\",\n \"JOYSTICK\",\n \"JUNKMAIL\",\n \"KERNEL\",\n \"KEY\",\n \"KEYBOARD\",\n \"KEYWORD\",\n \"LAPTOP\",\n \"LASER PRINTER\",\n \"LINK\",\n \"LINUX\",\n \"LOG OUT\",\n \"LOGIC\",\n \"LOGIN\",\n \"LURKING\",\n \"MACINTOSH\",\n \"MACRO\",\n \"MAINFRAME\",\n \"MALWARE\",\n \"MEDIA\",\n \"MEMORY\",\n \"MIRROR\",\n \"MODEM\",\n \"MONITOR\",\n \"MOTHERBOARD\",\n \"MOUSE\",\n \"MULTIMEDIA\",\n \"NET\",\n \"NETWORK\",\n \"NODE\",\n \"NOTEBOOK\",\n \"COMPUTER\",\n \"OFFLINE\",\n \"ONLINE\",\n \"OPENSOURCE\",\n \"OPERATING\",\n \"SYSTEM\",\n \"OPTION\",\n \"OUTPUT\",\n \"PAGE\",\n \"PASSWORD\",\n \"PASTE\",\n \"PATH\",\n \"PHISHING\",\n \"PIRACY\",\n \"PIRATE\",\n \"PLATFORM\",\n \"PLUGIN\",\n \"PODCAST\",\n \"POPUP\",\n \"PORTAL\",\n \"PRINT\",\n \"PRINTER\",\n \"PRIVACY\",\n \"PROCESS\",\n \"PROGRAM\",\n \"PROGRAMMER\",\n \"PROTOCOL\",\n \"QUEUE\",\n \"QWERTY\",\n \"RAM\",\n \"REALTIME\",\n \"REBOOT\",\n \"RESOLUTION\",\n \"RESTORE\",\n \"ROM\",\n \"ROOT\",\n \"ROUTER\",\n \"RUNTIME\",\n \"SAVE\",\n \"SCAN\",\n \"SCANNER\",\n \"SCREEN\",\n \"SCREENSHOT\",\n \"SCRIPT\",\n \"SCROLL\",\n \"SCROLL\",\n \"SEARCH\",\n \"ENGINE\",\n \"SECURITY\",\n \"SERVER\",\n \"SHAREWARE\",\n \"SHELL\",\n \"SHIFT\",\n \"SHIFT KEY\",\n \"SNAPSHOT\",\n \"SOCIAL NETWORKING\",\n \"SOFTWARE\",\n \"SPAM\",\n \"SPAMMER\",\n \"SPREADSHEET\",\n \"SPYWARE\",\n \"STATUS\",\n \"STORAGE\",\n \"SUPERCOMPUTER\",\n \"SURF\",\n \"SYNTAX\",\n \"TABLE\",\n \"TAG\",\n \"TERMINAL\",\n \"TEMPLATE\",\n \"TERABYTE\",\n \"TEXT EDITOR\",\n \"THREAD\",\n \"TOOLBAR\",\n \"TRASH\",\n \"TROJAN HORSE\",\n \"TYPEFACE\",\n \"UNDO\",\n \"UNIX\",\n \"UPLOAD\",\n \"URL\",\n \"USER\",\n \"USER INTERFACE\",\n \"USERNAME\",\n \"UTILITY\",\n \"VERSION\",\n \"VIRTUAL\",\n \"VIRTUAL MEMORY\",\n \"VIRUS\",\n \"WEB\",\n \"WEBMASTER\",\n \"WEBSITE\",\n \"WIDGET\",\n \"WIKI\",\n \"WINDOW\",\n \"WINDOWS\",\n \"WIRELESS\",\n \"PROCESSOR\",\n \"WORKSTATION\",\n \"WEB\",\n \"WORM\",\n \"WWW\",\n \"XML\",\n \"ZIP\",\n];\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n size: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12000, size: 6 },\n Normal: { timer: 9000, size: 8 },\n Hard: { timer: 5000, size: 9 },\n Impossible: { timer: 2500, size: 12 },\n};\n\nexport function BribeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, size: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = useState(makeChoices(difficulty));\n const [index, setIndex] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const k = event.key;\n if (k === \" \") {\n if (positive.includes(choices[index])) props.onSuccess();\n else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([\"ArrowUp\", \"w\", \"ArrowRight\", \"d\"].includes(k)) newIndex++;\n if ([\"ArrowDown\", \"s\", \"ArrowLeft\", \"a\"].includes(k)) newIndex--;\n while (newIndex < 0) newIndex += choices.length;\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n setIndex(newIndex);\n }\n\n return (\n \n \n \n Say something nice about the guard.\n \n \n \n \n ↑\n \n \n {choices[index]}\n \n \n ↓\n \n \n \n );\n}\n\nfunction shuffleArray(array: string[]): void {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty: Difficulty): string[] {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n if (choices.includes(option)) {\n i--;\n continue;\n }\n choices.push(option);\n }\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\n \"affectionate\",\n \"agreeable\",\n \"bright\",\n \"charming\",\n \"creative\",\n \"determined\",\n \"energetic\",\n \"friendly\",\n \"funny\",\n \"generous\",\n \"polite\",\n \"likable\",\n \"diplomatic\",\n \"helpful\",\n \"giving\",\n \"kind\",\n \"hardworking\",\n \"patient\",\n \"dynamic\",\n \"loyal\",\n];\n\nconst negative = [\n \"aggressive\",\n \"aloof\",\n \"arrogant\",\n \"big-headed\",\n \"boastful\",\n \"boring\",\n \"bossy\",\n \"careless\",\n \"clingy\",\n \"couch potato\",\n \"cruel\",\n \"cynical\",\n \"grumpy\",\n \"hot air\",\n \"know it all\",\n \"obnoxious\",\n \"pain in the neck\",\n \"picky\",\n \"tactless\",\n \"thoughtless\",\n];\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random, getArrow } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 13000, min: 6, max: 8 },\n Normal: { timer: 7000, min: 7, max: 8 },\n Hard: { timer: 5000, min: 8, max: 9 },\n Impossible: { timer: 3000, min: 9, max: 10 },\n};\n\nexport function CheatCodeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = useState(generateCode(difficulty));\n const [index, setIndex] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (code[index] !== getArrow(event)) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return (\n \n \n \n Enter the Code!\n {code[index]}\n \n \n \n );\n}\n\nfunction generateCode(difficulty: Difficulty): string {\n const arrows = [\"←\", \"→\", \"↑\", \"↓\"];\n let code = \"\";\n for (let i = 0; i < random(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n code += arrow;\n }\n\n return code;\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport { getArrow } from \"../utils\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n symbols: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12500, width: 3, height: 3, symbols: 6 },\n Normal: { timer: 15000, width: 4, height: 4, symbols: 7 },\n Hard: { timer: 12500, width: 5, height: 5, symbols: 8 },\n Impossible: { timer: 10000, width: 6, height: 6, symbols: 9 },\n};\n\nexport function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, symbols: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = useState(generatePuzzle(difficulty));\n const [answer] = useState(generateAnswer(grid, difficulty));\n const [index, setIndex] = useState(0);\n const [pos, setPos] = useState([0, 0]);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n case \"←\":\n move[0]--;\n break;\n case \"↓\":\n move[1]++;\n break;\n case \"→\":\n move[0]++;\n break;\n }\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.key === \" \") {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return (\n \n \n \n Match the symbols!\n \n Targets:{\" \"}\n {answer.map((a, i) => {\n if (i == index)\n return (\n \n {a} \n \n );\n return (\n \n {a} \n \n );\n })}\n \n
\n {grid.map((line, y) => (\n
\n \n {line.map((cell, x) => {\n if (x == pos[0] && y == pos[1])\n return (\n \n {cell} \n \n );\n return (\n \n {cell} \n \n );\n })}\n \n
\n
\n ))}\n \n
\n
\n );\n}\n\nfunction generateAnswer(grid: string[][], difficulty: Difficulty): string[] {\n const answer = [];\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answer.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n return answer;\n}\n\nfunction randChar(): string {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty: Difficulty): string[][] {\n const puzzle = [];\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n puzzle.push(line);\n }\n return puzzle;\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport { getArrow } from \"../utils\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n mines: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 15000, width: 3, height: 3, mines: 4 },\n Normal: { timer: 15000, width: 4, height: 4, mines: 7 },\n Hard: { timer: 15000, width: 5, height: 5, mines: 11 },\n Impossible: { timer: 15000, width: 6, height: 6, mines: 15 },\n};\n\nexport function MinesweeperGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, mines: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = useState(generateMinefield(difficulty));\n const [answer, setAnswer] = useState(generateEmptyField(difficulty));\n const [pos, setPos] = useState([0, 0]);\n const [memoryPhase, setMemoryPhase] = useState(true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n case \"←\":\n move[0]--;\n break;\n case \"↓\":\n move[1]++;\n break;\n case \"→\":\n move[0]++;\n break;\n }\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.key == \" \") {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n setAnswer((old) => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n useEffect(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n {memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"}\n {minefield.map((line, y) => (\n
\n \n {line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return [?] ;\n return [ ] ;\n } else {\n if (x == pos[0] && y == pos[1]) return [X] ;\n if (answer[y][x]) return [.] ;\n return [ ] ;\n }\n })}\n \n
\n
\n ))}\n \n
\n
\n );\n}\n\nfunction fieldEquals(a: boolean[][], b: boolean[][]): boolean {\n function count(field: boolean[][]): number {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty: Difficulty): boolean[][] {\n const field = [];\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n return field;\n}\n\nfunction generateMinefield(difficulty: Difficulty): boolean[][] {\n const field = generateEmptyField(difficulty);\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n if (field[x][y]) {\n i--;\n continue;\n }\n field[x][y] = true;\n }\n return field;\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport Typography from \"@mui/material/Typography\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n wiresmin: number;\n wiresmax: number;\n rules: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 9000, wiresmin: 4, wiresmax: 4, rules: 2 },\n Normal: { timer: 7000, wiresmin: 6, wiresmax: 6, rules: 2 },\n Hard: { timer: 5000, wiresmin: 8, wiresmax: 8, rules: 3 },\n Impossible: { timer: 4000, wiresmin: 9, wiresmax: 9, rules: 4 },\n};\n\nconst types = [\"|\", \".\", \"/\", \"-\", \"█\", \"#\"];\n\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\n\nconst colorNames: any = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\",\n};\n\ninterface Wire {\n tpe: string;\n colors: string[];\n}\n\ninterface Question {\n toString: () => string;\n shouldCut: (wire: Wire, index: number) => boolean;\n}\n\nexport function WireCuttingGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0,\n };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = useState(generateWires(difficulty));\n const [cutWires, setCutWires] = useState(new Array(wires.length).fill(false));\n const [questions] = useState(generateQuestion(wires, difficulty));\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires((old) => {\n const next = [...old];\n next[wireNum - 1] = true;\n if (!questions.some((q) => q.shouldCut(wires[wireNum - 1], wireNum - 1))) {\n props.onFailure();\n }\n\n // check if we won\n const wiresToBeCut = [];\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n wiresToBeCut.push(shouldBeCut);\n }\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return (\n \n \n \n Cut the wires with the following properties! (keyboard 1 to 9)\n {questions.map((question, i) => (\n {question.toString()}\n ))}\n \n {new Array(wires.length).fill(0).map((_, i) => (\n  {i + 1}    \n ))}\n \n {new Array(8).fill(0).map((_, i) => (\n
\n \n {wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j])\n return       ;\n return (\n \n |{wire.tpe}|   \n \n );\n })}\n \n
\n ))}\n \n
\n
\n );\n}\n\nfunction randomPositionQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: (): string => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire: Wire, i: number): boolean => {\n return index === i;\n },\n };\n}\n\nfunction randomColorQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: (): string => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: (wire: Wire): boolean => {\n return wire.colors.includes(cutColor);\n },\n };\n}\n\nfunction generateQuestion(wires: Wire[], difficulty: Difficulty): Question[] {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n return questions;\n}\n\nfunction generateWires(difficulty: Difficulty): Wire[] {\n const wires = [];\n const numWires = random(difficulty.wiresmin, difficulty.wiresmax);\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors,\n });\n }\n return wires;\n}\n","import { Factions } from \"../../Faction/Factions\";\nimport React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nexport function Victory(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [faction, setFaction] = useState(\"none\");\n\n function quitInfiltration(): void {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n\n const repGain =\n Math.pow(props.Reward + 1, 1.1) *\n Math.pow(props.StartingDifficulty, 1.2) *\n 30 *\n levelBonus *\n BitNodeMultipliers.InfiltrationRep;\n\n const moneyGain =\n Math.pow(props.Reward + 1, 2) *\n Math.pow(props.StartingDifficulty, 3) *\n 3e3 *\n levelBonus *\n BitNodeMultipliers.InfiltrationMoney;\n\n function sell(): void {\n player.gainMoney(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade(): void {\n if (faction === \"none\") return;\n Factions[faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value);\n }\n\n return (\n <>\n \n \n Infiltration successful!\n \n \n \n You can trade the confidential information you found for money or reputation.\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { generateResleeves } from \"../Resleeving\";\nimport { Resleeve } from \"../Resleeve\";\nimport { ResleeveElem } from \"./ResleeveElem\";\nimport { use } from \"../../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Box from \"@mui/material/Box\";\n\nconst SortOption: {\n [key: string]: string | undefined;\n Cost: string;\n Hacking: string;\n Strength: string;\n Defense: string;\n Dexterity: string;\n Agility: string;\n Charisma: string;\n AverageCombatStats: string;\n AverageAllStats: string;\n TotalNumAugmentations: string;\n} = {\n Cost: \"Cost\",\n Hacking: \"Hacking Level\",\n Strength: \"Strength Level\",\n Defense: \"Defense Level\",\n Dexterity: \"Dexterity Level\",\n Agility: \"Agility Level\",\n Charisma: \"Charisma Level\",\n AverageCombatStats: \"Average Combat Stats\",\n AverageAllStats: \"Average Stats\",\n TotalNumAugmentations: \"Number of Augmentations\",\n};\n\n// Helper function for averaging\nfunction getAverage(...values: number[]): number {\n let sum = 0;\n for (let i = 0; i < values.length; ++i) {\n sum += values[i];\n }\n\n return sum / values.length;\n}\n\nconst SortFunctions: {\n [key: string]: ((a: Resleeve, b: Resleeve) => number) | undefined;\n Cost: (a: Resleeve, b: Resleeve) => number;\n Hacking: (a: Resleeve, b: Resleeve) => number;\n Strength: (a: Resleeve, b: Resleeve) => number;\n Defense: (a: Resleeve, b: Resleeve) => number;\n Dexterity: (a: Resleeve, b: Resleeve) => number;\n Agility: (a: Resleeve, b: Resleeve) => number;\n Charisma: (a: Resleeve, b: Resleeve) => number;\n AverageCombatStats: (a: Resleeve, b: Resleeve) => number;\n AverageAllStats: (a: Resleeve, b: Resleeve) => number;\n TotalNumAugmentations: (a: Resleeve, b: Resleeve) => number;\n} = {\n Cost: (a: Resleeve, b: Resleeve): number => a.getCost() - b.getCost(),\n Hacking: (a: Resleeve, b: Resleeve): number => a.hacking - b.hacking,\n Strength: (a: Resleeve, b: Resleeve): number => a.strength - b.strength,\n Defense: (a: Resleeve, b: Resleeve): number => a.defense - b.defense,\n Dexterity: (a: Resleeve, b: Resleeve): number => a.dexterity - b.dexterity,\n Agility: (a: Resleeve, b: Resleeve): number => a.agility - b.agility,\n Charisma: (a: Resleeve, b: Resleeve): number => a.charisma - b.charisma,\n AverageCombatStats: (a: Resleeve, b: Resleeve): number =>\n getAverage(a.strength, a.defense, a.dexterity, a.agility) -\n getAverage(b.strength, b.defense, b.dexterity, b.agility),\n AverageAllStats: (a: Resleeve, b: Resleeve): number =>\n getAverage(a.hacking, a.strength, a.defense, a.dexterity, a.agility, a.charisma) -\n getAverage(b.hacking, b.strength, b.defense, b.dexterity, b.agility, b.charisma),\n TotalNumAugmentations: (a: Resleeve, b: Resleeve): number => a.augmentations.length - b.augmentations.length,\n};\n\nexport function ResleeveRoot(): React.ReactElement {\n const player = use.Player();\n const [sort, setSort] = useState(SortOption.Cost);\n // Randomly create all Resleeves if they dont already exist\n if (player.resleeves.length === 0) {\n player.resleeves = generateResleeves();\n }\n\n function onSortChange(event: SelectChangeEvent): void {\n setSort(event.target.value);\n }\n\n const sortFunction = SortFunctions[sort];\n if (sortFunction === undefined) throw new Error(`sort function '${sort}' is undefined`);\n player.resleeves.sort(sortFunction);\n\n return (\n <>\n \n Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'.\n Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these\n bodies even come with genetic and cybernetic Augmentations!\n
\n
\n Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed\n Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you\n have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve\n into a body which already has that Augmentation, it will be removed (since you cannot have duplicate\n Augmentations).\n
\n
\n NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.\n
\n \n Sort By: \n \n \n {player.resleeves.map((resleeve, i) => (\n \n ))}\n \n );\n}\n","/**\n * Implements the Resleeve class, which defines a new body\n * that the player can \"re-sleeve\" into.\n */\nimport { Person } from \"../Person\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../../utils/JSONReviver\";\n\nexport class Resleeve extends Person {\n constructor() {\n super();\n }\n\n getCost(): number {\n // Each experience point adds this to the cost\n const CostPerExp = 25e3;\n\n // Final cost is multiplied by this constant ^ # Augs\n const NumAugsExponent = 1.2;\n\n // Get total exp in this re-sleeve\n const totalExp: number =\n this.hacking_exp +\n this.strength_exp +\n this.defense_exp +\n this.dexterity_exp +\n this.agility_exp +\n this.charisma_exp;\n\n // Get total base Augmentation cost for this re-sleeve\n let totalAugmentationCost = 0;\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug: Augmentation | null = Augmentations[this.augmentations[i].name];\n if (aug == null) {\n console.error(`Could not find Augmentation ${this.augmentations[i].name}`);\n continue;\n }\n totalAugmentationCost += aug.startingCost;\n }\n\n return totalExp * CostPerExp + totalAugmentationCost * Math.pow(NumAugsExponent, this.augmentations.length);\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Resleeve\", this);\n }\n\n /**\n * Initiatizes a Resleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Resleeve {\n return Generic_fromJSON(Resleeve, value.data);\n }\n}\n\nReviver.constructors.Resleeve = Resleeve;\n","import React, { useState } from \"react\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { Resleeve } from \"../Resleeve\";\nimport { Augmentations } from \"../../../Augmentation/Augmentations\";\nimport { purchaseResleeve } from \"../Resleeving\";\nimport { Money } from \"../../../ui/React/Money\";\n\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n resleeve: Resleeve;\n player: IPlayer;\n}\n\nexport function ResleeveElem(props: IProps): React.ReactElement {\n const [aug, setAug] = useState(props.resleeve.augmentations[0].name);\n\n function openStats(): void {\n dialogBoxCreate(\n <>\n \n Total Multipliers:\n \n \n Hacking Level multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacking_mult)}\n
\n Hacking Experience multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacking_exp_mult)}\n
\n Strength Level multiplier: {numeralWrapper.formatPercentage(props.resleeve.strength_mult)}\n
\n Strength Experience multiplier: {numeralWrapper.formatPercentage(props.resleeve.strength_exp_mult)}\n
\n Defense Level multiplier: {numeralWrapper.formatPercentage(props.resleeve.defense_mult)}\n
\n Defense Experience multiplier: {numeralWrapper.formatPercentage(props.resleeve.defense_exp_mult)}\n
\n Dexterity Level multiplier: {numeralWrapper.formatPercentage(props.resleeve.dexterity_mult)}\n
\n Dexterity Experience multiplier: {numeralWrapper.formatPercentage(props.resleeve.dexterity_exp_mult)}\n
\n Agility Level multiplier: {numeralWrapper.formatPercentage(props.resleeve.agility_mult)}\n
\n Agility Experience multiplier: {numeralWrapper.formatPercentage(props.resleeve.agility_exp_mult)}\n
\n Charisma Level multiplier: {numeralWrapper.formatPercentage(props.resleeve.charisma_mult)}\n
\n Charisma Experience multiplier: {numeralWrapper.formatPercentage(props.resleeve.charisma_exp_mult)}\n
\n Hacking Chance multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacking_chance_mult)}\n
\n Hacking Speed multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacking_speed_mult)}\n
\n Hacking Money multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacking_money_mult)}\n
\n Hacking Growth multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacking_grow_mult)}\n
\n Salary multiplier: {numeralWrapper.formatPercentage(props.resleeve.work_money_mult)}\n
\n Company Reputation Gain multiplier: {numeralWrapper.formatPercentage(props.resleeve.company_rep_mult)}\n
\n Faction Reputation Gain multiplier: {numeralWrapper.formatPercentage(props.resleeve.faction_rep_mult)}\n
\n Crime Money multiplier: {numeralWrapper.formatPercentage(props.resleeve.crime_money_mult)}\n
\n Crime Success multiplier: {numeralWrapper.formatPercentage(props.resleeve.crime_success_mult)}\n
\n Hacknet Income multiplier: {numeralWrapper.formatPercentage(props.resleeve.hacknet_node_money_mult)}\n
\n Hacknet Purchase Cost multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.hacknet_node_purchase_cost_mult)}\n
\n Hacknet Level Upgrade Cost multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.hacknet_node_level_cost_mult)}\n
\n Hacknet Ram Upgrade Cost multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.hacknet_node_ram_cost_mult)}\n
\n Hacknet Core Upgrade Cost multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.hacknet_node_core_cost_mult)}\n
\n Bladeburner Max Stamina multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.bladeburner_max_stamina_mult)}\n
\n Bladeburner Stamina Gain multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.bladeburner_stamina_gain_mult)}\n
\n Bladeburner Field Analysis multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.bladeburner_analysis_mult)}\n
\n Bladeburner Success Chance multiplier:\n {numeralWrapper.formatPercentage(props.resleeve.bladeburner_success_chance_mult)}\n
\n ,\n );\n }\n\n function onAugChange(event: SelectChangeEvent): void {\n setAug(event.target.value);\n }\n\n const currentAug = Augmentations[aug];\n const cost = props.resleeve.getCost();\n\n function purchase(): void {\n if (!purchaseResleeve(props.resleeve, props.player)) return;\n dialogBoxCreate(\n <>\n You re-sleeved for !\n ,\n );\n }\n\n return (\n \n \n \n \n Hacking: {numeralWrapper.formatSkill(props.resleeve.hacking)} (\n {numeralWrapper.formatExp(props.resleeve.hacking_exp)} exp)\n
\n Strength: {numeralWrapper.formatSkill(props.resleeve.strength)} (\n {numeralWrapper.formatExp(props.resleeve.strength_exp)} exp)\n
\n Defense: {numeralWrapper.formatSkill(props.resleeve.defense)} (\n {numeralWrapper.formatExp(props.resleeve.defense_exp)} exp)\n
\n Dexterity: {numeralWrapper.formatSkill(props.resleeve.dexterity)} (\n {numeralWrapper.formatExp(props.resleeve.dexterity_exp)} exp)\n
\n Agility: {numeralWrapper.formatSkill(props.resleeve.agility)} (\n {numeralWrapper.formatExp(props.resleeve.agility_exp)} exp)\n
\n Charisma: {numeralWrapper.formatSkill(props.resleeve.charisma)} (\n {numeralWrapper.formatExp(props.resleeve.charisma_exp)} exp)\n
# Augmentations: {props.resleeve.augmentations.length}\n
\n \n
\n \n \n {currentAug !== undefined && currentAug.info}\n \n \n \n It costs to purchase this Sleeve.\n \n \n \n
\n
\n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { use } from \"./Context\";\nimport { CONSTANTS } from \"../Constants\";\nimport { numeralWrapper } from \"./numeralFormat\";\nimport { Reputation } from \"./React/Reputation\";\nimport { ReputationRate } from \"./React/ReputationRate\";\nimport { MoneyRate } from \"./React/MoneyRate\";\nimport { Money } from \"./React/Money\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Company } from \"../Company/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { Locations } from \"../Locations/Locations\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\n\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\n\nconst CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle;\n\nexport function WorkInProgressRoot(): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, CONSTANTS.MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n const player = use.Player();\n const router = use.Router();\n const faction = Factions[player.currentWorkFactionName];\n if (player.workType == CONSTANTS.WorkTypeFaction) {\n function cancel(): void {\n router.toFaction(faction);\n player.finishFactionWork(true);\n }\n function unfocus(): void {\n router.toFaction(faction);\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently {player.currentWorkFactionDescription} for your faction {faction.name}\n
\n (Current Faction Reputation: \n ).
\n You have been doing this for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n You have earned:
\n
\n (){\" \"}\n
\n
\n (\n ) reputation for this faction
\n
\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec) hacking exp
\n
\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec) strength exp
\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec) defense exp
\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec) dexterity exp
\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec) agility exp
\n
\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec) charisma exp
\n
\n You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\n
\n There is no penalty for cancelling earlier.\n
\n
\n \n \n \n \n
\n );\n }\n\n const className = player.className;\n if (player.className !== \"\") {\n function cancel(): void {\n player.finishClass(true);\n router.toCity();\n }\n\n let stopText = \"\";\n if (\n className == CONSTANTS.ClassGymStrength ||\n className == CONSTANTS.ClassGymDefense ||\n className == CONSTANTS.ClassGymDexterity ||\n className == CONSTANTS.ClassGymAgility\n ) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return (\n \n \n \n You have been {className} for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n This has cost you:
\n (){\" \"}\n
\n
\n You have gained:
\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec) hacking exp
\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec) strength exp
\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec) defense exp
\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec) dexterity exp
\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec) agility exp
\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec) charisma exp
\n You may cancel at any time\n
\n
\n \n \n \n
\n );\n }\n\n if (player.workType == CONSTANTS.WorkTypeCompany) {\n const comp = Companies[player.companyName];\n let companyRep = 0;\n if (comp == null || !(comp instanceof Company)) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n companyRep = comp.playerReputation;\n\n function cancel(): void {\n player.finishWork(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n\n const penalty = player.cancelationPenalty();\n\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return (\n \n \n \n You are currently working as a {position} at {player.companyName} (Current Company Reputation:{\" \"}\n )
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n You have earned:
\n
\n (){\" \"}\n
\n
\n (\n ) reputation for this company
\n
\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {`${numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) hacking exp
\n
\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {`${numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) strength exp
\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {`${numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) defense exp
\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {`${numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) dexterity exp
\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {`${numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) agility exp
\n
\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {`${numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) charisma exp
\n
\n You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will\n only gain {penaltyString} of the reputation you've earned so far.\n
\n
\n \n \n \n \n
\n );\n }\n\n if (player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n function cancel(): void {\n player.finishWorkPartTime(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n const comp = Companies[player.companyName];\n let companyRep = 0;\n if (comp == null || !(comp instanceof Company)) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n companyRep = comp.playerReputation;\n\n const position = player.jobs[player.companyName];\n return (\n \n \n \n You are currently working as a {position} at {player.companyName} (Current Company Reputation:{\" \"}\n )
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n You have earned:
\n
\n (){\" \"}\n
\n
\n (\n \n ) reputation for this company
\n
\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {`${numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) hacking exp
\n
\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {`${numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) strength exp
\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {`${numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) defense exp
\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {`${numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) dexterity exp
\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {`${numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) agility exp
\n
\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {`${numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) charisma exp
\n
\n You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will\n be no penalty because this is a part-time job.\n
\n
\n \n \n \n \n
\n );\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round((player.timeWorked / player.timeNeededToCompleteWork) * 100);\n let numBars = Math.round(percent / 5);\n if (numBars < 0) {\n numBars = 0;\n }\n if (numBars > 20) {\n numBars = 20;\n }\n // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n const progressBar = createProgressBarText({ progress: (numBars + 1) / 20, totalTicks: 20 });\n\n return (\n \n \n \n You are attempting to {player.crimeType}.\n
\n\n \n Time remaining: {convertTimeMsToTimeElapsedString(player.timeNeededToCompleteWork - player.timeWorked)}\n \n\n
\n
{progressBar}
\n
\n
\n \n {\n router.toLocation(Locations[LocationName.Slums]);\n player.finishCrime(true);\n }}\n >\n Cancel crime\n \n \n
\n );\n }\n\n if (player.createProgramName !== \"\") {\n return (\n \n \n \n You are currently working on coding {player.createProgramName}.
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n The program is {((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}\n % complete.
\n If you cancel, your work will be saved and you can come back to complete the program later.\n
\n
\n \n {\n player.finishCreateProgramWork(true);\n router.toTerminal();\n }}\n >\n Cancel work on creating program\n \n \n
\n );\n }\n\n if (!player.workType) router.toTerminal();\n\n return <>;\n}\n","import React, { useState, useRef } from \"react\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Typography from \"@mui/material/Typography\";\nimport Slider from \"@mui/material/Slider\";\nimport Grid from \"@mui/material/Grid\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\nimport Box from \"@mui/material/Box\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Link from \"@mui/material/Link\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextField from \"@mui/material/TextField\";\n\nimport DownloadIcon from \"@mui/icons-material/Download\";\nimport UploadIcon from \"@mui/icons-material/Upload\";\n\nimport { FileDiagnosticModal } from \"../../Diagnostic/FileDiagnosticModal\";\nimport { dialogBoxCreate } from \"./DialogBox\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport { ThemeEditorModal } from \"./ThemeEditorModal\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { save, deleteGame } from \"../../db\";\nimport { formatTime } from \"../../utils/helpers/formatTime\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\",\n },\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\nexport function GameOptionsRoot(props: IProps): React.ReactElement {\n const classes = useStyles();\n const importInput = useRef(null);\n\n const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime);\n const [logSize, setLogSize] = useState(Settings.MaxLogCapacity);\n const [portSize, setPortSize] = useState(Settings.MaxPortCapacity);\n const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity);\n\n const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval);\n\n const [suppressMessages, setSuppressMessages] = useState(Settings.SuppressMessages);\n const [suppressFactionInvites, setSuppressFactionInvites] = useState(Settings.SuppressFactionInvites);\n const [suppressTravelConfirmations, setSuppressTravelConfirmations] = useState(Settings.SuppressTravelConfirmation);\n const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = useState(\n Settings.SuppressBuyAugmentationConfirmation,\n );\n const [suppressTIXPopup, setSuppressTIXPopup] = useState(Settings.SuppressTIXPopup);\n const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = useState(Settings.SuppressBladeburnerPopup);\n\n const [disableHotkeys, setDisableHotkeys] = useState(Settings.DisableHotkeys);\n const [disableASCIIArt, setDisableASCIIArt] = useState(Settings.DisableASCIIArt);\n const [disableTextEffects, setDisableTextEffects] = useState(Settings.DisableTextEffects);\n const [enableBashHotkeys, setEnableBashHotkeys] = useState(Settings.EnableBashHotkeys);\n const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);\n const [saveGameOnFileSave, setSaveGameOnFileSave] = useState(Settings.SaveGameOnFileSave);\n\n const [locale, setLocale] = useState(Settings.Locale);\n const [diagnosticOpen, setDiagnosticOpen] = useState(false);\n const [deleteGameOpen, setDeleteOpen] = useState(false);\n const [themeEditorOpen, setThemeEditorOpen] = useState(false);\n\n function handleExecTimeChange(event: any, newValue: number | number[]): void {\n setExecTime(newValue as number);\n Settings.CodeInstructionRunTime = newValue as number;\n }\n\n function handleLogSizeChange(event: any, newValue: number | number[]): void {\n setLogSize(newValue as number);\n Settings.MaxLogCapacity = newValue as number;\n }\n\n function handlePortSizeChange(event: any, newValue: number | number[]): void {\n setPortSize(newValue as number);\n Settings.MaxPortCapacity = newValue as number;\n }\n\n function handleTerminalSizeChange(event: any, newValue: number | number[]): void {\n setTerminalSize(newValue as number);\n Settings.MaxTerminalCapacity = newValue as number;\n }\n\n function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void {\n setAutosaveInterval(newValue as number);\n Settings.AutosaveInterval = newValue as number;\n }\n\n function handleSuppressMessagesChange(event: React.ChangeEvent): void {\n setSuppressMessages(event.target.checked);\n Settings.SuppressMessages = event.target.checked;\n }\n\n function handleSuppressFactionInvitesChange(event: React.ChangeEvent): void {\n setSuppressFactionInvites(event.target.checked);\n Settings.SuppressFactionInvites = event.target.checked;\n }\n\n function handleSuppressTravelConfirmationsChange(event: React.ChangeEvent): void {\n setSuppressTravelConfirmations(event.target.checked);\n Settings.SuppressTravelConfirmation = event.target.checked;\n }\n\n function handleSuppressBuyAugmentationConfirmationChange(event: React.ChangeEvent): void {\n setSuppressBuyAugmentationConfirmation(event.target.checked);\n Settings.SuppressBuyAugmentationConfirmation = event.target.checked;\n }\n\n function handleSuppressTIXPopupChange(event: React.ChangeEvent): void {\n setSuppressTIXPopup(event.target.checked);\n Settings.SuppressTIXPopup = event.target.checked;\n }\n\n function handleSuppressBladeburnerPopupChange(event: React.ChangeEvent): void {\n setSuppressBladeburnerPopup(event.target.checked);\n Settings.SuppressBladeburnerPopup = event.target.checked;\n }\n\n function handleDisableHotkeysChange(event: React.ChangeEvent): void {\n setDisableHotkeys(event.target.checked);\n Settings.DisableHotkeys = event.target.checked;\n }\n\n function handleDisableASCIIArtChange(event: React.ChangeEvent): void {\n setDisableASCIIArt(event.target.checked);\n Settings.DisableASCIIArt = event.target.checked;\n }\n\n function handleDisableTextEffectsChange(event: React.ChangeEvent): void {\n setDisableTextEffects(event.target.checked);\n Settings.DisableTextEffects = event.target.checked;\n }\n function handleLocaleChange(event: SelectChangeEvent): void {\n setLocale(event.target.value as string);\n Settings.Locale = event.target.value as string;\n }\n\n function handleEnableBashHotkeysChange(event: React.ChangeEvent): void {\n setEnableBashHotkeys(event.target.checked);\n Settings.EnableBashHotkeys = event.target.checked;\n }\n function handleTimestampFormatChange(event: React.ChangeEvent): void {\n setTimestampFormat(event.target.value);\n Settings.TimestampsFormat = event.target.value;\n }\n function handleSaveGameOnFile(event: React.ChangeEvent): void {\n setSaveGameOnFileSave(event.target.checked);\n Settings.SaveGameOnFileSave = event.target.checked;\n }\n\n function startImport(): void {\n if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;\n const ii = importInput.current;\n if (ii === null) throw new Error(\"import input should not be null\");\n ii.click();\n }\n\n function onImport(event: React.ChangeEvent): void {\n const files = event.target.files;\n if (files === null) return;\n const file = files[0];\n if (!file) {\n dialogBoxCreate(\"Invalid file selected\");\n return;\n }\n\n const reader = new FileReader();\n reader.onload = function (this: FileReader, e: ProgressEvent) {\n const target = e.target;\n if (target === null) {\n console.error(\"error importing file\");\n return;\n }\n const result = target.result;\n if (typeof result !== \"string\" || result === null) {\n console.error(\"FileReader event was not type string\");\n return;\n }\n const contents = result;\n save(contents).then(() => setTimeout(() => location.reload(), 1000));\n };\n reader.readAsText(file);\n }\n\n return (\n
\n \n Options\n \n\n \n \n \n \n \n The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too\n low can result in poor performance if you have many scripts running.\n \n }\n >\n Netscript exec time (ms)\n \n \n \n \n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to\n use a lot of memory if you have many scripts running.\n \n }\n >\n Netscript log size\n \n \n \n \n \n The maximum number of entries that can be written to a port using Netscript's write() function.\n Setting this too high can cause the game to use a lot of memory.\n \n }\n >\n Netscript port size\n \n \n \n \n \n The maximum number of entries that can be written to a the terminal. Setting this too high can cause\n the game to use a lot of memory.\n \n }\n >\n Terminal capacity\n \n \n \n \n The time (in seconds) between each autosave. Set to 0 to disable autosave.\n }\n >\n Autosave interval (s)\n \n \n \n \n }\n label={\n \n If this is set, then any messages you receive will not appear as popups on the screen. They will\n still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal\n command.\n \n }\n >\n Suppress story messages\n \n }\n />\n \n \n }\n label={\n \n If this is set, then any faction invites you receive will not appear as popups on the screen.\n Your outstanding faction invites can be viewed in the 'Factions' page.\n \n }\n >\n Suppress faction invites\n \n }\n />\n \n \n \n }\n label={\n \n If this is set, the confirmation message before traveling will not show up. You will\n automatically be deducted the travel cost as soon as you click.\n \n }\n >\n Suppress travel confirmations\n \n }\n />\n \n \n \n }\n label={\n \n If this is set, the confirmation message before buying augmentation will not show up.\n \n }\n >\n Suppress buy augmentation confirmation\n \n }\n />\n \n \n }\n label={\n If this is set, the stock market will never create any popup.}\n >\n Suppress TIX messages\n \n }\n />\n \n {!!props.player.bladeburner && (\n \n \n }\n label={\n \n If this is set, then having your Bladeburner actions interrupted by being busy with something\n else will not display a popup message.\n \n }\n >\n Suppress bladeburner popup\n \n }\n />\n \n )}\n \n }\n label={\n \n If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes\n Terminal commands, hotkeys to navigate between different parts of the game, and the \"Save and\n Close (Ctrl + b)\" hotkey in the Text Editor.\n \n }\n >\n Disable hotkeys\n \n }\n />\n \n \n }\n label={\n If this is set all ASCII art will be disabled.}>\n Disable ascii art\n \n }\n />\n \n \n }\n label={\n \n If this is set, text effects will not be displayed. This can help if text is difficult to read\n in certain areas.\n \n }\n >\n Disable text effects\n \n }\n />\n \n\n \n }\n label={\n \n Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and\n features that more closely resemble a real Bash-style shell. Note that when this mode is\n enabled, the default browser shortcuts are overriden by the new Bash shortcuts.\n \n }\n >\n Enable bash hotkeys\n \n }\n />\n \n \n \n Terminal commands and log entries will be timestamped. See\n https://date-fns.org/docs/Getting-Started/\n \n }\n >\n \n \n Timestamp format: \n \n ),\n }}\n value={timestampFormat}\n onChange={handleTimestampFormatChange}\n placeholder=\"yyyy-MM-dd hh:mm:ss\"\n />\n \n \n \n\n \n }\n label={\n Save your game any time a file is saved in the script editor.}\n >\n Save game on file save\n \n }\n />\n \n\n \n Sets the locale for displaying numbers.}>\n Locale \n \n \n \n \n {!location.href.startsWith(\"file://\") && (\n <>\n \n danielyxie / BigD (Original developer): \n
\n \n \n \n \n
\n\n \n \n hydroflame (Current maintainer):{\" \"}\n \n Donate blood!\n {\" \"}\n \n \n \n )}\n
\n \n \n \n \n \n \n export}>\n \n \n import}>\n \n \n \n \n \n Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the\n game. After using this, save the game and then reload the page. This is different then normal kill in\n that normal kill will tell the script to shut down while force kill just removes the references to it\n (and it should crash on it's own). This will not remove the files on your computer. Just forcefully\n kill all running instance of all scripts.\n \n }\n >\n \n \n \n \n \n Perform a soft reset. Resets everything as if you had just purchased an Augmentation.\n \n }\n >\n \n \n \n \n \n If your save file is extremely big you can use this button to view a map of all the files on every\n server. Be careful there might be spoilers.\n \n }\n >\n \n \n \n \n \n \n Report bug\n \n \n Changelog\n \n \n Documentation\n \n \n Discord\n \n \n Reddit\n \n \n Incremental game plaza\n \n \n \n
\n setDiagnosticOpen(false)} />\n {\n setDeleteOpen(false);\n deleteGame()\n .then(() => setTimeout(() => location.reload(), 1000))\n .catch((r) => console.error(`Could not delete game: ${r}`));\n }}\n open={deleteGameOpen}\n onClose={() => setDeleteOpen(false)}\n confirmationText={\"Really delete your game? (It's permanent!)\"}\n />\n setThemeEditorOpen(false)} />\n
\n );\n}\n","import React from \"react\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\nimport { Modal } from \"../ui/React/Modal\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\ninterface IServerProps {\n hostname: string;\n}\n\nfunction ServerAccordion(props: IServerProps): React.ReactElement {\n const server = GetServer(props.hostname);\n if (server === null) throw new Error(`server '${props.hostname}' should not be null`);\n let totalSize = 0;\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return <>;\n }\n\n interface File {\n name: string;\n size: number;\n }\n\n const files: File[] = [];\n\n for (const f of server.scripts) {\n files.push({ name: f.filename, size: f.code.length });\n }\n\n for (const f of server.textFiles) {\n files.push({ name: f.fn, size: f.text.length });\n }\n\n files.sort((a: File, b: File): number => b.size - a.size);\n\n return (\n \n }>\n \n {server.hostname} ({numeralWrapper.formatBigNumber(totalSize)}b)\n \n \n \n \n \n \n \n \n Filename\n \n \n Size\n \n \n \n \n {files.map((file: File) => (\n \n \n {file.name}\n \n \n {numeralWrapper.formatBigNumber(file.size)}b\n \n \n ))}\n \n
\n
\n
    \n
    \n
    \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FileDiagnosticModal(props: IProps): React.ReactElement {\n const keys: string[] = [];\n for (const key of GetAllServers()) {\n keys.push(key.hostname);\n }\n\n return (\n \n <>\n \n Welcome to the file diagnostic! If your save file is really big it's likely because you have too many\n text/scripts. This tool can help you narrow down where they are.\n \n {keys.map((hostname: string) => (\n \n ))}\n \n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n confirmationText: string;\n}\n\nexport function ConfirmationModal(props: IProps): React.ReactElement {\n return (\n \n <>\n {props.confirmationText}\n {\n props.onConfirm();\n }}\n >\n Confirm\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"./Modal\";\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport { Color, ColorPicker } from \"material-ui-color\";\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings, defaultSettings } from \"../../Settings/Settings\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\ninterface IColorEditorProps {\n name: string;\n color: string | undefined;\n onColorChange: (name: string, value: string) => void;\n defaultColor: string;\n}\n\nfunction ColorEditor({ name, onColorChange, color, defaultColor }: IColorEditorProps): React.ReactElement {\n if (color === undefined) {\n console.error(`color ${name} was undefined, reverting to default`);\n color = defaultColor;\n }\n\n return (\n <>\n \n onColorChange(name, \"#\" + newColor.hex)}\n />\n \n ),\n endAdornment: (\n <>\n onColorChange(name, defaultColor)}>\n \n \n \n ),\n }}\n />\n \n );\n}\n\nexport function ThemeEditorModal(props: IProps): React.ReactElement {\n const [customTheme, setCustomTheme] = useState<{ [key: string]: string | undefined }>({\n ...Settings.theme,\n });\n\n function resetTheme(): void {\n setCustomTheme({\n ...defaultSettings.theme,\n });\n Object.assign(Settings.theme, defaultSettings.theme);\n ThemeEvents.emit();\n }\n\n function onThemeChange(event: React.ChangeEvent): void {\n try {\n const importedTheme = JSON.parse(event.target.value);\n if (typeof importedTheme !== \"object\") return;\n setCustomTheme(importedTheme);\n for (const key of Object.keys(importedTheme)) {\n Settings.theme[key] = importedTheme[key];\n }\n ThemeEvents.emit();\n } catch (err) {\n // ignore\n }\n }\n\n function onColorChange(name: string, value: string): void {\n setCustomTheme((old: any) => {\n old[name] = value;\n return old;\n });\n\n Settings.theme[name] = value;\n ThemeEvents.emit();\n }\n\n return (\n \n \n Example tooltip}>\n \n \n \n \n \n \n \n text with primary color\n text with secondary color\n text with error color\n \n \n
    \n \n \n \n\n
    \n\n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n \n \n \n \n\n
    \n \n \n \n \n \n \n \n \n
    \n
    \n \n \n \n ),\n }}\n />\n
    \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { SleeveElem } from \"./SleeveElem\";\nimport { FAQModal } from \"./FAQModal\";\nimport { use } from \"../../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Link from \"@mui/material/Link\";\n\nexport function SleeveRoot(): React.ReactElement {\n const player = use.Player();\n const [FAQOpen, setFAQOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n <>\n Sleeves\n \n Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In\n other words, these Synthoids contain a perfect duplicate of your mind.\n
    \n
    \n Sleeves can be used to perform different tasks synchronously.\n
    \n
    \n
    \n\n \n \n Documentation\n \n {player.sleeves.map((sleeve, i) => (\n \n ))}\n setFAQOpen(false)} />\n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\nimport { CONSTANTS } from \"../../../Constants\";\n\nimport { Crimes } from \"../../../Crime/Crimes\";\n\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\n\nimport { createProgressBarText } from \"../../../utils/helpers/createProgressBarText\";\n\nimport { SleeveAugmentationsModal } from \"./SleeveAugmentationsModal\";\nimport { TravelModal } from \"./TravelModal\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { MoneyRate } from \"../../../ui/React/MoneyRate\";\nimport { use } from \"../../../ui/Context\";\nimport { ReputationRate } from \"../../../ui/React/ReputationRate\";\nimport { StatsElement } from \"../ui/StatsElement\";\nimport { MoreStatsModal } from \"./MoreStatsModal\";\nimport { MoreEarningsModal } from \"../ui/MoreEarningsModal\";\nimport { TaskSelector } from \"../ui/TaskSelector\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function SleeveElem(props: IProps): React.ReactElement {\n const player = use.Player();\n const [statsOpen, setStatsOpen] = useState(false);\n const [earningsOpen, setEarningsOpen] = useState(false);\n const [travelOpen, setTravelOpen] = useState(false);\n const [augmentationsOpen, setAugmentationsOpen] = useState(false);\n\n const [abc, setABC] = useState([\"------\", \"------\", \"------\"]);\n\n function setTask(): void {\n props.sleeve.resetTaskStatus(); // sets to idle\n switch (abc[0]) {\n case \"------\":\n break;\n case \"Work for Company\":\n props.sleeve.workForCompany(player, abc[1]);\n break;\n case \"Work for Faction\":\n props.sleeve.workForFaction(player, abc[1], abc[2]);\n break;\n case \"Commit Crime\":\n props.sleeve.commitCrime(player, abc[1]);\n break;\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(player, abc[2], abc[1]);\n break;\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(player, abc[2], abc[1]);\n break;\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(player);\n break;\n case \"Synchronize\":\n props.sleeve.synchronize(player);\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n props.rerender();\n }\n\n let desc = <>;\n switch (props.sleeve.currentTask) {\n case SleeveTaskType.Idle:\n desc = <>This sleeve is currently idle;\n break;\n case SleeveTaskType.Company:\n desc = <>This sleeve is currently working your job at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Faction: {\n let doing = \"nothing\";\n switch (props.sleeve.factionWorkType) {\n case FactionWorkType.Field:\n doing = \"Field work\";\n break;\n case FactionWorkType.Hacking:\n doing = \"Hacking contracts\";\n break;\n case FactionWorkType.Security:\n doing = \"Security work\";\n break;\n }\n desc = (\n <>\n This sleeve is currently doing {doing} for {props.sleeve.currentTaskLocation}.\n \n );\n break;\n }\n case SleeveTaskType.Crime: {\n const crime = Object.values(Crimes).find((crime) => crime.name === props.sleeve.crimeType);\n if (!crime) throw new Error(\"crime should not be undefined\");\n desc = (\n <>\n This sleeve is currently attempting to {crime.type} (Success Rate:{\" \"}\n {numeralWrapper.formatPercentage(crime.successRate(props.sleeve))}).\n \n );\n break;\n }\n case SleeveTaskType.Class:\n desc = <>This sleeve is currently studying/taking a course at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Gym:\n desc = <>This sleeve is currently working out at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Recovery:\n desc = (\n <>\n This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a\n faster rate.\n \n );\n break;\n case SleeveTaskType.Synchro:\n desc = (\n <>\n This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's\n synchronization to increase.\n \n );\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n let data: any[][] = [];\n if (props.sleeve.currentTask === SleeveTaskType.Crime) {\n data = [\n [`Money`, , `(on success)`],\n [`Hacking Exp`, numeralWrapper.formatExp(props.sleeve.gainRatesForTask.hack), `(2x on success)`],\n [`Strength Exp`, numeralWrapper.formatExp(props.sleeve.gainRatesForTask.str), `(2x on success)`],\n [`Defense Exp`, numeralWrapper.formatExp(props.sleeve.gainRatesForTask.def), `(2x on success)`],\n [`Dexterity Exp`, numeralWrapper.formatExp(props.sleeve.gainRatesForTask.dex), `(2x on success)`],\n [`Agility Exp`, numeralWrapper.formatExp(props.sleeve.gainRatesForTask.agi), `(2x on success)`],\n [`Charisma Exp`, numeralWrapper.formatExp(props.sleeve.gainRatesForTask.cha), `(2x on success)`],\n ];\n } else {\n data = [\n [`Money:`, ],\n [`Hacking Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.hack)} / s`],\n [`Strength Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.str)} / s`],\n [`Defense Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.def)} / s`],\n [`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.dex)} / s`],\n [`Agility Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.agi)} / s`],\n [`Charisma Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.cha)} / s`],\n ];\n if (props.sleeve.currentTask === SleeveTaskType.Company || props.sleeve.currentTask === SleeveTaskType.Faction) {\n const repGain: number = props.sleeve.getRepGain(player);\n data.push([`Reputation:`, ]);\n }\n }\n\n return (\n <>\n \n \n \n \n Insufficient funds : \"\"}>\n \n \n \n \n Unlocked when sleeve has fully recovered : \"\"}\n >\n \n \n \n \n \n \n \n {desc}\n \n {props.sleeve.currentTask === SleeveTaskType.Crime &&\n createProgressBarText({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25,\n })}\n \n \n \n \n \n \n \n \n setStatsOpen(false)} sleeve={props.sleeve} />\n setEarningsOpen(false)} sleeve={props.sleeve} />\n setTravelOpen(false)}\n sleeve={props.sleeve}\n rerender={props.rerender}\n />\n setAugmentationsOpen(false)}\n sleeve={props.sleeve}\n />\n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { findSleevePurchasableAugs } from \"../SleeveHelpers\";\nimport { Augmentations } from \"../../../Augmentation/Augmentations\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport { TableCell } from \"../../../ui/React/Table\";\nimport TableRow from \"@mui/material/TableRow\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function SleeveAugmentationsModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n\n // Array of all owned Augmentations. Names only\n const ownedAugNames = props.sleeve.augmentations.map((e) => e.name);\n\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n const availableAugs = findSleevePurchasableAugs(props.sleeve, player);\n\n function purchaseAugmentation(aug: Augmentation): void {\n props.sleeve.tryBuyAugmentation(player, aug);\n rerender();\n }\n\n return (\n \n <>\n \n You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they\n would for you. You can only purchase Augmentations that you have unlocked through Factions.\n
    \n
    \n When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the\n Duplicate Sleeve will immediately lose all of its stat experience.\n
    \n \n \n {availableAugs.map((aug) => {\n return (\n \n \n \n \n \n \n \n {aug.name}\n \n \n \n \n \n \n \n );\n })}\n \n
    \n\n {ownedAugNames.length > 0 && (\n <>\n Owned Augmentations:\n {ownedAugNames.map((augName) => {\n const aug = Augmentations[augName];\n let tooltip = <>;\n if (typeof aug.info === \"string\") {\n tooltip = (\n <>\n {aug.info}\n
    \n
    \n {aug.stats}\n \n );\n } else {\n tooltip = (\n <>\n {aug.info}\n
    \n
    \n {aug.stats}\n \n );\n }\n\n return (\n {tooltip}}>\n \n {augName}\n \n \n );\n })}\n \n )}\n \n
    \n );\n}\n","import React from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { WorldMap } from \"../../../ui/React/WorldMap\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function travel(city: string): void {\n if (!player.canAfford(CONSTANTS.TravelCost)) {\n dialogBoxCreate(\"You cannot afford to have this sleeve travel to another city\");\n }\n props.sleeve.city = city as CityName;\n player.loseMoney(CONSTANTS.TravelCost, \"sleeve\");\n props.sleeve.resetTaskStatus();\n props.rerender();\n props.onClose();\n }\n\n return (\n \n <>\n \n Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can\n study. Traveling to a different city costs . It will\n also set your current sleeve task to idle.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport React from \"react\";\n\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\n\ninterface IProps {\n sleeve: Sleeve;\n}\n\nexport function StatsElement(props: IProps): React.ReactElement {\n const rows = [\n [\n \"HP: \",\n <>\n {numeralWrapper.formatHp(props.sleeve.hp)} / {numeralWrapper.formatHp(props.sleeve.max_hp)}\n ,\n ],\n [\"City: \", <>{props.sleeve.city}],\n [\"Hacking: \", <>{numeralWrapper.formatSkill(props.sleeve.hacking)}],\n [\"Strength: \", <>{numeralWrapper.formatSkill(props.sleeve.strength)}],\n [\"Defense: \", <>{numeralWrapper.formatSkill(props.sleeve.defense)}],\n [\"Dexterity: \", <>{numeralWrapper.formatSkill(props.sleeve.dexterity)}],\n [\"Agility: \", <>{numeralWrapper.formatSkill(props.sleeve.agility)}],\n [\"Charisma: \", <>{numeralWrapper.formatSkill(props.sleeve.charisma)}],\n [\"Shock: \", <>{numeralWrapper.formatSleeveShock(100 - props.sleeve.shock)}],\n [\"Sync: \", <>{numeralWrapper.formatSleeveSynchro(props.sleeve.sync)}],\n [\"Memory: \", <>{numeralWrapper.formatSleeveMemory(props.sleeve.memory)}],\n ];\n return ;\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport React from \"react\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreStatsModal(props: IProps): React.ReactElement {\n return (\n \n Hacking: ,\n props.sleeve.hacking,\n <> ({numeralWrapper.formatExp(props.sleeve.hacking_exp)} exp),\n ],\n [\n <>Strength: ,\n props.sleeve.strength,\n <> ({numeralWrapper.formatExp(props.sleeve.strength_exp)} exp),\n ],\n [\n <>Defense: ,\n props.sleeve.defense,\n <> ({numeralWrapper.formatExp(props.sleeve.defense_exp)} exp),\n ],\n [\n <>Dexterity: ,\n props.sleeve.dexterity,\n <> ({numeralWrapper.formatExp(props.sleeve.dexterity_exp)} exp),\n ],\n [\n <>Agility: ,\n props.sleeve.agility,\n <> ({numeralWrapper.formatExp(props.sleeve.agility_exp)} exp),\n ],\n [\n <>Charisma: ,\n props.sleeve.charisma,\n <> ({numeralWrapper.formatExp(props.sleeve.charisma_exp)} exp),\n ],\n ]}\n title=\"Stats:\"\n />\n
    \n Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_mult)],\n [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_exp_mult)],\n [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_mult)],\n [<>Strength Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_exp_mult)],\n [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_mult)],\n [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_exp_mult)],\n [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.dexterity_mult)],\n [\n <>Dexterity Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.dexterity_exp_mult),\n ],\n [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_mult)],\n [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_exp_mult)],\n [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_mult)],\n [<>Charisma Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_exp_mult)],\n [\n <>Faction Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.faction_rep_mult),\n ],\n [\n <>Company Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.company_rep_mult),\n ],\n [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.work_money_mult)],\n [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_money_mult)],\n [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_success_mult)],\n ]}\n title=\"Multipliers:\"\n />\n
    \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Money } from \"../../../ui/React/Money\";\nimport * as React from \"react\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreEarningsModal(props: IProps): React.ReactElement {\n return (\n \n ],\n [\"Hacking Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.hack)],\n [\"Strength Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.str)],\n [\"Defense Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.def)],\n [\"Dexterity Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.dex)],\n [\"Agility Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.agi)],\n [\"Charisma Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.cha)],\n ]}\n title=\"Earnings for Current Task:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.cha)],\n ]}\n title=\"Total Earnings for Host Consciousness:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.cha)],\n ]}\n title=\"Total Earnings for Other Sleeves:\"\n />\n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\nconst universitySelectorOptions: string[] = [\n \"Study Computer Science\",\n \"Data Structures\",\n \"Networks\",\n \"Algorithms\",\n \"Management\",\n \"Leadership\",\n];\n\nconst gymSelectorOptions: string[] = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\ninterface IProps {\n sleeve: Sleeve;\n player: IPlayer;\n setABC: (abc: string[]) => void;\n}\n\ninterface ITaskDetails {\n first: string[];\n second: (s1: string) => string[];\n}\n\nfunction possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n const allJobs: string[] = Object.keys(player.jobs);\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [\"Bladeburners\"];\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions;\n}\n\nconst tasks: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => ITaskDetails);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n} = {\n \"------\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let jobs = possibleJobs(player, sleeve);\n\n if (jobs.length === 0) jobs = [\"------\"];\n return { first: jobs, second: () => [\"------\"] };\n },\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n\n return {\n first: factions,\n second: (s1: string) => {\n const faction = Factions[s1];\n const facInfo = faction.getInfo();\n const options: string[] = [];\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n return options;\n },\n };\n },\n \"Commit Crime\": (): ITaskDetails => {\n return { first: Object.values(Crimes).map((crime) => crime.name), second: () => [\"------\"] };\n },\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let universities: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n universities = [LocationName.AevumSummitUniversity];\n break;\n case CityName.Sector12:\n universities = [LocationName.Sector12RothmanUniversity];\n break;\n case CityName.Volhaven:\n universities = [LocationName.VolhavenZBInstituteOfTechnology];\n break;\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return { first: universitySelectorOptions, second: () => universities };\n },\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let gyms: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n gyms = [LocationName.AevumCrushFitnessGym, LocationName.AevumSnapFitnessGym];\n break;\n case CityName.Sector12:\n gyms = [LocationName.Sector12IronGym, LocationName.Sector12PowerhouseGym];\n break;\n case CityName.Volhaven:\n gyms = [LocationName.VolhavenMilleniumFitnessGym];\n break;\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return { first: gymSelectorOptions, second: () => gyms };\n },\n \"Shock Recovery\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n Synchronize: (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n};\n\nconst canDo: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => boolean);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n} = {\n \"------\": () => true,\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,\n Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,\n};\n\nfunction getABC(sleeve: Sleeve): [string, string, string] {\n switch (sleeve.currentTask) {\n case SleeveTaskType.Idle:\n return [\"------\", \"------\", \"------\"];\n case SleeveTaskType.Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n case SleeveTaskType.Faction: {\n let workType = \"\";\n switch (sleeve.factionWorkType) {\n case FactionWorkType.Hacking:\n workType = \"Hacking Contracts\";\n break;\n case FactionWorkType.Field:\n workType = \"Field Work\";\n break;\n case FactionWorkType.Security:\n workType = \"Security Work\";\n break;\n }\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n case SleeveTaskType.Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n case SleeveTaskType.Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n case SleeveTaskType.Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n case SleeveTaskType.Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n case SleeveTaskType.Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = useState(abc[0]);\n const [s1, setS1] = useState(abc[1]);\n const [s2, setS2] = useState(abc[2]);\n\n const validActions = Object.keys(canDo).filter((k) =>\n (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),\n );\n\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event: SelectChangeEvent): void {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]);\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event: SelectChangeEvent): void {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event: SelectChangeEvent): void {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return (\n <>\n \n {!(details.first.length === 1 && details.first[0] === \"------\") && (\n <>\n
    \n \n \n )}\n {!(details2.length === 1 && details2[0] === \"------\") && (\n <>\n
    \n \n \n )}\n \n );\n}\n","import React from \"react\";\n\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FAQModal({ open, onClose }: IProps): React.ReactElement {\n return (\n \n <>\n How do Duplicate Sleeves work?\n
    \n \n Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working\n for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience,\n and reputation.\n \n
    \n
    \n \n Sleeves are their own individuals, which means they each have their own experience and stats.\n \n
    \n
    \n \n When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well\n as all of the player's other sleeves.\n \n
    \n
    \n What is Synchronization (Sync)?\n
    \n \n Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a\n numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing\n a task.\n \n
    \n
    \n \n Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve\n and the player's original host consciousness earn N% of the amount of experience normally earned by the task.\n All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.\n \n
    \n
    \n Synchronization can be increased by assigning sleeves to the 'Synchronize' task.\n
    \n
    \n What is Shock?\n
    \n \n Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a\n numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the\n amount of experience earned by the sleeve.\n \n
    \n
    \n \n Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning\n sleeves to the 'Shock Recovery' task.\n \n
    \n
    \n Why can't I work for this company or faction?\n
    \n \n Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two\n sleeves they can work for two different companies, but they cannot both work for the same company.\n \n
    \n
    \n Why did my Sleeve stop working?\n
    \n \n Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a\n company after 8 hours, and stop working for a faction after 20 hours.\n \n
    \n
    \n How do I buy Augmentations for my Sleeves?\n
    \n Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.\n
    \n
    \n Why can't I buy the X Augmentation for my sleeve?\n
    \n \n Certain Augmentations, like Bladeburner-specific ones and NeuroFlux Governor, are not available for sleeves.\n \n
    \n
    \n Do sleeves get reset when installing Augmentations or switching BitNodes?\n
    \n Sleeves are reset when switching BitNodes, but not when installing Augmentations.\n
    \n
    \n What is Memory?\n
    \n \n Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For\n example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be\n set to 25, rather than 1.\n \n
    \n
    \n \n Memory can only be increased by purchasing upgrades from The Covenant. It is a persistent stat, meaning it\n never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.\n \n \n
    \n );\n}\n","/**\n * Root React Component for the Hacknet Node UI\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { GeneralInfo } from \"./GeneralInfo\";\nimport { HacknetNodeElem } from \"./HacknetNodeElem\";\nimport { HacknetServerElem } from \"./HacknetServerElem\";\nimport { HacknetNode } from \"../HacknetNode\";\nimport { HacknetServer } from \"../HacknetServer\";\nimport { HashUpgradeModal } from \"./HashUpgradeModal\";\nimport { MultiplierButtons } from \"./MultiplierButtons\";\nimport { PlayerInfo } from \"./PlayerInfo\";\nimport { PurchaseButton } from \"./PurchaseButton\";\nimport { PurchaseMultipliers } from \"../data/Constants\";\n\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function HacknetRoot(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [purchaseMultiplier, setPurchaseMultiplier] = useState(PurchaseMultipliers.x1);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n let totalProduction = 0;\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick(): void {\n purchaseHacknet(props.player);\n rerender();\n }\n\n // Cost to purchase a new Hacknet Node\n let purchaseCost;\n if (hasHacknetServers(props.player)) {\n purchaseCost = getCostOfNextHacknetServer(props.player);\n } else {\n purchaseCost = getCostOfNextHacknetNode(props.player);\n }\n\n // onClick event handlers for purchase multiplier buttons\n const purchaseMultiplierOnClicks = [\n () => setPurchaseMultiplier(PurchaseMultipliers.x1),\n () => setPurchaseMultiplier(PurchaseMultipliers.x5),\n () => setPurchaseMultiplier(PurchaseMultipliers.x10),\n () => setPurchaseMultiplier(PurchaseMultipliers.MAX),\n ];\n\n // HacknetNode components\n const nodes = props.player.hacknetNodes.map((node: string | HacknetNode) => {\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n return (\n \n );\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n return (\n \n );\n }\n });\n\n return (\n <>\n Hacknet {hasHacknetServers(props.player) ? \"Servers\" : \"Nodes\"}\n \n\n \n\n
    \n\n \n \n \n \n \n \n \n \n\n {hasHacknetServers(props.player) && }\n\n {nodes}\n setOpen(false)} />\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\nimport React from \"react\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n hasHacknetServers: boolean;\n}\n\nexport function GeneralInfo(props: IProps): React.ReactElement {\n return (\n <>\n \n The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to\n anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\n \n {!props.hasHacknetServers ? (\n <>\n \n {`Here, you can purchase a Hacknet Node, a specialized machine that can connect ` +\n `and contribute its resources to the Hacknet network. This allows you to take ` +\n `a small percentage of profits from hacks performed on the network. Essentially, ` +\n `you are renting out your Node's computing power.`}\n \n \n {`Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` +\n `can be upgraded in order to increase its computing power and thereby increase ` +\n `the profit you earn from it.`}\n \n \n ) : (\n <>\n \n {`Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` +\n `Hacknet Servers will perform computations and operations on the network, earning ` +\n `you hashes. Hashes can be spent on a variety of different upgrades.`}\n \n \n {`Hacknet Servers can also be used as servers to run scripts. However, running scripts ` +\n `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` +\n `rate will be reduced by the percentage of RAM that is being used by that Server to run ` +\n `scripts.`}\n \n \n )}\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetNodeConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetNode } from \"../HacknetNode\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateMoneyGainRate } from \"../formulas/HacknetNodes\";\n\ninterface IProps {\n node: HacknetNode;\n purchaseMultiplier: number | \"MAX\";\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetNodeElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetNodeConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel)\n : purchaseMult;\n purchaseLevelUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRAMButton;\n if (node.ram >= HacknetNodeConstants.MaxRam) {\n upgradeRAMButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetNodeConstants.MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(\n node.level,\n node.ram * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.moneyGainRatePerSecond;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRAMButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeRamOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\" ? getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam) : purchaseMult;\n purchaseRamUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n function upgradeCoresOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores)\n : purchaseMult;\n purchaseCoreUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n let upgradeCoresButton;\n if (node.cores >= HacknetNodeConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n return (\n \n \n \n \n \n {node.name}\n \n \n \n \n Production:\n \n \n \n (\n )\n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.ram)}\n \n {upgradeRAMButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n
    \n
    \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetServerConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n getMaxNumberCacheUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n updateHashManagerCapacity,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../HacknetServer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateHashGainRate } from \"../formulas/HacknetServers\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n node: HacknetServer;\n purchaseMultiplier: number | string;\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetServerElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetServerConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetServerConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -\n node.hashRate;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n }\n purchaseLevelUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n\n function upgradeRamOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n }\n purchaseRamUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade RAM Button\n let upgradeRamButton;\n if (node.maxRam >= HacknetServerConstants.MaxRam) {\n upgradeRamButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetServerConstants.MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(\n node.level,\n 0,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.hashRate;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n function upgradeCoresOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n }\n purchaseCoreUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade Cores Button\n let upgradeCoresButton;\n if (node.cores >= HacknetServerConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.hashRate;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n // Upgrade Cache button\n let upgradeCacheButton;\n if (node.cache >= HacknetServerConstants.MaxCache) {\n upgradeCacheButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheButton = (\n \n + hashes\n \n }\n >\n \n \n );\n if (props.player.money < upgradeCacheCost) {\n } else {\n }\n }\n function upgradeCacheOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n }\n purchaseCacheUpgrade(props.player, node, numUpgrades as number);\n rerender();\n updateHashManagerCapacity(props.player);\n }\n\n return (\n \n \n \n \n \n {node.hostname}\n \n \n \n \n Production:\n \n \n \n ()\n \n \n \n \n \n Hash Capacity:\n \n \n \n \n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.maxRam)}\n \n {upgradeRamButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n \n Cache Level:\n \n \n {node.cache}\n \n {upgradeCacheButton}\n \n \n
    \n
    \n );\n}\n","/**\n * Create the pop-up for purchasing upgrades with hashes\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrades } from \"../HashUpgrades\";\n\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HacknetUpgradeElem } from \"./HacknetUpgradeElem\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function HashUpgradeModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n const hashManager = player.hashManager;\n if (!(hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n return (\n \n <>\n Spend your hashes on a variety of different upgrades\n \n Hashes: \n \n {Object.keys(HashUpgrades).map((upgName) => {\n const upg = HashUpgrades[upgName];\n return (\n \n );\n })}\n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { purchaseHashUpgrade } from \"../HacknetHelpers\";\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrade } from \"../HashUpgrade\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { ServerDropdown, ServerType } from \"../../ui/React/ServerDropdown\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { Hashes } from \"../../ui/React/Hashes\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n player: IPlayer;\n hashManager: HashManager;\n upg: HashUpgrade;\n rerender: () => void;\n}\n\nexport function HacknetUpgradeElem(props: IProps): React.ReactElement {\n const [selectedServer, setSelectedServer] = useState(\"ecorp\");\n function changeTargetServer(event: SelectChangeEvent): void {\n setSelectedServer(event.target.value);\n }\n\n function purchase(): void {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n if (canPurchase) {\n const res = purchaseHashUpgrade(props.player, props.upg.name, selectedServer);\n if (!res) {\n dialogBoxCreate(\n \"Failed to purchase upgrade. This may be because you do not have enough hashes, \" +\n \"or because you do not have access to the feature upgrade affects.\",\n );\n }\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level);\n\n // Purchase button\n const canPurchase = hashManager.hashes >= cost;\n\n // We'll reuse a Bladeburner css class\n return (\n \n \n \n \n \n Cost: , Bought: {level} times\n \n\n {upg.desc}\n {!upg.hasTargetServer && (\n \n )}\n {upg.hasTargetServer && (\n \n )}\n {level > 0 && effect && {effect}}\n \n );\n}\n","/**\n * React Component for the Multiplier buttons on the Hacknet page.\n * These buttons let the player control how many Nodes/Upgrades they're\n * purchasing when using the UI (x1, x5, x10, MAX)\n */\nimport React from \"react\";\n\nimport { PurchaseMultipliers } from \"../data/Constants\";\nimport Button from \"@mui/material/Button\";\n\ninterface IMultiplierProps {\n disabled: boolean;\n onClick: () => void;\n text: string;\n}\n\nfunction MultiplierButton(props: IMultiplierProps): React.ReactElement {\n return (\n \n );\n}\n\ninterface IProps {\n purchaseMultiplier: number | string;\n onClicks: (() => void)[];\n}\n\nexport function MultiplierButtons(props: IProps): React.ReactElement {\n if (props.purchaseMultiplier == null) {\n throw new Error(`MultiplierButtons constructed without required props`);\n }\n\n const mults = [\"x1\", \"x5\", \"x10\", \"MAX\"];\n const onClicks = props.onClicks;\n const buttons = [];\n for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n disabled: props.purchaseMultiplier === PurchaseMultipliers[mult],\n onClick: onClicks[i],\n text: mult,\n };\n\n buttons.push();\n }\n\n return <>{buttons};\n}\n","/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers } from \"../HacknetHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n totalProduction: number;\n player: IPlayer;\n}\n\nexport function PlayerInfo(props: IProps): React.ReactElement {\n const hasServers = hasHacknetServers(props.player);\n\n let prod;\n if (hasServers) {\n prod = ;\n } else {\n prod = ;\n }\n\n return (\n <>\n \n Money:\n \n \n\n {hasServers && (\n <>\n \n Hashes: /{\" \"}\n \n \n \n )}\n\n \n Total Hacknet {hasServers ? \"Server\" : \"Node\"} Production: {prod}\n \n \n );\n}\n","/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers, hasMaxNumberHacknetServers } from \"../HacknetHelpers\";\nimport { Player } from \"../../Player\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n multiplier: number | string;\n onClick: () => void;\n cost: number;\n}\n\nexport function PurchaseButton(props: IProps): React.ReactElement {\n const cost = props.cost;\n let text;\n if (hasHacknetServers(Player)) {\n if (hasMaxNumberHacknetServers(Player)) {\n text = <>Hacknet Server limit reached;\n } else {\n text = (\n <>\n Purchase Hacknet Server - \n \n \n );\n }\n } else {\n text = (\n <>\n Purchase Hacknet Node - \n \n \n );\n }\n\n return (\n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\nimport React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nimport { ApplyToJobButton } from \"./ApplyToJobButton\";\n\nimport { Locations } from \"../Locations\";\nimport { LocationName } from \"../data/LocationNames\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Favor } from \"../../ui/React/Favor\";\nimport { use } from \"../../ui/Context\";\nimport { QuitJobModal } from \"../../Company/ui/QuitJobModal\";\n\ntype IProps = {\n locName: LocationName;\n};\n\nexport function CompanyLocation(props: IProps): React.ReactElement {\n const p = use.Player();\n const router = use.Router();\n const [quitOpen, setQuitOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n const company = Companies[props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n\n /**\n * Reference to the Location that this component is being rendered for\n */\n const location = Locations[props.locName];\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n\n /**\n * Name of company position that player holds, if applicable\n */\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n const companyPosition = jobTitle ? CompanyPositions[jobTitle] : null;\n\n p.location = props.locName;\n\n function applyForAgentJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n const loc = location;\n if (!loc.infiltrationData)\n throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n\n router.toInfiltration(loc);\n }\n\n function work(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n if (pos instanceof CompanyPosition) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(router, props.locName);\n } else {\n p.startWork(router, props.locName);\n }\n router.toWork();\n }\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n\n return (\n <>\n {isEmployedHere && (\n <>\n Job Title: {jobTitle}\n -------------------------\n \n \n You will have company favor upon resetting after\n installing Augmentations\n \n }\n >\n \n Company reputation: \n \n \n \n -------------------------\n \n \n Company favor increases the rate at which you earn reputation for this company by 1% per favor.\n Company favor is gained whenever you reset after installing Augmentations. The amount of favor you\n gain depends on how much reputation you have with the company.\n \n }\n >\n \n Company Favor: \n \n \n \n -------------------------\n
    \n \n     \n \n setQuitOpen(false)}\n />\n \n )}\n
    \n {company.hasAgentPositions() && (\n \n )}\n {company.hasBusinessConsultantPositions() && (\n \n )}\n {company.hasBusinessPositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasITPositions() && (\n \n )}\n {company.hasSecurityPositions() && (\n \n )}\n {company.hasSoftwareConsultantPositions() && (\n \n )}\n {company.hasSoftwarePositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {location.infiltrationData != null && }\n \n );\n}\n","import React from \"react\";\nimport { Company } from \"../Company\";\nimport { use } from \"../../ui/Context\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n locName: string;\n company: Company;\n onQuit: () => void;\n}\n\nexport function QuitJobModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function quit(): void {\n player.quitJob(props.locName);\n props.onQuit();\n props.onClose();\n }\n\n return (\n \n Would you like to quit your job at {props.company.name}?\n
    \n
    \n \n
    \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { IRouter } from \"../../ui/Router\";\n\ntype IProps = {\n loc: Location;\n p: IPlayer;\n router: IRouter;\n};\n\nexport function GymLocation(props: IProps): React.ReactElement {\n function calculateCost(): number {\n const server = GetServer(props.loc.name);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = (server as Server).backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function train(stat: string): void {\n const loc = props.loc;\n props.p.startClass(props.router, calculateCost(), loc.expMult, stat);\n }\n\n function trainStrength(): void {\n train(CONSTANTS.ClassGymStrength);\n }\n\n function trainDefense(): void {\n train(CONSTANTS.ClassGymDefense);\n }\n\n function trainDexterity(): void {\n train(CONSTANTS.ClassGymDexterity);\n }\n\n function trainAgility(): void {\n train(CONSTANTS.ClassGymAgility);\n }\n\n const cost = CONSTANTS.ClassGymBaseCost * calculateCost();\n\n return (\n <>\n \n
    \n \n
    \n \n
    \n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\n\nimport { Money } from \"../../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ntype IProps = {\n p: IPlayer;\n};\n\ntype IState = {\n currHp: number;\n};\n\nexport class HospitalLocation extends React.Component {\n /**\n * Stores button styling that sets them all to block display\n */\n btnStyle: any;\n\n constructor(props: IProps) {\n super(props);\n\n this.btnStyle = { display: \"block\" };\n\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n\n this.state = {\n currHp: this.props.p.hp,\n };\n }\n\n getCost(): number {\n return getHospitalizationCost(this.props.p);\n }\n\n getHealed(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost, \"hospitalization\");\n this.props.p.hp = this.props.p.max_hp;\n\n // This just forces a re-render to update the cost\n this.setState({\n currHp: this.props.p.hp,\n });\n\n dialogBoxCreate(\n <>\n You were healed to full health! The hospital billed you for \n ,\n );\n }\n\n render(): React.ReactNode {\n const cost = this.getCost();\n\n return (\n \n );\n }\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\n\nexport function SlumsLocation(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n function shoplift(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Shoplift.commit(router, player);\n }\n\n function robStore(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.RobStore.commit(router, player);\n }\n\n function mug(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Mug.commit(router, player);\n }\n\n function larceny(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Larceny.commit(router, player);\n }\n\n function dealDrugs(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.DealDrugs.commit(router, player);\n }\n\n function bondForgery(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.BondForgery.commit(router, player);\n }\n\n function traffickArms(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.TraffickArms.commit(router, player);\n }\n\n function homicide(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Homicide.commit(router, player);\n }\n\n function grandTheftAuto(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.GrandTheftAuto.commit(router, player);\n }\n\n function kidnap(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Kidnap.commit(router, player);\n }\n\n function assassinate(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Assassination.commit(router, player);\n }\n\n function heist(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Heist.commit(router, player);\n }\n\n const shopliftChance = Crimes.Shoplift.successRate(player);\n const robStoreChance = Crimes.RobStore.successRate(player);\n const mugChance = Crimes.Mug.successRate(player);\n const larcenyChance = Crimes.Larceny.successRate(player);\n const drugsChance = Crimes.DealDrugs.successRate(player);\n const bondChance = Crimes.BondForgery.successRate(player);\n const armsChance = Crimes.TraffickArms.successRate(player);\n const homicideChance = Crimes.Homicide.successRate(player);\n const gtaChance = Crimes.GrandTheftAuto.successRate(player);\n const kidnapChance = Crimes.Kidnap.successRate(player);\n const assassinateChance = Crimes.Assassination.successRate(player);\n const heistChance = Crimes.Heist.successRate(player);\n\n return (\n <>\n Attempt to shoplift from a low-end retailer}>\n \n \n
    \n Attempt to commit armed robbery on a high-end store}>\n \n \n
    \n Attempt to mug a random person on the street}>\n \n \n
    \n Attempt to rob property from someone's house}>\n \n \n
    \n Attempt to deal drugs}>\n \n \n
    \n Attempt to forge corporate bonds}>\n \n \n
    \n Attempt to smuggle illegal arms into the city}>\n \n \n
    \n Attempt to murder a random person on the street}>\n \n \n
    \n Attempt to commit grand theft auto}>\n \n \n
    \n Attempt to kidnap and ransom a high-profile-target}>\n \n \n
    \n Attempt to assassinate a high-profile target}>\n \n \n
    \n Attempt to pull off the ultimate heist}>\n \n \n
    \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\nimport React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\nimport { CreateCorporationModal } from \"../../Corporation/ui/CreateCorporationModal\";\nimport { LocationName } from \"../data/LocationNames\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\n\nimport { use } from \"../../ui/Context\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { SnackbarEvents } from \"../../ui/React/Snackbar\";\nimport { N00dles } from \"../../utils/helpers/N00dles\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function SpecialLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const inBladeburner = player.inBladeburner();\n\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n function handleBladeburner(): void {\n const p = player;\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else {\n // Apply for Bladeburner division\n if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n p.startBladeburner({ new: true });\n dialogBoxCreate(\"You have been accepted into the Bladeburner division!\");\n setRerender((old) => !old);\n\n const worldHeader = document.getElementById(\"world-menu-header\");\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n dialogBoxCreate(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n }\n\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n function handleResleeving(): void {\n router.toResleeves();\n }\n\n function renderBladeburner(): React.ReactElement {\n if (!player.canAccessBladeburner()) {\n return <>;\n }\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return ;\n }\n\n function renderNoodleBar(): React.ReactElement {\n function EatNoodles(): void {\n SnackbarEvents.emit(\"You ate some delicious noodles and feel refreshed\", \"success\");\n N00dles();\n if (player.sourceFiles.length > 0) player.giveExploit(Exploit.N00dles);\n if (player.sourceFileLvl(5) > 0 || player.bitNodeN === 5) {\n player.intelligence_exp *= 1.0000000000000002;\n }\n }\n\n return (\n <>\n
    \n \n \n );\n }\n\n function CreateCorporation(): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (!player.canAccessCorporation()) {\n return (\n <>\n \n A business man is yelling at a clerk. You should come back later.\n \n \n );\n }\n return (\n <>\n \n setOpen(false)} />\n \n );\n }\n\n function renderResleeving(): React.ReactElement {\n if (!player.canAccessResleeving()) {\n return <>;\n }\n return ;\n }\n\n function handleCotMG(): void {\n const faction = Factions[\"Church of the Machine God\"];\n if (!player.factions.includes(\"Church of the Machine God\")) {\n joinFaction(faction);\n }\n if (\n !player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n }\n\n router.toFaction(faction);\n }\n\n function renderCotMG(): React.ReactElement {\n // prettier-ignore\n const symbol = \n {\" `` \"}
    \n {\" -odmmNmds: \"}
    \n {\" `hNmo:..-omNh. \"}
    \n {\" yMd` `hNh \"}
    \n {\" mMd oNm \"}
    \n {\" oMNo .mM/ \"}
    \n {\" `dMN+ -mM+ \"}
    \n {\" -mMNo -mN+ \"}
    \n {\" .+- :mMNo/mN/ \"}
    \n {\":yNMd. :NMNNN/ \"}
    \n {\"-mMMMh. /NMMh` \"}
    \n {\" .dMMMd. /NMMMy` \"}
    \n {\" `yMMMd. /NNyNMMh` \"}
    \n {\" `sMMMd. +Nm: +NMMh. \"}
    \n {\" oMMMm- oNm: /NMMd. \"}
    \n {\" +NMMmsMm- :mMMd. \"}
    \n {\" /NMMMm- -mMMd. \"}
    \n {\" /MMMm- -mMMd. \"}
    \n {\" `sMNMMm- .mMmo \"}
    \n {\" `sMd:hMMm. ./. \"}
    \n {\" `yMy` `yNMd` \"}
    \n {\" `hMs` oMMy \"}
    \n {\" `hMh sMN- \"}
    \n {\" /MM- .NMo \"}
    \n {\" +MM: :MM+ \"}
    \n {\" sNNo-.`.-omNy` \"}
    \n {\" -smNNNNmdo- \"}
    \n {\" `..` \"}
    \n if (player.hasAugmentation(AugmentationNames.StaneksGift3, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer\n look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it\n seems. Curious, Just how much of a machine's soul do you house in that body?\n \n \n {symbol}\n \n );\n }\n if (player.hasAugmentation(AugmentationNames.StaneksGift2, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: I see you've taken to my creation. So much so it could hardly be recognized as\n one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your\n mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.\n \n \n {symbol}\n \n );\n }\n if (player.factions.includes(\"Church of the Machine God\")) {\n return (\n <>\n \n Allison \"Mother\" Stanek: Welcome back my child!\n \n {symbol}\n \n );\n }\n\n if (!player.canAccessCotMG()) {\n return (\n <>\n \n A decrepit altar stands in the middle of a dilapidated church.\n
    \n
    A symbol is carved in the altar.\n
    \n
    \n {symbol}\n \n );\n }\n\n if (\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0 ||\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0\n ) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Begone you filth! My gift must be the first modification that your body should\n have!\n \n \n \n );\n }\n\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human\n form? If you are, accept my gift.\n \n \n \n {symbol}\n \n );\n }\n\n function renderGlitch(): React.ReactElement {\n return (\n <>\n \n \n \n \n );\n }\n\n switch (props.loc.name) {\n case LocationName.NewTokyoVitaLife: {\n return renderResleeving();\n }\n case LocationName.Sector12CityHall: {\n return ;\n }\n case LocationName.Sector12NSA: {\n return renderBladeburner();\n }\n case LocationName.NewTokyoNoodleBar: {\n return renderNoodleBar();\n }\n case LocationName.ChongqingChurchOfTheMachineGod: {\n return renderCotMG();\n }\n case LocationName.IshimaGlitch: {\n return renderGlitch();\n }\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return <>;\n }\n}\n","import React, { useState } from \"react\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function CreateCorporationModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const canSelfFund = player.canAfford(150e9);\n if (!player.canAccessCorporation() || player.hasCorporation()) {\n props.onClose();\n return <>;\n }\n\n const [name, setName] = useState(\"\");\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function selfFund(): void {\n if (!canSelfFund) {\n return;\n }\n\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name);\n player.loseMoney(150e9, \"corporation\");\n\n props.onClose();\n router.toCorporation();\n }\n\n function seed(): void {\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name, 500e6);\n\n props.onClose();\n router.toCorporation();\n }\n\n return (\n \n \n Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares\n
    \n
    \n If you would like to start one, please enter a name for your corporation below:\n
    \n \n \n \n
    \n );\n}\n","const n00dlePower =\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(\" +\n \"!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]\" +\n \"+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+\" +\n \"[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[\" +\n \"])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!\" +\n \"+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+\" +\n \"[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[\" +\n \"])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+\" +\n \"(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+\" +\n \"[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+\" +\n \"!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]\" +\n \"]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]\" +\n \"]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[\" +\n \"+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(\" +\n \"![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[]\" +\n \")[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+\" +\n \"[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!\" +\n \"![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(\" +\n \"![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[\" +\n \"])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[]\" +\n \")[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[\" +\n \"]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[]\" +\n \")[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]\" +\n \"]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]\" +\n \"]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+(\" +\n \"[][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[\" +\n \"+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+\" +\n \"[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[\" +\n \"]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+\" +\n \"(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[]\" +\n \")[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]]\" +\n \"(!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]\" +\n \"((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[\" +\n \"]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]\" +\n \"+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]\" +\n \"+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+\" +\n \"[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]\" +\n \"+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([\" +\n \"![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(\" +\n \"!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]\" +\n \"+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][\" +\n \"[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[\" +\n \"]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+\" +\n \"!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]\" +\n \"+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])\" +\n \"[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+\" +\n \"[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[\" +\n \"]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!\" +\n \"+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]\" +\n \"+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(!\" +\n \"[]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!\" +\n \"![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]]\" +\n \")+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[\" +\n \"+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![\" +\n \"]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[\" +\n \"])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+\" +\n \"[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[\" +\n \"+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!\" +\n \"+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![\" +\n \"]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!\" +\n \"[]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!!\" +\n \"[]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]\" +\n \"]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![\" +\n \"]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[\" +\n \"]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]\" +\n \"+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+\" +\n \"[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]\" +\n \"+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+\" +\n \"[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])\" +\n \"[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[\" +\n \"])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()\" +\n \"+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[\" +\n \"+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[]\" +\n \"[(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()\";\n\nexport function N00dles(): void {\n // TODO: Too powerful, needs a nerf.\n eval(n00dlePower);\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a tech vendor\n *\n * This subcomponent renders all of the buttons for purchasing things from tech vendors\n */\nimport React, { useState, useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\nimport { RamButton } from \"./RamButton\";\nimport { TorButton } from \"./TorButton\";\nimport { CoresButton } from \"./CoresButton\";\n\nimport { getPurchaseServerCost } from \"../../Server/ServerPurchases\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { use } from \"../../ui/Context\";\nimport { PurchaseServerModal } from \"./PurchaseServerModal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\ninterface IServerProps {\n ram: number;\n rerender: () => void;\n}\n\nfunction ServerButton(props: IServerProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const player = use.Player();\n const cost = getPurchaseServerCost(props.ram);\n return (\n <>\n \n setOpen(false)}\n ram={props.ram}\n cost={cost}\n rerender={props.rerender}\n />\n
    \n \n );\n}\n\ntype IProps = {\n loc: Location;\n};\n\nexport function TechVendorLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n const purchaseServerButtons: React.ReactNode[] = [];\n for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) {\n purchaseServerButtons.push();\n }\n\n return (\n <>\n
    \n {purchaseServerButtons}\n
    \n \n \"You can order bigger servers via scripts. We don't take custom order in person.\"\n \n
    \n \n
    \n \n
    \n \n \n );\n}\n","import React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { purchaseRamForHomeComputer } from \"../../Server/ServerPurchases\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ntype IProps = {\n p: IPlayer;\n rerender: () => void;\n};\n\nexport function RamButton(props: IProps): React.ReactElement {\n const homeComputer = props.p.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n return ;\n }\n\n const cost = props.p.getUpgradeHomeRamCost();\n\n function buy(): void {\n purchaseRamForHomeComputer(props.p);\n props.rerender();\n }\n\n return (\n \n {`\\\\(\\\\large{cost = 3.2 \\\\cdot 10^3 \\\\cdot 1.58^{log_2{(ram)}}}\\\\)`}\n \n }\n >\n \n \n \n \n );\n}\n","import React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { purchaseTorRouter } from \"../LocationsHelpers\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { Money } from \"../../ui/React/Money\";\n\ntype IProps = {\n p: IPlayer;\n rerender: () => void;\n};\n\nexport function TorButton(props: IProps): React.ReactElement {\n function buy(): void {\n purchaseTorRouter(props.p);\n props.rerender();\n }\n\n if (props.p.hasTorRouter()) {\n return ;\n }\n\n return (\n \n );\n}\n","/**\n * Location and traveling-related helper functions.\n * Mostly used for UI\n */\nimport { CONSTANTS } from \"../Constants\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { AddToAllServers, createUniqueRandomIp } from \"../Server/AllServers\";\nimport { safetlyCreateUniqueServer } from \"../Server/ServerHelpers\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\n/**\n * Attempt to purchase a TOR router\n * @param {IPlayer} p - Player object\n */\nexport function purchaseTorRouter(p: IPlayer): void {\n if (p.hasTorRouter()) {\n dialogBoxCreate(`You already have a TOR Router!`);\n return;\n }\n if (!p.canAfford(CONSTANTS.TorRouterCost)) {\n dialogBoxCreate(\"You cannot afford to purchase the TOR router!\");\n return;\n }\n p.loseMoney(CONSTANTS.TorRouterCost, \"other\");\n\n const darkweb = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1,\n });\n AddToAllServers(darkweb);\n\n p.getHomeComputer().serversOnNetwork.push(darkweb.hostname);\n darkweb.serversOnNetwork.push(p.getHomeComputer().hostname);\n dialogBoxCreate(\n \"You have purchased a TOR router!
    \" +\n \"You now have access to the dark web from your home computer.
    \" +\n \"Use the scan/scan-analyze commands to search for the dark web connection.\",\n );\n}\n","import React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ntype IProps = {\n p: IPlayer;\n rerender: () => void;\n};\n\nexport function CoresButton(props: IProps): React.ReactElement {\n const homeComputer = props.p.getHomeComputer();\n const maxCores = homeComputer.cpuCores >= 8;\n if (maxCores) {\n return ;\n }\n\n const cost = props.p.getUpgradeHomeCoresCost();\n\n function buy(): void {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost, \"servers\");\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return (\n \n {`\\\\(\\\\large{cost = 10^9 \\\\cdot 7.5 ^{\\\\text{cores}}}\\\\)`}\n \n }\n >\n \n \n \n \n );\n}\n","/**\n * React Component for the popup used to purchase a new server.\n */\nimport React, { useState } from \"react\";\nimport { purchaseServer } from \"../../Server/ServerPurchases\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n ram: number;\n cost: number;\n rerender: () => void;\n}\n\nexport function PurchaseServerModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const [hostname, setHostname] = useState(\"\");\n\n function tryToPurchaseServer(): void {\n purchaseServer(hostname, props.ram, props.cost, player);\n props.onClose();\n }\n\n function onKeyUp(event: React.KeyboardEvent): void {\n if (event.keyCode === 13) tryToPurchaseServer();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setHostname(event.target.value);\n }\n\n return (\n \n \n Would you like to purchase a new server with {numeralWrapper.formatRAM(props.ram)} of RAM for{\" \"}\n ?\n \n
    \n
    \n Please enter the server hostname below:\n
    \n\n \n Buy\n \n ),\n }}\n />\n
    \n );\n}\n","import React from \"react\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n city: string;\n travel: () => void;\n\n open: boolean;\n onClose: () => void;\n}\n\nexport function TravelConfirmationModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const cost = CONSTANTS.TravelCost;\n function travel(): void {\n props.travel();\n }\n\n return (\n \n \n Would you like to travel to {props.city}? The trip will cost .\n \n
    \n
    \n \n
    \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a university\n *\n * This subcomponent renders all of the buttons for studying/taking courses\n */\nimport * as React from \"react\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { use } from \"../../ui/Context\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function UniversityLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n\n function calculateCost(): number {\n const server = GetServer(props.loc.name);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = (server as Server).backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function take(stat: string): void {\n const loc = props.loc;\n player.startClass(router, calculateCost(), loc.expMult, stat);\n }\n\n function study(): void {\n take(CONSTANTS.ClassStudyComputerScience);\n }\n\n function dataStructures(): void {\n take(CONSTANTS.ClassDataStructures);\n }\n\n function networks(): void {\n take(CONSTANTS.ClassNetworks);\n }\n\n function algorithms(): void {\n take(CONSTANTS.ClassAlgorithms);\n }\n\n function management(): void {\n take(CONSTANTS.ClassManagement);\n }\n\n function leadership(): void {\n take(CONSTANTS.ClassLeadership);\n }\n\n const costMult: number = calculateCost();\n\n const dataStructuresCost = CONSTANTS.ClassDataStructuresBaseCost * costMult;\n const networksCost = CONSTANTS.ClassNetworksBaseCost * costMult;\n const algorithmsCost = CONSTANTS.ClassAlgorithmsBaseCost * costMult;\n const managementCost = CONSTANTS.ClassManagementBaseCost * costMult;\n const leadershipCost = CONSTANTS.ClassLeadershipBaseCost * costMult;\n\n const earnHackingExpTooltip = `Gain hacking experience!`;\n const earnCharismaExpTooltip = `Gain charisma experience!`;\n\n return (\n <>\n \n \n \n
    \n \n \n \n
    \n \n \n \n
    \n \n \n \n
    \n \n \n \n
    \n \n \n \n \n );\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\nimport React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport { Blackjack } from \"../../Casino/Blackjack\";\nimport { CoinFlip } from \"../../Casino/CoinFlip\";\nimport { Roulette } from \"../../Casino/Roulette\";\nimport { SlotMachine } from \"../../Casino/SlotMachine\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nenum GameType {\n None = \"none\",\n Coin = \"coin\",\n Slots = \"slots\",\n Roulette = \"roulette\",\n Blackjack = \"blackjack\",\n}\n\ntype IProps = {\n p: IPlayer;\n};\n\nexport function CasinoLocation(props: IProps): React.ReactElement {\n const [game, setGame] = useState(GameType.None);\n\n function updateGame(game: GameType): void {\n setGame(game);\n }\n\n return (\n <>\n {game === GameType.None && (\n <>\n \n
    \n \n
    \n \n
    \n \n \n )}\n {game !== GameType.None && (\n <>\n \n {game === GameType.Coin && }\n {game === GameType.Slots && }\n {game === GameType.Roulette && }\n {game === GameType.Blackjack && }\n \n )}\n \n );\n}\n","import * as React from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { Game, reachedLimit } from \"./Game\";\nimport { Deck } from \"./CardDeck/Deck\";\nimport { Hand } from \"./CardDeck/Hand\";\nimport { InputAdornment } from \"@mui/material\";\nimport { ReactCard } from \"./CardDeck/ReactCard\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\n\nconst MAX_BET = 100e6;\n\nenum Result {\n Pending = \"\",\n PlayerWon = \"You won!\",\n PlayerWonByBlackjack = \"You Won! Blackjack!\",\n DealerWon = \"You lost!\",\n Tie = \"Push! (Tie)\",\n}\n\ntype Props = {\n p: IPlayer;\n};\n\ntype State = {\n playerHand: Hand;\n dealerHand: Hand;\n bet: number;\n betInput: string;\n gameInProgress: boolean;\n result: Result;\n gains: number; // Track gains only for this session\n wagerInvalid: boolean;\n wagerInvalidHelperText: string;\n};\n\nexport class Blackjack extends Game {\n deck: Deck;\n\n constructor(props: Props) {\n super(props);\n\n this.deck = new Deck(5); // 5-deck multideck\n\n const initialBet = 1e6;\n\n this.state = {\n playerHand: new Hand([]),\n dealerHand: new Hand([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n };\n }\n\n canStartGame = (): boolean => {\n const { p } = this.props;\n const { bet } = this.state;\n\n return p.canAfford(bet);\n };\n\n startGame = (): void => {\n if (!this.canStartGame() || reachedLimit(this.props.p)) {\n return;\n }\n\n // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e) TODO: Save/Restore the RNG state to limit the value of save-scumming.\n this.props.p.loseMoney(this.state.bet, \"casino\");\n\n const playerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending,\n });\n\n // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n };\n\n // Returns an array of numbers representing all possible values of the given Hand. The reason it needs to be\n // an array is because an Ace can count as both 1 and 11.\n getHandValue = (hand: Hand): number[] => {\n let result: number[] = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n if (value >= 10) {\n result = result.map((x) => x + 10);\n } else if (value === 1) {\n result = result.flatMap((x) => [x + 1, x + 11]);\n } else {\n result = result.map((x) => x + value);\n }\n }\n\n return result;\n };\n\n // Returns the single hand value used for determine things like victory and whether or not\n // the dealer has to hit. Essentially this uses the biggest value that's 21 or under. If no such value exists,\n // then it means the hand is busted and we can just return whatever\n getTrueHandValue = (hand: Hand): number => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter((x) => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n };\n\n // Returns all hand values that are 21 or under. If no values are 21 or under, then the first value is returned.\n getHandDisplayValues = (hand: Hand): number[] => {\n const handValues = this.getHandValue(hand);\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter((x) => x <= 21))];\n }\n };\n\n isHandBusted = (hand: Hand): boolean => {\n return this.getTrueHandValue(hand) > 21;\n };\n\n playerHit = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n\n this.setState({\n playerHand: newHand,\n });\n\n // Check if player busted, and finish the game if so\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n };\n\n playerStay = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n let newDealerHand = this.state.dealerHand;\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand,\n });\n\n // If dealer has busted, then player wins\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand);\n\n // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n };\n\n finishGame = (result: Result): void => {\n const gains =\n result === Result.DealerWon\n ? 0 // We took away the bet at the start, don't need to take more\n : result === Result.Tie\n ? this.state.bet // We took away the bet at the start, give it back\n : result === Result.PlayerWon\n ? 2 * this.state.bet // Give back their bet plus their winnings\n : result === Result.PlayerWonByBlackjack\n ? 2.5 * this.state.bet // Blackjack pays out 1.5x bet!\n : (() => {\n throw new Error(`Unexpected result: ${result}`);\n })(); // This can't happen, right?\n this.win(this.props.p, gains);\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains - this.state.bet, // Not updated upfront - only tracks the final outcome\n });\n };\n\n wagerOnChange = (event: React.ChangeEvent): void => {\n const { p } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\",\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\",\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\",\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\",\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending, // Reset previous game status to clear the win/lose text UI\n });\n }\n };\n\n // Start game button\n startOnClick = (event: React.MouseEvent): void => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n };\n\n render(): React.ReactNode {\n const { betInput, playerHand, dealerHand, gameInProgress, result, wagerInvalid, wagerInvalidHelperText, gains } =\n this.state;\n\n // Get the player totals to display.\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n\n return (\n <>\n {/* Wager input */}\n \n \n {\"Wager (Max: \"}\n \n {\")\"}\n \n }\n disabled={gameInProgress}\n onChange={this.wagerOnChange}\n error={wagerInvalid}\n helperText={wagerInvalid ? wagerInvalidHelperText : \"\"}\n type=\"number\"\n style={{\n width: \"200px\",\n }}\n InputProps={{\n startAdornment: (\n \n $\n \n ),\n }}\n />\n\n \n {\"Total earnings this session: \"}\n \n \n \n\n {/* Buttons */}\n {!gameInProgress ? (\n \n ) : (\n <>\n \n \n \n )}\n\n {/* Main game part. Displays both if the game is in progress OR if there's a result so you can see\n * the cards that led to that result. */}\n {(gameInProgress || result !== Result.Pending) && (\n <>\n \n \n Player\n {playerHand.cards.map((card, i) => (\n \n ))}\n\n \n Count:{\" \"}\n {playerHandValues\n .map((value, i) => {value})\n .reduce((prev, curr) => [prev, \" or \", curr])}\n \n \n \n\n
    \n\n \n \n Dealer\n {dealerHand.cards.map((card, i) => (\n // Hide every card except the first while game is in progress\n \n \n \n )}\n\n {/* Results from previous round */}\n {result !== Result.Pending && (\n \n {result} \n {result === Result.PlayerWon && }\n {result === Result.PlayerWonByBlackjack && }\n {result === Result.DealerWon && }\n \n )}\n \n );\n }\n}\n","import { Card, Suit } from \"./Card\";\nimport { shuffle } from \"lodash\";\n\nexport class Deck {\n private cards: Card[] = [];\n\n // Support multiple decks\n constructor(private numDecks = 1) {\n this.reset();\n }\n\n shuffle(): void {\n this.cards = shuffle(this.cards); // Just use lodash\n }\n\n drawCard(): Card {\n if (this.cards.length == 0) {\n throw new Error(\"Tried to draw card from empty deck\");\n }\n\n return this.cards.shift() as Card; // Guaranteed to return a Card since we throw an Error if array is empty\n }\n\n // Draws a card, resetting the deck beforehands if the Deck is empty\n safeDrawCard(): Card {\n if (this.cards.length === 0) {\n this.reset();\n }\n\n return this.drawCard();\n }\n\n // Reset the deck back to the original 52 cards and shuffle it\n reset(): void {\n this.cards = [];\n\n for (let i = 1; i <= 13; ++i) {\n for (let j = 0; j < this.numDecks; ++j) {\n this.cards.push(new Card(i, Suit.Clubs));\n this.cards.push(new Card(i, Suit.Diamonds));\n this.cards.push(new Card(i, Suit.Hearts));\n this.cards.push(new Card(i, Suit.Spades));\n }\n }\n\n this.shuffle();\n }\n\n size(): number {\n return this.cards.length;\n }\n\n isEmpty(): boolean {\n return this.cards.length === 0;\n }\n}\n","/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\nimport React, { useState } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { BadRNG } from \"./RNG\";\nimport { win, reachedLimit } from \"./Game\";\nimport { trusted } from \"./utils\";\n\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ntype IProps = {\n p: IPlayer;\n};\n\nconst minPlay = 0;\nconst maxPlay = 10e3;\n\nexport function CoinFlip(props: IProps): React.ReactElement {\n const [investment, setInvestment] = useState(1000);\n const [result, setResult] = useState( );\n const [status, setStatus] = useState(\"\");\n const [playLock, setPlayLock] = useState(false);\n\n function updateInvestment(e: React.ChangeEvent): void {\n let investment: number = parseInt(e.currentTarget.value);\n if (isNaN(investment)) {\n investment = minPlay;\n }\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n if (investment < minPlay) {\n investment = minPlay;\n }\n setInvestment(investment);\n }\n\n function play(guess: string): void {\n if (reachedLimit(props.p)) return;\n const v = BadRNG.random();\n let letter: string;\n if (v < 0.5) {\n letter = \"H\";\n } else {\n letter = \"T\";\n }\n const correct: boolean = guess === letter;\n\n setResult(\n \n \n {letter}\n \n ,\n );\n setStatus(correct ? \" win!\" : \"lose!\");\n setPlayLock(true);\n\n setTimeout(() => setPlayLock(false), 250);\n if (correct) {\n win(props.p, investment);\n } else {\n win(props.p, -investment);\n }\n if (reachedLimit(props.p)) return;\n }\n\n return (\n <>\n Result: {result}\n \n \n \n \n \n ),\n }}\n />\n \n {status}\n \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { win, reachedLimit } from \"./Game\";\nimport { WHRNG } from \"./RNG\";\nimport { trusted } from \"./utils\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ntype IProps = {\n p: IPlayer;\n};\n\nconst minPlay = 0;\nconst maxPlay = 1e7;\n\nfunction isRed(n: number): boolean {\n return [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36].includes(n);\n}\n\ntype Strategy = {\n match: (n: number) => boolean;\n payout: number;\n};\n\nconst redNumbers: number[] = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36];\n\nconst strategies: {\n Red: Strategy;\n Black: Strategy;\n Odd: Strategy;\n Even: Strategy;\n High: Strategy;\n Low: Strategy;\n Third1: Strategy;\n Third2: Strategy;\n Third3: Strategy;\n} = {\n Red: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return redNumbers.includes(n);\n },\n payout: 1,\n },\n Black: {\n match: (n: number): boolean => {\n return !redNumbers.includes(n);\n },\n payout: 1,\n },\n Odd: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n % 2 === 1;\n },\n payout: 1,\n },\n Even: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n % 2 === 0;\n },\n payout: 1,\n },\n High: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n > 18;\n },\n payout: 1,\n },\n Low: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n < 19;\n },\n payout: 1,\n },\n Third1: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n <= 12;\n },\n payout: 2,\n },\n Third2: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n >= 13 && n <= 24;\n },\n payout: 2,\n },\n Third3: {\n match: (n: number): boolean => {\n if (n === 0) return false;\n return n >= 25;\n },\n payout: 2,\n },\n};\n\nfunction Single(s: number): Strategy {\n return {\n match: (n: number): boolean => {\n return s === n;\n },\n payout: 36,\n };\n}\n\nexport function Roulette(props: IProps): React.ReactElement {\n const [rng] = useState(new WHRNG(new Date().getTime()));\n const [investment, setInvestment] = useState(1000);\n const [canPlay, setCanPlay] = useState(true);\n const [status, setStatus] = useState(\"waiting\");\n const [n, setN] = useState(0);\n const [lock, setLock] = useState(true);\n const [strategy, setStrategy] = useState({\n payout: 0,\n match: (): boolean => {\n return false;\n },\n });\n\n useEffect(() => {\n const i = window.setInterval(step, 50);\n return () => clearInterval(i);\n });\n\n function step(): void {\n if (!lock) {\n setN(Math.floor(Math.random() * 37));\n }\n }\n\n function updateInvestment(e: React.ChangeEvent): void {\n let investment: number = parseInt(e.currentTarget.value);\n if (isNaN(investment)) {\n investment = minPlay;\n }\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n if (investment < minPlay) {\n investment = minPlay;\n }\n setInvestment(investment);\n }\n\n function currentNumber(): string {\n if (n === 0) return \"0\";\n const color = isRed(n) ? \"R\" : \"B\";\n return `${n}${color}`;\n }\n\n function play(s: Strategy): void {\n if (reachedLimit(props.p)) return;\n\n setCanPlay(false);\n setLock(false);\n setStatus(\"playing\");\n setStrategy(s);\n\n setTimeout(() => {\n let n = Math.floor(rng.random() * 37);\n let status = <>;\n let gain = 0;\n let playerWin = strategy.match(n);\n // oh yeah, the house straight up cheats. Try finding the seed now!\n if (playerWin && Math.random() > 0.9) {\n playerWin = false;\n while (strategy.match(n)) {\n n = (n + 1) % 36;\n }\n }\n if (playerWin) {\n gain = investment * strategy.payout;\n status = (\n <>\n won \n \n );\n } else {\n gain = -investment;\n status = (\n <>\n lost \n \n );\n }\n win(props.p, gain);\n\n setCanPlay(true);\n setLock(true);\n setStatus(status);\n setN(n);\n\n reachedLimit(props.p);\n }, 1600);\n }\n\n return (\n <>\n {currentNumber()}\n \n {status}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { WHRNG } from \"./RNG\";\nimport { win, reachedLimit } from \"./Game\";\nimport { trusted } from \"./utils\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ntype IProps = {\n p: IPlayer;\n};\n\n// statically shuffled array of symbols.\nconst symbols = [\n \"D\",\n \"C\",\n \"$\",\n \"?\",\n \"♥\",\n \"A\",\n \"C\",\n \"B\",\n \"C\",\n \"E\",\n \"B\",\n \"E\",\n \"C\",\n \"*\",\n \"D\",\n \"♥\",\n \"B\",\n \"A\",\n \"A\",\n \"A\",\n \"C\",\n \"A\",\n \"D\",\n \"B\",\n \"E\",\n \"?\",\n \"D\",\n \"*\",\n \"@\",\n \"♥\",\n \"B\",\n \"E\",\n \"?\",\n];\n\nfunction getPayout(s: string, n: number): number {\n switch (s) {\n case \"$\":\n return [20, 200, 1000][n];\n case \"@\":\n return [8, 80, 400][n];\n case \"♥\":\n case \"?\":\n return [6, 20, 150][n];\n case \"D\":\n case \"E\":\n return [1, 8, 30][n];\n default:\n return [1, 5, 20][n];\n }\n}\n\nconst payLines = [\n // lines\n [\n [0, 0],\n [0, 1],\n [0, 2],\n [0, 3],\n [0, 4],\n ],\n [\n [1, 0],\n [1, 1],\n [1, 2],\n [1, 3],\n [1, 4],\n ],\n [\n [2, 0],\n [2, 1],\n [2, 2],\n [2, 3],\n [2, 4],\n ],\n\n // Vs\n [\n [2, 0],\n [1, 1],\n [0, 2],\n [1, 3],\n [2, 4],\n ],\n [\n [0, 0],\n [1, 1],\n [2, 2],\n [1, 3],\n [0, 4],\n ],\n\n // rest\n [\n [0, 0],\n [1, 1],\n [1, 2],\n [1, 3],\n [0, 4],\n ],\n [\n [2, 0],\n [1, 1],\n [1, 2],\n [1, 3],\n [2, 4],\n ],\n [\n [1, 0],\n [0, 1],\n [0, 2],\n [0, 3],\n [1, 4],\n ],\n [\n [1, 0],\n [2, 1],\n [2, 2],\n [2, 3],\n [1, 4],\n ],\n];\n\nconst minPlay = 0;\nconst maxPlay = 1e6;\n\nexport function SlotMachine(props: IProps): React.ReactElement {\n const [rng] = useState(new WHRNG(props.p.totalPlaytime));\n const [index, setIndex] = useState([0, 0, 0, 0, 0]);\n const [locks, setLocks] = useState([0, 0, 0, 0, 0]);\n const [investment, setInvestment] = useState(1000);\n const [canPlay, setCanPlay] = useState(true);\n const [status, setStatus] = useState(\"waiting\");\n\n useEffect(() => {\n const i = window.setInterval(step, 50);\n return () => clearInterval(i);\n });\n\n function step(): void {\n let stoppedOne = false;\n const copy = index.slice();\n for (const i in copy) {\n if (copy[i] === locks[i] && !stoppedOne) continue;\n copy[i] = (copy[i] + 1) % symbols.length;\n stoppedOne = true;\n }\n\n setIndex(copy);\n\n if (stoppedOne && copy.every((e, i) => e === locks[i])) {\n checkWinnings();\n }\n }\n\n function getTable(): string[][] {\n return [\n [\n symbols[(index[0] + symbols.length - 1) % symbols.length],\n symbols[(index[1] + symbols.length - 1) % symbols.length],\n symbols[(index[2] + symbols.length - 1) % symbols.length],\n symbols[(index[3] + symbols.length - 1) % symbols.length],\n symbols[(index[4] + symbols.length - 1) % symbols.length],\n ],\n [symbols[index[0]], symbols[index[1]], symbols[index[2]], symbols[index[3]], symbols[index[4]]],\n [\n symbols[(index[0] + 1) % symbols.length],\n symbols[(index[1] + 1) % symbols.length],\n symbols[(index[2] + 1) % symbols.length],\n symbols[(index[3] + 1) % symbols.length],\n symbols[(index[4] + 1) % symbols.length],\n ],\n ];\n }\n\n function play(): void {\n if (reachedLimit(props.p)) return;\n setStatus(\"playing\");\n win(props.p, -investment);\n if (!canPlay) return;\n unlock();\n setTimeout(lock, rng.random() * 2000 + 1000);\n }\n\n function lock(): void {\n setLocks([\n Math.floor(rng.random() * symbols.length),\n Math.floor(rng.random() * symbols.length),\n Math.floor(rng.random() * symbols.length),\n Math.floor(rng.random() * symbols.length),\n Math.floor(rng.random() * symbols.length),\n ]);\n }\n\n function checkWinnings(): void {\n const t = getTable();\n const getPaylineData = function (payline: number[][]): string[] {\n const data = [];\n for (const point of payline) {\n data.push(t[point[0]][point[1]]);\n }\n return data;\n };\n\n const countSequence = function (data: string[]): number {\n let count = 1;\n for (let i = 1; i < data.length; i++) {\n if (data[i] !== data[i - 1]) break;\n count++;\n }\n\n return count;\n };\n\n let gains = -investment;\n for (const payline of payLines) {\n const data = getPaylineData(payline);\n const count = countSequence(data);\n if (count < 3) continue;\n const payout = getPayout(data[0], count - 3);\n gains += investment * payout;\n win(props.p, investment * payout);\n }\n\n setStatus(\n <>\n {gains > 0 ? \"gained\" : \"lost\"} \n ,\n );\n setCanPlay(true);\n if (reachedLimit(props.p)) return;\n }\n\n function unlock(): void {\n setLocks([-1, -1, -1, -1, -1]);\n setCanPlay(false);\n }\n\n function updateInvestment(e: React.ChangeEvent): void {\n let investment: number = parseInt(e.currentTarget.value);\n if (isNaN(investment)) {\n investment = minPlay;\n }\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n if (investment < minPlay) {\n investment = minPlay;\n }\n setInvestment(investment);\n }\n\n const t = getTable();\n // prettier-ignore\n return (\n <>\n+———————————————————————+\n| | {t[0][0]} | {t[0][1]} | {t[0][2]} | {t[0][3]} | {t[0][4]} | |\n| | | | | | | |\n| | {symbols[index[0]]} | {symbols[index[1]]} | {symbols[index[2]]} | {symbols[index[3]]} | {symbols[index[4]]} | |\n| | | | | | | |\n| | {symbols[(index[0]+1)%symbols.length]} | {symbols[(index[1]+1)%symbols.length]} | {symbols[(index[2]+1)%symbols.length]} | {symbols[(index[3]+1)%symbols.length]} | {symbols[(index[4]+1)%symbols.length]} | |\n+———————————————————————+\n Spin!)}}\n />\n \n {status}\n Pay lines\n\n----- ····· ·····\n····· ----- ·····\n····· ····· -----\n
    \n\n··^·· \\···/ \\···/\n·/·\\· ·\\·/· ·---·\n/···\\ ··v·· ·····\n
    \n\n····· ·---· ·····\n·---· /···\\ \\···/\n/···\\ ····· ·---·\n \n );\n}\n\n// https://felgo.com/doc/how-to-make-a-slot-game-tutorial/\n","/**\n * React Component for displaying a City's UI.\n * This UI shows all of the available locations in the city, and lets the player\n * visit those locations\n */\nimport * as React from \"react\";\n\nimport { City } from \"../City\";\nimport { Cities } from \"../Cities\";\nimport { LocationName } from \"../data/LocationNames\";\nimport { Locations } from \"../Locations\";\nimport { Location } from \"../Location\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { use } from \"../../ui/Context\";\nimport { IRouter } from \"../../ui/Router\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\ntype IProps = {\n city: City;\n};\n\nfunction toLocation(router: IRouter, location: Location): void {\n if (location.name === LocationName.TravelAgency) {\n router.toTravel();\n } else if (location.name === LocationName.WorldStockExchange) {\n router.toStockMarket();\n } else {\n router.toLocation(location);\n }\n}\n\nfunction LocationLetter(location: Location): React.ReactElement {\n location.types;\n const router = use.Router();\n let L = \"X\";\n if (location.types.includes(LocationType.Company)) L = \"C\";\n if (location.types.includes(LocationType.Gym)) L = \"G\";\n if (location.types.includes(LocationType.Hospital)) L = \"H\";\n if (location.types.includes(LocationType.Slums)) L = \"S\";\n if (location.types.includes(LocationType.StockMarket)) L = \"$\";\n if (location.types.includes(LocationType.TechVendor)) L = \"T\";\n if (location.types.includes(LocationType.TravelAgency)) L = \"T\";\n if (location.types.includes(LocationType.University)) L = \"U\";\n if (location.types.includes(LocationType.Casino)) L = \"¢\";\n if (location.types.includes(LocationType.Special)) L = \"?\";\n if (!location) return *;\n return (\n toLocation(router, location)}\n >\n {L}\n \n );\n}\n\nfunction ASCIICity(props: IProps): React.ReactElement {\n const locationLettersRegex = /[A-Z]/g;\n const letterMap: any = {\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25,\n };\n\n const lineElems = (s: string): JSX.Element[] => {\n const elems: any[] = [];\n const matches: any[] = [];\n let match: any;\n while ((match = locationLettersRegex.exec(s)) !== null) {\n matches.push(match);\n }\n if (matches.length === 0) {\n elems.push(s);\n return elems;\n }\n\n for (let i = 0; i < matches.length; i++) {\n const startI = i === 0 ? 0 : matches[i - 1].index + 1;\n const endI = matches[i].index;\n elems.push(s.slice(startI, endI));\n const locationI = letterMap[s[matches[i].index]];\n elems.push(LocationLetter(Locations[props.city.locations[locationI]]));\n }\n elems.push(s.slice(matches[matches.length - 1].index + 1));\n return elems;\n };\n\n const elems: JSX.Element[] = [];\n const lines = props.city.asciiArt.split(\"\\n\");\n for (const i in lines) {\n elems.push(\n \n {lineElems(lines[i])}\n ,\n );\n }\n\n return <>{elems};\n}\n\nfunction ListCity(props: IProps): React.ReactElement {\n const router = use.Router();\n const locationButtons = props.city.locations.map((locName) => {\n return (\n \n \n
    \n
    \n );\n });\n\n return <>{locationButtons};\n}\n\nexport function LocationCity(): React.ReactElement {\n const player = use.Player();\n const city = Cities[player.city];\n return (\n <>\n {city.name}\n {Settings.DisableASCIIArt ? : }\n \n );\n}\n","import React, { useState } from \"react\";\nimport { Options } from \"./Options\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Select from \"@mui/material/Select\";\nimport Switch from \"@mui/material/Switch\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n options: Options;\n save: (options: Options) => void;\n onClose: () => void;\n open: boolean;\n}\n\nexport function OptionsModal(props: IProps): React.ReactElement {\n const [theme, setTheme] = useState(props.options.theme);\n const [insertSpaces, setInsertSpaces] = useState(props.options.insertSpaces);\n const [fontSize, setFontSize] = useState(props.options.fontSize);\n\n function save(): void {\n props.save({\n theme: theme,\n insertSpaces: insertSpaces,\n fontSize: fontSize,\n });\n props.onClose();\n }\n\n function onFontChange(event: React.ChangeEvent): void {\n const f = parseFloat(event.target.value);\n if (isNaN(f)) return;\n setFontSize(f);\n }\n\n return (\n \n \n Theme: \n \n \n\n \n Use whitespace over tabs: \n setInsertSpaces(event.target.checked)} checked={insertSpaces} />\n \n \n \n \n
    \n \n
    \n );\n}\n","export async function loadThemes(monaco: { editor: any }): Promise {\n monaco.editor.defineTheme(\"monokai\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"272822\",\n token: \"\",\n },\n {\n foreground: \"75715e\",\n token: \"comment\",\n },\n {\n foreground: \"e6db74\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"ae81ff\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"ae81ff\",\n },\n {\n foreground: \"ae81ff\",\n token: \"function\",\n },\n {\n foreground: \"f92672\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"ae81ff\",\n },\n {\n token: \"ns\",\n foreground: \"97d92b\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"53d3e4\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"53d3e4\",\n },\n {\n token: \"this\",\n foreground: \"fd971f\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#F8F8F2\",\n \"editor.background\": \"#272822\",\n \"editor.selectionBackground\": \"#49483E\",\n \"editor.lineHighlightBackground\": \"#3E3D32\",\n \"editorCursor.foreground\": \"#F8F8F0\",\n \"editorWhitespace.foreground\": \"#3B3A32\",\n \"editorIndentGuide.activeBackground\": \"#9D550FB0\",\n \"editor.selectionHighlightBorder\": \"#222218\",\n },\n });\n\n monaco.editor.defineTheme(\"solarized-dark\", {\n base: \"vs-dark\",\n inherit: true,\n rules: [\n {\n background: \"002b36\",\n token: \"\",\n },\n {\n foreground: \"586e75\",\n token: \"comment\",\n },\n {\n foreground: \"00afaf\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"00afaf\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"268bd2\",\n },\n {\n foreground: \"268bd2\",\n token: \"function\",\n },\n {\n foreground: \"859900\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"cb4b16\",\n },\n {\n token: \"ns\",\n foreground: \"cb4b16\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"268bd2\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"268bd2\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"b58900\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"this\",\n foreground: \"cb4b16\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#839496\",\n \"editor.background\": \"#002b36\",\n \"editor.selectionBackground\": \"#073642\",\n \"editor.lineHighlightBackground\": \"#073642\",\n \"editorCursor.foreground\": \"#819090\",\n \"editorWhitespace.foreground\": \"#073642\",\n \"editorIndentGuide.activeBackground\": \"#9D550FB0\",\n \"editor.selectionHighlightBorder\": \"#222218\",\n },\n });\n\n monaco.editor.defineTheme(\"solarized-light\", {\n base: \"vs\",\n inherit: true,\n rules: [\n {\n foreground: \"657b83\",\n background: \"fdf6e3\",\n token: \"\",\n },\n {\n foreground: \"586e75\",\n token: \"comment\",\n },\n {\n foreground: \"2aa198\",\n token: \"string\",\n },\n {\n token: \"number\",\n foreground: \"2aa198\",\n },\n {\n token: \"otherkeyvars\",\n foreground: \"268bd2\",\n },\n {\n foreground: \"268bd2\",\n token: \"function\",\n },\n {\n foreground: \"859900\",\n token: \"keyword\",\n },\n {\n token: \"storage.type.function.js\",\n foreground: \"bc4b16\",\n },\n {\n token: \"ns\",\n foreground: \"cb4b16\",\n },\n {\n token: \"netscriptfunction\",\n foreground: \"268bd2\",\n },\n {\n token: \"otherkeywords\",\n foreground: \"268bd2\",\n },\n {\n token: \"type.identifier.js\",\n foreground: \"b58900\",\n },\n {\n token: \"delimiter.square.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"delimiter.bracket.js\",\n foreground: \"0087ff\",\n },\n {\n token: \"this\",\n foreground: \"cb4b16\",\n },\n ],\n colors: {\n \"editor.foreground\": \"#657b83\",\n \"editor.background\": \"#fdf6e3\",\n \"editor.selectionBackground\": \"#eee8d5\",\n \"editor.lineHighlightBackground\": \"#eee8d5\",\n \"editorCursor.foreground\": \"#657b83\",\n \"editorWhitespace.foreground\": \"#eee8d5\",\n \"editorIndentGuide.activeBackground\": \"#eee8d5\",\n \"editor.selectionHighlightBorder\": \"#073642\",\n },\n });\n}\n","export default \"/**\\n * @public\\n */\\ninterface Player {\\n hacking: number;\\n hp: number;\\n max_hp: number;\\n strength: number;\\n defense: number;\\n dexterity: number;\\n agility: number;\\n charisma: number;\\n intelligence: number;\\n hacking_chance_mult: number;\\n hacking_speed_mult: number;\\n hacking_money_mult: number;\\n hacking_grow_mult: number;\\n hacking_exp: number;\\n strength_exp: number;\\n defense_exp: number;\\n dexterity_exp: number;\\n agility_exp: number;\\n charisma_exp: number;\\n hacking_mult: number;\\n strength_mult: number;\\n defense_mult: number;\\n dexterity_mult: number;\\n agility_mult: number;\\n charisma_mult: number;\\n hacking_exp_mult: number;\\n strength_exp_mult: number;\\n defense_exp_mult: number;\\n dexterity_exp_mult: number;\\n agility_exp_mult: number;\\n charisma_exp_mult: number;\\n company_rep_mult: number;\\n faction_rep_mult: number;\\n numPeopleKilled: number;\\n money: number;\\n city: string;\\n location: string;\\n companyName: string;\\n crime_money_mult: number;\\n crime_success_mult: number;\\n isWorking: boolean;\\n workType: string;\\n currentWorkFactionName: string;\\n currentWorkFactionDescription: string;\\n workHackExpGainRate: number;\\n workStrExpGainRate: number;\\n workDefExpGainRate: number;\\n workDexExpGainRate: number;\\n workAgiExpGainRate: number;\\n workChaExpGainRate: number;\\n workRepGainRate: number;\\n workMoneyGainRate: number;\\n workMoneyLossRate: number;\\n workHackExpGained: number;\\n workStrExpGained: number;\\n workDefExpGained: number;\\n workDexExpGained: number;\\n workAgiExpGained: number;\\n workChaExpGained: number;\\n workRepGained: number;\\n workMoneyGained: number;\\n createProgramName: string;\\n createProgramReqLvl: number;\\n className: string;\\n crimeType: string;\\n work_money_mult: number;\\n hacknet_node_money_mult: number;\\n hacknet_node_purchase_cost_mult: number;\\n hacknet_node_ram_cost_mult: number;\\n hacknet_node_core_cost_mult: number;\\n hacknet_node_level_cost_mult: number;\\n hasWseAccount: boolean;\\n hasTixApiAccess: boolean;\\n has4SData: boolean;\\n has4SDataTixApi: boolean;\\n bladeburner_max_stamina_mult: number;\\n bladeburner_stamina_gain_mult: number;\\n bladeburner_analysis_mult: number;\\n bladeburner_success_chance_mult: number;\\n bitNodeN: number;\\n totalPlaytime: number;\\n playtimeSinceLastAug: number;\\n playtimeSinceLastBitnode: number;\\n jobs: any;\\n factions: string[];\\n tor: boolean;\\n}\\n\\n/**\\n * @public\\n */\\ninterface RunningScript {\\n args: string[];\\n filename: string;\\n logs: string[];\\n offlineExpGained: number;\\n offlineMoneyMade: number;\\n offlineRunningTime: number;\\n onlineExpGained: number;\\n onlineMoneyMade: number;\\n onlineRunningTime: number;\\n pid: number;\\n ramUsage: number;\\n server: string;\\n threads: number;\\n}\\n\\n/**\\n * Data representing the internal values of a crime.\\n * @public\\n */\\nexport interface CrimeStats {\\n /** Number representing the difficulty of the crime. Used for success chance calculations */\\n difficulty: number;\\n /** Amount of karma lost for successfully committing this crime */\\n karma: number;\\n /** How many people die as a result of this crime */\\n kills: number;\\n /** How much money is given */\\n money: number;\\n /** Name of crime */\\n name: number;\\n /** Milliseconds it takes to attempt the crime */\\n time: number;\\n /** Description of the crime activity */\\n type: string;\\n /** hacking level impact on success change of the crime */\\n hacking_success_weight: number;\\n /** strength level impact on success change of the crime */\\n strength_success_weight: number;\\n /** defense level impact on success change of the crime */\\n defense_success_weight: number;\\n /** dexterity level impact on success change of the crime */\\n dexterity_success_weight: number;\\n /** agility level impact on success change of the crime */\\n agility_success_weight: number;\\n /** charisma level impact on success change of the crime */\\n charisma_success_weight: number;\\n /** hacking exp gained from crime */\\n hacking_exp: number;\\n /** strength exp gained from crime */\\n strength_exp: number;\\n /** defense exp gained from crime */\\n defense_exp: number;\\n /** dexterity exp gained from crime */\\n dexterity_exp: number;\\n /** agility exp gained from crime */\\n agility_exp: number;\\n /** charisma exp gained from crime */\\n charisma_exp: number;\\n /** intelligence exp gained from crime */\\n intelligence_exp: number;\\n}\\n\\n/**\\n * Data representing the internal values of an Augmentation.\\n * @public\\n */\\nexport interface AugmentationStats {\\n /** Multipler to hacking skill */\\n hacking_mult?: number;\\n /** Multipler to strength skill */\\n strength_mult?: number;\\n /** Multipler to defense skill */\\n defense_mult?: number;\\n /** Multipler to dexterity skill */\\n dexterity_mult?: number;\\n /** Multipler to agility skill */\\n agility_mult?: number;\\n /** Multipler to charisma skill */\\n charisma_mult?: number;\\n /** Multipler to hacking experience gain rate */\\n hacking_exp_mult?: number;\\n /** Multipler to strength experience gain rate */\\n strength_exp_mult?: number;\\n /** Multipler to defense experience gain rate */\\n defense_exp_mult?: number;\\n /** Multipler to dexterity experience gain rate */\\n dexterity_exp_mult?: number;\\n /** Multipler to agility experience gain rate */\\n agility_exp_mult?: number;\\n /** Multipler to charisma experience gain rate */\\n charisma_exp_mult?: number;\\n /** Multipler to chance of successfully performing a hack */\\n hacking_chance_mult?: number;\\n /** Multipler to hacking speed */\\n hacking_speed_mult?: number;\\n /** Multipler to amount of money the player gains from hacking */\\n hacking_money_mult?: number;\\n /** Multipler to amount of money injected into servers using grow */\\n hacking_grow_mult?: number;\\n /** Multipler to amount of reputation gained when working */\\n company_rep_mult?: number;\\n /** Multipler to amount of reputation gained when working */\\n faction_rep_mult?: number;\\n /** Multipler to amount of money gained from crimes */\\n crime_money_mult?: number;\\n /** Multipler to crime success rate */\\n crime_success_mult?: number;\\n /** Multipler to amount of money gained from working */\\n work_money_mult?: number;\\n /** Multipler to amount of money produced by Hacknet Nodes */\\n hacknet_node_money_mult?: number;\\n /** Multipler to cost of purchasing a Hacknet Node */\\n hacknet_node_purchase_cost_mult?: number;\\n /** Multipler to cost of ram for a Hacknet Node */\\n hacknet_node_ram_cost_mult?: number;\\n /** Multipler to cost of core for a Hacknet Node */\\n hacknet_node_core_cost_mult?: number;\\n /** Multipler to cost of leveling up a Hacknet Node */\\n hacknet_node_level_cost_mult?: number;\\n /** Multipler to Bladeburner max stamina */\\n bladeburner_max_stamina_mult?: number;\\n /** Multipler to Bladeburner stamina gain rate */\\n bladeburner_stamina_gain_mult?: number;\\n /** Multipler to effectiveness in Bladeburner Field Analysis */\\n bladeburner_analysis_mult?: number;\\n /** Multipler to success chance in Bladeburner contracts/operations */\\n bladeburner_success_chance_mult?: number;\\n}\\n\\n/**\\n * Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.\\n * @public\\n */\\nexport interface BasicHGWOptions {\\n /** Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. */\\n threads: number;\\n /** Set to true this action will affect the stock market. */\\n stock?: boolean;\\n}\\n\\n/**\\n * Options to affect the behavior of {@link CodingContract} attempt.\\n * @public\\n */\\nexport interface CodingAttemptOptions {\\n /** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */\\n returnReward: boolean;\\n}\\n\\n/**\\n * Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}\\n * @public\\n */\\nexport interface AugmentPair {\\n /** augmentation name */\\n name: string;\\n /** augmentation cost */\\n cost: number;\\n}\\n\\n/**\\n * Value in map of {@link StockOrder}\\n * @public\\n */\\nexport interface StockOrderObject {\\n /** Number of shares */\\n shares: number;\\n /** Price per share */\\n price: number;\\n /** Order type */\\n type: string;\\n /** Order position */\\n position: string;\\n}\\n\\n/**\\n * Return value of {@link TIX.getOrders | getOrders}\\n * @public\\n */\\nexport interface StockOrder {\\n /** Stock Symbol */\\n [key: string]: StockOrderObject[];\\n}\\n\\n/**\\n * A single process on a server.\\n * @public\\n */\\nexport interface ProcessInfo {\\n /** Script name. */\\n filename: string;\\n /** Number of threads script is running with */\\n threads: number;\\n /** Script's arguments */\\n args: string[];\\n}\\n\\n/**\\n * Hack related multipliers.\\n * @public\\n */\\nexport interface HackingMultipliers {\\n /** Player's hacking chance multiplier. */\\n chance: number;\\n /** Player's hacking speed multiplier. */\\n speed: number;\\n /** Player's hacking money stolen multiplier. */\\n money: number;\\n /** Player's hacking growth multiplier */\\n growth: number;\\n}\\n\\n/**\\n * Hacknet related multipliers.\\n * @public\\n */\\nexport interface HacknetMultipliers {\\n /** Player's hacknet production multiplier */\\n production: number;\\n /** Player's hacknet purchase cost multiplier */\\n purchaseCost: number;\\n /** Player's hacknet ram cost multiplier */\\n ramCost: number;\\n /** Player's hacknet core cost multiplier */\\n coreCost: number;\\n /** Player's hacknet level cost multiplier */\\n levelCost: number;\\n}\\n\\n/**\\n * A single server.\\n * @public\\n */\\nexport interface Server {\\n /**\\n * How many CPU cores this server has. Maximum of 8.\\n * Affects magnitude of grow and weaken.\\n */\\n cpuCores: number;\\n\\n /** Flag indicating whether the FTP port is open */\\n ftpPortOpen: boolean;\\n\\n /** Flag indicating whether player has admin/root access to this server */\\n hasAdminRights: boolean;\\n\\n /** Hostname. Must be unique */\\n hostname: string;\\n\\n /** Flag indicating whether HTTP Port is open */\\n httpPortOpen: boolean;\\n\\n /** IP Address. Must be unique */\\n ip: string;\\n\\n /** Flag indicating whether player is curently connected to this server */\\n isConnectedTo: boolean;\\n\\n /** RAM (GB) available on this server */\\n maxRam: number;\\n\\n /**\\n * Name of company/faction/etc. that this server belongs to.\\n * Optional, not applicable to all Servers\\n */\\n organizationName: string;\\n\\n /** RAM (GB) used. i.e. unavailable RAM */\\n ramUsed: number;\\n\\n /** Flag indicating whether SMTP Port is open */\\n smtpPortOpen: boolean;\\n\\n /** Flag indicating whether SQL Port is open */\\n sqlPortOpen: boolean;\\n\\n /** Flag indicating whether the SSH Port is open */\\n sshPortOpen: boolean;\\n\\n /** Flag indicating whether this is a purchased server */\\n purchasedByPlayer: boolean;\\n\\n /** Flag indicating whether this server has a backdoor installed by a player */\\n backdoorInstalled: boolean;\\n\\n /**\\n * Initial server security level\\n * (i.e. security level when the server was created)\\n */\\n baseDifficulty: number;\\n\\n /** Server Security Level */\\n hackDifficulty: number;\\n\\n /** Minimum server security level that this server can be weakened to */\\n minDifficulty: number;\\n\\n /** How much money currently resides on the server and can be hacked */\\n moneyAvailable: number;\\n\\n /** Maximum amount of money that this server can hold */\\n moneyMax: number;\\n\\n /** Number of open ports required in order to gain admin/root access */\\n numOpenPortsRequired: number;\\n\\n /** How many ports are currently opened on the server */\\n openPortCount: number;\\n\\n /** Hacking level required to hack this server */\\n requiredHackingSkill: number;\\n\\n /**\\n * Parameter that affects how effectively this server's money can\\n * be increased using the grow() Netscript function\\n */\\n serverGrowth: number;\\n}\\n\\n/**\\n * All multipliers affecting the difficulty of the current challenge.\\n * @public\\n */\\nexport interface BitNodeMultipliers {\\n /** Influences how quickly the player's agility level (not exp) scales */\\n AgilityLevelMultiplier: number;\\n /** Influences the base cost to purchase an augmentation. */\\n AugmentationMoneyCost: number;\\n /** Influences the base rep the player must have with a faction to purchase an augmentation. */\\n AugmentationRepCost: number;\\n /** Influences how quickly the player can gain rank within Bladeburner. */\\n BladeburnerRank: number;\\n /** Influences the cost of skill levels from Bladeburner. */\\n BladeburnerSkillCost: number;\\n /** Influences how quickly the player's charisma level (not exp) scales */\\n CharismaLevelMultiplier: number;\\n /** Influences the experience gained for each ability when a player completes a class. */\\n ClassGymExpGain: number;\\n /** Influences the amount of money gained from completing Coding Contracts */\\n CodingContractMoney: number;\\n /** Influences the experience gained for each ability when the player completes working their job. */\\n CompanyWorkExpGain: number;\\n /** Influences how much money the player earns when completing working their job. */\\n CompanyWorkMoney: number;\\n /** Influences the valuation of corporations created by the player. */\\n CorporationValuation: number;\\n /** Influences the base experience gained for each ability when the player commits a crime. */\\n CrimeExpGain: number;\\n /** Influences the base money gained when the player commits a crime. */\\n CrimeMoney: number;\\n /** Influences how many Augmentations you need in order to get invited to the Daedalus faction */\\n DaedalusAugsRequirement: number;\\n /** Influences how quickly the player's defense level (not exp) scales */\\n DefenseLevelMultiplier: number;\\n /** Influences how quickly the player's dexterity level (not exp) scales */\\n DexterityLevelMultiplier: number;\\n /** Influences how much rep the player gains in each faction simply by being a member. */\\n FactionPassiveRepGain: number;\\n /** Influences the experience gained for each ability when the player completes work for a Faction. */\\n FactionWorkExpGain: number;\\n /** Influences how much rep the player gains when performing work for a faction. */\\n FactionWorkRepGain: number;\\n /** Influences how much it costs to unlock the stock market's 4S Market Data API */\\n FourSigmaMarketDataApiCost: number;\\n /** Influences how much it costs to unlock the stock market's 4S Market Data (NOT API) */\\n FourSigmaMarketDataCost: number;\\n /** Influences the experienced gained when hacking a server. */\\n HackExpGain: number;\\n /** Influences how quickly the player's hacking level (not experience) scales */\\n HackingLevelMultiplier: number;\\n /** Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) */\\n HacknetNodeMoney: number;\\n /** Influences how much money it costs to upgrade your home computer's RAM */\\n HomeComputerRamCost: number;\\n /** Influences how much money is gained when the player infiltrates a company. */\\n InfiltrationMoney: number;\\n /** Influences how much rep the player can gain from factions when selling stolen documents and secrets */\\n InfiltrationRep: number;\\n /** Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. */\\n ManualHackMoney: number;\\n /** Influence how much it costs to purchase a server */\\n PurchasedServerCost: number;\\n /** Influences the maximum number of purchased servers you can have */\\n PurchasedServerLimit: number;\\n /** Influences the maximum allowed RAM for a purchased server */\\n PurchasedServerMaxRam: number;\\n /** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */\\n RepToDonateToFaction: number;\\n /** Influences how much money can be stolen from a server when a script performs a hack against it. */\\n ScriptHackMoney: number;\\n /** Influences the growth percentage per cycle against a server. */\\n ServerGrowthRate: number;\\n /** Influences the maxmimum money that a server can grow to. */\\n ServerMaxMoney: number;\\n /** Influences the initial money that a server starts with. */\\n ServerStartingMoney: number;\\n /** Influences the initial security level (hackDifficulty) of a server. */\\n ServerStartingSecurity: number;\\n /** Influences the weaken amount per invocation against a server. */\\n ServerWeakenRate: number;\\n /** Influences how quickly the player's strength level (not exp) scales */\\n StrengthLevelMultiplier: number;\\n}\\n\\n/**\\n * Object representing all the values related to a hacknet node.\\n * @public\\n */\\nexport interface NodeStats {\\n /** Node's name */\\n name: string;\\n /** Node's level */\\n level: number;\\n /** Node's RAM */\\n ram: number;\\n /** Node's used RAM */\\n ramUsed: number;\\n /** Node's number of cores */\\n cores: number;\\n /** Cache level. Only applicable for Hacknet Servers */\\n cache: number;\\n /** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */\\n hashCapacity: number;\\n /** Node's production per second */\\n production: number;\\n /** Number of seconds since Node has been purchased */\\n timeOnline: number;\\n /** Total number of money Node has produced */\\n totalProduction: number;\\n}\\n\\n/**\\n * Short summary of the players skills.\\n * @public\\n */\\nexport interface PlayerSkills {\\n /** Hacking level */\\n hacking: number;\\n /** Strength level */\\n strength: number;\\n /** Defense level */\\n defense: number;\\n /** Dexterity level */\\n dexterity: number;\\n /** Agility level */\\n agility: number;\\n /** Chraisma level */\\n charisma: number;\\n /** Intelligence level */\\n intelligence: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface CharacterMult {\\n /** Agility stat */\\n agility: number;\\n /** Agility exp */\\n agilityExp: number;\\n /** Company reputation */\\n companyRep: number;\\n /** Money earned from crimes */\\n crimeMoney: number;\\n /** Crime success chance */\\n crimeSuccess: number;\\n /** Defense stat */\\n defense: number;\\n /** Defense exp */\\n defenseExp: number;\\n /** Dexterity stat */\\n dexterity: number;\\n /** Dexterity exp */\\n dexterityExp: number;\\n /** Faction reputation */\\n factionRep: number;\\n /** Hacking stat */\\n hacking: number;\\n /** Hacking exp */\\n hackingExp: number;\\n /** Strength stat */\\n strength: number;\\n /** Strength exp */\\n strengthExp: number;\\n /** Money earned from jobs */\\n workMoney: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface CharacterInfo {\\n /** Current BitNode number */\\n bitnode: number;\\n /** Name of city you are currently in */\\n city: string;\\n /** Array of factions you are currently a member of */\\n factions: string[];\\n /** Current health points */\\n hp: number;\\n /** Array of all companies at which you have jobs */\\n company: string[];\\n /** Array of job positions for all companies you are employed at. Same order as 'jobs' */\\n jobTitle: string[];\\n /** Maximum health points */\\n maxHp: number;\\n /** Boolean indicating whether or not you have a tor router */\\n tor: boolean;\\n /** Object with many of the player's multipliers from Augmentations/Source Files */\\n mult: CharacterMult;\\n /** Timed worked in ms */\\n timeWorked: number;\\n /** Hacking experience earned so far from work */\\n workHackExpGain: number;\\n /** Str experience earned so far from work */\\n workStrExpGain: number;\\n /** Def experience earned so far from work */\\n workDefExpGain: number;\\n /** Dex experience earned so far from work */\\n workDexExpGain: number;\\n /** Agi experience earned so far from work */\\n workAgiExpGain: number;\\n /** Cha experience earned so far from work */\\n workChaExpGain: number;\\n /** Reputation earned so far from work, if applicable */\\n workRepGain: number;\\n /** Money earned so far from work, if applicable */\\n workMoneyGain: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface SleeveWorkGains {\\n /** hacking exp gained from work */\\n workHackExpGain: number;\\n /** strength exp gained from work */\\n workStrExpGain: number;\\n /** defense exp gained from work, */\\n workDefExpGain: number;\\n /** dexterity exp gained from work */\\n workDexExpGain: number;\\n /** agility exp gained from work */\\n workAgiExpGain: number;\\n /** charisma exp gained from work */\\n workChaExpGain: number;\\n /** money gained from work */\\n workMoneyGain: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface SourceFileLvl {\\n /** The number of the source file */\\n n: number;\\n /** The level of the source file */\\n lvl: number;\\n}\\n\\n/**\\n * Bladeburner current action.\\n * @public\\n */\\nexport interface BladeburnerCurAction {\\n /** Type of Action */\\n type: string;\\n /** Name of Action */\\n name: string;\\n}\\n\\n/**\\n * Gang general info.\\n * @public\\n */\\nexport interface GangGenInfo {\\n /** Name of faction that the gang belongs to (\\\"Slum Snakes\\\", etc.) */\\n faction: string;\\n /** Boolean indicating whether or not its a hacking gang */\\n isHacking: boolean;\\n /** Money earned per game cycle */\\n moneyGainRate: number;\\n /** Gang's power for territory warfare */\\n power: number;\\n /** Gang's respect */\\n respect: number;\\n /** Respect earned per game cycle */\\n respectGainRate: number;\\n /** Amount of territory held. */\\n territory: number;\\n /** Clash chance. */\\n territoryClashChance: number;\\n /** Gang's wanted level */\\n wantedLevel: number;\\n /** Wanted level gained/lost per game cycle (negative for losses) */\\n wantedLevelGainRate: number;\\n /** Boolean indicating if territory warfare is enabled. */\\n territoryWarfareEngaged: boolean;\\n /** Number indicating the current wanted penalty. */\\n wantedPenalty: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface GangOtherInfoObject {\\n /** Gang power */\\n power: number;\\n /** Gang territory, in decimal form */\\n territory: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface GangOtherInfo {\\n \\\"Slum Snakes\\\": GangOtherInfoObject;\\n Tetrads: GangOtherInfoObject;\\n \\\"The Syndicate\\\": GangOtherInfoObject;\\n \\\"The Dark Army\\\": GangOtherInfoObject;\\n \\\"Speakers for the Dead\\\": GangOtherInfoObject;\\n NiteSec: GangOtherInfoObject;\\n \\\"The Black Hand\\\": GangOtherInfoObject;\\n}\\n\\n/**\\n * Object representing data representing a gang member task.\\n * @public\\n */\\nexport interface GangTaskStats {\\n /** Task name */\\n name: string;\\n /** Task Description */\\n desc: string;\\n /** Is a task of a hacking gang */\\n isHacking: boolean;\\n /** Is a task of a combat gang */\\n isCombat: boolean;\\n /** Base respect earned */\\n baseRespect: number;\\n /** Base wanted earned */\\n baseWanted: number;\\n /** Base money earned */\\n baseMoney: number;\\n /** Hacking skill impact on task scaling */\\n hackWeight: number;\\n /** Stength skill impact on task scaling */\\n strWeight: number;\\n /** Defense skill impact on task scaling */\\n defWeight: number;\\n /** Dexterity skill impact on task scaling */\\n dexWeight: number;\\n /** Agility skill impact on task scaling */\\n agiWeight: number;\\n /** Charisma skill impact on task scaling */\\n chaWeight: number;\\n /** Number representing the difficulty of the task */\\n difficulty: number;\\n /** Territory impact on task scaling */\\n territory: GangTerritory;\\n}\\n\\n/**\\n * Object representing data representing a gang member equipment.\\n * @public\\n */\\nexport interface EquipmentStats {\\n /** Strength multiplier */\\n str?: number;\\n /** Defense multiplier */\\n def?: number;\\n /** Dexterity multiplier */\\n dex?: number;\\n /** Agility multiplier */\\n agi?: number;\\n /** Charisma multiplier */\\n cha?: number;\\n /** Hacking multiplier */\\n hack?: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface GangTerritory {\\n /** Money gain impact on task scaling */\\n money: number;\\n /** Respect gain impact on task scaling */\\n respect: number;\\n /** Wanted gain impact on task scaling */\\n wanted: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface GangMemberInfo {\\n name: string;\\n task: string;\\n earnedRespect: number;\\n hack: number;\\n str: number;\\n def: number;\\n dex: number;\\n agi: number;\\n cha: number;\\n\\n hack_exp: number;\\n str_exp: number;\\n def_exp: number;\\n dex_exp: number;\\n agi_exp: number;\\n cha_exp: number;\\n\\n hack_mult: number;\\n str_mult: number;\\n def_mult: number;\\n dex_mult: number;\\n agi_mult: number;\\n cha_mult: number;\\n\\n hack_asc_mult: number;\\n str_asc_mult: number;\\n def_asc_mult: number;\\n dex_asc_mult: number;\\n agi_asc_mult: number;\\n cha_asc_mult: number;\\n\\n hack_asc_points: number;\\n str_asc_points: number;\\n def_asc_points: number;\\n dex_asc_points: number;\\n agi_asc_points: number;\\n cha_asc_points: number;\\n\\n upgrades: string[];\\n augmentations: string[];\\n\\n respectGain: number;\\n wantedLevelGain: number;\\n moneyGain: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface GangMemberAscension {\\n /** Amount of respect lost from ascending */\\n respect: number;\\n /** Hacking multiplier gained from ascending.*/\\n hack: number;\\n /** Strength multiplier gained from ascending.*/\\n str: number;\\n /** Defense multiplier gained from ascending.*/\\n def: number;\\n /** Dexterity multiplier gained from ascending.*/\\n dex: number;\\n /** Agility multiplier gained from ascending.*/\\n agi: number;\\n /** Charisma multiplier gained from ascending.*/\\n cha: number;\\n}\\n\\n/**\\n * Object representing a sleeve stats.\\n * @public\\n */\\nexport interface SleeveSkills {\\n /** current shock of the sleeve [0-100] */\\n shock: number;\\n /** current sync of the sleeve [0-100] */\\n sync: number;\\n /** current hacking skill of the sleeve */\\n hacking: number;\\n /** current strength of the sleeve */\\n strength: number;\\n /** current defense of the sleeve */\\n defense: number;\\n /** current dexterity of the sleeve */\\n dexterity: number;\\n /** current agility of the sleeve */\\n agility: number;\\n /** current charisma of the sleeve */\\n charisma: number;\\n}\\n\\n/**\\n * Object representing sleeve information.\\n * @public\\n */\\nexport interface SleeveInformation {\\n /** location of the sleeve */\\n city: string;\\n /** current hp of the sleeve */\\n hp: number;\\n /** max hp of the sleeve */\\n maxHp: number;\\n /** jobs available to the sleeve */\\n jobs: string[];\\n /** job titles available to the sleeve */\\n jobTitle: string[];\\n /** does this sleeve have access to the tor router */\\n tor: boolean;\\n /** sleeve multipliers */\\n mult: CharacterMult;\\n /** time spent on the current task in milliseconds */\\n timeWorked: number;\\n /** earnings synchronized to other sleeves */\\n earningsForSleeves: SleeveWorkGains;\\n /** earnings synchronized to the player */\\n earningsForPlayer: SleeveWorkGains;\\n /** earnings for this sleeve */\\n earningsForTask: SleeveWorkGains;\\n /** faction or company reputation gained for the current task */\\n workRepGain: number;\\n}\\n\\n/**\\n * Object representing a sleeve current task.\\n * @public\\n */\\nexport interface SleeveTask {\\n /** task type */\\n task: string;\\n /** crime currently attempting, if any */\\n crime: string;\\n /** location of the task, if any */\\n location: string;\\n /** stat being trained at the gym, if any */\\n gymStatType: string;\\n /** faction work type being performed, if any */\\n factionWorkType: string;\\n}\\n\\n/**\\n * Stock market API\\n * @public\\n */\\nexport interface TIX {\\n /**\\n * Returns an array of the symbols of the tradable stocks\\n *\\n * @remarks RAM cost: 2 GB\\n * @returns Array of the symbols of the tradable stocks.\\n */\\n getSymbols(): string[];\\n\\n /**\\n * Returns the price of a stock\\n *\\n * @remarks\\n * RAM cost: 2 GB\\n * The stock’s price is the average of its bid and ask price.\\n *\\n * @example\\n * ```ts\\n * getPrice(\\\"FISG\\\");\\n * ```\\n * @param sym - Stock symbol.\\n * @returns The price of a stock.\\n */\\n getPrice(sym: string): number;\\n\\n /**\\n * Returns the ask price of that stock.\\n * @remarks RAM cost: 2 GB\\n *\\n * @param sym - Stock symbol.\\n * @returns The ask price of a stock.\\n */\\n getAskPrice(sym: string): number;\\n\\n /**\\n * Returns the bid price of that stock.\\n * @remarks RAM cost: 2 GB\\n *\\n * @param sym - Stock symbol.\\n * @returns The bid price of a stock.\\n */\\n getBidPrice(sym: string): number;\\n\\n /**\\n * Returns the player’s position in a stock.\\n * @remarks\\n * RAM cost: 2 GB\\n * Returns an array of four elements that represents the player’s position in a stock.\\n *\\n * The first element is the returned array is the number of shares the player owns of\\n * the stock in the Long position. The second element in the array is the average price\\n * of the player’s shares in the Long position.\\n *\\n * The third element in the array is the number of shares the player owns of the stock\\n * in the Short position. The fourth element in the array is the average price of the\\n * player’s Short position.\\n *\\n * All elements in the returned array are numeric.\\n *\\n * @example\\n * ```ts\\n * pos = getPosition(\\\"ECP\\\");\\n * shares = pos[0];\\n * avgPx = pos[1];\\n * sharesShort = pos[2];\\n * avgPxShort = pos[3];\\n * ```\\n * @param sym - Stock symbol.\\n * @returns Array of four elements that represents the player’s position in a stock.\\n */\\n getPosition(sym: string): [number, number, number, number];\\n\\n /**\\n * Returns the maximum number of shares of a stock.\\n * @remarks\\n * RAM cost: 2 GB\\n * This is the maximum amount of the stock that can be purchased\\n * in both the Long and Short positions combined.\\n *\\n * @param sym - Stock symbol.\\n * @returns Maximum number of shares that the stock has.\\n */\\n getMaxShares(sym: string): number;\\n\\n /**\\n * Calculates cost of buying stocks.\\n * @remarks\\n * RAM cost: 2 GB\\n * Calculates and returns how much it would cost to buy a given number of shares of a stock.\\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares to purchase.\\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\\n * @returns Cost to buy a given number of shares of a stock.\\n */\\n getPurchaseCost(sym: string, shares: number, posType: string): number;\\n\\n /**\\n * Calculate profit of setting stocks.\\n * @remarks\\n * RAM cost: 2 GB\\n * Calculates and returns how much you would gain from selling a given number of shares of a stock.\\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares to sell.\\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\\n * @returns Gain from selling a given number of shares of a stock.\\n */\\n getSaleGain(sym: string, shares: number, posType: string): number;\\n\\n /**\\n * Buy stocks.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Attempts to purchase shares of a stock using a Market Order.\\n *\\n * If the player does not have enough money to purchase the specified number of shares,\\n * then no shares will be purchased. Remember that every transaction on the stock exchange\\n * costs a certain commission fee.\\n *\\n * If this function successfully purchases the shares, it will return the stock price at which\\n * each share was purchased. Otherwise, it will return 0.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares to purchased. Must be positive. Will be rounded to nearest integer.\\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren't purchased.\\n */\\n buy(sym: string, shares: number): number;\\n\\n /**\\n * Sell stocks.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Attempts to sell shares of a stock using a Market Order.\\n *\\n * If the specified number of shares in the function exceeds the amount that the player\\n * actually owns, then this function will sell all owned shares. Remember that every\\n * transaction on the stock exchange costs a certain commission fee.\\n *\\n * The net profit made from selling stocks with this function is reflected in the script’s\\n * statistics. This net profit is calculated as:\\n *\\n * shares * (sell_price - average_price_of_purchased_shares)\\n *\\n * If the sale is successful, this function will return the stock price at\\n * which each share was sold. Otherwise, it will return 0.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren't sold.\\n */\\n sell(sym: string, shares: number): number;\\n\\n /**\\n * Short stocks.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Attempts to purchase a short position of a stock using a Market Order.\\n *\\n * The ability to short a stock is **not** immediately available to the player and\\n * must be unlocked later on in the game.\\n *\\n * If the player does not have enough money to purchase the specified number of shares,\\n * then no shares will be purchased. Remember that every transaction on the stock exchange\\n * costs a certain commission fee.\\n *\\n * If the purchase is successful, this function will return the stock price at which each\\n * share was purchased. Otherwise, it will return 0.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares to short. Must be positive. Will be rounded to nearest integer.\\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren't purchased.\\n */\\n short(sym: string, shares: number): number;\\n\\n /**\\n * Sell short stock.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Attempts to sell a short position of a stock using a Market Order.\\n *\\n * The ability to short a stock is **not** immediately available to the player and\\n * must be unlocked later on in the game.\\n *\\n * If the specified number of shares exceeds the amount that the player actually owns,\\n * then this function will sell all owned shares. Remember that every transaction on\\n * the stock exchange costs a certain commission fee.\\n *\\n * If the sale is successful, this function will return the stock price at which each\\n * share was sold. Otherwise it will return 0.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren't sold.\\n */\\n sellShort(sym: string, shares: number): number;\\n\\n /**\\n * Place order for stocks.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Places an order on the stock market. This function only works for Limit and Stop Orders.\\n *\\n * The ability to place limit and stop orders is **not** immediately available to the player and\\n * must be unlocked later on in the game.\\n *\\n * Returns true if the order is successfully placed, and false otherwise.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\\n * @param price - Execution price for the order.\\n * @param type - Type of order.\\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\\n * @returns True if the order is successfully placed, and false otherwise.\\n */\\n placeOrder(sym: string, shares: number, price: number, type: string, pos: string): boolean;\\n\\n /**\\n * Cancel order for stocks.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Cancels an oustanding Limit or Stop order on the stock market.\\n *\\n * The ability to use limit and stop orders is **not** immediately available to the player and\\n * must be unlocked later on in the game.\\n *\\n * @param sym - Stock symbol.\\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\\n * @param price - Execution price for the order.\\n * @param type - Type of order.\\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\\n */\\n cancelOrder(sym: string, shares: number, price: number, type: string, pos: string): void;\\n\\n /**\\n * Returns your order book for the stock market.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * This is an object containing information for all the Limit and Stop Orders you have in the stock market.\\n * The object has the following structure:\\n *\\n * ```ts\\n * {\\n * string1: [ // Array of orders for this stock\\n * {\\n * shares: Order quantity\\n * price: Order price\\n * type: Order type\\n * position: Either \\\"L\\\" or \\\"S\\\" for Long or Short position\\n * },\\n * {\\n * ...\\n * },\\n * ...\\n * ],\\n * string2: [ // Array of orders for this stock\\n * ...\\n * ],\\n * ...\\n * }\\n * ```\\n * The “Order type” property can have one of the following four values: \\\"Limit Buy Order\\\", \\\"Limit Sell Order\\\", \\\"Stop Buy Order\\\", \\\"Stop Sell Order\\\".\\n * Note that the order book will only contain information for stocks that you actually have orders in.\\n *\\n * @example\\n * ```ts\\n * \\\"If you do not have orders in Nova Medical (NVMD), then the returned object will not have a “NVMD” property.\\\"\\n * {\\n * ECP: [\\n * {\\n * shares: 5,\\n * price: 100,000\\n * type: \\\"Stop Buy Order\\\",\\n * position: \\\"S\\\",\\n * },\\n * {\\n * shares: 25,\\n * price: 125,000\\n * type: \\\"Limit Sell Order\\\",\\n * position: \\\"L\\\",\\n * },\\n * ],\\n * SYSC: [\\n * {\\n * shares: 100,\\n * price: 10,000\\n * type: \\\"Limit Buy Order\\\",\\n * position: \\\"L\\\",\\n * },\\n * ],\\n * }\\n * ```\\n * @returns Object containing information for all the Limit and Stop Orders you have in the stock market.\\n */\\n getOrders(): StockOrder;\\n\\n /**\\n * Returns the volatility of the specified stock.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * Volatility represents the maximum percentage by which a stock’s price can change every tick.\\n * The volatility is returned as a decimal value, NOT a percentage\\n * (e.g. if a stock has a volatility of 3%, then this function will return 0.03, NOT 3).\\n *\\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\\n *\\n * @param sym - Stock symbol.\\n * @returns Volatility of the specified stock.\\n */\\n getVolatility(sym: string): number;\\n\\n /**\\n * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\\n * @remarks\\n * RAM cost: 2.5 GB\\n * The probability is returned as a decimal value, NOT a percentage\\n * (e.g. if a stock has a 60% chance of increasing, then this function will return 0.6, NOT 60).\\n *\\n * In other words, if this function returned 0.30 for a stock, then this means that the stock’s price has a\\n * 30% chance of increasing and a 70% chance of decreasing during the next tick.\\n *\\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\\n *\\n * @param sym - Stock symbol.\\n * @returns Probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\\n */\\n getForecast(sym: string): number;\\n\\n /**\\n * Purchase 4S Market Data Access.\\n * @remarks RAM cost: 2.5 GB\\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\\n */\\n purchase4SMarketData(): boolean;\\n\\n /**\\n * Purchase 4S Market Data TIX API Access.\\n * @remarks RAM cost: 2.5 GB\\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\\n */\\n purchase4SMarketDataTixApi(): boolean;\\n}\\n\\n/**\\n * Singularity API\\n * @remarks\\n * This API requires Source-File 4 level 1 / 2 / 3 to use.\\n * @public\\n */\\nexport interface Singularity {\\n /**\\n * SF4.1 - Take university class.\\n *\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * This function will automatically set you to start taking a course at a university.\\n * If you are already in the middle of some “working” action (such as working at a\\n * company, for a faction, or on a program), then running this function will automatically\\n * cancel that action and give you your earnings.\\n *\\n * The cost and experience gains for all of these universities and classes are the same as\\n * if you were to manually visit and take these classes.\\n *\\n * @param universityName - Name of university. You must be in the correct city for whatever university you specify.\\n * @param courseName - Name of course.\\n * @returns True if actions is successfully started, false otherwise.\\n */\\n universityCourse(universityName: string, courseName: string): boolean;\\n\\n /**\\n * SF4.1 - Workout at the gym.\\n * \\n * @remarks\\n * RAM cost: 2 GB\\n * \\n\\n * This function will automatically set you to start working out at a gym to train\\n * a particular stat. If you are already in the middle of some “working” action\\n * (such as working at a company, for a faction, or on a program), then running\\n * this function will automatically cancel that action and give you your earnings.\\n *\\n * The cost and experience gains for all of these gyms are the same as if you were\\n * to manually visit these gyms and train\\n *\\n * @param gymName - Name of gym. You must be in the correct city for whatever gym you specify.\\n * @param stat - The stat you want to train.\\n * @returns True if actions is successfully started, false otherwise.\\n */\\n gymWorkout(gymName: string, stat: string): boolean;\\n\\n /**\\n * SF4.1 - Travel to another city.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * This function allows the player to travel to any city. The cost for using this\\n * function is the same as the cost for traveling through the Travel Agency.\\n *\\n * @param city - City to travel to.\\n * @returns True if actions is successful, false otherwise.\\n */\\n travelToCity(city: string): boolean;\\n\\n /**\\n * SF4.1 - Purchase the TOR router.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * This function allows you to automatically purchase a TOR router. The cost for\\n * purchasing a TOR router using this function is the same as if you were to\\n * manually purchase one.\\n *\\n * @returns True if actions is successful, false otherwise.\\n */\\n purchaseTor(): boolean;\\n\\n /**\\n * SF4.1 - Purchase a program from the dark web.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * This function allows you to automatically purchase programs. You MUST have a\\n * TOR router in order to use this function. The cost of purchasing programs\\n * using this function is the same as if you were purchasing them through the Dark\\n * Web using the Terminal buy command.\\n *\\n * @example\\n * ```ts\\n * purchaseProgram(\\\"brutessh.exe\\\");\\n * ```\\n * @param programName - Name of program to purchase.\\n * @returns True if the specified program is purchased, and false otherwise.\\n */\\n purchaseProgram(programName: string): boolean;\\n\\n /**\\n * SF4.1 - Check if the player is busy.\\n * @remarks\\n * RAM cost: 0.5 GB\\n *\\n *\\n * Returns a boolean indicating whether or not the player is currently performing an\\n * ‘action’. These actions include working for a company/faction, studying at a univeristy,\\n * working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.\\n *\\n * @returns True if the player is currently performing an ‘action’, false otherwise.\\n */\\n isBusy(): boolean;\\n\\n /**\\n * SF4.1 - Stop the current action.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n *\\n * This function is used to end whatever ‘action’ the player is currently performing.\\n * The player will receive whatever money/experience/etc. he has earned from that action.\\n *\\n * The actions that can be stopped with this function are:\\n *\\n * * Studying at a university\\n * * Working for a company/faction\\n * * Creating a program\\n * * Committing a Crime\\n *\\n * This function will return true if the player’s action was ended.\\n * It will return false if the player was not performing an action when this function was called.\\n *\\n * @returns True if the player’s action was ended, false if the player was not performing an action.\\n */\\n stopAction(): boolean;\\n\\n /**\\n * SF4.2 - Upgrade home computer RAM.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * This function will upgrade amount of RAM on the player’s home computer. The cost is\\n * the same as if you were to do it manually.\\n *\\n * This function will return true if the player’s home computer RAM is successfully upgraded, and false otherwise.\\n *\\n * @returns True if the player’s home computer RAM is successfully upgraded, and false otherwise.\\n */\\n upgradeHomeRam(): boolean;\\n\\n /**\\n * SF4.2 - Upgrade home computer cores.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * This function will upgrade amount of cores on the player’s home computer. The cost is\\n * the same as if you were to do it manually.\\n *\\n * This function will return true if the player’s home computer cores is successfully upgraded, and false otherwise.\\n *\\n * @returns True if the player’s home computer cores is successfully upgraded, and false otherwise.\\n */\\n upgradeHomeCores(): boolean;\\n\\n /**\\n * SF4.2 - Get the price of upgrading home RAM.\\n * @remarks\\n * RAM cost: 1.5 GB\\n *\\n *\\n * Returns the cost of upgrading the player’s home computer RAM.\\n *\\n * @returns Cost of upgrading the player’s home computer RAM.\\n */\\n getUpgradeHomeRamCost(): number;\\n\\n /**\\n * SF4.2 - Get the price of upgrading home cores.\\n * @remarks\\n * RAM cost: 1.5 GB\\n *\\n *\\n * Returns the cost of upgrading the player’s home computer cores.\\n *\\n * @returns Cost of upgrading the player’s home computer cores.\\n */\\n getUpgradeHomeCoresCost(): number;\\n\\n /**\\n * SF4.2 - Work for a company.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * This function will automatically set you to start working at the company\\n * at which you are employed. If you are already in the middle of some “working”\\n * action (such as working for a faction, training at a gym, or creating a program),\\n * then running this function will automatically cancel that action and give you\\n * your earnings.\\n *\\n * This function will return true if the player starts working, and false otherwise.\\n *\\n * Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action.\\n *\\n * @example\\n * ```ts\\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\\n * while (getCompanyRep(COMPANY HERE) < VALUE) {\\n * workForCompany();\\n * sleep(60000);\\n * }\\n * //This way, your company reputation will be updated every minute.\\n * ```\\n * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked\\n * @returns True if the player starts working, and false otherwise.\\n */\\n workForCompany(companyName?: string): boolean;\\n\\n /**\\n * SF4.2 - Apply for a job at a company.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * This function will automatically try to apply to the specified company\\n * for a position in the specified field. This function can also be used to\\n * apply for promotions by specifying the company and field you are already\\n * employed at.\\n *\\n * This function will return true if you successfully get a job/promotion,\\n * and false otherwise. Note that if you are trying to use this function to\\n * apply for a promotion and you don’t get one, it will return false.\\n *\\n * @param companyName - Name of company to apply to.\\n * @param field - Field to which you want to apply.\\n * @returns True if the player successfully get a job/promotion, and false otherwise.\\n */\\n applyToCompany(companyName: string, field: string): boolean;\\n\\n /**\\n * SF4.2 - Get company reputation.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n *\\n * This function will return the amount of reputation you have at the specified company.\\n * If the company passed in as an argument is invalid, -1 will be returned.\\n *\\n * @param companyName - Name of the company.\\n * @returns Amount of reputation you have at the specified company.\\n */\\n getCompanyRep(companyName: string): number;\\n\\n /**\\n * SF4.2 - Get company favor.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n *\\n * This function will return the amount of favor you have at the specified company.\\n * If the company passed in as an argument is invalid, -1 will be returned.\\n *\\n * @param companyName - Name of the company.\\n * @returns Amount of favor you have at the specified company.\\n */\\n getCompanyFavor(companyName: string): number;\\n\\n /**\\n * SF4.2 - Get company favor gain.\\n * @remarks\\n * RAM cost: 0.75 GB\\n *\\n *\\n * This function will return the amount of favor you will gain for the specified\\n * company when you reset by installing Augmentations.\\n *\\n * @param companyName - Name of the company.\\n * @returns Amount of favor you gain at the specified company when you reset by installing Augmentations.\\n */\\n getCompanyFavorGain(companyName: string): number;\\n\\n /**\\n * SF4.2 - List all current faction invitations.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * Returns an array with the name of all Factions you currently have oustanding invitations from.\\n *\\n * @returns Array with the name of all Factions you currently have oustanding invitations from.\\n */\\n checkFactionInvitations(): string[];\\n\\n /**\\n * SF4.2 - Join a faction.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * This function will automatically accept an invitation from a faction and join it.\\n *\\n * @param faction - Name of faction to join.\\n * @returns True if player joined the faction, and false otherwise.\\n */\\n joinFaction(faction: string): boolean;\\n\\n /**\\n * SF4.2 - Work for a faction.\\n * @remarks\\n * RAM cost: 3 GB\\n *\\n *\\n * This function will automatically set you to start working for the specified faction.\\n * Obviously, you must be a member of the faction or else this function will fail. If\\n * you are already in the middle of some “working” action (such as working for a company,\\n * training at a gym, or creating a program), then running this function will automatically\\n * cancel that action and give you your earnings.\\n *\\n * This function will return true if you successfully start working for the specified faction, and false otherwise.\\n *\\n * Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action.\\n *\\n * @example\\n * ```ts\\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\\n * while (getFactionRep(FACTION NAME) < VALUE) {\\n * workForFaction(FACNAME, WORKTYPE);\\n * sleep(60000);\\n * }\\n * //This way, your faction reputation will be updated every minute.\\n * ```\\n * @param faction - Name of faction to work for.\\n * @param workType - Type of work to perform for the faction.\\n * @returns True if the player starts working, and false otherwise.\\n */\\n workForFaction(faction: string, workType: string): boolean;\\n\\n /**\\n * SF4.2 - Get faction reputation.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n *\\n * This function returns the amount of reputation you have for the specified faction.\\n *\\n * @param faction - Name of faction to work for.\\n * @returns Amount of reputation you have for the specified faction.\\n */\\n getFactionRep(faction: string): number;\\n\\n /**\\n * SF4.2 - Get faction favor.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n *\\n * This function returns the amount of favor you have for the specified faction.\\n *\\n * @param faction - Name of faction.\\n * @returns Amount of favor you have for the specified faction.\\n */\\n getFactionFavor(faction: string): number;\\n\\n /**\\n * SF4.2 - Get faction favor gain.\\n * @remarks\\n * RAM cost: 0.75 GB\\n *\\n *\\n * This function returns the amount of favor you will gain for the specified\\n * faction when you reset by installing Augmentations.\\n *\\n * @param faction - Name of faction.\\n * @returns Amount of favor you will gain for the specified faction when you reset by installing Augmentations.\\n */\\n getFactionFavorGain(faction: string): number;\\n\\n /**\\n * SF4.3 - Donate to a faction.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * Attempts to donate money to the specified faction in exchange for reputation.\\n * Returns true if you successfully donate the money, and false otherwise.\\n *\\n * @param faction - Name of faction to donate to.\\n * @param amount - Amount of money to donate.\\n * @returns True if the money was donated, and false otherwise.\\n */\\n donateToFaction(faction: string, amount: number): boolean;\\n\\n /**\\n * SF4.3 - Create a program.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function will automatically set you to start working on creating the\\n * specified program. If you are already in the middle of some “working” action\\n * (such as working for a company, training at a gym, or taking a course), then\\n * running this function will automatically cancel that action and give you your\\n * earnings.\\n *\\n * This function returns true if you successfully start working on the specified program, and false otherwise.\\n *\\n * Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are:\\n * * BruteSSH.exe: 50\\n * * FTPCrack.exe: 100\\n * * relaySMTP.exe: 250\\n * * HTTPWorm.exe: 500\\n * * SQLInject.exe: 750\\n * * DeepscanV1.exe: 75\\n * * DeepscanV2.exe: 400\\n * * ServerProfiler.exe: 75\\n * * AutoLink.exe: 25\\n *\\n * @example\\n * ```ts\\n * createProgram(“relaysmtp.exe”);\\n * ```\\n * @param program - Name of program to create.\\n * @returns True if you successfully start working on the specified program, and false otherwise.\\n */\\n createProgram(program: string): boolean;\\n\\n /**\\n * SF4.3 - Commit a crime.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function is used to automatically attempt to commit crimes.\\n * If you are already in the middle of some ‘working’ action (such\\n * as working for a company or training at a gym), then running this\\n * function will automatically cancel that action and give you your\\n * earnings.\\n *\\n * This function returns the number of seconds it takes to attempt the specified\\n * crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime, so running\\n * `commitCrime('rob store')` will return 60).\\n *\\n * Warning: I do not recommend using the time returned from this function to try\\n * and schedule your crime attempts. Instead, I would use the isBusy Singularity\\n * function to check whether you have finished attempting a crime. This is because\\n * although the game sets a certain crime to be X amount of seconds, there is no\\n * guarantee that your browser will follow that time limit.\\n *\\n * @param crime - Name of crime to attempt.\\n * @returns True if you successfully start working on the specified program, and false otherwise.\\n */\\n commitCrime(crime: string): number;\\n\\n /**\\n * SF4.3 - Get chance to successfully commit a crime.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function returns your chance of success at commiting the specified crime.\\n *\\n * @param crime - Name of crime.\\n * @returns Chance of success at commiting the specified crime.\\n */\\n getCrimeChance(crime: string): number;\\n\\n /**\\n * SF4.3 - Get stats related to a crime.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * Returns the stats of the crime.\\n *\\n * @param crime - Name of crime. Not case-sensitive\\n * @returns The stats of the crime.\\n */\\n getCrimeStats(crime: string): CrimeStats;\\n\\n /**\\n * SF4.3 - Get a list of owned augmentation.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function returns an array containing the names (as strings) of all Augmentations you have.\\n *\\n * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. By default, this argument is false which means that the return value will NOT have the purchased Augmentations.\\n * @returns Array containing the names (as strings) of all Augmentations you have.\\n */\\n getOwnedAugmentations(purchased?: boolean): string[];\\n\\n /**\\n * SF4.3 - Get a list of augmentation available from a faction.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * Returns an array containing the names (as strings) of all Augmentations\\n * that are available from the specified faction.\\n *\\n * @param faction - Name of faction.\\n * @returns Array containing the names of all Augmentations.\\n */\\n getAugmentationsFromFaction(faction: string): string[];\\n\\n /**\\n * SF4.3 - Get the pre-requisite of an augmentation.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\\n * If there are no prerequisites, a blank array is returned.\\n *\\n * @param augName - Name of Augmentation.\\n * @returns Array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\\n */\\n getAugmentationPrereq(augName: string): string[];\\n\\n /**\\n * SF4.3 - Get the price and reputation of an augmentation.\\n * @deprecated use getAugmentationPrice getAugmentationRepCost\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function returns an array with two elements that gives the cost for\\n * the specified Augmentation. The first element in the returned array is the\\n * reputation requirement of the Augmentation, and the second element is the\\n * money cost.\\n *\\n * If an invalid Augmentation name is passed in for the augName argument, this\\n * function will return the array [-1, -1].\\n *\\n * @param augName - Name of Augmentation.\\n * @returns Array with first element as a reputation requirement and second element as the money cost.\\n */\\n getAugmentationCost(augName: string): [number, number];\\n\\n /**\\n * SF4.3 - Get price of an augmentation.\\n * @remarks\\n * RAM cost: 2.5 GB\\n *\\n *\\n * @param augName - Name of Augmentation.\\n * @returns Price of the augmentation.\\n */\\n getAugmentationPrice(augName: string): number;\\n\\n /**\\n * SF4.3 - Get reputation requirement of an augmentation.\\n * @remarks\\n * RAM cost: 2.5 GB\\n *\\n *\\n * @param augName - Name of Augmentation.\\n * @returns Reputation requirement of the augmentation.\\n */\\n getAugmentationRepReq(augName: string): number;\\n\\n /**\\n * SF4.3 - Purchase an augmentation\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function will try to purchase the specified Augmentation through the given Faction.\\n *\\n * This function will return true if the Augmentation is successfully purchased, and false otherwise.\\n *\\n * @param faction - Name of faction to purchase Augmentation from.\\n * @param augmentation - Name of Augmentation to purchase.\\n * @returns True if the Augmentation is successfully purchased, and false otherwise.\\n */\\n purchaseAugmentation(faction: string, augmentation: string): boolean;\\n\\n /**\\n * SF4.3 - Get the stats of an augmentation.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function returns augmentation stats.\\n *\\n * @param name - Name of Augmentation. CASE-SENSITIVE.\\n * @returns Augmentation stats.\\n */\\n getAugmentationStats(name: string): AugmentationStats;\\n\\n /**\\n * SF4.3 - Install your purchased augmentations.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function will automatically install your Augmentations, resetting the game as usual.\\n *\\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\\n */\\n installAugmentations(cbScript?: string): void;\\n\\n /**\\n * SF4.1 - Returns an object with the Player’s stats.\\n * @deprecated use getPlayer\\n *\\n * @remarks\\n * RAM cost: 0.5 GB\\n *\\n *\\n * @example\\n * ```ts\\n * res = getStats();\\n * print('My charisma level is: ' + res.charisma);\\n * ```\\n * @returns Object with the Player’s stats.\\n */\\n getStats(): PlayerSkills;\\n\\n /**\\n * SF4.1 - Returns an object with various information about your character.\\n * @deprecated use getPlayer\\n *\\n * @remarks\\n * RAM cost: 0.5 GB\\n *\\n *\\n * @returns Object with various information about your character.\\n */\\n getCharacterInformation(): CharacterInfo;\\n\\n /**\\n * SF4.1 - Hospitalize the player.\\n * @remarks\\n * RAM cost: 0.25 GB\\n *\\n *\\n * @returns The cost of the hospitalization.\\n */\\n hospitalize(): number;\\n\\n /**\\n * SF4.3 - Soft reset the game.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * This function will perform a reset even if you don’t have any augmentation installed.\\n *\\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\\n */\\n softReset(cbScript: string): void;\\n\\n /**\\n * SF4.3 - Go to a location.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n *\\n * Move the player to a specific location.\\n *\\n * @param locationName - Name of the location.\\n * @returns True if the player was moved there, false otherwise.\\n */\\n goToLocation(locationName: string): boolean;\\n\\n /**\\n * SF4.1 - Get the current server.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * @returns Name of the current server.\\n */\\n getCurrentServer(): string;\\n\\n /**\\n * SF4.1 - Connect to a server.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * Run the connect HOSTNAME command in the terminal. Can only connect to neighbors.\\n *\\n * @returns True if the connect command was successful, false otherwise.\\n */\\n connect(hostname: string): boolean;\\n\\n /**\\n * SF4.1 - Run the hack command in the terminal.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * @returns Amount of money stolen by manual hacking.\\n */\\n manualHack(): Promise;\\n\\n /**\\n * SF4.1 - Run the backdoor command in the terminal.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n *\\n * @returns True if the installation was successful.\\n */\\n installBackdoor(): Promise;\\n}\\n\\n/**\\n * Hacknet API\\n * @remarks\\n * Not all these functions are immediately available.\\n * @public\\n */\\nexport interface Hacknet {\\n /**\\n * Get the number of hacknet nodes you own.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the number of Hacknet Nodes you own.\\n *\\n * @returns number of hacknet nodes.\\n */\\n numNodes(): number;\\n\\n /**\\n * Get the maximum number of hacknet nodes.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @returns maximum number of hacknet nodes.\\n */\\n maxNumNodes(): number;\\n\\n /**\\n * Purchase a new hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Purchases a new Hacknet Node. Returns a number with the index of the\\n * Hacknet Node. This index is equivalent to the number at the end of\\n * the Hacknet Node’s name (e.g The Hacknet Node named `hacknet-node-4`\\n * will have an index of 4).\\n *\\n * If the player cannot afford to purchase a new Hacknet Node then the function will return -1.\\n *\\n * @returns The index of the Hacknet Node or if the player cannot afford to purchase a new Hacknet Node the function will return -1.\\n */\\n purchaseNode(): number;\\n\\n /**\\n * Get the price of the next hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the cost of purchasing a new Hacknet Node.\\n *\\n * @returns Cost of purchasing a new Hacknet Node.\\n */\\n getPurchaseNodeCost(): number;\\n\\n /**\\n * Get the stats of a hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns an object containing a variety of stats about the specified Hacknet Node.\\n *\\n * Note that for Hacknet Nodes, production refers to the amount of money the node generates.\\n * For Hacknet Servers (the upgraded version of Hacknet Nodes), production refers to the\\n * amount of hashes the node generates.\\n *\\n * @param index - Index/Identifier of Hacknet Node\\n * @returns Object containing a variety of stats about the specified Hacknet Node.\\n */\\n getNodeStats(index: number): NodeStats;\\n\\n /**\\n * Upgrade the level of a hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Tries to upgrade the level of the specified Hacknet Node by n.\\n *\\n * Returns true if the Hacknet Node’s level is successfully upgraded by n\\n * or if it is upgraded by some positive amount and the Node reaches its max level.\\n *\\n * Returns false otherwise.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of levels to purchase. Must be positive. Rounded to nearest integer.\\n * @returns True if the Hacknet Node’s level is successfully upgraded, false otherwise.\\n */\\n upgradeLevel(index: number, n: number): boolean;\\n\\n /**\\n * Upgrade the RAM of a hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Tries to upgrade the specified Hacknet Node’s RAM n times.\\n * Note that each upgrade doubles the Node’s RAM.\\n * So this is equivalent to multiplying the Node’s RAM by 2 n.\\n *\\n * Returns true if the Hacknet Node’s RAM is successfully upgraded n times\\n * or if it is upgraded some positive number of times and the Node reaches it max RAM.\\n *\\n * Returns false otherwise.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\\n * @returns True if the Hacknet Node’s ram is successfully upgraded, false otherwise.\\n */\\n upgradeRam(index: number, n: number): boolean;\\n\\n /**\\n * Upgrade the core of a hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Tries to purchase n cores for the specified Hacknet Node.\\n *\\n * Returns true if it successfully purchases n cores for the Hacknet Node\\n * or if it purchases some positive amount and the Node reaches its max number of cores.\\n *\\n * Returns false otherwise.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of cores to purchase. Must be positive. Rounded to nearest integer.\\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\\n */\\n upgradeCore(index: number, n: number): boolean;\\n\\n /**\\n * Upgrade the cache of a hacknet node.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * Tries to upgrade the specified Hacknet Server’s cache n times.\\n *\\n * Returns true if it successfully upgrades the Server’s cache n times,\\n * or if it purchases some positive amount and the Server reaches its max cache level.\\n *\\n * Returns false otherwise.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of cache levels to purchase. Must be positive. Rounded to nearest integer.\\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\\n */\\n upgradeCache(index: number, n: number): boolean;\\n\\n /**\\n * Calculate the cost of upgrading hacknet node levels.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the cost of upgrading the specified Hacknet Node by n levels.\\n *\\n * If an invalid value for n is provided, then this function returns 0.\\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of levels to upgrade. Must be positive. Rounded to nearest integer.\\n * @returns Cost of upgrading the specified Hacknet Node.\\n */\\n getLevelUpgradeCost(index: number, n: number): number;\\n\\n /**\\n * Calculate the cost of upgrading hacknet node RAM.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the cost of upgrading the RAM of the specified Hacknet Node n times.\\n *\\n * If an invalid value for n is provided, then this function returns 0.\\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\\n * @returns Cost of upgrading the specified Hacknet Node's ram.\\n */\\n getRamUpgradeCost(index: number, n: number): number;\\n\\n /**\\n * Calculate the cost of upgrading hacknet node cores.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.\\n *\\n * If an invalid value for n is provided, then this function returns 0.\\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of times to upgrade cores. Must be positive. Rounded to nearest integer.\\n * @returns Cost of upgrading the specified Hacknet Node's number of cores.\\n */\\n getCoreUpgradeCost(index: number, n: number): number;\\n\\n /**\\n * Calculate the cost of upgrading hacknet node cache.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * Returns the cost of upgrading the cache level of the specified Hacknet Server by n.\\n *\\n * If an invalid value for n is provided, then this function returns 0.\\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\\n *\\n * @param index - Index/Identifier of Hacknet Node.\\n * @param n - Number of times to upgrade cache. Must be positive. Rounded to nearest integer.\\n * @returns Cost of upgrading the specified Hacknet Node's cache.\\n */\\n getCacheUpgradeCost(index: number, n: number): number;\\n\\n /**\\n * Get the total number of hashes stored.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * Returns the number of hashes you have.\\n *\\n * @returns Number of hashes you have.\\n */\\n numHashes(): number;\\n\\n /**\\n * Get the maximum number of hashes you can store.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * Returns the number of hashes you can store.\\n *\\n * @returns Number of hashes you can store.\\n */\\n hashCapacity(): number;\\n\\n /**\\n * Get the cost of a hash upgrade.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * Returns the number of hashes required for the specified upgrade. The name of the upgrade must be an exact match.\\n *\\n * @example\\n * ```ts\\n * var upgradeName = \\\"Sell for Corporation Funds\\\";\\n * if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {\\n * hacknet.spendHashes(upgName);\\n * }\\n * ```\\n * @param upgName - Name of the upgrade of Hacknet Node.\\n * @returns Number of hashes required for the specified upgrade.\\n */\\n hashCost(upgName: string): number;\\n\\n /**\\n * Purchase a hash upgrade.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * Spend the hashes generated by your Hacknet Servers on an upgrade.\\n * Returns a boolean value - true if the upgrade is successfully purchased, and false otherwise.\\n *\\n * The name of the upgrade must be an exact match.\\n * The `upgTarget` argument is used for upgrades such as `Reduce Minimum Security`, which applies to a specific server.\\n * In this case, the `upgTarget` argument must be the hostname of the server.\\n *\\n * @example\\n * ```ts\\n * hacknet.spendHashes(\\\"Sell for Corporation Funds\\\");\\n * hacknet.spendHashes(\\\"Increase Maximum Money\\\", \\\"foodnstuff\\\");\\n * ```\\n * @param upgName - Name of the upgrade of Hacknet Node.\\n * @param upgTarget - Object to which upgrade applies. Required for certain upgrades.\\n * @returns True if the upgrade is successfully purchased, and false otherwise..\\n */\\n spendHashes(upgName: string, upgTarget?: string): boolean;\\n\\n /**\\n * Get the level of a hash upgrade.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * @returns Level of the upgrade.\\n */\\n getHashUpgradeLevel(upgName: string): number;\\n\\n /**\\n * Get the multipler to study.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * @returns Multiplier.\\n */\\n getStudyMult(): number;\\n\\n /**\\n * Get the multipler to training.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\\n *\\n * @returns Multiplier.\\n */\\n getTrainingMult(): number;\\n}\\n\\n/**\\n * Bladeburner API\\n * @remarks\\n * You have to be employed in the Bladeburner division and be in BitNode-7\\n * or have Source-File 7 in order to use this API.\\n * @public\\n */\\nexport interface Bladeburner {\\n /**\\n * List all contracts.\\n * @remarks\\n * RAM cost: 0.4 GB\\n *\\n * Returns an array of strings containing the names of all Bladeburner contracts.\\n *\\n * @returns Array of strings containing the names of all Bladeburner contracts.\\n */\\n getContractNames(): string[];\\n\\n /**\\n * List all operations.\\n * @remarks\\n * RAM cost: 0.4 GB\\n *\\n * Returns an array of strings containing the names of all Bladeburner operations.\\n *\\n * @returns Array of strings containing the names of all Bladeburner operations.\\n */\\n getOperationNames(): string[];\\n\\n /**\\n * List all black ops.\\n * @remarks\\n * RAM cost: 0.4 GB\\n *\\n * Returns an array of strings containing the names of all Bladeburner Black Ops.\\n *\\n * @returns Array of strings containing the names of all Bladeburner Black Ops.\\n */\\n getBlackOpNames(): string[];\\n\\n /**\\n * List all general actions.\\n * @remarks\\n * RAM cost: 0.4 GB\\n *\\n * Returns an array of strings containing the names of all general Bladeburner actions.\\n *\\n * @returns Array of strings containing the names of all general Bladeburner actions.\\n */\\n getGeneralActionNames(): string[];\\n\\n /**\\n * List all skills.\\n * @remarks\\n * RAM cost: 0.4 GB\\n *\\n * Returns an array of strings containing the names of all general Bladeburner skills.\\n *\\n * @returns Array of strings containing the names of all general Bladeburner skills.\\n */\\n getSkillNames(): string[];\\n\\n /**\\n * Start an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Attempts to start the specified Bladeburner action.\\n * Returns true if the action was started successfully, and false otherwise.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match\\n * @returns True if the action was started successfully, and false otherwise.\\n */\\n startAction(type: string, name: string): boolean;\\n\\n /**\\n * Stop current action.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Stops the current Bladeburner action.\\n *\\n */\\n stopBladeburnerAction(): void;\\n\\n /**\\n * Get current action.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns an object that represents the player’s current Bladeburner action.\\n * If the player is not performing an action, the function will return an object with the ‘type’ property set to “Idle”.\\n *\\n * @returns Object that represents the player’s current Bladeburner action.\\n */\\n getCurrentAction(): BladeburnerCurAction;\\n\\n /**\\n * Get the time to complete an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the number of seconds it takes to complete the specified action\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns Number of milliseconds it takes to complete the specified action.\\n */\\n getActionTime(type: string, name: string): number;\\n\\n /**\\n * Get estimate success chance of an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the estimated success chance for the specified action.\\n * This chance is returned as a decimal value, NOT a percentage\\n * (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80).\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns Estimated success chance for the specified action.\\n */\\n getActionEstimatedSuccessChance(type: string, name: string): [number, number];\\n\\n /**\\n * Get the reputation gain of an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the average Bladeburner reputation gain for successfully\\n * completing the specified action.\\n * Note that this value is an ‘average’ and the real reputation gain may vary slightly from this value.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @param level - Optional action level at which to calculate the gain\\n * @returns Average Bladeburner reputation gain for successfully completing the specified action.\\n */\\n getActionRepGain(type: string, name: string, level: number): number;\\n\\n /**\\n * Get action count remaining.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the remaining count of the specified action.\\n *\\n * Note that this is meant to be used for Contracts and Operations.\\n * This function will return ‘Infinity’ for actions such as Training and Field Analysis.\\n * This function will return 1 for BlackOps not yet completed regardless of wether\\n * the player has the required rank to attempt the mission or not.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns Remaining count of the specified action.\\n */\\n getActionCountRemaining(type: string, name: string): number;\\n\\n /**\\n * Get the maximum level of an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the maximum level for this action.\\n *\\n * Returns -1 if an invalid action is specified.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns Maximum level of the specified action.\\n */\\n getActionMaxLevel(type: string, name: string): number;\\n\\n /**\\n * Get the current level of an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the current level of this action.\\n *\\n * Returns -1 if an invalid action is specified.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns Current level of the specified action.\\n */\\n getActionCurrentLevel(type: string, name: string): number;\\n\\n /**\\n * Get wether an action is set to autolevel.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not this action is currently set to autolevel.\\n *\\n * Returns false if an invalid action is specified.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns True if the action is set to autolevel, and false otherwise.\\n */\\n getActionAutolevel(type: string, name: string): boolean;\\n\\n /**\\n * Set an action autolevel.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Enable/disable autoleveling for the specified action.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @param autoLevel - Whether or not to autolevel this action\\n */\\n setActionAutolevel(type: string, name: string, autoLevel: boolean): void;\\n\\n /**\\n * Set the level of an action.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Set the level for the specified action.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @param level - Level to set this action to.\\n */\\n setActionLevel(type: string, name: string, level: number): void;\\n\\n /**\\n * Get player bladeburner rank.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the player’s Bladeburner Rank.\\n *\\n * @returns Player’s Bladeburner Rank.\\n */\\n getRank(): number;\\n\\n /**\\n * Get black op required rank.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Returns the rank required to complete this BlackOp.\\n *\\n * Returns -1 if an invalid action is specified.\\n *\\n * @param name - Name of BlackOp. Must be an exact match.\\n * @returns Rank required to complete this BlackOp.\\n */\\n getBlackOpRank(name: string): number;\\n\\n /**\\n * Get bladeburner skill points.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the number of Bladeburner skill points you have.\\n *\\n * @returns Number of Bladeburner skill points you have.\\n */\\n getSkillPoints(): number;\\n\\n /**\\n * Get skill level.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * This function returns your level in the specified skill.\\n *\\n * The function returns -1 if an invalid skill name is passed in.\\n *\\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\\n * @returns Level in the specified skill.\\n */\\n getSkillLevel(name: string): number;\\n\\n /**\\n * Get cost to upgrade skill.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * This function returns the number of skill points needed to upgrade the specified skill.\\n *\\n * The function returns -1 if an invalid skill name is passed in.\\n *\\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\\n * @returns Number of skill points needed to upgrade the specified skill.\\n */\\n getSkillUpgradeCost(name: string): number;\\n\\n /**\\n * Upgrade skill.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Attempts to upgrade the specified Bladeburner skill.\\n *\\n * Returns true if the skill is successfully upgraded, and false otherwise.\\n *\\n * @param skillName - Name of skill to be upgraded. Case-sensitive and must be an exact match\\n * @returns true if the skill is successfully upgraded, and false otherwise.\\n */\\n upgradeSkill(name: string): boolean;\\n\\n /**\\n * Get team size.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the number of Bladeburner team members you have assigned to the specified action.\\n *\\n * Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @returns Number of Bladeburner team members that were assigned to the specified action.\\n */\\n getTeamSize(type: string, name: string): number;\\n\\n /**\\n * Set team size.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Set the team size for the specified Bladeburner action.\\n *\\n * Returns the team size that was set, or -1 if the function failed.\\n *\\n * @param type - Type of action.\\n * @param name - Name of action. Must be an exact match.\\n * @param size - Number of team members to set. Will be converted using Math.round().\\n * @returns Number of Bladeburner team members you assigned to the specified action.\\n */\\n setTeamSize(type: string, name: string, size: number): number;\\n\\n /**\\n * Get estimated population in city.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the estimated number of Synthoids in the specified city,\\n * or -1 if an invalid city was specified.\\n *\\n * @param cityName - Name of city. Case-sensitive\\n * @returns Estimated number of Synthoids in the specified city.\\n */\\n getCityEstimatedPopulation(name: string): number;\\n\\n /**\\n * Get number of communities in a city.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the estimated number of Synthoid communities in the specified city,\\n * or -1 if an invalid city was specified.\\n *\\n * @param cityName - Name of city. Case-sensitive\\n * @returns Number of Synthoids communities in the specified city.\\n */\\n getCityCommunities(name: string): number;\\n\\n /**\\n * Get chaos of a city.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the chaos in the specified city,\\n * or -1 if an invalid city was specified.\\n *\\n * @param cityName - Name of city. Case-sensitive\\n * @returns Chaos in the specified city.\\n */\\n getCityChaos(name: string): number;\\n\\n /**\\n * Get current city.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the city that the player is currently in (for Bladeburner).\\n *\\n * @returns City that the player is currently in (for Bladeburner).\\n */\\n getCity(): string;\\n\\n /**\\n * Travel to another city in bladeburner.\\n * @remarks\\n * RAM cost: 4 GB\\n * Attempts to switch to the specified city (for Bladeburner only).\\n *\\n * Returns true if successful, and false otherwise\\n *\\n * @param cityName - Name of city. Case-sensitive\\n * @returns true if successful, and false otherwise\\n */\\n switchCity(name: string): boolean;\\n\\n /**\\n * Get bladeburner stamina.\\n * @remarks\\n * RAM cost: 4 GB\\n * Returns an array with two elements:\\n * * [Current stamina, Max stamina]\\n * @example\\n * ```ts\\n * function getStaminaPercentage() {\\n * let res = bladeburner.getStamina();\\n * return res[0] / res[1];\\n * }\\n * ```\\n * @returns Array containing current stamina and max stamina.\\n */\\n getStamina(): [number, number];\\n\\n /**\\n * Join the bladeburner faction.\\n * @remarks\\n * RAM cost: 4 GB\\n * Attempts to join the Bladeburner faction.\\n *\\n * Returns true if you successfully join the Bladeburner faction, or if you are already a member.\\n *\\n * Returns false otherwise.\\n *\\n * @returns True if you successfully join the Bladeburner faction, or if you are already a member, false otherwise.\\n */\\n joinBladeburnerFaction(): boolean;\\n\\n /**\\n * Join the bladeburner division.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Attempts to join the Bladeburner division.\\n *\\n * Returns true if you successfully join the Bladeburner division, or if you are already a member.\\n *\\n * Returns false otherwise.\\n *\\n * @returns True if you successfully join the Bladeburner division, or if you are already a member, false otherwise.\\n */\\n joinBladeburnerDivision(): boolean;\\n\\n /**\\n * Get bladeburner bonus time.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the amount of accumulated “bonus time” (seconds) for the Bladeburner mechanic.\\n *\\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\\n *\\n * “Bonus time” makes the game progress faster, up to 5x the normal speed.\\n * For example, if an action takes 30 seconds to complete but you’ve accumulated over\\n * 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.\\n *\\n * @returns Amount of accumulated “bonus time” (milliseconds) for the Bladeburner mechanic.\\n */\\n getBonusTime(): number;\\n}\\n\\n/**\\n * Coding Contact API\\n * @public\\n */\\nexport interface CodingContract {\\n /**\\n * Attemps a coding contract.\\n * @remarks\\n * RAM cost: 10 GB\\n *\\n * Attempts to solve the Coding Contract with the provided solution.\\n *\\n * @param answer - Solution for the contract.\\n * @param fn - Filename of the contract.\\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\\n * @param opts - Optional parameters for configuring function behavior.\\n * @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.\\n */\\n attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;\\n\\n /**\\n * Get the type of a coding contract.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n * Returns a name describing the type of problem posed by the Coding Contract.\\n * (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)\\n *\\n * @param fn - Filename of the contract.\\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\\n * @returns Name describing the type of problem posed by the Coding Contract.\\n */\\n getContractType(filename: string, host?: string): string;\\n\\n /**\\n * Get the description.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n * Get the full text description for the problem posed by the Coding Contract.\\n *\\n * @param fn - Filename of the contract.\\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\\n * @returns Contract’s text description.\\n */\\n getDescription(filename: string, host?: string): string;\\n\\n /**\\n * Get the input data.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n * Get the data associated with the specific Coding Contract.\\n * Note that this is not the same as the contract’s description.\\n * This is just the data that the contract wants you to act on in order to solve\\n *\\n * @param filename - Filename of the contract.\\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\\n * @returns The specified contract’s data;\\n */\\n getData(filename: string, host?: string): string;\\n\\n /**\\n * Get the number of attempt remaining.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get the number of tries remaining on the contract before it self-destructs.\\n *\\n * @param fn - Filename of the contract.\\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\\n * @returns How many attempts are remaining for the contract;\\n */\\n getNumTriesRemaining(filename: string, host?: string): number;\\n}\\n\\n/**\\n * Gang API\\n * @remarks\\n * If you are not in BitNode-2, then you must have Source-File 2 in order to use this API.\\n * @public\\n */\\nexport interface Gang {\\n /**\\n * Create a gang.\\n * @remarks\\n * RAM cost: 1GB\\n *\\n * Create a gang with the specified faction.\\n * @returns True if the gang was created, false otherwise.\\n */\\n createGang(faction: string): boolean;\\n\\n /**\\n * Check if you're in a gang.\\n * @remarks\\n * RAM cost: 1GB\\n * @returns True if you're in a gang, false otherwise.\\n */\\n inGang(): boolean;\\n\\n /**\\n * List all gang members.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Get the names of all Gang members\\n *\\n * @returns Names of all Gang members.\\n */\\n getMemberNames(): string[];\\n\\n /**\\n * Get information about your gang.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get general information about the gang.\\n *\\n * @returns Object containing general information about the gang.\\n */\\n getGangInformation(): GangGenInfo;\\n\\n /**\\n * Get information about the other gangs.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get territory and power information about all gangs.\\n *\\n * @returns Object containing territory and power information about all gangs.\\n */\\n getOtherGangInformation(): GangOtherInfo;\\n\\n /**\\n * Get information about a specific gang member.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get stat and equipment-related information about a Gang Member\\n *\\n * @param name - Name of member.\\n * @returns Object containing stat and equipment-related information about a Gang Member.\\n */\\n getMemberInformation(name: string): GangMemberInfo;\\n\\n /**\\n * Check if you can recruit a new gang member.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns boolean indicating whether a member can currently be recruited\\n *\\n * @returns True if a member can currently be recruited, false otherwise.\\n */\\n canRecruitMember(): boolean;\\n\\n /**\\n * Recruit a new gang member.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Attempt to recruit a new gang member.\\n *\\n * Possible reasons for failure:\\n * * Cannot currently recruit a new member\\n * * There already exists a member with the specified name\\n *\\n * @param name - Name of member to recruit.\\n * @returns True if the member was successfully recruited, false otherwise.\\n */\\n recruitMember(name: string): boolean;\\n\\n /**\\n * List member task names.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Get the name of all valid tasks that Gang members can be assigned to.\\n *\\n * @returns All valid tasks that Gang members can be assigned to.\\n */\\n getTaskNames(): string[];\\n\\n /**\\n * Set gang member to task.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Attempts to assign the specified Gang Member to the specified task.\\n * If an invalid task is specified, the Gang member will be set to idle (“Unassigned”).\\n *\\n * @param memberName - Name of Gang member to assign.\\n * @param taskName - Task to assign.\\n * @returns True if the Gang Member was successfully assigned to the task, false otherwise.\\n */\\n setMemberTask(memberName: string, taskName: string): boolean;\\n\\n /**\\n * Get stats of a task.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Get the stats of a gang task stats. This is typically used to evaluate which action should be executed next.\\n *\\n * @param name - Name of the task.\\n * @returns Detailed stats of a task.\\n */\\n getTaskStats(name: string): GangTaskStats;\\n\\n /**\\n * List equipment names.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Get the name of all possible equipment/upgrades you can purchase for your Gang Members.\\n * This includes Augmentations.\\n *\\n * @returns Names of all Equipments/Augmentations.\\n */\\n getEquipmentNames(): string[];\\n\\n /**\\n * Get cost of equipment.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get the amount of money it takes to purchase a piece of Equipment or an Augmentation.\\n * If an invalid Equipment/Augmentation is specified, this function will return Infinity.\\n *\\n * @param equipName - Name of equipment.\\n * @returns Cost to purchase the specified Equipment/Augmentation (number). Infinity for invalid arguments\\n */\\n getEquipmentCost(equipName: string): number;\\n\\n /**\\n * Get type of an equipment.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get the specified equipment type.\\n *\\n * @param equipName - Name of equipment.\\n * @returns Type of the equipment.\\n */\\n getEquipmentType(equipName: string): string;\\n\\n /**\\n * Get stats of an equipment.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get the specified equipment stats.\\n *\\n * @param equipName - Name of equipment.\\n * @returns A dictionary containing the stats of the equipment.\\n */\\n getEquipmentStats(equipName: string): EquipmentStats;\\n\\n /**\\n * Purchase an equipment for a gang member.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Attempt to purchase the specified Equipment/Augmentation for the specified Gang member.\\n *\\n * @param memberName - Name of Gang member to purchase the equipment for.\\n * @param equipName - Name of Equipment/Augmentation to purchase.\\n * @returns True if the equipment was successfully purchased. False otherwise\\n */\\n purchaseEquipment(memberName: string, equipName: string): boolean;\\n\\n /**\\n * Ascend a gang member.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Ascend the specified Gang Member.\\n *\\n * @param memberName - Name of member to ascend.\\n * @returns Object with info about the ascension results. undefined if ascension did not occur.\\n */\\n ascendMember(memberName: string): GangMemberAscension | undefined;\\n\\n /**\\n * Get the result of an ascension without ascending.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Get the result of an ascension without ascending.\\n *\\n * @param memberName - Name of member.\\n * @returns Object with info about the ascension results. undefined if ascension is impossible.\\n */\\n getAscensionResult(memberName: string): GangMemberAscension | undefined;\\n\\n /**\\n * Enable/Disable territory warfare.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Set whether or not the gang should engage in territory warfare\\n *\\n * @param engage - Whether or not to engage in territory warfare.\\n */\\n setTerritoryWarfare(engage: boolean): void;\\n\\n /**\\n * Get chance to win clash with other gang.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns the chance you have to win a clash with the specified gang. The chance is returned in decimal form, not percentage\\n *\\n * @param gangName - Target gang\\n * @returns Chance you have to win a clash with the specified gang.\\n */\\n getChanceToWinClash(gangName: string): number;\\n\\n /**\\n * Get bonus time.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns the amount of accumulated “bonus time” (seconds) for the Gang mechanic.\\n *\\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\\n *\\n * “Bonus time” makes the game progress faster, up to 10x the normal speed.\\n *\\n * @returns Bonus time for the Gang mechanic in milliseconds.\\n */\\n getBonusTime(): number;\\n}\\n\\n/**\\n * Sleeve API\\n * @remarks\\n * If you are not in BitNode-10, then you must have Source-File 10 in order to use this API.\\n * @public\\n */\\nexport interface Sleeve {\\n /**\\n * Get the number of sleeves you own.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return the number of duplicate sleeves the player has.\\n *\\n * @returns number of duplicate sleeves the player has.\\n */\\n getNumSleeves(): number;\\n\\n /**\\n * Get the stats of a sleeve.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a structure containing the stats of the sleeve.\\n *\\n * @param sleeveNumber - Index of the sleeve to get stats of.\\n * @returns Object containing the stats of the sleeve.\\n */\\n getSleeveStats(sleeveNumber: number): SleeveSkills;\\n\\n /**\\n * Get information about a sleeve.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a struct containing tons of information about this sleeve\\n *\\n * @param sleeveNumber - Index of the sleeve to retrieve information.\\n * @returns Object containing tons of information about this sleeve.\\n */\\n getInformation(sleeveNumber: number): SleeveInformation;\\n\\n /**\\n * Get task of a sleeve.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything.\\n *\\n * @param sleeveNumber - Index of the sleeve to retrieve task from.\\n * @returns Object containing information the current task that the sleeve is performing.\\n */\\n getTask(sleeveNumber: number): SleeveTask;\\n\\n /**\\n * Set a sleeve to shock recovery.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not this action was set successfully.\\n *\\n * @param sleeveNumber - Index of the sleeve to start recovery.\\n * @returns True if this action was set successfully, false otherwise.\\n */\\n setToShockRecovery(sleeveNumber: number): boolean;\\n\\n /**\\n * Set a sleeve to synchronize.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not this action was set successfully.\\n *\\n * @param sleeveNumber - Index of the sleeve to start synchronizing.\\n * @returns True if this action was set successfully, false otherwise.\\n */\\n setToSynchronize(sleeveNumber: number): boolean;\\n\\n /**\\n * Set a sleeve to commit crime.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not this action was set successfully.\\n *\\n * Returns false if an invalid action is specified.\\n *\\n * @param sleeveNumber - Index of the sleeve to start commiting crime.\\n * @param name - Name of the crime. Must be an exact match.\\n * @returns True if this action was set successfully, false otherwise.\\n */\\n setToCommitCrime(sleeveNumber: number, name: string): boolean;\\n\\n /**\\n * Set a sleeve to work for a faction.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not the sleeve started working or this faction.\\n *\\n * @param sleeveNumber - Index of the sleeve to work for the faction.\\n * @param factionName - Name of the faction to work for.\\n * @param factionWorkType - Name of the action to perform for this faction.\\n * @returns True if the sleeve started working on this faction, false otherwise.\\n */\\n setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean;\\n\\n /**\\n * Set a sleeve to work for a company.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not the sleeve started working or this company.\\n *\\n * @param sleeveNumber - Index of the sleeve to work for the company.\\n * @param companyName - Name of the company to work for.\\n * @returns True if the sleeve started working on this company, false otherwise.\\n */\\n setToCompanyWork(sleeveNumber: number, companyName: string): boolean;\\n\\n /**\\n * Set a sleeve to take a class at a university.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not this action was set successfully.\\n *\\n * @param sleeveNumber - Index of the sleeve to start taking class.\\n * @param university - Name of the university to attend.\\n * @param className - Name of the class to follow.\\n * @returns True if this action was set successfully, false otherwise.\\n */\\n setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;\\n\\n /**\\n * Set a sleeve to workout at the gym.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not the sleeve started working out.\\n *\\n * @param sleeveNumber - Index of the sleeve to workout at the gym.\\n * @param gymName - Name of the gym.\\n * @param stat - Name of the stat to train.\\n * @returns True if the sleeve started working out, false otherwise.\\n */\\n setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;\\n\\n /**\\n * Make a sleeve travel to another city.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a boolean indicating whether or not the sleeve reached destination.\\n *\\n * @param sleeveNumber - Index of the sleeve to travel.\\n * @param cityName - Name of the destination city.\\n * @returns True if the sleeve reached destination, false otherwise.\\n */\\n travel(sleeveNumber: number, cityName: string): boolean;\\n\\n /**\\n * Get augmentations installed on a sleeve.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a list of augmentation names that this sleeve has installed.\\n *\\n * @param sleeveNumber - Index of the sleeve to retrieve augmentations from.\\n * @returns List of augmentation names that this sleeve has installed.\\n */\\n getSleeveAugmentations(sleeveNumber: number): string[];\\n\\n /**\\n * List purchasable augs for a sleeve.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return a list of augmentations that the player can buy for this sleeve.\\n *\\n * @param sleeveNumber - Index of the sleeve to retrieve purchasable augmentations from.\\n * @returns List of augmentations that the player can buy for this sleeve.\\n */\\n getSleevePurchasableAugs(sleeveNumber: number): AugmentPair[];\\n\\n /**\\n * Purchase an aug for a sleeve.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Return true if the aug was purchased and installed on the sleeve.\\n *\\n * @param sleeveNumber - Index of the sleeve to buy an aug for.\\n * @param augName - Name of the aug to buy. Must be an exact match.\\n * @returns True if the aug was purchased and installed on the sleeve, false otherwise.\\n */\\n purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;\\n}\\n\\n/**\\n * Skills formulas\\n * @public\\n */\\ninterface SkillsFormulas {\\n /**\\n * Calculate skill level.\\n * @param exp - experience for that skill\\n * @param skillMult - Multiplier for that skill, defaults to 1.\\n * @returns The calculated skill level.\\n */\\n calculateSkill(exp: number, skillMult?: number): number;\\n /**\\n * Calculate exp for skill level.\\n * @param skill - target skill level\\n * @param skillMult - Multiplier for that skill, defaults to 1.\\n * @returns The calculated exp required.\\n */\\n calculateExp(skill: number, skillMult?: number): number;\\n}\\n\\n/**\\n * Hacking formulas\\n * @public\\n */\\ninterface HackingFormulas {\\n /**\\n * Calculate hack chance.\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @returns The calculated hack chance.\\n */\\n hackChance(server: Server, player: Player): number;\\n /**\\n * Calculate hack exp for one thread.\\n * @remarks\\n * Multiply by thread to get total exp\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @returns The calculated hack exp.\\n */\\n hackExp(server: Server, player: Player): number;\\n /**\\n * Calculate hack percent for one thread.\\n * @remarks\\n * Multiply by thread to get total percent hacked.\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @returns The calculated hack percent.\\n */\\n hackPercent(server: Server, player: Player): number;\\n /**\\n * Calculate the percent a server would grow.\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param threads - Amount of thread.\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @param cores - Number of cores on the computer that will execute grow.\\n * @returns The calculated grow percent.\\n */\\n growPercent(server: Server, threads: number, player: Player, cores?: number): number;\\n /**\\n * Calculate hack time.\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @returns The calculated hack time.\\n */\\n hackTime(server: Server, player: Player): number;\\n /**\\n * Calculate grow time.\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @returns The calculated grow time.\\n */\\n growTime(server: Server, player: Player): number;\\n /**\\n * Calculate weaken time.\\n * @param server - Server info from {@link NS.getServer | getServer}\\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\\n * @returns The calculated weaken time.\\n */\\n weakenTime(server: Server, player: Player): number;\\n}\\n\\n/**\\n * Hacknet Node formulas\\n * @public\\n */\\ninterface HacknetNodesFormulas {\\n /**\\n * Calculate money gain rate.\\n * @param level - level of the node.\\n * @param ram - ram of the node.\\n * @param cores - cores of the node.\\n * @param mult - player production mult (default to 1)\\n * @returns The calculated money gain rate.\\n */\\n moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet node level.\\n * @param startingLevel - starting level\\n * @param extraLevels - amount of level to purchase (defaults to 1)\\n * @param costMult - player cost reduction (default to 1)\\n * @returns The calculated cost.\\n */\\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet node ram.\\n * @param startingRam - starting ram\\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\\n * @param costMult - player cost reduction (default to 1)\\n * @returns The calculated cost.\\n */\\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet node cores.\\n * @param startingCore - starting cores\\n * @param extraCores - amount of cores to purchase (defaults to 1)\\n * @param costMult - player cost reduction (default to 1)\\n * @returns The calculated cost.\\n */\\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\\n /**\\n * Calculate the cost of a hacknet node.\\n * @param n - number of the hacknet node\\n * @param mult - player cost reduction (defaults to 1)\\n * @returns The calculated cost.\\n */\\n hacknetNodeCost(n: number, mult: number): number;\\n /**\\n * All constants used by the game.\\n * @returns An object with all hacknet node constants used by the game.\\n */\\n constants(): number;\\n}\\n\\n/**\\n * Hacknet Server formulas\\n * @public\\n */\\ninterface HacknetServersFormulas {\\n /**\\n * Calculate hash gain rate.\\n * @param level - level of the server.\\n * @param ramUsed - ramUsed of the server.\\n * @param maxRam - maxRam of the server.\\n * @param cores - cores of the server.\\n * @param mult - player production mult (default to 1)\\n * @returns The calculated hash gain rate.\\n */\\n hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet server level.\\n * @param startingLevel - starting level\\n * @param extraLevels - amount of level to purchase (defaults to 1)\\n * @param costMult - player cost reduction (default to 1)\\n * @returns The calculated cost.\\n */\\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet server ram.\\n * @param startingRam - starting ram\\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\\n * @param costMult - player cost reduction (default to 1)\\n * @returns The calculated cost.\\n */\\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet server cores.\\n * @param startingCore - starting cores\\n * @param extraCores - amount of cores to purchase (defaults to 1)\\n * @param costMult - player cost reduction (default to 1)\\n * @returns The calculated cost.\\n */\\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\\n /**\\n * Calculate cost of upgrading hacknet server cache.\\n * @param startingCache - starting cache level\\n * @param extraCache - amount of levels of cache to purchase (defaults to 1)\\n * @returns The calculated cost.\\n */\\n cacheUpgradeCost(startingCache: number, extraCache?: number): number;\\n /**\\n * Calculate hash cost of an upgrade.\\n * @param upgName - name of the upgrade\\n * @param level - level of the upgrade\\n * @returns The calculated hash cost.\\n */\\n hashUpgradeCost(upgName: number, level: number): number;\\n /**\\n * Calculate the cost of a hacknet server.\\n * @param n - number of the hacknet server\\n * @param mult - player cost reduction (defaults to 1)\\n * @returns The calculated cost.\\n */\\n hacknetServerCost(n: number, mult?: number): number;\\n /**\\n * All constants used by the game.\\n * @returns An object with all hacknet server constants used by the game.\\n */\\n constants(): any;\\n}\\n\\n/**\\n * Gang formulas\\n * @public\\n */\\ninterface GangFormulas {\\n /**\\n * Calculate the wanted penalty.\\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\\n * @returns The calculated wanted penalty.\\n */\\n wantedPenalty(gang: GangGenInfo): number;\\n /**\\n * Calculate respect gain per tick.\\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\\n * @returns The calculated respect gain.\\n */\\n respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\\n /**\\n * Calculate wanted gain per tick.\\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\\n * @returns The calculated wanted gain.\\n */\\n wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\\n /**\\n * Calculate money gain per tick.\\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\\n * @returns The calculated money gain.\\n */\\n moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\\n\\n /**\\n * Calculate ascension point gain.\\n * @param exp - Experience point before ascension.\\n * @returns The calculated ascension point gain.\\n */\\n ascensionPointsGain(exp: number): number;\\n\\n /**\\n * Calculate ascension mult.\\n * @param points - Amount of ascension points.\\n * @returns The calculated ascension mult.\\n */\\n ascensionMultiplier(points: number): number;\\n}\\n\\n/**\\n * Formulas API\\n * @remarks\\n * You need Formulas.exe on your home computer to use this API.\\n * @public\\n */\\nexport interface Formulas {\\n /** Skills formulas */\\n skills: SkillsFormulas;\\n /** Hacking formulas */\\n hacking: HackingFormulas;\\n /** Hacknet Nodes formulas */\\n hacknetNodes: HacknetNodesFormulas;\\n /** Hacknet Servers formulas */\\n hacknetServers: HacknetServersFormulas;\\n /** Gang formulas */\\n gang: GangFormulas;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface Fragment {\\n id: number;\\n shape: boolean[][];\\n type: number;\\n power: number;\\n limit: number;\\n}\\n\\n/**\\n * @public\\n */\\nexport interface ActiveFragment {\\n id: number;\\n avgCharge: number;\\n numCharge: number;\\n rotation: number;\\n x: number;\\n y: number;\\n}\\n\\n/**\\n * Stanek's Gift API.\\n * @public\\n */\\ninterface Stanek {\\n /**\\n * Stanek's Gift width.\\n * @remarks\\n * RAM cost: 0.4 GB\\n * @returns The width of the gift.\\n */\\n width(): number;\\n /**\\n * Stanek's Gift height.\\n * @remarks\\n * RAM cost: 0.4 GB\\n * @returns The height of the gift.\\n */\\n height(): number;\\n\\n /**\\n * Charge a fragment, increasing it's power.\\n * @remarks\\n * RAM cost: 0.4 GB\\n * @param rootX - rootX Root X against which to align the top left of the fragment.\\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\\n * @returns Promise that lasts until the charge action is over.\\n */\\n charge(rootX: number, rootY: number): Promise;\\n\\n /**\\n * List possible fragments.\\n * @remarks\\n * RAM cost: cost: 0 GB\\n *\\n * @returns List of possible fragments.\\n */\\n fragmentDefinitions(): Fragment[];\\n\\n /**\\n * List of fragments in Stanek's Gift.\\n * @remarks\\n * RAM cost: cost: 5 GB\\n *\\n * @returns List of active fragments placed on Stanek's Gift.\\n */\\n activeFragments(): ActiveFragment[];\\n\\n /**\\n * Clear the board of all fragments.\\n * @remarks\\n * RAM cost: cost: 0 GB\\n */\\n clear(): void;\\n\\n /**\\n * Check if fragment can be placed at specified location.\\n * @remarks\\n * RAM cost: cost: 0.5 GB\\n *\\n * @param rootX - rootX Root X against which to align the top left of the fragment.\\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\\n * @param rotation - rotation A number from 0 to 3, the mount of 90 degree turn to take.\\n * @param fragmentId - fragmentId ID of the fragment to place.\\n * @returns true if the fragment can be placed at that position. false otherwise.\\n */\\n canPlace(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\\n /**\\n * Place fragment on Stanek's Gift.\\n * @remarks\\n * RAM cost: cost: 5 GB\\n *\\n * @param rootX - X against which to align the top left of the fragment.\\n * @param rootY - Y against which to align the top left of the fragment.\\n * @param rotation - A number from 0 to 3, the mount of 90 degree turn to take.\\n * @param fragmentId - ID of the fragment to place.\\n * @returns true if the fragment can be placed at that position. false otherwise.\\n */\\n place(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\\n /**\\n * Get placed fragment at location.\\n * @remarks\\n * RAM cost: cost: 5 GB\\n *\\n * @param rootX - X against which to align the top left of the fragment.\\n * @param rootY - Y against which to align the top left of the fragment.\\n * @returns The fragment at [rootX, rootY], if any.\\n */\\n get(rootX: number, rootY: number): ActiveFragment | undefined;\\n\\n /**\\n * Remove fragment at location.\\n * @remarks\\n * RAM cost: cost: 0.15 GB\\n *\\n * @param rootX - X against which to align the top left of the fragment.\\n * @param rootY - Y against which to align the top left of the fragment.\\n * @returns The fragment at [rootX, rootY], if any.\\n */\\n remove(rootX: number, rootY: number): boolean;\\n}\\n\\n/**\\n * Collection of all functions passed to scripts\\n * @public\\n */\\nexport interface NS extends Singularity {\\n /**\\n * Namespace for hacknet functions.\\n * @remarks RAM cost: 4 GB\\n */\\n readonly hacknet: Hacknet;\\n /**\\n *\\n * Namespace for bladeburner functions.\\n * @remarks RAM cost: 0 GB\\n */\\n readonly bladeburner: Bladeburner;\\n /**\\n *\\n * Namespace for codingcontract functions.\\n * @remarks RAM cost: 0 GB\\n */\\n readonly codingcontract: CodingContract;\\n /**\\n *\\n * Namespace for gang functions.\\n * @remarks RAM cost: 0 GB\\n */\\n readonly gang: Gang;\\n /**\\n *\\n * Namespace for sleeve functions.\\n * @remarks RAM cost: 0 GB\\n */\\n readonly sleeve: Sleeve;\\n /**\\n *\\n * Namespace for stock functions.\\n * @remarks\\n * RAM cost: 0 GB\\n */\\n readonly stock: TIX;\\n /**\\n *\\n * Namespace for formulas functions.\\n * @remarks\\n * RAM cost: 0 GB\\n */\\n readonly formulas: Formulas;\\n /**\\n * Namespace for stanek functions.\\n * RAM cost: 0 GB\\n */\\n readonly stanek: Stanek;\\n /**\\n * Namespace for corporation functions.\\n * RAM cost: 0 GB\\n */\\n readonly corporation: Corporation;\\n\\n /**\\n * Arguments passed into the script.\\n *\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Arguments passed into a script can be accessed using a normal\\n * array using the [] operator (args[0], args[1], etc…).\\n *\\n * It is also possible to get the number of arguments that was passed into a script using: 'args.length'\\n * WARNING: Do not try to modify the args array. This will break the game.\\n */\\n readonly args: (string | number | boolean)[];\\n\\n /**\\n * Steal a servers money.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Function that is used to try and hack servers to steal money and gain hacking experience.\\n * The runtime for this command depends on your hacking level and the target server’s\\n * security level. In order to hack a server you must first gain root access to that server\\n * and also have the required hacking level.\\n *\\n * A script can hack a server from anywhere. It does not need to be running on the same\\n * server to hack that server. For example, you can create a script that hacks the `foodnstuff`\\n * server and run that script on any server in the game.\\n *\\n * A successful `hack()` on a server will raise that server’s security level by 0.002.\\n *\\n * @example\\n * ```ts\\n * hack(\\\"foodnstuff\\\");\\n * hack(\\\"foodnstuff\\\", { threads: 5 }); // Only use 5 threads to hack\\n * ```\\n * @param host - Hostname of the target server to hack.\\n * @param opts - Optional parameters for configuring function behavior.\\n * @returns The amount of money stolen if the hack is successful, and zero otherwise.\\n */\\n hack(host: string, opts?: BasicHGWOptions): Promise;\\n\\n /**\\n * Spoof money in a servers bank account, increasing the amount available.\\n * @remarks\\n * RAM cost: 0.15 GB\\n *\\n * Use your hacking skills to increase the amount of money available on a server.\\n * The runtime for this command depends on your hacking level and the target server’s\\n * security level. When `grow` completes, the money available on a target server will\\n * be increased by a certain, fixed percentage. This percentage is determined by the\\n * target server’s growth rate (which varies between servers) and security level. Generally,\\n * higher-level servers have higher growth rates. The getServerGrowth() function can be used\\n * to obtain a server’s growth rate.\\n *\\n * Like hack, `grow` can be called on any server, regardless of where the script is running.\\n * The grow() command requires root access to the target server, but there is no required hacking\\n * level to run the command. It also raises the security level of the target server by 0.004.\\n *\\n * @example\\n * ```ts\\n * grow(\\\"foodnstuff\\\");\\n * grow(\\\"foodnstuff\\\", { threads: 5 }); // Only use 5 threads to grow\\n * ```\\n * @param host - Hostname of the target server to grow.\\n * @param opts - Optional parameters for configuring function behavior.\\n * @returns The number by which the money on the server was multiplied for the growth.\\n */\\n grow(host: string, opts?: BasicHGWOptions): Promise;\\n\\n /**\\n * Reduce a server security level.\\n * @remarks\\n * RAM cost: 0.15 GB\\n *\\n * Use your hacking skills to attack a server’s security, lowering the server’s security level.\\n * The runtime for this command depends on your hacking level and the target server’s security\\n * level. This function lowers the security level of the target server by 0.05.\\n *\\n * Like hack and grow, `weaken` can be called on any server, regardless of\\n * where the script is running. This command requires root access to the target server, but\\n * there is no required hacking level to run the command.\\n *\\n * @example\\n * ```ts\\n * weaken(\\\"foodnstuff\\\");\\n * weaken(\\\"foodnstuff\\\", { threads: 5 }); // Only use 5 threads to weaken\\n * ```\\n * @param host - Hostname of the target server to weaken.\\n * @param opts - Optional parameters for configuring function behavior.\\n * @returns The amount by which the target server’s security level was decreased. This is equivalent to 0.05 multiplied by the number of script threads.\\n */\\n weaken(host: string, opts?: BasicHGWOptions): Promise;\\n\\n /**\\n * Predict the effect of weaken.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns the security decrease that would occur if a weaken with this many threads happened.\\n *\\n * @param threads - Amount of threads that will be used.\\n * @param cores - Optional. The number of cores of the server that would run weaken.\\n * @returns The security decrease.\\n */\\n weakenAnalyze(threads: number, cores?: number): number;\\n\\n /**\\n * Predict the effect of hack.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * This function returns the number of script threads you need when running the hack command\\n * to steal the specified amount of money from the target server.\\n * If hackAmount is less than zero or greater than the amount of money available on the server,\\n * then this function returns -1.\\n *\\n * Warning: The value returned by this function isn’t necessarily a whole number.\\n *\\n * @example\\n * ```ts\\n * //For example, let’s say the foodnstuff server has $10m and you run:\\n * hackAnalyzeThreads(\\\"foodnstuff\\\", 1e6);\\n * //If this function returns 50, this means that if your next hack call is run on a script with 50 threads, it will steal $1m from the foodnstuff server.\\n * ```\\n * @param host - Hostname of the target server to analyze.\\n * @param hackAmount - Amount of money you want to hack from the server.\\n * @returns The number of threads needed to hack the server for hackAmount money.\\n */\\n hackAnalyzeThreads(host: string, hackAmount: number): number;\\n\\n /**\\n * Get the percent of money stolen with a single thread.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns the percentage of the specified server’s money you will steal with a single hack.\\n * This value is returned in percentage form, not decimal\\n * (Netscript functions typically return in decimal form, but not this one).\\n *\\n * @example\\n * ```ts\\n * //For example, assume the following returns 1:\\n * hackAnalyze(\\\"foodnstuff\\\");\\n * //This means that if hack the foodnstuff server, then you will steal 1% of its total money. If you hack using N threads, then you will steal N% of its total money.\\n * ```\\n * @param host - Hostname of the target server.\\n * @returns The percentage of money you will steal from the target server with a single hack.\\n */\\n hackAnalyze(host: string): number;\\n\\n /**\\n * Get the security increase for a number of thread.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns the security increase that would occur if a hack with this many threads happened.\\n *\\n * @param threads - Amount of threads that will be used.\\n * @returns The security increase.\\n */\\n hackAnalyzeSecurity(threads: number): number;\\n\\n /**\\n * Get the chance of successfully hacking a server.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns the chance you have of successfully hacking the specified server.\\n *\\n * This returned value is in decimal form, not percentage.\\n *\\n * @param host - Hostname of the target server.\\n * @returns The chance you have of successfully hacking the target server.\\n */\\n hackAnalyzeChance(host: string): number;\\n\\n /**\\n * Calculate the number of grow thread needed to grow a server by a certain multiplier.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * This function returns the number of “growths” needed in order to increase\\n * the amount of money available on the specified server by the specified amount.\\n * The specified amount is multiplicative and is in decimal form, not percentage.\\n *\\n * Warning: The value returned by this function isn’t necessarily a whole number.\\n *\\n * @example\\n * ```ts\\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\\n * growthAnalyze(\\\"foodnstuff\\\", 2);\\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\\n * ```\\n * @param host - Hostname of the target server.\\n * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..\\n * @returns The amount of grow calls needed to grow the specified server by the specified amount\\n */\\n growthAnalyze(host: string, growthAmount: number, cores?: number): number;\\n\\n /**\\n * Calculate the security increase for a number of thread.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns the security increase that would occur if a grow with this many threads happened.\\n *\\n * @param threads - Amount of threads that will be used.\\n * @returns The security increase.\\n */\\n growthAnalyzeSecurity(threads: number): number;\\n\\n /**\\n * Suspends the script for n milliseconds.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param millis - Number of milliseconds to sleep.\\n * @returns\\n */\\n sleep(millis: number): Promise;\\n\\n /**\\n * Suspends the script for n milliseconds. Doesn't block with concurrent calls.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param millis - Number of milliseconds to sleep.\\n * @returns\\n */\\n asleep(millis: number): Promise;\\n\\n /**\\n * Prints a value or a variable to the script’s logs.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param msg - Value to be printed.\\n */\\n print(msg: any): void;\\n\\n /**\\n * Prints a value or a variable to the Terminal.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param msg - Value to be printed.\\n */\\n tprint(msg: any): void;\\n\\n /**\\n * Prints a raw value or a variable to the Terminal.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param format - format of the message\\n * @param msg - Value to be printed.\\n */\\n tprintf(format: string, ...values: any[]): void;\\n\\n /**\\n * Clears the script’s logs.\\n * @remarks\\n * RAM cost: 0 GB\\n */\\n clearLog(): void;\\n\\n /**\\n * Disables logging for the given function.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Logging can be disabled for all functions by passing `ALL` as the argument.\\n *\\n * Note that this does not completely remove all logging functionality.\\n * This only stops a function from logging when the function is successful.\\n * If the function fails, it will still log the reason for failure.\\n *\\n * Notable functions that cannot have their logs disabled: run,\\n * exec, exit.\\n *\\n * @param fn - Name of function for which to disable logging.\\n */\\n disableLog(fn: string): void;\\n\\n /**\\n * Enable logging for a certain function.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Re-enables logging for the given function. If `ALL` is passed into this\\n * function as an argument, then it will revert the effects of disableLog(`ALL`).\\n *\\n * @param fn - Name of function for which to enable logging.\\n */\\n enableLog(fn: string): void;\\n\\n /**\\n * Checks the status of the logging for the given function.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param fn - Name of function to check.\\n * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`)\\n */\\n isLogEnabled(fn: string): boolean;\\n\\n /**\\n * Get all the logs of a script.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Returns a script’s logs. The logs are returned as an array, where each line is an element in the array.\\n * The most recently logged line is at the end of the array.\\n * Note that there is a maximum number of lines that a script stores in its logs. This is configurable in the game’s options.\\n * If the function is called with no arguments, it will return the current script’s logs.\\n *\\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\\n * Remember that scripts are uniquely identified by both their names and arguments.\\n *\\n * @example\\n * ```ts\\n * //Get logs from foo.script on the current server that was run with no args\\n * getScriptLogs(\\\"foo.script\\\");\\n * ```\\n * @example\\n * ```ts\\n * //Open logs from foo.script on the foodnstuff server that was run with no args\\n * getScriptLogs(\\\"foo.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, \\\"test\\\"]\\n * getScriptLogs(\\\"foo.script\\\", \\\"foodnstuff\\\", 1, \\\"test\\\");\\n * ```\\n * @param fn - Optional. Filename of script to get logs from.\\n * @param host - Optional. Hostname of the server that the script is on.\\n * @param args - Arguments to identify which scripts to get logs for.\\n * @returns Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array.\\n */\\n getScriptLogs(fn?: string, host?: string, ...args: any[]): string[];\\n\\n /**\\n * Open the tail window of a script.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Opens a script’s logs. This is functionally the same as the tail Terminal command.\\n *\\n * If the function is called with no arguments, it will open the current script’s logs.\\n *\\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\\n * Remember that scripts are uniquely identified by both their names and arguments.\\n *\\n * @example\\n * ```ts\\n * //Open logs from foo.script on the current server that was run with no args\\n * tail(\\\"foo.script\\\");\\n * ```\\n * @example\\n * ```ts\\n * //Get logs from foo.script on the foodnstuff server that was run with no args\\n * tail(\\\"foo.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, \\\"test\\\"]\\n * tail(\\\"foo.script\\\", \\\"foodnstuff\\\", 1, \\\"test\\\");\\n * ```\\n * @param fn - Optional. Filename of the script being tailed. If omitted, the current script is tailed.\\n * @param host - Optional. Hostname of the script being tailed. Defaults to the server this script is running on. If args are specified, this is not optional.\\n * @param args - Arguments for the script being tailed.\\n */\\n tail(fn?: string, host?: string, ...args: any[]): void;\\n\\n /**\\n * Get the list servers connected to a server.\\n * @remarks\\n * RAM cost: 0.2 GB\\n *\\n * Returns an array containing the hostnames or IPs of all servers that are one\\n * node way from the specified target server. The hostnames/IPs in the returned\\n * array are strings.\\n *\\n * @param host - Hostname of the server to scan.\\n * @param hostnames - Optional boolean specifying whether the function should output hostnames (if true) or IP addresses (if false).\\n * @returns Returns an string of hostnames or IP.\\n */\\n scan(host: string, hostnames?: boolean): string[];\\n\\n /**\\n * Runs NUKE.exe on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Runs the NUKE.exe program on the target server. NUKE.exe must exist on your home computer.\\n *\\n * @example\\n * ```ts\\n * nuke(\\\"foodnstuff\\\");\\n * ```\\n * @param host - Hostname of the target server.\\n */\\n nuke(host: string): void;\\n\\n /**\\n * Runs BruteSSH.exe on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.\\n *\\n * @example\\n * ```ts\\n * brutessh(\\\"foodnstuff\\\");\\n * ```\\n * @param host - Hostname of the target server.\\n */\\n brutessh(host: string): void;\\n\\n /**\\n * Runs FTPCrack.exe on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.\\n *\\n * @example\\n * ```ts\\n * ftpcrack(\\\"foodnstuff\\\");\\n * ```\\n * @param host - Hostname of the target server.\\n */\\n ftpcrack(host: string): void;\\n\\n /**\\n * Runs relaySMTP.exe on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.\\n *\\n * @example\\n * ```ts\\n * relaysmtp(\\\"foodnstuff\\\");\\n * ```\\n * @param host - Hostname of the target server.\\n */\\n relaysmtp(host: string): void;\\n\\n /**\\n * Runs HTTPWorm.exe on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.\\n *\\n * @example\\n * ```ts\\n * httpworm(\\\"foodnstuff\\\");\\n * ```\\n * @param host - Hostname of the target server.\\n */\\n httpworm(host: string): void;\\n\\n /**\\n * Runs SQLInject.exe on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.\\n *\\n * @example\\n * ```ts\\n * sqlinject(\\\"foodnstuff\\\");\\n * ```\\n * @remarks RAM cost: 0.05 GB\\n * @param host - Hostname of the target server.\\n */\\n sqlinject(host: string): void;\\n\\n /**\\n * Start another script on the current server.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Run a script as a separate process. This function can only be used to run scripts located on the\\n * current server (the server running the script that calls this function). Requires a significant\\n * amount of RAM to run this command.\\n *\\n * If the script was successfully started, then this functions returns the PID of that script.\\n * Otherwise, it returns 0.\\n *\\n * PID stands for Process ID. The PID is a unique identifier for each script.\\n * The PID will always be a positive integer.\\n *\\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\\n * However, running this function with a negative numThreads argument will cause a runtime error.\\n *\\n * @example\\n * ```ts\\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\\n * run(\\\"foo.script\\\");\\n * ```\\n * @example\\n * ```ts\\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\\n * run(\\\"foo.script\\\", 5);\\n * ```\\n * @example\\n * ```ts\\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\\n * run(\\\"foo.script\\\", 1, 'foodnstuff');\\n * ```\\n * @param script - Filename of script to run.\\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value.\\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\\n */\\n run(script: string, numThreads?: number, ...args: string[]): number;\\n\\n /**\\n * Start another script on any server.\\n * @remarks\\n * RAM cost: 1.3 GB\\n *\\n * Run a script as a separate process on a specified server. This is similar to the run function\\n * except that it can be used to run a script on any server, instead of just the current server.\\n *\\n * If the script was successfully started, then this functions returns the PID of that script.\\n * Otherwise, it returns 0.\\n *\\n * PID stands for Process ID. The PID is a unique identifier for each script.\\n * The PID will always be a positive integer.\\n *\\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\\n * However, running this function with a negative numThreads argument will cause a runtime error.\\n *\\n * @example\\n * ```ts\\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\\n * exec(\\\"generic-hack.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\\n * exec(\\\"generic-hack.script\\\", \\\"joesguns\\\", 10);\\n * ```\\n * @example\\n * ```ts\\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\\n * exec(\\\"foo.script\\\", \\\"foodnstuff\\\", 5, 1, \\\"test\\\");\\n * ```\\n * @param script - Filename of script to execute.\\n * @param host - Hostname of the `target server` on which to execute the script.\\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.\\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\\n */\\n exec(script: string, host: string, numThreads?: number, ...args: string[]): number;\\n\\n /**\\n * Terminate current script and start another in 10s.\\n * @remarks\\n * RAM cost: 2 GB\\n *\\n * Terminates the current script, and then after a delay of about 10 seconds it will execute the\\n * newly-specified script. The purpose of this function is to execute a new script without being\\n * constrained by the RAM usage of the current one. This function can only be used to run scripts\\n * on the local server.\\n *\\n * Because this function immediately terminates the script, it does not have a return value.\\n *\\n * @example\\n * ```ts\\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\\n * spawn('foo.script', 10, 'foodnstuff', 90);\\n * ```\\n * @param script - Filename of script to execute.\\n * @param numThreads - Number of threads to spawn new script with. Will be rounded to nearest integer.\\n * @param args - Additional arguments to pass into the new script that is being run.\\n */\\n spawn(script: string, numThreads?: number, ...args: string[]): void;\\n\\n /**\\n * Terminate another script.\\n * @remarks\\n * RAM cost: 0.5 GB\\n *\\n * Kills the script on the target server specified by the script’s name and arguments.\\n * Remember that scripts are uniquely identified by both their name and arguments.\\n * For example, if `foo.script` is run with the argument 1, then this is not the same as\\n * `foo.script` run with the argument 2, even though they have the same code.\\n *\\n * @example\\n * ```ts\\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\\n * kill(\\\"foo.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\\n * kill(\\\"foo.script\\\", getHostname());\\n * ```\\n * @example\\n * ```ts\\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\\n * kill(\\\"foo.script\\\", getHostname(), 1, \\\"foodnstuff\\\");\\n * ```\\n * @param script - Filename or pid of the script to kill\\n * @param host - Hostname of the server on which to kill the script.\\n * @param args - Arguments to identify which script to kill.\\n * @returns True if the script is successfully killed, and false otherwise.\\n */\\n kill(script: string | number, host: string, ...args: string[]): boolean;\\n\\n /**\\n * Terminate all scripts on a server.\\n * @remarks\\n * RAM cost: 0.5 GB\\n *\\n * Kills all running scripts on the specified server. This function returns true\\n * if any scripts were killed, and false otherwise. In other words, it will return\\n * true if there are any scripts running on the target server.\\n *\\n * @param host - IP or hostname of the server on which to kill all scripts.\\n * @returns True if any scripts were killed, and false otherwise.\\n */\\n killall(host: string): boolean;\\n\\n /**\\n * Terminates the current script immediately.\\n * @remarks\\n * RAM cost: 0 GB\\n */\\n exit(): void;\\n\\n /**\\n * Copy file between servers.\\n * @remarks\\n * RAM cost: 0.6 GB\\n *\\n * Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string\\n * specifying a single file to copy, or an array of strings specifying multiple files to copy.\\n *\\n * @example\\n * ```ts\\n * //Copies foo.lit from the helios server to the home computer:\\n * scp(\\\"foo.lit\\\", \\\"helios\\\", \\\"home\\\");\\n * ```\\n * @example\\n * ```ts\\n * //Tries to copy three files from rothman-uni to home computer:\\n * files = [\\\"foo1.lit\\\", \\\"foo2.script\\\", \\\"foo3.script\\\"];\\n * scp(files, \\\"rothman-uni\\\", \\\"home\\\");\\n * ```\\n * @param files - Filename or an array of filenames of script/literature files to copy.\\n * @param source - Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server.\\n * @param destination - Host of the destination server, which is the server to which the file will be copied.\\n * @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.\\n */\\n scp(files: string | string[], source: string, destination: string): Promise;\\n\\n /**\\n * List files on a server.\\n * @remarks\\n * RAM cost: 0.2 GB\\n *\\n * Returns an array with the filenames of all files on the specified server\\n * (as strings). The returned array is sorted in alphabetic order.\\n *\\n * @param host - Host of the target server.\\n * @param grep - A substring to search for in the filename.\\n * @returns Array with the filenames of all files on the specified server.\\n */\\n ls(host: string, grep?: string): string[];\\n\\n /**\\n * List running scripts on a server.\\n * @remarks\\n * RAM cost: 0.2 GB\\n *\\n * Returns an array with general information about all scripts running on the specified target server.\\n *\\n * @example\\n * ```ts\\n * //(using NetscriptJS (Netscript 2.0))\\n * export async function main(ns) {\\n * const ps = ns.ps(\\\"home\\\");\\n * for (let i = 0; i < ps.length; ++i) {\\n * ns.tprint(ps[i].filename + ' ' + ps[i].threads);\\n * ns.tprint(ps[i].args);\\n * }\\n * }\\n * ```\\n * @param host - Host address of the target server. If not specified, it will be the current server’s IP by default.\\n * @returns Array with general information about all scripts running on the specified target server.\\n */\\n ps(host?: string): ProcessInfo[];\\n\\n /**\\n * Check if your have root access on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Returns a boolean indicating whether or not the player has root access to the specified target server.\\n *\\n * @example\\n * ```ts\\n * if (hasRootAccess(\\\"foodnstuff\\\") == false) {\\n * nuke(\\\"foodnstuff\\\");\\n * }\\n * ```\\n * @param host - Host of the target server\\n * @returns True if player has root access to the specified target server, and false otherwise.\\n */\\n hasRootAccess(host: string): boolean;\\n\\n /**\\n * Returns a string with the hostname of the server that the script is running on.\\n *\\n * @remarks\\n * RAM cost: 0.05 GB\\n * @returns Hostname of the server that the script is on.\\n */\\n getHostname(): string;\\n\\n /**\\n * Returns the player’s current hacking level.\\n *\\n * @remarks\\n * RAM cost: 0.05 GB\\n * @returns Player’s current hacking level\\n */\\n getHackingLevel(): number;\\n\\n /**\\n * Get hacking related multipliers.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns an object containing the Player’s hacking related multipliers.\\n * These multipliers are returned in fractional forms, not percentages\\n * (e.g. 1.5 instead of 150%).\\n *\\n * @example\\n * ```ts\\n * //Example of how this can be used:\\n * mults = getHackingMultipliers();\\n * print(mults.chance);\\n * print(mults.growth);\\n * ```\\n * @returns Object containing the Player’s hacking related multipliers.\\n */\\n getHackingMultipliers(): HackingMultipliers;\\n\\n /**\\n * Get hacknet related multipliers.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns an object containing the Player’s hacknet related multipliers.\\n * These multipliers are returned in fractional forms, not percentages\\n * (e.g. 1.5 instead of 150%).\\n *\\n * @example\\n * ```ts\\n * //Example of how this can be used:\\n * mults = getHacknetMultipliers();\\n * print(mults.production);\\n * print(mults.purchaseCost);\\n * ```\\n * @returns Object containing the Player’s hacknet related multipliers.\\n */\\n getHacknetMultipliers(): HacknetMultipliers;\\n\\n /**\\n * Returns a server object for the given server. Defaults to the running script's server if host is not specified.\\n *\\n * @remarks\\n * RAM cost: 2 GB\\n * @param host - Optional. Hostname for the requested server object.\\n * @returns The requested server object.\\n */\\n getServer(host?: string): Server;\\n\\n /**\\n * Get money available on a server.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the amount of money available on a server.\\n * Running this function on the home computer will return the player’s money.\\n *\\n * @example\\n * ```ts\\n * getServerMoneyAvailable(\\\"foodnstuff\\\");\\n * getServerMoneyAvailable(\\\"home\\\"); //Returns player's money\\n * ```\\n * @param host - Host of target server\\n * @returns Amount of money available on the server.\\n */\\n getServerMoneyAvailable(host: string): number;\\n\\n /**\\n * Get maximum money available on a server.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the maximum amount of money that can be available on a server.\\n *\\n * @param host - Host of target server.\\n * @returns Maximum amount of money available on the server.\\n */\\n getServerMaxMoney(host: string): number;\\n\\n /**\\n * Get a server growth parameter.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the server’s instrinsic “growth parameter”. This growth\\n * parameter is a number between 1 and 100 that represents how\\n * quickly the server’s money grows. This parameter affects the\\n * percentage by which the server’s money is increased when using the\\n * grow function. A higher growth parameter will result in a\\n * higher percentage increase from grow.\\n *\\n * @param host - Host of target server.\\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\\n */\\n getServerGrowth(host: string): number;\\n\\n /**\\n * Get server security level.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the security level of the target server. A server’s security\\n * level is denoted by a number, typically between 1 and 100\\n * (but it can go above 100).\\n *\\n * @param host - Host of target server.\\n * @returns Security level of the target server.\\n */\\n getServerSecurityLevel(host: string): number;\\n\\n /**\\n * Returns the minimum security level of the target server.\\n *\\n * @remarks RAM cost: 0.1 GB\\n * @param host - Host of target server.\\n * @returns Minimum security level of the target server.\\n */\\n getServerMinSecurityLevel(host: string): number;\\n\\n /**\\n * @deprecated useless\\n * @remarks\\n * RAM cost: 0.1 GB\\n * Returns the base security level of the target server. This is the security\\n * level that the server starts out with. This is different than\\n * getServerSecurityLevel because getServerSecurityLevel returns\\n * the current security level of a server, which can constantly change due to\\n * hack, grow, and weaken, calls on that server.\\n * The base security level will stay the same until you reset by\\n * installing an Augmentation(s).\\n *\\n * @param host - Host of target server.\\n * @returns Base security level of the target server.\\n */\\n getServerBaseSecurityLevel(host: string): number;\\n\\n /**\\n * @deprecated use getServerMaxRam / getServerUsedRam\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns an array with two elements that gives information about a server’s memory (RAM).\\n * The first element in the array is the amount of RAM that the server has total (in GB).\\n * The second element in the array is the amount of RAM that is currently being used on\\n * the server (in GB).\\n *\\n * @example\\n * ```ts\\n * res = getServerRam(\\\"helios\\\");\\n * totalRam = res[0];\\n * ramUsed = res[1];\\n * ```\\n * @param host - Host of target server.\\n * @returns Array with total and used memory on the specified server.\\n */\\n getServerRam(host: string): [number, number];\\n\\n /**\\n * Get the max RAM on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * @param host - Hostname of the target server.\\n * @returns max ram\\n */\\n getServerMaxRam(host: string): number;\\n /**\\n * Get the used RAM on a server.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * @param host - Hostname of the target server.\\n * @returns used ram\\n */\\n getServerUsedRam(host: string): number;\\n\\n /**\\n * Returns the required hacking level of the target server.\\n *\\n * @remarks RAM cost: 0.1 GB\\n * @param host - Host of target server.\\n * @returns The required hacking level of the target server.\\n */\\n getServerRequiredHackingLevel(host: string): number;\\n\\n /**\\n * Returns the number of open ports required to successfully run NUKE.exe on the specified server.\\n *\\n * @remarks RAM cost: 0.1 GB\\n * @param host - Host of target server.\\n * @returns The number of open ports required to successfully run NUKE.exe on the specified server.\\n */\\n getServerNumPortsRequired(host: string): number;\\n\\n /**\\n * Returns a boolean denoting whether or not the specified server exists.\\n *\\n * @remarks RAM cost: 0.1 GB\\n * @param host - Host of target server.\\n * @returns True if specified server exists, and false otherwise.\\n */\\n serverExists(host: string): boolean;\\n\\n /**\\n * Check if a file exists.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns a boolean indicating whether the specified file exists on the target server.\\n * The filename for scripts is case-sensitive, but for other types of files it is not.\\n * For example, fileExists(“brutessh.exe”) will work fine, even though the actual program\\n * is named 'BruteSSH.exe'.\\n *\\n * If the hostname/ip argument is omitted, then the function will search through the current\\n * server (the server running the script that calls this function) for the file.\\n *\\n * @example\\n * ```ts\\n * //The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\\n * fileExists(\\\"foo.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\\n * fileExists(\\\"ftpcrack.exe\\\");\\n * ```\\n * @param filename - Filename of file to check.\\n * @param host - Host of target server. This is optional. If it is not specified then the function will use the current server as the target server.\\n * @returns True if specified file exists, and false otherwise.\\n */\\n fileExists(filename: string, host?: string): boolean;\\n\\n /**\\n * Check if a script is running.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns a boolean indicating whether the specified script is running on the target server.\\n * Remember that a script is uniquely identified by both its name and its arguments.\\n *\\n * @example\\n * ```ts\\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\\n * isRunning(\\\"foo.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\\n * isRunning(\\\"foo.script\\\", getHostname());\\n * ```\\n * @example\\n * ```ts\\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\\n * isRunning(\\\"foo.script\\\", \\\"joesguns\\\", 1, 5, \\\"test\\\");\\n * ```\\n * @param script - Filename of script to check. This is case-sensitive.\\n * @param host - Host of target server.\\n * @param args - Arguments to specify/identify which scripts to search for.\\n * @returns True if specified script is running on the target server, and false otherwise.\\n */\\n isRunning(script: string, host: string, ...args: string[]): boolean;\\n\\n /**\\n * Get general info about a running script.\\n * @remarks\\n * RAM cost: 0.3 GB\\n * @returns info about a running script\\n */\\n getRunningScript(filename: string | number, hostname: string, ...args: (string | number)[]): RunningScript;\\n\\n /**\\n * Get cost of purchasing a server.\\n * @remarks\\n * RAM cost: 0.25 GB\\n *\\n * Returns the cost to purchase a server with the specified amount of ram.\\n *\\n * @example\\n * ```ts\\n * for (i = 1; i <= 20; i++) {\\n * tprint(i + \\\" -- \\\" + getPurchasedServerCost(Math.pow(2, i)));\\n * }\\n * ```\\n * @param ram - Amount of RAM of a potential purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\\n * @returns The cost to purchase a server with the specified amount of ram.\\n */\\n getPurchasedServerCost(ram: number): number;\\n\\n /**\\n * Purchase a server.\\n * @remarks\\n * 2.25 GB\\n *\\n * Purchased a server with the specified hostname and amount of RAM.\\n *\\n * The hostname argument can be any data type, but it will be converted to a string\\n * and have whitespace removed. Anything that resolves to an empty string will cause\\n * the function to fail. If there is already a server with the specified hostname,\\n * then the function will automatically append a number at the end of the hostname\\n * argument value until it finds a unique hostname. For example, if the script calls\\n * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will\\n * automatically change the hostname to `foo-0`. If there is already a server with the\\n * hostname `foo-0`, then it will change the hostname to `foo-1`, and so on.\\n *\\n * Note that there is a maximum limit to the amount of servers you can purchase.\\n *\\n * Returns the hostname of the newly purchased server as a string. If the function\\n * fails to purchase a server, then it will return an empty string. The function will\\n * fail if the arguments passed in are invalid, if the player does not have enough\\n * money to purchase the specified server, or if the player has exceeded the maximum\\n * amount of servers.\\n *\\n * @example\\n * ```ts\\n * ram = 64;\\n * hn = \\\"pserv-\\\";\\n * for (i = 0; i < 5; ++i) {\\n * purchaseServer(hn + i, ram);\\n * }\\n * ```\\n * @param hostname - Host of the purchased server.\\n * @param ram - Amount of RAM of the purchased server. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\\n * @returns The hostname of the newly purchased server.\\n */\\n purchaseServer(hostname: string, ram: number): string;\\n\\n /**\\n * Delete a purchased server.\\n * @remarks\\n * 2.25 GB\\n *\\n * Deletes one of your purchased servers, which is specified by its hostname.\\n *\\n * The hostname argument can be any data type, but it will be converted to a string.\\n * Whitespace is automatically removed from the string. This function will not delete a\\n * server that still has scripts running on it.\\n *\\n * @param host - Host of the server to delete.\\n * @returns True if successful, and false otherwise.\\n */\\n deleteServer(host: string): boolean;\\n\\n /**\\n * Returns an array with the hostnames of all of the servers you have purchased.\\n *\\n * @remarks 2.25 GB\\n * @returns Returns an array with the hostnames of all of the servers you have purchased.\\n */\\n getPurchasedServers(): string[];\\n\\n /**\\n * Returns the maximum number of servers you can purchase.\\n *\\n * @remarks RAM cost: 0.05 GB\\n * @returns Returns the maximum number of servers you can purchase.\\n */\\n getPurchasedServerLimit(): number;\\n\\n /**\\n * Returns the maximum RAM that a purchased server can have.\\n *\\n * @remarks RAM cost: 0.05 GB\\n * @returns Returns the maximum RAM that a purchased server can have.\\n */\\n getPurchasedServerMaxRam(): number;\\n\\n /**\\n * Write data to a file.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function can be used to either write data to a text file (.txt).\\n *\\n * This function will write data to that text file. If the specified text file does not exist,\\n * then it will be created. The third argument mode, defines how the data will be written to\\n * the text file. If *mode is set to “w”, then the data is written in “write” mode which means\\n * that it will overwrite all existing data on the text file. If mode is set to any other value\\n * then the data will be written in “append” mode which means that the data will be added at the\\n * end of the text file.\\n *\\n * @param handle - Port or text file that will be written to.\\n * @param data - Data to write.\\n * @param mode - Defines the write mode. Only valid when writing to text files.\\n */\\n write(handle: string, data?: string[] | number, mode?: \\\"w\\\" | \\\"a\\\"): Promise;\\n\\n /**\\n * Attempt to write to a port.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Attempts to write data to the specified Netscript Port.\\n * If the port is full, the data will not be written.\\n * Otherwise, the data will be written normally.\\n *\\n * @param port - Port or text file that will be written to.\\n * @param data - Data to write.\\n * @returns True if the data is successfully written to the port, and false otherwise.\\n */\\n tryWritePort(port: number, data: string[] | number): Promise;\\n\\n /**\\n * Read content of a file.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is used to read data from a port or from a text file (.txt).\\n *\\n * This function will return the data in the specified text\\n * file. If the text file does not exist, an empty string will be returned.\\n *\\n * @param handle - Port or text file to read from.\\n * @returns Data in the specified text file or port.\\n */\\n read(handle: string): any;\\n\\n /**\\n * Get a copy of the data from a port without popping it.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * This function is used to peek at the data from a port. It returns the\\n * first element in the specified port without removing that element. If\\n * the port is empty, the string “NULL PORT DATA” will be returned.\\n *\\n * @param port - Port to peek. Must be an integer between 1 and 20.\\n * @returns Data in the specified port.\\n */\\n peek(port: number): any;\\n\\n /**\\n * Clear data from a file.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Delete all data from that text file.\\n *\\n * @param handle - Text file to clear.\\n */\\n clear(handle: string): void;\\n\\n /**\\n * Clear data from a port.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Deleta all data from the underlying queue.\\n *\\n * @param handle - Port to clear.\\n */\\n clearPort(handle: number): void;\\n\\n /**\\n * Write data to a port.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Write data to that netscript port.\\n * @returns The data popped off the queue if it was full.\\n */\\n writePort(port: number, data: string | number): Promise;\\n /**\\n * Read data from a port.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Read data from that port. A port is a serialized queue.\\n * This function will remove the first element from that queue and return it.\\n * If the queue is empty, then the string “NULL PORT DATA” will be returned.\\n * @returns the data read.\\n */\\n readPort(port: number): any;\\n\\n /**\\n * Get all data on a port.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Get a handle to a Netscript Port.\\n *\\n * WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.\\n *\\n * @see https://bitburner.readthedocs.io/en/latest/netscript/netscriptmisc.html#netscript-ports\\n * @param port - Port number. Must be an integer between 1 and 20.\\n * @returns Data in the specified port.\\n */\\n getPortHandle(port: number): any[];\\n\\n /**\\n * Delete a file.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Removes the specified file from the current server. This function works for every file\\n * type except message (.msg) files.\\n *\\n * @param name - Filename of file to remove. Must include the extension.\\n * @param host - Host Address of the server on which to delete the file. Optional. Defaults to current server.\\n * @returns True if it successfully deletes the file, and false otherwise.\\n */\\n rm(name: string, host?: string): boolean;\\n\\n /**\\n * Check if any script with a filename is running.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Returns a boolean indicating whether any instance of the specified script is running\\n * on the target server, regardless of its arguments.\\n *\\n * This is different than the isRunning function because it does not try to\\n * identify a specific instance of a running script by its arguments.\\n *\\n * @example\\n * ```ts\\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\\n * scriptRunning(\\\"foo.script\\\", \\\"foodnstuff\\\");\\n * ```\\n * @example\\n * ```ts\\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\\n * scriptRunning(\\\"foo.script\\\", getHostname());\\n * ```\\n * @param script - Filename of script to check. This is case-sensitive.\\n * @param host - Host of target server.\\n * @returns True if the specified script is running, and false otherwise.\\n */\\n scriptRunning(script: string, host: string): boolean;\\n\\n /**\\n * Kill all scripts with a filename.\\n * @remarks\\n * RAM cost: 1 GB\\n *\\n * Kills all scripts with the specified filename on the target server specified by hostname,\\n * regardless of arguments.\\n *\\n * @param script - Filename of script to kill. This is case-sensitive.\\n * @param host - Host of target server.\\n * @returns true if one or more scripts were successfully killed, and false if none were.\\n */\\n scriptKill(script: string, host: string): boolean;\\n\\n /**\\n * Returns the current script name.\\n *\\n * @remarks RAM cost: 0 GB\\n * @returns Current script name.\\n */\\n getScriptName(): string;\\n\\n /**\\n * Get the ram cost of a script.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the amount of RAM required to run the specified script on the target server.\\n * Returns 0 if the script does not exist.\\n *\\n * @param script - Filename of script. This is case-sensitive.\\n * @param host - Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.\\n * @returns Amount of RAM required to run the specified script on the target server, and 0 if the script does not exist.\\n */\\n getScriptRam(script: string, host?: string): number;\\n\\n /**\\n * Get the execution time of a hack() call.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server.\\n * The function takes in an optional hackLvl parameter that can be specified to see what the hack time would be at different hacking levels.\\n *\\n * @param host - Host of target server.\\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\\n * @returns Returns the amount of time in milliseconds it takes to execute the hack Netscript function. Returns Infinity if called on a Hacknet Server.\\n */\\n getHackTime(host: string): number;\\n\\n /**\\n * Get the execution time of a grow() call.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Returns the amount of time in milliseconds it takes to execute the grow Netscript function on the target server.\\n * The function takes in an optional hackLvl parameter that can be specified to see what the grow time would be at different hacking levels.\\n *\\n * @param host - Host of target server.\\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\\n */\\n getGrowTime(host: string): number;\\n\\n /**\\n * Get the execution time of a weaken() call.\\n * @remarks\\n * RAM cost: 0.05 GB\\n *\\n * Returns the amount of time in milliseconds it takes to execute the weaken() Netscript function on the target server.\\n * The function takes in an optional hackLvl parameter that can be specified to see what the weaken time would be at different hacking levels.\\n *\\n * @param host - Host of target server.\\n * @param hackLvl - Optional hacking level for the calculation. Defaults to player’s current hacking level.\\n * @param intLvl - Optional intelligence level for the calculation. Defaults to player’s current intelligence level. (Intelligence is unlocked after obtaining Source-File 5).\\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\\n */\\n getWeakenTime(host: string): number;\\n\\n /**\\n * Get the income of a script.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the amount of income the specified script generates while online\\n * (when the game is open, does not apply for offline income). Remember that\\n * a script is uniquely identified by both its name and its arguments. So for\\n * example if you ran a script with the arguments “foodnstuff” and “5” then\\n * in order to use this function to get that script’s income you must specify\\n * those same arguments in the same order in this function call.\\n *\\n * This function can also be called with no arguments.\\n * If called with no arguments, then this function will return an array of two values.\\n * The first value is the total income (dollar / second) of all of your active scripts\\n * (scripts that are currently running on any server).\\n * The second value is the total income (dollar / second) that you’ve earned from scripts\\n * since you last installed Augmentations.\\n *\\n * @param script - Filename of script.\\n * @param host - Server on which script is running.\\n * @param args - Arguments that the script is running with.\\n * @returns Amount of income the specified script generates while online.\\n */\\n getScriptIncome(script: string, host: string, ...args: string[]): number | [number, number];\\n\\n /**\\n * Get the exp gain of a script.\\n * @remarks\\n * RAM cost: 0.1 GB\\n *\\n * Returns the amount of hacking experience the specified script generates while online\\n * (when the game is open, does not apply for offline experience gains). Remember that a\\n * script is uniquely identified by both its name and its arguments.\\n *\\n * This function can also return the total experience gain rate of all of your active\\n * scripts by running the function with no arguments.\\n *\\n * @param script - Filename of script.\\n * @param host - Server on which script is running.\\n * @param args - Arguments that the script is running with.\\n * @returns Amount of hacking experience the specified script generates while online.\\n */\\n getScriptExpGain(script: string, host: string, ...args: string[]): number;\\n\\n /**\\n * Returns the amount of time in milliseconds that have passed since you last installed Augmentations.\\n *\\n * @remarks RAM cost: 0.05 GB\\n * @returns Time in milliseconds that have passed since you last installed Augmentations.\\n */\\n getTimeSinceLastAug(): number;\\n\\n /**\\n * Format a string.\\n *\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * see: https://github.com/alexei/sprintf.js\\n * @param format - String to format.\\n * @param args - Formating arguments.\\n * @returns Formated text.\\n */\\n sprintf(format: string, ...args: string[]): string;\\n\\n /**\\n * Format a string with an array of arguments.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * see: https://github.com/alexei/sprintf.js\\n * @param format - String to format.\\n * @param args - Formating arguments.\\n * @returns Formated text.\\n */\\n vsprintf(format: string, args: string[]): string;\\n\\n /**\\n * Format a number\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Converts a number into a string with the specified formatter.\\n * This uses the numeraljs library, so the formatters must be compatible with that.\\n * This is the same function that the game itself uses to display numbers.\\n *\\n * see: http://numeraljs.com/\\n * @param n - Number to format.\\n * @param format - Formatter.\\n * @returns Formated number.\\n */\\n nFormat(n: number, format: string): number;\\n\\n /**\\n * Format time to readable string\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * @param milliseconds - Number of millisecond to format.\\n * @param milliPrecision - Format time with subsecond precision, defaults to false.\\n * @returns The formatted time.\\n */\\n tFormat(milliseconds: number, milliPrecision?: boolean): string;\\n\\n /**\\n * Prompt the player with a Yes/No modal.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Prompts the player with a dialog box with two options: “Yes” and “No”.\\n * This function will return true if the player click “Yes” and false if\\n * the player clicks “No”. The script’s execution is halted until the player\\n * selects one of the options.\\n *\\n * @param txt - Text to appear in the prompt dialog box.\\n * @returns True if the player click “Yes” and false if the player clicks “No”.\\n */\\n prompt(txt: string): Promise;\\n\\n /**\\n * Open up a message box.\\n * @param msg - Message to alert.\\n */\\n alert(msg: any): void;\\n\\n /**\\n * Queue a toast (bottom-right notification).\\n * @param msg - Message in the toast.\\n * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success.\\n */\\n toast(msg: any, variant?: string): void;\\n\\n /**\\n * Download a file from the internet.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Retrieves data from a URL and downloads it to a file on the specified server.\\n * The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt).\\n * If the file already exists, it will be overwritten by this command.\\n * Note that it will not be possible to download data from many websites because they\\n * do not allow cross-origin resource sharing (CORS).\\n *\\n * IMPORTANT: This is an asynchronous function that returns a Promise.\\n * The Promise’s resolved value will be a boolean indicating whether or not the data was\\n * successfully retrieved from the URL. Because the function is async and returns a Promise,\\n * it is recommended you use wget in NetscriptJS (Netscript 2.0).\\n *\\n * In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep).\\n * wget will still work in Netscript 1.0, but the functions execution will not be synchronous\\n * (i.e. it may not execute when you expect/want it to).\\n * Furthermore, since Promises are not supported in ES5,\\n * you will not be able to process the returned value of wget in Netscript 1.0.\\n *\\n * @example\\n * ```ts\\n * wget(\\\"https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md\\\", \\\"game_readme.txt\\\");\\n * ```\\n * @param url - URL to pull data from.\\n * @param target - Filename to write data to. Must be script or text file.\\n * @param host - Optional hostname/ip of server for target file.\\n * @returns True if the data was successfully retrieved from the URL, false otherwise.\\n */\\n wget(url: string, target: string, host?: string): Promise;\\n\\n /**\\n * Returns the amount of Faction favor required to be able to donate to a faction.\\n *\\n * @remarks RAM cost: 0.1 GB\\n * @returns Amount of Faction favor required to be able to donate to a faction.\\n */\\n getFavorToDonate(): number;\\n\\n /**\\n * Get the current Bitnode multipliers.\\n * @remarks\\n * RAM cost: 4 GB\\n *\\n * Returns an object containing the current BitNode multipliers.\\n * This function requires Source-File 5 in order to run.\\n * The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%).\\n * The multipliers represent the difference between the current BitNode and\\n * the original BitNode (BitNode-1).\\n *\\n * For example, if the CrimeMoney multiplier has a value of 0.1, then that means\\n * that committing crimes in the current BitNode will only give 10% of the money\\n * you would have received in BitNode-1.\\n *\\n * @example\\n * ```ts\\n * mults = getBitNodeMultipliers();\\n * print(mults.ServerMaxMoney);\\n * print(mults.HackExpGain);\\n * ```\\n * @returns Object containing the current BitNode multipliers.\\n */\\n getBitNodeMultipliers(): BitNodeMultipliers;\\n\\n /**\\n * Get a list of acquired Source-Files.\\n * @remarks\\n * RAM cost: 5 GB\\n *\\n * Returns an array of source files\\n *\\n * @returns Array containing an object with number and level of the source file.\\n */\\n getOwnedSourceFiles(): SourceFileLvl[];\\n\\n /**\\n * Get information about the player.\\n * @returns Player info\\n */\\n getPlayer(): Player;\\n\\n /**\\n * Add callback function when the script dies\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * NS2 exclusive\\n *\\n * Add callback to be executed when the script dies.\\n */\\n atExit(f: () => void): void;\\n\\n /**\\n * Parse command line flags.\\n * @remarks\\n * RAM cost: 0 GB\\n *\\n * Allows unix like flag parsing.\\n * @example\\n * ```ts\\n * // example.script\\n * var data = flags([\\n * ['delay', 0], // a default number means this flag is a number\\n * ['server', 'foodnstuff'], // a default string means this flag is a string\\n * ['exclude', []], // a default array means this flag is a default array of string\\n * ['help', false], // a default boolean means this flag is a boolean\\n * ]);\\n * tprint(data);\\n *\\n * // [home ~/]> run example.script\\n * // {\\\"_\\\":[],\\\"delay\\\":0,\\\"server\\\":\\\"foodnstuff\\\",\\\"exclude\\\":[],\\\"help\\\":false}\\n * // [home ~/]> run example.script --delay 3000\\n * // {\\\"_\\\":[],\\\"server\\\":\\\"foodnstuff\\\",\\\"exclude\\\":[],\\\"help\\\":false,\\\"delay\\\":3000}\\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi\\n * // {\\\"_\\\":[],\\\"exclude\\\":[],\\\"help\\\":false,\\\"delay\\\":3000,\\\"server\\\":\\\"harakiri-sushi\\\"}\\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world\\n * // {\\\"_\\\":[\\\"hello\\\",\\\"world\\\"],\\\"exclude\\\":[],\\\"help\\\":false,\\\"delay\\\":3000,\\\"server\\\":\\\"harakiri-sushi\\\"}\\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b\\n * // {\\\"_\\\":[\\\"hello\\\",\\\"world\\\"],\\\"help\\\":false,\\\"delay\\\":3000,\\\"server\\\":\\\"harakiri-sushi\\\",\\\"exclude\\\":[\\\"a\\\",\\\"b\\\"]}\\n * // [home ~/]> run example.script --help\\n * // {\\\"_\\\":[],\\\"delay\\\":0,\\\"server\\\":\\\"foodnstuff\\\",\\\"exclude\\\":[],\\\"help\\\":true}\\n * ```\\n */\\n flags(schema: [string, string | number | boolean | string[]][]): any;\\n}\\n\\n/**\\n * Corporation Office API\\n * @remarks\\n * Requires the Office API upgrade from your corporation.\\n * @public\\n */\\nexport interface OfficeAPI {\\n /**\\n * Assign an employee to a job.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param employeeName - name of the employee\\n * @param job - Name of the job.\\n * @returns A promise that is fulfilled when the assignment is complete.\\n */\\n assignJob(divisionName: string, cityName: string, employeeName: string, job: string): Promise;\\n /**\\n * Assign an employee to a job.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @returns The newly hired employee, if any\\n */\\n hireEmployee(divisionName: string, cityName: string): Employee | undefined;\\n /**\\n * Upgrade office size.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param size - Amount of positions to open\\n */\\n upgradeOfficeSize(divisionName: string, cityName: string, size: number): void;\\n /**\\n * Assign an employee to a job.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param costPerEmployee - Amount to spend per employee.\\n * @returns Amount of happiness increased.\\n */\\n throwParty(divisionName: string, cityName: string, costPerEmployee: number): Promise;\\n /**\\n * Buy coffee for your employees\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @returns A promise that is fulfilled when the coffee is served.\\n */\\n buyCoffee(divisionName: string, cityName: string): Promise;\\n /**\\n * Hire AdVert.\\n * @param divisionName - Name of the division\\n */\\n hireAdVert(divisionName: string): void;\\n /**\\n * Hire AdVert.\\n * @param divisionName - Name of the division\\n * @param researchName - Name of the research\\n */\\n research(divisionName: string, researchName: string): void;\\n /**\\n * Get data about an office\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @returns Office data\\n */\\n getOffice(divisionName: string, cityName: string): Office;\\n /**\\n * Get data about an employee\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param employeeName - Name of the employee\\n * @returns Employee data\\n */\\n getEmployee(divisionName: string, cityName: string, employeeName: string): Employee;\\n}\\n\\n/**\\n * Corporation Warehouse API\\n * @remarks\\n * Requires the Warehouse API upgrade from your corporation.\\n * @public\\n */\\nexport interface WarehouseAPI {\\n /**\\n * Set material sell data.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param materialName - Name of the material\\n * @param amt - Amount to sell, can be \\\"MAX\\\"\\n * @param price - Price to sell, can be \\\"MP\\\"\\n */\\n sellMaterial(divisionName: string, cityName: string, materialName: string, amt: string, price: string): void;\\n /**\\n * Set product sell data.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param productName - Name of the product\\n * @param amt - Amount to sell, can be \\\"MAX\\\"\\n * @param price - Price to sell, can be \\\"MP\\\"\\n * @param all - Sell in all city\\n */\\n sellProduct(\\n divisionName: string,\\n cityName: string,\\n productName: string,\\n amt: string,\\n price: string,\\n all: boolean,\\n ): void;\\n /**\\n * Discontinue a product.\\n * @param divisionName - Name of the division\\n * @param productName - Name of the product\\n */\\n discontinueProduct(divisionName: string, productName: string): void;\\n /**\\n * Set smart supply\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param enabled - smart supply enabled\\n */\\n setSmartSupply(divisionName: string, cityName: string, enabled: boolean): void;\\n /**\\n * Set material buy data\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param materialName - Name of the material\\n * @param amt - Amount of material to buy\\n */\\n buyMaterial(divisionName: string, cityName: string, materialName: string, amt: number): void;\\n /**\\n * Get warehouse data\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @returns warehouse data\\n */\\n getWarehouse(divisionName: string, cityName: string): Warehouse;\\n /**\\n * Get product data\\n * @param divisionName - Name of the division\\n * @param productName - Name of the product\\n * @returns product data\\n */\\n getProduct(divisionName: string, productName: string): Product;\\n /**\\n * Get material data\\n * @param divisionName - Name of the division\\n * @param materialName - Name of the material\\n * @returns material data\\n */\\n getMaterial(divisionName: string, cityName: string, materialName: string): Material;\\n /**\\n * Set market TA 1 for a material.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param materialName - Name of the material\\n * @param on - market ta enabled\\n */\\n setMaterialMarketTA1(divisionName: string, cityName: string, materialName: string, on: boolean): void;\\n /**\\n * Set market TA 2 for a material.\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param materialName - Name of the material\\n * @param on - market ta enabled\\n */\\n setMaterialMarketTA2(divisionName: string, cityName: string, materialName: string, on: boolean): void;\\n /**\\n * Set market TA 1 for a product.\\n * @param divisionName - Name of the division\\n * @param productName - Name of the product\\n * @param on - market ta enabled\\n */\\n setProductMarketTA1(divisionName: string, productName: string, on: boolean): void;\\n /**\\n * Set market TA 2 for a product.\\n * @param divisionName - Name of the division\\n * @param productName - Name of the product\\n * @param on - market ta enabled\\n */\\n setProductMarketTA2(divisionName: string, productName: string, on: boolean): void;\\n /**\\n * Set material export data\\n * @param sourceDivision - Source division\\n * @param sourceCity - Source city\\n * @param targetDivision - Target division\\n * @param targetCity - Target city\\n * @param materialName - Name of the material\\n * @param amt - Amount of material to export.\\n */\\n exportMaterial(\\n sourceDivision: string,\\n sourceCity: string,\\n targetDivision: string,\\n targetCity: string,\\n materialName: string,\\n amt: number,\\n ): void;\\n /**\\n * Cancel material export\\n * @param sourceDivision - Source division\\n * @param sourceCity - Source city\\n * @param targetDivision - Target division\\n * @param targetCity - Target city\\n * @param materialName - Name of the material\\n * @param amt - Amount of material to export.\\n */\\n cancelExportMaterial(\\n sourceDivision: string,\\n sourceCity: string,\\n targetDivision: string,\\n targetCity: string,\\n materialName: string,\\n amt: number,\\n ): void;\\n /**\\n * Purchase warehouse for a new city\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n */\\n purchaseWarehouse(divisionName: string, cityName: string): void;\\n /**\\n * Upgrade warehouse\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n */\\n upgradeWarehouse(divisionName: string, cityName: string): void;\\n /**\\n * Create a new product\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n * @param productName - Name of the product\\n * @param designInvest - Amount to invest for the design of the product.\\n * @param marketingInvest - Amount to invest for the marketing of the product.\\n */\\n makeProduct(\\n divisionName: string,\\n cityName: string,\\n productName: string,\\n designInvest: number,\\n marketingInvest: number,\\n ): void;\\n}\\n\\n/**\\n * Corporation API\\n * @public\\n */\\nexport interface Corporation extends WarehouseAPI, OfficeAPI {\\n /**\\n * Get corporation data\\n * @returns Corporation data\\n */\\n getCorporation(): CorporationInfo;\\n /**\\n * Get division data\\n * @param divisionName - Name of the division\\n * @returns Division data\\n */\\n getDivision(divisionName: string): Division;\\n /**\\n * Expand to a new industry\\n * @param industryType - Name of the industry\\n * @param divisionName - Name of the division\\n */\\n expandIndustry(industryType: string, divisionName: string): void;\\n /**\\n * Expand to a new city\\n * @param divisionName - Name of the division\\n * @param cityName - Name of the city\\n */\\n expandCity(divisionName: string, cityName: string): void;\\n /**\\n * Unlock an upgrade.\\n * @param upgradeName - Name of the upgrade\\n */\\n unlockUpgrade(upgradeName: string): void;\\n /**\\n * Level an upgrade.\\n * @param upgradeName - Name of the upgrade\\n */\\n levelUpgrade(upgradeName: string): void;\\n /**\\n * Issue dividends\\n * @param percent - Percent of profit to issue as dividends.\\n */\\n issueDividends(percent: number): void;\\n}\\n\\n/**\\n * General info about a corporation\\n * @public\\n */\\ninterface CorporationInfo {\\n /** Name of the corporation */\\n name: string;\\n /** Funds available */\\n funds: number;\\n /** Revenue per second this cycle */\\n revenue: number;\\n /** Expenses per second this cycle */\\n expenses: number;\\n /** Is the company is public */\\n public: boolean;\\n /** Total number of shares issues by this corporation */\\n totalShares: number;\\n /** Amount of share owned */\\n numShares: number;\\n /** Cooldown until shares can be sold again */\\n shareSaleCooldown: number;\\n /** Amount of shares issued */\\n issuedShares: number;\\n /** Price of the shares */\\n sharePrice: number;\\n /** State of the corporation, like PRODUCTION or EXPORT */\\n state: string;\\n}\\n\\n/**\\n * Employee in an office\\n * @public\\n */\\ninterface Employee {\\n /** Name of the employee */\\n name: string;\\n /** Morale */\\n mor: number;\\n /** Happiness */\\n hap: number;\\n /** Energy */\\n ene: number;\\n int: number;\\n cha: number;\\n exp: number;\\n cre: number;\\n eff: number;\\n /** Salary */\\n sal: number;\\n /** City */\\n loc: string;\\n /** Current job */\\n pos: string;\\n}\\n\\n/**\\n * Product in a warehouse\\n * @public\\n */\\ninterface Product {\\n /** Name of the product */\\n name: string;\\n /** Demand for the product */\\n dmd: number;\\n /** Competition for the product */\\n cmp: number;\\n /** Production cost */\\n pCost: number;\\n /** Sell cost, can be \\\"MP+5\\\" */\\n sCost: string | number;\\n}\\n\\n/**\\n * Material in a warehouse\\n * @public\\n */\\ninterface Material {\\n /** Name of the material */\\n name: string;\\n /** Amount of material */\\n qty: number;\\n /** Quality of the material */\\n qlt: number;\\n}\\n\\n/**\\n * Warehouse for a division in a city\\n * @public\\n */\\ninterface Warehouse {\\n /** Amount of size upgrade bought */\\n level: number;\\n /** City in which the warehouse is located */\\n loc: string;\\n /** Total space in the warehouse */\\n size: number;\\n /** Used space in the warehouse */\\n sizeUsed: number;\\n}\\n\\n/**\\n * Office for a division in a city.\\n * @public\\n */\\ninterface Office {\\n /** City of the office */\\n loc: string;\\n /** Maximum number of employee */\\n size: number;\\n /** Minimum amount of energy of the employees */\\n minEne: number;\\n /** Maximum amount of energy of the employees */\\n maxEne: number;\\n /** Minimum happiness of the employees */\\n minHap: number;\\n /** Maximum happiness of the employees */\\n maxHap: number;\\n /** Maximum morale of the employees */\\n maxMor: number;\\n /** Name of all the employees */\\n employees: string[];\\n /** Positions of the employees */\\n employeeProd: EmployeeJobs;\\n}\\n\\n/**\\n * Object representing the number of employee in each job.\\n * @public\\n */\\ninterface EmployeeJobs {\\n Operations: number;\\n Engineer: number;\\n Business: number;\\n Management: number;\\n \\\"Research & Development\\\": number;\\n Training: number;\\n Unassigned: number;\\n}\\n\\n/**\\n * Corporation division\\n * @public\\n */\\ninterface Division {\\n /** Name of the division */\\n name: string;\\n /** Type of division, like Aggriculture */\\n type: string;\\n /** Awareness of the division */\\n awareness: number;\\n /** Popularity of the division */\\n popularity: number;\\n /** Production multiplier */\\n prodMult: number;\\n /** Amount of research in that division */\\n research: number;\\n /** Revenue last cycle */\\n lastCycleRevenue: number;\\n /** Expenses last cycle */\\n lastCycleExpenses: number;\\n /** Revenue this cycle */\\n thisCycleRevenue: number;\\n /** Expenses this cycle */\\n thisCycleExpenses: number;\\n /** All research bought */\\n upgrades: number[];\\n /** Cities in which this division has expanded */\\n cities: string[];\\n}\\n\";","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Milestones } from \"../Milestones\";\nimport { Milestone } from \"../Milestone\";\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nfunction highestMilestone(p: IPlayer, milestones: Milestone[]): number {\n let n = -1;\n for (let i = 0; i < milestones.length; i++) {\n if (milestones[i].fulfilled(p)) n = i;\n }\n\n return n;\n}\n\nexport function MilestonesRoot(props: IProps): JSX.Element {\n const n = highestMilestone(props.player, Milestones);\n const milestones = Milestones.map((milestone: Milestone, i: number) => {\n if (i <= n + 1) {\n return (\n \n [{milestone.fulfilled(props.player) ? \"x\" : \" \"}] {milestone.title}\n \n );\n }\n });\n return (\n <>\n Milestones\n \n \n Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset\n when you install Augmentations.\n \n
    \n\n Completing fl1ght.exe\n {milestones}\n
    \n \n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport { Link as MuiLink } from \"@mui/material\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Box from \"@mui/material/Box\";\nimport { ITerminal, Output, Link, RawOutput } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { TerminalInput } from \"./TerminalInput\";\nimport { TerminalEvents, TerminalClearEvents } from \"../TerminalEvents\";\nimport { BitFlumeModal } from \"../../BitNode/ui/BitFlumeModal\";\nimport { CodingContractModal } from \"../../ui/React/CodingContractModal\";\n\nimport _ from \"lodash\";\n\ninterface IActionTimerProps {\n terminal: ITerminal;\n}\n\nfunction ActionTimer({ terminal }: IActionTimerProps): React.ReactElement {\n return (\n \n {terminal.getProgressText()}\n \n );\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n nopadding: {\n padding: theme.spacing(0),\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\",\n },\n\n success: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.colors.success,\n },\n error: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.error.main,\n },\n primary: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.primary.main,\n },\n info: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.info.main,\n },\n warning: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0),\n color: theme.palette.warning.main,\n },\n }),\n);\n\ninterface IProps {\n terminal: ITerminal;\n router: IRouter;\n player: IPlayer;\n}\n\nexport function TerminalRoot({ terminal, router, player }: IProps): React.ReactElement {\n const scrollHook = useRef(null);\n const setRerender = useState(0)[1];\n const [key, setKey] = useState(0);\n function rerender(): void {\n setRerender((old) => old + 1);\n }\n\n function clear(): void {\n setKey((key) => key + 1);\n }\n\n useEffect(() => TerminalEvents.subscribe(_.debounce(async () => rerender(), 25, { maxWait: 50 })), []);\n useEffect(() => TerminalClearEvents.subscribe(_.debounce(async () => clear(), 25, { maxWait: 50 })), []);\n\n function doScroll(): void {\n const hook = scrollHook.current;\n if (hook !== null) {\n setTimeout(() => hook.scrollIntoView(true), 50);\n }\n }\n\n doScroll();\n\n useEffect(() => {\n setTimeout(doScroll, 50);\n }, []);\n\n function lineClass(s: string): string {\n if (s === \"error\") {\n return classes.error;\n }\n if (s === \"success\") {\n return classes.success;\n }\n if (s === \"info\") {\n return classes.info;\n }\n if (s === \"warn\") {\n return classes.warning;\n }\n\n return classes.primary;\n }\n\n const classes = useStyles();\n return (\n <>\n \n \n {terminal.outputHistory.map((item, i) => {\n if (item instanceof Output)\n return (\n \n \n {item.text}\n \n \n );\n if (item instanceof RawOutput)\n return (\n \n \n {item.raw}\n \n \n );\n if (item instanceof Link)\n return (\n \n {item.dashes}> \n terminal.connectToServer(player, item.hostname)}\n >\n {item.hostname}\n \n \n );\n })}\n\n {terminal.action !== null && (\n \n {\" \"}\n \n )}\n \n
    \n
    \n \n \n \n \n \n \n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { determineAllPossibilitiesForTabCompletion } from \"../determineAllPossibilitiesForTabCompletion\";\nimport { tabCompletion } from \"../tabCompletion\";\nimport { Settings } from \"../../Settings/Settings\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n margin: theme.spacing(0),\n },\n input: {\n backgroundColor: \"#000\",\n },\n nopadding: {\n padding: theme.spacing(0),\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0),\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\",\n },\n }),\n);\n\ninterface IProps {\n terminal: ITerminal;\n router: IRouter;\n player: IPlayer;\n}\n// Save command in case we de-load this screen.\nlet command = \"\";\n\nexport function TerminalInput({ terminal, router, player }: IProps): React.ReactElement {\n const terminalInput = useRef(null);\n\n const [value, setValue] = useState(command);\n const [possibilities, setPossibilities] = useState([]);\n const classes = useStyles();\n\n function saveValue(value: string): void {\n command = value;\n setValue(value);\n }\n\n function handleValueChange(event: React.ChangeEvent): void {\n saveValue(event.target.value);\n setPossibilities([]);\n }\n\n function modifyInput(mod: string): void {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n const inputText = ref.value;\n\n switch (mod.toLowerCase()) {\n case \"backspace\":\n if (start > 0 && start <= inputLength + 1) {\n saveValue(inputText.substr(0, start - 1) + inputText.substr(start));\n }\n break;\n case \"deletewordbefore\": // Delete rest of word before the cursor\n for (let delStart = start - 1; delStart > 0; --delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, delStart) + inputText.substr(start));\n return;\n }\n }\n break;\n case \"deletewordafter\": // Delete rest of word after the cursor\n for (let delStart = start + 1; delStart <= value.length + 1; ++delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, start) + inputText.substr(delStart));\n return;\n }\n }\n break;\n case \"clearafter\": // Deletes everything after cursor\n break;\n case \"clearbefore:\": // Deleetes everything before cursor\n break;\n }\n }\n\n function moveTextCursor(loc: string): void {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n\n switch (loc.toLowerCase()) {\n case \"home\":\n ref.setSelectionRange(0, 0);\n break;\n case \"end\":\n ref.setSelectionRange(inputLength, inputLength);\n break;\n case \"prevchar\":\n if (start > 0) {\n ref.setSelectionRange(start - 1, start - 1);\n }\n break;\n case \"prevword\":\n for (let i = start - 2; i >= 0; --i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i + 1, i + 1);\n return;\n }\n }\n ref.setSelectionRange(0, 0);\n break;\n case \"nextchar\":\n ref.setSelectionRange(start + 1, start + 1);\n break;\n case \"nextword\":\n for (let i = start + 1; i <= inputLength; ++i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i, i);\n return;\n }\n }\n ref.setSelectionRange(inputLength, inputLength);\n break;\n default:\n console.warn(\"Invalid loc argument in Terminal.moveTextCursor()\");\n break;\n }\n }\n\n // Catch all key inputs and redirect them to the terminal.\n useEffect(() => {\n function keyDown(this: Document, event: KeyboardEvent): void {\n if (terminal.contractOpen) return;\n if (terminal.action !== null && event.keyCode === KEY.C && event.ctrlKey) {\n terminal.finishAction(router, player, true);\n return;\n }\n const ref = terminalInput.current;\n if (event.ctrlKey || event.metaKey) return;\n if (event.keyCode === KEY.C && (event.ctrlKey || event.metaKey)) return; // trying to copy\n\n if (ref) ref.focus();\n }\n document.addEventListener(\"keydown\", keyDown);\n return () => document.removeEventListener(\"keydown\", keyDown);\n });\n\n async function onKeyDown(event: React.KeyboardEvent): Promise {\n // Run command.\n if (event.keyCode === KEY.ENTER && value !== \"\") {\n event.preventDefault();\n terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`);\n terminal.executeCommands(router, player, value);\n saveValue(\"\");\n return;\n }\n\n // Autocomplete\n if (event.keyCode === KEY.TAB && value !== \"\") {\n event.preventDefault();\n\n let copy = value;\n const semiColonIndex = copy.lastIndexOf(\";\");\n if (semiColonIndex !== -1) {\n copy = copy.slice(semiColonIndex + 1);\n }\n\n copy = copy.trim();\n copy = copy.replace(/\\s\\s+/g, \" \");\n\n const commandArray = copy.split(\" \");\n let index = commandArray.length - 2;\n if (index < -1) {\n index = 0;\n }\n const allPos = await determineAllPossibilitiesForTabCompletion(player, copy, index, terminal.cwd());\n if (allPos.length == 0) {\n return;\n }\n\n let arg = \"\";\n let command = \"\";\n if (commandArray.length == 0) {\n return;\n }\n if (commandArray.length == 1) {\n command = commandArray[0];\n } else if (commandArray.length == 2) {\n command = commandArray[0];\n arg = commandArray[1];\n } else if (commandArray.length == 3) {\n command = commandArray[0] + \" \" + commandArray[1];\n arg = commandArray[2];\n } else {\n arg = commandArray.pop() + \"\";\n command = commandArray.join(\" \");\n }\n\n let newValue = tabCompletion(command, arg, allPos, value);\n if (typeof newValue === \"string\" && newValue !== \"\") {\n if (!newValue.endsWith(\" \") && !newValue.endsWith(\"/\") && allPos.length === 1) newValue += \" \";\n saveValue(newValue);\n }\n if (Array.isArray(newValue)) {\n setPossibilities(newValue);\n }\n }\n\n // Clear screen.\n if (event.keyCode === KEY.L && event.ctrlKey) {\n event.preventDefault();\n terminal.clear();\n }\n\n // Select previous command.\n if (event.keyCode === KEY.UPARROW || (Settings.EnableBashHotkeys && event.keyCode === KEY.P && event.ctrlKey)) {\n if (Settings.EnableBashHotkeys) {\n event.preventDefault();\n }\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n if (i != 0) {\n --terminal.commandHistoryIndex;\n }\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n const ref = terminalInput.current;\n if (ref) {\n setTimeout(function () {\n ref.selectionStart = ref.selectionEnd = 10000;\n }, 10);\n }\n }\n\n // Select next command\n if (event.keyCode === KEY.DOWNARROW || (Settings.EnableBashHotkeys && event.keyCode === KEY.M && event.ctrlKey)) {\n if (Settings.EnableBashHotkeys) {\n event.preventDefault();\n }\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n // Latest command, put nothing\n if (i == len || i == len - 1) {\n terminal.commandHistoryIndex = len;\n saveValue(\"\");\n } else {\n ++terminal.commandHistoryIndex;\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n }\n }\n\n // Extra Bash Emulation Hotkeys, must be enabled through options\n if (Settings.EnableBashHotkeys) {\n if (event.keyCode === KEY.A && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"home\");\n }\n\n if (event.keyCode === KEY.E && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"end\");\n }\n\n if (event.keyCode === KEY.B && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"prevchar\");\n }\n\n if (event.keyCode === KEY.B && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"prevword\");\n }\n\n if (event.keyCode === KEY.F && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"nextchar\");\n }\n\n if (event.keyCode === KEY.F && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"nextword\");\n }\n\n if ((event.keyCode === KEY.H || event.keyCode === KEY.D) && event.ctrlKey) {\n modifyInput(\"backspace\");\n event.preventDefault();\n }\n\n // TODO AFTER THIS:\n // alt + d deletes word after cursor\n // ^w deletes word before cursor\n // ^k clears line after cursor\n // ^u clears line before cursor\n }\n }\n\n return (\n <>\n 0 ? (\n <>\n \n Possible autocomplete candidate:\n \n \n {possibilities.join(\" \")}\n \n \n ) : (\n \"\"\n )\n }\n >\n \n [{player.getCurrentServer().hostname} ~{terminal.cwd()}]> \n \n ),\n spellCheck: false,\n onKeyDown: onKeyDown,\n }}\n >
    \n \n \n );\n}\n","import { evaluateDirectoryPath, getAllParentDirectories } from \"./DirectoryHelpers\";\nimport { getSubdirectories } from \"./DirectoryServerHelpers\";\n\nimport { Aliases, GlobalAliases, substituteAliases } from \"../Alias\";\nimport { DarkWebItems } from \"../DarkWeb/DarkWebItems\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\nimport { ParseCommand, ParseCommands } from \"./Parser\";\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\nimport { compile } from \"../NetscriptJSEvaluator\";\nimport { Flags } from \"../NetscriptFunctions/Flags\";\nimport * as libarg from \"arg\";\n\n// An array of all Terminal commands\nconst commands = [\n \"alias\",\n \"analyze\",\n \"backdoor\",\n \"cat\",\n \"cd\",\n \"check\",\n \"clear\",\n \"cls\",\n \"connect\",\n \"cp\",\n \"download\",\n \"expr\",\n \"free\",\n \"grow\",\n \"hack\",\n \"help\",\n \"home\",\n \"hostname\",\n \"ifconfig\",\n \"kill\",\n \"killall\",\n \"ls\",\n \"lscpu\",\n \"mem\",\n \"mv\",\n \"nano\",\n \"ps\",\n \"rm\",\n \"run\",\n \"scan-analyze\",\n \"scan\",\n \"scp\",\n \"sudov\",\n \"tail\",\n \"theme\",\n \"top\",\n \"weaken\",\n];\n\nexport async function determineAllPossibilitiesForTabCompletion(\n p: IPlayer,\n input: string,\n index: number,\n currPath = \"\",\n): Promise {\n input = substituteAliases(input);\n let allPos: string[] = [];\n allPos = allPos.concat(Object.keys(GlobalAliases));\n const currServ = p.getCurrentServer();\n const homeComputer = p.getHomeComputer();\n\n let parentDirPath = \"\";\n let evaledParentDirPath: string | null = null;\n\n // Helper functions\n function addAllCodingContracts(): void {\n for (const cct of currServ.contracts) {\n allPos.push(cct.fn);\n }\n }\n\n function addAllLitFiles(): void {\n for (const file of currServ.messages) {\n if (!file.endsWith(\".msg\")) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages(): void {\n for (const file of currServ.messages) {\n if (file.endsWith(\".msg\")) {\n allPos.push(file);\n }\n }\n }\n\n function addAllPrograms(): void {\n for (const program of homeComputer.programs) {\n allPos.push(program);\n }\n }\n\n function addAllScripts(): void {\n for (const script of currServ.scripts) {\n const res = processFilepath(script.filename);\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllTextFiles(): void {\n for (const txt of currServ.textFiles) {\n const res = processFilepath(txt.fn);\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllDirectories(): void {\n // Directories are based on the currently evaluated path\n const subdirs = getSubdirectories(currServ, evaledParentDirPath == null ? \"/\" : evaledParentDirPath);\n\n for (let i = 0; i < subdirs.length; ++i) {\n const assembledDirPath = evaledParentDirPath == null ? subdirs[i] : evaledParentDirPath + subdirs[i];\n const res = processFilepath(assembledDirPath);\n if (res != null) {\n subdirs[i] = res;\n }\n }\n\n allPos = allPos.concat(subdirs);\n }\n\n // Convert from the real absolute path back to the original path used in the input\n function convertParentPath(filepath: string): string {\n if (parentDirPath == null || evaledParentDirPath == null) {\n console.warn(`convertParentPath() called when paths are null`);\n return filepath;\n }\n\n if (!filepath.startsWith(evaledParentDirPath)) {\n console.warn(\n `convertParentPath() called for invalid path. (filepath=${filepath}) (evaledParentDirPath=${evaledParentDirPath})`,\n );\n return filepath;\n }\n\n return parentDirPath + filepath.slice(evaledParentDirPath.length);\n }\n\n // Given an a full, absolute filepath, converts it to the proper value\n // for autocompletion purposes\n function processFilepath(filepath: string): string | null {\n if (evaledParentDirPath) {\n if (filepath.startsWith(evaledParentDirPath)) {\n return convertParentPath(filepath);\n }\n } else if (parentDirPath !== \"\") {\n // If the parent directory is the root directory, but we're not searching\n // it from the root directory, we have to add the original path\n let t_parentDirPath = parentDirPath;\n if (!t_parentDirPath.endsWith(\"/\")) {\n t_parentDirPath += \"/\";\n }\n return parentDirPath + filepath;\n } else {\n return filepath;\n }\n\n return null;\n }\n\n function isCommand(cmd: string): boolean {\n let t_cmd = cmd;\n if (!t_cmd.endsWith(\" \")) {\n t_cmd += \" \";\n }\n\n return input.startsWith(t_cmd);\n }\n\n /**\n * If the command starts with './' and the index == -1, then the user\n * has input ./partialexecutablename so autocomplete the script or program.\n * Put './' in front of each script/executable\n */\n if (isCommand(\"./\") && index == -1) {\n //All programs and scripts\n for (let i = 0; i < currServ.scripts.length; ++i) {\n allPos.push(\"./\" + currServ.scripts[i].filename);\n }\n\n //Programs are on home computer\n for (let i = 0; i < homeComputer.programs.length; ++i) {\n allPos.push(\"./\" + homeComputer.programs[i]);\n }\n return allPos;\n }\n\n // Autocomplete the command\n if (index === -1) {\n return commands.concat(Object.keys(Aliases)).concat(Object.keys(GlobalAliases));\n }\n\n // Since we're autocompleting an argument and not a command, the argument might\n // be a file/directory path. We have to account for that when autocompleting\n const commandArray = input.split(\" \");\n if (commandArray.length === 0) {\n console.warn(`Tab autocompletion logic reached invalid branch`);\n return allPos;\n }\n const arg = commandArray[commandArray.length - 1];\n parentDirPath = getAllParentDirectories(arg);\n evaledParentDirPath = evaluateDirectoryPath(parentDirPath, currPath);\n if (evaledParentDirPath === \"/\") {\n evaledParentDirPath = null;\n } else if (evaledParentDirPath == null) {\n return allPos; // Invalid path\n } else {\n evaledParentDirPath += \"/\";\n }\n\n if (isCommand(\"buy\")) {\n const options = [];\n for (const i in DarkWebItems) {\n const item = DarkWebItems[i];\n options.push(item.program);\n }\n\n return options.concat(Object.keys(GlobalAliases));\n }\n\n if (isCommand(\"scp\") && index === 1) {\n for (const server of GetAllServers()) {\n allPos.push(server.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"scp\") && index === 0) {\n addAllScripts();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"cp\") && index === 0) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"connect\")) {\n // All network connections\n for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {\n const serv = GetServer(currServ.serversOnNetwork[i]);\n if (serv == null) {\n continue;\n }\n allPos.push(serv.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"rm\")) {\n addAllScripts();\n addAllPrograms();\n addAllLitFiles();\n addAllTextFiles();\n addAllCodingContracts();\n addAllDirectories();\n\n return allPos;\n }\n\n async function scriptAutocomplete(): Promise {\n if (!isCommand(\"run\") && !isCommand(\"tail\") && !isCommand(\"kill\")) return;\n const commands = ParseCommands(input);\n if (commands.length === 0) return;\n const command = ParseCommand(commands[commands.length - 1]);\n const filename = command[1] + \"\";\n if (!isScriptFilename(filename)) return; // Not a script.\n if (filename.endsWith(\".script\")) return; // Doesn't work with ns1.\n const script = currServ.scripts.find((script) => script.filename === filename);\n if (!script) return; // Doesn't exist.\n if (!script.module) {\n await compile(script, currServ.scripts);\n }\n const loadedModule = await script.module;\n if (!loadedModule.autocomplete) return; // Doesn't have an autocomplete function.\n\n const runArgs = { \"--tail\": Boolean, \"-t\": Number };\n const flags = libarg(runArgs, {\n permissive: true,\n argv: command.slice(2),\n });\n const flagFunc = Flags(flags._);\n let pos: string[] = [];\n let pos2: string[] = [];\n pos = pos.concat(\n loadedModule.autocomplete(\n {\n servers: GetAllServers().map((server) => server.hostname),\n scripts: currServ.scripts.map((script) => script.filename),\n txts: currServ.textFiles.map((txt) => txt.fn),\n flags: (schema: any) => {\n pos2 = schema.map((f: any) => {\n if (f[0].length === 1) return \"-\" + f[0];\n return \"--\" + f[0];\n });\n try {\n return flagFunc(schema);\n } catch (err) {\n return undefined;\n }\n },\n },\n flags._,\n ),\n );\n return pos.concat(pos2);\n }\n const pos = await scriptAutocomplete();\n if (pos) return pos;\n\n if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\n addAllDirectories();\n }\n\n if (isCommand(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"cat\")) {\n addAllMessages();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"download\") || isCommand(\"mv\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"cd\")) {\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"ls\") && index === 0) {\n addAllDirectories();\n }\n\n return allPos;\n}\n","/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains function that deal with Server-related directory things.\n * Functions that deal with the string manipulation can be found in\n * ./DirectoryHelpers.ts\n */\nimport { isValidDirectoryPath, isInRootDirectory, getFirstParentDirectory } from \"./DirectoryHelpers\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\n/**\n * Given a directory (by the full directory path) and a server, returns all\n * subdirectories of that directory. This is only for FIRST-LEVEl/immediate subdirectories\n */\nexport function getSubdirectories(serv: BaseServer, dir: string): string[] {\n const res: string[] = [];\n\n if (!isValidDirectoryPath(dir)) {\n return res;\n }\n\n let t_dir = dir;\n if (!t_dir.endsWith(\"/\")) {\n t_dir += \"/\";\n }\n\n function processFile(fn: string): void {\n if (t_dir === \"/\" && isInRootDirectory(fn)) {\n const subdir = getFirstParentDirectory(fn);\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n } else if (fn.startsWith(t_dir)) {\n const remaining = fn.slice(t_dir.length);\n const subdir = getFirstParentDirectory(remaining);\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n }\n }\n\n for (const script of serv.scripts) {\n processFile(script.filename);\n }\n\n for (const txt of serv.textFiles) {\n processFile(txt.fn);\n }\n\n return res;\n}\n","export class ScriptUrl {\n filename: string;\n url: string;\n\n constructor(filename: string, url: string) {\n this.filename = filename;\n this.url = url;\n }\n}\n","import { containsAllStrings, longestCommonStart } from \"../utils/StringHelperFunctions\";\n\n/**\n * Implements tab completion for the Terminal\n *\n * @param command {string} Terminal command, excluding the last incomplete argument\n * @param arg {string} Last argument that is being completed\n * @param allPossibilities {string[]} All values that `arg` can complete to\n */\nexport function tabCompletion(\n command: string,\n arg: string,\n allPossibilities: string[],\n oldValue: string,\n): string[] | string | undefined {\n if (!(allPossibilities.constructor === Array)) {\n return;\n }\n if (!containsAllStrings(allPossibilities)) {\n return;\n }\n\n // Remove all options in allPossibilities that do not match the current string\n // that we are attempting to autocomplete\n if (arg === \"\") {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(command.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n } else {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(arg.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n }\n\n const semiColonIndex = oldValue.lastIndexOf(\";\");\n\n let val = \"\";\n if (allPossibilities.length === 0) {\n return;\n } else if (allPossibilities.length === 1) {\n if (arg === \"\") {\n //Autocomplete command\n val = allPossibilities[0];\n } else {\n val = command + \" \" + allPossibilities[0];\n }\n\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return val;\n } else {\n // Replace only after the last semicolon\n return oldValue.slice(0, semiColonIndex + 1) + \" \" + val;\n }\n } else {\n const longestStartSubstr = longestCommonStart(allPossibilities);\n /**\n * If the longest common starting substring of remaining possibilities is the same\n * as whatevers already in terminal, just list all possible options. Otherwise,\n * change the input in the terminal to the longest common starting substr\n */\n if (arg === \"\") {\n if (longestStartSubstr === command) {\n return allPossibilities;\n } else {\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return longestStartSubstr;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${longestStartSubstr}`;\n }\n }\n } else {\n if (longestStartSubstr === arg) {\n // List all possible options\n return allPossibilities;\n } else {\n if (semiColonIndex == -1) {\n // No semicolon, so replace the whole command\n return `${command} ${longestStartSubstr}`;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${command} ${longestStartSubstr}`;\n }\n }\n }\n }\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Box from \"@mui/material/Box\";\nexport function TutorialRoot(): React.ReactElement {\n return (\n <>\n Tutorial / Documentation\n \n \n Getting Started\n \n
    \n \n Servers & Networking\n \n
    \n \n Hacking\n \n
    \n \n Scripts\n \n
    \n \n Netscript Programming Language\n \n
    \n \n Traveling\n \n
    \n \n Companies\n \n
    \n \n Infiltration\n \n
    \n \n Factions\n \n
    \n \n Augmentations\n \n
    \n \n Keyboard Shortcuts\n \n
    \n \n );\n}\n","/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\nimport React, { useState, useEffect } from \"react\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nimport { ActiveScriptsPage } from \"./ActiveScriptsPage\";\nimport { RecentScriptsPage } from \"./RecentScriptsPage\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\n\ninterface IProps {\n workerScripts: Map;\n}\n\nexport function ActiveScriptsRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const [tab, setTab] = useState<\"active\" | \"recent\">(\"active\");\n function handleChange(event: React.SyntheticEvent, tab: \"active\" | \"recent\"): void {\n setTab(tab);\n }\n return (\n <>\n \n \n \n \n\n {tab === \"active\" && }\n {tab === \"recent\" && }\n \n );\n}\n","/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\nimport React from \"react\";\n\nimport { ScriptProduction } from \"./ScriptProduction\";\nimport { ServerAccordions } from \"./ServerAccordions\";\n\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\n\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n workerScripts: Map;\n}\n\nexport function ActiveScriptsPage(props: IProps): React.ReactElement {\n return (\n <>\n \n This page displays a list of all of your scripts that are currently running across every machine. It also\n provides information about each script's production. The scripts are categorized by the hostname of the servers\n on which they are running.\n \n\n \n \n \n );\n}\n","/**\n * React Component for displaying the total production and production rate\n * of scripts on the 'Active Scripts' UI page\n */\nimport * as React from \"react\";\n\nimport { Money } from \"../React/Money\";\nimport { MoneyRate } from \"../React/MoneyRate\";\nimport { use } from \"../Context\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n cell: {\n borderBottom: \"none\",\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n whiteSpace: \"nowrap\",\n },\n size: {\n width: \"1px\",\n },\n }),\n);\nexport function ScriptProduction(): React.ReactElement {\n const player = use.Player();\n const classes = useStyles();\n const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);\n\n return (\n \n \n \n \n Total production:\n \n \n \n \n \n \n \n \n ()\n \n \n \n \n
    \n );\n}\n","/**\n * React Component for rendering the Accordion elements for all servers\n * on which scripts are running\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { ServerAccordion } from \"./ServerAccordion\";\n\nimport TextField from \"@mui/material/TextField\";\nimport List from \"@mui/material/List\";\nimport TablePagination from \"@mui/material/TablePagination\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { WorkerScriptStartStopEventEmitter } from \"../../Netscript/WorkerScriptStartStopEventEmitter\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { TablePaginationActionsAll } from \"../React/TablePaginationActionsAll\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\n// Map of server hostname -> all workerscripts on that server for all active scripts\ninterface IServerData {\n server: BaseServer;\n workerScripts: WorkerScript[];\n}\n\ninterface IServerToScriptsMap {\n [key: string]: IServerData | undefined;\n}\n\ntype IProps = {\n workerScripts: Map;\n};\n\nexport function ServerAccordions(props: IProps): React.ReactElement {\n const [filter, setFilter] = useState(\"\");\n const [page, setPage] = useState(0);\n const [rowsPerPage, setRowsPerPage] = useState(Settings.ActiveScriptsServerPageSize);\n const setRerender = useState(false)[1];\n\n const handleChangePage = (event: unknown, newPage: number): void => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = (event: React.ChangeEvent): void => {\n Settings.ActiveScriptsServerPageSize = parseInt(event.target.value, 10);\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n function handleFilterChange(event: React.ChangeEvent): void {\n setFilter(event.target.value);\n setPage(0);\n }\n\n const serverToScriptMap: IServerToScriptsMap = {};\n for (const ws of props.workerScripts.values()) {\n const server = GetServer(ws.hostname);\n if (server == null) {\n console.warn(`WorkerScript has invalid IP address: ${ws.hostname}`);\n continue;\n }\n\n let data = serverToScriptMap[server.hostname];\n\n if (data === undefined) {\n serverToScriptMap[server.hostname] = {\n server: server,\n workerScripts: [],\n };\n data = serverToScriptMap[server.hostname];\n }\n if (data !== undefined) data.workerScripts.push(ws);\n }\n\n const filtered = Object.values(serverToScriptMap).filter(\n (data) =>\n data &&\n (data.server.hostname.includes(filter) || data.server.runningScripts.find((s) => s.filename.includes(filter))),\n );\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => WorkerScriptStartStopEventEmitter.subscribe(rerender));\n\n return (\n <>\n ,\n spellCheck: false,\n }}\n />\n \n {filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((data) => {\n return (\n data && (\n \n )\n );\n })}\n \n \n \n );\n}\n","/**\n * React Component for rendering the Accordion element for a single\n * server in the 'Active Scripts' UI page\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\n\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport { ServerAccordionContent } from \"./ServerAccordionContent\";\n\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\n\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\n\ntype IProps = {\n server: BaseServer;\n workerScripts: WorkerScript[];\n};\n\nexport function ServerAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = React.useState(false);\n const server = props.server;\n\n // Accordion's header text\n // TODO: calculate the longest hostname length rather than hard coding it\n const longestHostnameLength = 18;\n const paddedName = `${server.hostname}${\" \".repeat(longestHostnameLength)}`.slice(\n 0,\n Math.max(server.hostname.length, longestHostnameLength),\n );\n const barOptions = {\n progress: server.ramUsed / server.maxRam,\n totalTicks: 30,\n };\n const headerTxt = `${paddedName} ${createProgressBarText(barOptions)}`;\n\n return (\n \n setOpen((old) => !old)}>\n {headerTxt}} />\n {open ? : }\n \n \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { WorkerScriptAccordion } from \"./WorkerScriptAccordion\";\nimport List from \"@mui/material/List\";\nimport TablePagination from \"@mui/material/TablePagination\";\nimport { TablePaginationActionsAll } from \"../React/TablePaginationActionsAll\";\nimport { Settings } from \"../../Settings/Settings\";\n\ninterface IProps {\n workerScripts: WorkerScript[];\n}\n\nexport function ServerAccordionContent(props: IProps): React.ReactElement {\n const [page, setPage] = useState(0);\n const [rowsPerPage, setRowsPerPage] = useState(Settings.ActiveScriptsScriptPageSize);\n const handleChangePage = (event: unknown, newPage: number): void => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = (event: React.ChangeEvent): void => {\n Settings.ActiveScriptsScriptPageSize = parseInt(event.target.value, 10);\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n return (\n <>\n \n {props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map((ws) => (\n \n ))}\n \n \n \n );\n}\n","/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\nimport * as React from \"react\";\n\nimport { numeralWrapper } from \"../numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport DeleteIcon from \"@mui/icons-material/Delete\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\n\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\n\nimport { dialogBoxCreate } from \"../React/DialogBox\";\nimport { LogBoxEvents } from \"../React/LogBoxManager\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { arrayToString } from \"../../utils/helpers/arrayToString\";\nimport { Money } from \"../React/Money\";\nimport { MoneyRate } from \"../React/MoneyRate\";\n\nconst useStyles = makeStyles({\n noborder: {\n borderBottom: \"none\",\n },\n});\n\ntype IProps = {\n workerScript: WorkerScript;\n};\n\nexport function WorkerScriptAccordion(props: IProps): React.ReactElement {\n const classes = useStyles();\n const [open, setOpen] = React.useState(false);\n const workerScript = props.workerScript;\n const scriptRef = workerScript.scriptRef;\n\n function logClickHandler(): void {\n LogBoxEvents.emit(scriptRef);\n }\n const killScript = killWorkerScript.bind(null, scriptRef as any, scriptRef.server);\n\n function killScriptClickHandler(): void {\n killScript();\n dialogBoxCreate(\"Killing script\");\n }\n\n // Calculations for script stats\n const onlineMps = scriptRef.onlineMoneyMade / scriptRef.onlineRunningTime;\n const onlineEps = scriptRef.onlineExpGained / scriptRef.onlineRunningTime;\n\n return (\n <>\n setOpen((old) => !old)} component={Paper}>\n └ {props.workerScript.name} {JSON.stringify(props.workerScript.args)}} />\n {open ? : }\n \n \n \n \n \n \n \n └ Threads:\n \n \n {numeralWrapper.formatThreads(props.workerScript.scriptRef.threads)}\n \n \n \n \n └ Args: {arrayToString(props.workerScript.args)}\n \n \n \n \n └ Online Time:\n \n \n {convertTimeMsToTimeElapsedString(scriptRef.onlineRunningTime * 1e3)}\n \n \n \n \n └ Offline Time:\n \n \n {convertTimeMsToTimeElapsedString(scriptRef.offlineRunningTime * 1e3)}\n \n \n \n \n └ Total online production:\n \n \n \n \n \n \n \n \n \n \n  {numeralWrapper.formatExp(scriptRef.onlineExpGained) + \" hacking exp\"}\n \n \n\n \n \n └ Online production rate:\n \n \n \n \n \n \n \n \n \n \n  {numeralWrapper.formatExp(onlineEps) + \" hacking exp / sec\"}\n \n \n\n \n \n └ Total offline production:\n \n \n \n \n \n \n \n \n \n \n  {numeralWrapper.formatExp(scriptRef.offlineExpGained) + \" hacking exp\"}\n \n \n \n
    \n\n \n \n \n \n
    \n
    \n \n );\n}\n","/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\nimport React from \"react\";\nimport Typography from \"@mui/material/Typography\";\n\nimport { recentScripts } from \"../../Netscript/RecentScripts\";\nimport { RecentScriptAccordion } from \"./RecentScriptAccordion\";\n\nexport function RecentScriptsPage(): React.ReactElement {\n return (\n <>\n List of all recently killed scripts.\n {recentScripts.map((r) => (\n \n ))}\n \n );\n}\n","/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\nimport * as React from \"react\";\n\nimport { numeralWrapper } from \"../numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\n\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { arrayToString } from \"../../utils/helpers/arrayToString\";\nimport { Money } from \"../React/Money\";\nimport { MoneyRate } from \"../React/MoneyRate\";\nimport { RecentScript } from \"../..//Netscript/RecentScripts\";\nimport { LogBoxEvents } from \"../React/LogBoxManager\";\n\nconst useStyles = makeStyles({\n noborder: {\n borderBottom: \"none\",\n },\n});\n\ninterface IProps {\n recentScript: RecentScript;\n}\n\nexport function RecentScriptAccordion(props: IProps): React.ReactElement {\n const classes = useStyles();\n const [open, setOpen] = React.useState(false);\n const recentScript = props.recentScript;\n\n // Calculations for script stats\n const onlineMps = recentScript.runningScript.onlineMoneyMade / recentScript.runningScript.onlineRunningTime;\n const onlineEps = recentScript.runningScript.onlineExpGained / recentScript.runningScript.onlineRunningTime;\n\n function logClickHandler(): void {\n LogBoxEvents.emit(recentScript.runningScript);\n }\n return (\n <>\n setOpen((old) => !old)} component={Paper}>\n \n └ {recentScript.filename} (died{\" \"}\n {convertTimeMsToTimeElapsedString(new Date().getTime() - recentScript.timestamp.getTime())} ago)\n \n }\n />\n {open ? : }\n \n \n \n \n \n \n \n └ Threads:\n \n \n {numeralWrapper.formatThreads(recentScript.runningScript.threads)}\n \n \n \n \n └ Args: {arrayToString(recentScript.args)}\n \n \n \n \n └ Online Time:\n \n \n \n {convertTimeMsToTimeElapsedString(recentScript.runningScript.onlineRunningTime * 1e3)}\n \n \n \n \n \n └ Offline Time:\n \n \n \n {convertTimeMsToTimeElapsedString(recentScript.runningScript.offlineRunningTime * 1e3)}\n \n \n \n \n \n └ Total online production:\n \n \n \n \n \n \n \n \n \n \n \n  {numeralWrapper.formatExp(recentScript.runningScript.onlineExpGained) + \" hacking exp\"}\n \n \n \n\n \n \n └ Online production rate:\n \n \n \n \n \n \n \n \n \n \n  {numeralWrapper.formatExp(onlineEps) + \" hacking exp / sec\"}\n \n \n\n \n \n └ Total offline production:\n \n \n \n \n \n \n \n \n \n \n \n  {numeralWrapper.formatExp(recentScript.runningScript.offlineExpGained) + \" hacking exp\"}\n \n \n \n \n
    \n \n
    \n
    \n \n );\n}\n","/**\n * Root React Component for displaying a Faction's UI.\n * This is the component for displaying a single faction's UI, not the list of all\n * accessible factions\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { AugmentationsPage } from \"./AugmentationsPage\";\nimport { DonateOption } from \"./DonateOption\";\nimport { Info } from \"./Info\";\nimport { Option } from \"./Option\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Faction } from \"../../Faction/Faction\";\n\nimport { use } from \"../../ui/Context\";\nimport { CreateGangModal } from \"./CreateGangModal\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { CovenantPurchasesRoot } from \"../../PersonObjects/Sleeve/ui/CovenantPurchasesRoot\";\n\ntype IProps = {\n faction: Faction;\n};\n\n// Info text for all options on the UI\nconst gangInfo = \"Create and manage a gang for this Faction. Gangs will earn you money and \" + \"faction reputation\";\nconst hackingContractsInfo =\n \"Complete hacking contracts for your faction. \" +\n \"Your effectiveness, which determines how much \" +\n \"reputation you gain for this faction, is based on your hacking skill. \" +\n \"You will gain hacking exp.\";\nconst fieldWorkInfo =\n \"Carry out field missions for your faction. \" +\n \"Your effectiveness, which determines how much \" +\n \"reputation you gain for this faction, is based on all of your stats. \" +\n \"You will gain exp for all stats.\";\nconst securityWorkInfo =\n \"Serve in a security detail for your faction. \" +\n \"Your effectiveness, which determines how much \" +\n \"reputation you gain for this faction, is based on your combat stats. \" +\n \"You will gain exp for all combat stats.\";\nconst augmentationsInfo =\n \"As your reputation with this faction rises, you will \" +\n \"unlock Augmentations, which you can purchase to enhance \" +\n \"your abilities.\";\nconst sleevePurchasesInfo = \"Purchase Duplicate Sleeves and upgrades. These are permanent!\";\n\nconst GangNames = [\n \"Slum Snakes\",\n \"Tetrads\",\n \"The Syndicate\",\n \"The Dark Army\",\n \"Speakers for the Dead\",\n \"NiteSec\",\n \"The Black Hand\",\n];\n\ninterface IMainProps {\n faction: Faction;\n rerender: () => void;\n onAugmentations: () => void;\n}\n\nfunction MainPage({ faction, rerender, onAugmentations }: IMainProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [sleevesOpen, setSleevesOpen] = useState(false);\n const [gangOpen, setGangOpen] = useState(false);\n const p = player;\n const factionInfo = faction.getInfo();\n\n function manageGang(): void {\n // If player already has a gang, just go to the gang UI\n if (player.inGang()) {\n return router.toGang();\n }\n\n setGangOpen(true);\n }\n\n function startFieldWork(faction: Faction): void {\n player.startFactionFieldWork(router, faction);\n }\n\n function startHackingContracts(faction: Faction): void {\n player.startFactionHackWork(router, faction);\n }\n\n function startSecurityWork(faction: Faction): void {\n player.startFactionSecurityWork(router, faction);\n }\n\n // We have a special flag for whether the player this faction is the player's\n // gang faction because if the player has a gang, they cannot do any other action\n const isPlayersGang = p.inGang() && p.getGangName() === faction.name;\n\n // Flags for whether special options (gang, sleeve purchases, donate, etc.)\n // should be shown\n const favorToDonate = Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n const canDonate = faction.favor >= favorToDonate;\n\n const canPurchaseSleeves = faction.name === \"The Covenant\" && p.bitNodeN === 10;\n\n let canAccessGang = p.canAccessGang() && GangNames.includes(faction.name);\n if (p.inGang()) {\n if (p.getGangName() !== faction.name) {\n canAccessGang = false;\n } else if (p.getGangName() === faction.name) {\n canAccessGang = true;\n }\n }\n\n return (\n <>\n \n \n {faction.name}\n \n \n {canAccessGang && (\n <>\n