diff --git a/docs/asset-manifest.json b/docs/asset-manifest.json index 101ff3b..4168b50 100644 --- a/docs/asset-manifest.json +++ b/docs/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { - "main.css": "/static/css/main.3cbfcb7d.css", - "main.js": "/static/js/main.6e59a07a.js", + "main.css": "/static/css/main.6a4997ca.css", + "main.js": "/static/js/main.a8565699.js", "static/js/787.ada1a5f8.chunk.js": "/static/js/787.ada1a5f8.chunk.js", "static/media/InGame.png": "/static/media/InGame.54443a18479ad462e4fe.png", "static/media/ZoraArmor.png": "/static/media/ZoraArmor.c8e3613781b28c668f3c.png", @@ -36,12 +36,12 @@ "static/media/FireArrow.png": "/static/media/FireArrow.103898dc3f492d3293bd.png", "static/media/Lotus.png": "/static/media/Lotus.6006e27a51c66a0b9d3b.png", "index.html": "/index.html", - "main.3cbfcb7d.css.map": "/static/css/main.3cbfcb7d.css.map", - "main.6e59a07a.js.map": "/static/js/main.6e59a07a.js.map", + "main.6a4997ca.css.map": "/static/css/main.6a4997ca.css.map", + "main.a8565699.js.map": "/static/js/main.a8565699.js.map", "787.ada1a5f8.chunk.js.map": "/static/js/787.ada1a5f8.chunk.js.map" }, "entrypoints": [ - "static/css/main.3cbfcb7d.css", - "static/js/main.6e59a07a.js" + "static/css/main.6a4997ca.css", + "static/js/main.a8565699.js" ] } \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index be3bb72..6e76e81 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -
a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","var map = {\n\t\"./Acorn.png\": 8395,\n\t\"./AncientArrow.png\": 1167,\n\t\"./Apple.png\": 535,\n\t\"./Axe.png\": 3778,\n\t\"./Beetle.png\": 6245,\n\t\"./BigHeartyRadish.png\": 1011,\n\t\"./BombArrow.png\": 9,\n\t\"./Core.png\": 747,\n\t\"./Diamond.png\": 4162,\n\t\"./EnduraFood.png\": 1660,\n\t\"./EnduraShroom.png\": 7970,\n\t\"./Fairy.png\": 6804,\n\t\"./FaroshClaw.png\": 7366,\n\t\"./FaroshHorn.png\": 5921,\n\t\"./FaroshScale.png\": 3535,\n\t\"./FireArrow.png\": 4155,\n\t\"./ForestDwellerBow.png\": 3925,\n\t\"./Glider.png\": 6261,\n\t\"./HeartyBass.png\": 9957,\n\t\"./HeartyRadish.png\": 8097,\n\t\"./Honey.png\": 7658,\n\t\"./HylianShroom.png\": 4481,\n\t\"./HyruleBass.png\": 6448,\n\t\"./IceArrow.png\": 1114,\n\t\"./LizalfosHorn.png\": 1224,\n\t\"./LizalfosTalon.png\": 305,\n\t\"./Lotus.png\": 6156,\n\t\"./MasterSword.png\": 4009,\n\t\"./NormalArrow.png\": 2205,\n\t\"./Opal.png\": 1934,\n\t\"./PotLid.png\": 76,\n\t\"./Rushroom.png\": 5405,\n\t\"./Screw.png\": 1510,\n\t\"./Shaft.png\": 3581,\n\t\"./ShockArrow.png\": 6119,\n\t\"./SilentPrincess.png\": 962,\n\t\"./Slate.png\": 9889,\n\t\"./SpeedFood.png\": 1972,\n\t\"./SpicyPepper.png\": 7343,\n\t\"./SpiritOrb.png\": 3982,\n\t\"./Spring.png\": 6040,\n\t\"./Tail.png\": 6527,\n\t\"./Wood.png\": 4193,\n\t\"./ZoraArmor.png\": 5314,\n\t\"assets/img/Acorn.png\": 8395,\n\t\"assets/img/AncientArrow.png\": 1167,\n\t\"assets/img/Apple.png\": 535,\n\t\"assets/img/Axe.png\": 3778,\n\t\"assets/img/Beetle.png\": 6245,\n\t\"assets/img/BigHeartyRadish.png\": 1011,\n\t\"assets/img/BombArrow.png\": 9,\n\t\"assets/img/Core.png\": 747,\n\t\"assets/img/Diamond.png\": 4162,\n\t\"assets/img/EnduraFood.png\": 1660,\n\t\"assets/img/EnduraShroom.png\": 7970,\n\t\"assets/img/Fairy.png\": 6804,\n\t\"assets/img/FaroshClaw.png\": 7366,\n\t\"assets/img/FaroshHorn.png\": 5921,\n\t\"assets/img/FaroshScale.png\": 3535,\n\t\"assets/img/FireArrow.png\": 4155,\n\t\"assets/img/ForestDwellerBow.png\": 3925,\n\t\"assets/img/Glider.png\": 6261,\n\t\"assets/img/HeartyBass.png\": 9957,\n\t\"assets/img/HeartyRadish.png\": 8097,\n\t\"assets/img/Honey.png\": 7658,\n\t\"assets/img/HylianShroom.png\": 4481,\n\t\"assets/img/HyruleBass.png\": 6448,\n\t\"assets/img/IceArrow.png\": 1114,\n\t\"assets/img/LizalfosHorn.png\": 1224,\n\t\"assets/img/LizalfosTalon.png\": 305,\n\t\"assets/img/Lotus.png\": 6156,\n\t\"assets/img/MasterSword.png\": 4009,\n\t\"assets/img/NormalArrow.png\": 2205,\n\t\"assets/img/Opal.png\": 1934,\n\t\"assets/img/PotLid.png\": 76,\n\t\"assets/img/Rushroom.png\": 5405,\n\t\"assets/img/Screw.png\": 1510,\n\t\"assets/img/Shaft.png\": 3581,\n\t\"assets/img/ShockArrow.png\": 6119,\n\t\"assets/img/SilentPrincess.png\": 962,\n\t\"assets/img/Slate.png\": 9889,\n\t\"assets/img/SpeedFood.png\": 1972,\n\t\"assets/img/SpicyPepper.png\": 7343,\n\t\"assets/img/SpiritOrb.png\": 3982,\n\t\"assets/img/Spring.png\": 6040,\n\t\"assets/img/Tail.png\": 6527,\n\t\"assets/img/Wood.png\": 4193,\n\t\"assets/img/ZoraArmor.png\": 5314\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 8288;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"static/js/\" + chunkId + \".\" + \"ada1a5f8\" + \".chunk.js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","var inProgress = {};\nvar dataWebpackPrefix = \"botw-hundo-dupl:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkbotw_hundo_dupl\"] = self[\"webpackChunkbotw_hundo_dupl\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import { Inventory } from \"./Inventory\";\nimport { Item, ItemStack } from \"./Item\";\nimport { SimulationState } from \"./SimulationState\";\n\nexport interface Command {\n\texecute(state: SimulationState): void,\n\tgetDisplayString(): string,\n}\n\nexport class CommandNothing implements Command {\n\n\texecute(_state: Inventory): void {\n\t\t// nothing\n\t}\n\tgetDisplayString(): string {\n\t\treturn \"\";\n\t}\n\t\n}\n\nexport class CommandInitialize implements Command {\n\n\tprivate stacks: ItemStack[];\n\tconstructor(stacks: ItemStack[]){\n\t\tthis.stacks = stacks;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tstate.initialize(this.stacks);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn joinItemStackString(\"Initialize\", this.stacks);\n\t}\n\n}\n\nexport class CommandSave implements Command {\n\n\tpublic execute(state: SimulationState): void {\n\t\tstate.save();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Save\";\n\t}\n}\n\nexport class CommandSaveAs implements Command {\n\tprivate name: string;\n\tconstructor(name: string){\n\t\tthis.name = name;\n\t}\n\tpublic execute(state: SimulationState): void {\n\t\tstate.save(this.name);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Save As ${this.name}`;\n\t}\n}\n\nexport class CommandReload implements Command {\n\tprivate name?: string;\n\tconstructor(name?: string){\n\t\tthis.name = name;\n\t}\n\tpublic execute(state: SimulationState): void {\n\t\tstate.reload(this.name);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Reload${this.name?` ${this.name}`:\"\"}`;\n\t}\n}\n\nexport class CommandUse implements Command {\n\tprivate name: string;\n\tconstructor(name: string){\n\t\tthis.name = name;\n\t}\n\tpublic execute(state: SimulationState): void {\n\t\tstate.useSaveForNextReload(this.name);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Use ${this.name}`;\n\t}\n}\n\nexport class CommandBreakSlots implements Command {\n\n\tprivate numToBreak: number;\n\tconstructor(numToBreak: number){\n\t\tthis.numToBreak = numToBreak;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tstate.breakSlots(this.numToBreak);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Break ${this.numToBreak} Slots`;\n\t}\n}\n\nexport class CommandAdd implements Command {\n\tprivate verb: string;\n\tprivate count: number;\n\tprivate item: Item;\n\tconstructor(verb: string, count: number, item: Item){\n\t\tthis.verb = verb;\n\t\tthis.count = count;\n\t\tthis.item = item;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tstate.obtain(this.item, this.count);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `${this.verb} ${this.count} ${this.item}`;\n\t}\n}\n\nexport class CommandAddWithoutCount implements Command {\n\tprivate verb: string;\n\tprivate item: Item;\n\tconstructor(verb: string, item: Item){\n\t\tthis.verb = verb;\n\t\tthis.item = item;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tstate.obtain(this.item, 1);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `${this.verb} ${this.item}`;\n\t}\n}\n\nexport class CommandAddMultiple implements Command {\n\tprivate verb: string;\n\tprivate stacks: ItemStack[];\n\tconstructor(verb: string, stacks: ItemStack[]){\n\t\tthis.verb = verb;\n\t\tthis.stacks = stacks;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tthis.stacks.forEach(({item, count})=>state.obtain(item,count));\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn joinItemStackString(this.verb, this.stacks);\n\n\t}\n}\n\nexport class CommandRemove implements Command {\n\tprivate verb: string;\n\tprivate count: number;\n\tprivate item: Item;\n\tprivate slot: number;\n\tprivate noSlot: boolean;\n\tconstructor(verb: string, count: number, item: Item, slot: number, noSlot: boolean){\n\t\tthis.verb = verb;\n\t\tthis.count = count;\n\t\tthis.item = item;\n\t\tthis.slot = slot;\n\t\tthis.noSlot = noSlot;\n\t}\n\tpublic execute(state: SimulationState): void {\n\t\tstate.remove(this.item, this.count, this.slot);\n\t}\n\tpublic getDisplayString(): string {\n\t\tconst slotString = this.noSlot ? \"\" : ` From Slot ${this.slot+1}`;\n\t\treturn `${this.verb} ${this.count} ${this.item}${slotString}`;\n\t}\n}\n\nexport class CommandRemoveWithoutCount implements Command {\n\tprivate verb: string;\n\tprivate item: Item;\n\tprivate slot: number;\n\tprivate noSlot: boolean;\n\tconstructor(verb: string, item: Item, slot: number, noSlot: boolean){\n\t\tthis.verb = verb;\n\t\tthis.item = item;\n\t\tthis.slot = slot;\n\t\tthis.noSlot = noSlot;\n\t}\n\tpublic execute(state: SimulationState): void {\n\t\tstate.remove(this.item, 1, this.slot);\n\t}\n\tpublic getDisplayString(): string {\n\t\tconst slotString = this.noSlot ? \"\" : ` From Slot ${this.slot+1}`;\n\t\treturn `${this.verb} ${this.item}${slotString}`;\n\t}\n}\n\nexport class CommandRemoveMultiple implements Command {\n\tprivate verb: string;\n\tprivate stacks: ItemStack[];\n\tconstructor(verb: string, stacks: ItemStack[]){\n\t\tthis.verb = verb;\n\t\tthis.stacks = stacks;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tthis.stacks.forEach(({item, count})=>state.remove(item,count,0));\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn joinItemStackString(this.verb, this.stacks);\n\t}\n}\n\nconst joinItemStackString = (initial: string, stacks: ItemStack[]): string => {\n\tconst parts: string[] = [initial];\n\tstacks.forEach(({item, count})=>{\n\t\tparts.push(\"\"+count);\n\t\tparts.push(item);\n\t});\n\treturn parts.join(\" \");\n};\n\nexport class CommandDaP implements Command {\n\tprivate count: number;\n\tprivate item: Item;\n\n\tconstructor(count: number, item: Item,){\n\t\tthis.count = count;\n\t\tthis.item = item;\n\t}\n\tpublic execute(state: SimulationState): void {\n\t\tstate.remove(this.item, this.count, 0);\n\t\tstate.obtain(this.item, this.count);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `D&P ${this.count} ${this.item}`;\n\t}\n}\n\nexport class CommandEquip implements Command {\n\tprivate item: Item;\n\tprivate slot: number;\n\tprivate noSlot: boolean;\n\tconstructor(item: Item, slot: number, noSlot: boolean){\n\t\tthis.item = item;\n\t\tthis.slot = slot;\n\t\tthis.noSlot = noSlot;\n\t}\n\t\n\tpublic execute(state: SimulationState): void {\n\t\tstate.equip(this.item, this.slot);\n\t}\n\tpublic getDisplayString(): string {\n\t\tconst slotString = this.noSlot ? \"\" : ` In Slot ${this.slot+1}`;\n\t\treturn `Equip ${this.item}${slotString}`;\n\t}\n}\n\nexport class CommandUnequip implements Command {\n\tprivate item: Item;\n\tprivate slot: number;\n\tprivate noSlot: boolean;\n\tconstructor(item: Item, slot: number, noSlot: boolean){\n\t\tthis.item = item;\n\t\tthis.slot = slot;\n\t\tthis.noSlot = noSlot;\n\t}\n\t\n\tpublic execute(state: SimulationState): void {\n\t\tstate.unequip(this.item, this.slot);\n\t}\n\tpublic getDisplayString(): string {\n\t\tconst slotString = this.noSlot ? \"\" : ` In Slot ${this.slot+1}`;\n\t\treturn `Unequip ${this.item}${slotString}`;\n\t}\n}\n\nexport class CommandShootArrow implements Command {\n\tprivate count: number;\n\tconstructor(count: number){\n\t\tthis.count = count;\n\t}\n\t\n\tpublic execute(state: SimulationState): void {\n\t\tstate.shootArrow(this.count);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Shoot ${this.count} Arrow`;\n\t}\n}\n\nexport class CommandCloseGame implements Command {\n\tpublic execute(state: SimulationState): void {\n\t\tstate.closeGame();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Close Game\";\n\t}\n}\n\nexport class CommandSync implements Command {\n\tprivate actionString: string;\n\tconstructor(actionString: string){\n\t\tthis.actionString = actionString;\n\t}\n\n\tpublic execute(state: SimulationState): void {\n\t\tstate.syncGameDataWithPouch();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn this.actionString;\n\t}\n}\n\nexport class CommandComment implements Command {\n\tprivate name: string;\n\tconstructor(name: string){\n\t\tthis.name = name;\n\t}\n\tpublic execute(_state: SimulationState): void {\n\t\t// nothing\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `# ${this.name}`;\n\t}\n}\n\nexport class CommandSortKey implements Command {\n\tstatic Op = 0x5;\n\t// public fromBuffer(_buf: Buffer): number {\n\t// \treturn 0;\n\t// }\n\t// public toBuffer(): Buffer {\n\t// \tconst buf: Buffer = Buffer.alloc(1);\n\t// \tbuf.writeInt8(CommandSortKey.Op);\n\t// \treturn buf;\n\t// }\n\tpublic execute(_state: SimulationState): void {\n\t\t// wip\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Sort Key\";\n\t}\n}\n\nexport class CommandSortMaterial implements Command {\n\tstatic Op = 0x6;\n\t// public fromBuffer(_buf: Buffer): number {\n\t// \treturn 0;\n\t// }\n\t// public toBuffer(): Buffer {\n\t// \tconst buf: Buffer = Buffer.alloc(1);\n\t// \tbuf.writeInt8(CommandSortMaterial.Op);\n\t// \treturn buf;\n\t// }\n\tpublic execute(_state: SimulationState): void {\n\t\t// wip\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Sort Material\";\n\t}\n}\n","function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string' || typeof mix === 'number') {\n\t\tstr += mix;\n\t} else if (typeof mix === 'object') {\n\t\tif (Array.isArray(mix)) {\n\t\t\tfor (k=0; k < mix.length; k++) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tif (y = toVal(mix[k])) {\n\t\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\t\tstr += y;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tfor (k in mix) {\n\t\t\t\tif (mix[k]) {\n\t\t\t\t\tstr && (str += ' ');\n\t\t\t\t\tstr += k;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn str;\n}\n\nexport default function () {\n\tvar i=0, tmp, x, str='';\n\twhile (i < arguments.length) {\n\t\tif (tmp = arguments[i++]) {\n\t\t\tif (x = toVal(tmp)) {\n\t\t\t\tstr && (str += ' ');\n\t\t\t\tstr += x\n\t\t\t}\n\t\t}\n\t}\n\treturn str;\n}\n","import clsx from \"clsx\";\nimport { PropsWithChildren } from \"react\";\n\ntype CommandItemProps = PropsWithChildren<{\n isSelected?: boolean,\n\tcomment?:boolean,\n isContextSelected?: boolean,\n onClick: (x: number, y: number)=>void,\n onContextMenu?: (x: number, y: number)=>void\n}>;\n\nexport const CommandItem: React.FC \n Fully resets the inventory by clearing all items and set Count to 0, then forcefully write the item list to inventory.\n This would reset any broken slot you already have, and any in-game checks that happen when adding items are disabled.\n For example, the items will appear in the order you specify, not in the in-game tab order\n\t\t\t\t\t \n If you specify count > 1 for unstackable items like weapon or sheika slate, multiple of that item would be added.\n Game Data will be synced with Visible Inventory after the reset\n\t\t\t\t\t \n Note that this will not clear saves. You can use this command to initialize multiple saves\n\t\t\t\t\t Example: Initialize 1 Apple 2 Axe 3 Slate 4 SpiritOrb \n Writes Game Data to the corresponding save slot. The auto saves are specified by NAME. \n You can have as many auto saves as you want in the simulator.\n\t\t\t\t\t Example 1: Save Example 2: Save As MySave \n Example 1 will save to the manual save slot, while example 2 will save to the slot named \"MySave\".\n There cannot be spaces in the name. If \"MySave\" doesn't exist, a new slot is created\n\t\t\t\t\t \n First, reads Game Data from the corresponding save slot. \n If NAME is not given, the manual save is used unless \"Use\" commands are used before this (see below).\n If NAME is given, the corresponding save slot with that name is used\n\t\t\t\t\t \n After that, the first Count items in the visible inventory is removed, and Count is decreased accordingly. \n Then, each item slot in the Game Data is added to the inventory.\n\t\t\t\t\t Example 1: Reload Example 2: Reload MySave \n This command is only for backward compatibility. Use \"Reload\" instead\n\t\t\t\t\t \n Specify the save named NAME to be reloaded on the next \"Reload\" command\n\t\t\t\t\t Example: Use MySave \n Decrease inventory Count by X\n\t\t\t\t\t \n This command does not automatically simulate the hold smuggle and sell process. \n It just changes count (i.e. make broken slots) with magic.\n\t\t\t\t\t Example: Break 4 Slots \n Add the item(s) to visible inventory. Sync with Game Data unless you are on Eventide or inside TOTS\n\t\t\t\t\t \n Like in game, you won't be able to obtain multiple unstackable key items, or multiple master sword in this way. \n If a stackable item is at 999 or more when you invoke this command, the count is set to 999 (not fully accurate since you won't be able to pick up more items in game).\n\t\t\t\t\t \n If you specify a count for unstackable items, they are added in different slots as if you pick them up in game, one after another.\n\t\t\t\t\t \n Note that you must not enter plural forms for the item name.\n\t\t\t\t\t Example 1: Add Apple Example 2: Get 10 Apple Example 3: Pickup 10 Apple 5 Diamond 1 Slate 5 MasterSword \n Remove the item(s) to visible inventory. Sync with Game Data unless you are on Eventide or inside TOTS\n\t\t\t\t\t \n When number of item is not specified, it defaults to 1. Up to X items will be removed from inventory, even when they span multiple slots. \n If X > total number of items in inventory, all of them will be removed.\n\t\t\t\t\t \n When slot is specified, it starts removing from slot X (slot 1 is the leftmost slot with that item, slot 2 is the second leftmost slot with that item).\n\t\t\t\t\t \n Note that you must not enter plural forms for the item name.\n\t\t\t\t\t Example 1: Remove Apple Example 2: Drop 10 Diamond Example 3: Sell 10 Apple 5 Diamond Example 4: Sell 5 Apple From Slot 3 \n This command drops X item from the first slot, then pick them up\n\t\t\t\t\t Example: D&P 5 Diamond \n When equipping an item, all other item of the same type in the first tab is unequipped, then the item selected is equipped.\n\t\t\t\t\t \n Slot can be used if you have multiple of the same item. When slot is not specified, the leftmost item will be equipped. \n Note that you can use this command to equip something that is already equipped, which is not possible in game.\n You can also equip unequippable items like materials, but it is not meaningful\n\t\t\t\t\t Example 1: Equip Weapon Example 2: Equip Weapon In Slot 3 \n When unequipping an item, only the selected item is unequipped.\n\t\t\t\t\t \n Slot can be used if you have multiple of the same item. When slot is not specified, the leftmost equipped item will be unequipped.\n Note that you can use this command to unequip something that is already unequipped, which is useless.\n You cannot unequip arrows.\n\t\t\t\t\t Example 1: Unequip Shield Example 2: Unequip Shield In Slot 5 \n When closing the game, Visible Inventory and Game Data are erased\n\t\t\t\t\t Example: Close Game \n This command is currently broken\n\t\t\t\t\t\n\t\t\t\t{title}\n\t\t\t
\n\t\t\tItems
\n\t\t\t\t\t{\n\t\t\t\t\t\tgetAllItems().map(item=>{item}
)\n\t\t\t\t\t}\n\t\t\t\t\tCommands
\n\t\t\t\t\tInitialize X item1 Y item2 Z item3 ...
\n\t\t\t\t\tUsed for initializing inventory before simulation
\n\t\t\t\t\tSave / Save As NAME
\n\t\t\t\t\tSimulates a hard save or auto save action
\n\t\t\t\t\tReload (NAME)
\n\t\t\t\t\tSimulates reloading a save
\n\t\t\t\t\tUse NAME
\n\t\t\t\t\t(Deprecated) Specify which save to load on the subsequent reload
\n\t\t\t\t\tBreak X Slots
\n\t\t\t\t\tSimulate making X broken slots with hold smuggle glitch
\n\t\t\t\t\tGet/Add/Cook/Pickup item
\n\t\t\t\t\tGet/Add/Cook/Pickup X item
\n\t\t\t\t\tGet/Add/Cook/Pickup X item1 Y item2 Z item3 ...
\n\t\t\t\t\tSimulate obtaining items in game
\n\t\t\t\t\tRemove/Sell/Eat/Drop item
\n\t\t\t\t\tRemove/Sell/Eat/Drop X item
\n\t\t\t\t\tRemove/Sell/Eat/Drop item From Slot Y
\n\t\t\t\t\tRemove/Sell/Eat/Drop X item From Slot Y
\n\t\t\t\t\tRemove/Sell/Eat/Drop X item1 Y item2 Z item3 ...
\n\t\t\t\t\tSimulate removing items in game
\n\t\t\t\t\tD&P X item
\n\t\t\t\t\tShortcut for drop and pick up, for sorting inventory
\n\t\t\t\t\tEquip item
\n\t\t\t\t\tEquip item In Slot X
\n\t\t\t\t\tSimulates equipping something
\n\t\t\t\t\tUnequip item
\n\t\t\t\t\tUnequip item In Slot X
\n\t\t\t\t\tSimulates unequipping something
\n\t\t\t\t\tClose Game
\n\t\t\t\t\tSimulates closing the game and restarting
\n\t\t\t\t\tSort Key/Material
\n\t\t\t\t\tSimulates press Y to sort tab
\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t!!simulationStates[displayIndex].getManualSave() &&\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcommands.map((c,i)=>\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\t\t\t{contextIndex >= 0 ? <>\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t