diff --git a/main.bundle.js b/main.bundle.js index f40096449..6e3293ad5 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 d=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(122),o=a(40),s=a(1),l=a(10);const c=new i.a;function u(){const[e,t]=Object(n.useState)(null);return Object(n.useEffect)(()=>c.subscribe(e=>{t(e)}),[]),r.a.createElement(r.a.Fragment,null,null!=e&&r.a.createElement(o.a,{open:!0,onClose:function(){null!==e&&(e.resolve(!1),t(null))}},r.a.createElement(s.a,null,e.txt),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!0),t(null))}},"Yes"),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!1),t(null))}},"No")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n),i=a(1443),o=a(122),s=a(1),l=a(76);const c=new o.a;function u(){const[e,t]=Object(n.useState)(!1);return Object(n.useEffect)(()=>c.subscribe(()=>t(!0))),r.a.createElement(i.a,{open:e,anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:2e3,onClose:()=>t(!1)},r.a.createElement(l.a,{sx:{p:2}},r.a.createElement(s.a,null,"Game Saved!")))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(68);function r(e){const t=[];for(const a in n.a){const r=n.a[a].create;null!=r&&(e.hasProgram(n.a[a].name)||r.req(e)&&t.push(n.a[a]))}return t}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(6),o=a(305),s=a(99),l=a(32),c=a(1),u=a(76),m=a(210),h=a(71),d=a.n(h),p=a(136),f=a.n(p);function g(e){const[t,a]=Object(n.useState)(!1);let h=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(h+=" - Level "+e.level),"string"==typeof e.aug.info?r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,{dangerouslySetInnerHTML:{__html:e.aug.info}}),e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,e.aug.stats))))):r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,null,e.aug.info,e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats)))))}},,,,,,function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e,t){n(this,"lvl",1),n(this,"n",1),this.n=e,this.lvl=t}}},function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i}));var n=a(0);const r=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},n.createElement("g",null,n.createElement("path",{d:"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"}),n.createElement("path",{d:"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"}))),i=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},n.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),n.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),n.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),n.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(55),o=a(27),s=a(1),l=a(29),c=a(32),u=a(98),m=a(517),h=a.n(m),d=a(518),p=a.n(d);function f({action:e,isActive:t,bladeburner:a,rerender:n}){const m=o.b.Player(),d=e.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(u.a,{disabled:!d,onClick:function(){d&&(++e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(h.a,null))),r.a.createElement(l.a,{title:t?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement(u.a,{disabled:!f,onClick:function(){f&&(--e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(p.a,null))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1),o=a(29),s=a(32),l=a(142);function c(e){return r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(o.a,{title:r.a.createElement(i.a,null,"Automatically increase operation level when possible")},r.a.createElement(i.a,null," Autolevel:")),r.a.createElement(l.a,{checked:e.action.autoLevel,onChange:function(t){e.action.autoLevel=t.target.checked,e.rerender()}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(883),o=a(23),s=a(10);function l(e){const[t,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{disabled:0===e.bladeburner.teamSize,onClick:()=>a(!0)},"Set Team Size (Curr Size: ",Object(o.c)(e.action.teamCount,0),")"),r.a.createElement(i.a,{open:t,onClose:()=>a(!1),action:e.action,bladeburner:e.bladeburner}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t,a,n,r){this.name=e,this.desc=t,this.isHacking=a,this.isCombat=n,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){const[e,t]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)}),r.a.createElement(r.a.Fragment,null,e?"|":"")}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(967),r=a(20),i=a(313),o=a(6),s=a(30);function l(e,t){const a=e.getCost();if(!t.canAfford(a))return!1;t.loseMoney(a),t.hacking_exp=e.hacking_exp,t.strength_exp=e.strength_exp,t.defense_exp=e.defense_exp,t.dexterity_exp=e.dexterity_exp,t.agility_exp=e.agility_exp,t.charisma_exp=e.charisma_exp;for(const e in r.a)r.a[e].owned=!1;for(let e=t.augmentations.length-1;e>=0;--e)t.augmentations[e].name!==o.a.NeuroFluxGovernor?t.augmentations.splice(e,1):r.a[o.a.NeuroFluxGovernor].owned=!0;for(let a=0;a=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;ee.name),o=[];function s(e){return e.name!==r.a.NeuroFluxGovernor&&(!a.includes(e.name)&&(!o.includes(e)&&!e.isSpecial))}if(t.inGang()){const e=t.getGangFaction();for(const t in n.a){const a=n.a[t];s(a)&&(e.playerReputation>a.baseRepRequirement&&o.push(a))}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.a[e];if(null!=t)for(const e of t.augmentations){const a=n.a[e];s(a)&&(t.playerReputation>a.baseRepRequirement&&o.push(a))}}return o}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(4),o=a(212);function s({hashes:e}){return r.a.createElement(o.a,{hashes:i.a.formatHashes(e)+" / sec"})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(22),o=a(1040),s=a(7),l=a(14),c=a(27),u=a(18),m=a(388),h=a(15),d=a(1),p=a(32),f=a(10);function g(e,t,a){const n=s.a.TravelCost;e.canAfford(n)&&(e.loseMoney(n),e.travel(a),Object(h.a)(r.a.createElement(r.a.Fragment,null,"You are now in ",a,"!")),t.toCity())}function y(e){const t=c.b.Player(),a=c.b.Router(),h=Object(n.useState)(!1)[1],[y,b]=Object(n.useState)(!1),[E,_]=Object(n.useState)(i.a.Sector12);function v(){h(e=>!e)}function k(e){const n=s.a.TravelCost;t.canAfford(n)&&(l.a.SuppressTravelConfirmation?g(t,a,e):(b(!0),_(e)))}return Object(n.useEffect)(()=>{const e=setInterval(v,1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{variant:"h4"},"Travel Agency"),r.a.createElement(p.a,{mx:2},r.a.createElement(d.a,null,"From here, you can travel to any other city! A ticket costs"," ",r.a.createElement(u.a,{money:s.a.TravelCost,player:e.p}),"."),l.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(i.a).filter(t=>t!=e.p.city).map(e=>{if(void 0===Object.entries(i.a).find(t=>t[1]===e))throw new Error(`could not find key for city '${e}'`);return r.a.createElement(r.a.Fragment,{key:e},r.a.createElement(f.a,{onClick:()=>k(e),sx:{m:2}},r.a.createElement(d.a,null,"Travel to ",e)),r.a.createElement("br",null))})):r.a.createElement(m.a,{currentCity:e.p.city,onTravel:e=>k(e)})),r.a.createElement(o.a,{city:E,travel:()=>g(t,a,E),open:y,onClose:()=>b(!1)}))}},function(e,t,a){"use strict";a.d(t,"b",(function(){return P})),a.d(t,"a",(function(){return F}));var n=a(0),r=a.n(n),i=a(1051),o=a(1064),s=a(1065),l=a(109),c=a(15),u=a(101),m=a(321),h=a(227),d=a(491),p=a(261),f=a(4),g=a(635),y=a(636),b=a(438),E=a(14),_=a(39),v=a(10),k=a(1),w=a(149),C=a(32),S=a(81),x=a(98),O=a(507),M=a.n(O);let T=!1,R=[];function P(){const e=Object(b.a)({});R=function e(t){let a=[];const n=Object.keys(t);for(const r of n)"object"==typeof t[r]&&(a.push(r),a=a.concat(e(t[r]))),"function"==typeof t[r]&&a.push(r);return a}(e);const t=["heart","break","exploit","bypass","corporation"];R=R.filter(e=>!t.includes(e))}let A="",N="",I=null;function F(e){const t=Object(n.useRef)(null),[a,b]=Object(n.useState)(e.filename?e.filename:A),[O,P]=Object(n.useState)(e.filename?e.code:N),[F,j]=Object(n.useState)("RAM: ???"),[D,B]=Object(n.useState)(!1),[L,G]=Object(n.useState)({theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize});function W(){if(null!==t.current){const e=t.current.getPosition();null!==e&&g.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(I=null,_.a.isRunning&&_.a.currStep===_.f.TerminalTypeScript){if("n00dles.script"!==a)return void Object(c.a)("Leave the script name as 'n00dles'!");if(-1==O.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(c.a)("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");let n=!1;for(let r=0;r0)){switch(a){case p.a.ImportError:j("RAM: Import Error");break;case p.a.URLImportError:j("RAM: HTTP Import Error");break;case p.a.SyntaxError:default:j("RAM: Syntax Error")}return new Promise(()=>{})}j("RAM: "+f.a.formatRAM(a))}return Object(n.useEffect)(()=>{void 0!==e.filename&&(A=e.filename,N=e.code,I=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(H,1e3);return()=>clearInterval(e)},[O]),Object(n.useEffect)(()=>{function e(e){E.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),W())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(S.a,{type:"text",tabIndex:1,value:a,onChange:function(e){A=e.target.value,b(e.target.value)},InputProps:{startAdornment:r.a.createElement(k.a,null,"Script name: ")}}),r.a.createElement(x.a,{onClick:()=>B(!0)},r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,null),"options"))),r.a.createElement(i.a,{beforeMount:function(e){T||(T=!0,e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of R)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(y.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(y.a,"netscript.d.ts"))},onMount:function(e){if(t.current=e,null===t.current)return;const n=g.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==I&&t.current.setPosition({lineNumber:I.lineNumber,column:I.column+1}),t.current.focus()},loading:r.a.createElement(k.a,null,"Loading script editor!"),height:"90%",defaultLanguage:"javascript",defaultValue:O,onChange:function(e){void 0!==e&&(N=e,null!==t.current&&(I=t.current.getPosition()),P(e))},theme:L.theme,options:L}),r.a.createElement(C.a,{display:"flex",flexDirection:"row",sx:{m:1},alignItems:"center"},r.a.createElement(v.a,{onClick:function(){if(null===t.current)return;const e=Object(s.js_beautify)(O,{indent_with_tabs:!L.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}},"Beautify"),r.a.createElement(k.a,{sx:{mx:1}},F),r.a.createElement(v.a,{onClick:W},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement(w.a,{sx:{mx:1},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},r.a.createElement(k.a,null," Netscript Documentation"))),r.a.createElement(o.a,{open:D,onClose:()=>B(!1),options:{theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize},save:e=>{G(e),E.a.MonacoTheme=e.theme,E.a.MonacoInsertSpaces=e.insertSpaces,E.a.MonacoFontSize=e.fontSize}}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(104),i=a(32),o=a(98),s=a(638),l=a.n(s),c=a(640),u=a.n(c),m=a(639),h=a.n(m),d=a(303),p=a.n(d);function f(e){const t=Object(r.a)(),{count:a,page:s,rowsPerPage:c,onPageChange:m}=e;return n.createElement(i.a,{sx:{flexShrink:0,ml:2.5}},n.createElement(o.a,{onClick:e=>{m(e,0)},disabled:0===s,"aria-label":"first page"},"rtl"===t.direction?n.createElement(p.a,null):n.createElement(l.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s-1)},disabled:0===s,"aria-label":"previous page"},"rtl"===t.direction?n.createElement(h.a,null):n.createElement(u.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s+1)},disabled:s>=Math.ceil(a/c)-1,"aria-label":"next page"},"rtl"===t.direction?n.createElement(u.a,null):n.createElement(h.a,null)),n.createElement(o.a,{onClick:e=>{m(e,Math.max(0,Math.ceil(a/c)-1))},disabled:s>=Math.ceil(a/c)-1,"aria-label":"last page"},"rtl"===t.direction?n.createElement(l.a,null):n.createElement(p.a,null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(24);function r(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=Object(n.d)(e.server);if(null==t)return 0;for(let a=0;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(283),r=a(21);class i extends n.a{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.Contract=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper
skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(279),r=a(4);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class o{constructor(e={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[e.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+e.text);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t${this.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}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 r}));var n=a(80);function r(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:n.a[t]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return W}));var n=a(23),r=a(20),i=a(152),o=a(6),s=a(198),l=a(199),c=a(323),u=a(58),m=a(302),h=a(7),d=a(25),p=a(117),f=a(110),g=a(534),y=a(215),b=a(57),E=a(39),_=a(229),v=a(160),k=a(2),w=a(284),C=a(24),S=a(14),x=a(282),O=a(61),M=a(91),T=a(115),R=a(285),P=a(221),A=a(9),N=a(18),I=a(212),F=a(102),j=a(349),D=a(228),B=a(1163),L=a(0),G=a.n(L);const W={_lastUpdate:(new Date).getTime(),updateGame:function(e=1){const t=e*h.a._idleSpeed;null==k.a.totalPlaytime&&(k.a.totalPlaytime=0),null==k.a.playtimeSinceLastAug&&(k.a.playtimeSinceLastAug=0),null==k.a.playtimeSinceLastBitnode&&(k.a.playtimeSinceLastBitnode=0),k.a.totalPlaytime+=t,k.a.playtimeSinceLastAug+=t,k.a.playtimeSinceLastBitnode+=t,T.a.process(f.b,k.a,e),k.a.isWorking&&(k.a.workType==h.a.WorkTypeFaction?k.a.workForFaction(e)&&f.b.toFaction():k.a.workType==h.a.WorkTypeCreateProgram?k.a.createProgramWork(e)&&f.b.toTerminal():k.a.workType==h.a.WorkTypeStudyClass?k.a.takeClass(e)&&f.b.toCity():k.a.workType==h.a.WorkTypeCrime?k.a.commitCrime(e)&&f.b.toLocation(P.a[A.a.Slums]):k.a.workType==h.a.WorkTypeCompanyPartTime?k.a.workPartTime(e)&&f.b.toCity():k.a.work(e)&&f.b.toCity()),k.a.hasWseAccount&&Object(M.k)(e),k.a.inGang()&&null!==k.a.gang&&k.a.gang.process(e,k.a),k.a.corporation instanceof m.a&&k.a.corporation.storeCycles(e),k.a.bladeburner instanceof l.a&&k.a.bladeburner.storeCycles(e);for(let t=0;t0){const t=e[Math.floor(Math.random()*e.length)];Object(p.c)(t)}W.Counters.checkFactionInvitations=100}if(W.Counters.passiveFactionGrowth<=0){const e=Math.floor(5-W.Counters.passiveFactionGrowth);Object(p.e)(e),W.Counters.passiveFactionGrowth=5}if(W.Counters.messages<=0&&(Object(_.b)(),r.a[o.a.TheRedPill].owned?W.Counters.messages=4500:W.Counters.messages=150),k.a.corporation instanceof m.a&&k.a.corporation.process(k.a),W.Counters.mechanicProcess<=0){if(k.a.bladeburner instanceof l.a)try{k.a.bladeburner.process(f.b,k.a)}catch(e){Object(D.a)("Exception caught in Bladeburner.process(): "+e)}W.Counters.mechanicProcess=5}W.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(c.b)(),W.Counters.contractGeneration=3e3)},load:function(e){if(Object(B.a)(),Object(w.a)(e)){x.b.emit(),Object(s.b)(k.a),Object(O.b)(k.a),Object(i.c)(),k.a.reapplyAllSourceFiles(),k.a.hasWseAccount&&Object(M.h)(),W._lastUpdate=(new Date).getTime();const e=k.a.lastUpdate,t=W._lastUpdate-e,a=Math.floor(t/h.a._idleSpeed);let r=0;const o=k.a.moneySourceA.hacking/k.a.playtimeSinceLastAug*t*.75;if(k.a.gainMoney(o),Object(v.b)(),k.a.isWorking)k.a.focus=!0,k.a.workType==h.a.WorkTypeFaction?k.a.workForFaction(a):k.a.workType==h.a.WorkTypeCreateProgram?k.a.createProgramWork(a):k.a.workType==h.a.WorkTypeStudyClass?k.a.takeClass(a):k.a.workType==h.a.WorkTypeCrime?k.a.commitCrime(a):k.a.workType==h.a.WorkTypeCompanyPartTime?k.a.workPartTime(a):k.a.work(a);else for(let e=0;ej.a.emit(G.a.createElement(G.a.Fragment,null,"Offline for ",E,". While you were offline, your scripts generated"," ",G.a.createElement(N.a,{money:o}),", your Hacknet Nodes generated ",u," and you gained"," ",G.a.createElement(F.a,{reputation:r})," reputation divided amongst your factions.")),250)}else Object(s.b)(k.a),W.start(),k.a.init(),Object(C.f)(k.a.getHomeComputer()),Object(u.b)(),Object(d.c)(),Object(i.c)(),Object(_.c)(),Object(O.b)(k.a),Object(E.e)();Object(g.b)()},start:function(){const e=(new Date).getTime();let t=e-W._lastUpdate;const a=t%h.a._idleSpeed;t=Math.floor(t/h.a._idleSpeed),t>0&&(W._lastUpdate=e-a,k.a.lastUpdate=e-a,W.updateGame(t)),window.requestAnimationFrame(W.start)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(1492),o=a(1),s=a(47),l=a(115),c=a(353),u=a(2),m=a(567),h=a(110),d=a(7);function p(){const[e,t]=Object(n.useState)(!1),[a,p]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{const e=setTimeout(()=>{a||t(!0)},2e3);return()=>clearTimeout(e)}),Object(n.useEffect)(()=>{!async function(){await Object(c.b)().then(e=>{m.a.load(e),p(!0)}).catch(e=>{console.error(e),m.a.load(""),p(!0)})}()},[]),a?r.a.createElement(h.a,{terminal:l.a,engine:m.a,player:u.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",d.a.Version)),e&&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";a.d(t,"a",(function(){return r}));var n=a(30);const r={Tracking:()=>Object(n.a)(5,75)/10,"Bounty Hunter":()=>Object(n.a)(5,75)/10,Retirement:()=>Object(n.a)(5,75)/10,Investigation:()=>Object(n.a)(10,40)/10,"Undercover Operation":()=>Object(n.a)(10,40)/10,"Sting Operation":()=>Object(n.a)(3,40)/10,Raid:()=>Object(n.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(n.a)(1,20)/10,Assassination:()=>Object(n.a)(1,20)/10}},function(e,t,a){"use strict";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(94),r=a(66),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 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 u})),a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(24),o=a(48),s=a(86),l=a(111),c=a(79);const u={All:0,Foreign:1,Owned:2,Purchased:3};function m(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case u.All:return!0;case u.Foreign:return"home"!==t.hostname&&!a;case u.Owned:return a||t instanceof s.a||"home"===t.hostname;case u.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,{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(1027),s=a(1029),l=a(1030),c=a(1031),u=a(1032),m=a(1034),h=a(533),d=a(1041),p=a(1042),f=a(53),g=a(14),y=a(113),b=a(24),E=a(1048),_=a(27);function v({loc:e}){const t=_.b.Router(),a=_.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(d.a,{key:"universitylocation",loc:e})),e.types.includes(f.a.Casino)&&r.push(n.createElement(p.a,{key:"casinoLocation",p:a})),r}(),k=Object(b.d)(e.name),w=null!==k&&Object(y.b)(k);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(217),o=a(131),s=a(155),l=a(76);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 n}));const n=new class{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(25),r=a(24);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(7);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(87);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,"b",(function(){return i})),a.d(t,"a",(function(){return o}));var n=a(139);function r(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function i(e){const t=(e=(e=e.trim()).replace(/\s\s+/g," ")).match(/(?:'[^']*'|"[^"]*"|[^;"])*/g);if(!t)return[];const a=t.map(n.h).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat(),r=[];for(const e of a)null!==e&&(e.match(/^\s*$/)||r.push(e.trim()));return r}function o(e){let t="";const a=[];let n=0,i=0,o="";for(;i=1&&(o=e.charAt(i-1),"\\"===o&&(s=!0));const l=e.charAt(i);if('"'===l)if(s||" "!==o)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if("'"===l)if(s||" "!==o)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if(" "===l&&""===t){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t),n=i+1}++i}if(n!==i){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t)}return a}},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","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."],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 ie}));var n=a(286),r=a(86),i=a(48),o=a(68),s=a(93),l=a(287),c=a(101),u=a(7),m=a(24),h=a(109),d=a(436),p=a(39),f=a(113),g=a(645),y=a(103),b=a(14),E=a(163),_=a(89),v=a(4),k=a(23),w=a(1124),C=a(1125),S=a(1126),x=a(1127),O=a(1128),M=a(1129),T=a(1130),R=a(1131),P=a(1132),A=a(1135),N=a(1136),I=a(1137),F=a(1138),j=a(1139),D=a(1140),B=a(1141),L=a(1142),G=a(1143),W=a(1144),H=a(1145),U=a(1146),q=a(1147),K=a(1148),$=a(1149),z=a(1150),V=a(1151),Y=a(1154),J=a(1155),X=a(1156),Q=a(1157),Z=a(1158),ee=a(1159),te=a(1160),ae=a(1161),ne=a(1162);function re(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class ie{constructor(){re(this,"action",null),re(this,"commandHistory",[]),re(this,"commandHistoryIndex",0),re(this,"outputHistory",[new n.b("Bitburner v"+u.a.Version,"primary")]),re(this,"contractOpen",!1),re(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"))}error(e){this.append(new n.b(e,"error"))}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(_.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(_.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(_.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(_.d)(t,e)/4,"b")}}startAnalyze(){this.print("Analyzing system..."),this.startAction(1,"a")}startAction(e,t){this.action=new n.c(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(_.b)(n,t),s=Math.random(),l=Object(_.c)(n,t),c=l/4;if(s=n.getMaxNumTries()?(this.print("Contract FAILED - Contract is now self-destructing"),a.removeContract(n)):this.print(`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 d=h+"--";let p="NO";c.hasAdminRights&&(p="YES"),this.print(`${d}Root Access: ${p}${m?"":", Required hacking skill: "+c.requiredHackingSkill}`),c.hasOwnProperty("numOpenPortsRequired")&&this.print(d+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),this.print(d+"RAM: "+v.a.formatRAM(c.maxRam)),this.print(" ")}}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(d.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,download:P.a,expr:A.a,free:N.a,grow:I.a,hack:F.a,help:j.a,home:D.a,hostname:B.a,kill:L.a,killall:G.a,ls:W.a,lscpu:H.a,mem:U.a,mv:q.a,nano:K.a,ps:$.a,rm:z.a,run:V.a,scan:Y.a,scp:X.a,sudov:Q.a,tail:Z.a,top:ee.a,unalias:te.a,weaken:ae.a,wget:ne.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(30);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.print("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.print("ServerProfiler.exe can only be run on normal servers."):t.print("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:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:n.a.MillisecondsPerFiveMinutes/20},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.gt(1e11)&&a.hacking_skill>=2500))return t.print(`Augmentations: ${a.augmentations.length} / ${n}`),t.print(`Money: ${s.a.formatMoney(a.money.toNumber())} / $100b`),void t.print(`Hacking skill: ${a.hacking_skill} / 2500`);t.print("We will contact you."),t.print("-- Daedalus --")}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(9),r=a(56),i=a(103);const o=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:n.a.AevumECorp},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:n.a.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:n.a.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[r.a.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:n.a.Sector12BladeIndustries},{hackDifficulty:99,hostname:"nwo",literature:[r.a.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:n.a.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[r.a.BeyondMan,r.a.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:n.a.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[r.a.CodedIntelligence,r.a.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:n.a.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:n.a.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:n.a.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[r.a.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:n.a.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:i.a.FulcrumSecretTechnologies},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:n.a.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:n.a.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[r.a.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:n.a.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:[r.a.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:n.a.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:n.a.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:n.a.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:n.a.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[r.a.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[r.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[r.a.AGreenTomorrow,r.a.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:n.a.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:n.a.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:[r.a.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:n.a.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:n.a.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[r.a.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:n.a.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:n.a.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[r.a.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[r.a.AGreenTomorrow,r.a.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:n.a.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:n.a.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:n.a.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[r.a.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:n.a.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:n.a.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:n.a.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:n.a.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:n.a.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:n.a.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:n.a.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[r.a.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:n.a.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:n.a.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[r.a.SecretSocieties,r.a.TheFailedFrontier,r.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:n.a.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:n.a.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:n.a.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:n.a.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[r.a.SecretSocieties,r.a.TheFailedFrontier,r.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:n.a.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:n.a.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:n.a.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:n.a.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[r.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:[r.a.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:n.a.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:n.a.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[r.a.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:n.a.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:n.a.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:n.a.NewTokyoNoodleBar},{hackDifficulty:10,hostname:"foodnstuff",literature:[r.a.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:n.a.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:n.a.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[r.a.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[r.a.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[r.a.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[r.a.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:n.a.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:n.a.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:n.a.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20,specialName:n.a.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:n.a.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:n.a.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:n.a.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[r.a.SimulatedReality,r.a.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:i.a.BitRunnersServer},{hackDifficulty:0,hostname:"I.I.I.I",literature:[r.a.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:i.a.TheBlackHandServer},{hackDifficulty:0,hostname:"avmnite-02h",literature:[r.a.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:i.a.NiteSecServer},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:i.a.TheDarkArmyServer},{hackDifficulty:0,hostname:"CSEC",literature:[r.a.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:i.a.CyberSecServer},{hackDifficulty:0,hostname:"The-Cave",literature:[r.a.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:i.a.DaedalusServer},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:i.a.WorldDaemon}]},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 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(141),r=a(56);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. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.

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 f}));var n=a(792),r=a(543),i=a(565),o=a(373),s=a(44),l=a(413),c=a(9),u=a(322),m=a(22),h=a(329),d=a(21),p=a(97);class f{constructor(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new p.a(1e3),this.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.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.ab,this.prestigeAugmentation=s.db,this.prestigeSourceFile=s.eb,this.receiveInvite=s.lb,this.calculateSkill=s.o,this.updateSkillLevels=s.Ib,this.resetMultipliers=s.ob,this.hasProgram=s.Y,this.setMoney=s.rb,this.gainMoney=s.I,this.loseMoney=s.cb,this.canAfford=s.q,this.recordMoneySource=s.mb,this.gainHackingExp=s.G,this.gainStrengthExp=s.J,this.gainDefenseExp=s.E,this.gainDexterityExp=s.F,this.gainAgilityExp=s.B,this.gainCharismaExp=s.C,this.gainIntelligenceExp=s.H,this.queryStatFromString=s.gb,this.resetWorkStatus=s.pb,this.processWorkEarnings=s.fb,this.startWork=s.Cb,this.cancelationPenalty=s.r,this.work=s.Jb,this.finishWork=s.z,this.startWorkPartTime=s.Db,this.workPartTime=s.Lb,this.finishWorkPartTime=s.A,this.startFocusing=s.Bb,this.stopFocusing=s.Eb,this.startFactionWork=s.Ab,this.startFactionHackWork=s.yb,this.startFactionFieldWork=s.xb,this.startFactionSecurityWork=s.zb,this.workForFaction=s.Kb,this.finishFactionWork=s.y,this.getWorkMoneyGain=s.T,this.getWorkHackExpGain=s.S,this.getWorkStrExpGain=s.V,this.getWorkDefExpGain=s.Q,this.getWorkDexExpGain=s.R,this.getWorkAgiExpGain=s.O,this.getWorkChaExpGain=s.P,this.getWorkRepGain=s.U,this.startCreateProgramWork=s.vb,this.createProgramWork=s.u,this.finishCreateProgramWork=s.w,this.startClass=s.ub,this.takeClass=s.Fb,this.finishClass=s.v,this.startCrime=s.wb,this.commitCrime=s.t,this.finishCrime=s.x,this.singularityStopWork=s.tb,this.takeDamage=s.Gb,this.regenerateHp=s.nb,this.hospitalize=s.Z,this.applyForJob=s.f,this.getNextCompanyPosition=s.N,this.quitJob=s.ib,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.bb,this.reapplyAllAugmentations=s.jb,this.reapplyAllSourceFiles=s.kb,this.checkForFactionInvitations=s.s,this.setBitNodeNumber=s.qb,this.queueAugmentation=s.hb,this.gainCodingContractReward=s.D,this.travel=s.Hb,this.gotoLocation=s.X,this.canAccessResleeving=s.p,this.giveExploit=s.W,this.getIntelligenceBonus=s.L,this.getCasinoWinnings=s.K,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.e,this.getCurrentServer=l.b,this.getHomeComputer=l.c,this.getUpgradeHomeRamCost=l.d,this.createHacknetServer=l.a,this.factionWorkType="",this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.getMult=s.M,this.setMult=s.sb}toJSON(){return Object(d.b)("PlayerObject",this)}static fromJSON(e){return Object(d.a)(f,e.data)}}d.c.constructors.PlayerObject=f},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(36);function r(e){const t=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,a){"use strict";function n(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(26),r=a(9);const i={},o={},s={},l={},c={},u={},m={},h={},d={},p={},f={},g={},y={},b={},E={},_={},v={},k={},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=>{d[e]=!0}),n.c.forEach(e=>{p[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(18);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";a.d(t,"a",(function(){return r}));var n=a(26);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(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__(22),decimal_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(97),_IndustryData__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(50),_data_Constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(41),_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(46),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(168),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(30),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(802),_OfficeSpace__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(325),_Product__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(352),_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(15),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(118),_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(159),_Warehouse__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(204),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(326);function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class Industry{constructor(e={}){_defineProperty(this,"name",""),_defineProperty(this,"type",_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_6__.a({name:"Scientific Research"})),_defineProperty(this,"researched",{}),_defineProperty(this,"reqMats",{}),_defineProperty(this,"prodMats",[]),_defineProperty(this,"products",{}),_defineProperty(this,"makesProducts",!1),_defineProperty(this,"awareness",0),_defineProperty(this,"popularity",0),_defineProperty(this,"startingCost",0),_defineProperty(this,"reFac",0),_defineProperty(this,"sciFac",0),_defineProperty(this,"hwFac",0),_defineProperty(this,"robFac",0),_defineProperty(this,"aiFac",0),_defineProperty(this,"advFac",0),_defineProperty(this,"prodMult",0),_defineProperty(this,"upgrades",Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__.a).length).fill(0)),_defineProperty(this,"state","START"),_defineProperty(this,"newInd",!0),_defineProperty(this,"offices",{[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0}),this.name=e.name?e.name:"",this.type=e.type?e.type:_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0},this.init()}init(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.d[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);switch(this.startingCost=e,this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error("Invalid Industry Type passed into Industry.init(): "+this.type)}}getProductDescriptionText(){if(!this.makesProducts)return"";switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}}getMaximumNumberProducts(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.BaseMaxProducts+e}hasMaximumNumberProducts(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()}calculateProductionFactors(){let e=0;for(let t=0;t<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a))continue;const r=n.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}this.prodMult=e<1?1:e}updateWarehouseSizeUsed(e){e.updateMaterialSizeUsed();for(const t in this.products)if(this.products.hasOwnProperty(t)){const a=this.products[t];if(void 0===a)continue;e.sizeUsed+=a.data[e.loc][0]*a.siz}}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_11__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);let t=0;for(const n in this.offices){const r=this.offices[n];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses.plus(t),this.processMaterialMarket(),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);const n=a.getDreamSenseGain(),r=4*n;return void(n>0&&(this.popularity+=n*e,this.awareness+=r*e))}let n=this.processMaterials(e,a);Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1])),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1]))}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;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_4__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[t]);r=Math.min(r,i),r>0&&(e[t]=r)}let t=1e99;for(const a in e){const n=e[a];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[a];if(void 0===r)throw new Error(`reqMat "${a}" is undefined`);const i=n/r;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_4__.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_4__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const e in this.reqMats)if(this.reqMats.hasOwnProperty(e)){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a;warehouse.materials[e].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_4__.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_4__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles),a.materials[matName].qty+=amt,a.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,t.updateWarehouseSizeUsed(a);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(e=1,t){let a=0;if("PRODUCTION"===this.state)for(const t in this.products){const a=this.products[t];if(void 0!==a&&!a.fin){const t=a.createCity,n=this.offices[t];if(0===n)continue;const r=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;a.createProduct(e,c),a.prog>=100&&a.finishProduct(n.employeeProd,this);break}}for(const n in this.products)if(this.products.hasOwnProperty(n)){const r=this.products[n];r instanceof _Product__WEBPACK_IMPORTED_MODULE_10__.a&&r.fin&&(a+=this.processProduct(e,r,t))}return[a,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a)switch(this.state){case"PRODUCTION":{const e=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let t;t=product.prdman[city][0]?Math.min(e,product.prdman[city][1]):e,t*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let a=product.siz;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const t=product.reqMats[e];a-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]*t}if(a>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/a);t=Math.min(e,t)}warehouse.smartSupplyStore+=t/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let n=1;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t;warehouse.materials[e].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_4__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const e in product.reqMats)product.reqMats.hasOwnProperty(e)&&(product.pCost+=product.reqMats[e]*warehouse.materials[e].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,a=e,n=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));const maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(e){for(const t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]}upgrade(e,t){const a=t.corporation,n=t.office,r=e[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e=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 l}));var n=a(41),r=a(30),i=a(21),o=a(46);function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class l{constructor(e={}){s(this,"pro",0),s(this,"cyclesUntilRaise",n.a.CyclesPerEmployeeRaise),this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(r.a)(50,100),this.hap=e.happiness?e.happiness:Object(r.a)(50,100),this.ene=e.energy?e.energy:Object(r.a)(50,100),this.int=e.intelligence?e.intelligence:Object(r.a)(10,50),this.cha=e.charisma?e.charisma:Object(r.a)(10,50),this.exp=e.experience?e.experience:Object(r.a)(10,50),this.cre=e.creativity?e.creativity:Object(r.a)(10,50),this.eff=e.efficiency?e.efficiency:Object(r.a)(10,50),this.sal=e.salary?e.salary:Object(r.a)(.1,5),this.loc=e.loc?e.loc:"",this.pos=o.a.Unassigned}process(e=1,t){const a=.003*e,r=a*Math.random();this.exp+=a,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.sal+=n.a.EmployeeRaiseAmount,this.cyclesUntilRaise+=n.a.CyclesPerEmployeeRaise);const i=a*Math.random();this.pos===o.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.eneObject(T.a)({textfield:{borderBottom:"1px solid "+e.palette.primary.main},code:{whiteSpace:"pre",backgroundColor:e.palette.background.paper}}));function A(){const e=P(),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}},"[home ~/]> 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}},"[home ~/]> 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(p.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),"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(S.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)(()=>d.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(131),o=a(32),s=a(210),l=a(1450),c=a(814),u=a.n(c),m=a(815),h=a.n(m),d=a(27),p=a(31);const f=Object(i.a)({nobackground:{backgroundColor:"#0000"}});function g({children:e}){const[t,a]=Object(n.useState)(!0),i=f(),c=d.b.Router();if(c.page()===p.a.BitVerse||c.page()===p.a.Loading)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("div",{style:{position:"fixed",top:0,right:0,zIndex:1500}},r.a.createElement(o.a,{display:"flex",justifyContent:"flex-end",flexDirection:"column"},r.a.createElement(s.a,{in:t},e),r.a.createElement(o.a,{display:"flex",justifyContent:"flex-end"},r.a.createElement(l.a,{classes:{root:i.nobackground},onClick:()=>a(e=>!e)},m))))}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return Te}));var n=a(0),r=a.n(n),i=a(12),o=a(17),s=a(155),l=a(131),c=a(1451),u=a(266),m=a(570),h=a(820),d=a.n(h),p=a(819),f=a.n(p),g=a(70),y=a(132),b=a(99),E=a(1),_=a(210),v=a(654),k=a(821),w=a.n(k),C=a(303),S=a.n(C),x=a(822),O=a.n(x),M=a(501),T=a.n(M),R=a(823),P=a.n(R),A=a(440),N=a.n(A),I=a(825),F=a.n(I),j=a(506),D=a.n(j),B=a(502),L=a.n(B),G=a(826),W=a.n(G),H=a(503),U=a.n(H),q=a(828),K=a.n(q),$=a(829),z=a.n($),V=a(830),Y=a.n(V),J=a(831),X=a.n(J),Q=a(832),Z=a.n(Q),ee=a(833),te=a.n(ee),ae=a(358),ne=a.n(ae),re=a(256),ie=a.n(re),oe=a(507),se=a.n(oe),le=a(824),ce=a.n(le),ue=a(827),me=a.n(ue),he=a(834),de=a.n(he),pe=a(136),fe=a.n(pe),ge=a(71),ye=a.n(ge),be=a(31),Ee=a(7),_e=a(39),ve=a(505),ke=a(14),we=a(224),Ce=a(92);const Se=e=>({width:e.spacing(31),transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),xe=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)`}}),Oe=Object(o.a)(c.a,{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>({width:e.spacing(31),whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...Se(e),"& .MuiDrawer-paper":Se(e)},...!t&&{...xe(e),"& .MuiDrawer-paper":xe(e)}})),Me=Object(l.a)(e=>Object(s.a)({active:{borderLeft:"3px solid "+e.palette.primary.main},listitem:{}}));function Te(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,p]=Object(n.useState)(!0),[k,C]=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,A=_e.a.currStep===_e.f.GoToHacknetNodesPage,I=_e.a.currStep===_e.f.HacknetNodesGoToWorldPage,j=_e.a.currStep===_e.f.WorldDescription,B=e.player.queuedAugmentations.length,G=e.player.factionInvitations.length,H=Object(ve.a)(e.player).length,q=H>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,$=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,V=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;function le(){e.router.toTerminal(),x&&Object(_e.c)()}function ue(){e.router.toScriptEditor()}function he(){e.router.toStats(),M&&Object(_e.c)()}function pe(){e.router.toActiveScripts(),R&&Object(_e.c)()}function ge(){e.router.toCreateProgram()}function Se(){e.router.toFactions()}function xe(){e.router.toAugmentations()}function Te(){e.router.toHacknetNodes(),A&&Object(_e.c)()}function Re(){e.router.toCity(),I&&Object(_e.c)()}function Pe(){e.router.toTravel()}function Ae(){e.router.toJob()}function Ne(){e.router.toBladeburner()}function Ie(){e.router.toGang()}function Fe(){e.router.toTutorial(),j&&Object(_e.c)()}Object(n.useEffect)(()=>{function t(t){if(!ke.a.DisableHotkeys&&!e.player.isWorking&&!we.b)if(t.keyCode==Ce.a.T&&t.altKey)t.preventDefault(),le();else if(t.keyCode===Ce.a.C&&t.altKey)t.preventDefault(),he();else if(t.keyCode===Ce.a.E&&t.altKey)t.preventDefault(),ue();else if(t.keyCode===Ce.a.S&&t.altKey)t.preventDefault(),pe();else if(t.keyCode===Ce.a.H&&t.altKey)t.preventDefault(),Te();else if(t.keyCode===Ce.a.W&&t.altKey)t.preventDefault(),Re();else if(t.keyCode===Ce.a.J&&t.altKey)t.preventDefault(),Ae();else if(t.keyCode===Ce.a.R&&t.altKey)t.preventDefault(),Pe();else if(t.keyCode===Ce.a.P&&t.altKey)t.preventDefault(),ge();else if(t.keyCode===Ce.a.F&&t.altKey){if(e.page==be.a.Terminal&&ke.a.EnableBashHotkeys)return;t.preventDefault(),Se()}else t.keyCode===Ce.a.A&&t.altKey?(t.preventDefault(),xe()):t.keyCode===Ce.a.U&&t.altKey?(t.preventDefault(),Fe()):t.keyCode===Ce.a.B&&t.altKey?(t.preventDefault(),Ne()):t.keyCode===Ce.a.G&&t.altKey&&(t.preventDefault(),Ie())}return document.addEventListener("keypress",t),()=>document.removeEventListener("keypress",t)},[]);const je=Me(),[De,Be]=Object(n.useState)(!0);return r.a.createElement(Oe,{open:De,anchor:"left",variant:"permanent"},r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>Be(e=>!e)},r.a.createElement(y.a,null,De?r.a.createElement(d.a,{color:"primary"}):r.a.createElement(f.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Bitburner v",Ee.a.Version)})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:je.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(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:o,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Terminal",className:Object(i.default)({[je.active]:e.page===be.a.Terminal}),onClick:le},r.a.createElement(y.a,null,r.a.createElement(S.a,{color:x?"error":e.page!==be.a.Terminal?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:x?"error":e.page!==be.a.Terminal?"secondary":"primary"},"Terminal"))),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Script Editor",className:Object(i.default)({[je.active]:e.page===be.a.ScriptEditor}),onClick:ue},r.a.createElement(y.a,null,r.a.createElement(O.a,{color:e.page!==be.a.ScriptEditor?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.ScriptEditor?"secondary":"primary"},"Script Editor"))),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Active Scripts",className:Object(i.default)({[je.active]:e.page===be.a.ActiveScripts}),onClick:pe},r.a.createElement(y.a,null,r.a.createElement(T.a,{color:R?"error":e.page!==be.a.ActiveScripts?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:R?"error":e.page!==be.a.ActiveScripts?"secondary":"primary"},"Active Scripts"))),q&&r.a.createElement(g.a,{button:!0,key:"Create Program",className:Object(i.default)({[je.active]:e.page===be.a.CreateProgram}),onClick:ge},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:H>0?H:void 0,color:"error"},r.a.createElement(P.a,{color:e.page!==be.a.CreateProgram?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.CreateProgram?"secondary":"primary"},"Create Program"))))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>c(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(ce.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Character")}),l?r.a.createElement(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:l,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Stats",className:Object(i.default)({[je.active]:e.page===be.a.Stats}),onClick:he},r.a.createElement(y.a,null,r.a.createElement(N.a,{color:M?"error":e.page!==be.a.Stats?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:M?"error":e.page!==be.a.Stats?"secondary":"primary"},"Stats"))),$&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Factions",className:Object(i.default)({[je.active]:[be.a.Factions,be.a.Faction].includes(e.page)}),onClick:Se},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==G?G:void 0,color:"error"},r.a.createElement(F.a,{color:[be.a.Factions,be.a.Faction].includes(e.page)?"primary":"secondary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:[be.a.Factions,be.a.Faction].includes(e.page)?"primary":"secondary"},"Factions"))),V&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Augmentations",className:Object(i.default)({[je.active]:e.page===be.a.Augmentations}),onClick:xe},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==B?B:void 0,color:"error"},r.a.createElement(D.a,{style:{transform:"rotate(-90deg)"},color:e.page!==be.a.Augmentations?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Augmentations?"secondary":"primary"},"Augmentations"))),r.a.createElement(g.a,{button:!0,key:"Hacknet",className:Object(i.default)({[je.active]:e.page===be.a.Hacknet}),onClick:Te},r.a.createElement(y.a,null,r.a.createElement(L.a,{color:A?"error":e.page!==be.a.Hacknet?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:A?"error":e.page!==be.a.Hacknet?"secondary":"primary"},"Hacknet"))),J&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Sleeves",className:Object(i.default)({[je.active]:e.page===be.a.Sleeves}),onClick:function(){e.router.toSleeves()}},r.a.createElement(y.a,null,r.a.createElement(W.a,{color:e.page!==be.a.Sleeves?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Sleeves?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>p(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,"World")}),h?r.a.createElement(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:h,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"City",className:Object(i.default)({[je.active]:e.page===be.a.City||e.page===be.a.Resleeves||e.page===be.a.Location}),onClick:Re},r.a.createElement(y.a,null,r.a.createElement(U.a,{color:I?"error":e.page!==be.a.City?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:I?"error":e.page!==be.a.City?"secondary":"primary"},"City"))),r.a.createElement(g.a,{button:!0,key:"Travel",className:Object(i.default)({[je.active]:e.page===be.a.Travel}),onClick:Pe},r.a.createElement(y.a,null,r.a.createElement(K.a,{color:e.page!==be.a.Travel?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Travel?"secondary":"primary"},"Travel"))),ae&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Job",className:Object(i.default)({[je.active]:e.page===be.a.Job}),onClick:Ae},r.a.createElement(y.a,null,r.a.createElement(z.a,{color:e.page!==be.a.Job?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Job?"secondary":"primary"},"Job"))),re&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Stock Market",className:Object(i.default)({[je.active]:e.page===be.a.StockMarket}),onClick:function(){e.router.toStockMarket()}},r.a.createElement(y.a,null,r.a.createElement(Y.a,{color:e.page!==be.a.StockMarket?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.StockMarket?"secondary":"primary"},"Stock Market"))),oe&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Bladeburner",className:Object(i.default)({[je.active]:e.page===be.a.Bladeburner}),onClick:Ne},r.a.createElement(y.a,null,r.a.createElement(X.a,{color:e.page!==be.a.Bladeburner?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Bladeburner?"secondary":"primary"},"Bladeburner"))),Q&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Corp",className:Object(i.default)({[je.active]:e.page===be.a.Corporation}),onClick:function(){e.router.toCorporation()}},r.a.createElement(y.a,null,r.a.createElement(Z.a,{color:e.page!==be.a.Corporation?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Corporation?"secondary":"primary"},"Corp"))),ee&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Gang",className:Object(i.default)({[je.active]:e.page===be.a.Gang}),onClick:Ie},r.a.createElement(y.a,null,r.a.createElement(te.a,{color:e.page!==be.a.Gang?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Gang?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>C(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(de.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Help")}),k?r.a.createElement(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:k,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Milestones",className:Object(i.default)({[je.active]:e.page===be.a.Milestones}),onClick:function(){e.router.toMilestones()}},r.a.createElement(y.a,null,r.a.createElement(ne.a,{color:e.page!==be.a.Milestones?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Milestones?"secondary":"primary"},"Milestones"))),r.a.createElement(g.a,{button:!0,key:"Tutorial",className:Object(i.default)({[je.active]:e.page===be.a.Tutorial}),onClick:Fe},r.a.createElement(y.a,null,r.a.createElement(ie.a,{color:j?"error":e.page!==be.a.Tutorial?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:j?"error":e.page!==be.a.Tutorial?"secondary":"primary"},"Tutorial"))),r.a.createElement(g.a,{button:!0,key:"Options",className:Object(i.default)({[je.active]:e.page===be.a.Options}),onClick:function(){e.router.toGameOptions()}},r.a.createElement(y.a,null,r.a.createElement(se.a,{color:e.page!==be.a.Options?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.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(836),o=a(837),s=a(840),l=a(841),c=a(327),u=a(27),m=a(1),h=a(10),d=a(29),p=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(p.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(p.a,{mx:2},r.a.createElement(d.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(d.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(p.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 p}));var n=a(0),r=a.n(n),i=a(508),o=a(20),s=a(6),l=a(14),c=a(27),u=a(173),m=a(10),h=a(29),d=a(266);function p(){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(d.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 p}));var n=a(0),r=a(2),i=a(4),o=a(20),s=a(42),l=a(189),c=a(65),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 d({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 p(){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}();return n.createElement(n.Fragment,null,n.createElement(u.a,{variant:"h4"},"Multipliers"),n.createElement(m.a,{mx:2},n.createElement(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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((function(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(d,{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)}),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(508),l=a(266);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," / ?")}),e?r.a.createElement(g.a,{color:"primary"}):r.a.createElement(p.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(14),o=a(173),s=a(318),l=a(844);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(305),o=a(99),s=a(32),l=a(1),c=a(76),u=a(210),m=a(71),h=a.n(m),d=a(136),p=a.n(d);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(p.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 k}));var n=a(199),r=a(0),i=a.n(r),o=a(846),s=a(848),l=a(850),c=a(851),u=a(852),m=a(853),h=a(854),d=a(855),p=a(856),f=a(857),g=a(858),y=a(859),b=a(860),E=a(861),_=a(862),v=a(1);function k(e){return i.a.createElement(i.a.Fragment,null,i.a.createElement(v.a,null,"Development Menu - Only meant to be used for testing/debugging"),i.a.createElement(o.a,{player:e.player,router:e.router}),i.a.createElement(s.a,{player:e.player}),i.a.createElement(l.a,{player:e.player}),i.a.createElement(c.a,{player:e.player}),i.a.createElement(u.a,{player:e.player}),i.a.createElement(m.a,{player:e.player}),i.a.createElement(h.a,null),i.a.createElement(d.a,null),e.player.bladeburner instanceof n.a&&i.a.createElement(p.a,{player:e.player}),e.player.inGang()&&i.a.createElement(f.a,{player:e.player}),e.player.hasCorporation()&&i.a.createElement(g.a,{player:e.player}),i.a.createElement(y.a,null),e.player.hasWseAccount&&i.a.createElement(b.a,null),e.player.sleeves.length>0&&i.a.createElement(E.a,{player:e.player}),i.a.createElement(_.a,{player:e.player,engine:e.engine}))}},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(71),c=a.n(l),u=a(1),m=a(10),h=a(18);function d(e){function t(t){return function(){e.player.gainMoney(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,"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 p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(71),c=a.n(l),u=a(1),m=a(10),h=a(137);const d=1e27;function p(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(d),e.player.gainStrengthExp(d),e.player.gainDefenseExp(d),e.player.gainDexterityExp(d),e.player.gainAgilityExp(d),e.player.gainCharismaExp(d),e.player.gainIntelligenceExp(d),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)(d),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)(d),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)(d),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)(d),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)(d),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)(d),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)(d),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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(137),p=a(25),f=a(1176),g=a(79),y=a(98),b=a(513),E=a.n(b),_=a(387),v=a.n(_),k=a(1177);function w(e){const[t,a]=Object(n.useState)("Illuminati");function l(e){return function(a){const n=p.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function b(e){return function(a){const n=p.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(k.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 p.a)e.player.receiveInvite(p.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(p.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(d.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const e=p.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(d.a,{label:"favor",placeholder:"amt",tons:()=>b(1)(2e3),add:b(1),subtract:b(-1),reset:function(){const e=p.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 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 v}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(71),c=a.n(l),u=a(111),m=a(6),h=a(1),d=a(79),p=a(98),f=a(513),g=a.n(f),y=a(387),b=a.n(y),E=a(512),_=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(p.a,{onClick:function(){for(const t in m.a){const a=m.a[t];e.player.queueAugmentation(a)}},size:"large"},r.a.createElement(g.a,null)),r.a.createElement(p.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(p.a,{onClick:function(){e.player.augmentations=[]},size:"large"},r.a.createElement(_.a,null)))},Object.values(m.a).map(e=>r.a.createElement(d.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(71),c=a.n(l),u=a(1),m=a(10),h=a(514),d=a(1181);const p=[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(d.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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(68),p=a(79);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(d.a).map(e=>r.a.createElement(p.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 d.a)e.player.hasProgram(d.a[t].name)||e.player.getHomeComputer().programs.push(d.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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(24),p=a(48),f=a(79);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(d.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(d.d)(e);null!==t&&t instanceof p.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(d.c)()){if(!(e instanceof p.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(d.d)(e);null!==t&&t instanceof p.a&&(t.hackDifficulty=t.minDifficulty)}},"Min one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(d.c)()){if(!(e instanceof p.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(d.d)(e);null!==t&&t instanceof p.a&&(t.moneyAvailable=t.moneyMax)}},"Max one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(d.c)()){if(!(e instanceof p.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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(58),p=a(79),f=a(137);function g(){const[e,t]=Object(n.useState)("ECorp");function a(t){return function(a){const n=d.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function l(t){return function(a){const n=d.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(d.a).map(e=>r.a.createElement(p.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(){d.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(){d.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 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 h}));var n=a(0),r=a.n(n),i=a(1),o=a(190),s=a(191),l=a(192),c=a(71),u=a.n(c),m=a(137);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(71),u=a.n(c),m=a(137);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 d}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(71),c=a.n(l),u=a(1),m=a(10),h=a(137);function d(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.plus(1e99))}},"Tons of funds"),r.a.createElement(m.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds.minus(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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(79),p=a(323),f=a(93);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:p.b},"Generate Random Contract"),r.a.createElement(m.a,{onClick:p.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(d.a,{key:e.name,value:e.name},e.name))),r.a.createElement(m.a,{onClick:function(){Object(p.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(71),c=a.n(l),u=a(1),m=a(10),h=a(81),d=a(18),p=a(15),f=a(91),g=a(128);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(d.a,{money:t.cap}))))}),Object(p.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(71),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;t{e.player.lastUpdate-=t,e.engine._lastUpdate-=t,h.b.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(864),o=a(866),s=a(867),l=a(27),c=a(47),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(23),o=a(55),s=a(18),l=a(114),c=a(4),u=a(25),m=a(117),h=a(865),d=a(1),p=a(29),f=a(32),g=a(10),y=a(76);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(p.a,{title:r.a.createElement(d.a,null,"Your rank within the Bladeburner division.")},r.a.createElement(d.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(p.a,{title:r.a.createElement(d.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(d.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(d.a,null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement(d.a,null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement(d.a,null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement(d.a,null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement(d.a,null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement(d.a,null,"Current City: ",e.bladeburner.city),r.a.createElement(f.a,{display:"flex"},r.a.createElement(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.a,null,"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")},r.a.createElement(d.a,null,"Est. 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(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.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(d.a,null,"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3)))),r.a.createElement("br",null)),r.a.createElement(d.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(p.a,{title:E?"":r.a.createElement(d.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(388),o=a(40),s=a(22),l=a(14),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(76),o=a(266),s=a(70),l=a(32),c=a(1),u=a(81),m=a(131),h=a(155);const d=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 p(e){return r.a.createElement(s.a,{sx:{p:0}},r.a.createElement(c.a,null,e.content))}function f(e){const t=d(),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(p,{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 d}));var n=a(0),r=a.n(n),i=a(868),o=a(872),s=a(880),l=a(885),c=a(889),u=a(571),m=a(239),h=a(32);function d(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(869),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(870),o=a(233);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 p}));var n=a(0),r=a.n(n),i=a(38),o=a(163),s=a(23),l=a(871),c=a(151),u=a(319),m=a(1),h=a(32),d=a(76);function p(e){const t=Object(n.useState)(!1)[1];const a=e.action.name===e.bladeburner.action.name,p=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":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(d.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,r.a.createElement(c.a,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(p,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(m.a,null,Object(o.a)({progress:p/e.bladeburner.actionTimeToComplete}))):r.a.createElement(h.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(m.a,null,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's unit 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))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(873),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(874);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(163),s=a(23),l=a(875),c=a(389),u=a(151),m=a(516),h=a(519),d=a(319),p=a(1),f=a(76);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(p.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(p.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(d.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(p.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(515),o=a(1),s=a(29);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(515),o=a(1),s=a(29);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(881),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(882);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(163),s=a(23),l=a(389),c=a(516),u=a(519),m=a(319),h=a(520),d=a(884),p=a(151),f=a(1),g=a(76);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),_=d.a[e.action.name];if(void 0===_)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(p.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(p.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,_.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(40),s=a(1),l=a(10),c=a(81);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(886),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(232),o=a(887);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(23),o=a(38),s=a(163),l=a(520),c=a(888),u=a(151),m=a(389),h=a(319),d=a(1),p=a(76);function f(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,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(p.a,{sx:{my:1,p:1}},r.a.createElement(d.a,null,a?r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name})," (IN PROGRESS - ",Object(i.c)(y,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")",r.a.createElement("p",{style:{display:"block"}},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(d.a,null,b.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(d.a,{color:g?"primary":"error"},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement(d.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 the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.",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 shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its creation.")},"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 facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.",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 peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.",r.a.createElement("br",null),r.a.createElement("br",null),"The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important 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(890),o=a(55),s=a(23),l=a(1),c=a(8);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(891),i=a(216);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(151),o=a(23),s=a(1),l=a(98),c=a(32),u=a(76),m=a(511),h=a.n(m),d=a(892),p=a.n(d);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,d=!!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||d?r.a.createElement(l.a,{disabled:!0},r.a.createElement(p.a,null)):r.a.createElement(l.a,{onClick:function(){e.bladeburner.skillPoints{const e=setInterval(()=>d(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(897),o=a(899),s=a(126),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(25),o=a(23),s=a(4),l=a(107),c=a(102),u=a(73),m=a(898),h=a(126),d=a(1),p=a(29),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(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.a,null,"Penalty for respect and money gain rates due to Wanted Level")},r.a.createElement(d.a,null,"Wanted Level Penalty: -",Object(o.c)(100*(1-e.getWantedPenalty()),2),"%"))),r.a.createElement(d.a,null,"Money gain rate: ",r.a.createElement(l.a,{money:5*e.moneyGainRate})),r.a.createElement(f.a,{display:"flex"},r.a.createElement(p.a,{title:r.a.createElement(d.a,null,"The percentage of total territory your Gang controls")},r.a.createElement(d.a,null,"Territory: ",a,"%"))),r.a.createElement(d.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(7),i=a(23),o=a(1),s=a(29),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(900),o=a(907),s=a(126);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(901),o=a(32),s=a(1),l=a(305),c=a(99),u=a(76),m=a(210),h=a(71),d=a.n(h),p=a(136),f=a.n(p);function g(e){const[t,a]=Object(n.useState)(!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(d.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(902),o=a(904),s=a(905),l=a(47);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(23),o=a(4),s=a(903),l=a(1),c=a(29),u=a(10),m=a(390),h=a(98),d=a(256),p=a.n(d);function f(e){const[t,a]=Object(n.useState)(!1),[d,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:d,onClose:()=>f(!1),member:e.member,onAscend:e.onAscend}),r.a.createElement(h.a,{onClick:()=>a(!0)},r.a.createElement(p.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(40),l=a(126),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(114),s=a(107),l=a(126),c=a(79),u=a(111);function m(e){const t=Object(l.b)(),[a,m]=Object(n.useState)(e.member.task);const h=t.getAllTaskNames(),d=[["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:d}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(205),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 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:1,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:2.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:6,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:15,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:120,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:1,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:1.2,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:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars

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

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets

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

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism

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 h}));var n=a(0),r=a.n(n),i=a(908),o=a(263),s=a(23),l=a(126),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(40),o=a(15),s=a(126),l=a(1),c=a(81),u=a(10);function m(e){const t=Object(s.b)(),[a,m]=Object(n.useState)(""),h=""===a||!t.canRecruitMember();function d(){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&&d()},onChange:function(e){m(e.target.value)},type:"text",placeholder:"unique name",InputProps:{endAdornment:r.a.createElement(u.a,{disabled:h,onClick:d},"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(23),s=a(73),l=a(126),c=a(1),u=a(156),m=a(142),h=a(29),d=a(32),p=a(76);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)),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(d.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(p.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(23),o=a(4),s=a(185),l=a(18),c=a(126),u=a(154),m=a(27),h=a(1),d=a(10),p=a(29),f=a(32),g=a(76);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.gt(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(p.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(p.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(d.a,{onClick:function(){e.member.buyUpgrade(e.upg,a,t),e.rerender()}},r.a.createElement(l.a,{money:t.getUpgradeCost(e.upg)}))))}function _(e){const t=Object(c.b)(),a=m.b.Player(),o=Object(n.useState)(!1)[1];function l(){o(e=>!e)}function d(e,n){return Object.keys(s.a).filter(r=>{const i=s.a[r];return!a.money.lt(t.getUpgradeCost(i))&&(i.type===n&&!e.includes(r))}).map(e=>s.a[e])}const p=d(e.member.upgrades,u.a.Weapon),_=d(e.member.upgrades,u.a.Armor),v=d(e.member.upgrades,u.a.Vehicle),k=d(e.member.upgrades,u.a.Rootkit),w=d(e.member.augmentations,u.a.Augmentation),C=e.member.calculateAscensionMult(e.member.hack_asc_points),S=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*C,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*S,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"),p.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"),_.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"),k.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(p.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(_,{key:e.name,member:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(154),r=a(4);class i{constructor(e="",t=0,a=n.a.Weapon,r={}){this.name=e,this.cost=t,this.type=a,this.mults=r,this.desc=this.createDescription()}createDescription(){const e=["Effects:"];return null!=this.mults.str&&(e.push(`+${r.a.formatPercentage(this.mults.str-1,0)} strength skill`),e.push(`+${r.a.formatPercentage((this.mults.str-1)/4,2)} strength exp`)),null!=this.mults.def&&(e.push(`+${r.a.formatPercentage(this.mults.def-1,0)} defense skill`),e.push(`+${r.a.formatPercentage((this.mults.def-1)/4,2)} defense exp`)),null!=this.mults.dex&&(e.push(`+${r.a.formatPercentage(this.mults.dex-1,0)} dexterity skill`),e.push(`+${r.a.formatPercentage((this.mults.dex-1)/4,2)} dexterity exp`)),null!=this.mults.agi&&(e.push(`+${r.a.formatPercentage(this.mults.agi-1,0)} agility skill`),e.push(`+${r.a.formatPercentage((this.mults.agi-1)/4,2)} agility exp`)),null!=this.mults.cha&&(e.push(`+${r.a.formatPercentage(this.mults.cha-1,0)} charisma skill`),e.push(`+${r.a.formatPercentage((this.mults.cha-1)/4,2)} charisma exp`)),null!=this.mults.hack&&(e.push(`+${r.a.formatPercentage(this.mults.hack-1,0)} hacking skill`),e.push(`+${r.a.formatPercentage((this.mults.hack-1)/4,2)} hacking exp`)),e.join("
")}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 d}));var n=a(0),r=a.n(n),i=a(913),o=a(50),s=a(941),l=a(27),c=a(43),u=a(942),m=a(571),h=a(239);function d(){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[d,p]=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:d,onChange:function(e,t){p(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"===d&&r.a.createElement(u.a,{rerender:a}),-1===d&&r.a.createElement(s.a,{setDivisionName:p}),"string"==typeof d&&"Overview"!==d&&r.a.createElement(i.a,{rerender:a,divisionName:d+""}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(914),o=a(43),s=a(22);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(915),o=a(940),s=a(43),l=a(571),c=a(239);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(916),o=a(919),s=a(922),l=a(27),c=a(43),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 P}));var n=a(0),r=a.n(n),i=a(46),o=a(4),s=a(917),l=a(918),c=a(18),u=a(43),m=a(1),h=a(10),d=a(98),p=a(76),f=a(517),g=a.n(f),y=a(518),b=a.n(y),E=a(29),_=a(79),v=a(111),k=a(238),w=a(189),C=a(65),S=a(42);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=d/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement(k.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Unassigned Employees:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,n))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Avg Employee Morale:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,o.a.format(f,"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Avg Employee Happiness:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,o.a.format(g,"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Avg Employee Energy:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,o.a.format(y,"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Total Employee Salary:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,r.a.createElement(c.a,{money:p})))),s&&r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,null,r.a.createElement(S.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(S.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office),"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.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(S.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.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(S.b,null,r.a.createElement(m.a,null,"x",o.a.format(a.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(k.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 P(e){const t=Object(u.b)(),a=Object(u.c)(),[i,o]=Object(n.useState)(!1),[c,d]=Object(n.useState)(!1),[f,g]=Object(n.useState)(!1);return r.a.createElement(p.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.lt(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.lt(0),onClick:()=>d(!0)},"Throw Party"))),r.a.createElement(l.a,{rerender:e.rerender,office:e.office,open:c,onClose:()=>d(!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(41),s=a(67),l=a(40),c=a(43),u=a(1),m=a(10),h=a(29),d=a(32);function p(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.lt(e.cost),onClick:()=>{return a=e.cost,n=e.size,void(t.funds.lt(a)||(Object(s.y)(t,e.office,n),e.rerender(),e.onClose()));var a,n}},"+",e.size)))}function f(e){const t=Object(c.b)(),a=Math.round(e.office.size/o.a.OfficeInitialSize),n=o.a.OfficeInitialCost*Math.pow(1.09,a);let i=0;for(let e=0;e<5;++e)i+=Math.pow(1.09,a+e);const s=o.a.OfficeInitialCost*i,m=t.funds.dividedBy(o.a.OfficeInitialCost).toNumber();let h=1;for(i=Math.pow(1.09,a);h<50&&!(i>=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(d.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,null,"Upgrade size: "),r.a.createElement(p,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:n,size:o.a.OfficeInitialSize}),r.a.createElement(p,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:s,size:5*o.a.OfficeInitialSize}),r.a.createElement(p,{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(67),l=a(18),c=a(40),u=a(43),m=a(1),h=a(10),d=a(81),p=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.gte(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!")}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((function(){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}))}),null),r.a.createElement(p.a,{display:"flex",alignItems:"center"},r.a.createElement(d.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(50),o=a(326),s=a(4),l=a(163),c=a(920),u=a(921),m=a(18),h=a(107),d=a(114),p=a(390),f=a(119),g=a(43),y=a(1),b=a(10),E=a(29),_=a(76),v=a(98),k=a(256),w=a.n(k),C=a(32);function S(){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.lt(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],_=t.lastCycleRevenue.minus(t.lastCycleExpenses).toNumber();let k=!1;const S=t.getAdvertisingFactors(),x=S[1],O=S[2],M=S[3],T=S[0];function R(e){return Object(l.a)({progress:e,totalTicks:20})}return f&&(k=!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.toNumber()}),")"),r.a.createElement("br",null),r.a.createElement(d.a,{rows:[["Awareness:",s.a.format(t.awareness,"0.000")],["Popularity:",s.a.format(t.popularity,"0.000")]]}),!1!==k&&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(d.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(d.a,{rows:[["Revenue:",r.a.createElement(h.a,{money:t.lastCycleRevenue.toNumber()})],["Expenses:",r.a.createElement(h.a,{money:t.lastCycleExpenses.toNumber()})],["Profit:",r.a.createElement(h.a,{money:_})]]}),r.a.createElement("br",null),r.a.createElement(C.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(p.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(C.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.funds.lt(h)||(t.funds=t.funds.minus(h),a.upgrade(l,{corporation:t,office:e.office}),e.rerender())}n.push(r.a.createElement(E.a,{key:s,title:l[5]},r.a.createElement("span",null,r.a.createElement(b.a,{disabled:t.funds.lt(h),onClick:i},l[4]," - ",r.a.createElement(f.a,{money:h,corp:t})))))}return r.a.createElement(r.a.Fragment,null,n)}function M(e){const t=Object(g.c)();return r.a.createElement(_.a,null,r.a.createElement(x,null),r.a.createElement("br",null),r.a.createElement(y.a,null,"Purchases & Upgrades"),r.a.createElement(O,{office:e.office,rerender:e.rerender})," ",r.a.createElement("br",null),t.makesProducts&&r.a.createElement(S,null))}},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(40),s=a(50),l=a(67),c=a(43),u=a(1),m=a(81),h=a(10),d=a(79),p=a(111);function f(e){const t=Object(c.b)(),a=Object(c.c)(),f=Object.keys(a.offices).filter(e=>0!==a.offices[e]),[g,y]=Object(n.useState)(f.length>0?f[0]:""),[b,E]=Object(n.useState)(""),[_,v]=Object(n.useState)(null),[k,w]=Object(n.useState)(null);if(a.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);let C=r.a.createElement(r.a.Fragment,null);switch(a.type){case s.a.Food:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new restaurant!");break;case s.a.Tobacco:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new tobacco product!");break;case s.a.Pharmaceutical:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and develop a new pharmaceutical drug!");break;case s.a.Computer:case"Computer":C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and manufacture a new computer hardware product!");break;case s.a.Robotics:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and create a new robot or robotic system!");break;case s.a.Software:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of software!");break;case s.a.Healthcare:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new hospital!");break;case s.a.RealEstate:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of real estate property!");break;default:return C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new product!"),r.a.createElement(r.a.Fragment,null)}function S(){if(null!==_&&null!==k){try{Object(l.j)(t,a,g,b,_,k)}catch(e){Object(i.a)(e+"")}e.onClose()}}return C=r.a.createElement(r.a.Fragment,null,C,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,C),r.a.createElement(p.a,{style:{margin:"5px"},onChange:function(e){y(e.target.value)},defaultValue:g},f.map(e=>r.a.createElement(d.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&&S()},type:"number",placeholder:"Marketing investment"}),r.a.createElement(h.a,{onClick:S},"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(40),o=a(50),s=a(41),l=a(67),c=a(279),u=a(15),m=a(1),h=a(29),d=a(10),p=a(32),f=a(305),g=a(99),y=a(210),b=a(71),E=a.n(b),_=a(136),v=a.n(_);function k({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(p.a,{m:4},e.children.map(e=>r.a.createElement(k,{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(k,{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 S}));var n=a(0),r=a.n(n),i=a(41),o=a(168),s=a(352),l=a(204),c=a(923),u=a(924),m=a(929),h=a(159),d=a(4),p=a(119),f=a(934),g=a(935),y=a(67),b=a(43),E=a(1),_=a(29),v=a(76),k=a(10),w=a(32);function C(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 C=i.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),S=t.funds.gt(C);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){if("RealEstate"===t)continue;const a=e.warehouse.materials[t];h.a.hasOwnProperty(t)&&(0!==a.qty&&(T=r.a.createElement(r.a.Fragment,null,T,t,": ",d.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,": ",d.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(_.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: ",d.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",d.a.formatBigNumber(e.warehouse.size))),r.a.createElement(k.a,{disabled:!S,onClick:function(){null!==a&&0!==e.warehouse&&S&&(++e.warehouse.level,e.warehouse.updateSize(t,a),t.funds=t.funds.minus(C),e.rerender())}},"Upgrade Warehouse Size - ",r.a.createElement(p.a,{money:C,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,{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(k.a,{onClick:()=>y(!0)},"Configure Smart Supply"),r.a.createElement(c.a,{open:l,onClose:()=>y(!1),warehouse:e.warehouse})),O,M)}function S(e){return e.warehouse instanceof l.a?r.a.createElement(C,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.lt(i.a.WarehouseInitialCost);return r.a.createElement(v.a,null,r.a.createElement(k.a,{onClick:function(){n||(Object(y.m)(t,a,e.city),e.rerender())},disabled:n},"Purchase Warehouse (",r.a.createElement(p.a,{money:i.a.WarehouseInitialCost,corp:t}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(67),o=a(168),s=a(15),l=a(40),c=a(43),u=a(1),m=a(156),h=a(142);function d(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{control:r.a.createElement(h.a,{checked:t,onChange:function(t){try{const a=e.warehouse.materials[e.matName];Object(i.v)(e.warehouse,a,t.target.checked)}catch(e){Object(s.a)(e+"")}a(t.target.checked)}}),label:r.a.createElement(u.a,null,e.warehouse.materials[e.matName].name)}),r.a.createElement("br",null))}function p(e){const t=Object(c.c)(),a=Object(n.useState)(!1)[1];const s=[];for(const a in e.warehouse.materials)e.warehouse.materials[a]instanceof o.a&&Object.keys(t.reqMats).includes(a)&&s.push(r.a.createElement(d,{key:a,warehouse:e.warehouse,matName:a}));return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{control:r.a.createElement(h.a,{checked:e.warehouse.smartSupplyEnabled,onChange:function(t){Object(i.u)(e.warehouse,t.target.checked),a(e=>!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__(41),_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(925),_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(926),_SellProductModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(927),_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(928),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(118),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(18),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(29),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(76),_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(40),o=a(43),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(67),o=a(40),s=a(1),l=a(10),c=a(81);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 d}));var n=a(0),r=a.n(n),i=a(15),o=a(67),s=a(40),l=a(1),c=a(81),u=a(10),m=a(156),h=a(142);function d(e){const[t,a]=Object(n.useState)(!0),[d,p]=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,d,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:d,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(e){p(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 p}));var n=a(0),r=a.n(n),i=a(4),o=a(40),s=a(43),l=a(1),c=a(81),u=a(156),m=a(142),h=a(29);function d(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),d=Object(n.useState)(!1)[1];const p=a;let f=1;return p>e.product.pCost&&p-e.product.pCost>t&&(f=t/(p-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(p),", 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,d(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"))}),r.a.createElement(l.a,null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function p(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(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(d,{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__(325),_ExportModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(930),_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(931),_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(932),_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(933),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(118),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(18),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(29),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(76),_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(67),s=a(40),l=a(43),c=a(1),u=a(81),m=a(10),h=a(32),d=a(79),p=a(111);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)(""),_=Object(n.useState)(!1)[1];function v(t){for(let a=0;a!e)}const k=t.divisions.find(e=>e.name===a);if(void 0===k)throw new Error(`Export popup somehow ended up with undefined division '${k}'`);const w=Object.keys(k.warehouses).filter(e=>0!==k.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(p.a,{onChange:function(e){f(e.target.value)},value:a},t.divisions.map(e=>r.a.createElement(d.a,{key:e.name,value:e.name},e.name))),r.a.createElement(p.a,{onChange:function(e){y(e.target.value)},value:g},w.map(e=>{if(0!==k.warehouses[e])return r.a.createElement(d.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 p}));var n=a(0),r=a.n(n),i=a(4),o=a(40),s=a(43),l=a(1),c=a(81),u=a(156),m=a(142),h=a(29);function d(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 d=e.mat.getMarkupLimit();const p=t;let f=1;return p>e.mat.bCost?p-e.mat.bCost>d&&(f=Math.pow(d/(p-e.mat.bCost),2)):p!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"))}),r.a.createElement(l.a,null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function p(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(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(d,{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(67),s=a(40),l=a(1),c=a(81),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 d(){try{Object(o.o)(e.mat,t,m)}catch(e){Object(i.a)(e+"")}e.onClose()}function p(e){13===e.keyCode&&d()}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:p}),r.a.createElement(c.a,{value:m,type:"text",placeholder:"Sell price",onChange:function(e){h(e.target.value)},onKeyDown:p}),r.a.createElement(u.a,{onClick:d},"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(159),s=a(4),l=a(67),c=a(40),u=a(43),m=a(1),h=a(81),d=a(10);function p(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,"Not enough warehouse space to purchase this amount"):isNaN(a)?r.a.createElement(r.a.Fragment,null,"Invalid put for Bulk Purchase amount"):r.a.createElement(r.a.Fragment,null,"Purchasing ",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.gt(a))return void Object(i.a)("You cannot afford this purchase.");t.funds=t.funds.minus(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(p,{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(d.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(d.a,{onClick:s},"Confirm"),r.a.createElement(d.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(226);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.a,{display:!1,tex:t.join("+")+String.raw`\Rightarrow`+a.map(e=>String.raw`1\text{ }${e}`).join("+")})}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(41),o=a(15),s=a(67),l=a(119),c=a(43),u=a(1),m=a(79),h=a(111),d=a(10);function p(e){const t=Object(c.b)(),a=Object(c.c)(),p=Object.keys(a.offices).filter(e=>0===a.offices[e]),[f,g]=Object(n.useState)(p[0]),y=t.funds.lt(i.a.OfficeInitialCost);return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Would you like to expand into a new city by opening an office? This would cost"," ",r.a.createElement(l.a,{money:i.a.OfficeInitialCost,corp:t})),r.a.createElement(h.a,{value:f,onChange:function(e){g(e.target.value)}},p.map(e=>r.a.createElement(m.a,{key:e,value:e},e))),r.a.createElement(d.a,{onClick:function(){try{Object(s.k)(t,a,f)}catch(e){return void Object(o.a)(e+"")}Object(o.a)(`Opened a new office in ${f}!`),e.cityStateSetter(f)},disabled:y},"Confirm"))}},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(50),s=a(43),l=a(67),c=a(1),u=a(10),m=a(81),h=a(79),d=a(32),p=a(111);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 _=t.funds.lt(E)||""===y;function v(){if(!_){try{Object(l.l)(t,f,y)}catch(e){return void Object(i.a)(e+"")}e.setDivisionName(y)}}const k=o.b[f];if(void 0===k)throw new Error(`Trying to create an industry that doesn't exists: '${f}'`);return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,null,"Create a new division to expand into a new industry:"),r.a.createElement(p.a,{value:f,onChange:function(e){g(e.target.value)}},a.map(e=>r.a.createElement(h.a,{key:e,value:e},e))),r.a.createElement(c.a,null,k(t)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,"Division name:"),r.a.createElement(d.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"}),r.a.createElement(u.a,{disabled:_,sx:{mx:1},onClick:v},"Create Division")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return A}));var n=a(0),r=a.n(n),i=a(943),o=a(944),s=a(945),l=a(946),c=a(947),u=a(948),m=a(949),h=a(950),d=a(951),p=a(25),f=a(41),g=a(385),y=a(386),b=a(7),E=a(4),_=a(23),v=a(18),k=a(107),w=a(114),C=a(27),S=a(43),x=a(1),O=a(29),M=a(10),T=a(32),R=a(76),P=a(47);function A({rerender:e}){const t=C.b.Player(),a=Object(S.b)(),n=a.revenue.minus(a.expenses).toNumber(),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.toNumber()})],["Total Revenue:",r.a.createElement(k.a,{money:a.revenue.toNumber()})],["Total Expenses:",r.a.createElement(k.a,{money:a.expenses.toNumber()})],["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(D,{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(j,null),r.a.createElement("br",null),r.a.createElement(I,{rerender:e}))}function N({rerender:e}){const t=Object(S.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(d.a,{open:o,onClose:()=>s(!1),rerender:e}),r.a.createElement("br",null))}function I({rerender:e}){const t=Object(S.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(P.a,{container:!0},Object.values(g.a).filter(e=>0===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(P.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(S.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),[h,d]=Object(n.useState)(!1),[p,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>.5,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:()=>d(!0)},"Issue New Shares"))),r.a.createElement(m.a,{open:h,onClose:()=>d(!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:p,onClose:()=>f(!1)}),r.a.createElement("br",null))}function j(){const e=C.b.Player(),t=Object(S.b)(),[a,i]=Object(n.useState)(!1),o=t.determineValuation()>=f.a.BribeThreshold&&e.factions.filter(e=>p.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 D({profit:e}){const t=Object(S.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,o=t.numShares*i;return r.a.createElement(w.a,{rows:[["Retained Profits (after dividends):",r.a.createElement(k.a,{money:n})],["Dividend Percentage:",E.a.format(t.dividendPercentage/100,"0%")],["Dividends per share:",r.a.createElement(k.a,{money:i})],["Your earnings as a shareholder (Pre-Tax):",r.a.createElement(k.a,{money:o})],["Dividend Tax Rate:",r.a.createElement(r.a.Fragment,null,t.dividendTaxPercentage,"%")],["Your earnings as a shareholder (Post-Tax):",r.a.createElement(k.a,{money:o*(1-t.dividendTaxPercentage/100)})]]})}function B(){const e=Object(S.b)().storedCycles*b.a.MilliPerCycle;return e<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement(x.a,null,"Bonus time: ",Object(_.b)(e),r.a.createElement("br",null),r.a.createElement("br",null))}},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(67),s=a(119),l=a(43),c=a(1),u=a(29),m=a(10),h=a(32),d=a(47);function p(e){const t=Object(l.b)(),a=e.upgrade,n=t.upgrades[a[0]],p=a[1],f=a[2],g=p*Math.pow(f,n),y=a[5];return r.a.createElement(d.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.lt(g),sx:{mx:1},onClick:function(){if(!t.funds.lt(g)){try{Object(o.h)(t,e.upgrade)}catch(e){Object(i.a)(e+"")}e.rerender()}}},r.a.createElement(s.a,{money:g,corp:t})),r.a.createElement(u.a,{title:y},r.a.createElement(c.a,null,a[4]," "))))}},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(43),s=a(67),l=a(119),c=a(1),u=a(29),m=a(10),h=a(32),d=a(47);function p(e){const t=Object(o.b)(),a=e.upgradeData,n=a[3];return r.a.createElement(d.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.lt(a[1]),sx:{mx:1},onClick:function(){if(!t.funds.lt(a[1])){try{Object(s.x)(t,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.rerender()}}},r.a.createElement(l.a,{money:a[1],corp:t})),r.a.createElement(u.a,{title:n},r.a.createElement(c.a,null,a[2]))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(25),o=a(41),s=a(4),l=a(15),c=a(40),u=a(27),m=a(43),h=a(1),d=a(10),p=a(79),f=a(81),g=a(32),y=a(111);function b(e){const t=u.b.Player(),a=t.factions.filter(e=>!!i.a[e].getInfo().offersWork()&&!t.hasGangWith(e)),b=Object(m.b)(),[E,_]=Object(n.useState)(0),[v,k]=Object(n.useState)(0),[w,C]=Object(n.useState)(a.length>0?a[0]:""),S=null===E||null===v||0===E&&0===v||isNaN(E)||isNaN(v)||E<0||v<0||b.funds.lt(E)||v>b.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){C(e.target.value)}},a.map(e=>{if(i.a[e].getInfo().offersWork()&&!t.hasGangWith(e))return r.a.createElement(p.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.funds.lt(e)?"ERROR: You do not have this much money to bribe with":t>b.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){_(parseFloat(e.target.value))},placeholder:"Corporation funds"}),r.a.createElement(f.a,{sx:{mx:1},onChange:function(e){k(parseFloat(e.target.value))},placeholder:"Stock Shares"}),r.a.createElement(d.a,{disabled:S,sx:{mx:1},onClick:()=>function(t,a){const n=i.a[w];if(S)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.minus(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(40),l=a(27),c=a(43),u=a(41),m=a(1),h=a(81),d=a(10),p=a(18);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(){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),t.recordMoneySource(s,"corporation"),e.onClose(),Object(o.a)(r.a.createElement(r.a.Fragment,null,"Sold ",i.a.formatMoney(f)," shares for",r.a.createElement(p.a,{money:s}),". The corporation's stock price fell to  ",r.a.createElement(p.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((function(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(e.shares)||e.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(e.shares>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))}}),{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&&b()}}),r.a.createElement(d.a,{disabled:y,onClick:b,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(40),o=a(4),s=a(27),l=a(43),c=a(1),u=a(10),m=a(81);function h(e){const t=s.b.Player(),a=Object(l.b)(),[h,d]=Object(n.useState)(null);const p=1.1*a.sharePrice,f=null===h||isNaN(h)||h<=0||h>a.issuedShares||h*p>t.money;function g(){if(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*p),e.onClose(),e.rerender()}}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(p),". Your company currently has ",o.a.formatBigNumber(a.issuedShares)," outstanding stock shares."),r.a.createElement((function(){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*p))}),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?d(null):d(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 d}));var n=a(0),r=a.n(n),i=a(15),o=a(40),s=a(41),l=a(67),c=a(43),u=a(1),m=a(81),h=a(10);function d(e){const t=Object(c.b)(),[a,d]=Object(n.useState)(0),p=!isNaN(a)&&a>=0&&a<=100*s.a.DividendMaxPercentage;function f(){if(p&&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 ",s.a.DividendMaxPercentage,". (A percentage of 0 means no dividends will be issued",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),"* Dividends are taxed. Taxes start at 50%, but can be decreased",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement(m.a,{autoFocus:!0,value:a,onChange:function(e){if(""===e.target.value)d(0);else{let t=parseFloat(e.target.value);t>50&&(t=50),t<0&&(t=0),d(t)}},onKeyDown:function(e){13===e.keyCode&&f()},placeholder:"Dividend %",type:"number"}),r.a.createElement(h.a,{disabled:!p,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(40),l=a(30),c=a(41),u=a(43),m=a(1),h=a(81),d=a(10);function p(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 _(){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.plus(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(p,{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&&_()}}),r.a.createElement(d.a,{disabled:E,onClick:_,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(41),s=a(40),l=a(43),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,d=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(d,"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-=d,e.rerender(),e.onClose()}},"Accept"))}},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(40),s=a(4),l=a(43),c=a(1),u=a(10),m=a(81),h=a(32);function d(e){const t=Object(l.b)(),[a,d]=Object(n.useState)(""),p=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(p)," 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){d(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&f()}}),r.a.createElement(u.a,{sx:{mx:1},onClick:f},"Go Public")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(953),o=a(954),s=a(27);function l(e){const t=s.b.Player(),a=s.b.Router(),[l,c]=Object(n.useState)(!1);if(void 0===e.location.infiltrationData)throw new Error("Trying to do infiltration on invalid location.");const u=e.location.infiltrationData.startingSecurityLevel,m=function(e,t){const a=e.strength+e.defense+e.dexterity+e.agility+e.charisma,n=t-Math.pow(a,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}(t,u);return l?r.a.createElement(o.a,{StartingDifficulty:u,Difficulty:m,MaxLevel:e.location.infiltrationData.maxClearanceLevel}):r.a.createElement(i.a,{Location:e.location,Difficulty:m,MaxLevel:e.location.infiltrationData.maxClearanceLevel,start:()=>c(!0),cancel:function(){a.toCity()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(47),o=a(1),s=a(10);function l(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 c(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,{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,l("white",13*t),l("orange",13*(t-1)),l("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 _}));var n,r=a(27),i=a(0),o=a.n(i),s=a(47),l=a(955),c=a(956),u=a(958),m=a(959),h=a(960),d=a(961),p=a(962),f=a(963),g=a(964),y=a(965),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,d.a,p.a,f.a,g.a];function _(e){const t=r.b.Player(),a=r.b.Router(),[c,u]=Object(i.useState)(1),[m,h]=Object(i.useState)(n.Countdown),[d,p]=Object(i.useState)(""),[f,g]=Object(i.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*E.length)});function _(){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:_()})}function k(e){p(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(){k(!0),c===e.MaxLevel?h(n.Sell):(h(n.Countdown),u(c+1)),v()},onFailure:function(r){h(n.Countdown),k(!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,MaxLevel:e.MaxLevel})}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((function(){return o.a.createElement("h4",null,o.a.createElement("span",{style:{color:"gray"}},d.slice(0,d.length-1)),d[d.length-1])}),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(47),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 d}));var n=a(0),r=a.n(n),i=a(47),o=a(178),s=a(179),l=a(222),c=a(180),u=a(522),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 d(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[d,p]=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":"":"]"}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(f[f.length-d.length-1],a)?e.onFailure():f.length!==d.length+1?p(d+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(47),o=a(178),s=a(179),l=a(180),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=-1;const a=window.setTimeout(()=>{m(!1),e=window.setTimeout(()=>m(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(a),-1!==e&&clearInterval(e)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(c.a,{variant:"h4"},"Slash when his guard is down!"),r.a.createElement(c.a,{variant:"h4"},a?"!Guarding!":"!ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(47),o=a(178),s=a(179),l=a(222),c=a(180),u=a(522),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 d(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[d]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e0&&(a+=" "),a+=p[Math.floor(Math.random()*p.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(),16===t.keyCode)return;const a=f+t.key.toUpperCase();d.startsWith(a)?d===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)"}},d)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(m.a,null,f,r.a.createElement(u.a,null))))}const p=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(47),o=a(178),s=a(179),l=a(180),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)),[p,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.keyCode;if(32===a)return void(h.includes(m[p])?e.onSuccess():e.onFailure());let n=p;for([38,87,68,39].includes(a)&&n++,[65,37,83,40].includes(a)&&n--;n<0;)n+=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[p]),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"],d=["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(47),o=a(178),s=a(179),l=a(222),c=a(180),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(47),o=a(178),s=a(179),l=a(180),c=a(222),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),32==t.keyCode){if(h[y[1]][y[0]]!==p[f])return void e.onFailure();g(f+1),p.length===f+1&&e.onSuccess()}},onFailure:e.onFailure})))}function d(){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(47),o=a(178),s=a(179),l=a(180),c=a(222),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=d(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] "):p[t][a]?r.a.createElement("span",{key:a},"[.] "):r.a.createElement("span",{key:a},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),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),32==t.keyCode){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 d(e){const t=[];for(let a=0;ar.a.createElement(o.a,{key:t},e.toString())),r.a.createElement(o.a,null,new Array(p.length).fill(0).map((e,t)=>r.a.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement(o.a,null,p.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>p.length||isNaN(a)||b(t=>{const n=[...t];n[a-1]=!0,E.some(e=>e.shouldCut(p[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 ${p[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(25),r=a(0),i=a.n(r),o=a(47),s=a(18),l=a(102),c=a(8),u=a(27),m=a(1),h=a(10),d=a(79),p=a(111);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.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*b*c.a.InfiltrationRep,_=Math.pow(e.Difficulty+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(p.a,{value:f,onChange:function(e){g(e.target.value)}},i.a.createElement(d.a,{key:"none",value:"none"},"none"),t.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement(d.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(_),t.recordMoneySource(_,"infiltration"),y()}},"Sell for ",i.a.createElement(s.a,{money:_}))),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(523),o=a(968),s=a(27),l=a(1),c=a(111),u=a(79),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 d(...e){let t=0;for(let a=0;ae.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking_skill-t.hacking_skill,Strength:(e,t)=>e.strength-t.strength,Defense:(e,t)=>e.defense-t.defense,Dexterity:(e,t)=>e.dexterity-t.dexterity,Agility:(e,t)=>e.agility-t.agility,Charisma:(e,t)=>e.charisma-t.charisma,AverageCombatStats:(e,t)=>d(e.strength,e.defense,e.dexterity,e.agility)-d(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>d(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-d(t.hacking_skill,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 d=p[t];if(void 0===d)throw new Error(`sort function '${t}' is undefined`);return e.resleeves.sort(d),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(187),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(p.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(27),o=a(7),s=a(4),l=a(102),c=a(402),u=a(107),m=a(18),h=a(23),d=a(25),p=a(200),f=a(58),g=a(221),y=a(9),b=a(1),E=a(47),_=a(10),v=a(163);const k=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(),C=d.a[a.currentWorkFactionName];if(a.workType==o.a.WorkTypeFaction){function S(){w.toFaction(C),a.finishFactionWork(!0)}function x(){w.toFaction(C),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 ",C.name,r.a.createElement("br",null),"(Current Faction Reputation: ",r.a.createElement(l.a,{reputation:C.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*k}),")"," ",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*k}),") reputation for this faction ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*k)," / sec) hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)," / sec) agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)," / 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(_.a,{sx:{mx:2},onClick:S},"Stop Faction Work"),r.a.createElement(_.a,{onClick:x},"Do something else simultaneously")))}const O=a.className;if(""!==a.className){function S(){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*k}),")"," ",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*k)," / sec) hacking exp ",r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)," / sec) agility exp ",r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)," / sec) charisma exp ",r.a.createElement("br",null),"You may cancel at any time")),r.a.createElement(E.a,{item:!0},r.a.createElement(_.a,{onClick:S},e)))}if(a.workType==o.a.WorkTypeCompany){const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof p.a))throw new Error("Could not find Company: "+a.companyName);function S(){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*k}),")"," ",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*k}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*k)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)+" / 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(_.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(_.a,{onClick:x},"Do something else simultaneously")))}if(a.workType==o.a.WorkTypeCompanyPartTime){function S(){a.finishWork(!0),w.toJob()}function x(){a.stopFocusing(),w.toJob()}const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof p.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*k}),")"," ",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*k}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*k)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)+" / 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(_.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(_.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(_.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(_.a,{onClick:()=>{a.finishCreateProgramWork(!0),w.toTerminal()}},"Cancel work on creating program"))):r.a.createElement(r.a.Fragment,null)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var n=a(0),r=a.n(n),i=a(131),o=a(155),s=a(1),l=a(461),c=a(47),u=a(156),m=a(142),h=a(111),d=a(79),p=a(10),f=a(32),g=a(266),y=a(70),b=a(149),E=a(29),_=a(1007),v=a.n(_),k=a(1008),w=a.n(k),C=a(971),S=a(15),x=a(974),O=a(975),M=a(14),T=a(353);const R=Object(i.a)(e=>Object(o.a)({root:{width:50,padding:e.spacing(2),userSelect:"none"}}));function P(e){const t=R(),a=Object(n.useRef)(null),[i,o]=Object(n.useState)(M.a.CodeInstructionRunTime),[_,k]=Object(n.useState)(M.a.MaxLogCapacity),[P,A]=Object(n.useState)(M.a.MaxPortCapacity),[N,I]=Object(n.useState)(M.a.MaxTerminalCapacity),[F,j]=Object(n.useState)(M.a.AutosaveInterval),[D,B]=Object(n.useState)(M.a.SuppressMessages),[L,G]=Object(n.useState)(M.a.SuppressFactionInvites),[W,H]=Object(n.useState)(M.a.SuppressTravelConfirmation),[U,q]=Object(n.useState)(M.a.SuppressBuyAugmentationConfirmation),[K,$]=Object(n.useState)(M.a.SuppressHospitalizationPopup),[z,V]=Object(n.useState)(M.a.SuppressBladeburnerPopup),[Y,J]=Object(n.useState)(M.a.DisableHotkeys),[X,Q]=Object(n.useState)(M.a.DisableASCIIArt),[Z,ee]=Object(n.useState)(M.a.DisableTextEffects),[te,ae]=Object(n.useState)(M.a.EnableBashHotkeys),[ne,re]=Object(n.useState)(M.a.EnableTimestamps),[ie,oe]=Object(n.useState)(M.a.Locale),[se,le]=Object(n.useState)(!1),[ce,ue]=Object(n.useState)(!1),[me,he]=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),M.a.CodeInstructionRunTime=t},step:1,min:10,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:_,onChange:function(e,t){k(t),M.a.MaxLogCapacity=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 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:P,onChange:function(e,t){A(t),M.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:N,onChange:function(e,t){I(t),M.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:F,onChange:function(e,t){j(t),M.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:D,onChange:function(e){B(e.target.checked),M.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 messages"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:L,onChange:function(e){G(e.target.checked),M.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:W,onChange:function(e){H(e.target.checked),M.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:U,onChange:function(e){q(e.target.checked),M.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:K,onChange:function(e){$(e.target.checked),M.a.SuppressHospitalizationPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.")},r.a.createElement(s.a,null,"Suppress hospitalization popup"))})),!!e.player.bladeburner&&r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:z,onChange:function(e){V(e.target.checked),M.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:Y,onChange:function(e){J(e.target.checked),M.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:X,onChange:function(e){Q(e.target.checked),M.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:Z,onChange:function(e){ee(e.target.checked),M.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:te,onChange:function(e){ae(e.target.checked),M.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(u.a,{control:r.a.createElement(m.a,{checked:ne,onChange:function(e){re(e.target.checked),M.a.EnableTimestamps=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Terminal commands and log entries will be timestamped. The timestamp will have the format: M/D h:m")},r.a.createElement(s.a,null,"Enable timestamps"))})),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:ie,onChange:function(e){oe(e.target.value),M.a.Locale=e.target.value}},r.a.createElement(d.a,{value:"en"},"en"),r.a.createElement(d.a,{value:"bg"},"bg"),r.a.createElement(d.a,{value:"cs"},"cs"),r.a.createElement(d.a,{value:"da-dk"},"da-dk"),r.a.createElement(d.a,{value:"de"},"de"),r.a.createElement(d.a,{value:"en-au"},"en-au"),r.a.createElement(d.a,{value:"en-gb"},"en-gb"),r.a.createElement(d.a,{value:"es"},"es"),r.a.createElement(d.a,{value:"fr"},"fr"),r.a.createElement(d.a,{value:"hu"},"hu"),r.a.createElement(d.a,{value:"it"},"it"),r.a.createElement(d.a,{value:"lv"},"lv"),r.a.createElement(d.a,{value:"no"},"no"),r.a.createElement(d.a,{value:"pl"},"pl"),r.a.createElement(d.a,{value:"ru"},"ru")))),r.a.createElement("br",null),r.a.createElement("br",null),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/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LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(f.a,null,r.a.createElement(p.a,{onClick:()=>e.save()},"Save Game"),r.a.createElement(p.a,{onClick:()=>ue(!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(p.a,{onClick:()=>e.export()},r.a.createElement(v.a,{color:"primary"}),"Export")),r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"import")},r.a.createElement(p.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(w.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(S.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(T.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(p.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(p.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(p.a,{onClick:()=>le(!0)},"Diagnose files")),r.a.createElement(p.a,{onClick:()=>he(!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(C.a,{open:se,onClose:()=>le(!1)}),r.a.createElement(x.a,{onConfirm:()=>{ue(!1),Object(T.a)().then(()=>setTimeout(()=>location.reload(),1e3)).catch(e=>console.error("Could not delete game: "+e))},open:ce,onClose:()=>ue(!1),confirmationText:"Really delete your game? (It's permanent!)"}),r.a.createElement(O.a,{open:me,onClose:()=>he(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(24),o=a(40),s=a(4),l=a(238),c=a(189),u=a(60),m=a(1458),h=a(1459),d=a(65),p=a(1),f=a(76),g=a(190),y=a(191),b=a(192),E=a(71),_=a.n(E);function v(e){const t=Object(i.d)(e.hostname);if(null===t)throw new Error("server 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(_.a,null)},r.a.createElement(p.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(d.a,null,r.a.createElement(u.a,null,r.a.createElement(p.a,null,"Filename")),r.a.createElement(u.a,{align:"right"},r.a.createElement(p.a,null,"Size")))),r.a.createElement(c.a,null,n.map(e=>r.a.createElement(d.a,{key:e.name},r.a.createElement(u.a,{component:"th",scope:"row"},r.a.createElement(p.a,null,e.name)),r.a.createElement(u.a,{align:"right"},r.a.createElement(p.a,null,s.a.formatBigNumber(e.size),"b"))))))),r.a.createElement("ul",null)))}function k(e){const t=[];for(const e in Object(i.c)())t.push(e);return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(p.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(40),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 g}));var n=a(0),r=a.n(n),i=a(40),o=a(10),s=a(1),l=a(81),c=a(98),u=a(387),m=a.n(u),h=a(976),d=a(282),p=a(14);function f({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(l.a,{sx:{mx:1},label:e,value:a,InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{hideTextfield:!0,value:a,onChange:a=>t(e,"#"+a.hex)})),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{onClick:()=>t(e,n)},r.a.createElement(m.a,{color:"primary"})))}}))}function g(e){const[t,a]=Object(n.useState)({...p.a.theme});function c(e,t){a(a=>(a[e]=t,a)),p.a.theme[e]=t,d.b.emit()}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(o.a,{color:"primary"},"primary"),r.a.createElement(o.a,{color:"secondary"},"secondary"),r.a.createElement(o.a,{color:"warning"},"warning"),r.a.createElement(o.a,{color:"info"},"info"),r.a.createElement(o.a,{color:"error"},"error"),r.a.createElement(s.a,{color:"primary"},"primary"),r.a.createElement(s.a,{color:"secondary"},"secondary"),r.a.createElement(s.a,{color:"warning"},"warning"),r.a.createElement(s.a,{color:"info"},"info"),r.a.createElement(s.a,{color:"error"},"error"),r.a.createElement("br",null),r.a.createElement(f,{name:"primarylight",onColorChange:c,color:t.primarylight,defaultColor:p.b.theme.primarylight}),r.a.createElement(f,{name:"primary",onColorChange:c,color:t.primary,defaultColor:p.b.theme.primary}),r.a.createElement(f,{name:"primarydark",onColorChange:c,color:t.primarydark,defaultColor:p.b.theme.primarydark}),r.a.createElement("br",null),r.a.createElement(f,{name:"errorlight",onColorChange:c,color:t.errorlight,defaultColor:p.b.theme.errorlight}),r.a.createElement(f,{name:"error",onColorChange:c,color:t.error,defaultColor:p.b.theme.error}),r.a.createElement(f,{name:"errordark",onColorChange:c,color:t.errordark,defaultColor:p.b.theme.errordark}),r.a.createElement("br",null),r.a.createElement(f,{name:"secondarylight",onColorChange:c,color:t.secondarylight,defaultColor:p.b.theme.secondarylight}),r.a.createElement(f,{name:"secondary",onColorChange:c,color:t.secondary,defaultColor:p.b.theme.secondary}),r.a.createElement(f,{name:"secondarydark",onColorChange:c,color:t.secondarydark,defaultColor:p.b.theme.secondarydark}),r.a.createElement("br",null),r.a.createElement(f,{name:"warninglight",onColorChange:c,color:t.warninglight,defaultColor:p.b.theme.warninglight}),r.a.createElement(f,{name:"warning",onColorChange:c,color:t.warning,defaultColor:p.b.theme.warning}),r.a.createElement(f,{name:"warningdark",onColorChange:c,color:t.warningdark,defaultColor:p.b.theme.warningdark}),r.a.createElement("br",null),r.a.createElement(f,{name:"infolight",onColorChange:c,color:t.infolight,defaultColor:p.b.theme.infolight}),r.a.createElement(f,{name:"info",onColorChange:c,color:t.info,defaultColor:p.b.theme.info}),r.a.createElement(f,{name:"infodark",onColorChange:c,color:t.infodark,defaultColor:p.b.theme.infodark}),r.a.createElement("br",null),r.a.createElement(f,{name:"welllight",onColorChange:c,color:t.welllight,defaultColor:p.b.theme.welllight}),r.a.createElement(f,{name:"well",onColorChange:c,color:t.well,defaultColor:p.b.theme.well}),r.a.createElement(f,{name:"white",onColorChange:c,color:t.white,defaultColor:p.b.theme.white}),r.a.createElement(f,{name:"black",onColorChange:c,color:t.black,defaultColor:p.b.theme.black}),r.a.createElement("br",null),r.a.createElement(f,{name:"hp",onColorChange:c,color:t.hp,defaultColor:p.b.theme.hp}),r.a.createElement(f,{name:"money",onColorChange:c,color:t.money,defaultColor:p.b.theme.money}),r.a.createElement(f,{name:"hack",onColorChange:c,color:t.hack,defaultColor:p.b.theme.hack}),r.a.createElement(f,{name:"combat",onColorChange:c,color:t.combat,defaultColor:p.b.theme.combat}),r.a.createElement(f,{name:"cha",onColorChange:c,color:t.cha,defaultColor:p.b.theme.cha}),r.a.createElement(f,{name:"int",onColorChange:c,color:t.int,defaultColor:p.b.theme.int}),r.a.createElement(f,{name:"rep",onColorChange:c,color:t.rep,defaultColor:p.b.theme.rep}),r.a.createElement(f,{name:"disabled",onColorChange:c,color:t.disabled,defaultColor:p.b.theme.disabled}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.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))p.a.theme[e]=t[e];d.b.emit()}catch(e){}}}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1010),o=a(1017),s=a(27),l=a(1),c=a(10),u=a(149);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(69),o=a(7),s=a(74),l=a(4),c=a(163),u=a(1011),m=a(1012),h=a(18),d=a(107),p=a(27),f=a(402),g=a(1013),y=a(1014),b=a(1015),E=a(1016),_=a(161),v=a(114),k=a(1),w=a(76),C=a(47),S=a(10),x=a(29);function O(e){const t=p.b.Player(),[a,O]=Object(n.useState)(!1),[M,T]=Object(n.useState)(!1),[R,P]=Object(n.useState)(!1),[A,N]=Object(n.useState)(!1),[I,F]=Object(n.useState)(["------","------","------"]);let j=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:j=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 _.a.Field:t="Field work";break;case _.a.Hacking:t="Hacking contracts";break;case _.a.Security:t="Security work"}j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",s.a[e.sleeve.crimeType].type," (Success Rate:"," ",l.a.formatPercentage(s.a[e.sleeve.crimeType].successRate(e.sleeve)),").");break;case i.a.Class:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:j=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:j=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 D=[];if(e.sleeve.currentTask===i.a.Crime)D=[["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(D=[["Money:",r.a.createElement(d.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);D.push(["Reputation:",r.a.createElement(f.a,{reputation:5*a})])}return r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{container:!0,component:w.a},r.a.createElement(C.a,{item:!0,xs:3},r.a.createElement(g.a,{sleeve:e.sleeve}),r.a.createElement(S.a,{onClick:()=>O(!0)},"More Stats"),r.a.createElement(x.a,{title:t.money.lt(o.a.TravelCost)?r.a.createElement(k.a,null,"Insufficient funds"):""},r.a.createElement("span",null,r.a.createElement(S.a,{onClick:()=>P(!0),disabled:t.money.lt(o.a.TravelCost)},"Travel"))),r.a.createElement(x.a,{title:e.sleeve.shock<100?r.a.createElement(k.a,null,"Unlocked when sleeve has fully recovered"):""},r.a.createElement("span",null,r.a.createElement(S.a,{onClick:()=>N(!0),disabled:e.sleeve.shock<100},"Manage Augmentations")))),r.a.createElement(C.a,{item:!0,xs:5},r.a.createElement(E.a,{player:t,sleeve:e.sleeve,setABC:F}),r.a.createElement(k.a,null,j),r.a.createElement(k.a,null,e.sleeve.currentTask===i.a.Crime&&Object(c.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement(S.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(C.a,{item:!0,xs:4},r.a.createElement(v.a,{title:"Earnings (Pre-Synchronization)",rows:D}),r.a.createElement(S.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:()=>P(!1),sleeve:e.sleeve,rerender:e.rerender}),r.a.createElement(u.a,{open:A,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(531),o=a(20),s=a(18),l=a(40),c=a(27),u=a(1),m=a(29),h=a(76),d=a(32),p=a(10),f=a(189),g=a(238),y=a(42),b=a(65);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 _=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(p.a,{onClick:()=>function(a){e.sleeve.tryBuyAugmentation(t,a),E()}(a),disabled:t.money.lt(a.startingCost)},"Buy")),r.a.createElement(y.b,null,r.a.createElement(d.a,{display:"flex"},r.a.createElement(m.a,{title:a.stats||""},r.a.createElement(u.a,null,a.name)))),r.a.createElement(y.b,null,r.a.createElement(s.a,{money:a.startingCost,player:t})))))),_.length>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Owned Augmentations:"),_.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(7),o=a(18),s=a(388),l=a(22),c=a(14),u=a(15),m=a(27),h=a(40),d=a(1),p=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),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(d.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(p.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(114);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_skill))],["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(114),i=a(40),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_skill,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(18),i=a(0),o=a(114),s=a(40);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(69),o=a(74),s=a(9),l=a(22),c=a(25),u=a(161),m=a(111),h=a(79);const d=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],p=["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.keys(o.a),second:()=>["------"]}),"Take University Course":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumSummitUniversity];break;case l.a.Sector12:a=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:a=[s.a.VolhavenZBInstituteOfTechnology];break;default:a=["No university available in city!"]}return{first:d,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:p,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,d]=Object(n.useState)(t[2]),p=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)&&(d(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]);d(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},value:a},p.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){d(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(40),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 _}));var n=a(0),r=a.n(n),i=a(1019),o=a(1020),s=a(1021),l=a(248),c=a(86),u=a(1022),m=a(1024),h=a(1025),d=a(1026),p=a(37),f=a(57),g=a(24),y=a(1),b=a(47),E=a(10);function _(e){const[t,a]=Object(n.useState)(!1),_=Object(n.useState)(!1)[1];function v(){_(e=>!e)}const[k,w]=Object(n.useState)(p.c.x1);Object(n.useEffect)(()=>{const e=setInterval(v,200);return()=>clearInterval(e)},[]);let C,S=0;for(let t=0;tw(p.c.x1),()=>w(p.c.x5),()=>w(p.c.x10),()=>w(p.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:k,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:k,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(d.a,{cost:C,multiplier:k,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:S,player:e.player})),r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(m.a,{onClicks:x,purchaseMultiplier:k}))),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 y}));var n=a(0),r=a.n(n),i=a(37),o=a(57),s=a(18),l=a(107),c=a(1),u=a(47),m=a(76),h=a(10),d=a(42),p=a(189),f=a(238),g=a(65);function y(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let y,b,E;if(t.level>=i.a.MaxLevel)y=r.a.createElement(r.a.Fragment,null,"MAX LEVEL");else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);y=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.ram>=i.a.MaxRam)b=r.a.createElement(r.a.Fragment,null,"MAX RAM");else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);b=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.cores>=i.a.MaxCores)E=r.a.createElement(r.a.Fragment,null,"MAX CORES");else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);E=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,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(p.a,null,r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.name))),r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,"Production:")),r.a.createElement(d.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(d.b,null,r.a.createElement(c.a,null,"Level:")),r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.level)),r.a.createElement(d.b,null,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()}},y))),r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,"RAM:")),r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.ram,"GB")),r.a.createElement(d.b,null,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()}},b))),r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,"Cores:")),r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.cores)),r.a.createElement(d.b,null,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()}},E))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(37),o=a(57),s=a(18),l=a(212),c=a(532),u=a(1),m=a(47),h=a(76),d=a(10),p=a(42),f=a(189),g=a(238),y=a(65);function b(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let b,E,_,v;if(t.level>=i.b.MaxLevel)b=r.a.createElement(r.a.Fragment,null,"MAX LEVEL");else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);b=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.maxRam>=i.b.MaxRam)E=r.a.createElement(r.a.Fragment,null,"MAX RAM");else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);E=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.cores>=i.b.MaxCores)_=r.a.createElement(r.a.Fragment,null,"MAX CORES");else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);_=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.cache>=i.b.MaxCache)v=r.a.createElement(r.a.Fragment,null,"MAX CACHE");else{let n=0;if("MAX"===a)n=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;n=Math.min(e,a)}const l=t.calculateCacheUpgradeCost(n);v=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),e.player.money.lt(l)}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(p.b,null,r.a.createElement(u.a,null,t.hostname))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"Production:")),r.a.createElement(p.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(p.b,null,r.a.createElement(u.a,null,"Hash Capacity:")),r.a.createElement(p.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(p.b,null,r.a.createElement(u.a,null,"Level:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.level)),r.a.createElement(p.b,null,r.a.createElement(d.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()}},b))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"RAM:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.maxRam,"GB")),r.a.createElement(p.b,null,r.a.createElement(d.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()}},E))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"Cores:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.cores)),r.a.createElement(p.b,null,r.a.createElement(d.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()}},_))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"Cache Level:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.cache)),r.a.createElement(p.b,null,r.a.createElement(d.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)}},v))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(322),o=a(249),s=a(212),l=a(1023),c=a(40),u=a(27),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 d=t.hashManager;if(!(d 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:d,key:a.name,rerender:h})})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(57),o=a(631),s=a(15),l=a(151),c=a(212),u=a(1),m=a(76),h=a(10);function d(e){const[t,a]=Object(n.useState)("ecorp");const d=e.hashManager,p=e.upg,f=d.getUpgradeCost(p.name),g=d.upgrades[p.name],y=p.effectText(g),b=d.hashes>=f;return r.a.createElement(m.a,{sx:{p:1}},r.a.createElement(u.a,null,r.a.createElement(l.a,{value:p.name})),r.a.createElement(u.a,null,"Cost: ",r.a.createElement(c.a,{hashes:f}),", Bought: ",g," times"),r.a.createElement(u.a,null,p.desc),r.a.createElement(h.a,{onClick:function(){if(e.hashManager.hashes>=e.hashManager.getUpgradeCost(e.upg.name)){Object(i.m)(e.player,e.upg.name,t)||Object(s.a)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature upgrade affects."),e.rerender()}},disabled:!b},"Purchase"),g>0&&y&&r.a.createElement(u.a,null,y),p.hasTargetServer&&r.a.createElement(o.a,{value:t,serverType:o.b.Foreign,onChange:function(e){a(e.target.value)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(37),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 C=u.a[e.locName];if(null==C)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);const S=t.jobs[e.locName]?t.jobs[e.locName]:null,x=S?d.a[S]:null;t.location=e.locName;const O=null!=S,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: ",S),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:()=>_(!0)},"Quit"),r.a.createElement(b.a,{locName:e.locName,company:w,onQuit:k,open:E,onClose:()=>_(!1)})),r.a.createElement("br",null),w.hasAgentPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.a[0]],onClick:function(e){e.isTrusted&&(t.applyForAgentJob(),k())},text:"Apply for Agent Job"}),w.hasBusinessConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.c[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessConsultantJob(),k())},text:"Apply for Business Consultant Job"}),w.hasBusinessPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.b[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessJob(),k())},text:"Apply for Business Job"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.e[1]],onClick:function(e){e.isTrusted&&(t.applyForEmployeeJob(),k())},text:"Apply to be an Employee"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.g[1]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeEmployeeJob(),k())},text:"Apply to be a part-time Employee"}),w.hasITPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.d[0]],onClick:function(e){e.isTrusted&&(t.applyForItJob(),k())},text:"Apply for IT Job"}),w.hasSecurityPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.h[2]],onClick:function(e){e.isTrusted&&(t.applyForSecurityJob(),k())},text:"Apply for Security Job"}),w.hasSoftwareConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.k[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareConsultantJob(),k())},text:"Apply for Software Consultant Job"}),w.hasSoftwarePositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.j[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareJob(),k())},text:"Apply for Software Job"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.e[0]],onClick:function(e){e.isTrusted&&(t.applyForWaiterJob(),k())},text:"Apply to be a Waiter"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.g[0]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeWaiterJob(),k())},text:"Apply to be a part-time Waiter"}),null!=C.infiltrationData&&r.a.createElement(o.a,{onClick:function(t){if(!t.isTrusted)return;const n=C;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(27),o=a(40),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(7),o=a(24),s=a(18);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(351),o=a(18),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),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),Object(s.a)(n.createElement(n.Fragment,null,"You were healed to full health! The hospital billed you for ",n.createElement(o.a,{money:t})))}render(){const e=this.getCost();return n.createElement(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(29),o=a(74),s=a(4),l=a(27);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),d=o.a.BondForgery.successRate(e),p=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(d)," 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(p)," 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 m}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1033),l=a(9),c=a(27),u=a(15);function m(e){const t=c.b.Player(),a=c.b.Router(),m=Object(n.useState)(!1)[1],h=t.inBladeburner();function d(){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(u.a)("You have been accepted into the Bladeburner division!"),m(e=>!e);const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(u.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}function p(){a.toResleeves()}switch(e.loc.name){case l.a.NewTokyoVitaLife:return t.canAccessResleeving()?r.a.createElement(o.a,{onClick:p},"Re-Sleeve"):r.a.createElement(r.a.Fragment,null);case l.a.Sector12CityHall:return r.a.createElement((function(){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.")))}),null);case l.a.Sector12NSA:return function(){if(!t.canAccessBladeburner())return r.a.createElement(r.a.Fragment,null);const e=h?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return r.a.createElement(o.a,{onClick:d},e)}();case l.a.NewTokyoNoodleBar:return r.a.createElement(o.a,{onClick:function(){Object(u.a)(r.a.createElement(r.a.Fragment,null,"You ate some delicious noodles and feel refreshed."))}},"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 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)}();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(18),o=a(40),s=a(27),l=a(1),c=a(10),u=a(81);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,d]=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){d(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),e.onClose(),a.toCorporation())},disabled:""==h||!m},"Self-Fund (",r.a.createElement(i.a,{money:15e10,player:t}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1035),l=a(1036),c=a(1038),u=a(201),m=a(18),h=a(27),d=a(1039);function p(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 ",e.ram,"GB Server - ",r.a.createElement(m.a,{money:s,player:i})),r.a.createElement(d.a,{open:t,onClose:()=>a(!1),ram:e.ram,cost:s,rerender:e.rerender}),r.a.createElement("br",null))}function f(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(p,{key:t,ram:t,rerender:o}));return r.a.createElement(r.a.Fragment,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 m}));var n=a(0),r=a.n(n),i=a(10),o=a(29),s=a(7),l=a(201),c=a(18),u=a(226);function m(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(u.a,{tex:String.raw`\large{cost = 3.2 \times 10^3 \times 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 (",t.maxRam,"GB -> ",2*t.maxRam,"GB) - ",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(1037),s=a(7),l=a(18);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(7),r=a(24),i=a(113),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);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(29),s=a(18),l=a(226);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=1e9*Math.pow(7.5,t.cpuCores);return r.a.createElement(o.a,{title:r.a.createElement(l.a,{tex:String.raw`\large{cost = 10^9 \times 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),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 d}));var n=a(0),r=a.n(n),i=a(201),o=a(4),s=a(18),l=a(40),c=a(27),u=a(1),m=a(81),h=a(10);function d(e){const t=c.b.Player(),[a,d]=Object(n.useState)("");function p(){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&&p()},onChange:function(e){d(e.target.value)},type:"text",placeholder:"Unique Hostname",InputProps:{endAdornment:r.a.createElement(h.a,{onClick:p,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(7),o=a(18),s=a(40),l=a(27),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(29),i=a(10),o=a(7),s=a(24),l=a(18),c=a(27);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(),d=o.a.ClassDataStructuresBaseCost*h,p=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: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.ClassNetworks)}},"Take Networks 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.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(1043),l=a(1045),c=a(1046),u=a(1047);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(18),i=a(183),o=a(1044),s=a(457),l=a(1490),c=a(633),u=a(10),m=a(76),h=a(32),d=a(1),p=a(81);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())return;this.props.p.loseMoney(this.state.bet);const e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result: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{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===g.DealerWon?(t=-1*this.state.bet,this.win(this.props.p,-this.state.bet)):e===g.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),f(this,"isPlayerWinResult",e=>e===g.PlayerWon||e===g.PlayerWonByBlackjack),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(p.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(d.a,null,"$"))}}),n.createElement(d.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("pre",null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement("pre",null,"Value(s): "),b.map((e,t)=>n.createElement("pre",{key:t},e)))),n.createElement("br",null),n.createElement(h.a,{display:"flex"},n.createElement(m.a,{elevation:2},n.createElement("pre",null,"Dealer"),a.cards.map((e,t)=>n.createElement(c.a,{card:e,hidden:i&&0!==t,key:t})),!i&&n.createElement(n.Fragment,null,n.createElement("pre",null,"Value(s): "),E.map((e,t)=>n.createElement("pre",{key:t},e)))))),o!==g.Pending&&n.createElement(d.a,null,o,this.isPlayerWinResult(o)&&n.createElement(r.a,{money: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(217),r=a(444);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"},p))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(18),o=a(183),s=a(314),l=a(75),c=a(1),u=a(10),m=a(81);const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],d={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 p(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,_]=Object(n.useState)(0),[v,k]=Object(n.useState)(!0),[w,C]=Object(n.useState)({payout:0,match:()=>!1});function S(){v||_(Math.floor(37*Math.random()))}function x(n){Object(o.b)(e.p)||(g(!1),k(!1),b("playing"),C(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),k(!0),b(s),_(n),Object(o.b)(e.p)},1600))}return Object(n.useEffect)(()=>{const e=window.setInterval(S,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(p(3)))},"3")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(6)))},"6")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(9)))},"9")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(12)))},"12")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(15)))},"15")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(18)))},"18")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(21)))},"21")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(24)))},"24")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(27)))},"27")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(30)))},"30")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(33)))},"33")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(36)))},"36"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(2)))},"2")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(5)))},"5")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(8)))},"8")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(11)))},"11")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(14)))},"14")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(17)))},"17")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(20)))},"20")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(23)))},"23")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(26)))},"26")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(29)))},"29")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(32)))},"32")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(35)))},"35"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(1)))},"1")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(4)))},"4")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(7)))},"7")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(10)))},"10")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(13)))},"13")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(16)))},"16")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(19)))},"19")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(22)))},"22")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(25)))},"25")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(28)))},"28")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(31)))},"31")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(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(d.Third1))},"1 to 12")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Third2))},"13 to 24")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.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(d.Red))},"Red")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Black))},"Black")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Odd))},"Odd")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Even))},"Even")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.High))},"High")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Low))},"Low"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(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(18),o=a(314),s=a(183),l=a(75),c=a(1),u=a(81),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 d(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 p=[[[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),[_,v]=Object(n.useState)(!0),[k,w]=Object(n.useState)("waiting");function C(){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=S(),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 S(){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(C,50);return()=>clearInterval(e)});const O=S();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:!_,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),_&&(y([-1,-1,-1,-1,-1]),v(!1),setTimeout(x,2e3*t.random()+1e3)))})),disabled:!_},"Spin!")}}),r.a.createElement(c.a,{variant:"h4"},k),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 i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(e.content);return Object(n.useEffect)(()=>{let e=5;const n=setInterval(()=>{if(e--,e>0)return;e=5*Math.random();const n=Math.random()*t.length,r=t.charAt(n);a(function(e,t,a){return e.substring(0,t)+a+e.substring(t+1)}(t,n,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],a=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const n of a)if(n.includes(e))return t(n);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{a(t)},50)},100);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(129),i=a(9),o=a(221),s=a(14),l=a(27),c=a(1),u=a(10);function m(e,t){t.name===i.a.TravelAgency?e.toTravel():t.name===i.a.WorldStockExchange?e.toStockMarket():e.toLocation(t)}function h(e){const t=l.b.Router();return e?n.createElement("span",{"aria-label":e.name,key:e.name,style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:()=>m(t,e)},n.createElement("b",null,"X")):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:()=>m(t,o.a[e])},e),n.createElement("br",null)));return n.createElement(n.Fragment,null,a)}function f(){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(p,{city:t}):n.createElement(d,{city:t}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(27),o=a(505),s=a(1),l=a(29),c=a(10);function u(){const e=i.b.Player(),t=i.b.Router(),a=Object(n.useState)(!1)[1];function u(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(u,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{variant:"h4"},"Create program"),r.a.createElement(s.a,null,"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later."),Object(o.a)(e).map(a=>{const n=a.create;return null===n?r.a.createElement(r.a.Fragment,null):r.a.createElement(r.a.Fragment,{key:a.name},r.a.createElement(l.a,{title:n.tooltip},r.a.createElement(c.a,{sx:{my:1},onClick:r=>{r.isTrusted&&e.startCreateProgramWork(t,a.name,n.time,n.level)}},a.name)),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(40),o=a(10),s=a(32),l=a(1),c=a(111),u=a(142),m=a(79),h=a(81);function d(e){const[t,a]=Object(n.useState)(e.options.theme),[d,p]=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),defaultValue:e.options.theme},r.a.createElement(m.a,{value:"vs-dark"},"dark"),r.a.createElement(m.a,{value:"light"},"light"),r.a.createElement(m.a,{value:"monokai"},"monokai"))),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=>p(e.target.checked),checked:d})),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:d,fontSize:f}),e.onClose()}},"Save"))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(637),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(266),s=a(70),l=a(149),c=a(131),u=a(155),m=a(32),h=a(286),d=a(1068),p=a(287),f=a(492),g=a(477),y=a(444),b=a.n(y);function E({terminal:e}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},e.getProgressText())}const _=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%"}}));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 k(){const e=c.current;null!==e&&setTimeout(()=>e.scrollIntoView(!0),50)}Object(n.useEffect)(()=>p.b.subscribe(b.a.debounce(async()=>{u(e=>e+1)},25,{maxWait:50})),[]),Object(n.useEffect)(()=>p.a.subscribe(b.a.debounce(async()=>{v(e=>e+1)},25,{maxWait:50})),[]),k(),Object(n.useEffect)(()=>{setTimeout(k,50)},[]);const w=_();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)=>t instanceof h.b?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:w.preformatted},color:t.color,paragraph:!1},t.text)):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),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(d.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(131),s=a(155),l=a(81),c=a(29),u=a(92),m=a(1069),h=a(1071),d=a(14);const p=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=p();function _(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){_(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: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 _("");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=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(" "));const d=Object(h.a)(u,c,l,s);"string"==typeof d&&""!==d&&_(d),Array.isArray(d)&&b(d)}if(n.keyCode===u.a.L&&n.ctrlKey&&(n.preventDefault(),e.clear()),n.keyCode===u.a.UPARROW||d.a.EnableBashHotkeys&&n.keyCode===u.a.P&&n.ctrlKey){d.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;_(e.commandHistory[e.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.keyCode===u.a.DOWNARROW||d.a.EnableBashHotkeys&&n.keyCode===u.a.M&&n.ctrlKey){d.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,_("");else{++e.commandHistoryIndex;_(e.commandHistory[e.commandHistoryIndex])}}d.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&&_(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 _(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 _(r.substr(0,n)+r.substr(e))}}("backspace"),n.preventDefault()))}}})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(109),r=a(1070),i=a(139),o=a(259),s=a(123),l=a(24);const c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","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"];function u(e,t,a,u=""){let m=[];m=m.concat(Object.keys(i.b));const h=e.getCurrentServer(),d=e.getHomeComputer();let p="",f=null;function g(){for(const e of h.contracts)m.push(e.fn)}function y(){for(const e of h.messages)e instanceof s.a||m.push(e)}function b(){for(const e of d.programs)m.push(e)}function E(){for(const e of h.scripts){const t=k(e.filename);t&&m.push(t)}}function _(){for(const e of h.textFiles){const t=k(e.fn);t&&m.push(t)}}function v(){const e=Object(r.a)(h,null==f?"/":f);for(let t=0;t=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(149),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 l}));var n=a(0),r=a.n(n),i=a(1074),o=a(1075),s=a(1);function l(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(s.a,{variant:"h4"},"Active Scripts"),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(18),i=a(107),o=a(27),s=a(1),l=a(131),c=a(155),u=a(238),m=a(189),h=a(60),d=a(65);const p=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=p(),a=e.scriptProdSinceLastAug/(e.playtimeSinceLastAug/1e3);return n.createElement(u.a,{size:"small",classes:{root:t.size}},n.createElement(m.a,null,n.createElement(d.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(81),s=a(266),l=a(1198),c=a(255),u=a(24),m=a(14),h=a(536),d=a(1083),p=a.n(d);function f(e){const[t,a]=Object(n.useState)(""),[d,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 _=Object.values(E).filter(e=>e&&e.server.hostname.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(p.a,null),spellCheck:!1}}),r.a.createElement(s.a,{dense:!0},_.slice(d*g,d*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:_.length,rowsPerPage:g,page:d,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(305),o=a(99),s=a(76),l=a(32),c=a(210),u=a(71),m=a.n(u),h=a(136),d=a.n(h),p=a(1077),f=a(163);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(d.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(p.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(266),s=a(1198),l=a(536),c=a(14);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 A}));var n=a(0),r=a(4),i=a(238),o=a(60),s=a(65),l=a(189),c=a(10),u=a(32),m=a(76),h=a(1),d=a(98),p=a(1080),f=a.n(p),g=a(305),y=a(99),b=a(131),E=a(210),_=a(136),v=a.n(_),k=a(71),w=a.n(k),C=a(127),S=a(15),x=a(247),O=a(23),M=a(250),T=a(18),R=a(107);const P=Object(b.a)({noborder:{borderBottom:"none"}});function A(e){const t=P(),[a,p]=n.useState(!1),b=e.workerScript.scriptRef;const _=C.a.bind(null,b,b.server);const k=b.onlineMoneyMade/b.onlineRunningTime,A=b.onlineExpGained/b.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(g.a,{onClick:()=>p(e=>!e),component:m.a},n.createElement(y.a,{primary:n.createElement(h.a,null,"└ ",e.workerScript.name)}),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:k})))),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(A)+" 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.a.emit(b)}},"LOG"),n.createElement(d.a,{onClick:function(){_(),Object(S.a)("Killing script")}},n.createElement(f.a,{color:"error"})))))}},,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(25),o=a(117),s=a(1),l=a(32),c=a(149),u=a(10),m=a(189),h=a(42),d=a(65);function p(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(s.a,{variant:"h4"},"Factions"),r.a.createElement(s.a,null,"Lists all factions you have joined"),r.a.createElement("br",null),r.a.createElement(l.a,{display:"flex",flexDirection:"column"},e.player.factions.map(t=>r.a.createElement(c.a,{key:t,variant:"h6",onClick:()=>function(t){e.router.toFaction(t)}(i.a[t])},t))),r.a.createElement("br",null),e.player.factionInvitations.length>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{variant:"h5",color:"primary"},"Outstanding Faction Invitations"),r.a.createElement(s.a,null,"Lists factions you have been invited to. You can accept these faction invitations at any time."),r.a.createElement(h.a,{size:"small",padding:"none"},r.a.createElement(m.a,null,e.player.factionInvitations.map(e=>r.a.createElement(d.a,{key:e},r.a.createElement(h.b,null,r.a.createElement(s.a,{noWrap:!0},e)),r.a.createElement(h.b,{align:"right"},r.a.createElement(u.a,{onClick:a=>function(e,a){e.isTrusted&&(Object(o.d)(i.a[a]),t(e=>!e))}(a,e)},"Join!"))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1086),o=a(1090),s=a(1091),l=a(371),c=a(7),u=a(8),m=a(61),h=a(27),d=a(1092),p=a(1),f=a(10),g=a(1093);const y=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];function b({faction:e,rerender:t,onAugmentations:a}){const i=h.b.Player(),b=h.b.Router(),[E,_]=Object(n.useState)(!1),[v,k]=Object(n.useState)(!1),w=i,C=e.getInfo();const S=w.inGang()&&w.getGangName()===e.name,x=Math.floor(c.a.BaseFavorToDonate*u.a.RepToDonateToFaction),O=e.favor>=x,M="The Covenant"===e.name&&w.bitNodeN>=10&&m.a[10];let T=w.canAccessGang()&&y.includes(e.name);return w.inGang()&&(w.getGangName()!==e.name?T=!1:w.getGangName()===e.name&&(T=!0)),r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{onClick:()=>b.toFactions()},"Back"),r.a.createElement(p.a,{variant:"h4",color:"primary"},e.name),r.a.createElement(s.a,{faction:e,factionInfo:C}),T&&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 b.toGang();k(!0)}}),r.a.createElement(d.a,{facName:e.name,open:v,onClose:()=>k(!1)})),!S&&C.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(b,e)}(e)}),!S&&C.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(b,e)}(e)}),!S&&C.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(b,e)}(e)}),!S&&C.offersWork()&&r.a.createElement(o.a,{faction:e,p:i,rerender:t,favorToDonate:x,disabled:!O}),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}),M&&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:()=>_(!0)}),r.a.createElement(g.a,{open:E,onClose:()=>_(!1)})))}function E(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(b,{rerender:a,faction:o,onAugmentations:()=>l(!0)})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(1087),o=a(20),s=a(6),l=a(173),c=a(14),u=a(117),m=a(27),h=a(102),d=a(281),p=a(10),f=a(1),g=a(189),y=a(238);function b(e){const t=m.b.Player(),a=t.inGang()&&t.getGangName()===e.faction.name,b=Object(n.useState)(!1)[1];function E(){b(e=>!e)}function _(){if(a){const e=[];for(const t in o.a){o.a[t].isSpecial||e.push(t)}return e}return e.faction.augmentations.slice()}function v(e){c.a.PurchaseAugmentationsOrder=e,E()}const k=function(){switch(c.a.PurchaseAugmentationsOrder){case l.b.Cost:return function(){const e=_();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=_();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=_();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.gt(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=k.filter(e=>e===s.a.NeuroFluxGovernor||!t.augmentations.some(t=>t.name===e)&&!t.queuedAugmentations.some(t=>t.name===e)),C=(a,n=!1)=>r.a.createElement(i.a,{augName:a,faction:e.faction,key:a,p:t,rerender:E,owned:n}),S=w.map(e=>C(e));let x=r.a.createElement(r.a.Fragment,null);const O=k.filter(e=>!w.includes(e));return 0!==O.length&&(x=r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Purchased Augmentations"),r.a.createElement(f.a,null,"This factions also offers these augmentations but you already own them."),O.map(e=>C(e,!0)))),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{onClick:e.routeToMainPage},"Back"),r.a.createElement(f.a,{variant:"h4"},"Faction Augmentations"),r.a.createElement(f.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(d.a,{favor:e.faction.favor})),r.a.createElement(p.a,{onClick:()=>v(l.b.Cost)},"Sort by Cost"),r.a.createElement(p.a,{onClick:()=>v(l.b.Reputation)},"Sort by Reputation"),r.a.createElement(p.a,{onClick:()=>v(l.b.Default)},"Sort by Default Order"),r.a.createElement(p.a,{onClick:()=>v(l.b.Purchasable)},"Sort by Purchasable"),r.a.createElement("br",null),r.a.createElement(y.a,{size:"small",padding:"none"},r.a.createElement(g.a,null,S)),r.a.createElement(y.a,{size:"small",padding:"none"},r.a.createElement(g.a,null,x)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(117),o=a(1088),s=a(20),l=a(6),c=a(14),u=a(18),m=a(102),h=a(1089),d=a(10),p=a(1),f=a(29),g=a(32),y=a(42),b=a(65);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(p.a,null,r.a.createElement(u.a,{money:e.cost,player:e.p}))),r.a.createElement(y.b,{key:2},r.a.createElement(p.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(p.a,{color:"error"},"Requires"," ",t.prereqs.map((e,t)=>r.a.createElement(h.a,{key:t,name:e}))))}function _(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,_=Object(i.b)(u),v=e.faction.playerReputation>=h,k=0===u.baseCost||e.p.money.gt(u.baseCost*e.faction.getInfo().augmentationPriceMult),w=_&&v&&k?"primary":"error";let C=u.name;u.name===l.a.NeuroFluxGovernor&&(C+=" - Level "+Object(i.a)());let S=r.a.createElement(r.a.Fragment,null);return S="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(d.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(p.a,null,S),placement:"top"},r.a.createElement(p.a,null,C)))),!e.owned&&r.a.createElement(E,{key:2,augName:e.augName,p:e.p,cost:m,rep:h,hasReq:_,hasRep:v,hasCost:k}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(117),o=a(152),s=a(18),l=a(40),c=a(27),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(131),i=a(155);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(7),o=a(643),s=a(281),l=a(18),c=a(102),u=a(4),m=a(15),h=a(226),d=a(1),p=a(76),f=a(10),g=a(81);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.money.lt(t))}return r.a.createElement(p.a,{sx:{my:1,p:1,width:"100%"}},r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):b()?r.a.createElement(d.a,null,"This donation will result in ",r.a.createElement(c.a,{reputation:Object(o.a)(t,e.p)})," reputation gain"):e.p.money.lt(t)?r.a.createElement(d.a,null,"Insufficient funds"):r.a.createElement(d.a,null,"Invalid donate amount entered!")}),null),e.disabled?r.a.createElement(d.a,null,"Unlock donations at ",r.a.createElement(s.a,{favor:e.favorToDonate})," favor with ",e.faction.name):r.a.createElement(r.a.Fragment,null,r.a.createElement(g.a,{onChange:function(e){const t=u.a.parseMoney(e.target.value);""===e.target.value||isNaN(t)?a(null):a(t)},placeholder:"Donation amount",disabled:e.disabled,InputProps:{endAdornment:r.a.createElement(f.a,{onClick:function(){const a=e.faction,n=t;if(null===n)return;if(!b())return;e.p.loseMoney(n);const i=Object(o.a)(n,e.p);e.faction.playerReputation+=i,Object(m.a)(r.a.createElement(r.a.Fragment,null,"You just donated ",r.a.createElement(l.a,{money:n})," to ",a.name," to gain ",r.a.createElement(c.a,{reputation:i})," reputation.")),e.rerender()},disabled:e.disabled||!b()},"donate")}}),r.a.createElement(d.a,null,r.a.createElement(h.a,{tex:String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${y}}}`}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(102),o=a(281),s=a(226),l=a(131),c=a(155),u=a(1),m=a(29),h=a(32);const d=Object(l.a)(()=>Object(c.a)({noformat:{whiteSpace:"pre-wrap",lineHeight:"1em"}}));function p(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=d(),c=e.faction.getFavorGain()[0];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:e.faction.favor+c})," faction favor after installing an Augmentation."),r.a.createElement(s.a,{tex:String.raw`\large{r = \text{total faction reputation}}`}),r.a.createElement(s.a,{tex:String.raw`\large{favor=\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.a,{tex:String.raw`\large{r = reputation}`}),r.a.createElement(s.a,{tex:String.raw`\large{\Delta r = \Delta r \times \frac{100+favor}{100}}`}))},r.a.createElement(u.a,null,"Faction Favor: ",r.a.createElement(o.a,{favor: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(40),o=a(27),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 p}));var n=a(0),r=a.n(n),i=a(1094),o=a(285),s=a(412),l=a(18),c=a(40),u=a(27),m=a(15),h=a(1),d=a(10);function p(e){const t=u.b.Player(),[a,p]=Object(n.useState)(0);function f(){return(t.sleevesFromCovenant+1)*s.a}function g(){p(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()),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(18),s=a(1),l=a(81),c=a(10),u=a(32),m=a(76);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 d=h(),p=!e.p.canAfford(d);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:d,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);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:p,onClick:function(){const a=h();e.p.canAfford(a)&&(e.sleeve.upgradeMemory(t),e.p.loseMoney(a),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(23),s=a(8),l=a(61),c=a(201),u=a(37),m=a(114),h=a(18),d=a(27),p=a(198),f=a(1),g=a(32),y=a(98),b=a(1096),E=a.n(b),_=a(40),v=a(189),k=a(42),w=a(65);function C(){const e=d.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 S(){const e=d.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=d.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=d.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=d.b.Player();return e.intelligence>0&&(5===e.bitNodeN||l.a[5]>0)?r.a.createElement(w.a,null,r.a.createElement(k.b,null,r.a.createElement(f.a,null,"Intelligence: ")),r.a.createElement(k.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(k.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(k.b,{key:"0"},r.a.createElement(f.a,{noWrap:!0},e[0]+" multiplier:"," ")),r.a.createElement(k.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(k.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=d.b.Player();return e.canAccessBladeburner()?r.a.createElement(T,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}):r.a.createElement(r.a.Fragment,null)}function P(){const e=d.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,": ",p.a[t].name),r.a.createElement(f.a,{sx:{mx:2},style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},p.a[t].info))}return r.a.createElement(r.a.Fragment,null)}function A({open:e,onClose:t}){const a=d.b.Player();function n(e){const t=[["Total:",r.a.createElement(h.a,{money:e.total})]];return e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(h.a,{money:e.bladeburner})]),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.hacknetnode&&t.push(["Hacknet Nodes:",r.a.createElement(h.a,{money:e.hacknetnode})]),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.stock&&t.push(["Stock Market:",r.a.createElement(h.a,{money:e.stock})]),e.casino&&t.push(["Casino:",r.a.createElement(h.a,{money:e.casino})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(h.a,{money:e.sleeves})]),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(_.a,{open:e,onClose:t},i)}function N(){const e=d.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 p=[["Time played since last Augmentation:",Object(o.b)(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&p.push(["Time played since last Bitnode destroyed:",Object(o.b)(e.playtimeSinceLastBitnode)]),p.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(C,null),r.a.createElement(S,null),r.a.createElement(x,null),r.a.createElement(f.a,null,"Money: ",r.a.createElement(h.a,{money:e.money.toNumber()}),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(k.a,{size:"small",padding:"none"},r.a.createElement(v.a,null,r.a.createElement(w.a,null,r.a.createElement(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Hacking: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.hacking_skill)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Strength: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.strength)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Defense: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.defense)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Dexterity: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.dexterity)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Agility: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.agility)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Charisma: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.charisma)," ")),r.a.createElement(k.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:p})),r.a.createElement("br",null),r.a.createElement(P,null),r.a.createElement(A,{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 k}));var n=a(0),r=a.n(n),i=a(251),o=a(7),s=a(18),l=a(1),c=a(149),u=a(10),m=a(29),h=a(98),d=a(256),p=a.n(d),f=a(358),g=a.n(f),y=a(390);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)()),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),e.rerender())}},"Buy WSE Account - ",r.a.createElement(s.a,{money:t,player:e.p})))}function _(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),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)()),e.rerender())}},"Buy 4S Market Data Access - ",r.a.createElement(s.a,{money:t,player:e.p}))))}}function k(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(_,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(p.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(372),s=a(128);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(458),u=a(1105),m=a(184),h=a(94),d=a(66),p=a(61),f=a(4),g=a(18),y=a(15),b=a(32),E=a(81),_=a(79),v=a(111),k=a(305),w=a(99),C=a(76),S=a(210),x=a(71),O=a.n(x),M=a(136),T=a.n(M);function R(e){const[t,a]=Object(r.useState)(n.Market),[x,M]=Object(r.useState)(d.a.Long),[R,P]=Object(r.useState)(""),[A,N]=Object(r.useState)(!1),[I,F]=Object(r.useState)(!1),[j,D]=Object(r.useState)({text:"",placeText:"",place:()=>!1});function B(){return Math.round(parseFloat(R))}function L(){return 8===e.p.bitNodeN||p.a[8]>=3}return i.a.createElement(b.a,{component:C.a},i.a.createElement(k.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(S.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){P(e.target.value)},placeholder:"Quantity (Shares)",value:R}),i.a.createElement(v.a,{onChange:function(e){e.target.value===d.a.Short?M(d.a.Short):M(d.a.Long)},value:x},i.a.createElement(_.a,{value:d.a.Long},"Long"),(8===e.p.bitNodeN||p.a[8]>=2)&&i.a.createElement(_.a,{value:d.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(_.a,{value:n.Market},n.Market),L()&&i.a.createElement(_.a,{value:n.Limit},n.Limit),L()&&i.a.createElement(_.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===d.a.Short?e.buyStockShort(e.stock,a):e.buyStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),D({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),D({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===d.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===d.a.Short?e.sellStockShort(e.stock,a):e.sellStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),D({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),D({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===d.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===d.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.toNumber(),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===d.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===d.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:j.text,placeText:j.placeText,place:j.place,open:A,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(644),i=a(14),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 d="primary";return t.lastPrice===t.price?d="secondary":t.lastPrice>t.price&&(d="error"),n.createElement(s.a,{style:{whiteSpace:"pre"},color:d},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(40),o=a(1),s=a(81),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(61),o=a(198),s=a(224),l=a(1107),c=a(446),u=a(27),m=a(131),h=a(155),d=a(1),p=a(29);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(p.a,{title:r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | O O | O O | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | / __| \\ | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | O | | O / | O | | O | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | |_/ | | \\| / | \\_| | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| / \\| | / / \\ |/ "),r.a.createElement(d.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(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | / / \\ \\ | | | "),r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ | / / | | \\ \\ | / "),r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\|| | | | | | | | | ||/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| \\_ | | | | | | _/ |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\| / \\ / \\ |/ / "),r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | | "),r.a.createElement(d.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(198),o=a(27),s=a(40),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 S}));var n=a(0),r=a.n(n),i=a(131),o=a(155),s=a(4),l=a(102),c=a(238),u=a(189),m=a(60),h=a(65),d=a(76),p=a(32),f=a(1),g=a(10),y=a(98),b=a(1110),E=a.n(b),_=a(14),v=a(27);function k(){const e=v.b.Player(),t=C();return 0===e.intelligence?r.a.createElement(r.a.Fragment,null):r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:t.cell}},r.a.createElement(f.a,{classes:{root:t.int}},"Int ")),r.a.createElement(m.a,{align:"right",classes:{root:t.cell}},r.a.createElement(f.a,{classes:{root:t.int}},s.a.formatSkill(e.intelligence))),r.a.createElement(m.a,{align:"right",classes:{root:t.cell}},r.a.createElement(f.a,{id:"overview-int-hook",classes:{root:t.int}})))}function w(){const e=v.b.Player(),t=v.b.Router(),a=C();return!e.isWorking||e.focus?r.a.createElement(r.a.Fragment,null):r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",colSpan:2,classes:{root:a.cellNone}},r.a.createElement(f.a,null,"Work in progress:"))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",colSpan:2,classes:{root:a.cellNone}},r.a.createElement(f.a,null,"+",r.a.createElement(l.a,{reputation:e.workRepGained})," rep"))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",align:"center",colSpan:2,classes:{root:a.cellNone}},r.a.createElement(g.a,{onClick:()=>{e.startFocusing(),t.toWork()}},"Focus"))))}const C=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 S({save:e}){const t=v.b.Player(),a=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),600);return()=>clearInterval(e)},[]);const i=C();return r.a.createElement(d.a,{square:!0},r.a.createElement(p.a,{m:1},r.a.createElement(c.a,{size:"small"},r.a.createElement(u.a,null,r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.hp}},"HP ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.hp}},s.a.formatHp(t.hp)," / ",s.a.formatHp(t.max_hp))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-hp-hook",classes:{root:i.hp}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.money}},"Money ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.money}},s.a.formatMoney(t.money.toNumber()))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-money-hook",classes:{root:i.money}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.hack}},"Hack ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.hack}},s.a.formatSkill(t.hacking_skill))),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-hack-hook",classes:{root:i.hack}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},"Str ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.strength))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-str-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},"Def ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.defense))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-def-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},"Dex ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.dexterity))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-dex-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.combat}},"Agi ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.agility))),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-agi-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.cha}},"Cha ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.cha}},s.a.formatSkill(t.charisma))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-cha-hook",classes:{root:i.cha}}))),r.a.createElement(k,null),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-extra-hook-0",classes:{root:i.hack}})),r.a.createElement(m.a,{component:"th",scope:"row",align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-extra-hook-1",classes:{root:i.hack}})),r.a.createElement(m.a,{component:"th",scope:"row",align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-extra-hook-2",classes:{root:i.hack}}))),r.a.createElement(w,null),r.a.createElement(h.a,null,r.a.createElement(m.a,{align:"center",colSpan:2,classes:{root:i.cellNone}},r.a.createElement(y.a,{onClick:e},r.a.createElement(E.a,{color:0!==_.a.AutosaveInterval?"primary":"error"}))))))))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(27),o=a(446),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 s}));var n=a(0),r=a.n(n),i=a(27),o=a(213);function s(){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=window.getComputedStyle(t.target).display,n=window.getComputedStyle(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";function n(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(13),r=a(447),i=a(73),o=a(205),s=a(185);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}},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(e){a.updateDynamicRam("getMemberInformation",Object(n.c)("gang","getMemberInformation")),l("getMemberInformation");const t=c("getMemberInformation",e);return{name:t.name,task:t.task,earnedRespect:t.earnedRespect,hack:t.hack,str:t.str,def:t.def,dex:t.dex,agi:t.agi,cha:t.cha,hack_exp:t.hack_exp,str_exp:t.str_exp,def_exp:t.def_exp,dex_exp:t.dex_exp,agi_exp:t.agi_exp,cha_exp:t.cha_exp,hack_mult:t.hack_mult,str_mult:t.str_mult,def_mult:t.def_mult,dex_mult:t.dex_mult,agi_mult:t.agi_mult,cha_mult:t.cha_mult,hack_asc_mult:t.calculateAscensionMult(t.hack_asc_points),str_asc_mult:t.calculateAscensionMult(t.str_asc_points),def_asc_mult:t.calculateAscensionMult(t.def_asc_points),dex_asc_mult:t.calculateAscensionMult(t.dex_asc_points),agi_asc_mult:t.calculateAscensionMult(t.agi_asc_points),cha_asc_mult:t.calculateAscensionMult(t.cha_asc_points),hack_asc_points:t.hack_asc_points,str_asc_points:t.str_asc_points,def_asc_points:t.def_asc_points,dex_asc_points:t.dex_asc_points,agi_asc_points:t.agi_asc_points,cha_asc_points:t.cha_asc_points,upgrades:t.upgrades.slice(),augmentations:t.augmentations.slice()}},canRecruitMember:function(){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("recruitMember",`Successfully recruited Gang Member '${r}'`):t.log("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("setMemberTask",`Successfully assigned Gang Member '${e}' to '${r}' task`):t.log("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);return Object.assign({},t.mults)},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("purchaseEquipment",`Purchased '${i}' for Gang member '${r}'`):t.log("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)},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("setTerritoryWarfare","Engaging in Gang Territory Warfare")):(i.territoryWarfareEngaged=!1,t.log("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 c}));var n=a(521),r=a(205),i=a(185),o=a(73),s=a(21);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class c{constructor(e=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.a.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof n.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=4*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.respect)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*a*n*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.5*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.wanted)/100);if(isNaN(n)||n<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*a*n;const r=7*t.baseWanted/Math.pow(3*a*n,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.2*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.money)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*a*n*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.a.Unassigned)return;const a=Math.pow(t.difficulty,.9)*e,n=this.expMult();this.hack_exp+=t.hackWeight/1500*a*n.hack,this.str_exp+=t.strWeight/1500*a*n.str,this.def_exp+=t.defWeight/1500*a*n.def,this.dex_exp+=t.dexWeight/1500*a*n.dex,this.agi_exp+=t.agiWeight/1500*a*n.agi,this.cha_exp+=t.chaWeight/1500*a*n.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}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=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")),c("getNumSleeves"),e.sleeves.length},setToShockRecovery:function(t=0){const r=a.number("setToShockRecovery","sleeveNumber",t);return a.updateDynamicRam("setToShockRecovery",Object(n.c)("sleeve","setToShockRecovery")),c("setToShockRecovery"),u("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")),c("setToSynchronize"),u("setToSynchronize",r),e.sleeves[r].synchronize(e)},setToCommitCrime:function(t=0,r=""){const i=a.number("setToCommitCrime","sleeveNumber",t),o=a.string("setToUniversityCourse","crimeName",r);return a.updateDynamicRam("setToCommitCrime",Object(n.c)("sleeve","setToCommitCrime")),c("setToCommitCrime"),u("setToCommitCrime",i),e.sleeves[i].commitCrime(e,o)},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")),c("setToUniversityCourse"),u("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")),c("travel"),u("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")),c("setToCompanyWork"),u("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,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()},getTrainingMult:function(){return!!Object(r.g)(e)&&e.hashManager.getTrainingMult()}}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(140),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1120);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let uurls=[];const script=workerScript.getScript();if(null===script)throw new Error("script is null");shouldCompile(script,scripts)&&(script.markUpdated(),uurls=_getScriptUrls(script,scripts,[]),script.url=uurls[uurls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(uurls[uurls.length - 1].url)"))),script.dependencies=uurls);const loadedModule=await script.module,ns=workerScript.env.vars;if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,script.filename+" cannot be run because it does not have a main function.");return loadedModule.main(ns)}function shouldCompile(e,t){return""===e.module||e.dependencies.some(a=>{const n=t.find(e=>e.filename==a.filename);if(!n)return!0;return n.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,a){const n=[];a.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,a);return n.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',n.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.a(e.filename,URL.createObjectURL(makeScriptBlob(r)))),n}catch(e){for(const e in n)URL.revokeObjectURL(e);throw e}finally{a.pop()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(14);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";a.d(t,"a",(function(){return i}));var n=a(318),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_skill?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(436),r=a(103),i=a(24);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 o}));var n=a(229),r=a(123),i=a(493);function o(e,t,a,o,s){if(1!==s.length)return void e.error("Incorrect usage of cat command. Usage: cat [file]");const l=e.getFilepath(s[0]+"");if(l.endsWith(".msg")||l.endsWith(".lit")||l.endsWith(".txt")){if(l.endsWith(".msg")||l.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.i)(t),r=Object(n.a)(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(225),r=a(101);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(113);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;ti.a.saveAs(e,a))}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(48);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_skill?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(48);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_skill?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(646);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(127);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("number"==typeof i[0]){const t=i[0];return void(Object(n.a)(t)?e.print("Killing script with PID "+t):e.print(`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(127),r=a(255);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 i}));var n=a(123),r=a(109);function i(e,t,a,i,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(r.a)(o[0]+"",e.cwd());if(u=t||"",null!=u&&(u.endsWith("/")||(u+="/"),!Object(r.f)(u)))return l()}"/"===u&&(u="");const m=[],h=[],d=[],p=[],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(r.d)(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,d);for(const e of b.contracts)y(e.fn,p);for(const e of b.messages)e instanceof n.a?y(e.filename,f):y(e,f);function E(t){const a=Math.max(...t.map(e=>e.length))+1,n=Math.floor(80/a);for(let r=0;re.segments.length>0);for(let t=0;t<_.length;t++)0!==t&&(e.print(""),e.print("")),E(_[t].segments)}},function(e,t,a){"use strict";function n(e,t,a){e.print(a.getCurrentServer().cpuCores+" Core(s)")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4);function r(e,t,a,r,i){try{if(1!==i.length&&3!==i.length)return void e.error("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=i[0]+"";let r=1;if(3===i.length&&"-t"===i[1]&&(r=Math.round(parseInt(i[2]+"")),isNaN(r)||r<1))return void e.error("Invalid number of threads specified. Number of threads must be greater than 1");const o=e.getScript(a,t);if(null==o)return void e.error("No such script exists!");const s=o.ramUsage*r;e.print(`This script requires ${n.a.formatRAM(s)} of RAM to run for ${r} thread(s)`)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(101),r=a(227);function i(e,t,a,i,o){if(2===o.length)try{const t=o[0]+"",s=o[1]+"";if(!Object(n.a)(t)&&!t.endsWith(".txt"))return void e.error("'mv' can only be used on scripts and text files (.txt)");const l=e.getFile(a,t);if(null==l)return void e.error(`Source file ${t} does not exist`);const c=e.getFilepath(t),u=e.getFilepath(s),m=e.getFile(a,s);if(Object(n.a)(t)){const t=l;if(!Object(n.a)(s))return void e.error("Source and destination files must have the same type");if(i.isRunning(c))return void e.error("Cannot use 'mv' on a script that is running");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.filename=u}else if(l instanceof r.a){const t=l;if(!s.endsWith(".txt"))return void e.error("Source and destination files must have the same type");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.fn=u}}catch(t){e.error(t+"")}else e.error("Incorrect number of arguments. Usage: mv [src] [dest]")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(101);function r(e,t,a,r,i){if(1===i.length)try{const r=i[0]+"";if(Object(n.a)(r)){const n=e.getFilepath(r),i=e.getScript(a,r);if(null==i){let e="";(r.endsWith(".ns")||r.endsWith(".js"))&&(e="export async function main(ns) {\n\n}"),t.toScriptEditor(n,e)}else t.toScriptEditor(n,i.code)}else{if(!r.endsWith(".txt"))return void e.error("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const n=e.getFilepath(r),i=e.getTextFile(a,r);null==i?t.toScriptEditor(n):t.toScriptEditor(n,i.text)}}}catch(t){e.error(t+"")}else e.error("Incorrect usage of nano command. Usage: nano [scriptname]")}},function(e,t,a){"use strict";function n(e,t,a,n,r){if(0===r.length)for(let t=0;t0?d:1,g=h._;if(null==Object(o.a)(u,g,l)){for(let t=0;ts)return void e.print("This machine does not have enough RAM to run this script with "+f+" threads. Script requires "+o+"GB of RAM");const c=new i.a(a,g);c.threads=f;return Object(r.e)(c,l)?(e.print(`Running script with ${f} thread(s), pid ${c.pid} and args: ${JSON.stringify(g)}.`),void(p&&n.a.emit(c))):void e.error("Failed to start script")}e.print("ERROR: No such script")}else e.print("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(68);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.print("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(113);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(68);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 o}));var n=a(123),r=a(24),i=a(101);function o(e,t,a,o,s){try{if(2!==s.length)return void e.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e.getFilepath(s[0]+"");if(!t.endsWith(".lit")&&!Object(i.a)(t)&&!t.endsWith(".txt"))return void e.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const a=Object(r.d)(s[1]+"");if(null==a)return void e.error(`Invalid destination. ${s[1]} not found`);if(t.endsWith(".lit")){let r=!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{const t=Object(n.b)(l[0],s);if(null==t)return void e.error("No such script exists");o.a.emit(t)}}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(537),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_skill?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(101);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.print("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.print("wget failed")}),"text").fail((function(e){return t.error("wget failed: "+JSON.stringify(e))}))}}).call(this,a(666))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(213);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.r(t);var n=a(0),r=a.n(n),i=a(105),o=a.n(i),s=a(282),l=a(602);function c(){Object(s.c)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root"))}o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root")),s.b.subscribe(c)}]); + */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 d=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(122),o=a(40),s=a(1),l=a(10);const c=new i.a;function u(){const[e,t]=Object(n.useState)(null);return Object(n.useEffect)(()=>c.subscribe(e=>{t(e)}),[]),r.a.createElement(r.a.Fragment,null,null!=e&&r.a.createElement(o.a,{open:!0,onClose:function(){null!==e&&(e.resolve(!1),t(null))}},r.a.createElement(s.a,null,e.txt),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!0),t(null))}},"Yes"),r.a.createElement(l.a,{onClick:function(){null!==e&&(e.resolve(!1),t(null))}},"No")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c})),a.d(t,"b",(function(){return u}));var n=a(0),r=a.n(n),i=a(1443),o=a(122),s=a(1),l=a(76);const c=new o.a;function u(){const[e,t]=Object(n.useState)(!1);return Object(n.useEffect)(()=>c.subscribe(()=>t(!0))),r.a.createElement(i.a,{open:e,anchorOrigin:{vertical:"top",horizontal:"center"},autoHideDuration:2e3,onClose:()=>t(!1)},r.a.createElement(l.a,{sx:{p:2}},r.a.createElement(s.a,null,"Game Saved!")))}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(68);function r(e){const t=[];for(const a in n.a){const r=n.a[a].create;null!=r&&(e.hasProgram(n.a[a].name)||r.req(e)&&t.push(n.a[a]))}return t}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(6),o=a(305),s=a(99),l=a(32),c=a(1),u=a(76),m=a(210),h=a(71),d=a.n(h),p=a(136),f=a.n(p);function g(e){const[t,a]=Object(n.useState)(!1);let h=e.aug.name;return null!=e.level&&e.aug.name===i.a.NeuroFluxGovernor&&(h+=" - Level "+e.level),"string"==typeof e.aug.info?r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,{dangerouslySetInnerHTML:{__html:e.aug.info}}),e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,e.aug.stats))))):r.a.createElement(l.a,{component:u.a},r.a.createElement(o.a,{onClick:()=>a(e=>!e)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},h)}),t?r.a.createElement(f.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,null,e.aug.info,e.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),e.aug.stats)))))}},,,,,,function(e,t,a){"use strict";function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}a.d(t,"a",(function(){return r}));class r{constructor(e,t){n(this,"lvl",1),n(this,"n",1),this.n=e,this.lvl=t}}},function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return i}));var n=a(0);const r=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},n.createElement("g",null,n.createElement("path",{d:"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z"}),n.createElement("path",{d:"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z"}))),i=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},n.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),n.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),n.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),n.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(55),o=a(27),s=a(1),l=a(29),c=a(32),u=a(98),m=a(517),h=a.n(m),d=a(518),p=a.n(d);function f({action:e,isActive:t,bladeburner:a,rerender:n}){const m=o.b.Player(),d=e.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(u.a,{disabled:!d,onClick:function(){d&&(++e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(h.a,null))),r.a.createElement(l.a,{title:t?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement(u.a,{disabled:!f,onClick:function(){f&&(--e.level,t&&a.startAction(m,a.action),n())}},r.a.createElement(p.a,null))))}},,,function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1),o=a(29),s=a(32),l=a(142);function c(e){return r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(o.a,{title:r.a.createElement(i.a,null,"Automatically increase operation level when possible")},r.a.createElement(i.a,null," Autolevel:")),r.a.createElement(l.a,{checked:e.action.autoLevel,onChange:function(t){e.action.autoLevel=t.target.checked,e.rerender()}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(883),o=a(23),s=a(10);function l(e){const[t,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{disabled:0===e.bladeburner.teamSize,onClick:()=>a(!0)},"Set Team Size (Curr Size: ",Object(o.c)(e.action.teamCount,0),")"),r.a.createElement(i.a,{open:t,onClose:()=>a(!1),action:e.action,bladeburner:e.bladeburner}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t,a,n,r){this.name=e,this.desc=t,this.isHacking=a,this.isCombat=n,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){const[e,t]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{const e=setInterval(()=>t(e=>!e),1e3);return()=>clearInterval(e)}),r.a.createElement(r.a.Fragment,null,e?"|":"")}},function(e,t,a){"use strict";a.d(t,"b",(function(){return l})),a.d(t,"a",(function(){return c}));var n=a(967),r=a(20),i=a(313),o=a(6),s=a(30);function l(e,t){const a=e.getCost();if(!t.canAfford(a))return!1;t.loseMoney(a),t.hacking_exp=e.hacking_exp,t.strength_exp=e.strength_exp,t.defense_exp=e.defense_exp,t.dexterity_exp=e.dexterity_exp,t.agility_exp=e.agility_exp,t.charisma_exp=e.charisma_exp;for(const e in r.a)r.a[e].owned=!1;for(let e=t.augmentations.length-1;e>=0;--e)t.augmentations[e].name!==o.a.NeuroFluxGovernor?t.augmentations.splice(e,1):r.a[o.a.NeuroFluxGovernor].owned=!0;for(let a=0;a=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;ee.name),o=[];function s(e){return e.name!==r.a.NeuroFluxGovernor&&(!a.includes(e.name)&&(!o.includes(e)&&!e.isSpecial))}if(t.inGang()){const e=t.getGangFaction();for(const t in n.a){const a=n.a[t];s(a)&&(e.playerReputation>a.baseRepRequirement&&o.push(a))}return o}for(const e of t.factions){if("Bladeburners"===e)continue;if("Netburners"===e)continue;const t=i.a[e];if(null!=t)for(const e of t.augmentations){const a=n.a[e];s(a)&&(t.playerReputation>a.baseRepRequirement&&o.push(a))}}return o}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(4),o=a(212);function s({hashes:e}){return r.a.createElement(o.a,{hashes:i.a.formatHashes(e)+" / sec"})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(22),o=a(1040),s=a(7),l=a(14),c=a(27),u=a(18),m=a(388),h=a(15),d=a(1),p=a(32),f=a(10);function g(e,t,a){const n=s.a.TravelCost;e.canAfford(n)&&(e.loseMoney(n),e.travel(a),Object(h.a)(r.a.createElement(r.a.Fragment,null,"You are now in ",a,"!")),t.toCity())}function y(e){const t=c.b.Player(),a=c.b.Router(),h=Object(n.useState)(!1)[1],[y,b]=Object(n.useState)(!1),[E,_]=Object(n.useState)(i.a.Sector12);function v(){h(e=>!e)}function k(e){const n=s.a.TravelCost;t.canAfford(n)&&(l.a.SuppressTravelConfirmation?g(t,a,e):(b(!0),_(e)))}return Object(n.useEffect)(()=>{const e=setInterval(v,1e3);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{variant:"h4"},"Travel Agency"),r.a.createElement(p.a,{mx:2},r.a.createElement(d.a,null,"From here, you can travel to any other city! A ticket costs"," ",r.a.createElement(u.a,{money:s.a.TravelCost,player:e.p}),"."),l.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(i.a).filter(t=>t!=e.p.city).map(e=>{if(void 0===Object.entries(i.a).find(t=>t[1]===e))throw new Error(`could not find key for city '${e}'`);return r.a.createElement(r.a.Fragment,{key:e},r.a.createElement(f.a,{onClick:()=>k(e),sx:{m:2}},r.a.createElement(d.a,null,"Travel to ",e)),r.a.createElement("br",null))})):r.a.createElement(m.a,{currentCity:e.p.city,onTravel:e=>k(e)})),r.a.createElement(o.a,{city:E,travel:()=>g(t,a,E),open:y,onClose:()=>b(!1)}))}},function(e,t,a){"use strict";a.d(t,"b",(function(){return P})),a.d(t,"a",(function(){return F}));var n=a(0),r=a.n(n),i=a(1051),o=a(1064),s=a(1065),l=a(109),c=a(15),u=a(101),m=a(321),h=a(227),d=a(491),p=a(261),f=a(4),g=a(635),y=a(636),b=a(438),E=a(14),_=a(39),v=a(10),k=a(1),w=a(149),C=a(32),S=a(81),x=a(98),O=a(507),M=a.n(O);let T=!1,R=[];function P(){const e=Object(b.a)({});R=function e(t){let a=[];const n=Object.keys(t);for(const r of n)"object"==typeof t[r]&&(a.push(r),a=a.concat(e(t[r]))),"function"==typeof t[r]&&a.push(r);return a}(e);const t=["heart","break","exploit","bypass","corporation"];R=R.filter(e=>!t.includes(e))}let A="",N="",I=null;function F(e){const t=Object(n.useRef)(null),[a,b]=Object(n.useState)(e.filename?e.filename:A),[O,P]=Object(n.useState)(e.filename?e.code:N),[F,j]=Object(n.useState)("RAM: ???"),[D,B]=Object(n.useState)(!1),[L,G]=Object(n.useState)({theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize});function W(){if(null!==t.current){const e=t.current.getPosition();null!==e&&g.a.saveCursor(a,{row:e.lineNumber,column:e.column})}if(I=null,_.a.isRunning&&_.a.currStep===_.f.TerminalTypeScript){if("n00dles.script"!==a)return void Object(c.a)("Leave the script name as 'n00dles'!");if(-1==O.replace(/\s/g,"").indexOf("while(true){hack('n00dles');}"))return void Object(c.a)("Please copy and paste the code from the tutorial!");const t=e.player.getCurrentServer();if(null===t)throw new Error("Server should not be null but it is.");let n=!1;for(let r=0;r0)){switch(a){case p.a.ImportError:j("RAM: Import Error");break;case p.a.URLImportError:j("RAM: HTTP Import Error");break;case p.a.SyntaxError:default:j("RAM: Syntax Error")}return new Promise(()=>{})}j("RAM: "+f.a.formatRAM(a))}return Object(n.useEffect)(()=>{void 0!==e.filename&&(A=e.filename,N=e.code,I=null)},[]),Object(n.useEffect)(()=>{const e=setInterval(H,1e3);return()=>clearInterval(e)},[O]),Object(n.useEffect)(()=>{function e(e){E.a.DisableHotkeys||66==e.keyCode&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),W())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(S.a,{type:"text",tabIndex:1,value:a,onChange:function(e){A=e.target.value,b(e.target.value)},InputProps:{startAdornment:r.a.createElement(k.a,null,"Script name: ")}}),r.a.createElement(x.a,{onClick:()=>B(!0)},r.a.createElement(r.a.Fragment,null,r.a.createElement(M.a,null),"options"))),r.a.createElement(i.a,{beforeMount:function(e){T||(T=!0,e.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const t=[];for(const a of R)t.push({label:a,kind:e.languages.CompletionItemKind.Function,insertText:a,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:t}}}),e.languages.typescript.javascriptDefaults.addExtraLib(y.a,"netscript.d.ts"),e.languages.typescript.typescriptDefaults.addExtraLib(y.a,"netscript.d.ts"))},onMount:function(e){if(t.current=e,null===t.current)return;const n=g.a.getCursor(a);-1!==n.row?t.current.setPosition({lineNumber:n.row,column:n.column}):null!==I&&t.current.setPosition({lineNumber:I.lineNumber,column:I.column+1}),t.current.focus()},loading:r.a.createElement(k.a,null,"Loading script editor!"),height:"90%",defaultLanguage:"javascript",defaultValue:O,onChange:function(e){void 0!==e&&(N=e,null!==t.current&&(I=t.current.getPosition()),P(e))},theme:L.theme,options:L}),r.a.createElement(C.a,{display:"flex",flexDirection:"row",sx:{m:1},alignItems:"center"},r.a.createElement(v.a,{onClick:function(){if(null===t.current)return;const e=Object(s.js_beautify)(O,{indent_with_tabs:!L.insertSpaces,indent_size:4,brace_style:"preserve-inline"});t.current.setValue(e)}},"Beautify"),r.a.createElement(k.a,{sx:{mx:1}},F),r.a.createElement(v.a,{onClick:W},"Save & Close (Ctrl/Cmd + b)"),r.a.createElement(w.a,{sx:{mx:1},target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},r.a.createElement(k.a,null," Netscript Documentation"))),r.a.createElement(o.a,{open:D,onClose:()=>B(!1),options:{theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize},save:e=>{G(e),E.a.MonacoTheme=e.theme,E.a.MonacoInsertSpaces=e.insertSpaces,E.a.MonacoFontSize=e.fontSize}}))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(104),i=a(32),o=a(98),s=a(638),l=a.n(s),c=a(640),u=a.n(c),m=a(639),h=a.n(m),d=a(303),p=a.n(d);function f(e){const t=Object(r.a)(),{count:a,page:s,rowsPerPage:c,onPageChange:m}=e;return n.createElement(i.a,{sx:{flexShrink:0,ml:2.5}},n.createElement(o.a,{onClick:e=>{m(e,0)},disabled:0===s,"aria-label":"first page"},"rtl"===t.direction?n.createElement(p.a,null):n.createElement(l.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s-1)},disabled:0===s,"aria-label":"previous page"},"rtl"===t.direction?n.createElement(h.a,null):n.createElement(u.a,null)),n.createElement(o.a,{onClick:e=>{m(e,s+1)},disabled:s>=Math.ceil(a/c)-1,"aria-label":"next page"},"rtl"===t.direction?n.createElement(u.a,null):n.createElement(h.a,null)),n.createElement(o.a,{onClick:e=>{m(e,Math.max(0,Math.ceil(a/c)-1))},disabled:s>=Math.ceil(a/c)-1,"aria-label":"last page"},"rtl"===t.direction?n.createElement(l.a,null):n.createElement(p.a,null)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(24);function r(e){if(null!=e.ramUsage&&e.ramUsage>0)return e.ramUsage;const t=Object(n.d)(e.server);if(null==t)return 0;for(let a=0;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(283),r=a(21);class i extends n.a{constructor(e=null){super(e)}getActionTypeSkillSuccessBonus(e){return e.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(e){return Object(r.a)(i,e.data)}}r.c.constructors.Contract=i},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n={helpList:["Use 'help [command]' to get more information about a particular Bladeburner console command.",""," automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks"," clear/cls Clear the console"," help [cmd] Display this help text, or help text for a specific command"," log [en/dis] [type] Enable or disable logging for events and actions"," skill [action] [name] Level or display info about your Bladeburner skills"," start [type] [name] Start a Bladeburner action/task"," stop Stops your current Bladeburner action/task"],automate:["automate [var] [val] [hi/low]","","A simple way to automate your Bladeburner actions. This console command can be used to automatically start an action when your stamina rises above a certain threshold, and automatically switch to another action when your stamina drops below another threshold."," automate status - Check the current status of your automation and get a brief description of what it'll do"," automate en - Enable the automation feature"," automate dis - Disable the automation feature","","There are four properties that must be set for this automation to work properly. Here is how to set them:",""," automate stamina 100 high"," automate contract Tracking high"," automate stamina 50 low"," automate general 'Field Analysis' low","","Using the four console commands above will set the automation to perform Tracking contracts if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below 50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must exactly match whatever the name is in the UI."],clear:["clear","","Clears the console"],cls:["cls","","Clears the console"],help:["help [command]","","Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:",""," help automate","","will display specific information about using the automate console command"],log:["log [en/dis] [type]","","Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:","","[general, contracts, ops, blackops, events]","","The logging for these categories can be enabled or disabled like so:",""," log dis contracts - Disables logging that occurs when contracts are completed"," log en contracts - Enables logging that occurs when contracts are completed"," log dis events - Disables logging for Bladeburner random events","","Logging can be universally enabled/disabled using the 'all' keyword:",""," log dis all"," log en all"],skill:["skill [action] [name]","","Level or display information about your skills.","","To display information about all of your skills and your multipliers, use:",""," skill list","","To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:",""," skill list Reaper
skill list 'Digital Observer'","","This console command can also be used to level up skills:",""," skill level [skill name]"],start:["start [type] [name]","","Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:","","[general, contract, op, blackop]","","Examples:",""," start contract Tracking"," start op 'Undercover Operation'"],stop:["stop","","Stop your current action and go idle."]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return s}));var n=a(279),r=a(4);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class o{constructor(e={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[e.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+e.text);this.text=e.text,this.cost=e.cost,e.children&&e.children.length>0&&(this.children=e.children),null!=e.parent&&(this.parent=e.parent)}addChild(e){this.children.push(e),e.parent=this}createTreantMarkup(){const e=[];for(let t=0;t${this.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}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 r}));var n=a(80);function r(e){if(null==e)return null;const t=e.nextPosition;return null==t?null:n.a[t]}},function(e,t,a){"use strict";a.d(t,"a",(function(){return W}));var n=a(23),r=a(20),i=a(152),o=a(6),s=a(198),l=a(199),c=a(323),u=a(58),m=a(302),h=a(7),d=a(25),p=a(117),f=a(110),g=a(534),y=a(215),b=a(57),E=a(39),_=a(229),v=a(160),k=a(2),w=a(284),C=a(24),S=a(14),x=a(282),O=a(61),M=a(91),T=a(115),R=a(285),P=a(221),A=a(9),N=a(18),I=a(212),F=a(102),j=a(349),D=a(228),B=a(1163),L=a(0),G=a.n(L);const W={_lastUpdate:(new Date).getTime(),updateGame:function(e=1){const t=e*h.a._idleSpeed;null==k.a.totalPlaytime&&(k.a.totalPlaytime=0),null==k.a.playtimeSinceLastAug&&(k.a.playtimeSinceLastAug=0),null==k.a.playtimeSinceLastBitnode&&(k.a.playtimeSinceLastBitnode=0),k.a.totalPlaytime+=t,k.a.playtimeSinceLastAug+=t,k.a.playtimeSinceLastBitnode+=t,T.a.process(f.b,k.a,e),k.a.isWorking&&(k.a.workType==h.a.WorkTypeFaction?k.a.workForFaction(e)&&f.b.toFaction():k.a.workType==h.a.WorkTypeCreateProgram?k.a.createProgramWork(e)&&f.b.toTerminal():k.a.workType==h.a.WorkTypeStudyClass?k.a.takeClass(e)&&f.b.toCity():k.a.workType==h.a.WorkTypeCrime?k.a.commitCrime(e)&&f.b.toLocation(P.a[A.a.Slums]):k.a.workType==h.a.WorkTypeCompanyPartTime?k.a.workPartTime(e)&&f.b.toCity():k.a.work(e)&&f.b.toCity()),k.a.hasWseAccount&&Object(M.k)(e),k.a.inGang()&&null!==k.a.gang&&k.a.gang.process(e,k.a),k.a.corporation instanceof m.a&&k.a.corporation.storeCycles(e),k.a.bladeburner instanceof l.a&&k.a.bladeburner.storeCycles(e);for(let t=0;t0){const t=e[Math.floor(Math.random()*e.length)];Object(p.c)(t)}W.Counters.checkFactionInvitations=100}if(W.Counters.passiveFactionGrowth<=0){const e=Math.floor(5-W.Counters.passiveFactionGrowth);Object(p.e)(e),W.Counters.passiveFactionGrowth=5}if(W.Counters.messages<=0&&(Object(_.b)(),r.a[o.a.TheRedPill].owned?W.Counters.messages=4500:W.Counters.messages=150),k.a.corporation instanceof m.a&&k.a.corporation.process(k.a),W.Counters.mechanicProcess<=0){if(k.a.bladeburner instanceof l.a)try{k.a.bladeburner.process(f.b,k.a)}catch(e){Object(D.a)("Exception caught in Bladeburner.process(): "+e)}W.Counters.mechanicProcess=5}W.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(c.b)(),W.Counters.contractGeneration=3e3)},load:function(e){if(Object(B.a)(),Object(w.a)(e)){x.b.emit(),Object(s.b)(k.a),Object(O.b)(k.a),Object(i.c)(),k.a.reapplyAllSourceFiles(),k.a.hasWseAccount&&Object(M.h)(),W._lastUpdate=(new Date).getTime();const e=k.a.lastUpdate,t=W._lastUpdate-e,a=Math.floor(t/h.a._idleSpeed);let r=0;const o=k.a.moneySourceA.hacking/k.a.playtimeSinceLastAug*t*.75;if(k.a.gainMoney(o),Object(v.b)(),k.a.isWorking)k.a.focus=!0,k.a.workType==h.a.WorkTypeFaction?k.a.workForFaction(a):k.a.workType==h.a.WorkTypeCreateProgram?k.a.createProgramWork(a):k.a.workType==h.a.WorkTypeStudyClass?k.a.takeClass(a):k.a.workType==h.a.WorkTypeCrime?k.a.commitCrime(a):k.a.workType==h.a.WorkTypeCompanyPartTime?k.a.workPartTime(a):k.a.work(a);else for(let e=0;ej.a.emit(G.a.createElement(G.a.Fragment,null,"Offline for ",E,". While you were offline, your scripts generated"," ",G.a.createElement(N.a,{money:o}),", your Hacknet Nodes generated ",u," and you gained"," ",G.a.createElement(F.a,{reputation:r})," reputation divided amongst your factions.")),250)}else Object(s.b)(k.a),W.start(),k.a.init(),Object(C.f)(k.a.getHomeComputer()),Object(u.b)(),Object(d.c)(),Object(i.c)(),Object(_.c)(),Object(O.b)(k.a),Object(E.e)();Object(g.b)()},start:function(){const e=(new Date).getTime();let t=e-W._lastUpdate;const a=t%h.a._idleSpeed;t=Math.floor(t/h.a._idleSpeed),t>0&&(W._lastUpdate=e-a,k.a.lastUpdate=e-a,W.updateGame(t)),window.requestAnimationFrame(W.start)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(1492),o=a(1),s=a(47),l=a(115),c=a(353),u=a(2),m=a(567),h=a(110),d=a(7);function p(){const[e,t]=Object(n.useState)(!1),[a,p]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{const e=setTimeout(()=>{a||t(!0)},2e3);return()=>clearTimeout(e)}),Object(n.useEffect)(()=>{!async function(){await Object(c.b)().then(e=>{m.a.load(e),p(!0)}).catch(e=>{console.error(e),m.a.load(""),p(!0)})}()},[]),a?r.a.createElement(h.a,{terminal:l.a,engine:m.a,player:u.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",d.a.Version)),e&&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";a.d(t,"a",(function(){return r}));var n=a(30);const r={Tracking:()=>Object(n.a)(5,75)/10,"Bounty Hunter":()=>Object(n.a)(5,75)/10,Retirement:()=>Object(n.a)(5,75)/10,Investigation:()=>Object(n.a)(10,40)/10,"Undercover Operation":()=>Object(n.a)(10,40)/10,"Sting Operation":()=>Object(n.a)(3,40)/10,Raid:()=>Object(n.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(n.a)(1,20)/10,Assassination:()=>Object(n.a)(1,20)/10}},function(e,t,a){"use strict";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(94),r=a(66),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 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 u})),a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(24),o=a(48),s=a(86),l=a(111),c=a(79);const u={All:0,Foreign:1,Owned:2,Purchased:3};function m(e){function t(t){const a=t instanceof o.a&&t.purchasedByPlayer,n=e.serverType;switch(n){case u.All:return!0;case u.Foreign:return"home"!==t.hostname&&!a;case u.Owned:return a||t instanceof s.a||"home"===t.hostname;case u.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,{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(1027),s=a(1029),l=a(1030),c=a(1031),u=a(1032),m=a(1034),h=a(533),d=a(1041),p=a(1042),f=a(53),g=a(14),y=a(113),b=a(24),E=a(1048),_=a(27);function v({loc:e}){const t=_.b.Router(),a=_.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(d.a,{key:"universitylocation",loc:e})),e.types.includes(f.a.Casino)&&r.push(n.createElement(p.a,{key:"casinoLocation",p:a})),r}(),k=Object(b.d)(e.name),w=null!==k&&Object(y.b)(k);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(217),o=a(131),s=a(155),l=a(76);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 n}));const n=new class{constructor(){this.positions=new Map}saveCursor(e,t){this.positions.set(e,t)}getCursor(e){const t=this.positions.get(e);return t||{row:-1,column:-1}}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));const n="interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}"},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(25),r=a(24);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(7);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(87);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,"b",(function(){return i})),a.d(t,"a",(function(){return o}));var n=a(139);function r(e){return"string"==typeof e&&(!isNaN(e)&&!isNaN(parseFloat(e)))}function i(e){const t=(e=(e=e.trim()).replace(/\s\s+/g," ")).match(/(?:'[^']*'|"[^"]*"|[^;"])*/g);if(!t)return[];const a=t.map(n.h).map(e=>e.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat(),r=[];for(const e of a)null!==e&&(e.match(/^\s*$/)||r.push(e.trim()));return r}function o(e){let t="";const a=[];let n=0,i=0,o="";for(;i=1&&(o=e.charAt(i-1),"\\"===o&&(s=!0));const l=e.charAt(i);if('"'===l)if(s||" "!==o)""===t?t='"':'"'===t&&(t="");else{const t=e.indexOf('"',i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if("'"===l)if(s||" "!==o)""===t?t="'":"'"===t&&(t="");else{const t=e.indexOf("'",i+1);if(-1!==t&&(t===e.length-1||" "===e.charAt(t+1))){a.push(e.substr(i+1,t-i-1)),n=i=t===e.length-1?t+1:t+2;continue}}else if(" "===l&&""===t){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t),n=i+1}++i}if(n!==i){const t=e.substr(n,i-n);r(t)?a.push(parseFloat(t)):a.push(t)}return a}},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","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."],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 ie}));var n=a(286),r=a(86),i=a(48),o=a(68),s=a(93),l=a(287),c=a(101),u=a(7),m=a(24),h=a(109),d=a(436),p=a(39),f=a(113),g=a(645),y=a(103),b=a(14),E=a(163),_=a(89),v=a(4),k=a(23),w=a(1124),C=a(1125),S=a(1126),x=a(1127),O=a(1128),M=a(1129),T=a(1130),R=a(1131),P=a(1132),A=a(1135),N=a(1136),I=a(1137),F=a(1138),j=a(1139),D=a(1140),B=a(1141),L=a(1142),G=a(1143),W=a(1144),H=a(1145),U=a(1146),q=a(1147),K=a(1148),$=a(1149),z=a(1150),V=a(1151),Y=a(1154),J=a(1155),X=a(1156),Q=a(1157),Z=a(1158),ee=a(1159),te=a(1160),ae=a(1161),ne=a(1162);function re(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class ie{constructor(){re(this,"action",null),re(this,"commandHistory",[]),re(this,"commandHistoryIndex",0),re(this,"outputHistory",[new n.b("Bitburner v"+u.a.Version,"primary")]),re(this,"contractOpen",!1),re(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"))}error(e){this.append(new n.b(e,"error"))}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(_.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(_.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(_.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(_.d)(t,e)/4,"b")}}startAnalyze(){this.print("Analyzing system..."),this.startAction(1,"a")}startAction(e,t){this.action=new n.c(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(_.b)(n,t),s=Math.random(),l=Object(_.c)(n,t),c=l/4;if(s=n.getMaxNumTries()?(this.print("Contract FAILED - Contract is now self-destructing"),a.removeContract(n)):this.print(`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 d=h+"--";let p="NO";c.hasAdminRights&&(p="YES"),this.print(`${d}Root Access: ${p}${m?"":", Required hacking skill: "+c.requiredHackingSkill}`),c.hasOwnProperty("numOpenPortsRequired")&&this.print(d+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),this.print(d+"RAM: "+v.a.formatRAM(c.maxRam)),this.print(" ")}}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(d.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,download:P.a,expr:A.a,free:N.a,grow:I.a,hack:F.a,help:j.a,home:D.a,hostname:B.a,kill:L.a,killall:G.a,ls:W.a,lscpu:H.a,mem:U.a,mv:q.a,nano:K.a,ps:$.a,rm:z.a,run:V.a,scan:Y.a,scp:X.a,sudov:Q.a,tail:Z.a,top:ee.a,unalias:te.a,weaken:ae.a,wget:ne.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(30);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.print("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.print("ServerProfiler.exe can only be run on normal servers."):t.print("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:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(e){return e.sourceFiles.length>0&&e.hacking_skill>=1},time:n.a.MillisecondsPerFiveMinutes/20},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.gt(1e11)&&a.hacking_skill>=2500))return t.print(`Augmentations: ${a.augmentations.length} / ${n}`),t.print(`Money: ${s.a.formatMoney(a.money.toNumber())} / $100b`),void t.print(`Hacking skill: ${a.hacking_skill} / 2500`);t.print("We will contact you."),t.print("-- Daedalus --")}}]},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(9),r=a(56),i=a(103);const o=[{hackDifficulty:99,hostname:"ecorp",moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:n.a.AevumECorp},{hackDifficulty:99,hostname:"megacorp",moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:n.a.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:n.a.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[r.a.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:n.a.Sector12BladeIndustries},{hackDifficulty:99,hostname:"nwo",literature:[r.a.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:n.a.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[r.a.BeyondMan,r.a.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:n.a.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:n.a.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[r.a.CodedIntelligence,r.a.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:n.a.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:n.a.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:n.a.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:n.a.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[r.a.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:n.a.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:n.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:i.a.FulcrumSecretTechnologies},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:n.a.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:n.a.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[r.a.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:n.a.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:"vitalife",literature:[r.a.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:n.a.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:n.a.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:n.a.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:n.a.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:n.a.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[r.a.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[r.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[r.a.AGreenTomorrow,r.a.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:n.a.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:n.a.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:"aerocorp",literature:[r.a.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:n.a.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:n.a.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[r.a.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:n.a.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:n.a.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[r.a.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[r.a.AGreenTomorrow,r.a.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:n.a.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:n.a.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:"deltaone",moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:n.a.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:n.a.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[r.a.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:n.a.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:n.a.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:n.a.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:n.a.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:n.a.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:n.a.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:n.a.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[r.a.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:n.a.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:n.a.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:n.a.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[r.a.SecretSocieties,r.a.TheFailedFrontier,r.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:n.a.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:n.a.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:n.a.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:n.a.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[r.a.SecretSocieties,r.a.TheFailedFrontier,r.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:n.a.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:n.a.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:n.a.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:n.a.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[r.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:"comptek",literature:[r.a.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:n.a.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:n.a.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[r.a.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:n.a.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:n.a.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:n.a.NewTokyoNoodleBar},{hackDifficulty:10,hostname:"foodnstuff",literature:[r.a.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:n.a.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:n.a.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:n.a.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[r.a.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[r.a.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[r.a.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[r.a.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:n.a.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:n.a.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:n.a.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:"Iron Gym Network",requiredHackingSkill:100,serverGrowth:20,specialName:n.a.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:n.a.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:n.a.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:n.a.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[r.a.SimulatedReality,r.a.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:i.a.BitRunnersServer},{hackDifficulty:0,hostname:"I.I.I.I",literature:[r.a.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:i.a.TheBlackHandServer},{hackDifficulty:0,hostname:"avmnite-02h",literature:[r.a.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:"NiteSec",requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:i.a.NiteSecServer},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:i.a.TheDarkArmyServer},{hackDifficulty:0,hostname:"CSEC",literature:[r.a.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:"CyberSec",requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:i.a.CyberSecServer},{hackDifficulty:0,hostname:"The-Cave",literature:[r.a.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:i.a.DaedalusServer},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:i.a.WorldDaemon}]},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 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(141),r=a(56);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. After creating your Corporation, you will see it listed as one of the locations in the city. Click on your Corporation in order to manage it.

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 f}));var n=a(792),r=a(543),i=a(565),o=a(373),s=a(44),l=a(413),c=a(9),u=a(322),m=a(22),h=a(329),d=a(21),p=a(97);class f{constructor(){this.hacking_skill=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=new p.a(1e3),this.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.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.ab,this.prestigeAugmentation=s.db,this.prestigeSourceFile=s.eb,this.receiveInvite=s.lb,this.calculateSkill=s.o,this.updateSkillLevels=s.Ib,this.resetMultipliers=s.ob,this.hasProgram=s.Y,this.setMoney=s.rb,this.gainMoney=s.I,this.loseMoney=s.cb,this.canAfford=s.q,this.recordMoneySource=s.mb,this.gainHackingExp=s.G,this.gainStrengthExp=s.J,this.gainDefenseExp=s.E,this.gainDexterityExp=s.F,this.gainAgilityExp=s.B,this.gainCharismaExp=s.C,this.gainIntelligenceExp=s.H,this.queryStatFromString=s.gb,this.resetWorkStatus=s.pb,this.processWorkEarnings=s.fb,this.startWork=s.Cb,this.cancelationPenalty=s.r,this.work=s.Jb,this.finishWork=s.z,this.startWorkPartTime=s.Db,this.workPartTime=s.Lb,this.finishWorkPartTime=s.A,this.startFocusing=s.Bb,this.stopFocusing=s.Eb,this.startFactionWork=s.Ab,this.startFactionHackWork=s.yb,this.startFactionFieldWork=s.xb,this.startFactionSecurityWork=s.zb,this.workForFaction=s.Kb,this.finishFactionWork=s.y,this.getWorkMoneyGain=s.T,this.getWorkHackExpGain=s.S,this.getWorkStrExpGain=s.V,this.getWorkDefExpGain=s.Q,this.getWorkDexExpGain=s.R,this.getWorkAgiExpGain=s.O,this.getWorkChaExpGain=s.P,this.getWorkRepGain=s.U,this.startCreateProgramWork=s.vb,this.createProgramWork=s.u,this.finishCreateProgramWork=s.w,this.startClass=s.ub,this.takeClass=s.Fb,this.finishClass=s.v,this.startCrime=s.wb,this.commitCrime=s.t,this.finishCrime=s.x,this.singularityStopWork=s.tb,this.takeDamage=s.Gb,this.regenerateHp=s.nb,this.hospitalize=s.Z,this.applyForJob=s.f,this.getNextCompanyPosition=s.N,this.quitJob=s.ib,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.bb,this.reapplyAllAugmentations=s.jb,this.reapplyAllSourceFiles=s.kb,this.checkForFactionInvitations=s.s,this.setBitNodeNumber=s.qb,this.queueAugmentation=s.hb,this.gainCodingContractReward=s.D,this.travel=s.Hb,this.gotoLocation=s.X,this.canAccessResleeving=s.p,this.giveExploit=s.W,this.getIntelligenceBonus=s.L,this.getCasinoWinnings=s.K,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.e,this.getCurrentServer=l.b,this.getHomeComputer=l.c,this.getUpgradeHomeRamCost=l.d,this.createHacknetServer=l.a,this.factionWorkType="",this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.getMult=s.M,this.setMult=s.sb}toJSON(){return Object(d.b)("PlayerObject",this)}static fromJSON(e){return Object(d.a)(f,e.data)}}d.c.constructors.PlayerObject=f},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(36);function r(e){const t=e instanceof n.a?e.name:e;for(const e of this.augmentations)if(e.name===t)return!0;for(const e of this.queuedAugmentations)if(e.name===t)return!0;return!1}},function(e,t,a){"use strict";function n(e){for(const t in e)e.hasOwnProperty(t)&&delete e[t]}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return C}));var n=a(26),r=a(9);const i={},o={},s={},l={},c={},u={},m={},h={},d={},p={},f={},g={},y={},b={},E={},_={},v={},k={},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=>{d[e]=!0}),n.c.forEach(e=>{p[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(18);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";a.d(t,"a",(function(){return r}));var n=a(26);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(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__(22),decimal_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(97),_IndustryData__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(50),_data_Constants__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(41),_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(46),_Material__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(168),_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(30),_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(802),_OfficeSpace__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(325),_Product__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(352),_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(15),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(118),_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(159),_Warehouse__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(204),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(326);function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class Industry{constructor(e={}){_defineProperty(this,"name",""),_defineProperty(this,"type",_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture),_defineProperty(this,"sciResearch",new _Material__WEBPACK_IMPORTED_MODULE_6__.a({name:"Scientific Research"})),_defineProperty(this,"researched",{}),_defineProperty(this,"reqMats",{}),_defineProperty(this,"prodMats",[]),_defineProperty(this,"products",{}),_defineProperty(this,"makesProducts",!1),_defineProperty(this,"awareness",0),_defineProperty(this,"popularity",0),_defineProperty(this,"startingCost",0),_defineProperty(this,"reFac",0),_defineProperty(this,"sciFac",0),_defineProperty(this,"hwFac",0),_defineProperty(this,"robFac",0),_defineProperty(this,"aiFac",0),_defineProperty(this,"advFac",0),_defineProperty(this,"prodMult",0),_defineProperty(this,"upgrades",Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__.a).length).fill(0)),_defineProperty(this,"state","START"),_defineProperty(this,"newInd",!0),_defineProperty(this,"offices",{[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a({loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.OfficeInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0}),this.name=e.name?e.name:"",this.type=e.type?e.type:_IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture,this.lastCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.warehouses={[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Aevum]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Chongqing]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12]:new _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a({corp:e.corp,industry:this,loc:_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Sector12,size:_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.WarehouseInitialSize}),[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.NewTokyo]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Ishima]:0,[_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__.a.Volhaven]:0},this.init()}init(){const e=_IndustryData__WEBPACK_IMPORTED_MODULE_3__.d[this.type];if(void 0===e)throw new Error(`Invalid industry: "${this.type}"`);switch(this.startingCost=e,this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Energy:this.reFac=.65,this.sciFac=.7,this.robFac=.05,this.aiFac=.3,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.2},this.prodMats=["Energy"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Utilities:case"Utilities":this.reFac=.5,this.sciFac=.6,this.robFac=.4,this.aiFac=.4,this.advFac=.08,this.reqMats={Hardware:.1,Metal:.1},this.prodMats=["Water"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Agriculture:this.reFac=.72,this.sciFac=.5,this.hwFac=.2,this.robFac=.3,this.aiFac=.3,this.advFac=.04,this.reqMats={Water:.5,Energy:.5},this.prodMats=["Plants","Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Fishing:this.reFac=.15,this.sciFac=.35,this.hwFac=.35,this.robFac=.5,this.aiFac=.2,this.advFac=.08,this.reqMats={Energy:.5},this.prodMats=["Food"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Mining:this.reFac=.3,this.sciFac=.26,this.hwFac=.4,this.robFac=.45,this.aiFac=.45,this.advFac=.06,this.reqMats={Energy:.8},this.prodMats=["Metal"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:this.sciFac=.12,this.hwFac=.15,this.robFac=.3,this.aiFac=.25,this.advFac=.25,this.reFac=.05,this.reqMats={Food:.5,Water:.5,Energy:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:this.reFac=.15,this.sciFac=.75,this.hwFac=.15,this.robFac=.2,this.aiFac=.15,this.advFac=.2,this.reqMats={Plants:1,Water:.2},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Chemical:this.reFac=.25,this.sciFac=.75,this.hwFac=.2,this.robFac=.25,this.aiFac=.2,this.advFac=.07,this.reqMats={Plants:1,Energy:.5,Water:.5},this.prodMats=["Chemicals"];break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:this.reFac=.05,this.sciFac=.8,this.hwFac=.15,this.robFac=.25,this.aiFac=.2,this.advFac=.16,this.reqMats={Chemicals:2,Energy:1,Water:.5},this.prodMats=["Drugs"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":this.reFac=.2,this.sciFac=.62,this.robFac=.36,this.aiFac=.19,this.advFac=.17,this.reqMats={Metal:2,Energy:1},this.prodMats=["Hardware"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:this.reFac=.32,this.sciFac=.65,this.aiFac=.36,this.advFac=.18,this.hwFac=.19,this.reqMats={Hardware:5,Energy:3},this.prodMats=["Robots"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:this.sciFac=.62,this.advFac=.16,this.hwFac=.25,this.reFac=.15,this.aiFac=.18,this.robFac=.05,this.reqMats={Hardware:.5,Energy:.5},this.prodMats=["AICores"],this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:this.reFac=.1,this.sciFac=.75,this.advFac=.11,this.hwFac=.1,this.robFac=.1,this.aiFac=.1,this.reqMats={Robots:10,AICores:5,Energy:5,Water:5},this.makesProducts=!0;break;case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:this.robFac=.6,this.aiFac=.6,this.advFac=.25,this.sciFac=.05,this.hwFac=.05,this.reqMats={Metal:5,Energy:5,Water:2,Hardware:4},this.prodMats=["RealEstate"],this.makesProducts=!0;break;default:return void console.error("Invalid Industry Type passed into Industry.init(): "+this.type)}}getProductDescriptionText(){if(!this.makesProducts)return"";switch(this.type){case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Food:return"create and manage restaurants";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Tobacco:return"create tobacco and tobacco-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Pharmaceutical:return"develop new pharmaceutical drugs";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Computer:case"Computer":return"create new computer hardware and networking infrastructures";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Robotics:return"build specialized robots and robot-related products";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Software:return"develop computer software";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.Healthcare:return"build and manage hospitals";case _IndustryData__WEBPACK_IMPORTED_MODULE_3__.a.RealEstate:return"develop and manage real estate properties";default:return console.error("Invalid industry type in Industry.getProductDescriptionText"),""}}getMaximumNumberProducts(){if(!this.makesProducts)return 0;let e=0;return this.hasResearch("uPgrade: Capacity.I")&&++e,this.hasResearch("uPgrade: Capacity.II")&&++e,_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.BaseMaxProducts+e}hasMaximumNumberProducts(){return Object.keys(this.products).length>=this.getMaximumNumberProducts()}calculateProductionFactors(){let e=0;for(let t=0;t<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++t){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[t],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a))continue;const r=n.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);e+=Math.pow(i,.73)}this.prodMult=e<1?1:e}updateWarehouseSizeUsed(e){e.updateMaterialSizeUsed();for(const t in this.products)if(this.products.hasOwnProperty(t)){const a=this.products[t];if(void 0===a)continue;e.sizeUsed+=a.data[e.loc][0]*a.siz}}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_11__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0)),this.lastCycleRevenue=this.thisCycleRevenue.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses.dividedBy(e*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle),this.thisCycleRevenue=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.thisCycleExpenses=new decimal_js__WEBPACK_IMPORTED_MODULE_2__.a(0),this.lastCycleRevenue.gt(0)&&(this.newInd=!1);let t=0;for(const n in this.offices){const r=this.offices[n];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(t+=r.process(e,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses.plus(t),this.processMaterialMarket(),this.processProductMarket(e),this.popularity-=1e-4*e,this.popularity=Math.max(0,this.popularity);const n=a.getDreamSenseGain(),r=4*n;return void(n>0&&(this.popularity+=n*e,this.awareness+=r*e))}let n=this.processMaterials(e,a);Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1])),n=this.processProducts(e,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue.plus(n[0]),this.thisCycleExpenses=this.thisCycleExpenses.plus(n[1]))}processMaterialMarket(){const e=this.reqMats,t=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[a]];if(0===n)continue;for(const t in e)e.hasOwnProperty(t)&&n.materials[t].processMarket();for(let e=0;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_4__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[t]);r=Math.min(r,i),r>0&&(e[t]=r)}let t=1e99;for(const a in e){const n=e[a];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[a];if(void 0===r)throw new Error(`reqMat "${a}" is undefined`);const i=n/r;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_4__.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_4__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const e in this.reqMats)if(this.reqMats.hasOwnProperty(e)){const t=this.reqMats[e];if(void 0===t)continue;const n=t*a;warehouse.materials[e].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_4__.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_4__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName in warehouse.materials)if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI=a.size)return[0,0];{const e=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[matName]);amt=Math.min(e,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles),a.materials[matName].qty+=amt,a.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,t.updateWarehouseSizeUsed(a);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(e=1,t){let a=0;if("PRODUCTION"===this.state)for(const t in this.products){const a=this.products[t];if(void 0!==a&&!a.fin){const t=a.createCity,n=this.offices[t];if(0===n)continue;const r=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;a.createProduct(e,c),a.prog>=100&&a.finishProduct(n.employeeProd,this);break}}for(const n in this.products)if(this.products.hasOwnProperty(n)){const r=this.products[n];r instanceof _Product__WEBPACK_IMPORTED_MODULE_10__.a&&r.fin&&(a+=this.processProduct(e,r,t))}return[a,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__.a)switch(this.state){case"PRODUCTION":{const e=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let t;t=product.prdman[city][0]?Math.min(e,product.prdman[city][1]):e,t*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles;let a=product.siz;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const t=product.reqMats[e];a-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_13__.a[e]*t}if(a>0){const e=Math.floor((warehouse.size-warehouse.sizeUsed)/a);t=Math.min(e,t)}warehouse.smartSupplyStore+=t/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);let n=1;for(const e in product.reqMats)if(product.reqMats.hasOwnProperty(e)){const a=product.reqMats[e]*t;warehouse.materials[e].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_4__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=t*n}product.data[city][1]=t*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const e in product.reqMats)product.reqMats.hasOwnProperty(e)&&(product.pCost+=product.reqMats[e]*warehouse.materials[e].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const e=product.data[city][1],t=markupLimit,a=e,n=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=t/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1;sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost));const maxSell=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier();let sellAmt;if(product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,maxSell);tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(e){Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_11__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=maxSell}sellAmt=Math.min(maxSell,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(maxSell,product.sllman[city][1]):!1===product.sllman[city][0]?0:maxSell;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_4__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(e){for(const t in this.products)this.products.hasOwnProperty(t)&&e===this.products[t]&&delete this.products[t]}upgrade(e,t){const a=t.corporation,n=t.office,r=e[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let e=0;e=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 l}));var n=a(41),r=a(30),i=a(21),o=a(46);function s(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class l{constructor(e={}){s(this,"pro",0),s(this,"cyclesUntilRaise",n.a.CyclesPerEmployeeRaise),this.name=e.name?e.name:"Bobby",this.mor=e.morale?e.morale:Object(r.a)(50,100),this.hap=e.happiness?e.happiness:Object(r.a)(50,100),this.ene=e.energy?e.energy:Object(r.a)(50,100),this.int=e.intelligence?e.intelligence:Object(r.a)(10,50),this.cha=e.charisma?e.charisma:Object(r.a)(10,50),this.exp=e.experience?e.experience:Object(r.a)(10,50),this.cre=e.creativity?e.creativity:Object(r.a)(10,50),this.eff=e.efficiency?e.efficiency:Object(r.a)(10,50),this.sal=e.salary?e.salary:Object(r.a)(.1,5),this.loc=e.loc?e.loc:"",this.pos=o.a.Unassigned}process(e=1,t){const a=.003*e,r=a*Math.random();this.exp+=a,this.cyclesUntilRaise-=e,this.cyclesUntilRaise<=0&&(this.sal+=n.a.EmployeeRaiseAmount,this.cyclesUntilRaise+=n.a.CyclesPerEmployeeRaise);const i=a*Math.random();this.pos===o.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.eneObject(T.a)({textfield:{borderBottom:"1px solid "+e.palette.primary.main},code:{whiteSpace:"pre",backgroundColor:e.palette.background.paper}}));function A(){const e=P(),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}},"[home ~/]> 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}},"[home ~/]> 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(p.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),"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(S.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)(()=>d.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(131),o=a(32),s=a(210),l=a(1450),c=a(814),u=a.n(c),m=a(815),h=a.n(m),d=a(27),p=a(31);const f=Object(i.a)({nobackground:{backgroundColor:"#0000"}});function g({children:e}){const[t,a]=Object(n.useState)(!0),i=f(),c=d.b.Router();if(c.page()===p.a.BitVerse||c.page()===p.a.Loading)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("div",{style:{position:"fixed",top:0,right:0,zIndex:1500}},r.a.createElement(o.a,{display:"flex",justifyContent:"flex-end",flexDirection:"column"},r.a.createElement(s.a,{in:t},e),r.a.createElement(o.a,{display:"flex",justifyContent:"flex-end"},r.a.createElement(l.a,{classes:{root:i.nobackground},onClick:()=>a(e=>!e)},m))))}},,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return Te}));var n=a(0),r=a.n(n),i=a(12),o=a(17),s=a(155),l=a(131),c=a(1451),u=a(266),m=a(570),h=a(820),d=a.n(h),p=a(819),f=a.n(p),g=a(70),y=a(132),b=a(99),E=a(1),_=a(210),v=a(654),k=a(821),w=a.n(k),C=a(303),S=a.n(C),x=a(822),O=a.n(x),M=a(501),T=a.n(M),R=a(823),P=a.n(R),A=a(440),N=a.n(A),I=a(825),F=a.n(I),j=a(506),D=a.n(j),B=a(502),L=a.n(B),G=a(826),W=a.n(G),H=a(503),U=a.n(H),q=a(828),K=a.n(q),$=a(829),z=a.n($),V=a(830),Y=a.n(V),J=a(831),X=a.n(J),Q=a(832),Z=a.n(Q),ee=a(833),te=a.n(ee),ae=a(358),ne=a.n(ae),re=a(256),ie=a.n(re),oe=a(507),se=a.n(oe),le=a(824),ce=a.n(le),ue=a(827),me=a.n(ue),he=a(834),de=a.n(he),pe=a(136),fe=a.n(pe),ge=a(71),ye=a.n(ge),be=a(31),Ee=a(7),_e=a(39),ve=a(505),ke=a(14),we=a(224),Ce=a(92);const Se=e=>({width:e.spacing(31),transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}),xe=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)`}}),Oe=Object(o.a)(c.a,{shouldForwardProp:e=>"open"!==e})(({theme:e,open:t})=>({width:e.spacing(31),whiteSpace:"nowrap",boxSizing:"border-box",...t&&{...Se(e),"& .MuiDrawer-paper":Se(e)},...!t&&{...xe(e),"& .MuiDrawer-paper":xe(e)}})),Me=Object(l.a)(e=>Object(s.a)({active:{borderLeft:"3px solid "+e.palette.primary.main},listitem:{}}));function Te(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,p]=Object(n.useState)(!0),[k,C]=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,A=_e.a.currStep===_e.f.GoToHacknetNodesPage,I=_e.a.currStep===_e.f.HacknetNodesGoToWorldPage,j=_e.a.currStep===_e.f.WorldDescription,B=e.player.queuedAugmentations.length,G=e.player.factionInvitations.length,H=Object(ve.a)(e.player).length,q=H>0||e.player.augmentations.length>0||e.player.queuedAugmentations.length>0||e.player.sourceFiles.length>0,$=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,V=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;function le(){e.router.toTerminal(),x&&Object(_e.c)()}function ue(){e.router.toScriptEditor()}function he(){e.router.toStats(),M&&Object(_e.c)()}function pe(){e.router.toActiveScripts(),R&&Object(_e.c)()}function ge(){e.router.toCreateProgram()}function Se(){e.router.toFactions()}function xe(){e.router.toAugmentations()}function Te(){e.router.toHacknetNodes(),A&&Object(_e.c)()}function Re(){e.router.toCity(),I&&Object(_e.c)()}function Pe(){e.router.toTravel()}function Ae(){e.router.toJob()}function Ne(){e.router.toBladeburner()}function Ie(){e.router.toGang()}function Fe(){e.router.toTutorial(),j&&Object(_e.c)()}Object(n.useEffect)(()=>{function t(t){if(!ke.a.DisableHotkeys&&!e.player.isWorking&&!we.b)if(t.keyCode==Ce.a.T&&t.altKey)t.preventDefault(),le();else if(t.keyCode===Ce.a.C&&t.altKey)t.preventDefault(),he();else if(t.keyCode===Ce.a.E&&t.altKey)t.preventDefault(),ue();else if(t.keyCode===Ce.a.S&&t.altKey)t.preventDefault(),pe();else if(t.keyCode===Ce.a.H&&t.altKey)t.preventDefault(),Te();else if(t.keyCode===Ce.a.W&&t.altKey)t.preventDefault(),Re();else if(t.keyCode===Ce.a.J&&t.altKey)t.preventDefault(),Ae();else if(t.keyCode===Ce.a.R&&t.altKey)t.preventDefault(),Pe();else if(t.keyCode===Ce.a.P&&t.altKey)t.preventDefault(),ge();else if(t.keyCode===Ce.a.F&&t.altKey){if(e.page==be.a.Terminal&&ke.a.EnableBashHotkeys)return;t.preventDefault(),Se()}else t.keyCode===Ce.a.A&&t.altKey?(t.preventDefault(),xe()):t.keyCode===Ce.a.U&&t.altKey?(t.preventDefault(),Fe()):t.keyCode===Ce.a.B&&t.altKey?(t.preventDefault(),Ne()):t.keyCode===Ce.a.G&&t.altKey&&(t.preventDefault(),Ie())}return document.addEventListener("keypress",t),()=>document.removeEventListener("keypress",t)},[]);const je=Me(),[De,Be]=Object(n.useState)(!0);return r.a.createElement(Oe,{open:De,anchor:"left",variant:"permanent"},r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>Be(e=>!e)},r.a.createElement(y.a,null,De?r.a.createElement(d.a,{color:"primary"}):r.a.createElement(f.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Bitburner v",Ee.a.Version)})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:je.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(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:o,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Terminal",className:Object(i.default)({[je.active]:e.page===be.a.Terminal}),onClick:le},r.a.createElement(y.a,null,r.a.createElement(S.a,{color:x?"error":e.page!==be.a.Terminal?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:x?"error":e.page!==be.a.Terminal?"secondary":"primary"},"Terminal"))),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Script Editor",className:Object(i.default)({[je.active]:e.page===be.a.ScriptEditor}),onClick:ue},r.a.createElement(y.a,null,r.a.createElement(O.a,{color:e.page!==be.a.ScriptEditor?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.ScriptEditor?"secondary":"primary"},"Script Editor"))),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Active Scripts",className:Object(i.default)({[je.active]:e.page===be.a.ActiveScripts}),onClick:pe},r.a.createElement(y.a,null,r.a.createElement(T.a,{color:R?"error":e.page!==be.a.ActiveScripts?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:R?"error":e.page!==be.a.ActiveScripts?"secondary":"primary"},"Active Scripts"))),q&&r.a.createElement(g.a,{button:!0,key:"Create Program",className:Object(i.default)({[je.active]:e.page===be.a.CreateProgram}),onClick:ge},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:H>0?H:void 0,color:"error"},r.a.createElement(P.a,{color:e.page!==be.a.CreateProgram?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.CreateProgram?"secondary":"primary"},"Create Program"))))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>c(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(ce.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Character")}),l?r.a.createElement(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:l,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Stats",className:Object(i.default)({[je.active]:e.page===be.a.Stats}),onClick:he},r.a.createElement(y.a,null,r.a.createElement(N.a,{color:M?"error":e.page!==be.a.Stats?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:M?"error":e.page!==be.a.Stats?"secondary":"primary"},"Stats"))),$&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Factions",className:Object(i.default)({[je.active]:[be.a.Factions,be.a.Faction].includes(e.page)}),onClick:Se},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==G?G:void 0,color:"error"},r.a.createElement(F.a,{color:[be.a.Factions,be.a.Faction].includes(e.page)?"primary":"secondary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:[be.a.Factions,be.a.Faction].includes(e.page)?"primary":"secondary"},"Factions"))),V&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Augmentations",className:Object(i.default)({[je.active]:e.page===be.a.Augmentations}),onClick:xe},r.a.createElement(y.a,null,r.a.createElement(v.a,{badgeContent:0!==B?B:void 0,color:"error"},r.a.createElement(D.a,{style:{transform:"rotate(-90deg)"},color:e.page!==be.a.Augmentations?"secondary":"primary"}))),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Augmentations?"secondary":"primary"},"Augmentations"))),r.a.createElement(g.a,{button:!0,key:"Hacknet",className:Object(i.default)({[je.active]:e.page===be.a.Hacknet}),onClick:Te},r.a.createElement(y.a,null,r.a.createElement(L.a,{color:A?"error":e.page!==be.a.Hacknet?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:A?"error":e.page!==be.a.Hacknet?"secondary":"primary"},"Hacknet"))),J&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Sleeves",className:Object(i.default)({[je.active]:e.page===be.a.Sleeves}),onClick:function(){e.router.toSleeves()}},r.a.createElement(y.a,null,r.a.createElement(W.a,{color:e.page!==be.a.Sleeves?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Sleeves?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>p(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,"World")}),h?r.a.createElement(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:h,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"City",className:Object(i.default)({[je.active]:e.page===be.a.City||e.page===be.a.Resleeves||e.page===be.a.Location}),onClick:Re},r.a.createElement(y.a,null,r.a.createElement(U.a,{color:I?"error":e.page!==be.a.City?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:I?"error":e.page!==be.a.City?"secondary":"primary"},"City"))),r.a.createElement(g.a,{button:!0,key:"Travel",className:Object(i.default)({[je.active]:e.page===be.a.Travel}),onClick:Pe},r.a.createElement(y.a,null,r.a.createElement(K.a,{color:e.page!==be.a.Travel?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Travel?"secondary":"primary"},"Travel"))),ae&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Job",className:Object(i.default)({[je.active]:e.page===be.a.Job}),onClick:Ae},r.a.createElement(y.a,null,r.a.createElement(z.a,{color:e.page!==be.a.Job?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Job?"secondary":"primary"},"Job"))),re&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Stock Market",className:Object(i.default)({[je.active]:e.page===be.a.StockMarket}),onClick:function(){e.router.toStockMarket()}},r.a.createElement(y.a,null,r.a.createElement(Y.a,{color:e.page!==be.a.StockMarket?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.StockMarket?"secondary":"primary"},"Stock Market"))),oe&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Bladeburner",className:Object(i.default)({[je.active]:e.page===be.a.Bladeburner}),onClick:Ne},r.a.createElement(y.a,null,r.a.createElement(X.a,{color:e.page!==be.a.Bladeburner?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Bladeburner?"secondary":"primary"},"Bladeburner"))),Q&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Corp",className:Object(i.default)({[je.active]:e.page===be.a.Corporation}),onClick:function(){e.router.toCorporation()}},r.a.createElement(y.a,null,r.a.createElement(Z.a,{color:e.page!==be.a.Corporation?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Corporation?"secondary":"primary"},"Corp"))),ee&&r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,key:"Gang",className:Object(i.default)({[je.active]:e.page===be.a.Gang}),onClick:Ie},r.a.createElement(y.a,null,r.a.createElement(te.a,{color:e.page!==be.a.Gang?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Gang?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(g.a,{classes:{root:je.listitem},button:!0,onClick:()=>C(e=>!e)},r.a.createElement(y.a,null,r.a.createElement(de.a,{color:"primary"})),r.a.createElement(b.a,{primary:r.a.createElement(E.a,null,"Help")}),k?r.a.createElement(fe.a,{color:"primary"}):r.a.createElement(ye.a,{color:"primary"})),r.a.createElement(_.a,{in:k,timeout:"auto",unmountOnExit:!0},r.a.createElement(g.a,{button:!0,key:"Milestones",className:Object(i.default)({[je.active]:e.page===be.a.Milestones}),onClick:function(){e.router.toMilestones()}},r.a.createElement(y.a,null,r.a.createElement(ne.a,{color:e.page!==be.a.Milestones?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.a.Milestones?"secondary":"primary"},"Milestones"))),r.a.createElement(g.a,{button:!0,key:"Tutorial",className:Object(i.default)({[je.active]:e.page===be.a.Tutorial}),onClick:Fe},r.a.createElement(y.a,null,r.a.createElement(ie.a,{color:j?"error":e.page!==be.a.Tutorial?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:j?"error":e.page!==be.a.Tutorial?"secondary":"primary"},"Tutorial"))),r.a.createElement(g.a,{button:!0,key:"Options",className:Object(i.default)({[je.active]:e.page===be.a.Options}),onClick:function(){e.router.toGameOptions()}},r.a.createElement(y.a,null,r.a.createElement(se.a,{color:e.page!==be.a.Options?"secondary":"primary"})),r.a.createElement(b.a,null,r.a.createElement(E.a,{color:e.page!==be.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(836),o=a(837),s=a(840),l=a(841),c=a(327),u=a(27),m=a(1),h=a(10),d=a(29),p=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(p.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(p.a,{mx:2},r.a.createElement(d.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(d.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(p.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 p}));var n=a(0),r=a.n(n),i=a(508),o=a(20),s=a(6),l=a(14),c=a(27),u=a(173),m=a(10),h=a(29),d=a(266);function p(){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(d.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 p}));var n=a(0),r=a(2),i=a(4),o=a(20),s=a(42),l=a(189),c=a(65),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 d({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 p(){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}();return n.createElement(n.Fragment,null,n.createElement(u.a,{variant:"h4"},"Multipliers"),n.createElement(m.a,{mx:2},n.createElement(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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(d,{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((function(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(d,{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)}),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(508),l=a(266);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," / ?")}),e?r.a.createElement(g.a,{color:"primary"}):r.a.createElement(p.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(14),o=a(173),s=a(318),l=a(844);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(305),o=a(99),s=a(32),l=a(1),c=a(76),u=a(210),m=a(71),h=a.n(m),d=a(136),p=a.n(d);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(p.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 k}));var n=a(199),r=a(0),i=a.n(r),o=a(846),s=a(848),l=a(850),c=a(851),u=a(852),m=a(853),h=a(854),d=a(855),p=a(856),f=a(857),g=a(858),y=a(859),b=a(860),E=a(861),_=a(862),v=a(1);function k(e){return i.a.createElement(i.a.Fragment,null,i.a.createElement(v.a,null,"Development Menu - Only meant to be used for testing/debugging"),i.a.createElement(o.a,{player:e.player,router:e.router}),i.a.createElement(s.a,{player:e.player}),i.a.createElement(l.a,{player:e.player}),i.a.createElement(c.a,{player:e.player}),i.a.createElement(u.a,{player:e.player}),i.a.createElement(m.a,{player:e.player}),i.a.createElement(h.a,null),i.a.createElement(d.a,null),e.player.bladeburner instanceof n.a&&i.a.createElement(p.a,{player:e.player}),e.player.inGang()&&i.a.createElement(f.a,{player:e.player}),e.player.hasCorporation()&&i.a.createElement(g.a,{player:e.player}),i.a.createElement(y.a,null),e.player.hasWseAccount&&i.a.createElement(b.a,null),e.player.sleeves.length>0&&i.a.createElement(E.a,{player:e.player}),i.a.createElement(_.a,{player:e.player,engine:e.engine}))}},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(71),c=a.n(l),u=a(1),m=a(10),h=a(18);function d(e){function t(t){return function(){e.player.gainMoney(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,"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 p}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(71),c=a.n(l),u=a(1),m=a(10),h=a(137);const d=1e27;function p(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(d),e.player.gainStrengthExp(d),e.player.gainDefenseExp(d),e.player.gainDexterityExp(d),e.player.gainAgilityExp(d),e.player.gainCharismaExp(d),e.player.gainIntelligenceExp(d),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)(d),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)(d),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)(d),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)(d),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)(d),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)(d),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)(d),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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(137),p=a(25),f=a(1176),g=a(79),y=a(98),b=a(513),E=a.n(b),_=a(387),v=a.n(_),k=a(1177);function w(e){const[t,a]=Object(n.useState)("Illuminati");function l(e){return function(a){const n=p.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function b(e){return function(a){const n=p.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(k.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 p.a)e.player.receiveInvite(p.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(p.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(d.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const e=p.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(d.a,{label:"favor",placeholder:"amt",tons:()=>b(1)(2e3),add:b(1),subtract:b(-1),reset:function(){const e=p.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 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 v}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(71),c=a.n(l),u=a(111),m=a(6),h=a(1),d=a(79),p=a(98),f=a(513),g=a.n(f),y=a(387),b=a.n(y),E=a(512),_=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(p.a,{onClick:function(){for(const t in m.a){const a=m.a[t];e.player.queueAugmentation(a)}},size:"large"},r.a.createElement(g.a,null)),r.a.createElement(p.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(p.a,{onClick:function(){e.player.augmentations=[]},size:"large"},r.a.createElement(_.a,null)))},Object.values(m.a).map(e=>r.a.createElement(d.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(71),c=a.n(l),u=a(1),m=a(10),h=a(514),d=a(1181);const p=[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(d.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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(68),p=a(79);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(d.a).map(e=>r.a.createElement(p.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 d.a)e.player.hasProgram(d.a[t].name)||e.player.getHomeComputer().programs.push(d.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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(24),p=a(48),f=a(79);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(d.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(d.d)(e);null!==t&&t instanceof p.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(d.c)()){if(!(e instanceof p.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(d.d)(e);null!==t&&t instanceof p.a&&(t.hackDifficulty=t.minDifficulty)}},"Min one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(d.c)()){if(!(e instanceof p.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(d.d)(e);null!==t&&t instanceof p.a&&(t.moneyAvailable=t.moneyMax)}},"Max one")),r.a.createElement("td",null,r.a.createElement(m.a,{onClick:function(){for(const e of Object(d.c)()){if(!(e instanceof p.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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(58),p=a(79),f=a(137);function g(){const[e,t]=Object(n.useState)("ECorp");function a(t){return function(a){const n=d.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function l(t){return function(a){const n=d.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(d.a).map(e=>r.a.createElement(p.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(){d.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(){d.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 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 h}));var n=a(0),r=a.n(n),i=a(1),o=a(190),s=a(191),l=a(192),c=a(71),u=a.n(c),m=a(137);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(71),u=a.n(c),m=a(137);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 d}));var n=a(0),r=a.n(n),i=a(190),o=a(191),s=a(192),l=a(71),c=a.n(l),u=a(1),m=a(10),h=a(137);function d(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.plus(1e99))}},"Tons of funds"),r.a.createElement(m.a,{onClick:function(){e.player.corporation&&(e.player.corporation.funds=e.player.corporation.funds.minus(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(71),c=a.n(l),u=a(1),m=a(10),h=a(111),d=a(79),p=a(323),f=a(93);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:p.b},"Generate Random Contract"),r.a.createElement(m.a,{onClick:p.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(d.a,{key:e.name,value:e.name},e.name))),r.a.createElement(m.a,{onClick:function(){Object(p.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(71),c=a.n(l),u=a(1),m=a(10),h=a(81),d=a(18),p=a(15),f=a(91),g=a(128);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(d.a,{money:t.cap}))))}),Object(p.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(71),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;t{e.player.lastUpdate-=t,e.engine._lastUpdate-=t,h.b.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(864),o=a(866),s=a(867),l=a(27),c=a(47),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(23),o=a(55),s=a(18),l=a(114),c=a(4),u=a(25),m=a(117),h=a(865),d=a(1),p=a(29),f=a(32),g=a(10),y=a(76);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(p.a,{title:r.a.createElement(d.a,null,"Your rank within the Bladeburner division.")},r.a.createElement(d.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(p.a,{title:r.a.createElement(d.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(d.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(d.a,null,"Stamina Penalty: ",Object(i.c)(100*(1-e.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement(d.a,null,"Team Size: ",Object(i.c)(e.bladeburner.teamSize,0)),r.a.createElement(d.a,null,"Team Members Lost: ",Object(i.c)(e.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement(d.a,null,"Num Times Hospitalized: ",e.bladeburner.numHosp),r.a.createElement(d.a,null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:e.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement(d.a,null,"Current City: ",e.bladeburner.city),r.a.createElement(f.a,{display:"flex"},r.a.createElement(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.a,null,"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")},r.a.createElement(d.a,null,"Est. 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(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.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(d.a,null,"Bonus time:"," ",Object(i.b)(e.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3)))),r.a.createElement("br",null)),r.a.createElement(d.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(p.a,{title:E?"":r.a.createElement(d.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(388),o=a(40),s=a(22),l=a(14),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(76),o=a(266),s=a(70),l=a(32),c=a(1),u=a(81),m=a(131),h=a(155);const d=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 p(e){return r.a.createElement(s.a,{sx:{p:0}},r.a.createElement(c.a,null,e.content))}function f(e){const t=d(),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(p,{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 d}));var n=a(0),r=a.n(n),i=a(868),o=a(872),s=a(880),l=a(885),c=a(889),u=a(571),m=a(239),h=a(32);function d(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(869),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(870),o=a(233);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 p}));var n=a(0),r=a.n(n),i=a(38),o=a(163),s=a(23),l=a(871),c=a(151),u=a(319),m=a(1),h=a(32),d=a(76);function p(e){const t=Object(n.useState)(!1)[1];const a=e.action.name===e.bladeburner.action.name,p=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":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(d.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,null,r.a.createElement(c.a,{value:e.action.name})," (IN PROGRESS - ",Object(s.c)(p,0)," /"," ",Object(s.c)(e.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(m.a,null,Object(o.a)({progress:p/e.bladeburner.actionTimeToComplete}))):r.a.createElement(h.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(m.a,null,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's unit 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))}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return o}));var n=a(0),r=a(873),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(874);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(163),s=a(23),l=a(875),c=a(389),u=a(151),m=a(516),h=a(519),d=a(319),p=a(1),f=a(76);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(p.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(p.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(d.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(p.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(515),o=a(1),s=a(29);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(515),o=a(1),s=a(29);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(881),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(882);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(163),s=a(23),l=a(389),c=a(516),u=a(519),m=a(319),h=a(520),d=a(884),p=a(151),f=a(1),g=a(76);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),_=d.a[e.action.name];if(void 0===_)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(p.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(p.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,_.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(40),s=a(1),l=a(10),c=a(81);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(886),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(232),o=a(887);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(23),o=a(38),s=a(163),l=a(520),c=a(888),u=a(151),m=a(389),h=a(319),d=a(1),p=a(76);function f(e){const t=Object(n.useState)(!1)[1];if(null!=e.bladeburner.blackops[e.action.name])return r.a.createElement("h2",{style:{display:"block"}},e.action.name," (COMPLETED)");const a=e.bladeburner.action.type===o.a.BlackOperation&&e.action.name===e.bladeburner.action.name,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(p.a,{sx:{my:1,p:1}},r.a.createElement(d.a,null,a?r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{value:e.action.name})," (IN PROGRESS - ",Object(i.c)(y,0)," /"," ",Object(i.c)(e.bladeburner.actionTimeToComplete,0),")",r.a.createElement("p",{style:{display:"block"}},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(d.a,null,b.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(d.a,{color:g?"primary":"error"},"Required Rank: ",Object(i.c)(e.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement(d.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 the tried to break into one of Universal Energy's facilities in order to cause a city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our help.",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 shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its creation.")},"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 facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.",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 peoples dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in Chonqging, we have reason to believe that one of the broadcast towers there has been compromised by Synthoids and is being used to spread pro-Synthoid propaganda.",r.a.createElement("br",null),r.a.createElement("br",null),"The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important 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(890),o=a(55),s=a(23),l=a(1),c=a(8);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(891),i=a(216);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(151),o=a(23),s=a(1),l=a(98),c=a(32),u=a(76),m=a(511),h=a.n(m),d=a(892),p=a.n(d);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,d=!!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||d?r.a.createElement(l.a,{disabled:!0},r.a.createElement(p.a,null)):r.a.createElement(l.a,{onClick:function(){e.bladeburner.skillPoints{const e=setInterval(()=>d(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(897),o=a(899),s=a(126),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(25),o=a(23),s=a(4),l=a(107),c=a(102),u=a(73),m=a(898),h=a(126),d=a(1),p=a(29),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(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.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(d.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(p.a,{title:r.a.createElement(d.a,null,"Penalty for respect and money gain rates due to Wanted Level")},r.a.createElement(d.a,null,"Wanted Level Penalty: -",Object(o.c)(100*(1-e.getWantedPenalty()),2),"%"))),r.a.createElement(d.a,null,"Money gain rate: ",r.a.createElement(l.a,{money:5*e.moneyGainRate})),r.a.createElement(f.a,{display:"flex"},r.a.createElement(p.a,{title:r.a.createElement(d.a,null,"The percentage of total territory your Gang controls")},r.a.createElement(d.a,null,"Territory: ",a,"%"))),r.a.createElement(d.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(7),i=a(23),o=a(1),s=a(29),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(900),o=a(907),s=a(126);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(901),o=a(32),s=a(1),l=a(305),c=a(99),u=a(76),m=a(210),h=a(71),d=a.n(h),p=a(136),f=a.n(p);function g(e){const[t,a]=Object(n.useState)(!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(d.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(902),o=a(904),s=a(905),l=a(47);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(23),o=a(4),s=a(903),l=a(1),c=a(29),u=a(10),m=a(390),h=a(98),d=a(256),p=a.n(d);function f(e){const[t,a]=Object(n.useState)(!1),[d,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:d,onClose:()=>f(!1),member:e.member,onAscend:e.onAscend}),r.a.createElement(h.a,{onClick:()=>a(!0)},r.a.createElement(p.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(40),l=a(126),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(114),s=a(107),l=a(126),c=a(79),u=a(111);function m(e){const t=Object(l.b)(),[a,m]=Object(n.useState)(e.member.task);const h=t.getAllTaskNames(),d=[["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:d}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(205),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 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:1,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:2.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:6,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:15,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:120,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:1,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:1.2,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:5,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:2.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:15,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars

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

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:58,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets

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

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:120,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism

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 h}));var n=a(0),r=a.n(n),i=a(908),o=a(263),s=a(23),l=a(126),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(40),o=a(15),s=a(126),l=a(1),c=a(81),u=a(10);function m(e){const t=Object(s.b)(),[a,m]=Object(n.useState)(""),h=""===a||!t.canRecruitMember();function d(){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&&d()},onChange:function(e){m(e.target.value)},type:"text",placeholder:"unique name",InputProps:{endAdornment:r.a.createElement(u.a,{disabled:h,onClick:d},"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(23),s=a(73),l=a(126),c=a(1),u=a(156),m=a(142),h=a(29),d=a(32),p=a(76);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)),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(d.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(p.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(23),o=a(4),s=a(185),l=a(18),c=a(126),u=a(154),m=a(27),h=a(1),d=a(10),p=a(29),f=a(32),g=a(76);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.gt(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(p.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(p.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(d.a,{onClick:function(){e.member.buyUpgrade(e.upg,a,t),e.rerender()}},r.a.createElement(l.a,{money:t.getUpgradeCost(e.upg)}))))}function _(e){const t=Object(c.b)(),a=m.b.Player(),o=Object(n.useState)(!1)[1];function l(){o(e=>!e)}function d(e,n){return Object.keys(s.a).filter(r=>{const i=s.a[r];return!a.money.lt(t.getUpgradeCost(i))&&(i.type===n&&!e.includes(r))}).map(e=>s.a[e])}const p=d(e.member.upgrades,u.a.Weapon),_=d(e.member.upgrades,u.a.Armor),v=d(e.member.upgrades,u.a.Vehicle),k=d(e.member.upgrades,u.a.Rootkit),w=d(e.member.augmentations,u.a.Augmentation),C=e.member.calculateAscensionMult(e.member.hack_asc_points),S=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*C,2),")",r.a.createElement("br",null),"Str: ",e.member.str," (x",Object(i.c)(e.member.str_mult*S,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"),p.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"),_.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"),k.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(p.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(_,{key:e.name,member:e})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(154),r=a(4);class i{constructor(e="",t=0,a=n.a.Weapon,r={}){this.name=e,this.cost=t,this.type=a,this.mults=r,this.desc=this.createDescription()}createDescription(){const e=["Effects:"];return null!=this.mults.str&&(e.push(`+${r.a.formatPercentage(this.mults.str-1,0)} strength skill`),e.push(`+${r.a.formatPercentage((this.mults.str-1)/4,2)} strength exp`)),null!=this.mults.def&&(e.push(`+${r.a.formatPercentage(this.mults.def-1,0)} defense skill`),e.push(`+${r.a.formatPercentage((this.mults.def-1)/4,2)} defense exp`)),null!=this.mults.dex&&(e.push(`+${r.a.formatPercentage(this.mults.dex-1,0)} dexterity skill`),e.push(`+${r.a.formatPercentage((this.mults.dex-1)/4,2)} dexterity exp`)),null!=this.mults.agi&&(e.push(`+${r.a.formatPercentage(this.mults.agi-1,0)} agility skill`),e.push(`+${r.a.formatPercentage((this.mults.agi-1)/4,2)} agility exp`)),null!=this.mults.cha&&(e.push(`+${r.a.formatPercentage(this.mults.cha-1,0)} charisma skill`),e.push(`+${r.a.formatPercentage((this.mults.cha-1)/4,2)} charisma exp`)),null!=this.mults.hack&&(e.push(`+${r.a.formatPercentage(this.mults.hack-1,0)} hacking skill`),e.push(`+${r.a.formatPercentage((this.mults.hack-1)/4,2)} hacking exp`)),e.join("
")}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 d}));var n=a(0),r=a.n(n),i=a(913),o=a(50),s=a(941),l=a(27),c=a(43),u=a(942),m=a(571),h=a(239);function d(){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[d,p]=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:d,onChange:function(e,t){p(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"===d&&r.a.createElement(u.a,{rerender:a}),-1===d&&r.a.createElement(s.a,{setDivisionName:p}),"string"==typeof d&&"Overview"!==d&&r.a.createElement(i.a,{rerender:a,divisionName:d+""}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(914),o=a(43),s=a(22);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(915),o=a(940),s=a(43),l=a(571),c=a(239);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(916),o=a(919),s=a(922),l=a(27),c=a(43),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 P}));var n=a(0),r=a.n(n),i=a(46),o=a(4),s=a(917),l=a(918),c=a(18),u=a(43),m=a(1),h=a(10),d=a(98),p=a(76),f=a(517),g=a.n(f),y=a(518),b=a.n(y),E=a(29),_=a(79),v=a(111),k=a(238),w=a(189),C=a(65),S=a(42);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=d/e.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement(k.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Unassigned Employees:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,n))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Avg Employee Morale:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,o.a.format(f,"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Avg Employee Happiness:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,o.a.format(g,"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Avg Employee Energy:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,o.a.format(y,"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.b,null,r.a.createElement(m.a,null,"Total Employee Salary:")),r.a.createElement(S.b,null,r.a.createElement(m.a,null,r.a.createElement(c.a,{money:p})))),s&&r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,null,r.a.createElement(S.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(S.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office),"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.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(S.b,null,r.a.createElement(m.a,null,o.a.format(a.getOfficeProductivity(e.office,{forProduct:!0}),"0.000")))),r.a.createElement(C.a,null,r.a.createElement(S.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(S.b,null,r.a.createElement(m.a,null,"x",o.a.format(a.getBusinessFactor(e.office),"0.000"))))))),r.a.createElement(k.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 P(e){const t=Object(u.b)(),a=Object(u.c)(),[i,o]=Object(n.useState)(!1),[c,d]=Object(n.useState)(!1),[f,g]=Object(n.useState)(!1);return r.a.createElement(p.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.lt(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.lt(0),onClick:()=>d(!0)},"Throw Party"))),r.a.createElement(l.a,{rerender:e.rerender,office:e.office,open:c,onClose:()=>d(!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(41),s=a(67),l=a(40),c=a(43),u=a(1),m=a(10),h=a(29),d=a(32);function p(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.lt(e.cost),onClick:()=>{return a=e.cost,n=e.size,void(t.funds.lt(a)||(Object(s.y)(t,e.office,n),e.rerender(),e.onClose()));var a,n}},"+",e.size)))}function f(e){const t=Object(c.b)(),a=Math.round(e.office.size/o.a.OfficeInitialSize),n=o.a.OfficeInitialCost*Math.pow(1.09,a);let i=0;for(let e=0;e<5;++e)i+=Math.pow(1.09,a+e);const s=o.a.OfficeInitialCost*i,m=t.funds.dividedBy(o.a.OfficeInitialCost).toNumber();let h=1;for(i=Math.pow(1.09,a);h<50&&!(i>=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(d.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,null,"Upgrade size: "),r.a.createElement(p,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:n,size:o.a.OfficeInitialSize}),r.a.createElement(p,{onClose:e.onClose,rerender:e.rerender,office:e.office,corp:t,cost:s,size:5*o.a.OfficeInitialSize}),r.a.createElement(p,{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(67),l=a(18),c=a(40),u=a(43),m=a(1),h=a(10),d=a(81),p=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.gte(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!")}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((function(){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}))}),null),r.a.createElement(p.a,{display:"flex",alignItems:"center"},r.a.createElement(d.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(50),o=a(326),s=a(4),l=a(163),c=a(920),u=a(921),m=a(18),h=a(107),d=a(114),p=a(390),f=a(119),g=a(43),y=a(1),b=a(10),E=a(29),_=a(76),v=a(98),k=a(256),w=a.n(k),C=a(32);function S(){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.lt(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],_=t.lastCycleRevenue.minus(t.lastCycleExpenses).toNumber();let k=!1;const S=t.getAdvertisingFactors(),x=S[1],O=S[2],M=S[3],T=S[0];function R(e){return Object(l.a)({progress:e,totalTicks:20})}return f&&(k=!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.toNumber()}),")"),r.a.createElement("br",null),r.a.createElement(d.a,{rows:[["Awareness:",s.a.format(t.awareness,"0.000")],["Popularity:",s.a.format(t.popularity,"0.000")]]}),!1!==k&&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(d.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(d.a,{rows:[["Revenue:",r.a.createElement(h.a,{money:t.lastCycleRevenue.toNumber()})],["Expenses:",r.a.createElement(h.a,{money:t.lastCycleExpenses.toNumber()})],["Profit:",r.a.createElement(h.a,{money:_})]]}),r.a.createElement("br",null),r.a.createElement(C.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(p.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(C.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.funds.lt(h)||(t.funds=t.funds.minus(h),a.upgrade(l,{corporation:t,office:e.office}),e.rerender())}n.push(r.a.createElement(E.a,{key:s,title:l[5]},r.a.createElement("span",null,r.a.createElement(b.a,{disabled:t.funds.lt(h),onClick:i},l[4]," - ",r.a.createElement(f.a,{money:h,corp:t})))))}return r.a.createElement(r.a.Fragment,null,n)}function M(e){const t=Object(g.c)();return r.a.createElement(_.a,null,r.a.createElement(x,null),r.a.createElement("br",null),r.a.createElement(y.a,null,"Purchases & Upgrades"),r.a.createElement(O,{office:e.office,rerender:e.rerender})," ",r.a.createElement("br",null),t.makesProducts&&r.a.createElement(S,null))}},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(40),s=a(50),l=a(67),c=a(43),u=a(1),m=a(81),h=a(10),d=a(79),p=a(111);function f(e){const t=Object(c.b)(),a=Object(c.c)(),f=Object.keys(a.offices).filter(e=>0!==a.offices[e]),[g,y]=Object(n.useState)(f.length>0?f[0]:""),[b,E]=Object(n.useState)(""),[_,v]=Object(n.useState)(null),[k,w]=Object(n.useState)(null);if(a.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);let C=r.a.createElement(r.a.Fragment,null);switch(a.type){case s.a.Food:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new restaurant!");break;case s.a.Tobacco:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new tobacco product!");break;case s.a.Pharmaceutical:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and develop a new pharmaceutical drug!");break;case s.a.Computer:case"Computer":C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and manufacture a new computer hardware product!");break;case s.a.Robotics:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and create a new robot or robotic system!");break;case s.a.Software:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of software!");break;case s.a.Healthcare:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new hospital!");break;case s.a.RealEstate:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of real estate property!");break;default:return C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new product!"),r.a.createElement(r.a.Fragment,null)}function S(){if(null!==_&&null!==k){try{Object(l.j)(t,a,g,b,_,k)}catch(e){Object(i.a)(e+"")}e.onClose()}}return C=r.a.createElement(r.a.Fragment,null,C,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,C),r.a.createElement(p.a,{style:{margin:"5px"},onChange:function(e){y(e.target.value)},defaultValue:g},f.map(e=>r.a.createElement(d.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&&S()},type:"number",placeholder:"Marketing investment"}),r.a.createElement(h.a,{onClick:S},"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(40),o=a(50),s=a(41),l=a(67),c=a(279),u=a(15),m=a(1),h=a(29),d=a(10),p=a(32),f=a(305),g=a(99),y=a(210),b=a(71),E=a.n(b),_=a(136),v=a.n(_);function k({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(p.a,{m:4},e.children.map(e=>r.a.createElement(k,{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(k,{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 S}));var n=a(0),r=a.n(n),i=a(41),o=a(168),s=a(352),l=a(204),c=a(923),u=a(924),m=a(929),h=a(159),d=a(4),p=a(119),f=a(934),g=a(935),y=a(67),b=a(43),E=a(1),_=a(29),v=a(76),k=a(10),w=a(32);function C(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 C=i.a.WarehouseUpgradeBaseCost*Math.pow(1.07,e.warehouse.level+1),S=t.funds.gt(C);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){if("RealEstate"===t)continue;const a=e.warehouse.materials[t];h.a.hasOwnProperty(t)&&(0!==a.qty&&(T=r.a.createElement(r.a.Fragment,null,T,t,": ",d.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,": ",d.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(_.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: ",d.a.formatBigNumber(e.warehouse.sizeUsed)," /"," ",d.a.formatBigNumber(e.warehouse.size))),r.a.createElement(k.a,{disabled:!S,onClick:function(){null!==a&&0!==e.warehouse&&S&&(++e.warehouse.level,e.warehouse.updateSize(t,a),t.funds=t.funds.minus(C),e.rerender())}},"Upgrade Warehouse Size - ",r.a.createElement(p.a,{money:C,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,{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(k.a,{onClick:()=>y(!0)},"Configure Smart Supply"),r.a.createElement(c.a,{open:l,onClose:()=>y(!1),warehouse:e.warehouse})),O,M)}function S(e){return e.warehouse instanceof l.a?r.a.createElement(C,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.lt(i.a.WarehouseInitialCost);return r.a.createElement(v.a,null,r.a.createElement(k.a,{onClick:function(){n||(Object(y.m)(t,a,e.city),e.rerender())},disabled:n},"Purchase Warehouse (",r.a.createElement(p.a,{money:i.a.WarehouseInitialCost,corp:t}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(67),o=a(168),s=a(15),l=a(40),c=a(43),u=a(1),m=a(156),h=a(142);function d(e){const[t,a]=Object(n.useState)(!!e.warehouse.smartSupplyUseLeftovers[e.matName]);return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{control:r.a.createElement(h.a,{checked:t,onChange:function(t){try{const a=e.warehouse.materials[e.matName];Object(i.v)(e.warehouse,a,t.target.checked)}catch(e){Object(s.a)(e+"")}a(t.target.checked)}}),label:r.a.createElement(u.a,null,e.warehouse.materials[e.matName].name)}),r.a.createElement("br",null))}function p(e){const t=Object(c.c)(),a=Object(n.useState)(!1)[1];const s=[];for(const a in e.warehouse.materials)e.warehouse.materials[a]instanceof o.a&&Object.keys(t.reqMats).includes(a)&&s.push(r.a.createElement(d,{key:a,warehouse:e.warehouse,matName:a}));return r.a.createElement(l.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{control:r.a.createElement(h.a,{checked:e.warehouse.smartSupplyEnabled,onChange:function(t){Object(i.u)(e.warehouse,t.target.checked),a(e=>!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__(41),_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(925),_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(926),_SellProductModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(927),_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(928),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(118),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(18),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(29),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(76),_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(40),o=a(43),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(67),o=a(40),s=a(1),l=a(10),c=a(81);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 d}));var n=a(0),r=a.n(n),i=a(15),o=a(67),s=a(40),l=a(1),c=a(81),u=a(10),m=a(156),h=a(142);function d(e){const[t,a]=Object(n.useState)(!0),[d,p]=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,d,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:d,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(e){p(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 p}));var n=a(0),r=a.n(n),i=a(4),o=a(40),s=a(43),l=a(1),c=a(81),u=a(156),m=a(142),h=a(29);function d(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),d=Object(n.useState)(!1)[1];const p=a;let f=1;return p>e.product.pCost&&p-e.product.pCost>t&&(f=t/(p-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(p),", 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,d(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"))}),r.a.createElement(l.a,null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function p(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(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(d,{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__(325),_ExportModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(930),_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(931),_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(932),_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(933),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(118),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(18),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(43),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(29),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(76),_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(67),s=a(40),l=a(43),c=a(1),u=a(81),m=a(10),h=a(32),d=a(79),p=a(111);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)(""),_=Object(n.useState)(!1)[1];function v(t){for(let a=0;a!e)}const k=t.divisions.find(e=>e.name===a);if(void 0===k)throw new Error(`Export popup somehow ended up with undefined division '${k}'`);const w=Object.keys(k.warehouses).filter(e=>0!==k.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(p.a,{onChange:function(e){f(e.target.value)},value:a},t.divisions.map(e=>r.a.createElement(d.a,{key:e.name,value:e.name},e.name))),r.a.createElement(p.a,{onChange:function(e){y(e.target.value)},value:g},w.map(e=>{if(0!==k.warehouses[e])return r.a.createElement(d.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 p}));var n=a(0),r=a.n(n),i=a(4),o=a(40),s=a(43),l=a(1),c=a(81),u=a(156),m=a(142),h=a(29);function d(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 d=e.mat.getMarkupLimit();const p=t;let f=1;return p>e.mat.bCost?p-e.mat.bCost>d&&(f=Math.pow(d/(p-e.mat.bCost),2)):p!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"))}),r.a.createElement(l.a,null,"Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take effect, not Market-TA.I"))}function p(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(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(d,{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(67),s=a(40),l=a(1),c=a(81),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 d(){try{Object(o.o)(e.mat,t,m)}catch(e){Object(i.a)(e+"")}e.onClose()}function p(e){13===e.keyCode&&d()}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:p}),r.a.createElement(c.a,{value:m,type:"text",placeholder:"Sell price",onChange:function(e){h(e.target.value)},onKeyDown:p}),r.a.createElement(u.a,{onClick:d},"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(159),s=a(4),l=a(67),c=a(40),u=a(43),m=a(1),h=a(81),d=a(10);function p(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,"Not enough warehouse space to purchase this amount"):isNaN(a)?r.a.createElement(r.a.Fragment,null,"Invalid put for Bulk Purchase amount"):r.a.createElement(r.a.Fragment,null,"Purchasing ",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.gt(a))return void Object(i.a)("You cannot afford this purchase.");t.funds=t.funds.minus(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(p,{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(d.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(d.a,{onClick:s},"Confirm"),r.a.createElement(d.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(226);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.a,{display:!1,tex:t.join("+")+String.raw`\Rightarrow`+a.map(e=>String.raw`1\text{ }${e}`).join("+")})}},,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(41),o=a(15),s=a(67),l=a(119),c=a(43),u=a(1),m=a(79),h=a(111),d=a(10);function p(e){const t=Object(c.b)(),a=Object(c.c)(),p=Object.keys(a.offices).filter(e=>0===a.offices[e]),[f,g]=Object(n.useState)(p[0]),y=t.funds.lt(i.a.OfficeInitialCost);return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Would you like to expand into a new city by opening an office? This would cost"," ",r.a.createElement(l.a,{money:i.a.OfficeInitialCost,corp:t})),r.a.createElement(h.a,{value:f,onChange:function(e){g(e.target.value)}},p.map(e=>r.a.createElement(m.a,{key:e,value:e},e))),r.a.createElement(d.a,{onClick:function(){try{Object(s.k)(t,a,f)}catch(e){return void Object(o.a)(e+"")}Object(o.a)(`Opened a new office in ${f}!`),e.cityStateSetter(f)},disabled:y},"Confirm"))}},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(50),s=a(43),l=a(67),c=a(1),u=a(10),m=a(81),h=a(79),d=a(32),p=a(111);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 _=t.funds.lt(E)||""===y;function v(){if(!_){try{Object(l.l)(t,f,y)}catch(e){return void Object(i.a)(e+"")}e.setDivisionName(y)}}const k=o.b[f];if(void 0===k)throw new Error(`Trying to create an industry that doesn't exists: '${f}'`);return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,null,"Create a new division to expand into a new industry:"),r.a.createElement(p.a,{value:f,onChange:function(e){g(e.target.value)}},a.map(e=>r.a.createElement(h.a,{key:e,value:e},e))),r.a.createElement(c.a,null,k(t)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,"Division name:"),r.a.createElement(d.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"}),r.a.createElement(u.a,{disabled:_,sx:{mx:1},onClick:v},"Create Division")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return A}));var n=a(0),r=a.n(n),i=a(943),o=a(944),s=a(945),l=a(946),c=a(947),u=a(948),m=a(949),h=a(950),d=a(951),p=a(25),f=a(41),g=a(385),y=a(386),b=a(7),E=a(4),_=a(23),v=a(18),k=a(107),w=a(114),C=a(27),S=a(43),x=a(1),O=a(29),M=a(10),T=a(32),R=a(76),P=a(47);function A({rerender:e}){const t=C.b.Player(),a=Object(S.b)(),n=a.revenue.minus(a.expenses).toNumber(),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.toNumber()})],["Total Revenue:",r.a.createElement(k.a,{money:a.revenue.toNumber()})],["Total Expenses:",r.a.createElement(k.a,{money:a.expenses.toNumber()})],["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(D,{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(j,null),r.a.createElement("br",null),r.a.createElement(I,{rerender:e}))}function N({rerender:e}){const t=Object(S.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(d.a,{open:o,onClose:()=>s(!1),rerender:e}),r.a.createElement("br",null))}function I({rerender:e}){const t=Object(S.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(P.a,{container:!0},Object.values(g.a).filter(e=>0===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(P.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(S.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),[h,d]=Object(n.useState)(!1),[p,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>.5,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:()=>d(!0)},"Issue New Shares"))),r.a.createElement(m.a,{open:h,onClose:()=>d(!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:p,onClose:()=>f(!1)}),r.a.createElement("br",null))}function j(){const e=C.b.Player(),t=Object(S.b)(),[a,i]=Object(n.useState)(!1),o=t.determineValuation()>=f.a.BribeThreshold&&e.factions.filter(e=>p.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 D({profit:e}){const t=Object(S.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,o=t.numShares*i;return r.a.createElement(w.a,{rows:[["Retained Profits (after dividends):",r.a.createElement(k.a,{money:n})],["Dividend Percentage:",E.a.format(t.dividendPercentage/100,"0%")],["Dividends per share:",r.a.createElement(k.a,{money:i})],["Your earnings as a shareholder (Pre-Tax):",r.a.createElement(k.a,{money:o})],["Dividend Tax Rate:",r.a.createElement(r.a.Fragment,null,t.dividendTaxPercentage,"%")],["Your earnings as a shareholder (Post-Tax):",r.a.createElement(k.a,{money:o*(1-t.dividendTaxPercentage/100)})]]})}function B(){const e=Object(S.b)().storedCycles*b.a.MilliPerCycle;return e<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement(x.a,null,"Bonus time: ",Object(_.b)(e),r.a.createElement("br",null),r.a.createElement("br",null))}},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(67),s=a(119),l=a(43),c=a(1),u=a(29),m=a(10),h=a(32),d=a(47);function p(e){const t=Object(l.b)(),a=e.upgrade,n=t.upgrades[a[0]],p=a[1],f=a[2],g=p*Math.pow(f,n),y=a[5];return r.a.createElement(d.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.lt(g),sx:{mx:1},onClick:function(){if(!t.funds.lt(g)){try{Object(o.h)(t,e.upgrade)}catch(e){Object(i.a)(e+"")}e.rerender()}}},r.a.createElement(s.a,{money:g,corp:t})),r.a.createElement(u.a,{title:y},r.a.createElement(c.a,null,a[4]," "))))}},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(43),s=a(67),l=a(119),c=a(1),u=a(29),m=a(10),h=a(32),d=a(47);function p(e){const t=Object(o.b)(),a=e.upgradeData,n=a[3];return r.a.createElement(d.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.lt(a[1]),sx:{mx:1},onClick:function(){if(!t.funds.lt(a[1])){try{Object(s.x)(t,e.upgradeData)}catch(e){Object(i.a)(e+"")}e.rerender()}}},r.a.createElement(l.a,{money:a[1],corp:t})),r.a.createElement(u.a,{title:n},r.a.createElement(c.a,null,a[2]))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(25),o=a(41),s=a(4),l=a(15),c=a(40),u=a(27),m=a(43),h=a(1),d=a(10),p=a(79),f=a(81),g=a(32),y=a(111);function b(e){const t=u.b.Player(),a=t.factions.filter(e=>!!i.a[e].getInfo().offersWork()&&!t.hasGangWith(e)),b=Object(m.b)(),[E,_]=Object(n.useState)(0),[v,k]=Object(n.useState)(0),[w,C]=Object(n.useState)(a.length>0?a[0]:""),S=null===E||null===v||0===E&&0===v||isNaN(E)||isNaN(v)||E<0||v<0||b.funds.lt(E)||v>b.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){C(e.target.value)}},a.map(e=>{if(i.a[e].getInfo().offersWork()&&!t.hasGangWith(e))return r.a.createElement(p.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.funds.lt(e)?"ERROR: You do not have this much money to bribe with":t>b.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){_(parseFloat(e.target.value))},placeholder:"Corporation funds"}),r.a.createElement(f.a,{sx:{mx:1},onChange:function(e){k(parseFloat(e.target.value))},placeholder:"Stock Shares"}),r.a.createElement(d.a,{disabled:S,sx:{mx:1},onClick:()=>function(t,a){const n=i.a[w];if(S)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.minus(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(40),l=a(27),c=a(43),u=a(41),m=a(1),h=a(81),d=a(10),p=a(18);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(){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),t.recordMoneySource(s,"corporation"),e.onClose(),Object(o.a)(r.a.createElement(r.a.Fragment,null,"Sold ",i.a.formatMoney(f)," shares for",r.a.createElement(p.a,{money:s}),". The corporation's stock price fell to  ",r.a.createElement(p.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((function(e){if(null===e.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(e.shares)||e.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(e.shares>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))}}),{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&&b()}}),r.a.createElement(d.a,{disabled:y,onClick:b,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(40),o=a(4),s=a(27),l=a(43),c=a(1),u=a(10),m=a(81);function h(e){const t=s.b.Player(),a=Object(l.b)(),[h,d]=Object(n.useState)(null);const p=1.1*a.sharePrice,f=null===h||isNaN(h)||h<=0||h>a.issuedShares||h*p>t.money;function g(){if(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*p),e.onClose(),e.rerender()}}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(p),". Your company currently has ",o.a.formatBigNumber(a.issuedShares)," outstanding stock shares."),r.a.createElement((function(){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*p))}),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?d(null):d(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 d}));var n=a(0),r=a.n(n),i=a(15),o=a(40),s=a(41),l=a(67),c=a(43),u=a(1),m=a(81),h=a(10);function d(e){const t=Object(c.b)(),[a,d]=Object(n.useState)(0),p=!isNaN(a)&&a>=0&&a<=100*s.a.DividendMaxPercentage;function f(){if(p&&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 ",s.a.DividendMaxPercentage,". (A percentage of 0 means no dividends will be issued",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),"* Dividends are taxed. Taxes start at 50%, but can be decreased",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement(m.a,{autoFocus:!0,value:a,onChange:function(e){if(""===e.target.value)d(0);else{let t=parseFloat(e.target.value);t>50&&(t=50),t<0&&(t=0),d(t)}},onKeyDown:function(e){13===e.keyCode&&f()},placeholder:"Dividend %",type:"number"}),r.a.createElement(h.a,{disabled:!p,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(40),l=a(30),c=a(41),u=a(43),m=a(1),h=a(81),d=a(10);function p(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 _(){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.plus(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(p,{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&&_()}}),r.a.createElement(d.a,{disabled:E,onClick:_,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(41),s=a(40),l=a(43),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,d=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(d,"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-=d,e.rerender(),e.onClose()}},"Accept"))}},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(40),s=a(4),l=a(43),c=a(1),u=a(10),m=a(81),h=a(32);function d(e){const t=Object(l.b)(),[a,d]=Object(n.useState)(""),p=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(p)," 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){d(e.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(e){13===e.keyCode&&f()}}),r.a.createElement(u.a,{sx:{mx:1},onClick:f},"Go Public")))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(953),o=a(954),s=a(27);function l(e){const t=s.b.Player(),a=s.b.Router(),[l,c]=Object(n.useState)(!1);if(void 0===e.location.infiltrationData)throw new Error("Trying to do infiltration on invalid location.");const u=e.location.infiltrationData.startingSecurityLevel,m=function(e,t){const a=e.strength+e.defense+e.dexterity+e.agility+e.charisma,n=t-Math.pow(a,.9)/250-e.intelligence/1600;return n<0?0:n>3?3:n}(t,u);return l?r.a.createElement(o.a,{StartingDifficulty:u,Difficulty:m,MaxLevel:e.location.infiltrationData.maxClearanceLevel}):r.a.createElement(i.a,{Location:e.location,Difficulty:m,MaxLevel:e.location.infiltrationData.maxClearanceLevel,start:()=>c(!0),cancel:function(){a.toCity()}})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(47),o=a(1),s=a(10);function l(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 c(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,{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,l("white",13*t),l("orange",13*(t-1)),l("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 _}));var n,r=a(27),i=a(0),o=a.n(i),s=a(47),l=a(955),c=a(956),u=a(958),m=a(959),h=a(960),d=a(961),p=a(962),f=a(963),g=a(964),y=a(965),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,d.a,p.a,f.a,g.a];function _(e){const t=r.b.Player(),a=r.b.Router(),[c,u]=Object(i.useState)(1),[m,h]=Object(i.useState)(n.Countdown),[d,p]=Object(i.useState)(""),[f,g]=Object(i.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*E.length)});function _(){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:_()})}function k(e){p(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(){k(!0),c===e.MaxLevel?h(n.Sell):(h(n.Countdown),u(c+1)),v()},onFailure:function(r){h(n.Countdown),k(!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,MaxLevel:e.MaxLevel})}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((function(){return o.a.createElement("h4",null,o.a.createElement("span",{style:{color:"gray"}},d.slice(0,d.length-1)),d[d.length-1])}),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(47),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 d}));var n=a(0),r=a.n(n),i=a(47),o=a(178),s=a(179),l=a(222),c=a(180),u=a(522),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 d(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[d,p]=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":"":"]"}(t);a&&(!function(e,t){return"["===e&&"]"===t||"<"===e&&">"===t||"("===e&&")"===t||"{"===e&&"}"===t}(f[f.length-d.length-1],a)?e.onFailure():f.length!==d.length+1?p(d+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(47),o=a(178),s=a(179),l=a(180),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=-1;const a=window.setTimeout(()=>{m(!1),e=window.setTimeout(()=>m(!0),t.window)},3250*Math.random()+1500);return()=>{clearInterval(a),-1!==e&&clearInterval(e)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:e.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(c.a,{variant:"h4"},"Slash when his guard is down!"),r.a.createElement(c.a,{variant:"h4"},a?"!Guarding!":"!ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(t){t.preventDefault(),32===t.keyCode&&(a?e.onFailure():e.onSuccess())},onFailure:e.onFailure})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(47),o=a(178),s=a(179),l=a(222),c=a(180),u=a(522),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 d(e){const t={timer:0,min:0,max:0};Object(c.a)(h,e.difficulty,t);const a=t.timer,[d]=Object(n.useState)(function(e){const t=Object(l.b)(e.min,e.max);let a="";for(let e=0;e0&&(a+=" "),a+=p[Math.floor(Math.random()*p.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(),16===t.keyCode)return;const a=f+t.key.toUpperCase();d.startsWith(a)?d===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)"}},d)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(m.a,null,f,r.a.createElement(u.a,null))))}const p=["ALGORITHM","ANALOG","APP","APPLICATION","ARRAY","BACKUP","BANDWIDTH","BINARY","BIT","BITE","BITMAP","BLOG","BLOGGER","BOOKMARK","BOOT","BROADBAND","BROWSER","BUFFER","BUG","BUS","BYTE","CACHE","CAPS LOCK","CAPTCHA","CD","CD-ROM","CLIENT","CLIPBOARD","CLOUD","COMPUTING","COMMAND","COMPILE","COMPRESS","COMPUTER","CONFIGURE","COOKIE","COPY","CPU","CYBERCRIME","CYBERSPACE","DASHBOARD","DATA","MINING","DATABASE","DEBUG","DECOMPRESS","DELETE","DESKTOP","DEVELOPMENT","DIGITAL","DISK","DNS","DOCUMENT","DOMAIN","DOMAIN NAME","DOT","DOT MATRIX","DOWNLOAD","DRAG","DVD","DYNAMIC","EMAIL","EMOTICON","ENCRYPT","ENCRYPTION","ENTER","EXABYTE","FAQ","FILE","FINDER","FIREWALL","FIRMWARE","FLAMING","FLASH","FLASH DRIVE","FLOPPY DISK","FLOWCHART","FOLDER","FONT","FORMAT","FRAME","FREEWARE","GIGABYTE","GRAPHICS","HACK","HACKER","HARDWARE","HOME PAGE","HOST","HTML","HYPERLINK","HYPERTEXT","ICON","INBOX","INTEGER","INTERFACE","INTERNET","IP ADDRESS","ITERATION","JAVA","JOYSTICK","JUNKMAIL","KERNEL","KEY","KEYBOARD","KEYWORD","LAPTOP","LASER PRINTER","LINK","LINUX","LOG OUT","LOGIC","LOGIN","LURKING","MACINTOSH","MACRO","MAINFRAME","MALWARE","MEDIA","MEMORY","MIRROR","MODEM","MONITOR","MOTHERBOARD","MOUSE","MULTIMEDIA","NET","NETWORK","NODE","NOTEBOOK","COMPUTER","OFFLINE","ONLINE","OPENSOURCE","OPERATING","SYSTEM","OPTION","OUTPUT","PAGE","PASSWORD","PASTE","PATH","PHISHING","PIRACY","PIRATE","PLATFORM","PLUGIN","PODCAST","POPUP","PORTAL","PRINT","PRINTER","PRIVACY","PROCESS","PROGRAM","PROGRAMMER","PROTOCOL","QUEUE","QWERTY","RAM","REALTIME","REBOOT","RESOLUTION","RESTORE","ROM","ROOT","ROUTER","RUNTIME","SAVE","SCAN","SCANNER","SCREEN","SCREENSHOT","SCRIPT","SCROLL","SCROLL","SEARCH","ENGINE","SECURITY","SERVER","SHAREWARE","SHELL","SHIFT","SHIFT KEY","SNAPSHOT","SOCIAL NETWORKING","SOFTWARE","SPAM","SPAMMER","SPREADSHEET","SPYWARE","STATUS","STORAGE","SUPERCOMPUTER","SURF","SYNTAX","TABLE","TAG","TERMINAL","TEMPLATE","TERABYTE","TEXT EDITOR","THREAD","TOOLBAR","TRASH","TROJAN HORSE","TYPEFACE","UNDO","UNIX","UPLOAD","URL","USER","USER INTERFACE","USERNAME","UTILITY","VERSION","VIRTUAL","VIRTUAL MEMORY","VIRUS","WEB","WEBMASTER","WEBSITE","WIDGET","WIKI","WINDOW","WINDOWS","WIRELESS","PROCESSOR","WORKSTATION","WEB","WORM","WWW","XML","ZIP"]},function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(47),o=a(178),s=a(179),l=a(180),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)),[p,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.keyCode;if(32===a)return void(h.includes(m[p])?e.onSuccess():e.onFailure());let n=p;for([38,87,68,39].includes(a)&&n++,[65,37,83,40].includes(a)&&n--;n<0;)n+=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[p]),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"],d=["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(47),o=a(178),s=a(179),l=a(222),c=a(180),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(47),o=a(178),s=a(179),l=a(180),c=a(222),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),32==t.keyCode){if(h[y[1]][y[0]]!==p[f])return void e.onFailure();g(f+1),p.length===f+1&&e.onSuccess()}},onFailure:e.onFailure})))}function d(){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(47),o=a(178),s=a(179),l=a(180),c=a(222),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=d(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] "):p[t][a]?r.a.createElement("span",{key:a},"[.] "):r.a.createElement("span",{key:a},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(t){if(t.preventDefault(),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),32==t.keyCode){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 d(e){const t=[];for(let a=0;ar.a.createElement(o.a,{key:t},e.toString())),r.a.createElement(o.a,null,new Array(p.length).fill(0).map((e,t)=>r.a.createElement("span",{key:t}," ",t+1,"    "))),new Array(8).fill(0).map((e,t)=>r.a.createElement("div",{key:t},r.a.createElement(o.a,null,p.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>p.length||isNaN(a)||b(t=>{const n=[...t];n[a-1]=!0,E.some(e=>e.shouldCut(p[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 ${p[t]}.`,shouldCut:e=>e.colors.includes(t)}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(25),r=a(0),i=a.n(r),o=a(47),s=a(18),l=a(102),c=a(8),u=a(27),m=a(1),h=a(10),d=a(79),p=a(111);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.Difficulty+1,1.1)*Math.pow(e.StartingDifficulty,1.2)*30*b*c.a.InfiltrationRep,_=Math.pow(e.Difficulty+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(p.a,{value:f,onChange:function(e){g(e.target.value)}},i.a.createElement(d.a,{key:"none",value:"none"},"none"),t.factions.filter(e=>n.a[e].getInfo().offersWork()).map(e=>i.a.createElement(d.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(_),t.recordMoneySource(_,"infiltration"),y()}},"Sell for ",i.a.createElement(s.a,{money:_}))),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(523),o=a(968),s=a(27),l=a(1),c=a(111),u=a(79),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 d(...e){let t=0;for(let a=0;ae.getCost()-t.getCost(),Hacking:(e,t)=>e.hacking_skill-t.hacking_skill,Strength:(e,t)=>e.strength-t.strength,Defense:(e,t)=>e.defense-t.defense,Dexterity:(e,t)=>e.dexterity-t.dexterity,Agility:(e,t)=>e.agility-t.agility,Charisma:(e,t)=>e.charisma-t.charisma,AverageCombatStats:(e,t)=>d(e.strength,e.defense,e.dexterity,e.agility)-d(t.strength,t.defense,t.dexterity,t.agility),AverageAllStats:(e,t)=>d(e.hacking_skill,e.strength,e.defense,e.dexterity,e.agility,e.charisma)-d(t.hacking_skill,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 d=p[t];if(void 0===d)throw new Error(`sort function '${t}' is undefined`);return e.resleeves.sort(d),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(187),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(p.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(27),o=a(7),s=a(4),l=a(102),c=a(402),u=a(107),m=a(18),h=a(23),d=a(25),p=a(200),f=a(58),g=a(221),y=a(9),b=a(1),E=a(47),_=a(10),v=a(163);const k=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(),C=d.a[a.currentWorkFactionName];if(a.workType==o.a.WorkTypeFaction){function S(){w.toFaction(C),a.finishFactionWork(!0)}function x(){w.toFaction(C),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 ",C.name,r.a.createElement("br",null),"(Current Faction Reputation: ",r.a.createElement(l.a,{reputation:C.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*k}),")"," ",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*k}),") reputation for this faction ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*k)," / sec) hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)," / sec) agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)," / 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(_.a,{sx:{mx:2},onClick:S},"Stop Faction Work"),r.a.createElement(_.a,{onClick:x},"Do something else simultaneously")))}const O=a.className;if(""!==a.className){function S(){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*k}),")"," ",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*k)," / sec) hacking exp ",r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)," / sec) strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)," / sec) defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)," / sec) dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)," / sec) agility exp ",r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)," / sec) charisma exp ",r.a.createElement("br",null),"You may cancel at any time")),r.a.createElement(E.a,{item:!0},r.a.createElement(_.a,{onClick:S},e)))}if(a.workType==o.a.WorkTypeCompany){const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof p.a))throw new Error("Could not find Company: "+a.companyName);function S(){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*k}),")"," ",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*k}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*k)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)+" / 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(_.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(_.a,{onClick:x},"Do something else simultaneously")))}if(a.workType==o.a.WorkTypeCompanyPartTime){function S(){a.finishWork(!0),w.toJob()}function x(){a.stopFocusing(),w.toJob()}const e=f.a[a.companyName];let t=0;if(null==e||!(e instanceof p.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*k}),")"," ",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*k}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*k)+" / sec",") hacking exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*k)+" / sec",") strength exp ",r.a.createElement("br",null),s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*k)+" / sec",") defense exp ",r.a.createElement("br",null),s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*k)+" / sec",") dexterity exp ",r.a.createElement("br",null),s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*k)+" / sec",") agility exp ",r.a.createElement("br",null),r.a.createElement("br",null),s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*k)+" / 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(_.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(_.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(_.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(_.a,{onClick:()=>{a.finishCreateProgramWork(!0),w.toTerminal()}},"Cancel work on creating program"))):r.a.createElement(r.a.Fragment,null)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return P}));var n=a(0),r=a.n(n),i=a(131),o=a(155),s=a(1),l=a(461),c=a(47),u=a(156),m=a(142),h=a(111),d=a(79),p=a(10),f=a(32),g=a(266),y=a(70),b=a(149),E=a(29),_=a(1007),v=a.n(_),k=a(1008),w=a.n(k),C=a(971),S=a(15),x=a(974),O=a(975),M=a(14),T=a(353);const R=Object(i.a)(e=>Object(o.a)({root:{width:50,padding:e.spacing(2),userSelect:"none"}}));function P(e){const t=R(),a=Object(n.useRef)(null),[i,o]=Object(n.useState)(M.a.CodeInstructionRunTime),[_,k]=Object(n.useState)(M.a.MaxLogCapacity),[P,A]=Object(n.useState)(M.a.MaxPortCapacity),[N,I]=Object(n.useState)(M.a.MaxTerminalCapacity),[F,j]=Object(n.useState)(M.a.AutosaveInterval),[D,B]=Object(n.useState)(M.a.SuppressMessages),[L,G]=Object(n.useState)(M.a.SuppressFactionInvites),[W,H]=Object(n.useState)(M.a.SuppressTravelConfirmation),[U,q]=Object(n.useState)(M.a.SuppressBuyAugmentationConfirmation),[K,$]=Object(n.useState)(M.a.SuppressHospitalizationPopup),[z,V]=Object(n.useState)(M.a.SuppressBladeburnerPopup),[Y,J]=Object(n.useState)(M.a.DisableHotkeys),[X,Q]=Object(n.useState)(M.a.DisableASCIIArt),[Z,ee]=Object(n.useState)(M.a.DisableTextEffects),[te,ae]=Object(n.useState)(M.a.EnableBashHotkeys),[ne,re]=Object(n.useState)(M.a.EnableTimestamps),[ie,oe]=Object(n.useState)(M.a.Locale),[se,le]=Object(n.useState)(!1),[ce,ue]=Object(n.useState)(!1),[me,he]=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),M.a.CodeInstructionRunTime=t},step:1,min:10,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:_,onChange:function(e,t){k(t),M.a.MaxLogCapacity=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 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:P,onChange:function(e,t){A(t),M.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:N,onChange:function(e,t){I(t),M.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:F,onChange:function(e,t){j(t),M.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:D,onChange:function(e){B(e.target.checked),M.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 messages"))})),r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:L,onChange:function(e){G(e.target.checked),M.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:W,onChange:function(e){H(e.target.checked),M.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:U,onChange:function(e){q(e.target.checked),M.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:K,onChange:function(e){$(e.target.checked),M.a.SuppressHospitalizationPopup=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.")},r.a.createElement(s.a,null,"Suppress hospitalization popup"))})),!!e.player.bladeburner&&r.a.createElement(y.a,null,r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:z,onChange:function(e){V(e.target.checked),M.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:Y,onChange:function(e){J(e.target.checked),M.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:X,onChange:function(e){Q(e.target.checked),M.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:Z,onChange:function(e){ee(e.target.checked),M.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:te,onChange:function(e){ae(e.target.checked),M.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(u.a,{control:r.a.createElement(m.a,{checked:ne,onChange:function(e){re(e.target.checked),M.a.EnableTimestamps=e.target.checked}}),label:r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"Terminal commands and log entries will be timestamped. The timestamp will have the format: M/D h:m")},r.a.createElement(s.a,null,"Enable timestamps"))})),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:ie,onChange:function(e){oe(e.target.value),M.a.Locale=e.target.value}},r.a.createElement(d.a,{value:"en"},"en"),r.a.createElement(d.a,{value:"bg"},"bg"),r.a.createElement(d.a,{value:"cs"},"cs"),r.a.createElement(d.a,{value:"da-dk"},"da-dk"),r.a.createElement(d.a,{value:"de"},"de"),r.a.createElement(d.a,{value:"en-au"},"en-au"),r.a.createElement(d.a,{value:"en-gb"},"en-gb"),r.a.createElement(d.a,{value:"es"},"es"),r.a.createElement(d.a,{value:"fr"},"fr"),r.a.createElement(d.a,{value:"hu"},"hu"),r.a.createElement(d.a,{value:"it"},"it"),r.a.createElement(d.a,{value:"lv"},"lv"),r.a.createElement(d.a,{value:"no"},"no"),r.a.createElement(d.a,{value:"pl"},"pl"),r.a.createElement(d.a,{value:"ru"},"ru")))),r.a.createElement("br",null),r.a.createElement("br",null),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-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA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Ib3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/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(c.a,{item:!0,xs:12,sm:6},r.a.createElement(f.a,null,r.a.createElement(p.a,{onClick:()=>e.save()},"Save Game"),r.a.createElement(p.a,{onClick:()=>ue(!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(p.a,{onClick:()=>e.export()},r.a.createElement(v.a,{color:"primary"}),"Export")),r.a.createElement(E.a,{title:r.a.createElement(s.a,null,"import")},r.a.createElement(p.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(w.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(S.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(T.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(p.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(p.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(p.a,{onClick:()=>le(!0)},"Diagnose files")),r.a.createElement(p.a,{onClick:()=>he(!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(C.a,{open:se,onClose:()=>le(!1)}),r.a.createElement(x.a,{onConfirm:()=>{ue(!1),Object(T.a)().then(()=>setTimeout(()=>location.reload(),1e3)).catch(e=>console.error("Could not delete game: "+e))},open:ce,onClose:()=>ue(!1),confirmationText:"Really delete your game? (It's permanent!)"}),r.a.createElement(O.a,{open:me,onClose:()=>he(!1)}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(24),o=a(40),s=a(4),l=a(238),c=a(189),u=a(60),m=a(1458),h=a(1459),d=a(65),p=a(1),f=a(76),g=a(190),y=a(191),b=a(192),E=a(71),_=a.n(E);function v(e){const t=Object(i.d)(e.hostname);if(null===t)throw new Error("server 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(_.a,null)},r.a.createElement(p.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(d.a,null,r.a.createElement(u.a,null,r.a.createElement(p.a,null,"Filename")),r.a.createElement(u.a,{align:"right"},r.a.createElement(p.a,null,"Size")))),r.a.createElement(c.a,null,n.map(e=>r.a.createElement(d.a,{key:e.name},r.a.createElement(u.a,{component:"th",scope:"row"},r.a.createElement(p.a,null,e.name)),r.a.createElement(u.a,{align:"right"},r.a.createElement(p.a,null,s.a.formatBigNumber(e.size),"b"))))))),r.a.createElement("ul",null)))}function k(e){const t=[];for(const e in Object(i.c)())t.push(e);return r.a.createElement(o.a,{open:e.open,onClose:e.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(p.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(40),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 g}));var n=a(0),r=a.n(n),i=a(40),o=a(10),s=a(1),l=a(81),c=a(98),u=a(387),m=a.n(u),h=a(976),d=a(282),p=a(14);function f({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(l.a,{sx:{mx:1},label:e,value:a,InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{hideTextfield:!0,value:a,onChange:a=>t(e,"#"+a.hex)})),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{onClick:()=>t(e,n)},r.a.createElement(m.a,{color:"primary"})))}}))}function g(e){const[t,a]=Object(n.useState)({...p.a.theme});function c(e,t){a(a=>(a[e]=t,a)),p.a.theme[e]=t,d.b.emit()}return r.a.createElement(i.a,{open:e.open,onClose:e.onClose},r.a.createElement(o.a,{color:"primary"},"primary"),r.a.createElement(o.a,{color:"secondary"},"secondary"),r.a.createElement(o.a,{color:"warning"},"warning"),r.a.createElement(o.a,{color:"info"},"info"),r.a.createElement(o.a,{color:"error"},"error"),r.a.createElement(s.a,{color:"primary"},"primary"),r.a.createElement(s.a,{color:"secondary"},"secondary"),r.a.createElement(s.a,{color:"warning"},"warning"),r.a.createElement(s.a,{color:"info"},"info"),r.a.createElement(s.a,{color:"error"},"error"),r.a.createElement("br",null),r.a.createElement(f,{name:"primarylight",onColorChange:c,color:t.primarylight,defaultColor:p.b.theme.primarylight}),r.a.createElement(f,{name:"primary",onColorChange:c,color:t.primary,defaultColor:p.b.theme.primary}),r.a.createElement(f,{name:"primarydark",onColorChange:c,color:t.primarydark,defaultColor:p.b.theme.primarydark}),r.a.createElement("br",null),r.a.createElement(f,{name:"errorlight",onColorChange:c,color:t.errorlight,defaultColor:p.b.theme.errorlight}),r.a.createElement(f,{name:"error",onColorChange:c,color:t.error,defaultColor:p.b.theme.error}),r.a.createElement(f,{name:"errordark",onColorChange:c,color:t.errordark,defaultColor:p.b.theme.errordark}),r.a.createElement("br",null),r.a.createElement(f,{name:"secondarylight",onColorChange:c,color:t.secondarylight,defaultColor:p.b.theme.secondarylight}),r.a.createElement(f,{name:"secondary",onColorChange:c,color:t.secondary,defaultColor:p.b.theme.secondary}),r.a.createElement(f,{name:"secondarydark",onColorChange:c,color:t.secondarydark,defaultColor:p.b.theme.secondarydark}),r.a.createElement("br",null),r.a.createElement(f,{name:"warninglight",onColorChange:c,color:t.warninglight,defaultColor:p.b.theme.warninglight}),r.a.createElement(f,{name:"warning",onColorChange:c,color:t.warning,defaultColor:p.b.theme.warning}),r.a.createElement(f,{name:"warningdark",onColorChange:c,color:t.warningdark,defaultColor:p.b.theme.warningdark}),r.a.createElement("br",null),r.a.createElement(f,{name:"infolight",onColorChange:c,color:t.infolight,defaultColor:p.b.theme.infolight}),r.a.createElement(f,{name:"info",onColorChange:c,color:t.info,defaultColor:p.b.theme.info}),r.a.createElement(f,{name:"infodark",onColorChange:c,color:t.infodark,defaultColor:p.b.theme.infodark}),r.a.createElement("br",null),r.a.createElement(f,{name:"welllight",onColorChange:c,color:t.welllight,defaultColor:p.b.theme.welllight}),r.a.createElement(f,{name:"well",onColorChange:c,color:t.well,defaultColor:p.b.theme.well}),r.a.createElement(f,{name:"white",onColorChange:c,color:t.white,defaultColor:p.b.theme.white}),r.a.createElement(f,{name:"black",onColorChange:c,color:t.black,defaultColor:p.b.theme.black}),r.a.createElement("br",null),r.a.createElement(f,{name:"hp",onColorChange:c,color:t.hp,defaultColor:p.b.theme.hp}),r.a.createElement(f,{name:"money",onColorChange:c,color:t.money,defaultColor:p.b.theme.money}),r.a.createElement(f,{name:"hack",onColorChange:c,color:t.hack,defaultColor:p.b.theme.hack}),r.a.createElement(f,{name:"combat",onColorChange:c,color:t.combat,defaultColor:p.b.theme.combat}),r.a.createElement(f,{name:"cha",onColorChange:c,color:t.cha,defaultColor:p.b.theme.cha}),r.a.createElement(f,{name:"int",onColorChange:c,color:t.int,defaultColor:p.b.theme.int}),r.a.createElement(f,{name:"rep",onColorChange:c,color:t.rep,defaultColor:p.b.theme.rep}),r.a.createElement(f,{name:"disabled",onColorChange:c,color:t.disabled,defaultColor:p.b.theme.disabled}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.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))p.a.theme[e]=t[e];d.b.emit()}catch(e){}}}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1010),o=a(1017),s=a(27),l=a(1),c=a(10),u=a(149);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(69),o=a(7),s=a(74),l=a(4),c=a(163),u=a(1011),m=a(1012),h=a(18),d=a(107),p=a(27),f=a(402),g=a(1013),y=a(1014),b=a(1015),E=a(1016),_=a(161),v=a(114),k=a(1),w=a(76),C=a(47),S=a(10),x=a(29);function O(e){const t=p.b.Player(),[a,O]=Object(n.useState)(!1),[M,T]=Object(n.useState)(!1),[R,P]=Object(n.useState)(!1),[A,N]=Object(n.useState)(!1),[I,F]=Object(n.useState)(["------","------","------"]);let j=r.a.createElement(r.a.Fragment,null);switch(e.sleeve.currentTask){case i.a.Idle:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case i.a.Company:j=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 _.a.Field:t="Field work";break;case _.a.Hacking:t="Hacking contracts";break;case _.a.Security:t="Security work"}j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",t," for ",e.sleeve.currentTaskLocation,".");break}case i.a.Crime:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",s.a[e.sleeve.crimeType].type," (Success Rate:"," ",l.a.formatPercentage(s.a[e.sleeve.crimeType].successRate(e.sleeve)),").");break;case i.a.Class:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",e.sleeve.currentTaskLocation,".");break;case i.a.Gym:j=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",e.sleeve.currentTaskLocation,".");break;case i.a.Recovery:j=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:j=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 D=[];if(e.sleeve.currentTask===i.a.Crime)D=[["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(D=[["Money:",r.a.createElement(d.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);D.push(["Reputation:",r.a.createElement(f.a,{reputation:5*a})])}return r.a.createElement(r.a.Fragment,null,r.a.createElement(C.a,{container:!0,component:w.a},r.a.createElement(C.a,{item:!0,xs:3},r.a.createElement(g.a,{sleeve:e.sleeve}),r.a.createElement(S.a,{onClick:()=>O(!0)},"More Stats"),r.a.createElement(x.a,{title:t.money.lt(o.a.TravelCost)?r.a.createElement(k.a,null,"Insufficient funds"):""},r.a.createElement("span",null,r.a.createElement(S.a,{onClick:()=>P(!0),disabled:t.money.lt(o.a.TravelCost)},"Travel"))),r.a.createElement(x.a,{title:e.sleeve.shock<100?r.a.createElement(k.a,null,"Unlocked when sleeve has fully recovered"):""},r.a.createElement("span",null,r.a.createElement(S.a,{onClick:()=>N(!0),disabled:e.sleeve.shock<100},"Manage Augmentations")))),r.a.createElement(C.a,{item:!0,xs:5},r.a.createElement(E.a,{player:t,sleeve:e.sleeve,setABC:F}),r.a.createElement(k.a,null,j),r.a.createElement(k.a,null,e.sleeve.currentTask===i.a.Crime&&Object(c.a)({progress:e.sleeve.currentTaskTime/e.sleeve.currentTaskMaxTime,totalTicks:25})),r.a.createElement(S.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(C.a,{item:!0,xs:4},r.a.createElement(v.a,{title:"Earnings (Pre-Synchronization)",rows:D}),r.a.createElement(S.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:()=>P(!1),sleeve:e.sleeve,rerender:e.rerender}),r.a.createElement(u.a,{open:A,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(531),o=a(20),s=a(18),l=a(40),c=a(27),u=a(1),m=a(29),h=a(76),d=a(32),p=a(10),f=a(189),g=a(238),y=a(42),b=a(65);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 _=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(p.a,{onClick:()=>function(a){e.sleeve.tryBuyAugmentation(t,a),E()}(a),disabled:t.money.lt(a.startingCost)},"Buy")),r.a.createElement(y.b,null,r.a.createElement(d.a,{display:"flex"},r.a.createElement(m.a,{title:a.stats||""},r.a.createElement(u.a,null,a.name)))),r.a.createElement(y.b,null,r.a.createElement(s.a,{money:a.startingCost,player:t})))))),_.length>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Owned Augmentations:"),_.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(7),o=a(18),s=a(388),l=a(22),c=a(14),u=a(15),m=a(27),h=a(40),d=a(1),p=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),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(d.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(p.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(114);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_skill))],["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(114),i=a(40),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_skill,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(18),i=a(0),o=a(114),s=a(40);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(69),o=a(74),s=a(9),l=a(22),c=a(25),u=a(161),m=a(111),h=a(79);const d=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],p=["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.keys(o.a),second:()=>["------"]}),"Take University Course":(e,t)=>{let a=[];switch(t.city){case l.a.Aevum:a=[s.a.AevumSummitUniversity];break;case l.a.Sector12:a=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:a=[s.a.VolhavenZBInstituteOfTechnology];break;default:a=["No university available in city!"]}return{first:d,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:p,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,d]=Object(n.useState)(t[2]),p=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)&&(d(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]);d(s[0]),l(i.first[0]),o(n),e.setABC([n,i.first[0],s[0]])},value:a},p.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){d(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(40),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 _}));var n=a(0),r=a.n(n),i=a(1019),o=a(1020),s=a(1021),l=a(248),c=a(86),u=a(1022),m=a(1024),h=a(1025),d=a(1026),p=a(37),f=a(57),g=a(24),y=a(1),b=a(47),E=a(10);function _(e){const[t,a]=Object(n.useState)(!1),_=Object(n.useState)(!1)[1];function v(){_(e=>!e)}const[k,w]=Object(n.useState)(p.c.x1);Object(n.useEffect)(()=>{const e=setInterval(v,200);return()=>clearInterval(e)},[]);let C,S=0;for(let t=0;tw(p.c.x1),()=>w(p.c.x5),()=>w(p.c.x10),()=>w(p.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:k,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:k,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(d.a,{cost:C,multiplier:k,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:S,player:e.player})),r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(m.a,{onClicks:x,purchaseMultiplier:k}))),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 y}));var n=a(0),r=a.n(n),i=a(37),o=a(57),s=a(18),l=a(107),c=a(1),u=a(47),m=a(76),h=a(10),d=a(42),p=a(189),f=a(238),g=a(65);function y(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let y,b,E;if(t.level>=i.a.MaxLevel)y=r.a.createElement(r.a.Fragment,null,"MAX LEVEL");else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.a.MaxLevel);else{const e=i.a.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);y=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.ram>=i.a.MaxRam)b=r.a.createElement(r.a.Fragment,null,"MAX RAM");else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.a.MaxRam);else{const e=Math.round(Math.log2(i.a.MaxRam/t.ram));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);b=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.cores>=i.a.MaxCores)E=r.a.createElement(r.a.Fragment,null,"MAX CORES");else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.a.MaxCores);else{const e=i.a.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);E=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,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(p.a,null,r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.name))),r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,"Production:")),r.a.createElement(d.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(d.b,null,r.a.createElement(c.a,null,"Level:")),r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.level)),r.a.createElement(d.b,null,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()}},y))),r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,"RAM:")),r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.ram,"GB")),r.a.createElement(d.b,null,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()}},b))),r.a.createElement(g.a,null,r.a.createElement(d.b,null,r.a.createElement(c.a,null,"Cores:")),r.a.createElement(d.b,null,r.a.createElement(c.a,null,t.cores)),r.a.createElement(d.b,null,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()}},E))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(37),o=a(57),s=a(18),l=a(212),c=a(532),u=a(1),m=a(47),h=a(76),d=a(10),p=a(42),f=a(189),g=a(238),y=a(65);function b(e){const t=e.node,a=e.purchaseMultiplier,n=e.rerender;let b,E,_,v;if(t.level>=i.b.MaxLevel)b=r.a.createElement(r.a.Fragment,null,"MAX LEVEL");else{let n=0;if("MAX"===a)n=Object(o.e)(e.player,t,i.b.MaxLevel);else{const e=i.b.MaxLevel-t.level;n=Math.min(e,a)}const l=t.calculateLevelUpgradeCost(n,e.player.hacknet_node_level_cost_mult);b=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.maxRam>=i.b.MaxRam)E=r.a.createElement(r.a.Fragment,null,"MAX RAM");else{let n=0;if("MAX"===a)n=Object(o.f)(e.player,t,i.b.MaxRam);else{const e=Math.round(Math.log2(i.b.MaxRam/t.maxRam));n=Math.min(e,a)}const l=t.calculateRamUpgradeCost(n,e.player.hacknet_node_ram_cost_mult);E=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.cores>=i.b.MaxCores)_=r.a.createElement(r.a.Fragment,null,"MAX CORES");else{let n=0;if("MAX"===a)n=Object(o.d)(e.player,t,i.b.MaxCores);else{const e=i.b.MaxCores-t.cores;n=Math.min(e,a)}const l=t.calculateCoreUpgradeCost(n,e.player.hacknet_node_core_cost_mult);_=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player}))}if(t.cache>=i.b.MaxCache)v=r.a.createElement(r.a.Fragment,null,"MAX CACHE");else{let n=0;if("MAX"===a)n=Object(o.c)(e.player,t,i.b.MaxCache);else{const e=i.b.MaxCache-t.cache;n=Math.min(e,a)}const l=t.calculateCacheUpgradeCost(n);v=r.a.createElement(r.a.Fragment,null,"+",n," - ",r.a.createElement(s.a,{money:l,player:e.player})),e.player.money.lt(l)}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(p.b,null,r.a.createElement(u.a,null,t.hostname))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"Production:")),r.a.createElement(p.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(p.b,null,r.a.createElement(u.a,null,"Hash Capacity:")),r.a.createElement(p.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(p.b,null,r.a.createElement(u.a,null,"Level:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.level)),r.a.createElement(p.b,null,r.a.createElement(d.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()}},b))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"RAM:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.maxRam,"GB")),r.a.createElement(p.b,null,r.a.createElement(d.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()}},E))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"Cores:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.cores)),r.a.createElement(p.b,null,r.a.createElement(d.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()}},_))),r.a.createElement(y.a,null,r.a.createElement(p.b,null,r.a.createElement(u.a,null,"Cache Level:")),r.a.createElement(p.b,null,r.a.createElement(u.a,null,t.cache)),r.a.createElement(p.b,null,r.a.createElement(d.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)}},v))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(322),o=a(249),s=a(212),l=a(1023),c=a(40),u=a(27),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 d=t.hashManager;if(!(d 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:d,key:a.name,rerender:h})})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(57),o=a(631),s=a(15),l=a(151),c=a(212),u=a(1),m=a(76),h=a(10);function d(e){const[t,a]=Object(n.useState)("ecorp");const d=e.hashManager,p=e.upg,f=d.getUpgradeCost(p.name),g=d.upgrades[p.name],y=p.effectText(g),b=d.hashes>=f;return r.a.createElement(m.a,{sx:{p:1}},r.a.createElement(u.a,null,r.a.createElement(l.a,{value:p.name})),r.a.createElement(u.a,null,"Cost: ",r.a.createElement(c.a,{hashes:f}),", Bought: ",g," times"),r.a.createElement(u.a,null,p.desc),r.a.createElement(h.a,{onClick:function(){if(e.hashManager.hashes>=e.hashManager.getUpgradeCost(e.upg.name)){Object(i.m)(e.player,e.upg.name,t)||Object(s.a)("Failed to purchase upgrade. This may be because you do not have enough hashes, or because you do not have access to the feature upgrade affects."),e.rerender()}},disabled:!b},"Purchase"),g>0&&y&&r.a.createElement(u.a,null,y),p.hasTargetServer&&r.a.createElement(o.a,{value:t,serverType:o.b.Foreign,onChange:function(e){a(e.target.value)}}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(37),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 C=u.a[e.locName];if(null==C)throw new Error("CompanyLocation component constructed with invalid location: "+e.locName);const S=t.jobs[e.locName]?t.jobs[e.locName]:null,x=S?d.a[S]:null;t.location=e.locName;const O=null!=S,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: ",S),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:()=>_(!0)},"Quit"),r.a.createElement(b.a,{locName:e.locName,company:w,onQuit:k,open:E,onClose:()=>_(!1)})),r.a.createElement("br",null),w.hasAgentPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.a[0]],onClick:function(e){e.isTrusted&&(t.applyForAgentJob(),k())},text:"Apply for Agent Job"}),w.hasBusinessConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.c[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessConsultantJob(),k())},text:"Apply for Business Consultant Job"}),w.hasBusinessPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.b[0]],onClick:function(e){e.isTrusted&&(t.applyForBusinessJob(),k())},text:"Apply for Business Job"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.e[1]],onClick:function(e){e.isTrusted&&(t.applyForEmployeeJob(),k())},text:"Apply to be an Employee"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.g[1]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeEmployeeJob(),k())},text:"Apply to be a part-time Employee"}),w.hasITPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.d[0]],onClick:function(e){e.isTrusted&&(t.applyForItJob(),k())},text:"Apply for IT Job"}),w.hasSecurityPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.h[2]],onClick:function(e){e.isTrusted&&(t.applyForSecurityJob(),k())},text:"Apply for Security Job"}),w.hasSoftwareConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.k[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareConsultantJob(),k())},text:"Apply for Software Consultant Job"}),w.hasSoftwarePositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.j[0]],onClick:function(e){e.isTrusted&&(t.applyForSoftwareJob(),k())},text:"Apply for Software Job"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.e[0]],onClick:function(e){e.isTrusted&&(t.applyForWaiterJob(),k())},text:"Apply to be a Waiter"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:d.a[p.g[0]],onClick:function(e){e.isTrusted&&(t.applyForPartTimeWaiterJob(),k())},text:"Apply to be a part-time Waiter"}),null!=C.infiltrationData&&r.a.createElement(o.a,{onClick:function(t){if(!t.isTrusted)return;const n=C;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(27),o=a(40),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(7),o=a(24),s=a(18);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(351),o=a(18),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),this.props.p.hp=this.props.p.max_hp,this.props.p.recordMoneySource(-1*t,"hospitalization"),this.setState({currHp:this.props.p.hp}),Object(s.a)(n.createElement(n.Fragment,null,"You were healed to full health! The hospital billed you for ",n.createElement(o.a,{money:t})))}render(){const e=this.getCost();return n.createElement(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(29),o=a(74),s=a(4),l=a(27);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),d=o.a.BondForgery.successRate(e),p=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(d)," 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(p)," 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 m}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1033),l=a(9),c=a(27),u=a(15);function m(e){const t=c.b.Player(),a=c.b.Router(),m=Object(n.useState)(!1)[1],h=t.inBladeburner();function d(){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(u.a)("You have been accepted into the Bladeburner division!"),m(e=>!e);const t=document.getElementById("world-menu-header");t instanceof HTMLElement&&(t.click(),t.click())}else Object(u.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}function p(){a.toResleeves()}switch(e.loc.name){case l.a.NewTokyoVitaLife:return t.canAccessResleeving()?r.a.createElement(o.a,{onClick:p},"Re-Sleeve"):r.a.createElement(r.a.Fragment,null);case l.a.Sector12CityHall:return r.a.createElement((function(){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.")))}),null);case l.a.Sector12NSA:return function(){if(!t.canAccessBladeburner())return r.a.createElement(r.a.Fragment,null);const e=h?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return r.a.createElement(o.a,{onClick:d},e)}();case l.a.NewTokyoNoodleBar:return r.a.createElement(o.a,{onClick:function(){Object(u.a)(r.a.createElement(r.a.Fragment,null,"You ate some delicious noodles and feel refreshed."))}},"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 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)}();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(18),o=a(40),s=a(27),l=a(1),c=a(10),u=a(81);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,d]=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){d(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),e.onClose(),a.toCorporation())},disabled:""==h||!m},"Self-Fund (",r.a.createElement(i.a,{money:15e10,player:t}),")"))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1035),l=a(1036),c=a(1038),u=a(201),m=a(18),h=a(27),d=a(1039);function p(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 ",e.ram,"GB Server - ",r.a.createElement(m.a,{money:s,player:i})),r.a.createElement(d.a,{open:t,onClose:()=>a(!1),ram:e.ram,cost:s,rerender:e.rerender}),r.a.createElement("br",null))}function f(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(p,{key:t,ram:t,rerender:o}));return r.a.createElement(r.a.Fragment,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 m}));var n=a(0),r=a.n(n),i=a(10),o=a(29),s=a(7),l=a(201),c=a(18),u=a(226);function m(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(u.a,{tex:String.raw`\large{cost = 3.2 \times 10^3 \times 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 (",t.maxRam,"GB -> ",2*t.maxRam,"GB) - ",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(1037),s=a(7),l=a(18);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(7),r=a(24),i=a(113),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);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(29),s=a(18),l=a(226);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=1e9*Math.pow(7.5,t.cpuCores);return r.a.createElement(o.a,{title:r.a.createElement(l.a,{tex:String.raw`\large{cost = 10^9 \times 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),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 d}));var n=a(0),r=a.n(n),i=a(201),o=a(4),s=a(18),l=a(40),c=a(27),u=a(1),m=a(81),h=a(10);function d(e){const t=c.b.Player(),[a,d]=Object(n.useState)("");function p(){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&&p()},onChange:function(e){d(e.target.value)},type:"text",placeholder:"Unique Hostname",InputProps:{endAdornment:r.a.createElement(h.a,{onClick:p,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(7),o=a(18),s=a(40),l=a(27),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(29),i=a(10),o=a(7),s=a(24),l=a(18),c=a(27);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(),d=o.a.ClassDataStructuresBaseCost*h,p=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: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.ClassNetworks)}},"Take Networks 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.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(1043),l=a(1045),c=a(1046),u=a(1047);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(18),i=a(183),o=a(1044),s=a(457),l=a(1490),c=a(633),u=a(10),m=a(76),h=a(32),d=a(1),p=a(81);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())return;this.props.p.loseMoney(this.state.bet);const e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:e,dealerHand:t,gameInProgress:!0,result: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{let t=0;this.isPlayerWinResult(e)?(t=this.state.bet,this.win(this.props.p,2*t)):e===g.DealerWon?(t=-1*this.state.bet,this.win(this.props.p,-this.state.bet)):e===g.Tie&&this.win(this.props.p,this.state.bet),this.setState({gameInProgress:!1,result:e,gains:this.state.gains+t})}),f(this,"isPlayerWinResult",e=>e===g.PlayerWon||e===g.PlayerWonByBlackjack),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(p.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(d.a,null,"$"))}}),n.createElement(d.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("pre",null,"Player"),t.cards.map((e,t)=>n.createElement(c.a,{card:e,key:t})),n.createElement("pre",null,"Value(s): "),b.map((e,t)=>n.createElement("pre",{key:t},e)))),n.createElement("br",null),n.createElement(h.a,{display:"flex"},n.createElement(m.a,{elevation:2},n.createElement("pre",null,"Dealer"),a.cards.map((e,t)=>n.createElement(c.a,{card:e,hidden:i&&0!==t,key:t})),!i&&n.createElement(n.Fragment,null,n.createElement("pre",null,"Value(s): "),E.map((e,t)=>n.createElement("pre",{key:t},e)))))),o!==g.Pending&&n.createElement(d.a,null,o,this.isPlayerWinResult(o)&&n.createElement(r.a,{money: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(217),r=a(444);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"},p))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(18),o=a(183),s=a(314),l=a(75),c=a(1),u=a(10),m=a(81);const h=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],d={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 p(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,_]=Object(n.useState)(0),[v,k]=Object(n.useState)(!0),[w,C]=Object(n.useState)({payout:0,match:()=>!1});function S(){v||_(Math.floor(37*Math.random()))}function x(n){Object(o.b)(e.p)||(g(!1),k(!1),b("playing"),C(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),k(!0),b(s),_(n),Object(o.b)(e.p)},1600))}return Object(n.useEffect)(()=>{const e=window.setInterval(S,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(p(3)))},"3")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(6)))},"6")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(9)))},"9")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(12)))},"12")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(15)))},"15")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(18)))},"18")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(21)))},"21")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(24)))},"24")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(27)))},"27")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(30)))},"30")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(33)))},"33")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(36)))},"36"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(2)))},"2")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(5)))},"5")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(8)))},"8")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(11)))},"11")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(14)))},"14")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(17)))},"17")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(20)))},"20")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(23)))},"23")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(26)))},"26")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(29)))},"29")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(32)))},"32")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(35)))},"35"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(1)))},"1")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(4)))},"4")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(7)))},"7")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(10)))},"10")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(13)))},"13")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(16)))},"16")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(19)))},"19")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(22)))},"22")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(25)))},"25")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(28)))},"28")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(31)))},"31")),r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(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(d.Third1))},"1 to 12")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Third2))},"13 to 24")),r.a.createElement("td",{colSpan:4},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.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(d.Red))},"Red")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Black))},"Black")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Odd))},"Odd")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Even))},"Even")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.High))},"High")),r.a.createElement("td",{colSpan:2},r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(d.Low))},"Low"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{disabled:!f,onClick:Object(l.a)(()=>x(p(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(18),o=a(314),s=a(183),l=a(75),c=a(1),u=a(81),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 d(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 p=[[[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),[_,v]=Object(n.useState)(!0),[k,w]=Object(n.useState)("waiting");function C(){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=S(),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 S(){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(C,50);return()=>clearInterval(e)});const O=S();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:!_,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),_&&(y([-1,-1,-1,-1,-1]),v(!1),setTimeout(x,2e3*t.random()+1e3)))})),disabled:!_},"Spin!")}}),r.a.createElement(c.a,{variant:"h4"},k),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 i}));var n=a(0),r=a.n(n);function i(e){const[t,a]=Object(n.useState)(e.content);return Object(n.useEffect)(()=>{let e=5;const n=setInterval(()=>{if(e--,e>0)return;e=5*Math.random();const n=Math.random()*t.length,r=t.charAt(n);a(function(e,t,a){return e.substring(0,t)+a+e.substring(t+1)}(t,n,function(e){const t=e=>e[Math.floor(Math.random()*e.length)],a=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const n of a)if(n.includes(e))return t(n);return t("!@#$%^&*()_+|\\';\"/.,?`~")}(r))),setTimeout(()=>{a(t)},50)},100);return()=>{clearInterval(n)}},[]),r.a.createElement("span",null,t)}},function(e,t,a){"use strict";a.d(t,"a",(function(){return f}));var n=a(0),r=a(129),i=a(9),o=a(221),s=a(14),l=a(27),c=a(1),u=a(10);function m(e,t){t.name===i.a.TravelAgency?e.toTravel():t.name===i.a.WorldStockExchange?e.toStockMarket():e.toLocation(t)}function h(e){const t=l.b.Router();return e?n.createElement("span",{"aria-label":e.name,key:e.name,style:{color:"white",whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"},onClick:()=>m(t,e)},n.createElement("b",null,"X")):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:()=>m(t,o.a[e])},e),n.createElement("br",null)));return n.createElement(n.Fragment,null,a)}function f(){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(p,{city:t}):n.createElement(d,{city:t}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(27),o=a(505),s=a(1),l=a(29),c=a(10);function u(){const e=i.b.Player(),t=i.b.Router(),a=Object(n.useState)(!1)[1];function u(){a(e=>!e)}return Object(n.useEffect)(()=>{const e=setInterval(u,200);return()=>clearInterval(e)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{variant:"h4"},"Create program"),r.a.createElement(s.a,null,"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later."),Object(o.a)(e).map(a=>{const n=a.create;return null===n?r.a.createElement(r.a.Fragment,null):r.a.createElement(r.a.Fragment,{key:a.name},r.a.createElement(l.a,{title:n.tooltip},r.a.createElement(c.a,{sx:{my:1},onClick:r=>{r.isTrusted&&e.startCreateProgramWork(t,a.name,n.time,n.level)}},a.name)),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(40),o=a(10),s=a(32),l=a(1),c=a(111),u=a(142),m=a(79),h=a(81);function d(e){const[t,a]=Object(n.useState)(e.options.theme),[d,p]=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),defaultValue:e.options.theme},r.a.createElement(m.a,{value:"vs-dark"},"dark"),r.a.createElement(m.a,{value:"light"},"light"),r.a.createElement(m.a,{value:"monokai"},"monokai"))),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=>p(e.target.checked),checked:d})),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:d,fontSize:f}),e.onClose()}},"Save"))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return s}));var n=a(637),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(266),s=a(70),l=a(149),c=a(131),u=a(155),m=a(32),h=a(286),d=a(1068),p=a(287),f=a(492),g=a(477),y=a(444),b=a.n(y);function E({terminal:e}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},e.getProgressText())}const _=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%"}}));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 k(){const e=c.current;null!==e&&setTimeout(()=>e.scrollIntoView(!0),50)}Object(n.useEffect)(()=>p.b.subscribe(b.a.debounce(async()=>{u(e=>e+1)},25,{maxWait:50})),[]),Object(n.useEffect)(()=>p.a.subscribe(b.a.debounce(async()=>{v(e=>e+1)},25,{maxWait:50})),[]),k(),Object(n.useEffect)(()=>{setTimeout(k,50)},[]);const w=_();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)=>t instanceof h.b?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:w.preformatted},color:t.color,paragraph:!1},t.text)):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),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(d.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(131),s=a(155),l=a(81),c=a(29),u=a(92),m=a(1069),h=a(1071),d=a(14);const p=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=p();function _(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){_(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: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 _("");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=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(" "));const d=Object(h.a)(u,c,l,s);"string"==typeof d&&""!==d&&_(d),Array.isArray(d)&&b(d)}if(n.keyCode===u.a.L&&n.ctrlKey&&(n.preventDefault(),e.clear()),n.keyCode===u.a.UPARROW||d.a.EnableBashHotkeys&&n.keyCode===u.a.P&&n.ctrlKey){d.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;_(e.commandHistory[e.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.keyCode===u.a.DOWNARROW||d.a.EnableBashHotkeys&&n.keyCode===u.a.M&&n.ctrlKey){d.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,_("");else{++e.commandHistoryIndex;_(e.commandHistory[e.commandHistoryIndex])}}d.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&&_(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 _(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 _(r.substr(0,n)+r.substr(e))}}("backspace"),n.preventDefault()))}}})))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return u}));var n=a(109),r=a(1070),i=a(139),o=a(259),s=a(123),l=a(24);const c=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","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"];function u(e,t,a,u=""){let m=[];m=m.concat(Object.keys(i.b));const h=e.getCurrentServer(),d=e.getHomeComputer();let p="",f=null;function g(){for(const e of h.contracts)m.push(e.fn)}function y(){for(const e of h.messages)e instanceof s.a||m.push(e)}function b(){for(const e of d.programs)m.push(e)}function E(){for(const e of h.scripts){const t=k(e.filename);t&&m.push(t)}}function _(){for(const e of h.textFiles){const t=k(e.fn);t&&m.push(t)}}function v(){const e=Object(r.a)(h,null==f?"/":f);for(let t=0;t=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(149),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 l}));var n=a(0),r=a.n(n),i=a(1074),o=a(1075),s=a(1);function l(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(s.a,{variant:"h4"},"Active Scripts"),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(18),i=a(107),o=a(27),s=a(1),l=a(131),c=a(155),u=a(238),m=a(189),h=a(60),d=a(65);const p=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=p(),a=e.scriptProdSinceLastAug/(e.playtimeSinceLastAug/1e3);return n.createElement(u.a,{size:"small",classes:{root:t.size}},n.createElement(m.a,null,n.createElement(d.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(81),s=a(266),l=a(1198),c=a(255),u=a(24),m=a(14),h=a(536),d=a(1083),p=a.n(d);function f(e){const[t,a]=Object(n.useState)(""),[d,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 _=Object.values(E).filter(e=>e&&e.server.hostname.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(p.a,null),spellCheck:!1}}),r.a.createElement(s.a,{dense:!0},_.slice(d*g,d*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:_.length,rowsPerPage:g,page:d,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(305),o=a(99),s=a(76),l=a(32),c=a(210),u=a(71),m=a.n(u),h=a(136),d=a.n(h),p=a(1077),f=a(163);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(d.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(p.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(266),s=a(1198),l=a(536),c=a(14);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 A}));var n=a(0),r=a(4),i=a(238),o=a(60),s=a(65),l=a(189),c=a(10),u=a(32),m=a(76),h=a(1),d=a(98),p=a(1080),f=a.n(p),g=a(305),y=a(99),b=a(131),E=a(210),_=a(136),v=a.n(_),k=a(71),w=a.n(k),C=a(127),S=a(15),x=a(247),O=a(23),M=a(250),T=a(18),R=a(107);const P=Object(b.a)({noborder:{borderBottom:"none"}});function A(e){const t=P(),[a,p]=n.useState(!1),b=e.workerScript.scriptRef;const _=C.a.bind(null,b,b.server);const k=b.onlineMoneyMade/b.onlineRunningTime,A=b.onlineExpGained/b.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(g.a,{onClick:()=>p(e=>!e),component:m.a},n.createElement(y.a,{primary:n.createElement(h.a,null,"└ ",e.workerScript.name)}),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:k})))),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(A)+" 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.a.emit(b)}},"LOG"),n.createElement(d.a,{onClick:function(){_(),Object(S.a)("Killing script")}},n.createElement(f.a,{color:"error"})))))}},,,,,,function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(25),o=a(117),s=a(1),l=a(32),c=a(149),u=a(10),m=a(189),h=a(42),d=a(65);function p(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(s.a,{variant:"h4"},"Factions"),r.a.createElement(s.a,null,"Lists all factions you have joined"),r.a.createElement("br",null),r.a.createElement(l.a,{display:"flex",flexDirection:"column"},e.player.factions.map(t=>r.a.createElement(c.a,{key:t,variant:"h6",onClick:()=>function(t){e.router.toFaction(t)}(i.a[t])},t))),r.a.createElement("br",null),e.player.factionInvitations.length>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{variant:"h5",color:"primary"},"Outstanding Faction Invitations"),r.a.createElement(s.a,null,"Lists factions you have been invited to. You can accept these faction invitations at any time."),r.a.createElement(h.a,{size:"small",padding:"none"},r.a.createElement(m.a,null,e.player.factionInvitations.map(e=>r.a.createElement(d.a,{key:e},r.a.createElement(h.b,null,r.a.createElement(s.a,{noWrap:!0},e)),r.a.createElement(h.b,{align:"right"},r.a.createElement(u.a,{onClick:a=>function(e,a){e.isTrusted&&(Object(o.d)(i.a[a]),t(e=>!e))}(a,e)},"Join!"))))))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1086),o=a(1090),s=a(1091),l=a(371),c=a(7),u=a(8),m=a(61),h=a(27),d=a(1092),p=a(1),f=a(10),g=a(1093);const y=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"];function b({faction:e,rerender:t,onAugmentations:a}){const i=h.b.Player(),b=h.b.Router(),[E,_]=Object(n.useState)(!1),[v,k]=Object(n.useState)(!1),w=i,C=e.getInfo();const S=w.inGang()&&w.getGangName()===e.name,x=Math.floor(c.a.BaseFavorToDonate*u.a.RepToDonateToFaction),O=e.favor>=x,M="The Covenant"===e.name&&w.bitNodeN>=10&&m.a[10];let T=w.canAccessGang()&&y.includes(e.name);return w.inGang()&&(w.getGangName()!==e.name?T=!1:w.getGangName()===e.name&&(T=!0)),r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{onClick:()=>b.toFactions()},"Back"),r.a.createElement(p.a,{variant:"h4",color:"primary"},e.name),r.a.createElement(s.a,{faction:e,factionInfo:C}),T&&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 b.toGang();k(!0)}}),r.a.createElement(d.a,{facName:e.name,open:v,onClose:()=>k(!1)})),!S&&C.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(b,e)}(e)}),!S&&C.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(b,e)}(e)}),!S&&C.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(b,e)}(e)}),!S&&C.offersWork()&&r.a.createElement(o.a,{faction:e,p:i,rerender:t,favorToDonate:x,disabled:!O}),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}),M&&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:()=>_(!0)}),r.a.createElement(g.a,{open:E,onClose:()=>_(!1)})))}function E(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(b,{rerender:a,faction:o,onAugmentations:()=>l(!0)})}},function(e,t,a){"use strict";a.d(t,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(1087),o=a(20),s=a(6),l=a(173),c=a(14),u=a(117),m=a(27),h=a(102),d=a(281),p=a(10),f=a(1),g=a(189),y=a(238);function b(e){const t=m.b.Player(),a=t.inGang()&&t.getGangName()===e.faction.name,b=Object(n.useState)(!1)[1];function E(){b(e=>!e)}function _(){if(a){const e=[];for(const t in o.a){o.a[t].isSpecial||e.push(t)}return e}return e.faction.augmentations.slice()}function v(e){c.a.PurchaseAugmentationsOrder=e,E()}const k=function(){switch(c.a.PurchaseAugmentationsOrder){case l.b.Cost:return function(){const e=_();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=_();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=_();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.gt(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=k.filter(e=>e===s.a.NeuroFluxGovernor||!t.augmentations.some(t=>t.name===e)&&!t.queuedAugmentations.some(t=>t.name===e)),C=(a,n=!1)=>r.a.createElement(i.a,{augName:a,faction:e.faction,key:a,p:t,rerender:E,owned:n}),S=w.map(e=>C(e));let x=r.a.createElement(r.a.Fragment,null);const O=k.filter(e=>!w.includes(e));return 0!==O.length&&(x=r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(f.a,{variant:"h4"},"Purchased Augmentations"),r.a.createElement(f.a,null,"This factions also offers these augmentations but you already own them."),O.map(e=>C(e,!0)))),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{onClick:e.routeToMainPage},"Back"),r.a.createElement(f.a,{variant:"h4"},"Faction Augmentations"),r.a.createElement(f.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(d.a,{favor:e.faction.favor})),r.a.createElement(p.a,{onClick:()=>v(l.b.Cost)},"Sort by Cost"),r.a.createElement(p.a,{onClick:()=>v(l.b.Reputation)},"Sort by Reputation"),r.a.createElement(p.a,{onClick:()=>v(l.b.Default)},"Sort by Default Order"),r.a.createElement(p.a,{onClick:()=>v(l.b.Purchasable)},"Sort by Purchasable"),r.a.createElement("br",null),r.a.createElement(y.a,{size:"small",padding:"none"},r.a.createElement(g.a,null,S)),r.a.createElement(y.a,{size:"small",padding:"none"},r.a.createElement(g.a,null,x)))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(117),o=a(1088),s=a(20),l=a(6),c=a(14),u=a(18),m=a(102),h=a(1089),d=a(10),p=a(1),f=a(29),g=a(32),y=a(42),b=a(65);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(p.a,null,r.a.createElement(u.a,{money:e.cost,player:e.p}))),r.a.createElement(y.b,{key:2},r.a.createElement(p.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(p.a,{color:"error"},"Requires"," ",t.prereqs.map((e,t)=>r.a.createElement(h.a,{key:t,name:e}))))}function _(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,_=Object(i.b)(u),v=e.faction.playerReputation>=h,k=0===u.baseCost||e.p.money.gt(u.baseCost*e.faction.getInfo().augmentationPriceMult),w=_&&v&&k?"primary":"error";let C=u.name;u.name===l.a.NeuroFluxGovernor&&(C+=" - Level "+Object(i.a)());let S=r.a.createElement(r.a.Fragment,null);return S="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(d.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(p.a,null,S),placement:"top"},r.a.createElement(p.a,null,C)))),!e.owned&&r.a.createElement(E,{key:2,augName:e.augName,p:e.p,cost:m,rep:h,hasReq:_,hasRep:v,hasCost:k}))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(117),o=a(152),s=a(18),l=a(40),c=a(27),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(131),i=a(155);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(7),o=a(643),s=a(281),l=a(18),c=a(102),u=a(4),m=a(15),h=a(226),d=a(1),p=a(76),f=a(10),g=a(81);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.money.lt(t))}return r.a.createElement(p.a,{sx:{my:1,p:1,width:"100%"}},r.a.createElement((function(){return null===t?r.a.createElement(r.a.Fragment,null):b()?r.a.createElement(d.a,null,"This donation will result in ",r.a.createElement(c.a,{reputation:Object(o.a)(t,e.p)})," reputation gain"):e.p.money.lt(t)?r.a.createElement(d.a,null,"Insufficient funds"):r.a.createElement(d.a,null,"Invalid donate amount entered!")}),null),e.disabled?r.a.createElement(d.a,null,"Unlock donations at ",r.a.createElement(s.a,{favor:e.favorToDonate})," favor with ",e.faction.name):r.a.createElement(r.a.Fragment,null,r.a.createElement(g.a,{onChange:function(e){const t=u.a.parseMoney(e.target.value);""===e.target.value||isNaN(t)?a(null):a(t)},placeholder:"Donation amount",disabled:e.disabled,InputProps:{endAdornment:r.a.createElement(f.a,{onClick:function(){const a=e.faction,n=t;if(null===n)return;if(!b())return;e.p.loseMoney(n);const i=Object(o.a)(n,e.p);e.faction.playerReputation+=i,Object(m.a)(r.a.createElement(r.a.Fragment,null,"You just donated ",r.a.createElement(l.a,{money:n})," to ",a.name," to gain ",r.a.createElement(c.a,{reputation:i})," reputation.")),e.rerender()},disabled:e.disabled||!b()},"donate")}}),r.a.createElement(d.a,null,r.a.createElement(h.a,{tex:String.raw`reputation = \frac{\text{donation amount} \times \text{reputation multiplier}}{10^{${y}}}`}))))}},function(e,t,a){"use strict";a.d(t,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(102),o=a(281),s=a(226),l=a(131),c=a(155),u=a(1),m=a(29),h=a(32);const d=Object(l.a)(()=>Object(c.a)({noformat:{whiteSpace:"pre-wrap",lineHeight:"1em"}}));function p(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=d(),c=e.faction.getFavorGain()[0];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:e.faction.favor+c})," faction favor after installing an Augmentation."),r.a.createElement(s.a,{tex:String.raw`\large{r = \text{total faction reputation}}`}),r.a.createElement(s.a,{tex:String.raw`\large{favor=\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.a,{tex:String.raw`\large{r = reputation}`}),r.a.createElement(s.a,{tex:String.raw`\large{\Delta r = \Delta r \times \frac{100+favor}{100}}`}))},r.a.createElement(u.a,null,"Faction Favor: ",r.a.createElement(o.a,{favor: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(40),o=a(27),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 p}));var n=a(0),r=a.n(n),i=a(1094),o=a(285),s=a(412),l=a(18),c=a(40),u=a(27),m=a(15),h=a(1),d=a(10);function p(e){const t=u.b.Player(),[a,p]=Object(n.useState)(0);function f(){return(t.sleevesFromCovenant+1)*s.a}function g(){p(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()),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(18),s=a(1),l=a(81),c=a(10),u=a(32),m=a(76);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 d=h(),p=!e.p.canAfford(d);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:d,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);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:p,onClick:function(){const a=h();e.p.canAfford(a)&&(e.sleeve.upgradeMemory(t),e.p.loseMoney(a),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(23),s=a(8),l=a(61),c=a(201),u=a(37),m=a(114),h=a(18),d=a(27),p=a(198),f=a(1),g=a(32),y=a(98),b=a(1096),E=a.n(b),_=a(40),v=a(189),k=a(42),w=a(65);function C(){const e=d.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 S(){const e=d.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=d.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=d.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=d.b.Player();return e.intelligence>0&&(5===e.bitNodeN||l.a[5]>0)?r.a.createElement(w.a,null,r.a.createElement(k.b,null,r.a.createElement(f.a,null,"Intelligence: ")),r.a.createElement(k.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(k.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(k.b,{key:"0"},r.a.createElement(f.a,{noWrap:!0},e[0]+" multiplier:"," ")),r.a.createElement(k.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(k.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=d.b.Player();return e.canAccessBladeburner()?r.a.createElement(T,{rows:[["Bladeburner Success Chance",e.bladeburner_max_stamina_mult],["Bladeburner Max Stamina",e.bladeburner_stamina_gain_mult],["Bladeburner Stamina Gain",e.bladeburner_analysis_mult],["Bladeburner Field Analysis",e.bladeburner_success_chance_mult]]}):r.a.createElement(r.a.Fragment,null)}function P(){const e=d.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,": ",p.a[t].name),r.a.createElement(f.a,{sx:{mx:2},style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},p.a[t].info))}return r.a.createElement(r.a.Fragment,null)}function A({open:e,onClose:t}){const a=d.b.Player();function n(e){const t=[["Total:",r.a.createElement(h.a,{money:e.total})]];return e.bladeburner&&t.push(["Bladeburner:",r.a.createElement(h.a,{money:e.bladeburner})]),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.hacknetnode&&t.push(["Hacknet Nodes:",r.a.createElement(h.a,{money:e.hacknetnode})]),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.stock&&t.push(["Stock Market:",r.a.createElement(h.a,{money:e.stock})]),e.casino&&t.push(["Casino:",r.a.createElement(h.a,{money:e.casino})]),e.sleeves&&t.push(["Sleeves:",r.a.createElement(h.a,{money:e.sleeves})]),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(_.a,{open:e,onClose:t},i)}function N(){const e=d.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 p=[["Time played since last Augmentation:",Object(o.b)(e.playtimeSinceLastAug)]];return e.sourceFiles.length>0&&p.push(["Time played since last Bitnode destroyed:",Object(o.b)(e.playtimeSinceLastBitnode)]),p.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(C,null),r.a.createElement(S,null),r.a.createElement(x,null),r.a.createElement(f.a,null,"Money: ",r.a.createElement(h.a,{money:e.money.toNumber()}),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(k.a,{size:"small",padding:"none"},r.a.createElement(v.a,null,r.a.createElement(w.a,null,r.a.createElement(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Hacking: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.hacking_skill)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Strength: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.strength)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Defense: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.defense)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Dexterity: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.dexterity)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Agility: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.agility)," ")),r.a.createElement(k.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(k.b,null,r.a.createElement(f.a,{noWrap:!0},"Charisma: ")),r.a.createElement(k.b,{align:"right"},r.a.createElement(f.a,{noWrap:!0},i.a.formatSkill(e.charisma)," ")),r.a.createElement(k.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:p})),r.a.createElement("br",null),r.a.createElement(P,null),r.a.createElement(A,{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 k}));var n=a(0),r=a.n(n),i=a(251),o=a(7),s=a(18),l=a(1),c=a(149),u=a(10),m=a(29),h=a(98),d=a(256),p=a.n(d),f=a(358),g=a.n(f),y=a(390);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)()),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),e.rerender())}},"Buy WSE Account - ",r.a.createElement(s.a,{money:t,player:e.p})))}function _(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),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)()),e.rerender())}},"Buy 4S Market Data Access - ",r.a.createElement(s.a,{money:t,player:e.p}))))}}function k(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(_,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(p.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(372),s=a(128);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(458),u=a(1105),m=a(184),h=a(94),d=a(66),p=a(61),f=a(4),g=a(18),y=a(15),b=a(32),E=a(81),_=a(79),v=a(111),k=a(305),w=a(99),C=a(76),S=a(210),x=a(71),O=a.n(x),M=a(136),T=a.n(M);function R(e){const[t,a]=Object(r.useState)(n.Market),[x,M]=Object(r.useState)(d.a.Long),[R,P]=Object(r.useState)(""),[A,N]=Object(r.useState)(!1),[I,F]=Object(r.useState)(!1),[j,D]=Object(r.useState)({text:"",placeText:"",place:()=>!1});function B(){return Math.round(parseFloat(R))}function L(){return 8===e.p.bitNodeN||p.a[8]>=3}return i.a.createElement(b.a,{component:C.a},i.a.createElement(k.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(S.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){P(e.target.value)},placeholder:"Quantity (Shares)",value:R}),i.a.createElement(v.a,{onChange:function(e){e.target.value===d.a.Short?M(d.a.Short):M(d.a.Long)},value:x},i.a.createElement(_.a,{value:d.a.Long},"Long"),(8===e.p.bitNodeN||p.a[8]>=2)&&i.a.createElement(_.a,{value:d.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(_.a,{value:n.Market},n.Market),L()&&i.a.createElement(_.a,{value:n.Limit},n.Limit),L()&&i.a.createElement(_.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===d.a.Short?e.buyStockShort(e.stock,a):e.buyStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),D({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),D({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===d.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===d.a.Short?e.sellStockShort(e.stock,a):e.sellStockLong(e.stock,a),e.rerenderAllTickers();break;case n.Limit:N(!0),D({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),D({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===d.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===d.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.toNumber(),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===d.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===d.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:j.text,placeText:j.placeText,place:j.place,open:A,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(644),i=a(14),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 d="primary";return t.lastPrice===t.price?d="secondary":t.lastPrice>t.price&&(d="error"),n.createElement(s.a,{style:{whiteSpace:"pre"},color:d},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(40),o=a(1),s=a(81),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(61),o=a(198),s=a(224),l=a(1107),c=a(446),u=a(27),m=a(131),h=a(155),d=a(1),p=a(29);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(p.a,{title:r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | O O | O O | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | / __| \\ | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | O | | O / | O | | O | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| O | |_/ |\\| \\ O \\__| \\_| | O |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | |_/ | | \\| / | \\_| | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| / \\| | / / \\ |/ "),r.a.createElement(d.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(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | / / \\ \\ | | | "),r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ | / / | | \\ \\ | / "),r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\|| | | | | | | | | ||/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| \\_ | | | | | | _/ |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\| / \\ / \\ |/ / "),r.a.createElement(d.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(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | | "),r.a.createElement(d.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(198),o=a(27),s=a(40),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 S}));var n=a(0),r=a.n(n),i=a(131),o=a(155),s=a(4),l=a(102),c=a(238),u=a(189),m=a(60),h=a(65),d=a(76),p=a(32),f=a(1),g=a(10),y=a(98),b=a(1110),E=a.n(b),_=a(14),v=a(27);function k(){const e=v.b.Player(),t=C();return 0===e.intelligence?r.a.createElement(r.a.Fragment,null):r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:t.cell}},r.a.createElement(f.a,{classes:{root:t.int}},"Int ")),r.a.createElement(m.a,{align:"right",classes:{root:t.cell}},r.a.createElement(f.a,{classes:{root:t.int}},s.a.formatSkill(e.intelligence))),r.a.createElement(m.a,{align:"right",classes:{root:t.cell}},r.a.createElement(f.a,{id:"overview-int-hook",classes:{root:t.int}})))}function w(){const e=v.b.Player(),t=v.b.Router(),a=C();return!e.isWorking||e.focus?r.a.createElement(r.a.Fragment,null):r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",colSpan:2,classes:{root:a.cellNone}},r.a.createElement(f.a,null,"Work in progress:"))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",colSpan:2,classes:{root:a.cellNone}},r.a.createElement(f.a,null,"+",r.a.createElement(l.a,{reputation:e.workRepGained})," rep"))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",align:"center",colSpan:2,classes:{root:a.cellNone}},r.a.createElement(g.a,{onClick:()=>{e.startFocusing(),t.toWork()}},"Focus"))))}const C=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 S({save:e}){const t=v.b.Player(),a=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const e=setInterval(()=>a(e=>!e),600);return()=>clearInterval(e)},[]);const i=C();return r.a.createElement(d.a,{square:!0},r.a.createElement(p.a,{m:1},r.a.createElement(c.a,{size:"small"},r.a.createElement(u.a,null,r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.hp}},"HP ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.hp}},s.a.formatHp(t.hp)," / ",s.a.formatHp(t.max_hp))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-hp-hook",classes:{root:i.hp}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.money}},"Money ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.money}},s.a.formatMoney(t.money.toNumber()))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-money-hook",classes:{root:i.money}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.hack}},"Hack ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.hack}},s.a.formatSkill(t.hacking_skill))),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-hack-hook",classes:{root:i.hack}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},"Str ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.strength))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-str-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},"Def ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.defense))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-def-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},"Dex ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.dexterity))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-dex-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.combat}},"Agi ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{classes:{root:i.combat}},s.a.formatSkill(t.agility))),r.a.createElement(m.a,{align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-agi-hook",classes:{root:i.combat}}))),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.cha}},"Cha ")),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{classes:{root:i.cha}},s.a.formatSkill(t.charisma))),r.a.createElement(m.a,{align:"right",classes:{root:i.cellNone}},r.a.createElement(f.a,{id:"overview-cha-hook",classes:{root:i.cha}}))),r.a.createElement(k,null),r.a.createElement(h.a,null,r.a.createElement(m.a,{component:"th",scope:"row",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-extra-hook-0",classes:{root:i.hack}})),r.a.createElement(m.a,{component:"th",scope:"row",align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-extra-hook-1",classes:{root:i.hack}})),r.a.createElement(m.a,{component:"th",scope:"row",align:"right",classes:{root:i.cell}},r.a.createElement(f.a,{id:"overview-extra-hook-2",classes:{root:i.hack}}))),r.a.createElement(w,null),r.a.createElement(h.a,null,r.a.createElement(m.a,{align:"center",colSpan:2,classes:{root:i.cellNone}},r.a.createElement(y.a,{onClick:e},r.a.createElement(E.a,{color:0!==_.a.AutosaveInterval?"primary":"error"}))))))))}},,function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(27),o=a(446),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 s}));var n=a(0),r=a.n(n),i=a(27),o=a(213);function s(){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=window.getComputedStyle(t.target).display,n=window.getComputedStyle(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";function n(e){return e.constructor===Array&&e.every(e=>e.constructor===Array)}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(13),r=a(447),i=a(73),o=a(205),s=a(185);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}},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(e){a.updateDynamicRam("getMemberInformation",Object(n.c)("gang","getMemberInformation")),l("getMemberInformation");const t=c("getMemberInformation",e);return{name:t.name,task:t.task,earnedRespect:t.earnedRespect,hack:t.hack,str:t.str,def:t.def,dex:t.dex,agi:t.agi,cha:t.cha,hack_exp:t.hack_exp,str_exp:t.str_exp,def_exp:t.def_exp,dex_exp:t.dex_exp,agi_exp:t.agi_exp,cha_exp:t.cha_exp,hack_mult:t.hack_mult,str_mult:t.str_mult,def_mult:t.def_mult,dex_mult:t.dex_mult,agi_mult:t.agi_mult,cha_mult:t.cha_mult,hack_asc_mult:t.calculateAscensionMult(t.hack_asc_points),str_asc_mult:t.calculateAscensionMult(t.str_asc_points),def_asc_mult:t.calculateAscensionMult(t.def_asc_points),dex_asc_mult:t.calculateAscensionMult(t.dex_asc_points),agi_asc_mult:t.calculateAscensionMult(t.agi_asc_points),cha_asc_mult:t.calculateAscensionMult(t.cha_asc_points),hack_asc_points:t.hack_asc_points,str_asc_points:t.str_asc_points,def_asc_points:t.def_asc_points,dex_asc_points:t.dex_asc_points,agi_asc_points:t.agi_asc_points,cha_asc_points:t.cha_asc_points,upgrades:t.upgrades.slice(),augmentations:t.augmentations.slice()}},canRecruitMember:function(){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("recruitMember",`Successfully recruited Gang Member '${r}'`):t.log("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("setMemberTask",`Successfully assigned Gang Member '${e}' to '${r}' task`):t.log("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);return Object.assign({},t.mults)},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("purchaseEquipment",`Purchased '${i}' for Gang member '${r}'`):t.log("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)},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("setTerritoryWarfare","Engaging in Gang Territory Warfare")):(i.territoryWarfareEngaged=!1,t.log("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 c}));var n=a(521),r=a(205),i=a(185),o=a(73),s=a(21);function l(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class c{constructor(e=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=e}calculateSkill(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)}calculateAscensionMult(e){return Math.max(Math.pow(e/4e3,.7),1)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(e){return r.a.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof n.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(e){const t=this.getTask();if(0===t.baseRespect)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=4*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.respect)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 11*t.baseRespect*a*n*r}calculateWantedLevelGain(e){const t=this.getTask();if(0===t.baseWanted)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.5*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.wanted)/100);if(isNaN(n)||n<=0)return 0;if(t.baseWanted<0)return.4*t.baseWanted*a*n;const r=7*t.baseWanted/Math.pow(3*a*n,.8);return Math.min(100,r)}calculateMoneyGain(e){const t=this.getTask();if(0===t.baseMoney)return 0;let a=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if(a-=3.2*t.difficulty,a<=0)return 0;const n=Math.max(.005,Math.pow(100*o.a[e.facName].territory,t.territory.money)/100);if(isNaN(n)||n<=0)return 0;const r=e.getWantedPenalty();return 5*t.baseMoney*a*n*r}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(e=1){const t=this.getTask();if(t===r.a.Unassigned)return;const a=Math.pow(t.difficulty,.9)*e,n=this.expMult();this.hack_exp+=t.hackWeight/1500*a*n.hack,this.str_exp+=t.strWeight/1500*a*n.str,this.def_exp+=t.defWeight/1500*a*n.def,this.dex_exp+=t.dexWeight/1500*a*n.dex,this.agi_exp+=t.agiWeight/1500*a*n.agi,this.cha_exp+=t.chaWeight/1500*a*n.cha}recordEarnedRespect(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e}getGainedAscensionPoints(){return{hack:Math.max(this.hack_exp-1e3,0),str:Math.max(this.str_exp-1e3,0),def:Math.max(this.def_exp-1e3,0),dex:Math.max(this.dex_exp-1e3,0),agi:Math.max(this.agi_exp-1e3,0),cha:Math.max(this.cha_exp-1e3,0)}}canAscend(){const e=this.getGainedAscensionPoints();return e.hack>0||e.str>0||e.def>0||e.dex>0||e.agi>0||e.cha>0}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=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")),c("getNumSleeves"),e.sleeves.length},setToShockRecovery:function(t=0){const r=a.number("setToShockRecovery","sleeveNumber",t);return a.updateDynamicRam("setToShockRecovery",Object(n.c)("sleeve","setToShockRecovery")),c("setToShockRecovery"),u("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")),c("setToSynchronize"),u("setToSynchronize",r),e.sleeves[r].synchronize(e)},setToCommitCrime:function(t=0,r=""){const i=a.number("setToCommitCrime","sleeveNumber",t),o=a.string("setToUniversityCourse","crimeName",r);return a.updateDynamicRam("setToCommitCrime",Object(n.c)("sleeve","setToCommitCrime")),c("setToCommitCrime"),u("setToCommitCrime",i),e.sleeves[i].commitCrime(e,o)},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")),c("setToUniversityCourse"),u("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")),c("travel"),u("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")),c("setToCompanyWork"),u("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,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()},getTrainingMult:function(){return!!Object(r.g)(e)&&e.hashManager.getTrainingMult()}}}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return executeJSScript}));var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(140),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(1120);function makeScriptBlob(e){return new Blob([e],{type:"text/javascript"})}async function executeJSScript(scripts=[],workerScript){let uurls=[];const script=workerScript.getScript();if(null===script)throw new Error("script is null");shouldCompile(script,scripts)&&(script.markUpdated(),uurls=_getScriptUrls(script,scripts,[]),script.url=uurls[uurls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(uurls[uurls.length - 1].url)"))),script.dependencies=uurls);const loadedModule=await script.module,ns=workerScript.env.vars;if(!loadedModule.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_0__.b)(workerScript,script.filename+" cannot be run because it does not have a main function.");return loadedModule.main(ns)}function shouldCompile(e,t){return""===e.module||e.dependencies.some(a=>{const n=t.find(e=>e.filename==a.filename);if(!n)return!0;return n.moduleSequenceNumber>e.moduleSequenceNumber})}function _getScriptUrls(e,t,a){const n=[];a.push(e);try{let r=e.code.replace(/((?:from|import)\s+(?:'|"))(?:\.\/)?([^'"]+)('|")/g,(e,r,i,o)=>{if(!t.some(e=>e.filename==i))return e;const[s]=t.filter(e=>e.filename==i),l=_getScriptUrls(s,t,a);return n.push(...l),[r,l[l.length-1].url,o].join("")});return r+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}',n.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_1__.a(e.filename,URL.createObjectURL(makeScriptBlob(r)))),n}catch(e){for(const e in n)URL.revokeObjectURL(e);throw e}finally{a.pop()}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return n}));class n{constructor(e,t){this.filename=e,this.url=t}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(14);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";a.d(t,"a",(function(){return i}));var n=a(318),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_skill?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(436),r=a(103),i=a(24);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 o}));var n=a(229),r=a(123),i=a(493);function o(e,t,a,o,s){if(1!==s.length)return void e.error("Incorrect usage of cat command. Usage: cat [file]");const l=e.getFilepath(s[0]+"");if(l.endsWith(".msg")||l.endsWith(".lit")||l.endsWith(".txt")){if(l.endsWith(".msg")||l.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.i)(t),r=Object(n.a)(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(225),r=a(101);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(113);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;ti.a.saveAs(e,a))}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(48);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_skill?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(48);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_skill?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(646);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(127);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("number"==typeof i[0]){const t=i[0];return void(Object(n.a)(t)?e.print("Killing script with PID "+t):e.print(`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(127),r=a(255);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 i}));var n=a(123),r=a(109);function i(e,t,a,i,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(r.a)(o[0]+"",e.cwd());if(u=t||"",null!=u&&(u.endsWith("/")||(u+="/"),!Object(r.f)(u)))return l()}"/"===u&&(u="");const m=[],h=[],d=[],p=[],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(r.d)(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,d);for(const e of b.contracts)y(e.fn,p);for(const e of b.messages)e instanceof n.a?y(e.filename,f):y(e,f);function E(t){const a=Math.max(...t.map(e=>e.length))+1,n=Math.floor(80/a);for(let r=0;re.segments.length>0);for(let t=0;t<_.length;t++)0!==t&&(e.print(""),e.print("")),E(_[t].segments)}},function(e,t,a){"use strict";function n(e,t,a){e.print(a.getCurrentServer().cpuCores+" Core(s)")}a.d(t,"a",(function(){return n}))},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(4);function r(e,t,a,r,i){try{if(1!==i.length&&3!==i.length)return void e.error("Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]");const t=i[0]+"";let r=1;if(3===i.length&&"-t"===i[1]&&(r=Math.round(parseInt(i[2]+"")),isNaN(r)||r<1))return void e.error("Invalid number of threads specified. Number of threads must be greater than 1");const o=e.getScript(a,t);if(null==o)return void e.error("No such script exists!");const s=o.ramUsage*r;e.print(`This script requires ${n.a.formatRAM(s)} of RAM to run for ${r} thread(s)`)}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(101),r=a(227);function i(e,t,a,i,o){if(2===o.length)try{const t=o[0]+"",s=o[1]+"";if(!Object(n.a)(t)&&!t.endsWith(".txt"))return void e.error("'mv' can only be used on scripts and text files (.txt)");const l=e.getFile(a,t);if(null==l)return void e.error(`Source file ${t} does not exist`);const c=e.getFilepath(t),u=e.getFilepath(s),m=e.getFile(a,s);if(Object(n.a)(t)){const t=l;if(!Object(n.a)(s))return void e.error("Source and destination files must have the same type");if(i.isRunning(c))return void e.error("Cannot use 'mv' on a script that is running");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.filename=u}else if(l instanceof r.a){const t=l;if(!s.endsWith(".txt"))return void e.error("Source and destination files must have the same type");if(null!=m){if(!i.removeFile(u).res)return void e.error("Something went wrong...please contact game dev (probably a bug)");e.print("Warning: The destination file was overwritten")}t.fn=u}}catch(t){e.error(t+"")}else e.error("Incorrect number of arguments. Usage: mv [src] [dest]")}},function(e,t,a){"use strict";a.d(t,"a",(function(){return r}));var n=a(101);function r(e,t,a,r,i){if(1===i.length)try{const r=i[0]+"";if(Object(n.a)(r)){const n=e.getFilepath(r),i=e.getScript(a,r);if(null==i){let e="";(r.endsWith(".ns")||r.endsWith(".js"))&&(e="/**\n * @param {NS} ns\n **/\nexport async function main(ns) {\n\n}"),t.toScriptEditor(n,e)}else t.toScriptEditor(n,i.code)}else{if(!r.endsWith(".txt"))return void e.error("Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano");{const n=e.getFilepath(r),i=e.getTextFile(a,r);null==i?t.toScriptEditor(n):t.toScriptEditor(n,i.text)}}}catch(t){e.error(t+"")}else e.error("Incorrect usage of nano command. Usage: nano [scriptname]")}},function(e,t,a){"use strict";function n(e,t,a,n,r){if(0===r.length)for(let t=0;t0?d:1,g=h._;if(null==Object(o.a)(u,g,l)){for(let t=0;ts)return void e.print("This machine does not have enough RAM to run this script with "+f+" threads. Script requires "+o+"GB of RAM");const c=new i.a(a,g);c.threads=f;return Object(r.e)(c,l)?(e.print(`Running script with ${f} thread(s), pid ${c.pid} and args: ${JSON.stringify(g)}.`),void(p&&n.a.emit(c))):void e.error("Failed to start script")}e.print("ERROR: No such script")}else e.print("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(68);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.print("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(113);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(68);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 o}));var n=a(123),r=a(24),i=a(101);function o(e,t,a,o,s){try{if(2!==s.length)return void e.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname/ip]");const t=e.getFilepath(s[0]+"");if(!t.endsWith(".lit")&&!Object(i.a)(t)&&!t.endsWith(".txt"))return void e.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const a=Object(r.d)(s[1]+"");if(null==a)return void e.error(`Invalid destination. ${s[1]} not found`);if(t.endsWith(".lit")){let r=!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{const t=Object(n.b)(l[0],s);if(null==t)return void e.error("No such script exists");o.a.emit(t)}}catch(t){e.error(t+"")}}},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(537),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_skill?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(101);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.print("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.print("wget failed")}),"text").fail((function(e){return t.error("wget failed: "+JSON.stringify(e))}))}}).call(this,a(666))},function(e,t,a){"use strict";a.d(t,"a",(function(){return i}));var n=a(2),r=a(213);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.r(t);var n=a(0),r=a.n(n),i=a(105),o=a.n(i),s=a(282),l=a(602);function c(){Object(s.c)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root"))}o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root")),s.b.subscribe(c)}]); //# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/main.bundle.js.map b/main.bundle.js.map index cd2c6e3da..8c8f91b30 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/Augmentation/data/AugmentationNames.ts","webpack:///./src/Constants.ts","webpack:///./src/BitNode/BitNodeMultipliers.ts","webpack:///./src/Locations/data/LocationNames.ts","webpack:///./src/Netscript/RamCostGenerator.ts","webpack:///./src/Settings/Settings.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/Locations/data/CityNames.ts","webpack:///./src/utils/StringHelperFunctions.ts","webpack:///./src/Server/AllServers.ts","webpack:///./src/Faction/Factions.ts","webpack:///./src/Company/data/companypositionnames.ts","webpack:///./src/ui/Context.ts","webpack:///./src/utils/helpers/getRandomInt.ts","webpack:///./src/ui/Router.ts","webpack:///./src/Augmentation/Augmentation.tsx","webpack:///./src/Hacknet/data/Constants.ts","webpack:///./src/Bladeburner/data/ActionTypes.ts","webpack:///./src/InteractiveTutorial.ts","webpack:///./src/ui/React/Modal.tsx","webpack:///./src/Corporation/data/Constants.ts","webpack:///./src/ui/React/Table.tsx","webpack:///./src/Corporation/ui/Context.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx","webpack:///./src/Corporation/EmployeePositions.ts","webpack:///./src/Server/Server.ts","webpack:///./src/Corporation/IndustryData.tsx","webpack:///./src/Locations/LocationTypeEnum.ts","webpack:///./src/Bladeburner/data/Constants.ts","webpack:///./src/Literature/data/LiteratureNames.ts","webpack:///./src/Hacknet/HacknetHelpers.tsx","webpack:///./src/Company/Companies.ts","webpack:///./src/SourceFile/SourceFileFlags.ts","webpack:///./src/StockMarket/data/PositionTypes.ts","webpack:///./src/Corporation/Actions.ts","webpack:///./src/Programs/Programs.ts","webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts","webpack:///./src/Gang/AllGangs.ts","webpack:///./src/Crime/Crimes.ts","webpack:///./src/Casino/utils.ts","webpack:///./src/Company/CompanyPositions.ts","webpack:///./src/Hacknet/HacknetServer.ts","webpack:///./src/StockMarket/data/StockSymbols.ts","webpack:///./src/Hacking.ts","webpack:///./src/StockMarket/StockMarket.tsx","webpack:///./src/utils/helpers/keyCodes.ts","webpack:///./src/CodingContracts.ts","webpack:///./src/StockMarket/data/OrderTypes.ts","webpack:///./src/Script/isScriptFilename.ts","webpack:///./src/ui/React/Reputation.tsx","webpack:///./src/Server/data/SpecialServers.ts","webpack:///./src/ui/React/MoneyRate.tsx","webpack:///./src/Corporation/data/BaseResearchTree.ts","webpack:///./src/Terminal/DirectoryHelpers.ts","webpack:///./src/ui/GameRoot.tsx","webpack:///./src/Server/ServerHelpers.ts","webpack:///./src/ui/React/StatsTable.tsx","webpack:///./src/Terminal.ts","webpack:///./src/Bladeburner/BlackOperation.ts","webpack:///./src/Faction/FactionHelpers.tsx","webpack:///./src/utils/helpers/isString.ts","webpack:///./src/Corporation/ui/MoneyCost.tsx","webpack:///./src/utils/EventEmitter.ts","webpack:///./src/Message/Message.ts","webpack:///./src/Bladeburner/data/SkillNames.ts","webpack:///./src/Gang/ui/Context.ts","webpack:///./src/Netscript/killWorkerScript.ts","webpack:///./src/StockMarket/Stock.ts","webpack:///./src/Locations/Cities.ts","webpack:///./src/DevMenu/ui/Adjuster.tsx","webpack:///./src/Alias.ts","webpack:///./src/NetscriptEvaluator.ts","webpack:///./src/Literature/Literature.ts","webpack:///./src/ui/React/CopyableText.tsx","webpack:///./src/Augmentation/AugmentationHelpers.tsx","webpack:///./src/Gang/data/upgrades.ts","webpack:///./src/Corporation/MaterialSizes.ts","webpack:///./src/NetscriptWorker.ts","webpack:///./src/Faction/FactionWorkTypeEnum.ts","webpack:///./src/utils/helpers/createProgressBarText.ts","webpack:///./src/Corporation/Material.ts","webpack:///./src/Faction/Faction.ts","webpack:///./src/Settings/SettingEnums.ts","webpack:///./src/Infiltration/ui/KeyHandler.tsx","webpack:///./src/Infiltration/ui/GameTimer.tsx","webpack:///./src/Infiltration/ui/Difficulty.ts","webpack:///./src/Netscript/WorkerScripts.ts","webpack:///./src/Casino/Game.tsx","webpack:///./src/StockMarket/StockMarketHelpers.ts","webpack:///./src/Gang/GangMemberUpgrades.ts","webpack:///./src/Crime/Crime.ts","webpack:///./src/PersonObjects/Person.ts","webpack:///./src/BitNode/BitNode.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/Hacknet/formulas/HacknetServers.ts","webpack:///./src/StockMarket/BuyingAndSelling.tsx","webpack:///./src/Bladeburner/Skill.ts","webpack:///./src/ui/React/Hashes.tsx","webpack:///./src/Exploits/Exploit.ts","webpack:///./src/PersonObjects/formulas/reputation.ts","webpack:///./src/Bladeburner/Skills.ts","webpack:///./src/Casino/CardDeck/Card.ts","webpack:///./src/Bladeburner/ActionIdentifier.ts","webpack:///./src/Locations/Locations.ts","webpack:///./src/Infiltration/utils.ts","webpack:///./src/RedPill.tsx","webpack:///./src/Script/ScriptHelpers.ts","webpack:///./src/TextFile.ts","webpack:///./src/utils/helpers/exceptionAlert.ts","webpack:///./src/Message/MessageHelpers.ts","webpack:///./src/Hacknet/formulas/HacknetNodes.ts","webpack:///./src/PersonObjects/formulas/skill.ts","webpack:///./src/Bladeburner/BlackOperations.tsx","webpack:///./src/Bladeburner/GeneralActions.tsx","webpack:///./src/SourceFile/SourceFile.ts","webpack:///./src/ui/React/LogBoxManager.tsx","webpack:///./src/Hacknet/HacknetNode.ts","webpack:///./src/Hacknet/HashUpgrades.ts","webpack:///./src/utils/helpers/arrayToString.ts","webpack:///./src/StockMarket/StockMarketCosts.ts","webpack:///./src/Locations/ui/ApplyToJobButton.tsx","webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts","webpack:///./src/DarkWeb/DarkWebItems.ts","webpack:///./src/utils/helpers/addOffset.ts","webpack:///./src/Script/RamCalculationErrorCodes.ts","webpack:///./src/Netscript/WorkerScript.ts","webpack:///./src/Gang/data/Constants.ts","webpack:///./src/utils/IPAddress.ts","webpack:///./src/utils/helpers/compareArrays.ts","webpack:///./src/Corporation/ResearchMap.ts","webpack:///./src/ui/React/Favor.tsx","webpack:///./src/ui/React/Theme.tsx","webpack:///./src/Bladeburner/Action.tsx","webpack:///./src/SaveObject.tsx","webpack:///./src/PersonObjects/Sleeve/Sleeve.ts","webpack:///./src/Terminal/ITerminal.ts","webpack:///./src/Terminal/TerminalEvents.ts","webpack:///./src/DarkWeb/DarkWebItem.ts","webpack:///./src/StockMarket/OrderProcessing.tsx","webpack:///./src/Corporation/Corporation.tsx","webpack:///./src/Bladeburner/Operation.ts","webpack:///./src/Prestige.ts","webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts","webpack:///./src/Casino/RNG.ts","webpack:///./src/Company/CompanyPosition.ts","webpack:///./src/Script/RunningScript.ts","webpack:///./src/SourceFile/SourceFiles.tsx","webpack:///./src/Bladeburner/ui/StartButton.tsx","webpack:///./src/Script/Script.ts","webpack:///./src/Hacknet/HashManager.ts","webpack:///./src/CodingContractGenerator.ts","webpack:///./src/ui/InteractiveTutorial/ITutorialEvents.ts","webpack:///./src/Corporation/OfficeSpace.ts","webpack:///./src/Corporation/IndustryUpgrades.ts","webpack:///./src/ExportBonus.tsx","webpack:///./src/utils/MoneySourceTracker.ts","webpack:///./src/utils/helpers/getTimestamp.ts","webpack:///./src/ui/React/AlertManager.tsx","webpack:///./src/PersonObjects/formulas/intelligence.ts","webpack:///./src/Hospital/Hospital.ts","webpack:///./src/Corporation/Product.ts","webpack:///./src/db.tsx","webpack:///./src/Bladeburner/City.ts","webpack:///./src/Locations/City.ts","webpack:///./src/Faction/ui/Option.tsx","webpack:///./src/StockMarket/ui/StockTickersConfig.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.ts","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/Crime/CrimeHelpers.ts","webpack:///./src/ui/React/ReputationRate.tsx","webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts","webpack:///./src/utils/helpers/roundToTwo.ts","webpack:///./src/DarkWeb/DarkWeb.tsx","webpack:///./src/Netscript/Pid.ts","webpack:///./src/NetscriptFunctions.ts","webpack:///./src/StockMarket/PlayerInfluencing.ts","webpack:///./src/Company/GetJobRequirementText.ts","webpack:///./src/ui/React/CinematicText.tsx","webpack:///./src/Gang/Gang.ts","webpack:///./src/utils/helpers/getRandomByte.ts","webpack:///./src/Locations/createCityMap.ts","webpack:///./src/Hacking/netscriptCanHack.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/Script/RamCalculations.ts","webpack:///./src/BitNode/ui/BitFlumeModal.tsx","webpack:///./src/Literature/LiteratureHelpers.ts","webpack:///./src/Faction/FactionInfo.tsx","webpack:///./src/Faction/ui/InvitationModal.tsx","webpack:///./src/ThirdParty/JSInterpreter.js","webpack:///./src/Server/formulas/grow.ts","webpack:///./src/ui/React/PromptManager.tsx","webpack:///./src/ui/React/Snackbar.tsx","webpack:///./src/Programs/ProgramHelpers.ts","webpack:///./src/ui/React/AugmentationAccordion.tsx","webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts","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/Gang/GangMemberTask.ts","webpack:///./src/Infiltration/ui/BlinkingCursor.tsx","webpack:///./src/PersonObjects/Resleeving/Resleeving.ts","webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts","webpack:///./src/ui/React/HashRate.tsx","webpack:///./src/Locations/ui/TravelAgencyRoot.tsx","webpack:///./src/ScriptEditor/ui/ScriptEditorRoot.tsx","webpack:///./src/ui/React/TablePaginationActionsAll.tsx","webpack:///./src/Script/RunningScriptHelpers.ts","webpack:///./src/Faction/formulas/favor.ts","webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts","webpack:///./src/Bladeburner/Contract.ts","webpack:///./src/Bladeburner/data/Help.ts","webpack:///./src/Corporation/ResearchTree.ts","webpack:///./src/StockMarket/StockMarketConstants.ts","webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.ts","webpack:///./src/Company/GetNextCompanyPosition.ts","webpack:///./src/engine.tsx","webpack:///./src/ui/LoadingScreen.tsx","webpack:///./src/Bladeburner/data/Growths.ts","webpack:///./src/utils/helpers/isValidNumber.ts","webpack:///./src/StockMarket/Order.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/ScriptEditor/CursorPositions.ts","webpack:///./src/ScriptEditor/NetscriptDefinitions.ts","webpack:///./src/Milestones/Milestones.ts","webpack:///./src/Faction/formulas/donation.ts","webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts","webpack:///./src/Terminal/Parser.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/Server/data/servers.ts","webpack:///./src/utils/helpers/isValidIPAddress.ts","webpack:///./src/Corporation/CorporationState.ts","webpack:///./src/Literature/Literatures.ts","webpack:///./src/PersonObjects/Player/PlayerObject.ts","webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts","webpack:///./src/utils/helpers/clearObject.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/Company/data/CompanyPositionsMetadata.ts","webpack:///./src/Corporation/Industry.ts","webpack:///./src/utils/calculateEffectWithFactors.ts","webpack:///./src/Corporation/Employee.ts","webpack:///./src/Corporation/ProductRatingWeights.ts","webpack:///./src/utils/helpers/isPowerOfTwo.ts","webpack:///./src/StockMarket/data/InitStockMetadata.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/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/data/tasks.ts","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/Gang/GangMemberUpgrade.ts","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/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/ui/React/CorruptableText.tsx","webpack:///./src/Locations/ui/City.tsx","webpack:///./src/Programs/ui/ProgramsRoot.tsx","webpack:///./src/ScriptEditor/ui/OptionsModal.tsx","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/Terminal/tabCompletion.ts","webpack:///./src/Tutorial/ui/TutorialRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.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/Faction/ui/FactionsRoot.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/ui/React/CharacterOverview.tsx","webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx","webpack:///./src/Exploits/Unclickable.tsx","webpack:///./src/utils/helpers/is2DArray.ts","webpack:///./src/NetscriptFunctions/Gang.ts","webpack:///./src/Gang/GangMember.ts","webpack:///./src/NetscriptFunctions/Sleeve.ts","webpack:///./src/NetscriptFunctions/Extra.ts","webpack:///./src/NetscriptFunctions/Hacknet.ts","webpack:///./src/NetscriptJSEvaluator.ts","webpack:///./src/Script/ScriptUrl.ts","webpack:///./src/NetscriptPort.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/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/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","Decimal","corporation","Corporation","funds","revenue","expenses","divisions","ind","lastCycleRevenue","lastCycleExpenses","thisCycleRevenue","thisCycleExpenses","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","parseMoney","numeralValue","parsed","parseFloat","isNaN","NaN","max","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","CONSTANTS","Version","_idleSpeed","MaxSkillLevel","MilliPerCycle","CorpFactionRepRequirement","BaseCostFor1GBOfRamHome","BaseCostFor1GBOfRamServer","TravelCost","BaseFavorToDonate","DonateMoneyToRepDivisor","FactionReputationToFavorBase","FactionReputationToFavorMult","CompanyReputationToFavorBase","CompanyReputationToFavorMult","NeuroFluxGovernorLevelMult","NumNetscriptPorts","HomeComputerMaxRam","ServerBaseGrowthRate","ServerMaxGrowthRate","ServerFortifyAmount","ServerWeakenAmount","PurchasedServerLimit","PurchasedServerMaxRam","MultipleAugMultiplier","TorRouterCost","InfiltrationBribeBaseAmount","InfiltrationMoneyValue","InfiltrationRepValue","InfiltrationExpPow","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","BitNodeMultipliers","HackingLevelMultiplier","StrengthLevelMultiplier","DefenseLevelMultiplier","DexterityLevelMultiplier","AgilityLevelMultiplier","CharismaLevelMultiplier","ServerGrowthRate","ServerMaxMoney","ServerStartingMoney","ServerStartingSecurity","ServerWeakenRate","HomeComputerRamCost","PurchasedServerCost","CompanyWorkMoney","CrimeMoney","HacknetNodeMoney","ManualHackMoney","ScriptHackMoney","ScriptHackMoneyGain","CodingContractMoney","ClassGymExpGain","CompanyWorkExpGain","CrimeExpGain","FactionWorkExpGain","HackExpGain","FactionPassiveRepGain","FactionWorkRepGain","RepToDonateToFaction","AugmentationMoneyCost","AugmentationRepCost","InfiltrationMoney","InfiltrationRep","FourSigmaMarketDataCost","FourSigmaMarketDataApiCost","CorporationValuation","BladeburnerRank","BladeburnerSkillCost","DaedalusAugsRequirement","GangKarmaRequirement","LocationName","RamCostConstants","ScriptBaseRamCost","ScriptDomRamCost","ScriptHackRamCost","ScriptHackAnalyzeRamCost","ScriptGrowRamCost","ScriptGrowthAnalyzeRamCost","ScriptWeakenRamCost","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","RamCosts","hacknet","numNodes","purchaseNode","getPurchaseNodeCost","getNodeStats","upgradeLevel","upgradeRam","upgradeCore","upgradeCache","getLevelUpgradeCost","getRamUpgradeCost","getCoreUpgradeCost","getCacheUpgradeCost","numHashes","hashCost","spendHashes","sprintf","vsprintf","scan","hack","hackAnalyzeThreads","hackAnalyzePercent","hackChance","sleep","grow","growthAnalyze","weaken","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","getStockSymbols","getStockPrice","getStockAskPrice","getStockBidPrice","getStockPosition","getStockMaxShares","getStockPurchaseCost","getStockSaleGain","buyStock","sellStock","shortStock","sellShort","placeOrder","cancelOrder","getOrders","getStockVolatility","getStockForecast","purchase4SMarketData","purchase4SMarketDataTixApi","getPurchasedServerLimit","getPurchasedServerMaxRam","getPurchasedServerCost","purchaseServer","deleteServer","getPurchasedServers","write","tryWrite","read","peek","clear","getPortHandle","rm","scriptRunning","scriptKill","getScriptName","getScriptRam","getHackTime","getGrowTime","getWeakenTime","getScriptIncome","getScriptExpGain","getRunningScript","nFormat","getTimeSinceLastAug","prompt","wget","getFavorToDonate","universityCourse","gymWorkout","travelToCity","purchaseTor","purchaseProgram","getCurrentServer","connect","manualHack","installBackdoor","getStats","getCharacterInformation","getPlayer","hospitalize","isBusy","stopAction","upgradeHomeRam","getUpgradeHomeRamCost","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","gang","createGang","inGang","getMemberNames","getGangInformation","getOtherGangInformation","getMemberInformation","canRecruitMember","recruitMember","getTaskNames","getTaskStats","setMemberTask","getEquipmentNames","getEquipmentCost","getEquipmentType","getEquipmentStats","purchaseEquipment","ascendMember","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","getCityEstimatedCommunities","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","heart","break","getRamCost","args","curr","currType","defaultSettings","ActiveScriptsServerPageSize","ActiveScriptsScriptPageSize","AutosaveInterval","CodeInstructionRunTime","DisableASCIIArt","DisableHotkeys","DisableTextEffects","EnableBashHotkeys","EnableTimestamps","Locale","MaxLogCapacity","MaxPortCapacity","MaxTerminalCapacity","SuppressBuyAugmentationConfirmation","SuppressFactionInvites","SuppressHospitalizationPopup","SuppressMessages","SuppressTravelConfirmation","SuppressBladeburnerPopup","theme","primarylight","primary","primarydark","errorlight","error","errordark","secondarylight","secondary","secondarydark","warninglight","warning","warningdark","infolight","info","infodark","welllight","well","white","black","hp","combat","cha","int","rep","disabled","Settings","OwnedAugmentationsOrder","OwnedAugmentationsOrderSetting","AcquirementTime","PurchaseAugmentationsOrder","PurchaseAugmentationsOrderSetting","Default","MonacoTheme","MonacoInsertSpaces","MonacoFontSize","init","assign","load","dialogBoxCreate","txt","AlertEvents","emit","dangerouslySetInnerHTML","__html","useStyles","makeStyles","createStyles","unbuyable","color","palette","action","colors","Money","props","classes","undefined","player","Error","canAfford","className","Augmentations","log","ctor","constructors","fromJSON","Generic_toJSON","ctorName","obj","keys","index","Generic_fromJSON","CityName","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","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","networkLayer","linkNetworkLayers","network1","selectServer","server1","server2","serversOnNetwork","getRandomArrayItem","prestigeAllServers","member","loadAllServers","saveAllServers","TempAllServers","stringify","runningScripts","runningScriptObj","logs","Factions","loadFactions","faction","getInfo","err","factionExists","initFactions","FactionInfos","resetFaction","Faction","newFactionObject","factionName","favor","AddToFactions","SoftwareCompanyPositions","ITCompanyPositions","SecurityEngineerCompanyPositions","NetworkEngineerCompanyPositions","BusinessCompanyPositions","SecurityCompanyPositions","AgentCompanyPositions","MiscCompanyPositions","SoftwareConsultantCompanyPositions","BusinessConsultantCompanyPositions","PartTimeCompanyPositions","Context","React","createContext","Router","use","useContext","lower","upper","Page","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","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","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","root","borderBottom","small","width","TableCell","Table","Division","useCorporation","useDivision","t_homeComp","safetlyCreateUniqueServer","adminRights","isConnectedTo","purchasedByPlayer","currentServer","SpecialServers","Home","Programs","NukeProgram","prestigeAugmentation","numPeopleKilled","karma","hacking_skill","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","moneySourceB","playtimeSinceLastBitnode","receiveInvite","includes","calculateSkill","exp","mult","calculateSkillF","updateSkillLevels","intelligence","intelligence_exp","ratio","round","resetMultipliers","hasProgram","programName","home","toLowerCase","setMoney","gainMoney","plus","loseMoney","eq","minus","cost","gte","recordMoneySource","amt","source","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","cancelationPenalty","backdoorInstalled","work","overMax","comp","Companies","influenceStockThroughCompanyWork","finishWork","cancelled","sing","playerReputation","content","reputation","startWorkPartTime","workPartTime","finishWorkPartTime","startFocusing","stopFocusing","startFactionWork","favorMult","startFactionHackWork","getIntelligenceBonus","startFactionFieldWork","getFactionFieldWorkRepGain","startFactionSecurityWork","getFactionSecurityWorkRepGain","getHackingWorkRepGain","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","createProgramWork","reqLvl","skillMult","finishCreateProgramWork","incompleteName","toString","startClass","costMult","expMult","gameCPS","hackExp","strExp","defExp","dexExp","agiExp","chaExp","getStudyMult","getTrainingMult","takeClass","finishClass","startCrime","workerscript","committingCrimeThruSingFn","singFnCrimeWorkerScript","finishCrime","determineCrimeSuccess","crime","Crimes","type","kills","ws","disableLogs","ALL","scriptRef","takeDamage","regenerateHp","getHospitalizationCost","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","Locations","canAccessResleeving","giveExploit","exploit","weight","calculateIntelligenceBonus","getCasinoWinnings","casino","getMult","setMult","EmployeePositions","Operations","Engineer","Business","Management","RandD","Unassigned","BaseServer","super","createRandomString","requiredHackingSkill","moneyAvailable","moneyMax","hackDifficulty","baseDifficulty","minDifficulty","serverGrowth","capDifficulty","changeMinimumSecurity","perc","changeMaximumMoney","fortify","Industries","Energy","Utilities","Agriculture","Fishing","Mining","Food","Tobacco","Chemical","Pharmaceutical","Computer","Robotics","Software","Healthcare","RealEstate","IndustryStartingCosts","IndustryDescriptions","corp","IndustryResearchTrees","getBaseResearchTreeCopy","getProductIndustryResearchTreeCopy","resetIndustryResearchTrees","LocationType","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","hasHacknetServers","purchaseHacknet","numOwned","getCostOfNextHacknetServer","createHacknetServer","updateHashManagerCapacity","getCostOfNextHacknetNode","node","HacknetNode","hasMaxNumberHacknetServers","calculateNodeCost","calculateServerCost","getMaxNumberLevelUpgrades","nodeObj","maxLevel","lt","calculateLevelUpgradeCost","levelsToMax","gt","getMaxNumberRamUpgrades","calculateRamUpgradeCost","log2","getMaxNumberCoreUpgrades","calculateCoreUpgradeCost","getMaxNumberCacheUpgrades","calculateCacheUpgradeCost","cache","purchaseLevelUpgrade","levels","sanitizedLevels","isServer","purchaseRamUpgrade","purchaseCoreUpgrade","purchaseCacheUpgrade","processHacknetEarnings","HashManager","hashes","updateHashRate","h","process","storeHashes","processAllHacknetServerEarnings","total","processSingleHacknetNodeEarnings","processAllHacknetNodeEarnings","totalEarnings","nodes","updateCapacity","hashCapacity","purchaseHashUpgrade","upgName","upgTarget","upgrade","upg","HashUpgrades","refundUpgrade","target","e","division","sciResearch","qty","changeRank","skillPoints","generateRandomContract","initCompanies","oldCompanies","companiesMetadata","forEach","loadCompanies","Array","updateSourceFileFlags","sf","lvl","PositionTypes","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","buy","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","CancelExportMaterial","LimitProductProduction","prdman","SetMaterialMarketTA1","on","marketTa1","SetMaterialMarketTA2","marketTa2","SetProductMarketTA1","SetProductMarketTA2","programsMetadata","Program","SleeveTaskType","AllGangs","power","territory","Tetrads","NiteSec","loadAllGangs","Shoplift","Crime","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","companyPositionMetadata","CompanyPosition","updateHashCapacity","seconds","onlineTimeSeconds","hashRate","totalHashesGenerated","prodMult","runScript","script","calculateHashGainRate","ramUsed","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","StockMarket","Orders","storedCycles","ticksUntilCycle","SymbolToStockMap","stock","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","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","isScriptFilename","Reputation","TheDarkArmyServer","DaedalusServer","WorldDaemon","DarkWeb","MoneyRate","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","removeLeadingSlash","removeTrailingSlash","isValidFilename","match","isValidDirectoryPath","path","t_path","dirs","dir","isValidFilePath","fnSeparator","lastIndexOf","getFirstParentDirectory","getAllParentDirectories","lastSlash","isInRootDirectory","evaluateDirectoryPath","currPath","reconstructedPath","pop","evaluateFilePath","margin","spacing","code","page","toActiveScripts","toAugmentations","toBitVerse","toBladeburner","toStats","toCity","toCorporation","toCreateProgram","toDevMenu","toFaction","toFactions","toGameOptions","toGang","toHacknetNodes","toInfiltration","toJob","toMilestones","toResleeves","toScriptEditor","toSleeves","toStockMarket","toTerminal","toTravel","toTutorial","toBladeburnerCinematic","toLocation","GameRoot","engine","terminal","setPage","useState","Work","Terminal","determineStartPage","setRerender","setFaction","flume","setFlume","quick","setQuick","setLocation","Infiltration","Location","Job","cinematicText","setCinematicText","rerender","old","useEffect","subscribe","ActiveScripts","Bladeburner","Stats","CreateProgram","DevMenu","Options","Gang","Hacknet","Milestones","Resleeves","ScriptEditor","Sleeves","Tutorial","City","Travel","BitVerse","BladeburnerCinematic","scrollTo","Provider","save","saveObject","saveGame","enter","enterBitNode","flexDirection","flexGrow","px","height","workerScripts","buyStockLong","buyStockShort","eventEmitterForReset","sellStockLong","sellStockShort","export","exportGame","forceKill","exportGameFn","onExport","installAugmentationsFn","numCycleForGrowth","growth","ajdGrowthRate","serverGrowthPercentage","coreBonus","processSingleServerGrowth","threads","calculateServerGrowth","oldMoneyAvailable","isValidNumber","usedCycles","ceil","prestigeHomeComputer","homeComp","hasBitflume","BitFlume","scripts","updateRamUsage","getServerOnNetwork","isBackdoorInstalled","StatsTable","rows","title","wide","MuiTable","map","row","elem","align","noWrap","TTerminal","count","getActionTimePenalty","getChaosCompetencePenalty","getChaosDifficultyBonus","inviteToFaction","InvitationEvent","factionInfo","enemies","enemy","hasAugmentationPrereqs","hasPrereqs","prereqAug","augmentationPriceMult","queuedAugmentation","getNextNeurofluxLevel","nextLevel","currLevel","processPassiveFactionRepGain","offersWork","getGangName","hRep","sRep","fRep","rate","String","MoneyCost","uuidv4","uuid","subscribers","sub","Message","msg","recvd","SkillNames","BladesIntuition","Cloak","Marksman","WeaponProficiency","ShortCircuit","DigitalObserver","Tracer","Overclock","Reaper","EvasiveSystem","Datamancer","CybersEdge","HandsOfMidas","Hyperdrive","useGang","killWorkerScript","rerenderUi","WorkerScript","stopAndCleanUpWorkerScript","RunningScript","killWorkerScriptByPid","pid","compareArrays","env","stopFlag","delay","clearTimeout","delayResolve","killNetscriptDelay","runningScript","rs","ramUsage","delete","WorkerScriptStartStopEventEmitter","removeWorkerScript","defaultConstructorParams","initPrice","marketCap","spreadPerc","range","divisor","lastPrice","playerShares","playerAvgPx","playerShortShares","playerAvgShortPx","otlkMagForecast","getAbsoluteForecast","totalSharesUnrounded","totalShares","maxShares","changeForecastForecast","newff","newPrice","changeAmt","increaseChance","getForecastIncreaseChance","getAskPrice","getBidPrice","influenceForecast","change","influenceForecastForecast","Adjuster","setValue","label","placeholder","add","subtract","tons","onChange","InputProps","startAdornment","onClick","style","transform","endAdornment","Aliases","GlobalAliases","loadAliases","loadGlobalAliases","printAliases","parseAliasDeclaration","dec","global","matches","trim","addGlobalAlias","addAlias","getGlobalAlias","removeAlias","substituteAliases","origCommand","commandArray","somethingSubstituted","depth","alias","netscriptDelay","setTimeout","makeRuntimeRejectMsg","resolveNetscriptRequestedThreads","functionName","requestedThreads","requestedThreadsAsInt","isScriptErrorMessage","Literature","CopyableText","setOpen","variant","copyText","document","createElement","body","appendChild","select","setSelectionRange","execCommand","removeChild","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","UpgradeType","gangMemberUpgradesMetadata","def","upgType","Weapon","dex","agi","Armor","Vehicle","Rootkit","MaterialSizes","Water","Plants","Metal","Hardware","Chemicals","Drugs","Robots","AICores","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","processNetscript1Imports","interpreterInitialization","scope","NetscriptFunctions","entry","tempWrapper","fnArgs","pseudoToNative","cb","then","catch","setProperty","createAsyncFunction","createNativeFunction","nativeToPseudo","interpreter","Interpreter","reject","runInterpreter","errorMessage","startWorkerScript","parent","createAndAddWorkerScript","roundToTwo","getRamUsageFromRunningScript","arrayToString","generateNextPid","set","runningFn","wrap","propName","finally","vars","executeJSScript","message","stack","startNetscript2Script","w","onlineExpGained","onlineMoneyMade","errorTextArray","errorMsg","updateOnlineScriptTimes","onlineRunningTime","loadAllRunningScripts","skipScriptLoad","href","indexOf","markUpdated","scriptCalculateOfflineProduction","runScriptFromScript","caller","scriptname","isArray","ramAvailable","hasAdminRights","FactionWorkType","createProgressBarText","derived","progress","totalTicks","bars","dashes","Material","getMarkupLimit","qlt","mku","dmd","dmdR","cmp","cmpR","processMarket","priceChange","compChange","dmdChange","copy","sll","prd","imp","totalExp","marketTa2Price","gainFavor","rolloverRep","getFavorGain","totalRep","favorToRep","newFavor","repToFavor","newRep","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","Map","win","reachedLimit","reached","Game","getBuyTransactionCost","posType","getSellTransactionGain","processTransactionForecastMovement","firstShares","remainingShares","numIterations","forecastChange","forecastForecastChange","calculateBuyMaxAmount","isLong","remainingMoney","currPrice","GangMemberUpgrades","GangMemberUpgrade","commit","div","successRate","createTaskTracker","Person","calculateStat","getFactionHackingWorkRepGain","updateStatLevels","BitNode","number","BitNodes","initBitNodeMultipliers","sf12Lvl","inc","ActionIdentifier","general","contracts","ops","blackops","events","updateSkillMultipliers","calculateMaxStamina","stamina","maxStamina","getCurrentCity","calculateStaminaPenalty","actionId","actionTimeCurrent","actionTimeToComplete","getActionObject","resetAction","exceptionAlert","commsEst","getRecruitmentTime","skill","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","Skills","multKeys","skillMultipliers","Skill","currentLevel","pointCost","calculateCost","executeLogConsoleCommand","flag","logging","executeHelpConsoleCommand","line","ConsoleHelpText","helpList","helpText","executeAutomateConsoleCommand","variable","highLow","automateActionHigh","automateActionLow","automateThreshHigh","automateThreshLow","automateEnabled","parseCommandArguments","command","start","endQuote","substr","triggerMigration","sourceCityName","destCityName","destCity","sourceCity","rand","percentage","comms","triggerPotentialMigration","randomEvent","chaos","gainActionStats","success","successMult","unweightedGain","unweightedIntGain","weights","intExp","getDiplomacyEffectiveness","getRecruitmentSuccessChance","teamSize","effCharisma","effCha","charismaFactor","resetSkillMultipliers","successChanceAll","successChanceStealth","successChanceKill","successChanceContract","successChanceOperation","successChanceEstimate","actionTime","effHack","effStr","effDef","effDex","effAgi","effInt","multiplierNames","multiplierName","getMultiplier","multiplierValue","completeOperation","teamCount","losses","teamLost","improvePopulationEstimateByPercentage","improveCommunityEstimate","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","maxRank","favorBonus","rankNeededForSp","totalSkillPoints","gainedSkillPoints","processAction","actionTimeOverflow","calculateStaminaGainPerSecond","effAgility","maxStaminaBonus","oldMax","difficultyFac","decays","isStealth","isKill","reqdRank","redPillFlag","contract","growthF","Growths","op","randomEventCounter","getTypeAndNameFromActionId","types","getContractNamesNetscriptFn","getOperationNamesNetscriptFn","getBlackOpNamesNetscriptFn","getGeneralActionNamesNetscriptFn","getSkillNamesNetscriptFn","startActionNetscriptFn","errorLogText","nm","getActionTimeNetscriptFn","actionObj","getActionEstimatedSuccessChanceNetscriptFn","getEstSuccessChance","recChance","getActionCountRemainingNetscriptFn","getSkillLevelNetscriptFn","getSkillUpgradeCostNetscriptFn","upgradeSkillNetscriptFn","maxLvl","getTeamSizeNetscriptFn","setTeamSizeNetscriptFn","sanitizedSize","joinBladeburnerFactionNetscriptFn","DefaultConstructorParams","companyPositions","isPlayerEmployed","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","startingLevel","extraLevels","totalMultiplier","startingRam","numUpgrades","currentRam","startingCores","currentCores","startingCache","currentCache","opts","suppressDialog","totalPrice","origTotal","newTotal","rerenderFn","resultTxt","gains","netProfit","origCost","profit","costInc","Hashes","Exploit","names","Bypass","EditSaveFile","PrototypeTampering","TimeCompression","Unclickable","UndocumentedFunctionCall","ExploitName","Suit","Card","suit","formatValue","isRedSuit","Hearts","Diamonds","getStringRepresentation","constructLocation","asciiArt","LocationsMetadata","addLocation","getArrow","keyCode","setRedPillFlag","destroyedBitNode","newBitNode","bitNodeNumber","sourceFileKey","sourceFile","alreadyOwned","ownedSourceFile","playerSrcFile","PlayerOwnedSourceFile","giveSourceFile","timePassed","confidence","dataMap","serv","timesGrown","host","cpuCores","offlineRunningTime","offlineExpGained","timesWeakened","findRunningScript","findRunningScriptByPid","TextFile","append","download","file","Blob","navigator","msSaveOrOpenBlob","url","URL","createObjectURL","click","revokeObjectURL","show","getTextFile","textFiles","createTextFile","fileName","lineNumber","sendMessage","forced","showMessage","serverHostname","other","addMessageToServer","checkForMessagesToSend","jumper0","Messages","MessageFilenames","Jumper0","jumper1","Jumper1","jumper2","Jumper2","jumper3","Jumper3","jumper4","Jumper4","cybersecTest","CyberSecTest","nitesecTest","NiteSecTest","bitrunnersTest","BitRunnersTest","redpill","redpillOwned","flightName","Flight","AddToAllMessages","loadMessages","initMessages","calculateMoneyGainRate","startingCore","sanitizedCores","coreBaseCost","calculateExp","actionName","Action","SourceFile","bitnodeKey","bitnode","LogBoxEvents","LogBoxManager","setLogs","LogWindow","close","overflowY","overflowX","container","useRef","handle","flexFlow","left","top","zIndex","ref","cursor","right","overflowWrap","whiteSpace","bottom","updateMoneyGainRate","moneyGainRatePerSecond","totalMoneyGenerated","HashUpgradesMetadata","HashUpgrade","vals","getStockMarket4SDataCost","getStockMarket4STixApiCost","ApplyToJobButton","getJobRequirementTooltip","DarkWebItems","DarkWebItem","HTTPWormProgram","SQLInjectProgram","DeepscanV2","AutolinkProgram","ServerProfilerProgram","ServerProfiler","midpoint","RamCalculationErrorCode","nsFuncsGenerator","sanitizedPid","found","Environment","getScriptOnServer","shouldLog","func","GangConstants","GangRespectToReputationRatio","MaximumGangMembers","CyclesPerTerritoryAndPowerUpdate","AscensionMultiplierRatio","Names","getRandomByte","researchMetadata","Favor","ThemeEvents","refreshTheme","createTheme","light","typography","fontFamily","button","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","MuiTab","textColorPrimary","TTheme","injectFirst","sum","EPSILON","decay","inst","getSuccessChance","baseTime","skillFac","effDexterity","statFac","getTeamSuccessBonus","getActionTypeSkillSuccessBonus","est","popEst","clamp","real","low","high","competence","stat","playerStatLvl","effMultiplier","getSuccessesNeededForNextLevel","baseSuccessesPerLevel","BitburnerSaveObject","getSaveString","PlayerSave","AllServersSave","CompaniesSave","FactionsSave","AliasesSave","GlobalAliasesSave","MessagesSave","StockMarketSave","SettingsSave","VersionSave","LastExportBonus","ExportBonus","AllGangsSave","btoa","unescape","encodeURIComponent","GameSavedEvents","epochTime","now","bn","loadGame","decodeURIComponent","escape","atob","saveObj","ver","anyPlayer","positionName","evaluateVersionCompatibility","createNewUpdateText","None","crimeKey","currentTask","finishTask","resetTaskStatus","gainRatesForTask","currentTaskLocation","currentTaskMaxTime","retValue","currentTaskTime","successGainRates","keysForIteration","gainExperience","fromOtherSleeve","multFac","pHackExp","pStrExp","pDefExp","pDexExp","pAgiExp","pChaExp","earningsForPlayer","earningsForTask","earningsForSleeves","task","getMemoryUpgradeCost","memory","currCost","currMemory","getRepGain","Hacking","Field","Security","installAugmentation","cyclesUsed","Class","Gym","updateTaskGainRates","Recovery","Synchro","gymStatType","takeUniversityCourse","universityName","AevumSummitUniversity","Sector12RothmanUniversity","VolhavenZBInstituteOfTechnology","newCity","tryBuyAugmentation","some","AevumCrushFitnessGym","AevumSnapFitnessGym","Sector12IronGym","Sector12PowerhouseGym","VolhavenMilleniumFitnessGym","baseGymExp","totalExpMultiplier","sanitizedStat","totalExpMult","upgradeMemory","sanitizedWorkType","offerHackingWork","offerFieldWork","offerSecurityWork","workoutAtGym","gymName","Output","Link","TTimer","timeLeft","TerminalEvents","TerminalClearEvents","program","orderType","refs","orderBook","executeOrder","isBuy","CorporationState","numUnlockUpgrades","CorporationUnlockUpgrades","CorporationUpgrades","fill","upgradeMultipliers","addFunds","isFinite","getState","state","marketCycles","gameCycles","shareSaleCooldown","issueNewSharesCooldown","cycleProfit","times","totalDividends","retainedEarnings","dividendsPerShare","numShares","dividendTaxPercentage","updateSharePrice","nextState","determineValuation","public","getTargetSharePrice","targetPrice","sharePrice","immediatelyUpdateSharePrice","calculateShareSale","sharesTracker","sharesUntilUpdate","shareSalesUntilPriceUpdate","sharesSold","maxIterations","convertCooldownToString","cd","upgN","basePrice","upgradeAmt","getProductionMultiplier","getDreamSenseGain","getAdvertisingMultiplier","getEmployeeCreMultiplier","getEmployeeChaMultiplier","getEmployeeIntMultiplier","getEmployeeEffMultiplier","getSalesMultiplier","getScientificResearchMultiplier","getStarterGuide","hasHandbook","handbookFn","showLiterature","maintainMembership","keep","finishAction","resetPidCounter","setMaxRam","BadRNG","totalPlaytime","s1","s2","s3","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","mx","globalModuleSequenceNumber","Script","otherScripts","moduleSequenceNumber","saveScript","calculateRamUsage","getUpgrade","getUpgradeCost","getCost","capacity","newCap","problemType","getRandomProblemType","getRandomReward","randServer","getRandomServer","contractFn","getRandomFilename","addContract","generateRandomContractOnHome","generateContract","problemTypes","rewardType","factionsThatAllowHacking","sanitizeRewardType","numFactions","randFaction","allJobs","randIndex","atCapacity","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","minEne","minHap","canGetBonus","setLastExportBonus","unixTime","sanitizedSource","formattedHours","getHours","formattedMinutes","getMinutes","getMonth","getDate","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","awareness","popularity","reqMat","ProductRatingWeights","rat","Quality","Performance","Durability","Reliability","Aesthetics","Features","getDB","indexedDB","indexedDbRequest","onupgradeneeded","createObjectStore","onerror","ev","onsuccess","db","transaction","objectStore","async","request","put","deleteGame","locations","Option","my","buttonText","infoText","TickerDisplayMode","DisplayModeButton","tickerDisplayMode","Portfolio","changeDisplayMode","StockTickersConfig","changeWatchlistFilter","canAccessGang","getGangFaction","hasGangWith","startGang","hacking","currentCity","onTravel","lineHeight","WorldMap","SuccessChance","estimatedSuccessChance","StaticModal","findCrime","roughName","ReputationRate","MaxSleevesFromCovenant","BaseCostPerSleeve","hasTorRouter","decimal","checkIfConnectedToDarkweb","listAllDarkwebItems","buyDarkwebItem","itemName","pidCounter","tempCounter","has","MAX_SAFE_INTEGER","defaultInterpreter","toNative","pseudoObj","nativeObj","class","getProperty","hasProperty","properties","updateDynamicRam","ramCost","dynamicLoadedFns","dynamicRamUsage","safeGetServer","callingFnName","makeRuntimeErrorMsg","scriptArgs","getRunningScriptByPid","getCannotFindRunningScriptErrorMessage","checkTixApiAccess","callingFn","getStockFromSymbol","failOnHacknetServer","errstack","userstack","stackline","dependency","dependencies","parseChromeStackline","lineMatch","funcMatch","chromeCall","parseFirefoxStackline","lio","firefoxCall","rejectMsg","checkFormulasAccess","extra","checkSingularityAccess","checkBladeburnerAccess","skipjoined","checkBladeburnerCity","getCodingContract","getContract","getBladeburnerActionObject","getCompany","getFaction","getAugmentation","getDivision","find","getOffice","getWarehouse","getMaterial","materialName","getProduct","getEmployee","employeeName","runAfterReset","cbScript","manual","hackingTime","canHack","netscriptCanHack","expGainedOnSuccess","expGainedOnFailure","percentHacked","maxThreadNeeded","moneyDrained","influenceStockThroughServerHack","argsToString","arg","helper","string","funcName","argName","boolean","NetscriptGang","NetscriptSleeve","NetscriptExtra","functions","NetscriptHacknet","hostnames","hackAmount","netscriptCanGrow","growTime","moneyBefore","moneyAfter","logGrowPercent","influenceStockThroughServerGrow","netscriptCanWeaken","weakenTime","tprintf","possibleLogs","tail","arguments","openPortCount","sshPortOpen","ftpPortOpen","smtpPortOpen","httpPortOpen","sqlPortOpen","scriptServer","spawnDelay","killByPid","scriptsRunning","ip1","ip2","destServer","currServ","txtFile","newFile","sourceScript","oldScript","newScript","grep","allFiles","processes","speed","production","purchaseCost","coreCost","levelCost","sanitizedPosType","orderPos","ltype","lpos","stockMarketOrders","forecast","hostnameStr","port","iport","status","removeFile","suc","offlineMoneyMade","tFormat","milliseconds","milliPrecision","PromptEvent","$","writeToScriptFile","writeToTextFile","overwritten","fail","cityname","darkweb","setcwd","baseserver","installTime","jobTitles","maxHp","agilityExp","companyRep","crimeMoney","crimeSuccess","defenseExp","dexterityExp","factionRep","hackingExp","strengthExp","workMoney","tor","workHackExpGain","workStrExpGain","workDefExpGain","workDexExpGain","workAgiExpGain","workChaExpGain","workRepGain","workMoneyGain","charismaExp","field","hackAvailable","fdWkAvailable","scWkAvailable","repNeededToDonate","crimeRoughName","Slums","purchased","facname","augs","expandIndustry","industryName","expandCity","unlockUpgrade","upgradeName","levelUpgrade","issueDividends","sellMaterial","sellProduct","discontinueProduct","setSmartSupply","enabled","buyMaterial","assignJob","hireEmployee","upgradeOfficeSize","purchaseWarehouse","upgradeWarehouse","buyCoffee","hireAdVert","makeProduct","exportMaterial","sourceDivision","targetDivision","targetCity","cancelExportMaterial","setMaterialMarketTA1","setMaterialMarketTA2","setProductMarketTA1","setProductMarketTA2","returnReward","is2DArray","answerComponents","creward","removeContract","tries","formulas","basic","hackPercent","growPercent","hackTime","moneyGainRate","levelUpgradeCost","ramUpgradeCost","coreUpgradeCost","extraCores","hacknetNodeCost","constants","hacknetServers","hashGainRate","HScalculateHashGainRate","HScalculateLevelUpgradeCost","HScalculateRamUpgradeCost","HScalculateCoreUpgradeCost","cacheUpgradeCost","extraCache","HScalculateCacheUpgradeCost","hashUpgradeCost","hacknetServerCost","HScalculateServerCost","flags","Boolean","numDashes","ret","libarg","argv","fromEntries","getFunctionNames","functionNames","entries","moneyHacked","orgName","percTotalMoneyHacked","moneyGrown","percTotalMoneyGrown","performanceMult","cyclesOfWork","compName","tooltiptext","reqRep","CinematicText","setI","done","setDone","lines","onDone","newI","auto","members","wanted","respect","isHackingGang","respectGainRate","wantedGainRate","storedTerritoryAndPowerCycles","territoryClashChance","territoryWarfareEngaged","notifyMemberDeath","getPower","getTerritory","cycles","processGains","processExperienceGains","processTerritoryAndPowerGains","moneyGains","respectGains","wantedLevelGains","justice","calculateRespectGain","calculateMoneyGain","calculateWantedLevelGain","baseWanted","recordEarnedRespect","oldWanted","newWanted","gangName","calculatePower","gainRoll","multiplicativeGain","additiveGain","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","initValue","baseCheck","initialCheck","Hand","cards","addCards","removeByIndex","StockTickerTxButton","contractName","CodingContractModal","setProps","setAnswer","contractType","autoFocus","preventDefault","specialReferenceIF","specialReferenceFOR","specialReferenceWHILE","memCheckGlobalKey","parseOnlyRamCalculate","dependencyMap","completedParses","Set","parseQueue","parseCode","moduleName","parseOnlyCalculateDeps","additionalModules","initialModule","nextModule","URLImportError","ImportError","unresolvedRefs","resolvedRefs","prefix","ident","k","dep","applyFuncRam","loadedFns","SyntaxError","currentModule","globalKey","internalToExternal","addRef","external","objectPrototypeProperties","getOwnPropertyNames","commonVisitors","Identifier","st","WhileStatement","walkDeeper","test","DoWhileStatement","ForStatement","update","IfStatement","consequent","alternate","MemberExpression","walk","importModuleName","spec","imported","codeCopy","BitFlumeEvent","BitFlumeModal","litObj","Literatures","FactionInfo","offerHackingMission","augmentationRepRequirementMult","Illuminati","Daedalus","ECorp","MegaCorp","NWO","BitRunners","Silhouette","Netburners","CyberSec","Bladeburners","InvitationModal","findIndex","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","arrayNativeToPseudo","descriptor","preventExtensions","getOwnPropertyDescriptor","setter","hasValue","pseudoDescriptor","propertyIsEnumerable","newArray","first","legalArrayLength","RANGE_ERROR","unshift","reverse","howmany","opt_begin","opt_end","opt_separator","iLength","element","isa","jLength","searchElement","opt_fromIndex","STRING","fromCharCode","compareString","locales","options","localeCompare","separator","limit","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","child","legalArrayIndex","Value","strs","pseudoRegexp","nativeRegexp","ignoreCase","multiline","createFunction","opt_constructor","illegalConstructor","asyncFunc","pseudoDate","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","Snackbar","anchorOrigin","vertical","horizontal","autoHideDuration","getAvailableCreatePrograms","AugmentationAccordion","displayName","component","Paper","unmountOnExit","stealthIcon","xmlns","viewBox","killIcon","ActionLevel","isActive","canIncrease","canDecrease","Autolevel","checked","TeamSizeButton","baseRespect","baseMoney","hackWeight","strWeight","defWeight","dexWeight","agiWeight","chaWeight","BlinkingCursor","setOn","purchaseResleeve","augKey","generateResleeves","Resleeve","baseNumAugs","numAugs","augKeys","randKey","randAug","findSleevePurchasableAugs","ownedAugNames","availableAugs","isAvailableForSleeve","HashRate","TravelAgencyRoot","destination","setDestination","startTravel","Fragment","symbolsLoaded","symbols","SetupTextEditor","populate","exclude","lastFilename","lastCode","lastPosition","Root","editorRef","setFilename","setCode","setRAM","optionsOpen","setOptionsOpen","setOptions","insertSpaces","current","getPosition","CursorPositions","saveCursor","column","textFile","updateRAM","maybeSave","ctrlKey","metaKey","tabIndex","beforeMount","monaco","languages","registerCompletionItemProvider","provideCompletionItems","suggestions","kind","CompletionItemKind","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","typescript","javascriptDefaults","addExtraLib","libSource","typescriptDefaults","onMount","editor","getCursor","setPosition","loading","defaultLanguage","defaultValue","newCode","pretty","beautifyCode","indent_with_tabs","indent_size","brace_style","TablePaginationActionsAll","useTheme","rowsPerPage","onPageChange","flexShrink","ml","aria-label","direction","fma","ex","canAccessBladeburner","inBladeburner","startBladeburner","automate","cls","help","stop","createTreantMarkup","childrenArray","htmlClass","HTMLclass","innerHTML","findNode","setParent","chart","nodeStructure","queue","getMultiplierHelper","getProductProductionMultiplier","canAccessCorporation","hasCorporation","startCorporation","corpName","additionalShares","currPos","nextPosName","Engine","_lastUpdate","updateGame","expForOtherSleeves","decrementAllCounters","checkCounters","Counters","autoSaveCounter","updateSkillLevelsCounter","updateDisplays","updateDisplaysLong","updateActiveScriptsDisplay","createProgramNotifications","augmentationsNotifications","passiveFactionGrowth","mechanicProcess","contractGeneration","counterName","counter","adjustedCycles","startExploits","timeOffline","numCyclesOffline","offlineReputation","offlineHackingIncome","offlineProductionFromHacknetNodes","hacknetProdInfo","timeOfflineString","_thisUpdate","requestAnimationFrame","LoadingScreen","setShow","loaded","setLoaded","reason","doLoad","minHeight","Tracking","Retirement","Investigation","Raid","typ","invalidArgs","Void","infiltrationData","techVendorMaxRam","techVendorMinRam","ServerType","All","Foreign","Owned","Purchased","ServerDropdown","isValidServer","serverType","GenericLocation","locContent","locName","Hospital","Special","TechVendor","University","Casino","getLocationSpecificContent","card","textAlign","fontWeight","red","ReactCard","hidden","Clubs","Spades","positions","allFactionAugs","factionAugs","factionAug","repFromDonation","TickerHeaderFormatData","longestName","longestSymbol","isNumber","ParseCommands","allCommands","flat","ParseCommand","inQuote","prevChar","escaped","TerminalHelpText","HelpTexts","analyze","backdoor","cat","check","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","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","specialName","AevumGalacticCybersystems","Sector12DeltaOne","AevumPolice","NewTokyoNoodleBar","Sector12JoesGuns","ipaddress","byteRange","generalMethods","augmentationMethods","bladeburnerMethods","corporationMethods","gangMethods","serverMethods","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","reFac","robFac","aiFac","advFac","prodMats","hwFac","makesProducts","getProductDescriptionText","getMaximumNumberProducts","additional","hasMaximumNumberProducts","calculateProductionFactors","multSum","cityMult","updateWarehouseSizeUsed","prodName","dividedBy","newInd","employeeSalary","officeLoc","processMaterialMarket","processProductMarket","popularityGain","awarenessGain","processMaterials","processProducts","wh","foo","buyAmt","maxAmt","smartBuy","smartSupplyStore","worseAmt","totalSize","freeSpace","maxProd","getOfficeProductivity","totalMatSize","tmp","reqMatName","normQty","producableFrac","reqMatQtyNeeded","fooProd","fooI","businessFactor","getBusinessFactor","advertisingFactor","getAdvertisingFactors","marketFactor","getMarketFactor","markupLimit","numerator","sqrtNumerator","sqrtDenominator","denominator","sqrt","optimalPrice","maxSell","sellAmt","expI","amtStr","expIndustry","expWarehouse","engrProd","mgmtProd","opProd","mgmtFactor","processProduct","totalProfit","forProduct","netStorageSize","pCost","sCostString","businessProd","calculateEffectWithFactors","awarenessFac","popularityFac","ratioFac","updateResearchTree","expFac","linearFac","morale","happiness","energy","det","cyclesUntilRaise","trainingEff","effCre","effEff","prodBase","pro","maxClearanceLevel","startingSecurityLevel","AevumCasino","Sector12CityHall","WorldStockExchange","ChongqingChurchOfTheMachineGod","textfield","InteractiveTutorialRoot","contents","canNext","square","nobackground","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","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","dense","Improvements","MultiplierTable","PlayerMultipliers","augP","calculateAugmentedStats","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","TimeSkip","timeskip","reload","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","territoryMult","territoryStr","BonusTime","CyclerPerSecond","bonusMillis","GangMemberList","onRecruit","GangMemberAccordion","GangMemberAccordionContent","onAscend","onTaskChange","GangMemberStats","ascendOpen","setAscendOpen","asc","calculateAscensionMult","hack_asc_points","str_asc_points","def_asc_points","dex_asc_points","agi_asc_points","cha_asc_points","hack_mult","str_mult","def_mult","dex_mult","agi_mult","cha_mult","hack_exp","str_exp","def_exp","dex_exp","agi_exp","cha_exp","canAscend","AscensionModal","preAscend","getCurrentAscensionMults","postAscend","getAscensionMultsAfterAscend","TaskSelector","setCurrentTask","tasks","assignToTask","TaskDescription","RecruitButton","RecruitModal","setName","recruit","onKeyUp","TerritorySubpage","gangNames","g","control","formatTerritory","OtherGangTerritory","playerPower","clashVictoryChance","NextReveal","PurchasedUpgrade","UpgradeButton","buyUpgrade","GangMemberUpgradePanel","filterUpgrades","weaponUpgrades","armorUpgrades","vehicleUpgrades","rootkitUpgrades","augUpgrades","flexWrap","EquipmentsSubpage","createDescription","CorporationRoot","setDivisionName","canExpand","industryType","MainPanel","CityTabs","setCity","cityStateSetter","countEmployee","SwitchButton","manualMode","switchMode","ManualManagement","setEmployee","employeePositionSelectorInitialValue","employeePositions","positionNames","nf","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","MakeProductButton","makeOpen","setMakeOpen","hasMaxProducts","createProductButtonText","Text","researchOpen","setResearchOpen","advertisingInfo","advertisingFactors","totalAdvertisingFac","convertEffectFacToGraphic","Upgrades","IndustryOverview","MakeProductModal","allCities","design","setDesign","marketing","setMarketing","createProductPopupText","tpe","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","raw","tex","ExpandNewCity","ExpandIndustryTab","possibleIndustries","newIndustry","multRows","appendMult","issuedShares","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","playerEarnings","storedTime","LevelableUpgrade","UU","BribeFactionModal","setStock","selectedFaction","setSelectedFaction","getRepText","bribe","SellSharesModal","setShares","sell","stockSaleResults","newSharePrice","newSharesUntilUpdate","BuybackSharesModal","buybackPrice","IssueDividendsModal","setPercent","canIssue","EffectText","maxNewSharesUnrounded","maxNewShares","newShares","IssueNewSharesModal","issueNewShares","privateShares","FindInvestorsModal","percShares","roundMultiplier","funding","investShares","GoPublicModal","initialSharePrice","goPublic","InfiltrationRoot","setStart","startingDifficulty","totalStats","calcDifficulty","StartingDifficulty","Difficulty","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","setX","difficulties","timer","setRight","generateLeftSide","char","shiftKey","getChar","guarding","setGuarding","words","makeAnswer","guess","setGuess","nextGuess","choices","positive","option","negative","array","shuffleArray","makeChoices","setIndex","newIndex","arrows","generateCode","puzzle","randChar","generatePuzzle","generateAnswer","setPos","cell","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","Strength","Defense","Dexterity","Agility","Charisma","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","suppressHospitalizationPopup","setSuppressHospitalizationPopup","suppressBladeburnerPopup","setSuppressBladeburnerPopup","disableHotkeys","setDisableHotkeys","disableASCIIArt","setDisableASCIIArt","disableTextEffects","setDisableTextEffects","enableBashHotkeys","setEnableBashHotkeys","enableTimestamps","setEnableTimestamps","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","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","totalProduction","purchaseMultiplierOnClicks","multiplier","onClicks","GeneralInfo","HacknetNodeElem","purchaseMult","upgradeLevelContent","upgradeRamContent","upgradeCoresContent","upgradeLevelCost","upgradeRamCost","upgradeCoreCost","HacknetServerElem","upgradeCacheContent","upgradeCacheCost","HashUpgradeModal","HacknetUpgradeElem","selectedServer","setSelectedServer","effect","canPurchase","MultiplierButton","MultiplierButtons","buttons","btnProps","PlayerInfo","hasServers","PurchaseButton","CompanyLocation","quitOpen","setQuitOpen","jobTitle","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","renderBladeburner","renderCotMG","CreateCorporationModal","canSelfFund","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","isPlayerWinResult","betInput","wager","wagerInvalid","wagerInvalidHelperText","startGame","Deck","playerHandValues","getHandDisplayValues","dealerHandValues","wagerOnChange","helperText","playerHit","playerStay","startOnClick","elevation","numDecks","shuffle","drawCard","isEmpty","CoinFlip","investment","setInvestment","setResult","setStatus","playLock","setPlayLock","play","letter","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","CorruptableText","setContent","randFrom","randomize","LocationLetter","ASCIICity","locationLettersRegex","letterMap","lineElems","elems","startI","endI","locationI","ListCity","locationButtons","LocationCity","ProgramsRoot","OptionsModal","setTheme","setInsertSpaces","setFontSize","MilestonesRoot","milestones","highestMilestone","milestone","ActionTimer","paragraph","TerminalRoot","setKey","doScroll","hook","scrollIntoView","debounce","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","addAllMessages","t_dir","processFile","subdir","remaining","allPossibilities","oldValue","longestStartSubstr","TutorialRoot","ActiveScriptsRoot","ScriptProduction","prodRateSinceLastAug","ServerAccordions","setFilter","setRowsPerPage","serverToScriptMap","filtered","rowsPerPageOptions","newPage","onRowsPerPageChange","ActionsComponent","paddedName","barOptions","headerTxt","ServerAccordionContent","disablePadding","noborder","WorkerScriptAccordion","killScript","onlineMps","onlineEps","FactionsRoot","openFaction","acceptInvitation","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","placement","PurchaseAugmentationModal","DonateOption","donateAmt","setDonateAmt","noformat","Info","CreateGangModal","CovenantPurchasesRoot","setUpdate","purchaseDisabled","upgradePanels","CovenantSleeveMemoryUpgrade","getPurchaseCost","maxMemory","purchaseBtnDisabled","purchaseBtnContent","LastEmployer","LastJob","Employers","Intelligence","bn5Stat","BladeburnerMults","CurrentBitNode","MoneyModal","convertMoneySourceTrackerToString","parts","hacknetnode","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","place","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","cellNone","CharacterOverview","Element","getComputedStyle","visibility","checkGangApiAccess","getGangMember","wantedLevel","wantedLevelGainRate","cpy","hack_asc_mult","str_asc_mult","def_asc_mult","dex_asc_mult","agi_asc_mult","cha_asc_mult","recruited","memberName","getGangTask","equipName","equipment","engage","points","unassignFromTask","statWeight","respectMult","calc","difficultyPerCycles","getGainedAscensionPoints","getAscensionResults","applyUpgrade","respectToDeduct","checkSleeveAPIAccess","checkSleeveNumber","sleeveNumber","asleeveNumber","acrimeName","crimeName","auniversityName","aclassName","acityName","acompanyName","afactionName","aworkType","agymName","astat","sl","purchasableAugs","aaugName","bypass","doc","completely_unused_field","real_document","getHacknetNode","hi","maxNumNodes","hasUpgraded","timeOnline","getHashUpgradeLevel","makeScriptBlob","uurls","shouldCompile","_getScriptUrls","loadedModule","depScript","seen","urlStack","transformedCode","unmodified","suffix","importedScript","urls","ScriptUrl","full","empty","srcFile","sourceFileObject","incMult","decMult","normalServer","evaledDir","zip","JSZip","zipFn","generateAsync","FileSaver","saveAs","sanitizedExpr","used","avail","maxLength","usedPercent","numArgs","incorrectUsage","newPath","allPrograms","allScripts","allTextFiles","allContracts","allMessages","folders","handleFn","dest","parsedFn","firstParentDir","msgOrLit","postSegments","segments","filesPerRow","groups","numThreads","sourcePath","destPath","destFile","rsObj","delTarget","executableName","runContract","runProgram","commandArgs","runArgs","permissive","threadFlag","tailFlag","hasRoot","maxHostname","maxIP","tRes","sRes","candidates","args2","candidate","headers","currRunningScripts","numSpacesScript","spacesScript","numSpacesPid","spacesPid","numSpacesThread","spacesThread","tampering","last","minute","timeCompression","ReactDOM"],"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,IA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,YAExD90G,KAAKkuH,2BAA2BluH,KAAKusH,MAAO,UAAWL,GAEvDA,EAAU,SAAUyD,EAAeC,GACjC,OAAO5rE,MAAM9oD,UAAUw9D,YAAY/8D,MAAMqE,KAAKwvG,WAAYsF,YAE5D90G,KAAKkuH,2BAA2BluH,KAAKusH,MAAO,cAAeL,GAE3DA,EAAU,WAER,OADAloE,MAAM9oD,UAAUwxB,KAAKtxB,KAAK4E,KAAKwvG,YACxBxvG,MAETA,KAAKkuH,2BAA2BluH,KAAKusH,MAAO,OAAQL,GAEpDlsH,KAAKopH,WAAW9tH,KAGd,kDACA,8CACA,kCACA,oEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,+DACA,OACA,IACA,eACA,IACA,MAIA,mDACA,8CACA,+BACA,wFACA,wBACA,4BACA,gBACA,+DACA,kCACA,gBACA,kBACA,mDACA,IACA,IACA,cACA,IACA,MAKA,+BACA,mDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,iBACA,IACA,OACA,IACA,oBACA,KACA,sBACA,iBACA,MACA,IAKA,oCACA,wDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,YACA,IACA,OACA,IACA,aACA,KACA,sBACA,iBACA,MACA,IAIA,oDACA,8CACA,gCACA,kEACA,YACA,wBACA,4BACA,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,KAQJ60E,EAAYj1E,UAAUkwH,WAAa,SAAU/7C,GAC3C,IACI68C,EADAN,EAAkB5rH,KAGtBksH,EAAU,SAAU5uH,GAElB,OADAA,EAAQmlE,OAAOnlE,GACXsuH,EAAgBmB,iBAElB/sH,KAAKxF,KAAO8C,EACL0C,MAGA1C,GAGX0C,KAAK6vH,OAAS7vH,KAAKgwE,qBAAqBk8C,GAAS,GACjDlsH,KAAK8vE,YAAYT,EAAO,SAAUrvE,KAAK6vH,QAGvC7vH,KAAK8vE,YACH9vE,KAAK6vH,OACL,eACA7vH,KAAKgwE,qBAAqBvN,OAAOqtD,cAAc,GAC/C3/C,EAAY85C,0BAoBd,IAfA,IAAIlW,EAAY,CACd,SACA,aACA,SACA,UACA,cACA,QACA,SACA,YACA,oBACA,oBACA,cACA,cACA,QAEOj5G,EAAI,EAAGA,EAAIi5G,EAAU/4G,OAAQF,IACpCkF,KAAKkuH,2BAA2BluH,KAAK6vH,OAAQ9b,EAAUj5G,GAAI2nE,OAAOvnE,UAAU64G,EAAUj5G,KAGxFoxH,EAAU,SAAU6D,EAAeC,EAASC,GAG1C,OAFAD,EAAUA,EAAUpE,EAAgBl8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,uEACA,4DACA,mEACA,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,CACvCj/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,KAEFk/D,QAAS,CACP,SACA,IACA,0GACA,mHACA,kHACA,iCAEFC,SAAU,CACR,WACA,IACA,6FACA,IACA,+BACA,KAEFvhF,IAAK,CACH,qBACA,IACA,yEACA,IACA,oHACA,oDACA,IACA,yGAEFwhF,IAAK,CACH,aACA,IACA,6EACA,IACA,aACA,IACA,cACA,IACA,mBAEF3nC,GAAI,CACF,WACA,IACA,yGACA,iFACA,IACA,qBACA,IACA,WACA,IACA,UAEF4nC,MAAO,CACL,gCACA,IACA,+HACA,uDACA,kIACA,IACA,gCACA,IACA,gGACA,IACA,mCAEF/rH,MAAO,CACL,QACA,IACA,mIACA,wIAEF4kH,IAAK,CACH,MACA,IACA,mIACA,0IAEFpjH,QAAS,CACP,qBACA,IACA,6GACA,sIACA,kEAEFguE,SAAU,CACR,8BACA,IACA,mFACA,IACA,4GACA,IACA,kDACA,IACA,0CACA,IACA,0CACA,KAEFw8C,KAAM,CACJ,iCACA,IACA,oFACA,IACA,oBACA,IACA,WACA,IACA,oBACA,IACA,sFAEFC,KAAM,CACJ,OACA,IACA,iIACA,iCAEF7wH,KAAM,CACJ,OACA,GACA,6GACA,4CAEFL,KAAM,CACJ,OACA,IACA,uHACA,KAEF8pH,KAAM,CACJ,iBACA,IACA,yHACA,0HACA,mEACA,IACA,aACA,IACA,qBAEFp7F,KAAM,CACJ,2GAEF9X,SAAU,CAAC,WAAY,IAAK,6CAC5BpV,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,8BAEFuvH,MAAO,CAAC,QAAS,IAAK,yDAEtBC,IAAK,CACH,qCACA,IACA,6HACA,2HACA,gFACA,IACA,iBACA,IACA,uBACA,IACA,4HACA,kFAEF73E,GAAI,CACF,kBACA,IACA,6FACA,6FACA,kCACA,IACA,kFACA,kBACA,aACA,IACA,iEACA,IACA,iCAEF83E,KAAM,CACJ,mBACA,IACA,sGACA,2FACA,mBAEFxvH,GAAI,CAAC,KAAM,IAAK,6DAEhBsD,GAAI,CACF,YACA,IACA,6GACA,IACA,mDAEF9D,IAAK,CACH,+CACA,IACA,iCACA,IACA,sHACA,2GACA,gEACA,2DACA,2FACA,IACA,kHACA,iFACA,KAEFtB,KAAM,CACJ,OACA,IACA,6HACA,4CAEF,eAAgB,CACd,4BACA,IACA,kGACA,wGACA,4EACA,IACA,uGACA,qGACA,0BACA,IACA,iHACA,yGACA,UACA,IACA,2GACA,uEAEF4B,IAAK,CACH,iCACA,IACA,2EACA,oGACA,oCACA,kFAEF2vH,MAAO,CAAC,QAAS,IAAK,qEAEtBh0B,KAAM,CACJ,+BACA,IACA,oHACA,uHACA,oEACA,IACA,0BACA,IACA,gFACA,IACA,4BAEFvkB,IAAK,CACH,MACA,IACA,yGACA,gCAEFw4C,QAAS,CACP,uBACA,IACA,mFACA,IACA,iDACA,IACA,gBACA,IACA,kCACA,IACA,YACA,IACA,mGAEFhxH,OAAQ,CACN,SACA,GACA,oHACA,kEAEF0F,KAAM,CACJ,2BACA,IACA,iGACA,oGACA,0CAC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ACdk0F,YAAa/uG,IAAesV,2BAE9B,CACEoF,eAAgB,CACd93C,IAAK,GACLysB,IAAK,IAEPnB,SAAU,YACVssB,eAAgB,CACd53C,IAAK,KACLysB,IAAK,KAEPc,aAAc,GACdV,qBAAsB,EACtBC,iBAAkBzc,IAAa45C,wBAC/BtS,qBAAsB,CACpB33C,IAAK,KACLysB,IAAK,KAEPwrB,aAAc,CACZj4C,IAAK,GACLysB,IAAK,IAEP0/G,YAAa97H,IAAa45C,yBAE5B,CACEnS,eAAgB,CACd93C,IAAK,GACLysB,IAAK,IAEPnB,SAAU,UACVssB,eAAgB,CACd53C,IAAK,KACLysB,IAAK,KAEPc,aAAc,EACdV,qBAAsB,EACtBC,iBAAkBzc,IAAa65C,gBAC/BvS,qBAAsB,CACpB33C,IAAK,KACLysB,IAAK,KAEPwrB,aAAc,CACZj4C,IAAK,GACLysB,IAAK,IAEP0/G,YAAa97H,IAAa65C,iBAE5B,CACEpS,eAAgB,CACd93C,IAAK,GACLysB,IAAK,IAEPnB,SAAU,WACVssB,eAAgB,CACd53C,IAAK,IACLysB,IAAK,KAEPc,aAAc,GACdV,qBAAsB,EACtBC,iBAAkB,WAClB6qB,qBAAsB,CACpB33C,IAAK,IACLysB,IAAK,KAEPwrB,aAAc,CACZj4C,IAAK,GACLysB,IAAK,KAGT,CACEqrB,eAAgB,CACd93C,IAAK,GACLysB,IAAK,IAEPnB,SAAU,SACV+B,WAAY,CAACyL,IAAgBijB,WAC7BhvB,eAAgB,CACd/sB,IAAK,EACLysB,IAAK,GAEPmrB,eAAgB,CACd53C,IAAK,KACLysB,IAAK,MAEPc,aAAc,GACdV,qBAAsB,EACtBC,iBAAkBzc,IAAa85C,mBAC/BxS,qBAAsB,CACpB33C,IAAK,IACLysB,IAAK,KAEPwrB,aAAc,CACZj4C,IAAK,GACLysB,IAAK,IAEP0/G,YAAa97H,IAAa85C,oBAE5B,CACErS,eAAgB,CACd93C,IAAK,GACLysB,IAAK,IAEPnB,SAAU,WACV+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D,CAAM20B,WAAS,EAAC52B,QAAS,GACvB,kBAAC,IAAD,CAAWsc,OAAQqjF,EAAOtjF,SAAUvrD,EAAMyuI,YAC1C,kBAAC,IAAD,CAAM/iF,MAAI,EAACC,GAAI,IACb,kBAAC,IAAD,CAAYhM,QAAQ,MAApB,oBACA,kBAAC,IAAD,CAAYgL,UAdlB,SAA+B/oB,GAE7B,GADAA,EAAMu4D,iBACgB,KAAlBv4D,EAAMu+B,QAAgB,OAC1B,MAAMsvE,EAAYF,EAAQ3tG,EAAMnuD,IAAIqvB,cAC/BvsB,EAAO+rC,WAAWmtH,GACdl5J,IAAWk5J,EAAWzvI,EAAMuuI,YAChCiB,EAASC,GAFqBzvI,EAAMyuI,aAUPA,UAAWzuI,EAAMyuI,aAEjD,kBAAC,IAAD,CAAM/iF,MAAI,EAACC,GAAI,GACb,kBAAC,IAAD,CAAYlO,MAAO,CAAEC,UAAW,eAAiBnnE,IAEnD,kBAAC,IAAD,CAAMm1E,MAAI,EAACC,GAAI,GACb,kBAAC,IAAD,KACG4jF,EACD,kBAAC,IAAD,SAkBV,MAAMF,EAAQ,CACZ,YACA,SACA,MACA,cACA,QACA,SACA,YACA,SACA,MACA,OACA,SACA,OACA,UACA,WACA,OACA,YACA,UACA,SACA,MACA,MACA,OACA,QACA,YACA,UACA,KACA,SACA,SACA,YACA,QACA,YACA,UACA,UACA,WACA,WACA,YACA,SACA,OACA,MACA,aACA,aACA,YACA,OACA,SACA,WACA,QACA,aACA,SACA,UACA,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,MAAMT,EAKF,CACF1iF,QAAS,CAAE2iF,MAAO,KAAOp0G,KAAM,GAC/B0xB,OAAQ,CAAE0iF,MAAO,IAAMp0G,KAAM,GAC7B2xB,KAAM,CAAEyiF,MAAO,IAAMp0G,KAAM,GAC3B4xB,WAAY,CAAEwiF,MAAO,KAAMp0G,KAAM,KAG5B,SAASuyG,EAAUhtI,GACxB,MAAMouB,EAAyB,CAAEygH,MAAO,EAAGp0G,KAAM,GACjDmxB,YAAYgjF,EAAc5uI,EAAMouB,WAAYA,GAC5C,MAAMygH,EAAQzgH,EAAWygH,OAClBa,GAAWv+F,mBAmDpB,SAAqB/iB,GACnB,MAAMshH,EAAU,GAChBA,EAAQv+J,KAAKw+J,EAASt5J,KAAKirB,MAAMjrB,KAAKstB,SAAWgsI,EAAS9+J,UAC1D,IAAK,IAAIF,EAAI,EAAGA,EAAIy9C,EAAWqM,KAAM9pD,IAAK,CACxC,MAAMi/J,EAASC,EAASx5J,KAAKirB,MAAMjrB,KAAKstB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C3D,sDA+BO,SAAS0gF,KA5BhB,WACE,GAAIxlI,IAAOoB,SAAS0lC,SAAS4jD,IAAQI,oBAAqB,OAG1D3T,aAAY,WACgB,WAFlB,IAEFo7C,iBACJvyH,IAAOg7C,YAAY0vC,IAAQI,sBAE5B,KAqBHghG,GAlBF,WACE,GAAI9rL,IAAOoB,SAAS0lC,SAAS4jD,IAAQK,iBAAkB,OAEvD,IAAIghG,GAAO,IAAItmJ,MAAOC,UAWtB7lC,OAAOirE,YAVP,SAASkhH,IACP,MAAMxxF,GAAM,IAAI/0D,MAAOC,UACnB80D,EAAMuxF,EAAO,IAEf/rL,IAAOg7C,YAAY0vC,IAAQK,kBAG7BghG,EAAOvxF,EACP36F,OAAOirE,WAAWkhH,EAAQ,QAEF,KAK1BC,K,0FCjCF,+DAaA,SAASjuH,IACP62B,cACAq3F,IAAS1hB,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEF9+F,SAASq9B,eAAe,SAb5BmjF,IAAS1hB,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEF9+F,SAASq9B,eAAe,SAcxBnU,IAAYz2B,UAAUH","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([1225,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { Corporation } from \"./Corporation/Corporation\";\nimport { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { sanitizeExploits } from \"./Exploits/Exploit\";\n\nimport { Reviver } from \"./utils/JSONReviver\";\n\nimport Decimal from \"decimal.js\";\n\nexport let Player = new PlayerObject();\n\nexport function loadPlayer(saveString: string): void {\n Player = JSON.parse(saveString, Reviver);\n\n // Parse Decimal.js objects\n Player.money = new Decimal(Player.money);\n\n if (Player.corporation instanceof Corporation) {\n Player.corporation.funds = new Decimal(Player.corporation.funds);\n Player.corporation.revenue = new Decimal(Player.corporation.revenue);\n Player.corporation.expenses = new Decimal(Player.corporation.expenses);\n\n for (let i = 0; i < Player.corporation.divisions.length; ++i) {\n const ind = Player.corporation.divisions[i];\n ind.lastCycleRevenue = new Decimal(ind.lastCycleRevenue);\n ind.lastCycleExpenses = new Decimal(ind.lastCycleExpenses);\n ind.thisCycleRevenue = new Decimal(ind.thisCycleRevenue);\n ind.thisCycleExpenses = new Decimal(ind.thisCycleExpenses);\n }\n }\n\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 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 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","import { IMap } from \"../../types\";\n\nexport const AugmentationNames: IMap = {\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 BranchiBlades 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 //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 Version: string;\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 InfiltrationBribeBaseAmount: number;\n InfiltrationMoneyValue: number;\n InfiltrationRepValue: number;\n InfiltrationExpPow: 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 Version: \"0.55.0\",\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 // Infiltration\n InfiltrationBribeBaseAmount: 100e3, //Amount per clearance level\n InfiltrationMoneyValue: 5e3, //Convert \"secret\" value to money\n InfiltrationRepValue: 1.4, //Convert \"secret\" value to faction reputation\n InfiltrationExpPow: 0.8,\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: 2.5, // 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 v0.55.0 - 2021-09-20 Material UI (hydroflame & community)\n -------------------------------------------\n\n ** Global ** \n\n * The game is now 100% in typescript, react, and Material-UI\n\n ** Misc. **\n\n * Corporations can no longer bribe special factions\n * Infiltration can no longer lose focus of the keyboard.\n * Fix terminal line limit\n * Added theme editor\n * Theme applies on game load (@Nolshine)\n * Sleeves no longer consume all bonus time for some actions\n * Fix a bug where the autocomlete list would get duplicates\n * Fix tutorial not scaling properly on small screens\n * Import should be more consistent\n * Typo with 'help' command\n * Fix infinite loop in casino\n * nerf noodle bar\n`,\n\n /*\n\n\n*/\n};\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 * Influences how much negative karma is required to create a gang in this bitnode.\n */\n GangKarmaRequirement: 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 * 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 // 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 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\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n\n DaedalusAugsRequirement: 1,\n GangKarmaRequirement: 1,\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\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 { 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 ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\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\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 hackAnalyzePercent: () => RamCostConstants.ScriptHackAnalyzeRamCost,\n hackChance: () => RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: () => 0,\n grow: () => RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: () => RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: () => RamCostConstants.ScriptWeakenRamCost,\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 getStockSymbols: () => RamCostConstants.ScriptGetStockRamCost,\n getStockPrice: () => RamCostConstants.ScriptGetStockRamCost,\n getStockAskPrice: () => RamCostConstants.ScriptGetStockRamCost,\n getStockBidPrice: () => RamCostConstants.ScriptGetStockRamCost,\n getStockPosition: () => RamCostConstants.ScriptGetStockRamCost,\n getStockMaxShares: () => RamCostConstants.ScriptGetStockRamCost,\n getStockPurchaseCost: () => RamCostConstants.ScriptGetStockRamCost,\n getStockSaleGain: () => RamCostConstants.ScriptGetStockRamCost,\n buyStock: () => RamCostConstants.ScriptBuySellStockRamCost,\n sellStock: () => RamCostConstants.ScriptBuySellStockRamCost,\n shortStock: () => RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: () => RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: () => RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: () => RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: () => RamCostConstants.ScriptBuySellStockRamCost,\n getStockVolatility: () => RamCostConstants.ScriptBuySellStockRamCost,\n getStockForecast: () => RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: () => RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: () => RamCostConstants.ScriptBuySellStockRamCost,\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: () => RamCostConstants.ScriptReadWriteRamCost,\n tryWrite: () => RamCostConstants.ScriptReadWriteRamCost,\n read: () => RamCostConstants.ScriptReadWriteRamCost,\n peek: () => RamCostConstants.ScriptReadWriteRamCost,\n clear: () => RamCostConstants.ScriptReadWriteRamCost,\n getPortHandle: () => RamCostConstants.ScriptReadWriteRamCost * 10,\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 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 getUpgradeHomeRamCost: () => 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\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 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 getCityEstimatedCommunities: () => 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 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 const currType = typeof curr;\n if (currType === \"function\") {\n return curr();\n }\n\n if (currType === \"number\") {\n return curr;\n }\n\n console.warn(`Unexpected type (${currType}) for value [${args}]`);\n return 0;\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 * Enable timestamps\n */\n EnableTimestamps: boolean;\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 * 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 to show a popup message when player is hospitalized from taking too much damage\n */\n SuppressHospitalizationPopup: 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 * Theme colors\n */\n theme: {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: 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 };\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 EnableTimestamps: false,\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 200,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressHospitalizationPopup: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false,\n\n theme: {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#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 },\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 EnableTimestamps: defaultSettings.EnableTimestamps,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting.AcquirementTime,\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting.Default,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressHospitalizationPopup: defaultSettings.SuppressHospitalizationPopup,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n MonacoTheme: \"vs-dark\",\n MonacoInsertSpaces: false,\n MonacoFontSize: 10,\n\n theme: {\n primarylight: defaultSettings.theme.primarylight,\n primary: defaultSettings.theme.primary,\n primarydark: defaultSettings.theme.primarydark,\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 },\n init() {\n Object.assign(Settings, defaultSettings);\n },\n load(saveString: string) {\n Object.assign(Settings, JSON.parse(saveString));\n },\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\nexport interface 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 console.log(\"Reviver WRONGLY called with key: \" + key + \", and value: \" + value);\n return 0;\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.log(\"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","/**\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","import { EqualityFunc } from \"../types\";\nimport { isString } from \"./helpers/isString\";\n\n// Netburner String helper functions\n\n// Replaces the character at an index with a new character\nfunction replaceAt(base: string, index: number, character: string): string {\n return base.substr(0, index) + character + base.substr(index + character.length);\n}\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// Checks if a string contains HTML elements\nfunction isHTML(str: string): boolean {\n const element: HTMLDivElement = document.createElement(\"div\");\n element.innerHTML = str;\n const c: NodeListOf = element.childNodes;\n for (let i: number = c.length - 1; i >= 0; i--) {\n if (c[i].nodeType === 1) {\n return true;\n }\n }\n\n return false;\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 {\n convertTimeMsToTimeElapsedString,\n longestCommonStart,\n containsAllStrings,\n formatNumber,\n isHTML,\n generateRandomString,\n replaceAt,\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\";\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 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","/**\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\nexport function 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\nexport function 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","// 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","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}\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}\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 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} = {\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};\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\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: 0.5,\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 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 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","import { IPlayer } from \"../IPlayer\";\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\";\nimport { Settings } from \"../../Settings/Settings\";\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 Decimal from \"decimal.js\";\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\";\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: IPlayer): void {\n const homeComp = this.getHomeComputer();\n this.currentServer = SpecialServers.Home;\n\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n //Reset stats\n this.hacking_skill = 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 = new Decimal(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_skill = 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: IPlayer, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n this.money = new Decimal(money);\n}\n\nexport function gainMoney(this: IPlayer, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n this.money = this.money.plus(money);\n}\n\nexport function loseMoney(this: IPlayer, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n if (this.money.eq(Infinity) && money === Infinity) return;\n this.money = this.money.minus(money);\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.gte(cost);\n}\n\nexport function recordMoneySource(this: IPlayer, 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_skill = 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 }\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_skill;\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}\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\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);\n if (this.className) {\n this.recordMoneySource(moneyGain, \"class\");\n } else {\n this.recordMoneySource(moneyGain, \"work\");\n }\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 cancelationPenalty(this: IPlayer): number {\n const server = GetServer(this.companyName);\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.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 =\n ((this.hacking_skill + this.intelligence) / CONSTANTS.MaxSkillLevel) *\n this.faction_rep_mult *\n this.getIntelligenceBonus(0.5);\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\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_skill,\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_skill / 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_skill / 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_skill - 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_skill / 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(this.createProgramReqLvl / CONSTANTS.IntelligenceProgramBaseExpGain);\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\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\n this.className = className;\n\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 = this.hashManager;\n switch (className) {\n case CONSTANTS.ClassStudyComputerScience:\n hackExp = ((CONSTANTS.ClassStudyComputerScienceBaseExp * expMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassDataStructures:\n cost = (CONSTANTS.ClassDataStructuresBaseCost * costMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassDataStructuresBaseExp * expMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassNetworks:\n cost = (CONSTANTS.ClassNetworksBaseCost * costMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassNetworksBaseExp * expMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassAlgorithms:\n cost = (CONSTANTS.ClassAlgorithmsBaseCost * costMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassAlgorithmsBaseExp * expMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassManagement:\n cost = (CONSTANTS.ClassManagementBaseCost * costMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassManagementBaseExp * expMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassLeadership:\n cost = (CONSTANTS.ClassLeadershipBaseCost * costMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassLeadershipBaseExp * expMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassGymStrength:\n cost = (CONSTANTS.ClassGymBaseCost * costMult) / gameCPS;\n strExp = (expMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDefense:\n cost = (CONSTANTS.ClassGymBaseCost * costMult) / gameCPS;\n defExp = (expMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDexterity:\n cost = (CONSTANTS.ClassGymBaseCost * costMult) / gameCPS;\n dexExp = (expMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymAgility:\n cost = (CONSTANTS.ClassGymBaseCost * costMult) / gameCPS;\n agiExp = (expMult / gameCPS) * hashManager.getTrainingMult();\n break;\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n return;\n }\n\n this.workMoneyLossRate = cost;\n this.workHackExpGainRate = hackExp * this.hacking_exp_mult * BitNodeMultipliers.ClassGymExpGain;\n this.workStrExpGainRate = strExp * this.strength_exp_mult * BitNodeMultipliers.ClassGymExpGain;\n this.workDefExpGainRate = defExp * this.defense_exp_mult * BitNodeMultipliers.ClassGymExpGain;\n this.workDexExpGainRate = dexExp * this.dexterity_exp_mult * BitNodeMultipliers.ClassGymExpGain;\n this.workAgiExpGainRate = agiExp * this.agility_exp_mult * BitNodeMultipliers.ClassGymExpGain;\n this.workChaExpGainRate = chaExp * this.charisma_exp_mult * BitNodeMultipliers.ClassGymExpGain;\n router.toWork();\n}\n\nexport function takeClass(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\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);\n this.recordMoneySource(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 \"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 \"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 if (Settings.SuppressHospitalizationPopup === false) {\n dialogBoxCreate(\n <>\n You were in critical condition! You were taken to the hospital where luckily they were able to save your life.\n You were charged \n \n ,\n );\n }\n\n this.loseMoney(cost);\n this.recordMoneySource(-1 * 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 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_skill >= 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}\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.gte(150000000000) &&\n this.hacking_skill >= 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.gte(100000000000) &&\n (this.hacking_skill >= 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.gte(75000000000) &&\n this.hacking_skill >= 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.gte(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.gte(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.gte(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.gte(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.gte(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.gte(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_skill >= 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_skill >= 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_skill >= 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.gte(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.gte(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.gte(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_skill >= 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.gte(1000000) &&\n this.hacking_skill >= 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);\n this.recordMoneySource(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 }\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","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","// 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 // Flag indicating wehther this is a purchased server\n purchasedByPlayer = false;\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 * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n changeMaximumMoney(n: number, perc = false): void {\n if (perc) {\n this.moneyMax *= n;\n } else {\n this.moneyMax += n;\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","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","/**\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","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","/**\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)) {\n return -1;\n }\n player.loseMoney(cost);\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);\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.lt(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.gt(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.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) &&\n player.money.lt(nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult))\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(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.lt(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.gt(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.gt(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.lt(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.gt(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.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) &&\n player.money.lt(nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult))\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(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);\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);\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);\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);\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);\n player.recordMoneySource(totalEarnings, \"hacknetnode\");\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);\n player.recordMoneySource(upg.value, \"hacknetnode\");\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.plus(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, true);\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","// 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\n// Utility function to check if a string is valid company name\nexport function companyExists(name: string): boolean {\n return Companies.hasOwnProperty(name);\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","export enum PositionTypes {\n Long = \"L\",\n Short = \"S\",\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.lt(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.minus(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.lt(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.minus(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.lt(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.lt(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/*+.MP]/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 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 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.lt(cost)) return;\n office.size += size;\n corp.funds = corp.funds.minus(cost);\n}\n\nexport function ThrowParty(corp: ICorporation, office: OfficeSpace, costPerEmployee: number): number {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds.lt(totalCost)) return 0;\n corp.funds = corp.funds.minus(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.lt(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.minus(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.minus(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.lt(cost)) return;\n corp.funds = corp.funds.minus(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.lt(cost)) return;\n corp.funds = corp.funds.minus(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.lt(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.minus(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, \"\");\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","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","/**\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","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","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","// 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","/**\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\";\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 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 }\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 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","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_skill;\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_skill - (server.requiredHackingSkill - 1)) / player.hacking_skill;\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_skill + 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","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(\"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(\"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\nexport function 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 { 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 */\nexport class 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","export function isScriptFilename(f: string): boolean {\n return f.endsWith(\".js\") || f.endsWith(\".script\") || f.endsWith(\".ns\");\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","/* 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 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","// 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 * 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 */\nexport function 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 */\nexport function 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","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 { CharacterOverview } from \"./React/CharacterOverview\";\nimport { BladeburnerCinematic } from \"../Bladeburner/ui/BladeburnerCinematic\";\nimport { workerScripts } from \"../Netscript/WorkerScripts\";\nimport { Unclickable } from \"../Exploits/Unclickable\";\nimport { Snackbar } 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\";\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};\n\nfunction determineStartPage(player: IPlayer): Page {\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 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 };\n\n useEffect(() => {\n filename = \"\";\n code = \"\";\n if (page !== Page.Terminal) window.scrollTo(0, 0);\n });\n\n return (\n \n \n \n {!ITutorial.isRunning ? (\n saveObject.saveGame()} />\n ) : (\n \n )}\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.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={() => {\n for (const server of GetAllServers()) {\n server.runningScripts = [];\n }\n dialogBoxCreate(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n }}\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","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.max(0, usedCycles);\n server.fortify(2 * CONSTANTS.ServerFortifyAmount * Math.ceil(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","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 { Terminal as TTerminal } from \"./Terminal/Terminal\";\n\nexport const Terminal = new TTerminal();\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 { 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.factionInvitations.push(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.lt(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.gte(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);\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","/**\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 * 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.gt(props.money))\n return {numeralWrapper.formatMoney(props.money)};\n\n return {numeralWrapper.formatMoney(props.money)};\n}\n","/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\n\ntype cbFn = (...args: any[]) => any;\n\nexport interface ISubscriber {\n /**\n * Callback function that will be run when an event is emitted\n */\n cb: cbFn;\n\n /**\n * Name/identifier for this subscriber\n */\n id: string;\n}\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 { 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","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","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","/**\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 { roundToTwo } from \"../utils/helpers/roundToTwo\";\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 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 | number} - 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 if (workerScript instanceof WorkerScript) {\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 server.ramUsed = 0;\n for (const rs of server.runningScripts) server.ramUsed += rs.ramUsage * rs.threads;\n\n // Delete script from global pool (workerScripts)\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\n if (rerenderUi) {\n WorkerScriptStartStopEventEmitter.emit();\n }\n } else {\n console.error(`Invalid argument passed into removeWorkerScript():`);\n console.error(workerScript);\n return;\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 { 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 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 { 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","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 lineNum = \"\";\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 \"|\" + server.hostname + \"|\" + workerScript.name + \"|\" + msg + lineNum;\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(\"|\");\n if (splitMsg.length != 4) {\n return false;\n }\n return true;\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","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: 2.5e5,\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 // 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","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 */\nexport interface 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","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,\n \"Real Estate\": 0,\n \"AI Cores\": 0,\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\";\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 === \"sleep\") 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) {\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\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 workerScript.errorMessage = makeRuntimeRejectMsg(\n workerScript,\n e.message + ((e.stack && \"\\nstack:\\n\" + e.stack.toString()) || \"\"),\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) {\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 (\n name === \"hack\" ||\n name === \"grow\" ||\n name === \"weaken\" ||\n name === \"sleep\" ||\n name === \"prompt\" ||\n name === \"manualHack\"\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 - 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) {\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 if (interpreter.step()) {\n setTimeout(runInterpreter, Settings.CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e) {\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) {\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 */\nexport function createAndAddWorkerScript(\n runningScriptObj: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): 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 ramUsage = roundToTwo(getRamUsageFromRunningScript(runningScriptObj) * 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 server.ramUsed = roundToTwo(server.ramUsed + ramUsage);\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 = ramUsage;\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(\"|\");\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 // 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 (server.scripts[i].filename === scriptname) {\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 `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 }\n }\n\n workerScript.log(caller, `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n","export enum FactionWorkType {\n Field,\n Hacking,\n None,\n Security,\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 copy(): Material {\n const material = new Material();\n material.name = this.name;\n material.qty = this.qty;\n material.qlt = this.qlt;\n material.dmd = this.dmd;\n\n material.cmp = this.cmp;\n\n material.mv = this.mv;\n material.mku = this.mku;\n material.buy = this.buy;\n material.sll = this.sll;\n material.prd = this.prd;\n material.imp = this.imp;\n material.totalExp = this.totalExp;\n material.bCost = this.bCost;\n material.marketTa1 = this.marketTa1;\n material.marketTa2 = this.marketTa2;\n material.marketTa2Price = this.marketTa2Price;\n material.sCost = this.sCost;\n material.prdman = [this.prdman[0], this.prdman[1]];\n material.sllman = [this.sllman[0], this.sllman[1]];\n\n material.dmdR = this.dmdR.slice();\n material.cmpR = this.cmpR.slice();\n material.exp = this.exp.slice().map((e) => {\n return { ind: e.ind, city: e.city, amt: e.amt };\n });\n return material;\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 { 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 /**\n * Reputation from the last \"prestige\" that was not converted to favor.\n * This reputation rolls over and is used for the next favor calculation\n */\n rolloverRep = 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 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 this.favor += res[0];\n this.rolloverRep = res[1];\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 if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor - 1));\n const totalRep = storedRep + this.rolloverRep + this.playerReputation;\n const newFavor = Math.floor(repToFavor(totalRep));\n const newRep = favorToRep(newFavor);\n return [newFavor - this.favor + 1, totalRep - newRep];\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","// 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 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","/**\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 * 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);\n p.recordMoneySource(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);\n p.recordMoneySource(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","/**\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","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","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\nexport interface 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_skill +\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","// 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_skill = 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_skill / 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_skill / 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_skill / 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_skill = 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 civlization 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() and getServer() Netscript functions, as well\n as the formulas API, 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);\n// Books: Frontera, Shiner\nBitNodes[\"BitNode13\"] = new BitNode(13, 2, \"fOS\", \"COMING SOON\"); //Unlocks the new game mode and the rest of the BitNodes\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\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.GangKarmaRequirement = 0;\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.GangKarmaRequirement = 3;\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 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 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.GangKarmaRequirement = 5;\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.GangKarmaRequirement = 5;\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.GangKarmaRequirement = 10;\n break;\n case 9: // Hacktocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.4;\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.GangKarmaRequirement = 3;\n break;\n case 10: // Digital Carbon\n BitNodeMultipliers.HackingLevelMultiplier = 0.2;\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.GangKarmaRequirement = 3;\n break;\n case 11: //The Big Crash\n BitNodeMultipliers.HackingLevelMultiplier = 0.5;\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 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\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 break;\n }\n default:\n console.warn(\"Player.bitNodeN invalid\");\n break;\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 } 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 { redPillFlag } from \"../RedPill\";\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) {\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().commsEst === 0) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\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) {\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 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) {\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 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 if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\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 if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\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 --city.commsEst;\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 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);\n player.recordMoneySource(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) {\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) {\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_skill, 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 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 (redPillFlag === false && 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 ];\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(\"bladeburner.startAction\", `Starting bladeburner action with type '${type}' and name ${name}\"`);\n return true;\n } catch (e) {\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);\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n return 30;\n case ActionTypes[\"Recruitment\"]:\n return this.getRecruitmentTime(player);\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n return 60;\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[] {\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 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 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 `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 return sanitizedRam * CONSTANTS.BaseCostFor1GBOfRamServer * BitNodeMultipliers.PurchasedServerCost;\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);\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);\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) {\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 { 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","/**\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(\"buyStock\", `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.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\n \"buyStock\",\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 \"buyStock\",\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);\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(\"buyStock\", 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(\"sellStock\", `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);\n Player.recordMoneySource(netProfit, \"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(\"sellStock\", 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(\"shortStock\", `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.lt(totalPrice)) {\n if (workerScript) {\n workerScript.log(\n \"shortStock\",\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 \"shortStock\",\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);\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(\"shortStock\", 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(\"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 \"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);\n Player.recordMoneySource(profit, \"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(\"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 { 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","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","/*\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 // 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};\n\nexport function ExploitName(exploit: string): string {\n return names[exploit];\n}\n\nexport function sanitizeExploits(exploits: Exploit[]): Exploit[] {\n return exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));\n}\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_skill + 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_skill / 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_skill / 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","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","// 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","/**\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 \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\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","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.keyCode) {\n case 38:\n case 87:\n return \"↑\";\n case 65:\n case 37:\n return \"←\";\n case 40:\n case 83:\n return \"↓\";\n case 39:\n case 68:\n return \"→\";\n }\n return \"\";\n}\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 { 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)[],\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 if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.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);\n }\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(msg: Message): void {\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 (typeof other === \"string\") continue;\n if (msg.filename === other.filename) {\n return; //Already exists\n }\n }\n server.messages.push(msg);\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_skill >= 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_skill >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && Player.hacking_skill >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && Player.hacking_skill >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && Player.hacking_skill >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && Player.hacking_skill >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && Player.hacking_skill >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && Player.hacking_skill >= 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, sendMessage, showMessage, loadMessages, initMessages, Message };\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","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","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 { Action } from \"./Action\";\nimport { IMap } from \"../types\";\n\nexport const GeneralActions: IMap = {};\n\n(function () {\n // General Actions\n let actionName;\n actionName = \"Training\";\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n\n actionName = \"Field Analysis\";\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n\n actionName = \"Recruitment\";\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n\n actionName = \"Diplomacy\";\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n\n actionName = \"Hyperbolic Regeneration Chamber\";\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n})();\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","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\";\n\nexport const LogBoxEvents = new EventEmitter<[RunningScript]>();\n\ninterface Log {\n id: string;\n script: RunningScript;\n}\n\nexport function LogBoxManager(): React.ReactElement {\n const [logs, setLogs] = useState([]);\n useEffect(\n () =>\n LogBoxEvents.subscribe((script: RunningScript) => {\n const id = script.server + \"-\" + script.filename + script.args.map((x: any): string => `${x}`).join(\"-\");\n setLogs((old) => {\n return [\n ...old,\n {\n id: id,\n script: script,\n },\n ];\n });\n }),\n [],\n );\n\n function close(id: string): void {\n setLogs((old) => old.filter((l) => l.id !== id));\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(() =>\n createStyles({\n logs: {\n overflowY: \"scroll\",\n overflowX: \"hidden\",\n scrollbarWidth: \"auto\",\n display: \"flex\",\n flexDirection: \"column-reverse\",\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 const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function kill(): void {\n killWorkerScript(props.script, props.script.server, true);\n props.onClose();\n }\n\n return (\n \n \n \n \n \n {props.script.filename} {props.script.args.map((x: any): string => `${x}`).join(\" \")}\n \n\n \n \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 * 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 * 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","/**\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 { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getStockMarketAccountCost(): number {\n return CONSTANTS.WSEAccountCost;\n}\n\nexport function getStockMarketTixApiCost(): number {\n return CONSTANTS.TIXAPICost;\n}\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","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 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 ServerProfilerProgram: new DarkWebItem(\n Programs.ServerProfiler.name,\n 1e6,\n \"Displays hacking and Netscript-related information about a server\",\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","/**\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 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\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 this.scriptRef = runningScriptObj;\n this.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","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: 25,\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","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","// 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 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 };\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 };\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 },\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.black,\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: \"#333\",\n border: \"1px solid \" + Settings.theme.well,\n // color: Settings.theme.primary,\n \"&:hover\": {\n backgroundColor: Settings.theme.black,\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.black,\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.black,\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.black,\n border: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\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 },\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","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.1);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst: IBladeburner): 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\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 { 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 } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { loadStockMarket, StockMarket } from \"./StockMarket/StockMarket\";\n\nimport { GameSavedEvents } 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\";\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\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.Version);\n this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);\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(() => GameSavedEvents.emit())\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_BN${bn}x${SourceFileFlags[bn]}_${epochTime}.json`;\n const file = new Blob([saveString], { type: \"text/plain\" });\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.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 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): void {\n // We have to do this because ts won't let us otherwise\n const anyPlayer = Player as any;\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}\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(\"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\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver != CONSTANTS.Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n return true;\n}\n\nfunction createNewUpdateText(): void {\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}\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\nReviver.constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nexport { saveObject, loadGame };\n\nconst saveObject = new BitburnerSaveObject();\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];\n if (!(crime instanceof 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 = crimeKey;\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 | null = Crimes[this.crimeType];\n if (!(crime instanceof 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);\n p.recordMoneySource(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_skill,\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 console.error(\"\");\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);\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);\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 { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\nimport { Settings } from \"../Settings/Settings\";\nimport { getTimestamp } from \"../utils/helpers/getTimestamp\";\n\nexport class Output {\n text: string;\n color: \"inherit\" | \"initial\" | \"primary\" | \"secondary\" | \"error\" | \"textPrimary\" | \"textSecondary\" | undefined;\n constructor(\n text: string,\n color: \"inherit\" | \"initial\" | \"primary\" | \"secondary\" | \"error\" | \"textPrimary\" | \"textSecondary\" | undefined,\n ) {\n if (Settings.EnableTimestamps) text = \"[\" + getTimestamp() + \"] \" + text;\n this.text = text;\n this.color = color;\n }\n}\n\nexport class Link {\n hostname: string;\n dashes: string;\n constructor(dashes: string, hostname: string) {\n if (Settings.EnableTimestamps) dashes = \"[\" + getTimestamp() + \"] \" + 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)[];\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 error(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 { EventEmitter } from \"../utils/EventEmitter\";\nexport const TerminalEvents = new EventEmitter<[]>();\nexport const TerminalClearEvents = new EventEmitter<[]>();\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","/**\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\";\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 dialogBoxCreate(\n <>\n {order.type} for {stock.symbol} @ ({pos}) was filled (\n {numeralWrapper.formatShares(Math.round(order.shares))} shares)\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","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\n// UI Related Imports\n\nimport Decimal from \"decimal.js\";\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 = new Decimal(150e9);\n revenue = new Decimal(0);\n expenses = new Decimal(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.plus(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 = new Decimal(0);\n this.expenses = new Decimal(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.plus(ind.lastCycleRevenue);\n this.expenses = this.expenses.plus(ind.lastCycleExpenses);\n });\n const profit = this.revenue.minus(this.expenses);\n const cycleProfit = profit.times(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 = new Decimal(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 const dividendsPerShare = totalDividends / this.totalShares;\n const profit = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);\n player.gainMoney(profit);\n player.recordMoneySource(profit, \"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 determineValuation(): number {\n let val,\n profit = this.revenue.minus(this.expenses).toNumber();\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.toNumber() + 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.toNumber(), 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.lt(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.minus(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.lt(totalCost)) {\n dialogBoxCreate(\"You don't have enough funds to purchase this!\");\n return;\n }\n ++this.upgrades[upgN];\n this.funds = this.funds.minus(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 { 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.1);\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 Decimal from \"decimal.js\";\n\nconst BitNode8StartingMoney = 250e6;\n\n// Prestige by purchasing augmentation\nfunction prestigeAugmentation(): void {\n initBitNodeMultipliers(Player);\n\n const maintainMembership = Player.factions.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 // 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 onerror\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n\n Player.factions = Player.factions.concat(maintainMembership);\n Player.factions.map((f) => (Factions[f].isMember = true));\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 = new Decimal(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 resetPidCounter();\n}\n\n// Prestige by destroying Bit Node and gaining a Source File\nfunction 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 // 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 = new Decimal(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 // 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 // Gain int exp\n if (SourceFileFlags[5] !== 0 && !flume) Player.gainIntelligenceExp(300);\n\n resetPidCounter();\n}\n\nexport { prestigeAugmentation, prestigeSourceFile };\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","export 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 { 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","/**\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 { getTimestamp } from \"../utils/helpers/getTimestamp\";\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.EnableTimestamps) {\n logEntry = \"[\" + getTimestamp() + \"] \" + 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\";\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() and getServer() Netscript functions, as well as the formulas API, and will raise all of\n your 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);\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\";\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 props.bladeburner.startAction(player, props.bladeburner.action);\n props.rerender();\n }\n\n return (\n \n );\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 + \".js\";\n const file = new Blob([this.code], { type: \"text/plain\" });\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.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 // 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","/**\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\nexport interface 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) => {\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\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 { 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 copy(): OfficeSpace {\n const office = new OfficeSpace();\n office.loc = this.loc;\n office.size = this.size;\n office.minEne = this.minEne;\n office.maxEne = this.maxEne;\n office.minHap = this.minHap;\n office.maxHap = this.maxHap;\n office.maxMor = this.maxMor;\n office.employeeProd = {\n [EmployeePositions.Operations]: this.employeeProd[EmployeePositions.Operations],\n [EmployeePositions.Engineer]: this.employeeProd[EmployeePositions.Engineer],\n [EmployeePositions.Business]: this.employeeProd[EmployeePositions.Business],\n [EmployeePositions.Management]: this.employeeProd[EmployeePositions.Management],\n [EmployeePositions.RandD]: this.employeeProd[EmployeePositions.RandD],\n total: this.employeeProd[\"total\"],\n };\n office.employees = [];\n for (const employee of this.employees) {\n office.employees.push(employee.copy());\n }\n return office;\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 hacknetnode = 0;\n hospitalization = 0;\n infiltration = 0;\n sleeves = 0;\n stock = 0;\n total = 0;\n work = 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","/**\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\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}`;\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 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","export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {\n return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport function getHospitalizationCost(p: IPlayer): number {\n let money;\n if (typeof p.money === \"number\") {\n money = p.money;\n } else {\n money = p.money.toNumber();\n }\n\n if (money < 0) {\n return 0;\n }\n\n return Math.min(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 this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * (busRatio + mgmtRatio));\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) 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","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(async (resolve, reject) => {\n await 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 { 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 * Estimated number of communities in the city.\n */\n commsEst = 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.commsEst = this.comms + getRandomInt(-5, 5);\n if (this.commsEst < 0) this.commsEst = 0;\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 improveCommunityEstimate(n = 1): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.improveCommunityEstimate()\");\n }\n if (this.commsEst < this.comms) {\n this.commsEst += n;\n if (this.commsEst > this.comms) {\n this.commsEst = this.comms;\n }\n } else if (this.commsEst > this.comms) {\n this.commsEst -= n;\n if (this.commsEst < this.comms) {\n this.commsEst = this.comms;\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","/**\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","import { Factions } from \"../../Faction/Factions\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Gang } from \"../../Gang/Gang\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\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 <= BitNodeMultipliers.GangKarmaRequirement * 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","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 500e9,\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 2e12,\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};\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","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 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 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","/**\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 * 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.\");\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 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","/**\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 { DarkWebItems } from \"./DarkWebItems\";\n\nimport { Player } from \"../Player\";\nimport { Terminal } from \"../Terminal\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\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.print(`${item.program} - ${numeralWrapper.formatMoney(item.price)} - ${item.description}`);\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.print(\"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.lt(item.price)) {\n Terminal.print(\"Not enough money to purchase \" + item.program);\n return;\n }\n\n // buy and push\n Player.loseMoney(item.price);\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","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\";\nimport * as libarg from \"arg\";\n\nimport { getRamCost } from \"./Netscript/RamCostGenerator\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\n\nimport { Augmentations } from \"./Augmentation/Augmentations\";\nimport { augmentationExists, installAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { prestigeAugmentation } from \"./Prestige\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\nimport { findCrime } from \"./Crime/CrimeHelpers\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { Company } from \"./Company/Company\";\nimport { Companies } from \"./Company/Companies\";\nimport { CompanyPosition } from \"./Company/CompanyPosition\";\nimport { CompanyPositions } from \"./Company/CompanyPositions\";\nimport { CONSTANTS } from \"./Constants\";\nimport { DarkWebItems } from \"./DarkWeb/DarkWebItems\";\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 {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"./Hacking\";\nimport { calculateServerGrowth } from \"./Server/formulas/grow\";\nimport { AllGangs } from \"./Gang/AllGangs\";\nimport { Factions, factionExists } from \"./Faction/Factions\";\nimport { joinFaction, purchaseAugmentation } from \"./Faction/FactionHelpers\";\nimport { netscriptCanGrow, netscriptCanHack, netscriptCanWeaken } from \"./Hacking/netscriptCanHack\";\n\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 { HacknetServer } from \"./Hacknet/HacknetServer\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { LocationName } from \"./Locations/data/LocationNames\";\nimport { Terminal } from \"./Terminal\";\nimport { calculateSkill, calculateExp } from \"./PersonObjects/formulas/skill\";\n\nimport { Message } from \"./Message/Message\";\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 { buyStock, sellStock, shortStock, sellShort } from \"./StockMarket/BuyingAndSelling\";\nimport { influenceStockThroughServerHack, influenceStockThroughServerGrow } from \"./StockMarket/PlayerInfluencing\";\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 { isValidFilePath, removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { TextFile, getTextFile, createTextFile } from \"./TextFile\";\n\nimport { NetscriptPorts, runScriptFromScript, startWorkerScript } from \"./NetscriptWorker\";\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads } from \"./NetscriptEvaluator\";\nimport { Interpreter } from \"./ThirdParty/JSInterpreter\";\nimport { Router } from \"./ui/GameRoot\";\n\nimport { numeralWrapper } from \"./ui/numeralFormat\";\nimport { is2DArray } from \"./utils/helpers/is2DArray\";\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 { 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\";\n\nimport { Faction } from \"./Faction/Faction\";\nimport { Augmentation } from \"./Augmentation/Augmentation\";\n\nimport { CodingContract } from \"./CodingContracts\";\nimport { Stock } from \"./StockMarket/Stock\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { INetscriptGang, NetscriptGang } from \"./NetscriptFunctions/Gang\";\nimport { INetscriptSleeve, NetscriptSleeve } from \"./NetscriptFunctions/Sleeve\";\nimport { INetscriptExtra, NetscriptExtra } from \"./NetscriptFunctions/Extra\";\nimport { INetscriptHacknet, NetscriptHacknet } from \"./NetscriptFunctions/Hacknet\";\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.\nfunction 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\ninterface NS extends INetscriptExtra {\n [key: string]: any;\n hacknet: INetscriptHacknet;\n gang: INetscriptGang;\n sleeve: INetscriptSleeve;\n}\n\nfunction 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 * threads;\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 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 scan = eval('ns.scan');\n\n * Using map access to do the same\n   const scan = ns['scan'];\n\n * Saving script in the improper order.\n   Increase the cost of an imported script, save it, then run the\n   parent. To fix this just re-open & save every script in order\n   from most imported to least imported (parent script).\n\n Sorry :(`,\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} ip - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {Server} The specified Server\n */\n const safeGetServer = function (ip: any, callingFnName: any = \"\"): BaseServer {\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid IP/hostname: ${ip}`);\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} ip - 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 (fn: any, ip: any, callingFnName: any, scriptArgs: any): 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 (ip == null) {\n ip = workerScript.hostname;\n }\n const server = safeGetServer(ip, 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} ip - 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, ip: any, scriptArgs: any): string {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${ip} with args: ${arrayToString(scriptArgs)}`;\n };\n\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n const checkTixApiAccess = function (callingFn: any = \"\"): void {\n if (!Player.hasWseAccount) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n if (!Player.hasTixApiAccess) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n\n /**\n * Gets a stock, given its symbol. Throws an error if the symbol is invalid\n * @param {string} symbol - Stock's symbol\n * @returns {Stock} stock object\n */\n const getStockFromSymbol = function (symbol: any, callingFn: any = \"\"): Stock {\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\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 checkFormulasAccess = function (func: any, n: any): void {\n if ((SourceFileFlags[5] < 1 && Player.bitNodeN !== 5) || (SourceFileFlags[n] < 1 && Player.bitNodeN !== n)) {\n let extra = \"\";\n if (n !== 5) {\n extra = ` and Source-File ${n}-1`;\n }\n throw makeRuntimeErrorMsg(`formulas.${func}`, `Requires Source-File 5-1${extra} to run.`);\n }\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 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 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 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 makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const getCodingContract = function (func: any, ip: any, fn: any): CodingContract {\n const server = safeGetServer(ip, func);\n const contract = server.getContract(fn);\n if (contract == null) {\n throw makeRuntimeErrorMsg(`codingcontract.${func}`, `Cannot find contract '${fn}' on server '${ip}'`);\n }\n\n return contract;\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 makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n const actionObj = bladeburner.getActionObject(actionId);\n if (!actionObj) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\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 makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n return company;\n };\n\n const getFaction = function (func: any, name: any): Faction {\n if (!factionExists(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return Factions[name];\n };\n\n const getAugmentation = function (func: any, name: any): Augmentation {\n if (!augmentationExists(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return Augmentations[name];\n };\n\n function getDivision(divisionName: any): IIndustry {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"cannot be called without a corporation\");\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 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\n const hack = function (ip: any, manual: any, { threads: requestedThreads, stock }: any = {}): Promise {\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n const threads = resolveNetscriptRequestedThreads(workerScript, \"hack\", requestedThreads);\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\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 `Executing ${ip} 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);\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n Player.scriptProdSinceLastAug += moneyGained;\n Player.recordMoneySource(moneyGained, \"hacking\");\n workerScript.scriptRef.recordHack(server.hostname, moneyGained, threads);\n Player.gainHackingExp(expGainedOnSuccess);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\n \"hack\",\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, moneyGained);\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 `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 if (typeof arg === \"object\") {\n out += JSON.stringify(arg);\n continue;\n }\n out += `${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 };\n\n const gang = NetscriptGang(Player, workerScript, helper);\n const sleeve = NetscriptSleeve(Player, workerScript, helper);\n const extra = NetscriptExtra(Player, workerScript, helper);\n const hacknet = NetscriptHacknet(Player, workerScript, helper);\n\n const functions = {\n hacknet: hacknet,\n sprintf: sprintf,\n vsprintf: vsprintf,\n scan: function (ip: any = workerScript.hostname, hostnames: any = true): any {\n updateDynamicRam(\"scan\", getRamCost(\"scan\"));\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scan\", `Invalid IP/hostname: ${ip}.`);\n }\n const out = [];\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n let entry;\n const s = getServerOnNetwork(server, i);\n if (s === null) continue;\n if (hostnames) {\n entry = s.hostname;\n } else {\n entry = s.hostname;\n }\n if (entry == null) {\n continue;\n }\n out.push(entry);\n }\n workerScript.log(\"scan\", `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (ip: any, { threads: requestedThreads, stock }: any = {}): any {\n updateDynamicRam(\"hack\", getRamCost(\"hack\"));\n return hack(ip, false, { threads: requestedThreads, stock: stock });\n },\n hackAnalyzeThreads: function (ip: any, hackAmount: any): any {\n updateDynamicRam(\"hackAnalyzeThreads\", getRamCost(\"hackAnalyzeThreads\"));\n\n // Check argument validity\n const server = safeGetServer(ip, \"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 hackAnalyzePercent: function (ip: any): any {\n updateDynamicRam(\"hackAnalyzePercent\", getRamCost(\"hackAnalyzePercent\"));\n\n const server = safeGetServer(ip, \"hackAnalyzePercent\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzePercent\", \"Cannot be executed on this server.\");\n return false;\n }\n\n return calculatePercentMoneyHacked(server, Player) * 100;\n },\n hackChance: function (ip: any): any {\n updateDynamicRam(\"hackChance\", getRamCost(\"hackChance\"));\n\n const server = safeGetServer(ip, \"hackChance\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackChance\", \"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 grow: function (ip: any, { threads: requestedThreads, stock }: any = {}): any {\n updateDynamicRam(\"grow\", getRamCost(\"grow\"));\n const threads = resolveNetscriptRequestedThreads(workerScript, \"grow\", requestedThreads);\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"grow\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"grow\", `Invalid IP/hostname: ${ip}.`);\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 `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 `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 (ip: any, growth: any, cores: any = 1): any {\n updateDynamicRam(\"growthAnalyze\", getRamCost(\"growthAnalyze\"));\n\n // Check argument validity\n const server = safeGetServer(ip, \"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 weaken: function (ip: any, { threads: requestedThreads }: any = {}): any {\n updateDynamicRam(\"weaken\", getRamCost(\"weaken\"));\n const threads = resolveNetscriptRequestedThreads(workerScript, \"weaken\", requestedThreads);\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"weaken\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"weaken\", `Invalid IP/hostname: ${ip}`);\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 `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 `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${numeralWrapper.formatExp(\n expGain,\n )} hacking exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads);\n });\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 Terminal.print(`${workerScript.scriptRef.filename}: ${argsToString(args)}`);\n },\n tprintf: function (format: any, ...args: any): any {\n Terminal.print(vsprintf(format, args));\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, ip: any, ...scriptArgs: any): any {\n const runningScriptObj = getRunningScript(fn, ip, \"getScriptLogs\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn: any, ip: 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, ip, \"tail\", scriptArgs);\n }\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return;\n }\n\n LogBoxEvents.emit(runningScriptObj);\n },\n nuke: function (ip: any): any {\n updateDynamicRam(\"nuke\", getRamCost(\"nuke\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"nuke\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"nuke\", `Invalid IP/hostname: ${ip}.`);\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 (ip: any): any {\n updateDynamicRam(\"brutessh\", getRamCost(\"brutessh\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"brutessh\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"brutessh\", `Invalid IP/hostname: ${ip}.`);\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 (ip: any): any {\n updateDynamicRam(\"ftpcrack\", getRamCost(\"ftpcrack\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"ftpcrack\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", `Invalid IP/hostname: ${ip}.`);\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 (ip: any): any {\n updateDynamicRam(\"relaysmtp\", getRamCost(\"relaysmtp\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"relaysmtp\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", `Invalid IP/hostname: ${ip}.`);\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 (ip: any): any {\n updateDynamicRam(\"httpworm\", getRamCost(\"httpworm\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"httpworm\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"httpworm\", `Invalid IP/hostname: ${ip}`);\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 (ip: any): any {\n updateDynamicRam(\"sqlinject\", getRamCost(\"sqlinject\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n const server = GetServer(ip);\n if (!(server instanceof Server)) {\n workerScript.log(\"sqlinject\", \"Cannot be executed on this server.\");\n return false;\n }\n if (server == null) {\n throw makeRuntimeErrorMsg(\"sqlinject\", `Invalid IP/hostname: ${ip}`);\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, ip: any, threads: any = 1, ...args: any[]): any {\n updateDynamicRam(\"exec\", getRamCost(\"exec\"));\n if (scriptname === undefined || ip === 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 = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid IP/hostname: ${ip}`);\n }\n return runScriptFromScript(\"exec\", server, scriptname, args, workerScript, threads);\n },\n spawn: function (scriptname: any, threads: any, ...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, ip: 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/ip\n if (filename === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ip);\n const runningScriptObj = getRunningScript(filename, ip, \"kill\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", getCannotFindRunningScriptErrorMessage(filename, ip, 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(\"kill\", `Killing '${filename}' on '${ip}' with args: ${arrayToString(scriptArgs)}.`);\n }\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", `No script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `No such script '${filename}' on '${ip}' with args: ${arrayToString(scriptArgs)}`);\n }\n return false;\n }\n },\n killall: function (ip: any = workerScript.hostname): any {\n updateDynamicRam(\"killall\", getRamCost(\"killall\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"killall\", `Invalid IP/hostname: ${ip}`);\n }\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: function (scriptname: any, ip1: any, ip2: any): any {\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 scriptname.forEach(function (script) {\n if (NetscriptFunctions(workerScript).scp(script, ip1, ip2)) {\n res = true;\n }\n });\n return 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, currServ;\n\n if (ip2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = GetServer(ip2);\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip2}`);\n }\n\n currServ = GetServer(ip1);\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n } else if (ip1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || ip1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = GetServer(ip1);\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n\n currServ = GetServer(workerScript.hostname);\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", \"Could not find server ip for this script. This is a bug. Report to dev.\");\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] instanceof Message) && 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 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 true; // Already exists\n }\n }\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return 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 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 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 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 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 true;\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return 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 true;\n },\n ls: function (ip: any, grep: any): any {\n updateDynamicRam(\"ls\", getRamCost(\"ls\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(ip/hostname, [grep filter])\");\n }\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ls\", `Invalid IP/hostname: ${ip}`);\n }\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 instanceof Message) {\n if (msg.filename.includes(filter)) {\n allFiles.push(msg.filename);\n }\n } else if (msg.includes(filter)) {\n allFiles.push(msg);\n }\n } else {\n const msg = server.messages[i];\n if (msg instanceof Message) {\n allFiles.push(msg.filename);\n } else {\n allFiles.push(msg);\n }\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 (ip: any = workerScript.hostname): any {\n updateDynamicRam(\"ps\", getRamCost(\"ps\"));\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ps\", `Invalid IP/hostname: ${ip}`);\n }\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 (ip: any): any {\n updateDynamicRam(\"hasRootAccess\", getRamCost(\"hasRootAccess\"));\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", `Invalid IP/hostname: ${ip}`);\n }\n return server.hasAdminRights;\n },\n getIp: function (): any {\n updateDynamicRam(\"getIp\", getRamCost(\"getIp\"));\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getIp\", \"Could not find server. This is a bug. Report to dev.\");\n }\n return scriptServer.hostname;\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_skill}`);\n return Player.hacking_skill;\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 (ip: any): any {\n updateDynamicRam(\"getServer\", getRamCost(\"getServer\"));\n if (SourceFileFlags[5] <= 0 && Player.bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getServer\", \"Requires Source-File 5 to run.\");\n }\n const server = safeGetServer(ip, \"getServer\");\n const copy = Object.assign({}, server);\n // These fields should be hidden.\n copy.contracts = [];\n copy.messages = [];\n copy.runningScripts = [];\n copy.scripts = [];\n copy.textFiles = [];\n copy.programs = [];\n copy.serversOnNetwork = [];\n return copy;\n },\n getServerMoneyAvailable: function (ip: any): any {\n updateDynamicRam(\"getServerMoneyAvailable\", getRamCost(\"getServerMoneyAvailable\"));\n const server = safeGetServer(ip, \"getServerMoneyAvailable\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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.toNumber())}`,\n );\n return Player.money.toNumber();\n }\n workerScript.log(\n \"getServerMoneyAvailable\",\n `returned ${numeralWrapper.formatMoney(server.moneyAvailable)} for '${server.hostname}'`,\n );\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (ip: any): any {\n updateDynamicRam(\"getServerSecurityLevel\", getRamCost(\"getServerSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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 (ip: any): any {\n updateDynamicRam(\"getServerBaseSecurityLevel\", getRamCost(\"getServerBaseSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerBaseSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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 (ip: any): any {\n updateDynamicRam(\"getServerMinSecurityLevel\", getRamCost(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerMinSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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 (ip: any): any {\n updateDynamicRam(\"getServerRequiredHackingLevel\", getRamCost(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(ip, \"getServerRequiredHackingLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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 (ip: any): any {\n updateDynamicRam(\"getServerMaxMoney\", getRamCost(\"getServerMaxMoney\"));\n const server = safeGetServer(ip, \"getServerMaxMoney\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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 (ip: any): any {\n updateDynamicRam(\"getServerGrowth\", getRamCost(\"getServerGrowth\"));\n const server = safeGetServer(ip, \"getServerGrowth\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", \"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 (ip: any): any {\n updateDynamicRam(\"getServerNumPortsRequired\", getRamCost(\"getServerNumPortsRequired\"));\n const server = safeGetServer(ip, \"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(\"getServerNumPortsRequired\", `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam: function (ip: any): any {\n updateDynamicRam(\"getServerRam\", getRamCost(\"getServerRam\"));\n const server = safeGetServer(ip, \"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 (ip: any): any {\n updateDynamicRam(\"getServerMaxRam\", getRamCost(\"getServerMaxRam\"));\n const server = safeGetServer(ip, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", `returned ${numeralWrapper.formatRAM(server.maxRam)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (ip: any): any {\n updateDynamicRam(\"getServerUsedRam\", getRamCost(\"getServerUsedRam\"));\n const server = safeGetServer(ip, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", `returned ${numeralWrapper.formatRAM(server.ramUsed)}`);\n return server.ramUsed;\n },\n serverExists: function (ip: any): any {\n updateDynamicRam(\"serverExists\", getRamCost(\"serverExists\"));\n return GetServer(ip) !== null;\n },\n fileExists: function (filename: any, ip: 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 = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"fileExists\", `Invalid IP/hostname: ${ip}`);\n }\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 (!(server.messages[i] instanceof Message) && 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, ip: any = workerScript.hostname, ...scriptArgs: any): any {\n updateDynamicRam(\"isRunning\", getRamCost(\"isRunning\"));\n if (fn === undefined || ip === 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, ip, \"isRunning\", scriptArgs) != null;\n }\n },\n getStockSymbols: function (): any {\n updateDynamicRam(\"getStockSymbols\", getRamCost(\"getStockSymbols\"));\n checkTixApiAccess(\"getStockSymbols\");\n return Object.values(StockSymbols);\n },\n getStockPrice: function (symbol: any): any {\n updateDynamicRam(\"getStockPrice\", getRamCost(\"getStockPrice\"));\n checkTixApiAccess(\"getStockPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockPrice\");\n\n return stock.price;\n },\n getStockAskPrice: function (symbol: any): any {\n updateDynamicRam(\"getStockAskPrice\", getRamCost(\"getStockAskPrice\"));\n checkTixApiAccess(\"getStockAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockAskPrice\");\n\n return stock.getAskPrice();\n },\n getStockBidPrice: function (symbol: any): any {\n updateDynamicRam(\"getStockBidPrice\", getRamCost(\"getStockBidPrice\"));\n checkTixApiAccess(\"getStockBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockBidPrice\");\n\n return stock.getBidPrice();\n },\n getStockPosition: function (symbol: any): any {\n updateDynamicRam(\"getStockPosition\", getRamCost(\"getStockPosition\"));\n checkTixApiAccess(\"getStockPosition\");\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw makeRuntimeErrorMsg(\"getStockPosition\", `Invalid stock symbol: ${symbol}`);\n }\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getStockMaxShares: function (symbol: any): any {\n updateDynamicRam(\"getStockMaxShares\", getRamCost(\"getStockMaxShares\"));\n checkTixApiAccess(\"getStockMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getStockMaxShares\");\n\n return stock.maxShares;\n },\n getStockPurchaseCost: function (symbol: any, shares: any, posType: any): any {\n updateDynamicRam(\"getStockPurchaseCost\", getRamCost(\"getStockPurchaseCost\"));\n checkTixApiAccess(\"getStockPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getStockPurchaseCost\");\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 getStockSaleGain: function (symbol: any, shares: any, posType: any): any {\n updateDynamicRam(\"getStockSaleGain\", getRamCost(\"getStockSaleGain\"));\n checkTixApiAccess(\"getStockSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getStockSaleGain\");\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 buyStock: function (symbol: any, shares: any): any {\n updateDynamicRam(\"buyStock\", getRamCost(\"buyStock\"));\n checkTixApiAccess(\"buyStock\");\n const stock = getStockFromSymbol(symbol, \"buyStock\");\n const res = buyStock(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellStock: function (symbol: any, shares: any): any {\n updateDynamicRam(\"sellStock\", getRamCost(\"sellStock\"));\n checkTixApiAccess(\"sellStock\");\n const stock = getStockFromSymbol(symbol, \"sellStock\");\n const res = sellStock(stock, shares, workerScript, {});\n\n return res ? stock.price : 0;\n },\n shortStock: function (symbol: any, shares: any): any {\n updateDynamicRam(\"shortStock\", getRamCost(\"shortStock\"));\n checkTixApiAccess(\"shortStock\");\n if (Player.bitNodeN !== 8) {\n if (SourceFileFlags[8] <= 1) {\n throw makeRuntimeErrorMsg(\n \"shortStock\",\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, \"shortStock\");\n const res = shortStock(stock, shares, workerScript, {});\n\n return res ? stock.price : 0;\n },\n sellShort: function (symbol: any, shares: any): any {\n updateDynamicRam(\"sellShort\", getRamCost(\"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n if (Player.bitNodeN !== 8) {\n if (SourceFileFlags[8] <= 1) {\n throw 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.price : 0;\n },\n placeOrder: function (symbol: any, shares: any, price: any, type: any, pos: any): any {\n updateDynamicRam(\"placeOrder\", getRamCost(\"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n if (Player.bitNodeN !== 8) {\n if (SourceFileFlags[8] <= 2) {\n throw 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 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 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 updateDynamicRam(\"cancelOrder\", getRamCost(\"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n if (Player.bitNodeN !== 8) {\n if (SourceFileFlags[8] <= 2) {\n throw 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 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 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 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 updateDynamicRam(\"getOrders\", getRamCost(\"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n if (Player.bitNodeN !== 8) {\n if (SourceFileFlags[8] <= 2) {\n throw makeRuntimeErrorMsg(\"getOrders\", \"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\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 getStockVolatility: function (symbol: any): any {\n updateDynamicRam(\"getStockVolatility\", getRamCost(\"getStockVolatility\"));\n if (!Player.has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getStockVolatility\");\n\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getStockForecast: function (symbol: any): any {\n updateDynamicRam(\"getStockForecast\", getRamCost(\"getStockForecast\"));\n if (!Player.has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getStockForecast\");\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 updateDynamicRam(\"purchase4SMarketData\", getRamCost(\"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (Player.has4SData) {\n workerScript.log(\"purchase4SMarketData\", \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (Player.money.lt(getStockMarket4SDataCost())) {\n workerScript.log(\"purchase4SMarketData\", \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n Player.has4SData = true;\n Player.loseMoney(getStockMarket4SDataCost());\n workerScript.log(\"purchase4SMarketData\", \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n updateDynamicRam(\"purchase4SMarketDataTixApi\", getRamCost(\"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (Player.has4SDataTixApi) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (Player.money.lt(getStockMarket4STixApiCost())) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n Player.has4SDataTixApi = true;\n Player.loseMoney(getStockMarket4STixApiCost());\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Purchased 4S Market Data TIX API\");\n return true;\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 (hostname: any, ram: any): any {\n updateDynamicRam(\"purchaseServer\", getRamCost(\"purchaseServer\"));\n let hostnameStr = String(hostname);\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 `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.lt(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);\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 (hostname: any): any {\n updateDynamicRam(\"deleteServer\", getRamCost(\"deleteServer\"));\n let hostnameStr = String(hostname);\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 if (server == null) {\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 ip = 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 (ip === 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 '${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 (ip == 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 ${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(ip);\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 (ip == 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 ${server.hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n },\n getPurchasedServers: function (hostname: any = true): any {\n updateDynamicRam(\"getPurchasedServers\", getRamCost(\"getPurchasedServers\"));\n const res: string[] = [];\n Player.purchasedServers.forEach(function (ip) {\n if (hostname) {\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getPurchasedServers\", \"Could not find server. This is a bug. Report to dev.\");\n }\n res.push(server.hostname);\n } else {\n res.push(ip);\n }\n });\n return res;\n },\n write: function (port: any, data: any = \"\", mode: any = \"a\"): any {\n updateDynamicRam(\"write\", getRamCost(\"write\"));\n if (!isNaN(port)) {\n // Write to port\n // Port 1-10\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"write\",\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(\"write\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport.write(data);\n } else 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) {\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 tryWrite: function (port: any, data: any = \"\"): any {\n updateDynamicRam(\"tryWrite\", getRamCost(\"tryWrite\"));\n if (!isNaN(port)) {\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"tryWrite\",\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(\"tryWrite\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport.tryWrite(data);\n } else {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid argument: ${port}`);\n }\n },\n read: function (port: any): any {\n updateDynamicRam(\"read\", getRamCost(\"read\"));\n if (!isNaN(port)) {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"read\",\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(\"read\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n const x = iport.read();\n console.log(x);\n return x;\n } else 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 console.log(x);\n return x;\n },\n clear: function (port: any): any {\n updateDynamicRam(\"clear\", getRamCost(\"clear\"));\n if (!isNaN(port)) {\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 } else if (isString(port)) {\n // Clear text file\n const fn = port;\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: ${port}`);\n }\n return 0;\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, ip: any): any {\n updateDynamicRam(\"rm\", getRamCost(\"rm\"));\n\n if (ip == null || ip === \"\") {\n ip = workerScript.hostname;\n }\n const s = safeGetServer(ip, \"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, ip: any): any {\n updateDynamicRam(\"scriptRunning\", getRamCost(\"scriptRunning\"));\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptRunning\", `Invalid IP/hostname: ${ip}`);\n }\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, ip: any): any {\n updateDynamicRam(\"scriptKill\", getRamCost(\"scriptKill\"));\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptKill\", `Invalid IP/hostname: ${ip}`);\n }\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 }\n }\n return suc;\n },\n getScriptName: function (): any {\n return workerScript.name;\n },\n getScriptRam: function (scriptname: any, ip: any = workerScript.hostname): any {\n updateDynamicRam(\"getScriptRam\", getRamCost(\"getScriptRam\"));\n const server = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptRam\", `Invalid IP/hostname: ${ip}`);\n }\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, ip: any, ...args: any[]): any {\n updateDynamicRam(\"getRunningScript\", getRamCost(\"getRunningScript\"));\n\n let runningScript;\n if (args.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n const scriptArgs = [];\n for (let i = 2; i < args.length; ++i) {\n scriptArgs.push(args[i]);\n }\n runningScript = getRunningScript(fn, ip, \"getRunningScript\", scriptArgs);\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 (ip: any): any {\n updateDynamicRam(\"getHackTime\", getRamCost(\"getHackTime\"));\n const server = safeGetServer(ip, \"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); // Returns seconds\n },\n getGrowTime: function (ip: any): any {\n updateDynamicRam(\"getGrowTime\", getRamCost(\"getGrowTime\"));\n const server = safeGetServer(ip, \"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); // Returns seconds\n },\n getWeakenTime: function (ip: any): any {\n updateDynamicRam(\"getWeakenTime\", getRamCost(\"getWeakenTime\"));\n const server = safeGetServer(ip, \"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); // Returns seconds\n },\n getScriptIncome: function (scriptname: any, ip: 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 = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptIncome\", `Invalid IP/hostnamed: ${ip}`);\n }\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, ip: 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 = GetServer(ip);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptExpGain\", `Invalid IP/hostnamed: ${ip}`);\n }\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 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, ip: 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(ip, \"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(\"wget\", `Successfully retrieved content and overwrote '${target}' on '${ip}'`);\n return resolve(true);\n }\n workerScript.log(\"wget\", `Successfully retrieved content to new file '${target}' on '${ip}'`);\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\n /* Singularity Functions */\n universityCourse: function (universityName: any, className: any): any {\n updateDynamicRam(\"universityCourse\", getRamCost(\"universityCourse\"));\n 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 updateDynamicRam(\"gymWorkout\", getRamCost(\"gymWorkout\"));\n 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(\"gymWorkout\", \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\");\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(\"gymWorkout\", \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\");\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(\"gymWorkout\", \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\");\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 updateDynamicRam(\"travelToCity\", getRamCost(\"travelToCity\"));\n 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.lt(CONSTANTS.TravelCost)) {\n throw makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n Player.loseMoney(CONSTANTS.TravelCost);\n Player.city = cityname;\n workerScript.log(\"travelToCity\", `Traveled to ${cityname}`);\n return true;\n default:\n workerScript.log(\"travelToCity\", `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n\n purchaseTor: function (): any {\n updateDynamicRam(\"purchaseTor\", getRamCost(\"purchaseTor\"));\n 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.lt(CONSTANTS.TorRouterCost)) {\n workerScript.log(\"purchaseTor\", \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n Player.loseMoney(CONSTANTS.TorRouterCost);\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 updateDynamicRam(\"purchaseProgram\", getRamCost(\"purchaseProgram\"));\n 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 let item = null;\n for (const key in DarkWebItems) {\n const i = DarkWebItems[key];\n if (i.program.toLowerCase() == programName) {\n item = i;\n }\n }\n\n if (item == null) {\n workerScript.log(\"purchaseProgram\", `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (Player.money.lt(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);\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 return true;\n },\n getCurrentServer: function (): any {\n updateDynamicRam(\"getCurrentServer\", getRamCost(\"getCurrentServer\"));\n checkSingularityAccess(\"getCurrentServer\", 1);\n return Player.getCurrentServer().hostname;\n },\n connect: function (hostname: any): any {\n updateDynamicRam(\"connect\", getRamCost(\"connect\"));\n checkSingularityAccess(\"connect\", 1);\n if (!hostname) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n const target = GetServer(hostname);\n if (target == null) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n return;\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 updateDynamicRam(\"manualHack\", getRamCost(\"manualHack\"));\n checkSingularityAccess(\"manualHack\", 1);\n const server = Player.getCurrentServer();\n return hack(server.hostname, true);\n },\n installBackdoor: function (): any {\n updateDynamicRam(\"installBackdoor\", getRamCost(\"installBackdoor\"));\n 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 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 return Promise.resolve();\n });\n },\n getStats: function (): any {\n updateDynamicRam(\"getStats\", getRamCost(\"getStats\"));\n checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", `getStats is deprecated, please use getPlayer`);\n\n return {\n hacking: Player.hacking_skill,\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 updateDynamicRam(\"getCharacterInformation\", getRamCost(\"getCharacterInformation\"));\n 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 getPlayer: function (): any {\n updateDynamicRam(\"getPlayer\", getRamCost(\"getPlayer\"));\n\n const data = {\n hacking_skill: Player.hacking_skill,\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.toNumber(),\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 hospitalize: function (): any {\n updateDynamicRam(\"hospitalize\", getRamCost(\"hospitalize\"));\n checkSingularityAccess(\"hospitalize\", 1);\n return Player.hospitalize();\n },\n isBusy: function (): any {\n updateDynamicRam(\"isBusy\", getRamCost(\"isBusy\"));\n checkSingularityAccess(\"isBusy\", 1);\n return Player.isWorking;\n },\n stopAction: function (): any {\n updateDynamicRam(\"stopAction\", getRamCost(\"stopAction\"));\n 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 upgradeHomeRam: function (): any {\n updateDynamicRam(\"upgradeHomeRam\", getRamCost(\"upgradeHomeRam\"));\n 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.lt(cost)) {\n workerScript.log(\"upgradeHomeRam\", `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`);\n return false;\n }\n\n homeComputer.maxRam *= 2;\n Player.loseMoney(cost);\n\n Player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain);\n workerScript.log(\n \"upgradeHomeRam\",\n `Purchased additional RAM for home computer! It now has ${homeComputer.maxRam}GB of RAM.`,\n );\n return true;\n },\n getUpgradeHomeRamCost: function (): any {\n updateDynamicRam(\"getUpgradeHomeRamCost\", getRamCost(\"getUpgradeHomeRamCost\"));\n checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n\n return Player.getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName: any): any {\n updateDynamicRam(\"workForCompany\", getRamCost(\"workForCompany\"));\n 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(\"workForCompany\", `Began working at '${Player.companyName}' as a '${companyPositionName}'`);\n return true;\n },\n applyToCompany: function (companyName: any, field: any): any {\n updateDynamicRam(\"applyToCompany\", getRamCost(\"applyToCompany\"));\n 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 updateDynamicRam(\"getCompanyRep\", getRamCost(\"getCompanyRep\"));\n checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName: any): any {\n updateDynamicRam(\"getCompanyFavor\", getRamCost(\"getCompanyFavor\"));\n checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName: any): any {\n updateDynamicRam(\"getCompanyFavorGain\", getRamCost(\"getCompanyFavorGain\"));\n checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain()[0];\n },\n checkFactionInvitations: function (): any {\n updateDynamicRam(\"checkFactionInvitations\", getRamCost(\"checkFactionInvitations\"));\n checkSingularityAccess(\"checkFactionInvitations\", 2);\n // Make a copy of Player.factionInvitations\n return Player.factionInvitations.slice();\n },\n joinFaction: function (name: any): any {\n updateDynamicRam(\"joinFaction\", getRamCost(\"joinFaction\"));\n 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 updateDynamicRam(\"workForFaction\", getRamCost(\"workForFaction\"));\n 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;\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 updateDynamicRam(\"getFactionRep\", getRamCost(\"getFactionRep\"));\n checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name: any): any {\n updateDynamicRam(\"getFactionFavor\", getRamCost(\"getFactionFavor\"));\n checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name: any): any {\n updateDynamicRam(\"getFactionFavorGain\", getRamCost(\"getFactionFavorGain\"));\n checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain()[0];\n },\n donateToFaction: function (name: any, amt: any): any {\n updateDynamicRam(\"donateToFaction\", getRamCost(\"donateToFaction\"));\n 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.lt(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 `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);\n workerScript.log(\n \"donateToFaction\",\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 updateDynamicRam(\"createProgram\", getRamCost(\"createProgram\"));\n 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 let p = null;\n for (const key in Programs) {\n if (Programs[key].name.toLowerCase() == name) {\n p = Programs[key];\n }\n }\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(\"createProgram\", `Hacking level is too low to create '${p.name}' (level ${create.level} req)`);\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 updateDynamicRam(\"commitCrime\", getRamCost(\"commitCrime\"));\n 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 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 updateDynamicRam(\"getCrimeChance\", getRamCost(\"getCrimeChance\"));\n checkSingularityAccess(\"getCrimeChance\", 3);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(Player);\n },\n getCrimeStats: function (crimeRoughName: any): any {\n updateDynamicRam(\"getCrimeStats\", getRamCost(\"getCrimeStats\"));\n checkSingularityAccess(\"getCrimeStats\", 3);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getOwnedAugmentations: function (purchased: any = false): any {\n updateDynamicRam(\"getOwnedAugmentations\", getRamCost(\"getOwnedAugmentations\"));\n 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 getOwnedSourceFiles: function (): any {\n updateDynamicRam(\"getOwnedSourceFiles\", getRamCost(\"getOwnedSourceFiles\"));\n checkSingularityAccess(\"getOwnedSourceFiles\", 3);\n const res = [];\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 });\n }\n return res;\n },\n getAugmentationsFromFaction: function (facname: any): any {\n updateDynamicRam(\"getAugmentationsFromFaction\", getRamCost(\"getAugmentationsFromFaction\"));\n 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 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 updateDynamicRam(\"getAugmentationCost\", getRamCost(\"getAugmentationCost\"));\n checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name: any): any {\n updateDynamicRam(\"getAugmentationPrereq\", getRamCost(\"getAugmentationPrereq\"));\n checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name: any): any {\n updateDynamicRam(\"getAugmentationPrice\", getRamCost(\"getAugmentationPrice\"));\n checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name: any): any {\n updateDynamicRam(\"getAugmentationRepReq\", getRamCost(\"getAugmentationRepReq\"));\n checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name: any): any {\n updateDynamicRam(\"getAugmentationStats\", getRamCost(\"getAugmentationStats\"));\n 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 updateDynamicRam(\"purchaseAugmentation\", getRamCost(\"purchaseAugmentation\"));\n 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(\"purchaseAugmentation\", `Faction '${faction}' does not have the '${name}' augmentation.`);\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 updateDynamicRam(\"softReset\", getRamCost(\"softReset\"));\n 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 updateDynamicRam(\"installAugmentations\", getRamCost(\"installAugmentations\"));\n 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(\"installAugmentations\", \"Installing Augmentations. This will cause this script to be killed\");\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 // Gang API\n gang: gang,\n\n // Bladeburner API\n bladeburner: {\n getContractNames: function (): any {\n 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 (): any {\n 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 (): any {\n 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 = \"\"): any {\n updateDynamicRam(\"getBlackOpRank\", getRamCost(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action: any = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function (): any {\n 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 (): any {\n 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 = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function (): any {\n 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 (): any {\n 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 = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type: any = \"\", name: any = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type: any = \"\", name: any = \"\", level: any): any {\n 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 = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type: any = \"\", name: any = \"\"): any {\n 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 = \"\"): any {\n 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 = \"\"): any {\n 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): any {\n 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): any {\n updateDynamicRam(\"setActionLevel\", getRamCost(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n if (level < 1 || level > action.maxLevel) {\n throw 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 (): any {\n 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 (): any {\n 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 = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName: any = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName: any): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type: any = \"\", name: any = \"\"): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type: any = \"\", name: any = \"\", size: any): any {\n 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) {\n throw makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName: any): any {\n 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 getCityEstimatedCommunities: function (cityName: any): any {\n updateDynamicRam(\"getCityEstimatedCommunities\", getRamCost(\"bladeburner\", \"getCityEstimatedCommunities\"));\n checkBladeburnerAccess(\"getCityEstimatedCommunities\");\n checkBladeburnerCity(\"getCityEstimatedCommunities\", cityName);\n const bladeburner = Player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].commsEst;\n },\n getCityChaos: function (cityName: any): any {\n 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 (): any {\n 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): any {\n 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 (): any {\n 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 (): any {\n 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 (): any {\n updateDynamicRam(\"joinBladeburnerDivision\", getRamCost(\"bladeburner\", \"joinBladeburnerDivision\"));\n const bladeburner = Player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n if (Player.bitNodeN === 7 || SourceFileFlags[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 },\n getBonusTime: function (): any {\n 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 }, // End Bladeburner\n\n // Hi, if you're reading this you're a bit nosy.\n // There's a corporation API but it's very imbalanced right now.\n // It's here so players can test with if they want.\n corporation: {\n expandIndustry: function (industryName: any, divisionName: any): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n NewIndustry(corporation, industryName, divisionName);\n },\n expandCity: function (divisionName: any, cityName: any): any {\n const division = getDivision(divisionName);\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n NewCity(corporation, division, cityName);\n },\n unlockUpgrade: function (upgradeName: any): any {\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n UnlockUpgrade(corporation, upgrade);\n },\n levelUpgrade: function (upgradeName: any): any {\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n LevelUpgrade(corporation, upgrade);\n },\n issueDividends: function (percent: any): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n IssueDividends(corporation, percent);\n },\n sellMaterial: function (divisionName: any, cityName: any, materialName: any, amt: any, price: any): any {\n const material = getMaterial(divisionName, cityName, materialName);\n SellMaterial(material, amt, price);\n },\n sellProduct: function (divisionName: any, cityName: any, productName: any, amt: any, price: any, all: any): any {\n const product = getProduct(divisionName, productName);\n SellProduct(product, cityName, amt, price, all);\n },\n discontinueProduct: function (divisionName: any, productName: any): any {\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (divisionName: any, cityName: any, enabled: any): any {\n const warehouse = getWarehouse(divisionName, cityName);\n SetSmartSupply(warehouse, enabled);\n },\n // setSmartSupplyUseLeftovers: function (): any {},\n buyMaterial: function (divisionName: any, cityName: any, materialName: any, amt: any): any {\n const material = getMaterial(divisionName, cityName, materialName);\n BuyMaterial(material, amt);\n },\n employees: function (divisionName: any, cityName: any): any {\n const office = getOffice(divisionName, cityName);\n return office.employees.map((e) => Object.assign({}, e));\n },\n assignJob: function (divisionName: any, cityName: any, employeeName: any, job: any): any {\n const employee = getEmployee(divisionName, cityName, employeeName);\n AssignJob(employee, job);\n },\n hireEmployee: function (divisionName: any, cityName: any): any {\n const office = getOffice(divisionName, cityName);\n office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (divisionName: any, cityName: any, size: any): any {\n const office = getOffice(divisionName, cityName);\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n UpgradeOfficeSize(corporation, office, size);\n },\n throwParty: function (divisionName: any, cityName: any, costPerEmployee: any): any {\n const office = getOffice(divisionName, cityName);\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n ThrowParty(corporation, office, costPerEmployee);\n },\n purchaseWarehouse: function (divisionName: any, cityName: any): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n PurchaseWarehouse(corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (divisionName: any, cityName: any): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n UpgradeWarehouse(corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n buyCoffee: function (divisionName: any, cityName: any): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n BuyCoffee(corporation, getDivision(divisionName), getOffice(divisionName, cityName));\n },\n hireAdVert: function (divisionName: any): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n HireAdVert(corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n makeProduct: function (\n divisionName: any,\n cityName: any,\n productName: any,\n designInvest: any,\n marketingInvest: any,\n ): any {\n const corporation = Player.corporation;\n if (corporation === null) throw new Error(\"Should not be called without a corporation\");\n MakeProduct(corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n research: function (divisionName: any, researchName: any): any {\n Research(getDivision(divisionName), researchName);\n },\n exportMaterial: function (\n sourceDivision: any,\n sourceCity: any,\n targetDivision: any,\n targetCity: any,\n materialName: any,\n amt: any,\n ): any {\n ExportMaterial(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (\n sourceDivision: any,\n sourceCity: any,\n targetDivision: any,\n targetCity: any,\n materialName: any,\n amt: any,\n ): any {\n CancelExportMaterial(\n targetDivision,\n targetCity,\n getMaterial(sourceDivision, sourceCity, materialName),\n amt + \"\",\n );\n },\n setMaterialMarketTA1: function (divisionName: any, cityName: any, materialName: any, on: any): any {\n SetMaterialMarketTA1(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (divisionName: any, cityName: any, materialName: any, on: any) {\n SetMaterialMarketTA2(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (divisionName: any, productName: any, on: any): any {\n SetProductMarketTA1(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (divisionName: any, productName: any, on: any) {\n SetProductMarketTA2(getProduct(divisionName, productName), on);\n },\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (divisionName: any): any {\n return getDivision(divisionName);\n },\n getOffice: function (divisionName: any, cityName: any): any {\n return getOffice(divisionName, cityName);\n },\n getWarehouse: function (divisionName: any, cityName: any): any {\n return getWarehouse(divisionName, cityName);\n },\n getMaterial: function (divisionName: any, cityName: any, materialName: any): any {\n return getMaterial(divisionName, cityName, materialName);\n },\n getProduct: function (divisionName: any, productName: any): any {\n return getProduct(divisionName, productName);\n },\n getEmployee: function (divisionName: any, cityName: any, employeeName: any): any {\n return getEmployee(divisionName, cityName, employeeName);\n },\n }, // End Corporation API\n\n // Coding Contract API\n codingcontract: {\n attempt: function (answer: any, fn: any, ip: any = workerScript.hostname, { returnReward }: any = {}): any {\n updateDynamicRam(\"attempt\", getRamCost(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", ip, fn);\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 = safeGetServer(ip, \"codingcontract.attempt\");\n if (contract.isSolution(answer)) {\n const reward = Player.gainCodingContractReward(creward, contract.getDifficulty());\n workerScript.log(\"attempt\", `Successfully completed Coding Contract '${fn}'. Reward: ${reward}`);\n serv.removeContract(fn);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. Contract is now self-destructing`);\n serv.removeContract(fn);\n } else {\n workerScript.log(\n \"attempt\",\n `Coding Contract attempt '${fn}' failed. ${\n contract.getMaxNumTries() - contract.tries\n } attempts remaining.`,\n );\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (fn: any, ip: any = workerScript.hostname): any {\n updateDynamicRam(\"getContractType\", getRamCost(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", ip, fn);\n return contract.getType();\n },\n getData: function (fn: any, ip: any = workerScript.hostname): any {\n updateDynamicRam(\"getData\", getRamCost(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", ip, fn);\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 (fn: any, ip: any = workerScript.hostname): any {\n updateDynamicRam(\"getDescription\", getRamCost(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", ip, fn);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (fn: any, ip: any = workerScript.hostname): any {\n updateDynamicRam(\"getNumTriesRemaining\", getRamCost(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", ip, fn);\n return contract.getMaxNumTries() - contract.tries;\n },\n }, // End coding contracts\n\n sleeve: sleeve,\n formulas: {\n basic: {\n calculateSkill: function (exp: any, mult: any = 1): any {\n checkFormulasAccess(\"basic.calculateSkill\", 5);\n return calculateSkill(exp, mult);\n },\n calculateExp: function (skill: any, mult: any = 1): any {\n checkFormulasAccess(\"basic.calculateExp\", 5);\n return calculateExp(skill, mult);\n },\n hackChance: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackChance\", 5);\n return calculateHackingChance(server, player);\n },\n hackExp: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackExp\", 5);\n return calculateHackingExpGain(server, player);\n },\n hackPercent: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackPercent\", 5);\n return calculatePercentMoneyHacked(server, player);\n },\n growPercent: function (server: any, threads: any, player: any, cores: any = 1): any {\n checkFormulasAccess(\"basic.growPercent\", 5);\n return calculateServerGrowth(server, threads, player, cores);\n },\n hackTime: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.hackTime\", 5);\n return calculateHackingTime(server, player);\n },\n growTime: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.growTime\", 5);\n return calculateGrowTime(server, player);\n },\n weakenTime: function (server: any, player: any): any {\n checkFormulasAccess(\"basic.weakenTime\", 5);\n return calculateWeakenTime(server, player);\n },\n },\n hacknetNodes: {\n moneyGainRate: function (level: any, ram: any, cores: any, mult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\", 5);\n return calculateMoneyGainRate(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\", 5);\n return calculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\", 5);\n return calculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore: any, extraCores: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\", 5);\n return calculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n: any, mult: any): any {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\", 5);\n return calculateNodeCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetNodes.constants\", 5);\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\", 9);\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\", 9);\n return HScalculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam: any, extraLevels: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\", 9);\n return HScalculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore: any, extraCores: any = 1, costMult: any = 1): any {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\", 9);\n return HScalculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache: any, extraCache: any = 1): any {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\", 9);\n return HScalculateCacheUpgradeCost(startingCache, extraCache);\n },\n hashUpgradeCost: function (upgName: any, level: any): any {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\", 9);\n const upg = Player.hashManager.getUpgrade(upgName);\n if (!upg) {\n throw 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): any {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\", 9);\n return HScalculateServerCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetServers.constants\", 9);\n return Object.assign({}, HacknetServerConstants);\n },\n },\n }, // end formulas\n flags: 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: workerScript.args });\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 ...extra,\n };\n\n function getFunctionNames(obj: NS): string[] {\n const functionNames: string[] = [];\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value));\n }\n }\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map((a) => [a, true]));\n\n return functions;\n} // End NetscriptFunction()\n\nexport { NetscriptFunctions };\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 { 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","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","/**\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\";\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) {\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);\n player.recordMoneySource(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 additiveGain = 0.75 * gainRoll * AllGangs[name].territory;\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 for (let i = 0; i < GangConstants.Names.length; ++i) {\n const others = GangConstants.Names.filter((e) => {\n return e !== GangConstants.Names[i];\n });\n const other = getRandomInt(0, others.length - 1);\n\n const thisGang = GangConstants.Names[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(1, 1 + Math.log(AllGangs[winGang].power / AllGangs[loseGang].power) / Math.log(50));\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 AllGangs[otherGang].territory -= territoryGain;\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 AllGangs[otherGang].territory += territoryGain;\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 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) {\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 { 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","/**\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 return map;\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_skill) {\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","/**\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 { Message } from \"../Message/Message\";\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\";\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: (Message | 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 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 /**\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, CodingContractType, 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 }\n }\n\n function close(): void {\n if (props === null) return;\n props.onClose();\n setProps(null);\n }\n\n const contractType: CodingContractType = 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","/**\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 { 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\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(func: any): number {\n if (typeof func === \"function\") {\n try {\n let res;\n if (func.constructor.name === \"AsyncFunction\") {\n res = 0; // Async functions will always be 0 RAM\n } else {\n res = func.apply(null, []);\n }\n if (typeof res === \"number\") {\n return res;\n }\n return 0;\n } catch (e) {\n console.error(`Error applying function: ${e}`);\n return 0;\n }\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.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 {\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\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\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","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 { 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 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 constructor(\n infoText: JSX.Element,\n enemies: string[],\n offerHackingMission: boolean,\n offerHackingWork: boolean,\n offerFieldWork: boolean,\n offerSecurityWork: 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 }\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 ),\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 ),\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 ),\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 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 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 true,\n ),\n\n \"Blade Industries\": new FactionInfo(<>Augmentation is Salvation., [], true, true, true, true, 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 true,\n ),\n\n \"Clarke Incorporated\": new FactionInfo(<>The Power of the Genome - Unlocked., [], true, true, true, true, true),\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 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 true,\n ),\n\n \"KuaiGong International\": new FactionInfo(<>Dream big. Work hard. Make history., [], true, true, true, true, true),\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 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 ),\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 ),\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 ),\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 ),\n Chongqing: new FactionInfo(<>Serve the People., [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true, false),\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 ),\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 ),\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 ),\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 ),\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 ),\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 ),\n\n \"The Syndicate\": new FactionInfo(<>Honor holds you back., [], true, true, true, true, 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 ),\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 ),\n\n \"Slum Snakes\": new FactionInfo(<>Slum Snakes rule!, [], false, false, true, true, 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),\n\n \"Tian Di Hui\": new FactionInfo(<>Obey Heaven and work righteously., [], true, true, false, true, 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 ),\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 false,\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 * 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 React, { useState, useEffect } from \"react\";\n\nimport { Snackbar as S } from \"@mui/material\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\nexport const GameSavedEvents = new EventEmitter<[]>();\n\nexport function Snackbar(): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n useEffect(() => GameSavedEvents.subscribe(() => setOpen(true)));\n return (\n setOpen(false)}\n >\n \n Game Saved!\n \n \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","/**\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","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 * 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 WARNING: changing the level will restart the Operation : \"\"}>\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 { 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","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);\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 if (randKey === AugmentationNames.TheRedPill || randKey === AugmentationNames.NeuroFluxGovernor) {\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 { 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 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","/**\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);\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 } 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 { js_beautify as beautifyCode } from \"js-beautify\";\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 } from \"../../Script/RamCalculations\";\nimport { RamCalculationErrorCode } from \"../../Script/RamCalculationErrorCodes\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CursorPositions } from \"../CursorPositions\";\nimport { libSource } from \"../NetscriptDefinitions\";\nimport { NetscriptFunctions } from \"../../NetscriptFunctions\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { iTutorialNextStep, ITutorial, iTutorialSteps } from \"../../InteractiveTutorial\";\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\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\"];\n symbols = symbols.filter((symbol: string) => !exclude.includes(symbol));\n}\n\ninterface IProps {\n filename: string;\n code: 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\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 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 [ram, setRAM] = useState(\"RAM: ???\");\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 // 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'!\");\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, props.player.currentServer, server.scripts);\n found = true;\n }\n }\n\n if (!found) {\n const script = new Script();\n script.saveScript(filename, code, props.player.currentServer, 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 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 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 props.router.toTerminal();\n }\n\n function beautify(): void {\n if (editorRef.current === null) return;\n const pretty = beautifyCode(code, {\n indent_with_tabs: !options.insertSpaces,\n indent_size: 4,\n brace_style: \"preserve-inline\",\n });\n editorRef.current.setValue(pretty);\n }\n\n function onFilenameChange(event: React.ChangeEvent): void {\n lastFilename = event.target.value;\n setFilename(event.target.value);\n }\n\n function updateCode(newCode?: string): void {\n if (newCode === undefined) return;\n lastCode = newCode;\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n }\n setCode(newCode);\n }\n\n async function updateRAM(): Promise {\n const codeCopy = code + \"\";\n const ramUsage = await calculateRamUsage(codeCopy, props.player.getCurrentServer().scripts);\n if (ramUsage > 0) {\n setRAM(\"RAM: \" + numeralWrapper.formatRAM(ramUsage));\n return;\n }\n switch (ramUsage) {\n case RamCalculationErrorCode.ImportError: {\n setRAM(\"RAM: Import Error\");\n break;\n }\n case RamCalculationErrorCode.URLImportError: {\n setRAM(\"RAM: HTTP Import Error\");\n break;\n }\n case RamCalculationErrorCode.SyntaxError:\n default: {\n setRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n return new Promise(() => undefined);\n }\n\n useEffect(() => {\n const id = setInterval(updateRAM, 1000);\n return () => clearInterval(id);\n }, [code]);\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 monaco.languages.typescript.javascriptDefaults.addExtraLib(libSource, \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(libSource, \"netscript.d.ts\");\n }\n\n return (\n <>\n \n Script name:  }}\n />\n setOptionsOpen(true)}>\n <>\n \n options\n \n \n \n Loading script editor!}\n height=\"90%\"\n defaultLanguage=\"javascript\"\n defaultValue={code}\n onChange={updateCode}\n theme={options.theme}\n options={options}\n />\n \n \n {ram}\n \n \n Netscript Documentation\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 * 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 aria-label=\"next page\"\n >\n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}\n aria-label=\"last page\"\n >\n {theme.direction === \"rtl\" ? : }\n \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","// 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, Math.log(51.0) - Math.log(50.0), Math.log(51.0));\n return fma(500.0, Math.exp(ex), -25000.0);\n}\n\n// Wolfram Alpha: 500 (50^(-n) 51^(n + 1) - 50) solve for n\nexport function repToFavor(r: number): number {\n return -Math.log(25500 / (r + 25000)) / Math.log(51 / 50);\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","// 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","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","// 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 { 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\";\nimport { Locations } from \"./Locations/Locations\";\nimport { LocationName } from \"./Locations/data/LocationNames\";\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 // Working\n if (Player.isWorking) {\n if (Player.workType == CONSTANTS.WorkTypeFaction) {\n if (Player.workForFaction(numCycles)) {\n Router.toFaction();\n }\n } else if (Player.workType == CONSTANTS.WorkTypeCreateProgram) {\n if (Player.createProgramWork(numCycles)) {\n Router.toTerminal();\n }\n } else if (Player.workType == CONSTANTS.WorkTypeStudyClass) {\n if (Player.takeClass(numCycles)) {\n Router.toCity();\n }\n } else if (Player.workType == CONSTANTS.WorkTypeCrime) {\n if (Player.commitCrime(numCycles)) {\n Router.toLocation(Locations[LocationName.Slums]);\n }\n } else if (Player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n if (Player.workPartTime(numCycles)) {\n Router.toCity();\n }\n } else {\n if (Player.work(numCycles)) {\n Router.toCity();\n }\n }\n }\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 // 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 let offlineReputation = 0;\n const offlineHackingIncome = (Player.moneySourceA.hacking / Player.playtimeSinceLastAug) * timeOffline * 0.75;\n Player.gainMoney(offlineHackingIncome);\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 // 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\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\";\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\";\n\nexport function LoadingScreen(): React.ReactElement {\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 Engine.load(saveString);\n setLoaded(true);\n })\n .catch((reason) => {\n console.error(reason);\n Engine.load(\"\");\n setLoaded(true);\n });\n }\n doLoad();\n }, []);\n\n if (loaded) {\n return ;\n }\n\n return (\n \n \n \n \n \n Loading Bitburner v{CONSTANTS.Version}\n \n {show && (\n \n \n If the game fails to load, consider killing all scripts\n \n \n )}\n \n );\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 * 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","/**\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\";\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 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 );\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","export type 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","export const libSource = `interface NS {\n args: string[];\n /**\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n * Example documentation for scan.\n */\n scan(ip: string, hostnames: boolean): string[];\n hack(ip: string, threads: number, stock: boolean): Promise;\n hackAnalyzeThreads(ip: string, hackAmount: number): number;\n hackAnalyzePercent(ip: string): number;\n hackChance(ip: string): number;\n sleep(time: number): Promise;\n grow(ip: string, threads: number, stock: boolean): Promise;\n growthAnalyze(ip: string, growth: number): number;\n weaken(ip: string, threads: boolean): Promise;\n print(...args: any[]): void;\n tprint(...args: any[]): void;\n clearLog(): void;\n disableLog(fn: string): void;\n enableLog(fn: string): void;\n isLogEnabled(fn: string): boolean;\n getScriptLogs(fn: string, ip: string, ...scriptArgs: any[]): string[];\n tail(fn: string, ip: string, ...scriptArgs: any[]): void;\n nuke(ip: string): boolean;\n brutessh(ip: string): boolean;\n ftpcrack(ip: string): boolean;\n relaysmtp(ip: string): boolean;\n httpworm(ip: string): boolean;\n sqlinject(ip: string): boolean;\n run(scriptname: string, threads: number): number;\n exec(scriptname: string, ip: string, threads: number): number;\n spawn(scriptname: string, threads: number): void;\n kill(filename: string, ip: string, ...scriptArgs: any[]): boolean;\n killall(ip: string): boolean;\n exit(): void;\n scp(scriptname: string, ip1: string, ip2: string): boolean;\n ls(ip: string, grep: string): string[];\n ps(ip: string): {filename: string, threads: number, args: string[], pid: number}[];\n hasRootAccess(ip: string): boolean;\n getIp(): string;\n getHostname(): string;\n getHackingLevel(): number;\n getHackingMultipliers(): number;\n getHacknetMultipliers(): number;\n getBitNodeMultipliers(): number;\n getServer(ip: string): any;\n getServerMoneyAvailable(ip: string): number;\n getServerSecurityLevel(ip: string): number;\n getServerBaseSecurityLevel(ip: string): number;\n getServerMinSecurityLevel(ip: string): number;\n getServerRequiredHackingLevel(ip: string): number;\n getServerMaxMoney(ip: string): number;\n getServerGrowth(ip: string): number;\n getServerNumPortsRequired(ip: string): number;\n getServerRam(ip: string): number[];\n getServerMaxRam(ip: string): number;\n getServerUsedRam(ip: string): number;\n serverExists(ip: string): boolean;\n fileExists(filename: string, ip: string): boolean;\n isRunning(fn: string, ip: string, ...scriptArgs: any[]): boolean;\n getStockSymbols(): string[];\n getStockPrice(symbol: string): number;\n getStockAskPrice(symbol: string): number;\n getStockBidPrice(symbol: string): number;\n getStockPosition(symbol: string): number;\n getStockMaxShares(symbol: string): number;\n getStockPurchaseCost(symbol: string, shares: number, posType: string): number;\n getStockSaleGain(symbol: string, shares: number, posType: string): number;\n buyStock(symbol: string, shares: number): number;\n sellStock(symbol: string, shares: number): number;\n shortStock(symbol: string, shares: number): number;\n sellShort(symbol: string, shares: number): number;\n placeOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n cancelOrder(symbol: string, shares: number, price: number, type: string, pos: string): boolean;\n getOrders(): any;\n getStockVolatility(symbol: string): number;\n getStockForecast(symbol: string): number;\n getPurchasedServerLimit(): number;\n getPurchasedServerMaxRam(): number;\n getPurchasedServerCost(ram: number): number;\n purchaseServer(hostname: string, ram: number): string;\n deleteServer(hostname: string): boolean;\n getPurchasedServers(hostname: string): string[];\n write(port: number, data: string, mode: string): boolean;\n tryWrite(port: number, data: string): boolean;\n read(port: number): any;\n peek(port: number): any;\n clear(port: number): number;\n getPortHandle(port: number): any; // netscript port\n rm(fn: string, ip: string): boolean;\n scriptRunning(scriptname: string, ip: string): boolean;\n scriptKill(scriptname: string, ip: string): boolean;\n getScriptName(): string;\n getScriptRam(scriptname: string, ip: string): number;\n getRunningScript(fn: string, ip: string): any; // running script\n getHackTime(ip: string): number;\n getGrowTime(ip: string): number;\n getWeakenTime(ip: string): number;\n getScriptIncome(scriptname: string, ip: string): number;\n getScriptExpGain(scriptname: string, ip: string): number;\n nFormat(n: number, format: string): string;\n tFormat(milliseconds: number, milliPrecision: boolean): string;\n getTimeSinceLastAug(): number;\n prompt(txt: string): Promise;\n getFavorToDonate(): number;\n universityCourse(universityName: string, className: string): boolean;\n gymWorkout(gymName: string, stat: string): boolean;\n travelToCity(cityname: string): boolean;\n purchaseTor(): boolean;\n purchaseProgram(programName: string): boolean;\n getCurrentServer(): any; // server object\n connect(hostname: string): boolean;\n manualHack(): Promise;\n installBackdoor(): Promise;\n getStats(): any; // complex type\n getCharacterInformation(): any; // complex type\n getPlayer(): any; // complex type\n hospitalize(): number;\n isBusy(): boolean;\n stopAction(): boolean;\n upgradeHomeRam(): number;\n getUpgradeHomeRamCost(): number;\n workForCompany(companyName: string): boolean;\n applyToCompany(companyName: string, field: string): boolean;\n getCompanyRep(companyName: string): number;\n getCompanyFavor(companyName: string): number;\n getCompanyFavorGain(companyName: string): number;\n checkFactionInvitations(): string[];\n joinFaction(name: string): boolean;\n workForFaction(name: string, type: string): boolean;\n getFactionRep(name: string): number;\n getFactionFavor(name: string): number;\n getFactionFavorGain(name: string): number;\n donateToFaction(name: string, amt: number): boolean;\n createProgram(name: string): boolean;\n commitCrime(crimeRoughName: string): number;\n getCrimeChance(crimeRoughName: string): boolean;\n getCrimeStats(crimeRoughName: string): any; // complex type\n getOwnedAugmentations(purchased: boolean): string[];\n getOwnedSourceFiles(): any; // complex type\n getAugmentationsFromFaction(facname: string): string[];\n getAugmentationCost(name: string): number;\n getAugmentationPrereq(name: string): string[];\n getAugmentationPrice(name: string): number;\n getAugmentationRepReq(name: string): number;\n getAugmentationStats(name: string): any; // complex type\n purchaseAugmentation(faction: string, name: string): boolean;\n softReset(cbScript: string): void;\n installAugmentations(cbScript: string): void;\n exploit(): void;\n bypass(doc: any): void;\n flags(data: any): any;\n}`;\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 { 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)[] {\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 {\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 {\n args.push(arg);\n }\n }\n\n return args;\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 \"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 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, 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 { 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)[] = [new Output(`Bitburner v${CONSTANTS.Version}`, \"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): 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 error(s: string): void {\n this.append(new Output(s, \"error\"));\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 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 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);\n player.recordMoneySource(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, 1, 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.print(\"Contract FAILED - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.print(`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 this.print(\n `${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + (s as any).requiredHackingSkill : \"\"}`,\n );\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + (s as any).numOpenPortsRequired);\n }\n this.print(dashes + \"RAM: \" + numeralWrapper.formatRAM(s.maxRam));\n this.print(\" \");\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 // TODO: remove this once we figure out the height issue.\n this.outputHistory = [new Output(`Bitburner v${CONSTANTS.Version}`, \"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.print(\"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.print(\"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.print(\"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.print(\"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.print(\"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.print(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.print(\"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.print(\"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.print(\"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.print(\"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.print(\"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.print(\"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.print(\"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.print(\"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.print(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n default:\n this.print(\"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\") {\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)[],\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 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\nexport interface 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_skill >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p: IPlayer) {\n return p.sourceFiles.length > 0 && p.hacking_skill >= 1;\n };\n}\n\nexport interface 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.print(\"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.print(\"Invalid server IP/hostname\");\n return;\n }\n\n if (!(targetServer instanceof Server)) {\n terminal.print(`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: \"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 =\n player.augmentations.length >= numAugReq && player.money.gt(1e11) && player.hacking_skill >= 2500;\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${numeralWrapper.formatMoney(player.money.toNumber())} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking_skill} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(\"-- Daedalus --\");\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","/**\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 { 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 \"After creating your Corporation, you will see it listed as one of the locations in the city. Click on \" +\n \"your Corporation in order to manage it.

\" +\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 * 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\nimport Decimal from \"decimal.js\";\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: any;\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_skill: 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 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) => 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 gotoLocation: (to: LocationName) => boolean;\n hasAugmentation: (aug: string | Augmentation) => 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) => 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 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\n constructor() {\n //Skills and stats\n this.hacking_skill = 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 = new Decimal(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\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.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.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\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): 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 for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n return false;\n}\n","/**\n * Clears defined properties from an object.\n * Does not delete up the prototype chain.\n * @deprecated Look into using `Map` or `Set` rather than manipulating properties on an Object.\n * @param obj the object to clear all properties\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function clearObject(obj: any): void {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n // tslint:disable-next-line:no-dynamic-delete\n delete obj[key];\n }\n }\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","// 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 { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport Decimal from \"decimal.js\";\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: any;\n lastCycleExpenses: any;\n thisCycleRevenue: any;\n thisCycleExpenses: any;\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 = new Decimal(0);\n this.lastCycleExpenses = new Decimal(0);\n this.thisCycleRevenue = new Decimal(0);\n this.thisCycleExpenses = new Decimal(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 = new Decimal(0);\n this.thisCycleExpenses = new Decimal(0);\n }\n this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.thisCycleRevenue = new Decimal(0);\n this.thisCycleExpenses = new Decimal(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.gt(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.plus(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.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(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.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(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 if (matName == \"RealEstate\") {\n maxAmt = buyAmt;\n } else {\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 + \"\");\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) + \"\",\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);\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 copy(): Industry {\n // products: { [key: string]: Product | undefined } = {};\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 const division = new Industry();\n division.sciResearch = this.sciResearch.copy();\n division.researched = {};\n for (const x of Object.keys(this.researched)) {\n division.researched[x] = this.researched[x];\n }\n division.reqMats = {};\n for (const x of Object.keys(this.reqMats)) {\n division.reqMats[x] = this.reqMats[x];\n }\n division.name = this.name;\n division.type = this.type;\n division.makesProducts = this.makesProducts;\n division.awareness = this.awareness;\n division.popularity = this.popularity;\n division.startingCost = this.startingCost;\n division.reFac = this.reFac;\n division.sciFac = this.sciFac;\n division.hwFac = this.hwFac;\n division.robFac = this.robFac;\n division.aiFac = this.aiFac;\n division.advFac = this.advFac;\n division.prodMult = this.prodMult;\n division.state = this.state;\n division.newInd = this.newInd;\n division.lastCycleRevenue = this.lastCycleRevenue.plus(0);\n division.lastCycleExpenses = this.lastCycleExpenses.plus(0);\n division.thisCycleRevenue = this.thisCycleRevenue.plus(0);\n division.thisCycleExpenses = this.thisCycleExpenses.plus(0);\n division.upgrades = this.upgrades.slice();\n division.prodMats = this.prodMats.slice();\n return division;\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 pro = 0;\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 // Employee salaries slowly go up over time\n this.cyclesUntilRaise -= marketCycles;\n if (this.cyclesUntilRaise <= 0) {\n this.sal += CorporationConstants.EmployeeRaiseAmount;\n this.cyclesUntilRaise += CorporationConstants.CyclesPerEmployeeRaise;\n }\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 copy(): Employee {\n const employee = new Employee();\n employee.name = this.name;\n employee.mor = this.mor;\n employee.hap = this.hap;\n employee.ene = this.ene;\n employee.int = this.int;\n employee.cha = this.cha;\n employee.exp = this.exp;\n employee.cre = this.cre;\n employee.eff = this.eff;\n employee.sal = this.sal;\n employee.pro = this.pro;\n employee.cyclesUntilRaise = this.cyclesUntilRaise;\n employee.loc = this.loc;\n employee.pos = this.pos;\n return employee;\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","/**\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","/**\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","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 {\"[home ~/]> 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 {\"[home ~/]> 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 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 Box from \"@mui/material/Box\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Fab from \"@mui/material/Fab\";\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 nobackground: {\n backgroundColor: \"#0000\",\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) return <>;\n let icon;\n if (open) {\n icon = ;\n } else {\n icon = ;\n }\n return (\n
\n \n {children}\n \n setOpen((old) => !old)}>\n {icon}\n \n \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\";\n\nimport { KEY } from \"../../utils/helpers/keyCodes\";\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.length;\n const programCount = getAvailableCreatePrograms(props.player).length;\n const canCreateProgram =\n programCount > 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 // TODO(hydroflame): these should not as any but right now the def is that it\n // can only be defined;\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\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 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.Version}} />\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 \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} / ?\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\";\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 { 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\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);\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 i in AugmentationNames) {\n const augName = AugmentationNames[i];\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.plus(1e99);\n }\n }\n\n function resetCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.minus(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 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 \n Est. Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)}\n \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 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 (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 {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's unit 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};\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

{props.action.name} (COMPLETED)

;\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 \n {isActive ? (\n <>\n <>\n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\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 the 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 shutdown this down through legal or political means, so we must\n resort to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in\n its 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 facitilities.\n We 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 peoples 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 upmost important 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","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 */\nexport interface 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: 1,\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: 2.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: 6,\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: 15,\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: 120,\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: 1,\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: 1.2,\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: 5,\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: 2.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: 15,\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: 38,\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: 58,\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: 24,\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: 120,\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","/**\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
\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.gt(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.lt(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","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","// 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.lt(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.dividedBy(CorporationConstants.OfficeInitialCost).toNumber();\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.gte(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 setMakeOpen(true)}\n disabled={corp.funds.lt(0)}\n >\n {createProductButtonText}\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.minus(division.lastCycleExpenses).toNumber();\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.lt(cost)) return;\n corp.funds = corp.funds.minus(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 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.gt(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.minus(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 if (matName === \"RealEstate\") continue;\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.lt(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 Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take\n effect, not Market-TA.I\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 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 Market-TA.I\n (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","// 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 setIndustry(event.target.value);\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\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 Note that Market-TA.II overrides Market-TA.I. This means that if both are enabled, then Market-TA.II will take\n effect, not Market-TA.I\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 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 Market-TA.I\n (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","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 <>Not enough warehouse space to purchase this amount;\n } else if (isNaN(cost)) {\n return <>Invalid put for Bulk Purchase amount;\n } else {\n return (\n <>\n Purchasing {numeralWrapper.format(parsedAmt, \"0,0.00\")} of {props.mat.name} will cost{\" \"}\n {numeralWrapper.formatMoney(cost)}\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.gt(cost)) {\n corp.funds = corp.funds.minus(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 { MathComponent } from \"mathjax-react\";\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 String.raw`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.lt(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 \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.lt(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 \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.minus(corp.expenses).toNumber();\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]] === 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 const playerEarnings = corp.numShares * dividendsPerShare;\n return (\n ],\n [\"Dividend Percentage:\", numeralWrapper.format(corp.dividendPercentage / 100, \"0%\")],\n [\"Dividends per share:\", ],\n [\"Your earnings as a shareholder (Pre-Tax):\", ],\n [\"Dividend Tax Rate:\", <>{corp.dividendTaxPercentage}%],\n [\n \"Your earnings as a shareholder (Post-Tax):\",\n ,\n ],\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.lt(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 {data[4]} \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.lt(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.lt(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.lt(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.minus(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);\n player.recordMoneySource(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 (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);\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 > 50) p = 50;\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 {CorporationConstants.DividendMaxPercentage}. (A percentage of 0\n 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 * Dividends are taxed. Taxes start at 50%, but can be decreased\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.plus(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 \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\";\n\ninterface IProps {\n location: Location;\n}\nfunction calcDifficulty(player: IPlayer, startingDifficulty: number): number {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n const difficulty = startingDifficulty - Math.pow(totalStats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\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\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\";\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 [{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 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.keyCode == 48 && event.shiftKey) return \")\";\n if (event.keyCode == 221 && !event.shiftKey) return \"]\";\n if (event.keyCode == 221 && event.shiftKey) return \"}\";\n if (event.keyCode == 190 && event.shiftKey) 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 [guarding, setGuarding] = useState(true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.keyCode !== 32) return;\n if (guarding) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n useEffect(() => {\n let id2 = -1;\n const id = window.setTimeout(() => {\n setGuarding(false);\n id2 = window.setTimeout(() => setGuarding(true), difficulty.window);\n }, Math.random() * 3250 + 1500);\n return () => {\n clearInterval(id);\n if (id2 !== -1) clearInterval(id2);\n };\n }, []);\n\n return (\n \n \n \n Slash when his guard is down!\n {guarding ? \"!Guarding!\" : \"!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.keyCode === 16) 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.keyCode;\n if (k === 32) {\n if (positive.includes(choices[index])) props.onSuccess();\n else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([38, 87, 68, 39].includes(k)) newIndex++;\n if ([65, 37, 83, 40].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.keyCode == 32) {\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.keyCode == 32) {\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 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.Difficulty + 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.Difficulty + 1, 2) *\n Math.pow(props.StartingDifficulty, 3) *\n 3e3 *\n levelBonus *\n BitNodeMultipliers.InfiltrationMoney;\n\n function sell(): void {\n player.gainMoney(moneyGain);\n player.recordMoneySource(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_skill - b.hacking_skill,\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_skill, a.strength, a.defense, a.dexterity, a.agility, a.charisma) -\n getAverage(b.hacking_skill, 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_skill)} (\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.finishWork(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 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\";\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\";\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 [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = useState(\n Settings.SuppressHospitalizationPopup,\n );\n\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 [enableTimestamps, setEnableTimestamps] = useState(Settings.EnableTimestamps);\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 handleSuppressHospitalizationPopupChange(event: React.ChangeEvent): void {\n setSuppressHospitalizationPopup(event.target.checked);\n Settings.SuppressHospitalizationPopup = 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 handleEnableTimestampsChange(event: React.ChangeEvent): void {\n setEnableTimestamps(event.target.checked);\n Settings.EnableTimestamps = 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 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 }\n label={\n \n If this is set, a popup message will no longer be shown when you are hospitalized after taking\n too much damage.\n \n }\n >\n Suppress hospitalization popup\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 label={\n \n Terminal commands and log entries will be timestamped. The timestamp will have the format: M/D\n h:m\n \n }\n >\n Enable timestamps\n \n }\n />\n \n\n \n Sets the locale for displaying numbers.}>\n Locale \n \n \n \n \n
\n
\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 \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 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 in GetAllServers()) {\n keys.push(key);\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 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 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 \n \n \n \n primary\n secondary\n warning\n info\n error\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \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 desc = (\n <>\n This sleeve is currently attempting to {Crimes[props.sleeve.crimeType].type} (Success Rate:{\" \"}\n {numeralWrapper.formatPercentage(Crimes[props.sleeve.crimeType].successRate(props.sleeve))}).\n \n );\n break;\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);\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_skill)}],\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_skill,\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.keys(Crimes), 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\";\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 upgradeLevelContent;\n if (node.level >= HacknetNodeConstants.MaxLevel) {\n upgradeLevelContent = <>MAX LEVEL;\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 upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = (\n <>\n +{multiplier} - \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 upgradeRamContent;\n if (node.ram >= HacknetNodeConstants.MaxRam) {\n upgradeRamContent = <>MAX RAM;\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 upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = (\n <>\n +{multiplier} - \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 let upgradeCoresContent;\n if (node.cores >= HacknetNodeConstants.MaxCores) {\n upgradeCoresContent = <>MAX CORES;\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 upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = (\n <>\n +{multiplier} - \n \n \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\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 \n \n \n \n \n \n RAM:\n \n \n {node.ram}GB\n \n \n \n \n \n \n \n Cores:\n \n \n {node.cores}\n \n \n \n \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\";\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 upgradeLevelContent;\n if (node.level >= HacknetServerConstants.MaxLevel) {\n upgradeLevelContent = <>MAX LEVEL;\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 upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = (\n <>\n +{multiplier} - \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 // Upgrade RAM Button\n let upgradeRamContent;\n if (node.maxRam >= HacknetServerConstants.MaxRam) {\n upgradeRamContent = <>MAX RAM;\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 upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = (\n <>\n +{multiplier} - \n \n \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\n // Upgrade Cores Button\n let upgradeCoresContent;\n if (node.cores >= HacknetServerConstants.MaxCores) {\n upgradeCoresContent = <>MAX CORES;\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 upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = (\n <>\n +{multiplier} - \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\n // Upgrade Cache button\n let upgradeCacheContent;\n if (node.cache >= HacknetServerConstants.MaxCache) {\n upgradeCacheContent = <>MAX CACHE;\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 upgradeCacheContent = (\n <>\n +{multiplier} - \n \n \n );\n if (props.player.money.lt(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 \n \n \n \n \n \n RAM:\n \n \n {node.maxRam}GB\n \n \n \n \n \n \n \n Cores:\n \n \n {node.cores}\n \n \n \n \n \n \n \n Cache Level:\n \n \n {node.cache}\n \n \n \n \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 \n {level > 0 && effect && {effect}}\n {upg.hasTargetServer && (\n \n )}\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);\n this.props.p.hp = this.props.p.max_hp;\n this.props.p.recordMoneySource(-1 * cost, \"hospitalization\");\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\";\n\nimport { use } from \"../../ui/Context\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\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 dialogBoxCreate(<>You ate some delicious noodles and feel refreshed.);\n }\n\n return ;\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 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\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 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 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);\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","/**\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\";\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 {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 { MathComponent } from \"mathjax-react\";\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 \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);\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 { MathComponent } from \"mathjax-react\";\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 = 1e9 * Math.pow(7.5, homeComputer.cpuCores);\n\n function buy(): void {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost);\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return (\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 } 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()) {\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)\n this.props.p.loseMoney(this.state.bet);\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 let gains = 0;\n if (this.isPlayerWinResult(result)) {\n gains = this.state.bet;\n\n // We 2x the gains because we took away money at the start, so we need to give the original bet back.\n this.win(this.props.p, 2 * gains);\n } else if (result === Result.DealerWon) {\n gains = -1 * this.state.bet;\n this.win(this.props.p, -this.state.bet); // Get the original bet back\n // Dont need to take money here since we already did it at the start\n } else if (result === Result.Tie) {\n this.win(this.props.p, this.state.bet); // Get the original bet back\n }\n\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains,\n });\n };\n\n isPlayerWinResult = (result: Result): boolean => {\n return result === Result.PlayerWon || result === Result.PlayerWonByBlackjack;\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
    Value(s): 
    \n {playerHandValues.map((value, i) => (\n
    {value}
    \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 {this.isPlayerWinResult(result) && }\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","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(replace(content, index, randomize(letter)));\n setTimeout(() => {\n setContent(content);\n }, 50);\n }, 100);\n\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return {content};\n}\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\";\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 const router = use.Router();\n if (!location) return *;\n return (\n toLocation(router, location)}\n >\n X\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, 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 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 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 {getAvailableCreatePrograms(player).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 } 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","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 } 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);\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 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 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 function onKeyDown(event: React.KeyboardEvent): void {\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 = 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 const newValue = tabCompletion(command, arg, allPos, value);\n if (typeof newValue === \"string\" && 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 .fconf\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 } from \"../Alias\";\nimport { DarkWebItems } from \"../DarkWeb/DarkWebItems\";\nimport { Message } from \"../Message/Message\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\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 \"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 function determineAllPossibilitiesForTabCompletion(\n p: IPlayer,\n input: string,\n index: number,\n currPath = \"\",\n): string[] {\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 instanceof Message)) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages(): void {\n for (const file of currServ.messages) {\n if (file instanceof Message) {\n allPos.push(file.filename);\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(\"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(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n allPos.push(\".fconf\");\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 if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\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","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\";\n\nimport { ScriptProduction } from \"./ScriptProduction\";\nimport { ServerAccordions } from \"./ServerAccordions\";\n\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\n\nimport Typography from \"@mui/material/Typography\";\n\ntype 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 return (\n <>\n Active Scripts\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((data) => data && data.server.hostname.includes(filter));\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}} />\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","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\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 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","/**\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\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\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 && SourceFileFlags[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