g(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||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","// 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}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}","import ImageSlate from \"assets/img/Slate.png\";\nimport ImageGlider from \"assets/img/Glider.png\";\nimport ImageSpiritOrb from \"assets/img/SpiritOrb.png\";\nimport ImageLotus from \"assets/img/Lotus.png\";\nimport ImageSilentPrincess from \"assets/img/SilentPrincess.png\";\nimport ImageHoney from \"assets/img/Honey.png\";\nimport ImageAcorn from \"assets/img/Acorn.png\";\nimport ImageFaroshScale from \"assets/img/FaroshScale.png\";\nimport ImageFaroshClaw from \"assets/img/FaroshClaw.png\";\nimport ImageFaroshHorn from \"assets/img/FaroshHorn.png\";\nimport ImageHeartyBass from \"assets/img/HeartyBass.png\";\nimport ImageBeetle from \"assets/img/Beetle.png\";\nimport ImageOpal from \"assets/img/Opal.png\";\nimport ImageDiamond from \"assets/img/Diamond.png\";\nimport ImageTail from \"assets/img/Tail.png\";\nimport ImageSpring from \"assets/img/Spring.png\";\nimport ImageShaft from \"assets/img/Shaft.png\";\nimport ImageCore from \"assets/img/Core.png\";\nimport ImageWood from \"assets/img/Wood.png\";\nimport ImageSpeedFood from \"assets/img/SpeedFood.png\";\nimport ImageAxe from \"assets/img/Axe.png\";\nimport ImageBow from \"assets/img/ForestDwellerBow.png\";\nimport ImageArrow from \"assets/img/NormalArrow.png\";\nimport ImageFireArrow from \"assets/img/FireArrow.png\";\nimport ImageIceArrow from \"assets/img/IceArrow.png\";\nimport ImageShockArrow from \"assets/img/ShockArrow.png\";\nimport ImageBombArrow from \"assets/img/BombArrow.png\";\nimport ImageAncientArrow from \"assets/img/AncientArrow.png\";\nimport ImageShield from \"assets/img/PotLid.png\";\nimport ImageRushroom from \"assets/img/Rushroom.png\";\nimport ImageScrew from \"assets/img/Screw.png\";\nimport ImageHyruleBass from \"assets/img/HyruleBass.png\";\nimport ImageLizalfosHorn from \"assets/img/LizalfosHorn.png\";\nimport ImageLizalfosTalon from \"assets/img/LizalfosTalon.png\";\n\nexport enum ItemType {\n Weapon = 0,\n Bow = 1,\n\tArrow = 2,\n Shield = 3,\n Material = 4,\n Meal = 5,\n Key = 6\n}\n\nexport const ItemTypes = [\n\tItemType.Weapon,\n\tItemType.Bow,\n\tItemType.Arrow,\n\tItemType.Shield,\n\tItemType.Material,\n\tItemType.Meal,\n\tItemType.Key\n];\n\nexport type ItemStack = {\n item: Item,\n count: number,\n equipped: boolean\n}\n\nexport enum Item {\n Slate = \"Slate\",\n Glider = \"Glider\",\n SpiritOrb = \"SpiritOrb\",\n \n Lotus = \"Lotus\",\n SilentPrincess = \"SilentPrincess\",\n Honey = \"Honey\",\n Acorn = \"Acorn\",\n FaroshScale = \"FaroshScale\",\n FaroshClaw = \"FaroshClaw\",\n FaroshHorn = \"FaroshHorn\",\n HeartyBass = \"HeartyBass\",\n Beetle = \"Beetle\",\n Opal = \"Opal\",\n Diamond = \"Diamond\",\n Tail = \"Tail\",\n Spring = \"Spring\",\n Shaft = \"Shaft\",\n Core = \"Core\",\n Wood = \"Wood\",\n\n\tRushroom = \"Rushroom\",\n\tScrew = \"Screw\",\n\tHyruleBass = \"HyruleBass\",\n\tLizalfosHorn = \"LizalfosHorn\",\n\tLizalfosTalon = \"LizalfosTalon\",\n\n SpeedFood = \"SpeedFood\",\n\tWeapon = \"Weapon\",\n\tBow = \"Bow\",\n\tNormalArrow = \"NormalArrow\",\n\tFireArrow = \"FireArrow\",\n\tIceArrow = \"IceArrow\",\n\tShockArrow = \"ShockArrow\",\n\tBombArrow = \"BombArrow\",\n\tAncientArrow = \"AncientArrow\",\n\tShield = \"Shield\"\n}\n\ntype ItemData = {\n\titem: Item,\n\timage: string,\n\tid: number,\n\ttype: ItemType,\n\trepeatable: boolean,\n\tstackable: boolean,\n\tsortOrder: number,\n}\n\nconst IdToData: {[id: number]: ItemData} = {};\nconst ItemToData: {[k in Item]?: ItemData} = {};\nconst TypeToCount = {\n\t[ItemType.Weapon]: 0,\n\t[ItemType.Bow]: 0,\n\t[ItemType.Arrow]: 0,\n\t[ItemType.Shield]: 0,\n\t[ItemType.Material]: 0,\n\t[ItemType.Key]: 0,\n\t[ItemType.Meal]: 0,\n};\nconst register = (id: number, item: Item, type: ItemType, image: string, options?: Partial) => {\n\tconst sortOrder = TypeToCount[type];\n\tTypeToCount[type]++;\n\tconst data: ItemData = {\n\t\titem,\n\t\timage,\n\t\tid,\n\t\ttype,\n\t\trepeatable: true,\n\t\tstackable: true,\n\t\tsortOrder,\n\t\t...options||{}\n\t};\n\tif(id in IdToData){\n\t\tconsole.error(\"Multiple items registered to the same id: \"+id+\", (\"+item+\")\");\n\t}\n\tIdToData[id] = data;\n\tItemToData[item] = data;\n};\n/* Do not change the ID once created. Otherwise you would break existing codes */\nregister(0x00, Item.Slate, ItemType.Key, ImageSlate, {\n\trepeatable: false,\n\tstackable: false\n});\nregister(0x01, Item.Glider, ItemType.Key, ImageGlider, {\n\trepeatable: false,\n\tstackable: false\n});\nregister(0x02, Item.SpiritOrb, ItemType.Key, ImageSpiritOrb);\n\nregister(0x11, Item.Lotus, ItemType.Material, ImageLotus);\nregister(0x20, Item.Rushroom, ItemType.Material, ImageRushroom);\nregister(0x12, Item.SilentPrincess, ItemType.Material, ImageSilentPrincess);\nregister(0x13, Item.Honey, ItemType.Material, ImageHoney);\nregister(0x14, Item.Acorn, ItemType.Material, ImageAcorn);\nregister(0x15, Item.FaroshScale, ItemType.Material, ImageFaroshScale);\nregister(0x16, Item.FaroshClaw, ItemType.Material, ImageFaroshClaw);\nregister(0x17, Item.FaroshHorn, ItemType.Material, ImageFaroshHorn);\nregister(0x18, Item.HeartyBass, ItemType.Material, ImageHeartyBass);\nregister(0x21, Item.HyruleBass, ItemType.Material, ImageHyruleBass);\nregister(0x19, Item.Beetle, ItemType.Material, ImageBeetle);\nregister(0x1a, Item.Opal, ItemType.Material, ImageOpal);\nregister(0x10, Item.Diamond, ItemType.Material, ImageDiamond);\nregister(0x23, Item.LizalfosHorn, ItemType.Material, ImageLizalfosHorn);\nregister(0x24, Item.LizalfosTalon, ItemType.Material, ImageLizalfosTalon);\nregister(0x1b, Item.Tail, ItemType.Material, ImageTail);\nregister(0x22, Item.Screw, ItemType.Material, ImageScrew);\nregister(0x1c, Item.Spring, ItemType.Material, ImageSpring);\nregister(0x1d, Item.Shaft, ItemType.Material, ImageShaft);\nregister(0x1e, Item.Core, ItemType.Material, ImageCore);\nregister(0x1f, Item.Wood, ItemType.Material, ImageWood);\n\nregister(0x40, Item.SpeedFood, ItemType.Meal, ImageSpeedFood, {\n\tstackable: false\n});\n\nregister(0x50, Item.Weapon, ItemType.Weapon, ImageAxe, {\n\tstackable: false\n});\n\nregister(0x60, Item.Bow, ItemType.Bow, ImageBow, {\n\tstackable: false\n});\nregister(0x70, Item.NormalArrow, ItemType.Arrow, ImageArrow);\nregister(0x71, Item.FireArrow, ItemType.Arrow, ImageFireArrow);\nregister(0x72, Item.IceArrow, ItemType.Arrow, ImageIceArrow);\nregister(0x73, Item.ShockArrow, ItemType.Arrow, ImageShockArrow);\nregister(0x74, Item.BombArrow, ItemType.Arrow, ImageBombArrow);\nregister(0x75, Item.AncientArrow, ItemType.Arrow, ImageAncientArrow);\nregister(0x80, Item.Shield, ItemType.Shield, ImageShield, {\n\tstackable: false\n});\n\nexport const idToItemData = (id: number): ItemData => IdToData[id];\nexport const itemToItemData = (item: Item): ItemData => ItemToData[item] as ItemData;\nexport const itemToArrowType = (item: Item): string => {\n\tif(itemToItemData(item).type === ItemType.Arrow){\n\t\tconst str = `${item}`;\n\t\treturn str.substring(0,str.length-5);\n\t}\n\treturn \"\";\n};\n","import { Inventory } from \"./Inventory\";\nimport { Item, ItemStack, itemToArrowType } from \"./Item\";\n\nexport interface Command {\n\texecute(inv: Inventory): void,\n\tgetDisplayString(): string,\n\t// fromBuffer(buf: Buffer): number,\n\t// toBuffer(): Buffer,\n}\n\nexport class CommandNothing implements Command {\n\tstatic Op = 0x0;\n\n\texecute(_inv: 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\tstatic Op = 0x1;\n\tprivate stacks: ItemStack[];\n\tconstructor(stacks: ItemStack[]){\n\t\tthis.stacks = stacks;\n\t}\n\t// public fromBuffer(buf: Buffer): number {\n\t// \tlet read = 0;\n\t// \tconst size = buf.readUInt16LE();\n\t// \tread+=2;\n\t// \tconst stacks: ItemStack[] = [];\n\t// \tfor(let i=0;i{\n\t// \t\tbuf.writeInt16LE(count&0xffff, write);\n\t// \t\twrite+=2;\n\t// \t\tbuf.writeInt8(itemToItemData(item).id, write);\n\t// \t\twrite++;\n\t// \t});\n\t// \treturn buf;\n\t// }\n\n\tpublic execute(inv: Inventory): void {\n\t\tinv.init(this.stacks);\n\t}\n\tpublic getDisplayString(): string {\n\t\tconst parts = [\"Initialize\"];\n\t\tthis.stacks.forEach(({item, count})=>{\n\t\t\tparts.push(\"\"+count);\n\t\t\tparts.push(item);\n\t\t});\n\t\treturn parts.join(\" \");\n\t}\n\n}\n\nexport class CommandBreakSlots implements Command {\n\tstatic Op = 0x2;\n\tprivate numToBreak: number;\n\tconstructor(numToBreak: number){\n\t\tthis.numToBreak = numToBreak;\n\t}\n\t// public fromBuffer(buf: Buffer): number {\n\t// \tthis.numToBreak = buf.readInt16LE();\n\t// \treturn 2;\n\t// }\n\t// public toBuffer(): Buffer {\n\t// \tconst buf: Buffer = Buffer.alloc(3);\n\t// \tbuf.writeUInt8(CommandBreakSlots.Op);\n\t// \tbuf.writeInt16LE(this.numToBreak, 1);\n\t// \treturn buf;\n\t// }\n\tpublic execute(inv: Inventory): void {\n\t\tinv.addBrokenSlots(this.numToBreak);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Break ${this.numToBreak} Slots`;\n\t}\n}\n\nexport class CommandSave implements Command {\n\tstatic Op = 0x3;\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(CommandSave.Op);\n\t// \treturn buf;\n\t// }\n\tpublic execute(inv: Inventory): void {\n\t\tinv.save();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Save\";\n\t}\n}\n\nexport class CommandReload implements Command {\n\tstatic Op = 0x4;\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(CommandReload.Op);\n\t// \treturn buf;\n\t// }\n\tpublic execute(inv: Inventory): void {\n\t\tinv.reload();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Reload\";\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(inv: Inventory): void {\n\t\tinv.sortKey();\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(inv: Inventory): void {\n\t\tinv.sortMaterial();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Sort Material\";\n\t}\n}\n\nconst Verbs = [\"?\", \"Remove\", \"Drop\", \"Sell\", \"Eat\", \"Cook\", \"Get\", \"Add\", \"Pickup\"];\nconst VerbToId = {\n\t\"Remove\" : 1,\n\t\"Drop\": 2,\n\t\"Sell\": 3,\n\t\"Eat\": 4,\n\t\"Cook\": 5,\n\t\"Get\": 6,\n\t\"Add\": 7,\n\t\"Pickup\": 8\n};\n\nexport class CommandRemoveMaterial implements Command {\n\tstatic Op = 0x7;\n\tprivate verb: number;\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 = VerbToId[verb as keyof typeof VerbToId] || 0;\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(inv: Inventory): void {\n\t\tinv.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 `${Verbs[this.verb]} ${this.count} ${this.item}${slotString}`;\n\t}\n}\n\nexport class CommandRemoveUnstackableMaterial implements Command {\n\tstatic Op = 0x8;\n\tprivate verb: number;\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 = VerbToId[verb as keyof typeof VerbToId] || 0;\n\t\tthis.item = item;\n\t\tthis.slot = slot;\n\t\tthis.noSlot = noSlot;\n\t}\n\tpublic execute(inv: Inventory): void {\n\t\tinv.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 `${Verbs[this.verb]} ${this.item}${slotString}`;\n\t}\n}\n\nexport class CommandAddMaterial implements Command {\n\tstatic Op = 0x9;\n\tprivate verb: number;\n\tprivate count: number;\n\tprivate item: Item;\n\tconstructor(verb: string, count: number, item: Item){\n\t\tthis.verb = VerbToId[verb as keyof typeof VerbToId] || 0;\n\t\tthis.count = count;\n\t\tthis.item = item;\n\t}\n\t// public fromBuffer(buf: Buffer): number {\n\t// \tlet read = 0;\n\t// \tconst id = buf.readInt8(read);\n\t// \tread+=1;\n\t// \tthis.item = idToItemData(id).item;\n\n\t// \tthis.count = buf.readInt16LE(read);\n\t// \tread+=2;\n\t// \tthis.verb = buf.readInt8(read);\n\t// \tread++;\n\t// \treturn read;\n\t// }\n\t// public toBuffer(): Buffer {\n\t// \tconst buf: Buffer = Buffer.alloc(1+1+2+1);\n\t// \tlet write = 0;\n\t// \tbuf.writeInt8(CommandAddMaterial.Op);\n\t// \twrite++;\n\t// \tbuf.writeInt8(itemToItemData(this.item).id, write);\n\t// \twrite++;\n\t// \tbuf.writeInt16LE(this.count, write);\n\t// \twrite+=2;\n\t// \tbuf.writeInt8(this.verb, write);\n\t// \treturn buf;\n\t// }\n\tpublic execute(inv: Inventory): void {\n\t\tinv.add(this.item, this.count);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `${Verbs[this.verb]} ${this.count} ${this.item}`;\n\t}\n}\n\nexport class CommandEquipArrow 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(inv: Inventory): void {\n\t\tinv.equipEquipmentOrArrow(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 ${itemToArrowType(this.item)} Arrow${slotString}`;\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(inv: Inventory): void {\n\t\tinv.equipEquipmentOrArrow(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(inv: Inventory): void {\n\t\tinv.unequipEquipment(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 CommandSetTag implements Command {\n\tprivate name: string;\n\tconstructor(name: string){\n\t\tthis.name = name;\n\t}\n\tpublic execute(inv: Inventory): void {\n\t\tinv.save();\n\t\tinv.setTag(this.name);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Save As ${this.name}`;\n\t}\n}\n\nexport class CommandApplyTag implements Command {\n\tprivate name: string;\n\tconstructor(name: string){\n\t\tthis.name = name;\n\t}\n\tpublic execute(inv: Inventory): void {\n\t\tinv.applyTag(this.name);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `Use ${this.name}`;\n\t}\n}\n\nexport class CommandCloseGame implements Command {\n\tpublic execute(inv: Inventory): void {\n\t\tinv.closeGame();\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn \"Close Game\";\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(_inv: Inventory): void {\n\t\t// nothing\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `# ${this.name}`;\n\t}\n}\n","import { Item, ItemStack, itemToItemData, ItemType } from \"./Item\";\n\nexport class Slots {\n\tprivate internalSlots: ItemStack[] = [];\n\tconstructor(slots: ItemStack[]) {\n\t\tthis.internalSlots = slots;\n\t}\n\tpublic getSlotsRef(): ItemStack[] {\n\t\treturn this.internalSlots;\n\t}\n\tpublic deepClone(): Slots {\n\t\treturn new Slots(this.internalSlots.map(s=>({...s})));\n\t}\n\tpublic get length(): number {\n\t\treturn this.internalSlots.length;\n\t}\n\tpublic get(i: number): ItemStack{\n\t\treturn this.internalSlots[i];\n\t}\n\tpublic getByType(type: ItemType): Slots {\n\t\treturn new Slots(this.internalSlots.filter(s=>itemToItemData(s.item).type===type));\n\t}\n\tpublic getBeforeType(type: ItemType): Slots {\n\t\treturn new Slots(this.internalSlots.filter(s=>itemToItemData(s.item).typeitemToItemData(s.item).type>type));\n\t}\n\tpublic addSlotsToEnd(slots: Slots) {\n\t\tslots.internalSlots.forEach(s=>this.addStack(s));\n\t}\n\tpublic addStack(stack: ItemStack) {\n\t\t// Scan non-repeatables\n\t\tconst data = itemToItemData(stack.item);\n\t\tif(!data.repeatable){\n\t\t\tfor(let i=0;i{\n\t\t\treturn itemToItemData(a.item).sortOrder - itemToItemData(b.item).sortOrder;\n\t\t});\n\t}\n\tpublic removeFromEnd(count: number): Slots {\n\t\tconst end = this.internalSlots.splice(-count, count);\n\t\treturn new Slots(end);\n\t}\n\tpublic remove(item: Item, count: number, slot: number) {\n\t\tlet s = 0;\n\t\tfor(let i = 0; i 0;i++){\n\t\t\tif(this.internalSlots[i].item === item){\n\t\t\t\tif(scount>0);\n\t}\n\n\tpublic add(item: Item, count: number) {\n\t\tlet added = false;\n\t\tconst data = itemToItemData(item);\n\t\tif(data.stackable){\n\t\t\tfor(let i = 0; i{\n\t\t\t\t\t\tconst sData = itemToItemData(s.item);\n\t\t\t\t\t\treturn sData.type === data.type && s.equipped && s.count > 0;\n\t\t\t\t\t}).length === 0;\n\t\t\t\t\tthis.addStack({item,count,equipped:shouldEquipNew});\n\t\t\t\t}else{\n\t\t\t\t\tthis.addStack({item,count,equipped:false});\n\t\t\t\t}\n \n\t\t\t}else{\n\t\t\t\tif(data.type===ItemType.Weapon || data.type===ItemType.Bow || data.type===ItemType.Shield){\n\t\t\t\t\t//Check equip\n\t\t\t\t\tconst shouldEquipNew = this.internalSlots.filter(s=>{\n\t\t\t\t\t\tconst sData = itemToItemData(s.item);\n\t\t\t\t\t\treturn sData.type === data.type && s.equipped;\n\t\t\t\t\t}).length === 0;\n\t\t\t\t\tthis.addStack({item,count:1,equipped: shouldEquipNew});\n\t\t\t\t\tfor(let i=1;iitemToItemData(s.item).type === type);\n\t\tfor(let i = 0; i{\n\t\t\tthis.slots.add(s.item, s.count);\n\t\t});\n\t\tthis.numBroken = 0;\n\t\tthis.isInitialSort = false;\n\t\tthis.isAltered = true;\n\t\tthis.inaccurate = false;\n\t}\n\n\tpublic closeGame() {\n\t\tthis.numBroken = 0;\n\t\tthis.isInitialSort = false;\n\t\tthis.isAltered = true;\n\t\tthis.inaccurate = false;\n\t\tthis.slots = new Slots([]);\n\t}\n\n\tpublic addBrokenSlots(num: number) {\n\t\tthis.numBroken+=num;\n\t}\n\n\tpublic setTag(name: string){\n\t\tthis.namedSlots[name] = this.savedSlots.deepClone();\n\t}\n\n\tpublic applyTag(name: string){\n\t\tif(name in this.namedSlots){\n\t\t\tthis.savedSlots = this.namedSlots[name].deepClone();\n\t\t}else{\n\t\t\tthis.savedSlots = new Slots([]);\n\t\t}\n\t}\n\n\tpublic save() {\n\t\tif(this.isAltered){\n\t\t\tthis.savedSlots = this.slots.deepClone();\n\t\t}\n\t\t// Inventory Corruption\n\t\t// get durability transfer slots\n\t\tconst durabilityTransferSlots: number[] = [];\n\t\tconst equippedWeapon = this.slots.getFirstEquippedSlotIndex(ItemType.Weapon);\n\t\tif(equippedWeapon>=0){\n\t\t\tdurabilityTransferSlots.push(equippedWeapon);\n\t\t}\n\t\tconst equippedBow = this.slots.getFirstEquippedSlotIndex(ItemType.Bow);\n\t\tif(equippedBow>=0){\n\t\t\tdurabilityTransferSlots.push(equippedBow);\n\t\t}\n\t\tconst equippedShield = this.slots.getFirstEquippedSlotIndex(ItemType.Shield);\n\t\tif(equippedShield>=0){\n\t\t\tdurabilityTransferSlots.push(equippedShield);\n\t\t}\n\t\tdurabilityTransferSlots.forEach(s=>{\n\t\t\tif(s {\n\t\t\t\n\t\t// }\n\t\tItemTypes.forEach(type=>{\n\t\t\tthis.slots.addSlotsToEnd(dupeMap[type]);\n\t\t\tthis.slots.addSlotsToEnd(this.savedSlots.getByType(type).deepClone());\n\t\t});\n\n\t\tthis.slots.sortArrows();\n\t\tthis.isInitialSort = true;\n\t\tthis.isAltered = false;\n\t}\n\n\tpublic sortKey() {\n\t\tconst nonKeyItems = this.slots.getBeforeType(ItemType.Key);\n\t\tconst keyItems = this.slots.getByType(ItemType.Key);\n\t\tkeyItems.sort();\n\t\tnonKeyItems.addSlotsToEnd(keyItems);\n\t\tthis.slots = nonKeyItems;\n\t\tthis.isAltered=true;\n\t\tthis.isInitialSort=false;\n\t}\n\n\tpublic sortMaterial() {\n\t\tconst beforeMaterial = this.slots.getBeforeType(ItemType.Material);\n\t\tconst afterMaterial = this.slots.getAfterType(ItemType.Material);\n\t\tconst materials = this.slots.getByType(ItemType.Material);\n\t\tif(this.isInitialSort){\n\t\t\t// the materials in broken slots are not sorted\n\t\t\tconst brokenSlots = Math.max(0, this.numBroken - afterMaterial.length);\n\t\t\tconst noSortPart = materials.removeFromEnd(brokenSlots);\n\t\t\tmaterials.sort();\n\t\t\tbeforeMaterial.addSlotsToEnd(materials);\n\t\t\tbeforeMaterial.addSlotsToEnd(noSortPart);\n\t\t\tbeforeMaterial.addSlotsToEnd(afterMaterial);\n\t\t}else{\n\t\t\tmaterials.sort();\n\t\t\tbeforeMaterial.addSlotsToEnd(materials);\n\t\t\tbeforeMaterial.addSlotsToEnd(afterMaterial);\n\t\t}\n\t\t\n\t\tthis.slots = beforeMaterial;\n\t\tthis.isInitialSort = false;\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic remove(item: Item, count: number, slot: number) {\n\t\tthis.slots.remove(item, count, slot);\n\t\tif(item===Item.SpiritOrb){\n\t\t\tthis.turnedInOrbs+=count;\n\t\t}\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic add(item: Item, count: number) {\n\t\tthis.slots.add(item, count);\n\t\tif(itemToItemData(item).type===ItemType.Arrow){\n\t\t\tthis.slots.sortArrows();\n\t\t}\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic equipEquipmentOrArrow(item: Item, slot: number) {\n\t\tthis.slots.equip(item, slot);\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic unequipEquipment(item: Item, slot: number){\n\t\tthis.slots.unequip(item, slot);\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic shootArrow(item: Item, count: number){\n\t\tthis.slots.shoot(item, count);\n\t\tthis.isAltered=true;\n\t}\n\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 = ({isSelected, isContextSelected, comment,children, onClick, onContextMenu}) => {\n\treturn {\n\t\t\tonClick(e.clientX, e.clientY);\n\t\t}}\n\t\tonContextMenu={(e)=>{\n\t\t\tif(onContextMenu){\n\t\t\t\tonContextMenu(e.clientX,e.clientY);\n\t\t\t\te.preventDefault();\n\t\t\t}\n \n\t\t}}\n\t>{children} ;\n};\n\n","import clsx from \"clsx\";\ntype ItemSlotProps = {\n image: string,\n count: number,\n isBroken: boolean,\n isSave: boolean,\n isEquipped: boolean,\n};\n\nexport const ItemSlot: React.FC = ({image, count, isBroken, isSave, isEquipped})=>{\n\treturn (\n\t\t\n\t\t\t\n\t\t\t{\n\t\t\t\tcount > 0 && \n x{count}\n\t\t\t\t \n\t\t\t}\n\t\t\n\t);\n};\n\nexport const DoubleItemSlot: React.FC<{first?: ItemSlotProps, second?: ItemSlotProps}> = ({first, second})=>{\n\treturn (\n\t\t\n\t\t\t{first ? : }\n\t\t\t{second ? : }\n\t\t\n\t);\n}; ","import { ItemSlot } from \"./ItemSlot\";\n\nexport type ItemListItemProps = {\n\timage: string, \n\tcount: number, \n\tisEquipped: boolean,\n}\n\nexport type ItemListProps = {\n\tisSave: boolean,\n items: ItemListItemProps[],\n numBroken: number\n}\n\nexport const ItemList: React.FC = ({items, numBroken, isSave}) => {\n\treturn <>\n\t\t{\n\t\t\titems.map(({image, count, isEquipped}, i)=>{\n\t\t\t\tconst broken = i+numBroken >= items.length;\n\t\t\t\treturn ;\n\t\t\t})\n\t\t}\n\t>;\n};\n\n","import { Command, CommandAddMaterial, CommandApplyTag, CommandBreakSlots, CommandCloseGame, CommandComment, CommandEquip, CommandEquipArrow, CommandInitialize, CommandNothing, CommandReload, CommandRemoveMaterial, CommandRemoveUnstackableMaterial, CommandSave, CommandSetTag, CommandSortKey, CommandSortMaterial, CommandUnequip } from \"./Command\";\nimport { Item, ItemStack } from \"./Item\";\n\nexport const parseCommand = (cmdString: string): Command | undefined => {\n\tif(cmdString.startsWith(\"# \")){\n\t\treturn new CommandComment(cmdString.substring(2));\n\t}\n\tconst tokens = cmdString.split(\" \").filter(i=>i);\n\tif(tokens.length===0){\n\t\treturn new CommandNothing();\n\t}\n\t// intialize\n\tif(tokens.length>1 && tokens[0] === \"Initialize\" && tokens.length%2 === 1){\n\t\tconst stacks: ItemStack[] = [];\n\t\tfor(let i=1;i 2 && tokens[0] === \"Break\" && tokens[2]=== \"Slots\" ){\n\t\tconst slots = parseInt(tokens[1]);\n\t\tif(Number.isInteger(slots)){\n\t\t\treturn new CommandBreakSlots(slots);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// remove material\n\tif (tokens.length === 6 && (tokens[0] === \"Remove\" || tokens[0] === \"Sell\" || tokens[0] === \"Drop\") && tokens[3] === \"From\" && tokens[4] ===\"Slot\" ){\n\t\tconst count = parseInt(tokens[1]);\n\t\tconst item = tokens[2];\n\t\tconst slot = parseInt(tokens[5]);\n\t\tif(Number.isInteger(count) && Number.isInteger(slot) && item in Item){\n\t\t\treturn new CommandRemoveMaterial(tokens[0], count, Item[item as keyof typeof Item], slot-1, false);\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (tokens.length === 3 && (tokens[0] === \"Remove\" || tokens[0] === \"Sell\" || tokens[0] === \"Drop\")){\n\t\tconst count = parseInt(tokens[1]);\n\t\tconst item = tokens[2];\n\t\tif(Number.isInteger(count) && item in Item){\n\t\t\treturn new CommandRemoveMaterial(tokens[0], count, Item[item as keyof typeof Item], 0, true);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// remove 1 material\n\tif (tokens.length === 5 && (tokens[0] === \"Remove\" || tokens[0] === \"Sell\" || tokens[0] === \"Eat\") && tokens[2] === \"From\" && tokens[3] ===\"Slot\" ){\n\t\tconst item = tokens[1];\n\t\tconst slot = parseInt(tokens[4]);\n\t\tif(Number.isInteger(slot) && item in Item){\n\t\t\treturn new CommandRemoveUnstackableMaterial(tokens[0], Item[item as keyof typeof Item], slot-1, false);\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (tokens.length === 2 && (tokens[0] === \"Remove\" || tokens[0] === \"Sell\" || tokens[0] === \"Eat\")){\n\t\tconst item = tokens[1];\n\t\tif(item in Item){\n\t\t\treturn new CommandRemoveUnstackableMaterial(tokens[0], Item[item as keyof typeof Item], 0, true);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// add material\n\tif (tokens.length === 3 && (tokens[0] === \"Get\" || tokens[0] === \"Cook\" || tokens[0] === \"Add\" || tokens[0] === \"Pickup\")){\n\t\tconst count = parseInt(tokens[1]);\n\t\tconst item = tokens[2];\n\t\tif(Number.isInteger(count) && item in Item){\n\t\t\treturn new CommandAddMaterial(tokens[0], count, Item[item as keyof typeof Item]);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// Equip Equipment\n\tif (tokens.length === 5 && tokens[0] === \"Equip\" && tokens[2] === \"In\" && tokens[3] ===\"Slot\" ){\n\t\tconst item = tokens[1];\n\t\tconst slot = parseInt(tokens[4]);\n\t\tif( Number.isInteger(slot) && item in Item){\n\t\t\treturn new CommandEquip(Item[item as keyof typeof Item], slot-1, false);\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (tokens.length === 2 && tokens[0] === \"Equip\"){\n\t\tconst item = tokens[1];\n\t\tif( item in Item){\n\t\t\treturn new CommandEquip(Item[item as keyof typeof Item], 0, true);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// Unequip Equipment\n\tif (tokens.length === 5 && tokens[0] === \"Unequip\" && tokens[2] === \"In\" && tokens[3] ===\"Slot\" ){\n\t\tconst item = tokens[1];\n\t\tconst slot = parseInt(tokens[4]);\n\t\tif( Number.isInteger(slot) && item in Item){\n\t\t\treturn new CommandUnequip(Item[item as keyof typeof Item], slot-1, false);\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (tokens.length === 2 && tokens[0] === \"Unequip\"){\n\t\tconst item = tokens[1];\n\t\tif( item in Item){\n\t\t\treturn new CommandUnequip(Item[item as keyof typeof Item], -1, true);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// Equip Arrow\n\tif (tokens.length === 6 && tokens[0] === \"Equip\" && tokens[2] === \"Arrow\" && tokens[3] === \"In\" && tokens[4] ===\"Slot\" ){\n\t\tconst item = tokens[1]+\"Arrow\";\n\t\tconst slot = parseInt(tokens[5]);\n\t\tif( Number.isInteger(slot) && item in Item){\n\t\t\treturn new CommandEquipArrow(Item[item as keyof typeof Item], slot-1, false);\n\t\t}\n\t\treturn undefined;\n\t}\n\tif (tokens.length === 3 && tokens[0] === \"Equip\" && tokens[2] === \"Arrow\" ){\n\t\tconst item = tokens[1]+\"Arrow\";\n\t\tif(item in Item){\n\t\t\treturn new CommandEquipArrow(Item[item as keyof typeof Item], 0, true);\n\t\t}\n\t\treturn undefined;\n\t}\n\t// Multi Save\n\tif (tokens.length === 3 && tokens[0] === \"Save\" && tokens[1] === \"As\"){\n\t\tconst name = tokens[2];\n\t\treturn new CommandSetTag(name);\n\t}\n\tif (tokens.length === 2 && tokens[0] === \"Use\"){\n\t\tconst name = tokens[1];\n\t\treturn new CommandApplyTag(name);\n\t}\n\treturn undefined;\n};\n","import clsx from \"clsx\";\nimport { ItemList, ItemListItemProps, ItemListProps } from \"components/ItemList\";\nimport { DoubleItemSlot } from \"components/ItemSlot\";\nimport { Command } from \"core/Command\";\nimport { ItemStack, itemToItemData } from \"core/Item\";\nimport { parseCommand } from \"core/Parser\";\nimport { Slots } from \"core/Slots\";\n\nimport React, { useEffect, useState } from \"react\";\n\ntype DisplayPaneProps = {\n command: string,\n\torbs: number,\n displayIndex: number,\n slots: Slots,\n\tsavedSlots: Slots,\n numBroken: number,\n\toverlaySave: boolean,\n editCommand: (c: Command)=>void\n}\n\nconst stacksToItemListProps = (slots: Slots, numBroken: number, isSave: boolean): ItemListProps => {\n\treturn {\n\t\titems: stacksToItemProps(slots.getSlotsRef()),\n\t\tnumBroken,\n\t\tisSave,\n\t};\n};\n\nconst stacksToItemProps = (stacks: ItemStack[]): ItemListItemProps[] => {\n\treturn stacks.map(stackToItemProps);\n};\n\nconst stackToItemProps = ({item, count, equipped}: ItemStack): ItemListItemProps => {\n\tconst data = itemToItemData(item);\n\treturn {image: data.image, count: data.stackable ? count : 0, isEquipped:equipped};\n};\n\nexport const DisplayPane: React.FC = ({command,orbs,editCommand,displayIndex, slots, savedSlots, numBroken, overlaySave})=>{\n\tconst [commandString, setCommandString] = useState(\"\");\n\tconst [hasError, setHasError] = useState(false);\n\tconst listProps = stacksToItemListProps(slots, numBroken, false);\n\tconst listSaveProps = stacksToItemListProps(savedSlots, 0, true);\n\tuseEffect(()=>{\n\t\tif(commandString!==command){\n\t\t\tsetCommandString(command);\n\t\t\tsetHasError(false);\n\t\t}\n \n\t}, [command, displayIndex]);\n\n\treturn \n\t\t
\n\t\t\t{\n\t\t\t\tconst cmdString = e.target.value;\n\t\t\t\tsetCommandString(cmdString);\n\t\t\t\tconst parsedCommand = parseCommand(cmdString);\n\t\t\t\tif(parsedCommand){\n\t\t\t\t\teditCommand(parsedCommand);\n\t\t\t\t\tsetHasError(false);\n\t\t\t\t}else{\n\t\t\t\t\tsetHasError(true);\n\t\t\t\t}\n\t\t\t}}>\n\t\t\t\n\t\t\t\t\tOrbs: {orbs}\n\t\t\t\n\t\t
\n\t\t{overlaySave ? \n\t\t\t
\n\t\t\t\t
Save / Current
\n\t\t\t\t
\n\t\t\t\t\t{\n\t\t\t\t\t\t(()=>{\n\t\t\t\t\t\t\tconst doubleSlots: JSX.Element[] = [];\n\t\t\t\t\t\t\tfor(let i=0;i=slots.length-numBroken, isSave:false}}\n\t\t\t\t\t\t\t\t/>);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(savedSlots.length>slots.length){\n\t\t\t\t\t\t\t\tfor(let i=slots.length;i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else if(slots.length > savedSlots.length){\n\t\t\t\t\t\t\t\tfor(let i=savedSlots.length;i=slots.length-numBroken, isSave:false}}\n\t\t\t\t\t\t\t\t\t/>);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn doubleSlots;\n\t\t\t\t\t\t})()\n\t\t\t\t\t}\n\t\t\t\t
\n\t\t\t\n\t\t\t
\n\t\t\n\t\t\t:<>\n\t\t\n\t\t\t\t
\n\t\t\t\t\t
Inventory of Save
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
Current Inventory
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t>}\n\n\t
;\n};\n","/* eslint no-empty:0 */\n/*\n* FileSaver.js\n* A saveAs() FileSaver implementation.\n*\n* By Eli Grey, http://eligrey.com\n*\n* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n* source : http://purl.eligrey.com/github/FileSaver.js\n*/\n\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nvar _global = typeof window === \"object\" && window.window === window\n\t? window : typeof window.self === \"object\" && window.self.self === window.self\n\t\t? window.self : typeof window.global === \"object\" && window.global.global === window.global\n\t\t\t? window.global\n\t\t\t: this;\n\nfunction bom (blob, opts) {\n\tif (typeof opts === \"undefined\") {opts = { autoBom: false };}\n\telse if (typeof opts !== \"object\") {\n\t\tconsole.error(\"Deprecated: Expected third argument to be a object\");\n\t\topts = { autoBom: !opts };\n\t}\n\n\t// prepend BOM for UTF-8 XML and text/* types (including HTML)\n\t// note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n\tif (opts.autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n\t\treturn new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type });\n\t}\n\treturn blob;\n}\n\nfunction download (url, name, opts) {\n\tvar xhr = new XMLHttpRequest();\n\txhr.open(\"GET\", url);\n\txhr.responseType = \"blob\";\n\txhr.onload = function () {\n\t\tsaveAs(xhr.response, name, opts);\n\t};\n\txhr.onerror = function () {\n\t\tconsole.error(\"could not download file\");\n\t};\n\txhr.send();\n}\n\nfunction corsEnabled (url) {\n\tvar xhr = new XMLHttpRequest();\n\t// use sync to avoid popup blocker\n\txhr.open(\"HEAD\", url, false);\n\ttry {\n\t\txhr.send();\n\t} catch (e) {}\n\treturn xhr.status >= 200 && xhr.status <= 299;\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click (node) {\n\ttry {\n\t\tnode.dispatchEvent(new MouseEvent(\"click\"));\n\t} catch (e) {\n\t\tvar evt = document.createEvent(\"MouseEvents\");\n\t\tevt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80,\n\t\t\t20, false, false, false, false, 0, null);\n\t\tnode.dispatchEvent(evt);\n\t}\n}\n\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nvar isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent);\n\nvar saveAs = _global.saveAs || (\n// probably in some web worker\n\ttypeof window !== \"object\" || window !== _global\n\t\t? function saveAs () { /* noop */ }\n\n\t// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView\n\t\t: \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView\n\t\t\t? function saveAs (blob, name, opts) {\n\t\t\t\tvar URL = _global.URL || _global.webkitURL;\n\t\t\t\tvar a = document.createElement(\"a\");\n\t\t\t\tname = name || blob.name || \"download\";\n\n\t\t\t\ta.download = name;\n\t\t\t\ta.rel = \"noopener\"; // tabnabbing\n\n\t\t\t\t// TODO: detect chrome extensions & packaged apps\n\t\t\t\t// a.target = '_blank'\n\n\t\t\t\tif (typeof blob === \"string\") {\n\t\t\t\t\t// Support regular links\n\t\t\t\t\ta.href = blob;\n\t\t\t\t\tif (a.origin !== window.location.origin) {\n\t\t\t\t\t\tcorsEnabled(a.href)\n\t\t\t\t\t\t\t? download(blob, name, opts)\n\t\t\t\t\t\t\t: click(a, a.target = \"_blank\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclick(a);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Support blobs\n\t\t\t\t\ta.href = URL.createObjectURL(blob);\n\t\t\t\t\tsetTimeout(function () { URL.revokeObjectURL(a.href); }, 4E4); // 40s\n\t\t\t\t\tsetTimeout(function () { click(a); }, 0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Use msSaveOrOpenBlob as a second approach\n\t\t\t: \"msSaveOrOpenBlob\" in navigator\n\t\t\t\t? function saveAs (blob, name, opts) {\n\t\t\t\t\tname = name || blob.name || \"download\";\n\n\t\t\t\t\tif (typeof blob === \"string\") {\n\t\t\t\t\t\tif (corsEnabled(blob)) {\n\t\t\t\t\t\t\tdownload(blob, name, opts);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar a = document.createElement(\"a\");\n\t\t\t\t\t\t\ta.href = blob;\n\t\t\t\t\t\t\ta.target = \"_blank\";\n\t\t\t\t\t\t\tsetTimeout(function () { click(a); });\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnavigator.msSaveOrOpenBlob(bom(blob, opts), name);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Fallback to using FileReader and a popup\n\t\t\t\t: function saveAs (blob, name, opts, popup) {\n\t\t\t\t\t// Open a popup immediately do go around popup blocker\n\t\t\t\t\t// Mostly only available on user interaction and the fileReader is async so...\n\t\t\t\t\tpopup = popup || window.open(\"\", \"_blank\");\n\t\t\t\t\tif (popup) {\n\t\t\t\t\t\tpopup.document.title =\n popup.document.body.innerText = \"downloading...\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (typeof blob === \"string\") {return download(blob, name, opts);}\n\n\t\t\t\t\tvar force = blob.type === \"application/octet-stream\";\n\t\t\t\t\tvar isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari;\n\t\t\t\t\tvar isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n\t\t\t\t\tif ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n\t\t\t\t\t\t// Safari doesn't allow downloading of blob URLs\n\t\t\t\t\t\tvar reader = new FileReader();\n\t\t\t\t\t\treader.onloadend = function () {\n\t\t\t\t\t\t\tvar url = reader.result;\n\t\t\t\t\t\t\turl = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n\t\t\t\t\t\t\tif (popup) {popup.location.href = url;}\n\t\t\t\t\t\t\telse {window.location = url;}\n\t\t\t\t\t\t\tpopup = null; // reverse-tabnabbing #460\n\t\t\t\t\t\t};\n\t\t\t\t\t\treader.readAsDataURL(blob);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar URL = _global.URL || _global.webkitURL;\n\t\t\t\t\t\tvar url = URL.createObjectURL(blob);\n\t\t\t\t\t\tif (popup) {popup.location = url;}\n\t\t\t\t\t\telse {window.location.href = url;}\n\t\t\t\t\t\tpopup = null; // reverse-tabnabbing #460\n\t\t\t\t\t\tsetTimeout(function () { URL.revokeObjectURL(url); }, 4E4); // 40s\n\t\t\t\t\t}\n\t\t\t\t}\n);\n\nexport default saveAs;\n","import { Command, CommandBreakSlots, CommandInitialize, CommandNothing, CommandReload, CommandSave, CommandSortKey } from \"core/Command\";\nimport { Inventory } from \"core/Inventory\";\nimport React, { useEffect, useMemo, useRef, useState } from \"react\";\n\nimport \"./App.css\";\nimport { CommandItem } from \"./components/CommandItem\";\n\nimport { DisplayPane } from \"surfaces/DisplayPane\";\nimport { Item } from \"core/Item\";\nimport { saveAs } from \"data/FileSaver\";\nimport { parseCommand } from \"core/Parser\";\n\nconst getDefaultCommands = (): Command[]=>{\n\tconst encoded = localStorage.getItem(\"HDS.CurrentCommandsText\");\n\tif(encoded){\n\t\tconst lines = encoded.split(\"\\n\");\n\t\treturn lines.map(l=>parseCommand(l)).filter(c=>c) as Command[];\n\t}\n\treturn [\n\t\tnew CommandInitialize([\n\t\t\t{\n\t\t\t\titem: Item.Diamond,\n\t\t\t\tcount: 5,\n\t\t\t\tequipped:false,\n\t\t\t},\n\t\t\t{\n\t\t\t\titem: Item.Slate,\n\t\t\t\tcount: 1,\n\t\t\t\tequipped:false,\n\t\t\t},\n\t\t\t{\n\t\t\t\titem: Item.Glider,\n\t\t\t\tcount: 1,\n\t\t\t\tequipped:false,\n\t\t\t},\n\t\t\t{\n\t\t\t\titem: Item.SpiritOrb,\n\t\t\t\tcount: 4,\n\t\t\t\tequipped:false,\n\t\t\t}\n\t\t]),\n\t\tnew CommandBreakSlots(4),\n\t\tnew CommandReload(),\n\t\tnew CommandSortKey(),\n\t\tnew CommandSave(),\n\t\tnew CommandReload()\n\t];\n};\n\nexport const App: React.FC = () => {\n\tconst [overlaySave, setOverlaySave] = useState(false);\n\tconst [commands, setCommands] = useState(getDefaultCommands());\n\tconst [displayIndex, setDisplayIndex] = useState(0);\n\tconst [contextMenuX, setContextMenuX] = useState(0);\n\tconst [contextMenuY, setContextMenuY] = useState(0);\n\tconst [contextMenuShowing, setContextMenuShowing] = useState(false);\n\tconst [contextIndex, setContextIndex] = useState(-1);\n\n\tconst uploadRef = useRef(null);\n\tconst contextMenuRef = useRef(null);\n\t// compute props\n\tconst inventories = useMemo(()=>{\n\t\tconst inventories: Inventory[] = [];\n\t\tconst inv = new Inventory();\n\t\tcommands.forEach(c=>{\n\t\t\tc.execute(inv);\n\t\t\tinventories.push(inv.deepClone());\n\t\t});\n\t\treturn inventories;\n\t}, [commands]);\n\n\tuseEffect(()=>{\n\t\twindow.onkeydown=(e)=>{\n\t\t\tif(e.code===\"ArrowDown\"){\n\t\t\t\tsetDisplayIndex(Math.min(commands.length-1, displayIndex+1));\n\t\t\t}else if(e.code===\"ArrowUp\"){\n\t\t\t\tsetDisplayIndex(Math.max(0, displayIndex-1));\n\t\t\t}\n\t\t};\n\t}, [commands, displayIndex]);\n\n\tuseEffect(()=>{\n\t\t// const encoded = serializeCommands(commands);\n\t\t// localStorage.setItem(\"HDS.CurrentCommands\", encoded);\n\t\tconst lines = commands.map(c=>c.getDisplayString());\n\t\tconst text = lines.join(\"\\n\");\n\t\tlocalStorage.setItem(\"HDS.CurrentCommandsText\", text);\n\n\t}, [commands]);\n\n\tuseEffect(()=>{\n\t\tif(contextMenuRef.current && contextMenuShowing){\n\t\t\tconst rect = contextMenuRef.current.getBoundingClientRect();\n\t\t\tif (rect.bottom > window.innerHeight){\n\t\t\t\tsetContextMenuY(contextMenuY-rect.height);\n\t\t\t}\n\t\t}\n\t}, [contextMenuRef, contextMenuShowing]);\n \n\treturn (\n\t\t\n\t\t\t
{\n\t\t\t\tconst files = e.target.files;\n\t\t\t\tif(files?.length && files[0]){\n\t\t\t\t\tconst file = files[0];\n\t\t\t\t\tfile.text().then(text=>{\n\t\t\t\t\t\tconst lines = text.split(\"\\n\");\n\t\t\t\t\t\tconst parsedCommands: Command[] = lines.map(l=>parseCommand(l)).filter(c=>c) as Command[];\n\t\t\t\t\t\tsetDisplayIndex(0);\n\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\t\tsetCommands(parsedCommands);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}}/>\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{\n\t\t\t\t\t\tcommands.map((c,i)=>\n\t\t\t\t\t\t\tsetDisplayIndex(i)} \n\t\t\t\t\t\t\t\tonContextMenu={(x,y)=>{\n\t\t\t\t\t\t\t\t\tsetContextIndex(i);\n\t\t\t\t\t\t\t\t\tsetContextMenuX(x);\n\t\t\t\t\t\t\t\t\tsetContextMenuY(y);\n\t\t\t\t\t\t\t\t\tsetContextMenuShowing(true);\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tkey={i} \n\t\t\t\t\t\t\t\tisSelected={displayIndex===i}\n\t\t\t\t\t\t\t\tisContextSelected={contextIndex===i}\n\t\t\t\t\t\t\t\tcomment={c.getDisplayString().startsWith(\"#\")}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{c.getDisplayString()}\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{\n\t\t\t\t\t\tconst arrCopy = [...commands];\n\t\t\t\t\t\tarrCopy.push(new CommandNothing());\n\t\t\t\t\t\tsetCommands(arrCopy);\n\t\t\t\t\t}} onContextMenu={()=>{\n\t\t\t\t\t\tconst arrCopy = [...commands];\n\t\t\t\t\t\tarrCopy.push(new CommandNothing());\n\t\t\t\t\t\tsetCommands(arrCopy);\n\t\t\t\t\t}}>(new)\n\t\t\t\t\t{\n\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\tsetContextMenuX(x);\n\t\t\t\t\t\tsetContextMenuY(y);\n\t\t\t\t\t\tsetContextMenuShowing(true);\n\t\t\t\t\t}} onContextMenu={(x,y)=>{\n\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\tsetContextMenuX(x);\n\t\t\t\t\t\tsetContextMenuY(y);\n\t\t\t\t\t\tsetContextMenuShowing(true);\n\t\t\t\t\t}}>(options)\n\n\t\t\t\t
\n\t\t\t
\n\t\t\t{displayIndex >= 0 && displayIndex < commands.length &&\n\t\t\t\t
{\n\t\t\t\t\t\tconst arrCopy = [...commands];\n\t\t\t\t\t\tarrCopy[displayIndex] = c;\n\t\t\t\t\t\tsetCommands(arrCopy);\n\t\t\t\t\t}}\n\t\t\t\t/> \n\t\t\t}\n\n\t\t\t{\n\t\t\t\tcontextMenuShowing && {\n\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t}} onContextMenu={(e)=>{\n\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\te.preventDefault();\n\t\t\t\t}}>\n\t\t\t\t\t
\n\t\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\t\t\t\tconst arrCopy = [...commands];\n\t\t\t\t\t\t\t\t\tarrCopy.splice(contextIndex, 0, new CommandNothing());\n\t\t\t\t\t\t\t\t\tsetCommands(arrCopy);\n\t\t\t\t\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\t\t\t}}>Insert Above\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(contextIndex > 0){\n\t\t\t\t\t\t\t\t\t\tconst arrCopy = [...commands];\n\t\t\t\t\t\t\t\t\t\tconst temp = arrCopy[contextIndex];\n\t\t\t\t\t\t\t\t\t\tarrCopy[contextIndex] = arrCopy[contextIndex-1];\n\t\t\t\t\t\t\t\t\t\tarrCopy[contextIndex-1] = temp;\n\t\t\t\t\t\t\t\t\t\tsetCommands(arrCopy);\n\t\t\t\t\t\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}}>Move Up\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(confirm(\"Delete?\")){\n\t\t\t\t\t\t\t\t\t\tsetCommands(commands.filter((_,i)=>i!==contextIndex));\n\t\t\t\t\t\t\t\t\t\tif(displayIndex >= commands.length){\n\t\t\t\t\t\t\t\t\t\t\tsetDisplayIndex(commands.length-1);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}}>Delete> :\n\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tsetOverlaySave(!overlaySave);\n\t\t\t\t\t\t\t\t\t}}>Toggle Save Overlay\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif(uploadRef.current){\n\t\t\t\t\t\t\t\t\t\t\tuploadRef.current.click();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}}>Import\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tconst lines = commands.map(c=>c.getDisplayString());\n\t\t\t\t\t\t\t\t\t\tconst text = lines.join(\"\\n\");\n\t\t\t\t\t\t\t\t\t\tsaveAs(text, \"dupe.txt\");\n\t\t\t\t\t\t\t\t\t}}>Export\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\talert(`Available Commands:\nInitialize X Item1 Y Item2 Z Item3 ...\nBreak X Slots - add X broken slots\nSave\nReload\nSort Key/Material - sort key items or material\nGet/Add/Cook/Pickup X ITEM\nRemove/Drop/Sell X ITEM From Slot Y\nRemove/Sell/Eat MEAL From Slot X\n\nLimitations:\nInventory corruption is not implemented yet\n\n`);\n\t\t\t\t\t\t\t\t\t\talert(`Available Items:\nSlate\nGlider\nSpiritOrb\nSpeedFood\nLotus\nSilentPrincess\nHoney\nAcorn\nFaroshScale\nFaroshClaw\nFaroshHorn\nHeartyBass\nBeetle\nOpal\nDiamond\nTail\nSpring\nShaft\nCore\nWood\nWeapon\n\t\t`);\n\t\t\t\t\t\t\t\t\t}}>Reference\n\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\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
\n\t\t\t}\n\t\t \n\t);\n};\n","import FileSaverFunction from \"./FileSaver\";\n\nexport const saveAs = (content: string, filename: string): void =>{\n\tconst blob = new Blob([content], {\n\t\ttype: \"text/plain;charset=utf-8\"\n\t});\n\tFileSaverFunction(blob, filename);\n};\n","import { ReportHandler } from \"web-vitals\";\n\nconst reportWebVitals = (onPerfEntry?: ReportHandler) => {\n\tif (onPerfEntry && onPerfEntry instanceof Function) {\n\t\timport(\"web-vitals\").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {\n\t\t\tgetCLS(onPerfEntry);\n\t\t\tgetFID(onPerfEntry);\n\t\t\tgetFCP(onPerfEntry);\n\t\t\tgetLCP(onPerfEntry);\n\t\t\tgetTTFB(onPerfEntry);\n\t\t});\n\t}\n};\n\nexport default reportWebVitals;\n","import React from \"react\";\nimport ReactDOM from \"react-dom/client\";\nimport \"./index.css\";\nimport {App} from \"./App\";\nimport reportWebVitals from \"./reportWebVitals\";\n\nconst root = ReactDOM.createRoot(\n document.getElementById(\"root\") as HTMLElement\n);\nroot.render(\n\t\n\t\t\n\t\n);\n\n// If you want to start measuring performance in your app, pass a function\n// to log results (for example: reportWebVitals(console.log))\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\nreportWebVitals();\n"],"names":["aa","require","ca","p","a","b","c","arguments","length","encodeURIComponent","da","Set","ea","fa","ha","add","ia","window","document","createElement","ja","Object","prototype","hasOwnProperty","ka","la","ma","v","d","e","f","g","this","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","type","sanitizeURL","removeEmptyString","z","split","forEach","toLowerCase","ra","sa","toUpperCase","ta","slice","pa","isNaN","qa","call","test","oa","removeAttribute","setAttribute","setAttributeNS","replace","xlinkHref","ua","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","va","Symbol","for","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","iterator","Ka","La","A","assign","Ma","Error","stack","trim","match","Na","Oa","prepareStackTrace","defineProperty","set","Reflect","construct","l","h","k","displayName","includes","name","Pa","tag","render","Qa","$$typeof","_context","_payload","_init","Ra","Sa","Ta","nodeName","Va","_valueTracker","getOwnPropertyDescriptor","constructor","get","configurable","enumerable","getValue","setValue","stopTracking","Ua","Wa","checked","value","Xa","activeElement","body","Ya","defaultChecked","defaultValue","_wrapperState","initialChecked","Za","initialValue","controlled","ab","bb","cb","db","ownerDocument","eb","Array","isArray","fb","options","selected","defaultSelected","disabled","gb","dangerouslySetInnerHTML","children","hb","ib","jb","textContent","kb","lb","mb","nb","namespaceURI","innerHTML","valueOf","toString","firstChild","removeChild","appendChild","MSApp","execUnsafeLocalFunction","ob","lastChild","nodeType","nodeValue","pb","animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridArea","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","fontWeight","lineClamp","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","qb","rb","sb","style","indexOf","setProperty","keys","charAt","substring","tb","menuitem","area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","ub","vb","is","wb","xb","target","srcElement","correspondingUseElement","parentNode","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","push","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","addEventListener","removeEventListener","Nb","apply","m","onError","Ob","Pb","Qb","Rb","Sb","Tb","Vb","alternate","return","flags","Wb","memoizedState","dehydrated","Xb","Zb","child","sibling","current","Yb","$b","ac","unstable_scheduleCallback","bc","unstable_cancelCallback","cc","unstable_shouldYield","dc","unstable_requestPaint","B","unstable_now","ec","unstable_getCurrentPriorityLevel","fc","unstable_ImmediatePriority","gc","unstable_UserBlockingPriority","hc","unstable_NormalPriority","ic","unstable_LowPriority","jc","unstable_IdlePriority","kc","lc","oc","Math","clz32","pc","qc","log","LN2","rc","sc","tc","uc","pendingLanes","suspendedLanes","pingedLanes","entangledLanes","entanglements","vc","xc","yc","zc","Ac","eventTimes","Cc","C","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","Nc","Oc","Map","Pc","Qc","Rc","Sc","delete","pointerId","Tc","nativeEvent","blockedOn","domEventName","eventSystemFlags","targetContainers","Vc","Wc","priority","isDehydrated","containerInfo","Xc","Yc","dispatchEvent","shift","Zc","$c","ad","bd","cd","ReactCurrentBatchConfig","dd","ed","transition","fd","gd","hd","id","Uc","stopPropagation","jd","kd","ld","md","nd","od","keyCode","charCode","pd","qd","rd","_reactName","_targetInst","currentTarget","isDefaultPrevented","defaultPrevented","returnValue","isPropagationStopped","preventDefault","cancelBubble","persist","isPersistent","wd","xd","yd","sd","eventPhase","bubbles","cancelable","timeStamp","Date","now","isTrusted","td","ud","view","detail","vd","Ad","screenX","screenY","clientX","clientY","pageX","pageY","ctrlKey","shiftKey","altKey","metaKey","getModifierState","zd","button","buttons","relatedTarget","fromElement","toElement","movementX","movementY","Bd","Dd","dataTransfer","Fd","Hd","animationName","elapsedTime","pseudoElement","Id","clipboardData","Jd","Ld","data","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","key","String","fromCharCode","code","location","repeat","locale","which","Rd","Td","width","height","pressure","tangentialPressure","tiltX","tiltY","twist","pointerType","isPrimary","Vd","touches","targetTouches","changedTouches","Xd","Yd","deltaX","wheelDeltaX","deltaY","wheelDeltaY","wheelDelta","deltaZ","deltaMode","Zd","$d","ae","be","documentMode","ce","de","ee","fe","ge","he","ie","le","color","date","datetime","email","month","number","password","range","search","tel","text","time","url","week","me","ne","oe","event","listeners","pe","qe","re","se","te","ue","ve","we","xe","ye","ze","oninput","Ae","detachEvent","Be","Ce","attachEvent","De","Ee","Fe","He","Ie","Je","Ke","node","offset","nextSibling","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","href","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","start","end","selectionStart","selectionEnd","min","defaultView","getSelection","extend","rangeCount","anchorNode","anchorOffset","focusNode","focusOffset","createRange","setStart","removeAllRanges","addRange","setEnd","element","left","scrollLeft","top","scrollTop","focus","Pe","Qe","Re","Se","Te","Ue","Ve","We","animationend","animationiteration","animationstart","transitionend","Xe","Ye","Ze","animation","$e","af","bf","cf","df","ef","ff","gf","hf","lf","mf","concat","nf","Ub","instance","listener","D","of","has","pf","qf","rf","random","sf","bind","capture","passive","n","t","J","x","u","w","F","tf","uf","parentWindow","vf","wf","na","xa","$a","ba","je","char","ke","unshift","xf","yf","zf","Af","Bf","Cf","Df","Ef","__html","Ff","setTimeout","Gf","clearTimeout","Hf","Promise","Jf","queueMicrotask","resolve","then","catch","If","Kf","Lf","Mf","previousSibling","Nf","Of","Pf","Qf","Rf","Sf","Tf","Uf","E","G","Vf","H","Wf","Xf","Yf","contextTypes","__reactInternalMemoizedUnmaskedChildContext","__reactInternalMemoizedMaskedChildContext","Zf","childContextTypes","$f","ag","bg","getChildContext","cg","__reactInternalMemoizedMergedChildContext","dg","eg","fg","gg","hg","jg","kg","lg","mg","ng","og","pg","qg","rg","sg","tg","ug","vg","wg","xg","yg","I","zg","Ag","Bg","elementType","deletions","Cg","pendingProps","overflow","treeContext","retryLane","Dg","mode","Eg","Fg","Gg","memoizedProps","Hg","Ig","Jg","Kg","Lg","defaultProps","Mg","Ng","Og","Pg","Qg","Rg","_currentValue","Sg","childLanes","Tg","dependencies","firstContext","lanes","Ug","Vg","context","memoizedValue","next","Wg","Xg","Yg","interleaved","Zg","$g","ah","updateQueue","baseState","firstBaseUpdate","lastBaseUpdate","shared","pending","effects","bh","ch","eventTime","lane","payload","callback","dh","K","eh","fh","gh","q","r","y","hh","ih","jh","Component","refs","kh","nh","isMounted","_reactInternals","enqueueSetState","L","lh","mh","enqueueReplaceState","enqueueForceUpdate","oh","shouldComponentUpdate","isPureReactComponent","ph","contextType","state","updater","qh","componentWillReceiveProps","UNSAFE_componentWillReceiveProps","rh","props","getDerivedStateFromProps","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","componentDidMount","sh","ref","_owner","_stringRef","th","join","uh","vh","index","wh","xh","yh","implementation","zh","Ah","done","Bh","Ch","Dh","Eh","Fh","Gh","Hh","Ih","tagName","Jh","Kh","Lh","M","Mh","revealOrder","Nh","Oh","_workInProgressVersionPrimary","Ph","ReactCurrentDispatcher","Qh","Rh","N","O","P","Sh","Th","Uh","Vh","Q","Wh","Xh","Yh","Zh","$h","ai","bi","ci","baseQueue","queue","di","ei","fi","lastRenderedReducer","action","hasEagerState","eagerState","lastRenderedState","dispatch","gi","hi","ii","ji","ki","getSnapshot","li","mi","R","ni","lastEffect","stores","oi","pi","qi","ri","create","destroy","deps","si","ti","ui","vi","wi","xi","yi","zi","Ai","Bi","Ci","Di","Ei","Fi","Gi","Hi","Ii","Ji","readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","identifierPrefix","Ki","message","digest","Li","Mi","console","error","Ni","WeakMap","Oi","Pi","Qi","Ri","getDerivedStateFromError","componentDidCatch","Si","componentStack","Ti","pingCache","Ui","Vi","Wi","Xi","ReactCurrentOwner","Yi","Zi","$i","aj","bj","compare","cj","dj","ej","baseLanes","cachePool","transitions","fj","gj","hj","ij","jj","UNSAFE_componentWillUpdate","componentWillUpdate","componentDidUpdate","kj","lj","pendingContext","mj","Aj","Cj","Dj","nj","oj","pj","fallback","qj","rj","tj","dataset","dgst","uj","vj","_reactRetry","sj","subtreeFlags","wj","xj","isBackwards","rendering","renderingStartTime","last","tail","tailMode","yj","Ej","S","Fj","Gj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","size","createElementNS","autoFocus","createTextNode","T","Hj","Ij","Jj","Kj","U","Lj","WeakSet","V","Mj","W","Nj","Oj","Qj","Rj","Sj","Tj","Uj","Vj","Wj","insertBefore","_reactRootContainer","Xj","X","Yj","Zj","ak","onCommitFiberUnmount","componentWillUnmount","bk","ck","dk","ek","fk","isHidden","gk","hk","display","ik","jk","kk","lk","__reactInternalSnapshotBeforeUpdate","src","Wk","mk","ceil","nk","ok","pk","Y","Z","qk","rk","sk","tk","uk","Infinity","vk","wk","xk","yk","zk","Ak","Bk","Ck","Dk","Ek","callbackNode","expirationTimes","expiredLanes","wc","callbackPriority","ig","Fk","Gk","Hk","Ik","Jk","Kk","Lk","Mk","Nk","Ok","Pk","finishedWork","finishedLanes","Qk","timeoutHandle","Rk","Sk","Tk","Uk","Vk","mutableReadLanes","Bc","Pj","onCommitFiberRoot","mc","onRecoverableError","Xk","onPostCommitFiberRoot","Yk","Zk","al","isReactComponent","pendingChildren","bl","mutableSourceEagerHydrationData","cl","cache","pendingSuspenseBoundaries","dl","el","fl","gl","hl","il","jl","zj","$k","ll","reportError","ml","_internalRoot","nl","ol","pl","ql","sl","rl","unmount","unstable_scheduleHydration","splice","querySelectorAll","JSON","stringify","form","tl","usingClientEntryPoint","Events","ul","findFiberByHostInstance","bundleType","version","rendererPackageName","vl","rendererConfig","overrideHookState","overrideHookStateDeletePath","overrideHookStateRenamePath","overrideProps","overridePropsDeletePath","overridePropsRenamePath","setErrorHandler","setSuspenseHandler","scheduleUpdate","currentDispatcherRef","findHostInstanceByFiber","findHostInstancesForRefresh","scheduleRefresh","scheduleRoot","setRefreshHandler","getCurrentFiber","reconcilerVersion","__REACT_DEVTOOLS_GLOBAL_HOOK__","wl","isDisabled","supportsFiber","inject","exports","createPortal","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","err","module","__self","__source","Fragment","jsx","jsxs","setState","forceUpdate","escape","_status","_result","default","Children","map","count","toArray","only","Profiler","PureComponent","StrictMode","Suspense","cloneElement","createContext","_currentValue2","_threadCount","Provider","Consumer","_defaultValue","_globalName","createFactory","createRef","forwardRef","isValidElement","lazy","memo","startTransition","unstable_act","pop","sortIndex","performance","setImmediate","startTime","expirationTime","priorityLevel","navigator","scheduling","isInputPending","MessageChannel","port2","port1","onmessage","postMessage","unstable_Profiling","unstable_continueExecution","unstable_forceFrameRate","floor","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","delay","unstable_wrapCallback","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","definition","o","chunkId","all","reduce","promises","miniCssF","obj","prop","inProgress","dataWebpackPrefix","script","needAttach","scripts","getElementsByTagName","i","s","getAttribute","charset","timeout","nc","onScriptComplete","prev","onerror","onload","doneFns","fn","head","toStringTag","installedChunks","j","installedChunkData","promise","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","_arrayLikeToArray","arr","len","arr2","_unsupportedIterableToArray","minLen","from","_toConsumableArray","iter","TypeError","_slicedToArray","_i","_s","_e","_arr","_n","_d","_classCallCheck","Constructor","_defineProperties","descriptor","writable","_createClass","protoProps","staticProps","_defineProperty","ownKeys","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","sym","_objectSpread2","getOwnPropertyDescriptors","defineProperties","ItemType","Item","ItemTypes","Weapon","Bow","Arrow","Shield","Material","Meal","Key","IdToData","ItemToData","TypeToCount","register","item","image","sortOrder","repeatable","stackable","Slate","Glider","SpiritOrb","ImageSpiritOrb","Lotus","ImageLotus","Rushroom","ImageRushroom","SilentPrincess","ImageSilentPrincess","Honey","ImageHoney","Acorn","FaroshScale","ImageFaroshScale","FaroshClaw","ImageFaroshClaw","FaroshHorn","ImageFaroshHorn","HeartyBass","ImageHeartyBass","HyruleBass","ImageHyruleBass","Beetle","Opal","ImageOpal","Diamond","ImageDiamond","LizalfosHorn","LizalfosTalon","Tail","ImageTail","Screw","Spring","ImageSpring","Shaft","ImageShaft","Core","Wood","ImageWood","SpeedFood","ImageSpeedFood","ImageBow","NormalArrow","ImageArrow","FireArrow","ImageFireArrow","IceArrow","ImageIceArrow","ShockArrow","ImageShockArrow","BombArrow","ImageBombArrow","AncientArrow","ImageAncientArrow","ImageShield","itemToItemData","CommandNothing","_inv","Op","CommandInitialize","stacks","inv","init","parts","CommandBreakSlots","numToBreak","addBrokenSlots","CommandSave","save","CommandReload","reload","CommandSortKey","sortKey","CommandSortMaterial","sortMaterial","Verbs","VerbToId","CommandRemoveMaterial","verb","slot","noSlot","remove","slotString","CommandRemoveUnstackableMaterial","CommandAddMaterial","CommandEquipArrow","equipEquipmentOrArrow","str","itemToArrowType","CommandEquip","CommandUnequip","unequipEquipment","CommandSetTag","setTag","CommandApplyTag","applyTag","CommandCloseGame","closeGame","CommandComment","Slots","slots","internalSlots","addStack","sort","added","after","removeFromEnd","getAfterType","shouldEquipNew","equipped","addSlotsToEnd","filtered","arrows","getByType","Inventory","savedSlots","namedSlots","numBroken","isInitialSort","isAltered","inaccurate","turnedInOrbs","other","deepClone","num","durabilityTransferSlots","equippedWeapon","getFirstEquippedSlotIndex","equippedBow","equippedShield","dupeMap","max","itemData","addStackCopy","sortArrows","nonKeyItems","getBeforeType","keyItems","beforeMaterial","afterMaterial","materials","brokenSlots","noSortPart","equip","unequip","shoot","toVal","mix","tmp","CommandItem","isSelected","isContextSelected","comment","onContextMenu","className","clsx","ItemSlot","isBroken","isSave","isEquipped","DoubleItemSlot","first","second","verticalAlign","ItemList","items","broken","parseCommand","cmdString","startsWith","tokens","parseInt","Number","isInteger","stacksToItemListProps","stacksToItemProps","getSlotsRef","stackToItemProps","DisplayPane","command","orbs","editCommand","displayIndex","overlaySave","commandString","setCommandString","hasError","setHasError","listProps","listSaveProps","float","border","boxSizing","marginBottom","marginTop","fontSize","placeholder","onChange","parsedCommand","borderTop","overflowY","doubleSlots","borderBottom","_global","global","download","opts","xhr","XMLHttpRequest","open","responseType","saveAs","response","send","corsEnabled","status","click","MouseEvent","evt","createEvent","initMouseEvent","isMacOSWebView","userAgent","HTMLAnchorElement","blob","URL","webkitURL","rel","origin","createObjectURL","revokeObjectURL","msSaveOrOpenBlob","autoBom","Blob","bom","popup","title","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","FileReader","reader","onloadend","result","readAsDataURL","App","setOverlaySave","encoded","localStorage","getItem","getDefaultCommands","commands","setCommands","setDisplayIndex","contextMenuX","setContextMenuX","contextMenuY","setContextMenuY","contextMenuShowing","setContextMenuShowing","contextIndex","setContextIndex","uploadRef","contextMenuRef","inventories","execute","onkeydown","getDisplayString","setItem","rect","getBoundingClientRect","bottom","innerHeight","hidden","files","parsedCommands","listStyleType","paddingInlineStart","arrCopy","getTurnedInOrbs","getSlots","getSavedSlots","getNumBroken","position","backgroundColor","margin","temp","confirm","_","content","filename","FileSaverFunction","alert","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","getElementById","reportWebVitals"],"sourceRoot":""}
\ No newline at end of file
diff --git a/docs/static/media/BigHeartyRadish.f4234222deeb380ad3f2.png b/docs/static/media/BigHeartyRadish.f4234222deeb380ad3f2.png
new file mode 100644
index 0000000..04e70de
Binary files /dev/null and b/docs/static/media/BigHeartyRadish.f4234222deeb380ad3f2.png differ
diff --git a/docs/static/media/Fairy.02985afe57816235258e.png b/docs/static/media/Fairy.02985afe57816235258e.png
new file mode 100644
index 0000000..b4ada1b
Binary files /dev/null and b/docs/static/media/Fairy.02985afe57816235258e.png differ
diff --git a/docs/static/media/HylianShroom.0f05ef4a95089fb84ba0.png b/docs/static/media/HylianShroom.0f05ef4a95089fb84ba0.png
new file mode 100644
index 0000000..979c3b4
Binary files /dev/null and b/docs/static/media/HylianShroom.0f05ef4a95089fb84ba0.png differ