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));","import { Item } from \"./Item\";\n\nexport enum ItemType {\n Material,\n Meal,\n Key\n}\n\nexport type ItemStack = {\n item: Item,\n count: number,\n}\n","import { ItemType } from \"./ItemStack\";\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 SpeedFood = \"SpeedFood\"\n}\n\nexport const ItemIds = {\n\t/* Do not change the ID once created. Otherwise you would break existing codes */\n\t[Item.Slate]: 0x00,\n\t[Item.Glider]: 0x01,\n\t[Item.SpiritOrb]: 0x02,\n\n\t[Item.Diamond]: 0x10,\n\t[Item.Lotus]: 0x11,\n\t[Item.SilentPrincess]: 0x12,\n\t[Item.Honey]: 0x13,\n\t[Item.Acorn]: 0x14,\n\t[Item.FaroshScale]: 0x15,\n\t[Item.FaroshClaw]: 0x16,\n\t[Item.FaroshHorn]: 0x17,\n\t[Item.HeartyBass]: 0x18,\n\t[Item.Beetle]: 0x19,\n\t[Item.Opal]: 0x1a,\n\t[Item.Tail]: 0x1b,\n\t[Item.Spring]: 0x1c,\n\t[Item.Shaft]: 0x1d,\n\t[Item.Core]: 0x1e,\n\t[Item.Wood]: 0x1f,\n\n\t[Item.SpeedFood]: 0x40,\n};\n\nexport const itemToType = (item: Item): ItemType => {\n\tif (item === Item.Slate || item === Item.Glider || item === Item.SpiritOrb){\n\t\treturn ItemType.Key;\n\t}\n\tif (item === Item.SpeedFood) {\n\t\treturn ItemType.Meal;\n\t}\n\treturn ItemType.Material;\n};\n\nexport const shouldIgnoreOnReload = (item: Item): boolean => {\n\treturn item === Item.Slate || item === Item.Glider;\n};\n\nexport const isStackable = (item: Item): boolean => {\n\treturn item !==Item.Slate && item !== Item.Glider && item !== Item.SpeedFood;\n};\n\nconst KeyItemSortOrderMap = (()=>{\n\tconst map: {[k in Item]?: number} = {};\n\t[\n\t\tItem.Slate,\n\t\tItem.Glider,\n\t\tItem.SpiritOrb\n\t].forEach((item, i)=>map[item] = i);\n\treturn map;\n})();\n\nexport const getKeyItemSortOrder = (item: Item): number => {\n\treturn KeyItemSortOrderMap[item] || -1;\n};\n\nconst MaterialSortOrderMap = (()=>{\n\tconst map: {[k in Item]?: number} = {};\n\t[\n\t\tItem.Lotus,\n\t\tItem.SilentPrincess,\n\t\tItem.Honey,\n\t\tItem.Acorn,\n\t\tItem.FaroshScale,\n\t\tItem.FaroshClaw,\n\t\tItem.FaroshHorn,\n\t\tItem.HeartyBass,\n\t\tItem.Beetle,\n\t\tItem.Opal,\n\t\tItem.Diamond,\n\t\tItem.Tail,\n\t\tItem.Spring,\n\t\tItem.Shaft,\n\t\tItem.Core,\n\t\tItem.Wood,\n\t].forEach((item, i)=>map[item] = i);\n\treturn map;\n})();\n\nexport const getMaterialSortOrder = (item: Item): number => {\n\treturn MaterialSortOrderMap[item] || -1;\n};\n","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 { Inventory } from \"./Inventory\";\nimport { Item, ItemIds } from \"./Item\";\nimport { ItemStack } from \"./ItemStack\";\n\nconst Buffer = require(\"buffer/\").Buffer; /* eslint-disable-line @typescript-eslint/no-var-requires*/\n\nexport interface Command {\n\texecute(inv: Inventory): void,\n\tgetDisplayString(): string,\n\tfromBuffer(buf: Buffer): number,\n\ttoBuffer(): Buffer,\n}\n\nexport class CommandNothing implements Command {\n\tstatic Op = 0x0;\n\n\tfromBuffer(_buf: Buffer): number {\n\t\treturn 0;\n\t}\n\ttoBuffer(): Buffer {\n\t\tconst buf: Buffer = Buffer.alloc(1);\n\t\tbuf.writeInt8(CommandNothing.Op);\n\t\treturn buf;\n\t}\n\t\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\tpublic 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(ItemIds[item], 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\tpublic fromBuffer(buf: Buffer): number {\n\t\tthis.numToBreak = buf.readInt16LE();\n\t\treturn 2;\n\t}\n\tpublic 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\tpublic fromBuffer(_buf: Buffer): number {\n\t\treturn 0;\n\t}\n\tpublic 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\tpublic fromBuffer(_buf: Buffer): number {\n\t\treturn 0;\n\t}\n\tpublic 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\tpublic fromBuffer(_buf: Buffer): number {\n\t\treturn 0;\n\t}\n\tpublic 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\tpublic fromBuffer(_buf: Buffer): number {\n\t\treturn 0;\n\t}\n\tpublic 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\tconstructor(verb: string, count: number, item: Item, slot: number){\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}\n\tpublic fromBuffer(buf: Buffer): number {\n\t\tlet read = 0;\n\t\tthis.count = buf.readInt16LE(read);\n\t\tread+=2;\n\t\tconst id = buf.readInt8(read);\n\t\tread+=1;\n\t\tfor(const item in ItemIds){\n\t\t\tif(ItemIds[item as Item] === id){\n\t\t\t\tthis.item = item as Item;\n\t\t\t}\n\t\t}\n\t\tthis.slot = buf.readInt16LE(read);\n\t\tread+=2;\n\t\tthis.verb = buf.readInt8(read);\n\t\tread++;\n\t\treturn read;\n\t}\n\tpublic toBuffer(): Buffer {\n\t\tconst buf: Buffer = Buffer.alloc(1+2+1+2+1);\n\t\tlet write = 0;\n\t\tbuf.writeInt8(CommandRemoveMaterial.Op);\n\t\twrite++;\n\t\tbuf.writeInt16LE(this.count, write);\n\t\twrite+=2;\n\t\tbuf.writeInt8(ItemIds[this.item], write);\n\t\twrite++;\n\t\tbuf.writeInt16LE(this.slot, 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.remove(this.item, this.count, this.slot);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `${Verbs[this.verb]} ${this.count} ${this.item} From Slot ${this.slot+1}`;\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\tconstructor(verb: string,item: Item, slot: number){\n\t\tthis.verb = VerbToId[verb as keyof typeof VerbToId] || 0;\n\t\tthis.item = item;\n\t\tthis.slot = slot;\n\t}\n\tpublic fromBuffer(buf: Buffer): number {\n\t\tlet read = 0;\n\t\tconst id = buf.readInt8(read);\n\t\tread+=1;\n\t\tfor(const item in ItemIds){\n\t\t\tif(ItemIds[item as Item] === id){\n\t\t\t\tthis.item = item as Item;\n\t\t\t}\n\t\t}\n\t\tthis.slot = buf.readInt16LE(read);\n\t\tread+=2;\n\t\tthis.verb = buf.readInt8(read);\n\t\tread++;\n\t\treturn read;\n\t}\n\tpublic toBuffer(): Buffer {\n\t\tconst buf: Buffer = Buffer.alloc(1+1+2+1);\n\t\tlet write = 0;\n\t\tbuf.writeInt8(CommandRemoveUnstackableMaterial.Op);\n\t\twrite++;\n\t\tbuf.writeInt8(ItemIds[this.item], write);\n\t\twrite++;\n\t\tbuf.writeInt16LE(this.slot, 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.remove(this.item, 1, this.slot);\n\t}\n\tpublic getDisplayString(): string {\n\t\treturn `${Verbs[this.verb]} ${this.item} From Slot ${this.slot+1}`;\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\tpublic fromBuffer(buf: Buffer): number {\n\t\tlet read = 0;\n\t\tconst id = buf.readInt8(read);\n\t\tread+=1;\n\t\tfor(const item in ItemIds){\n\t\t\tif(ItemIds[item as Item] === id){\n\t\t\t\tthis.item = item as Item;\n\t\t\t}\n\t\t}\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\tpublic 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(ItemIds[this.item], 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","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 { itemToType, getKeyItemSortOrder, shouldIgnoreOnReload, getMaterialSortOrder, Item, isStackable } from \"./Item\";\nimport { ItemStack, ItemType } from \"./ItemStack\";\n\nexport class Inventory {\n\tprivate slots: ItemStack[] = [];\n\tprivate savedSlots: ItemStack[] = [];\n\tprivate numBroken = 0;\n\tprivate isInitialSort = false;\n\tprivate isAltered = true;\n\tprivate isSaveAltered = true;\n\tprivate inaccurate = false;\n\tpublic clone(): Inventory {\n\t\tconst other = new Inventory();\n\t\tother.slots = [...this.slots.map(stack=>({...stack}))];\n\t\tother.savedSlots = [...this.savedSlots.map(stack=>({...stack}))];\n\t\tother.numBroken = this.numBroken;\n\t\tother.isInitialSort = this.isInitialSort;\n\t\tother.isAltered = this.isAltered;\n\t\tother.isSaveAltered = this.isSaveAltered;\n\t\tother.inaccurate = this.inaccurate;\n\t\treturn other;\n\t}\n\n\tpublic getSlots(): ItemStack[] {\n\t\treturn this.slots;\n\t}\n\n\tpublic getNumBroken(): number {\n\t\treturn this.numBroken;\n\t}\n\n\tpublic isInaccurate(): boolean {\n\t\treturn this.inaccurate;\n\t}\n\n\tpublic init(stacks: ItemStack[]) {\n\t\tthis.savedSlots = [...stacks.map((stack)=>({...stack}))];\n\t\tthis.slots = [...stacks.map((stack)=>({...stack}))];\n\t\tthis.numBroken = 0;\n\t\tthis.isInitialSort = false;\n\t\tthis.isAltered = true;\n\t\tthis.isSaveAltered = true;\n\t\tthis.inaccurate = false;\n\t}\n\n\tpublic addBrokenSlots(num: number) {\n\t\tthis.numBroken+=num;\n\t}\n\n\tpublic save() {\n\t\tthis.isSaveAltered = this.isAltered;\n\t\tthis.savedSlots = [...this.slots];\n\t}\n\n\tpublic reload() {\n\t\tif(!this.isSaveAltered){\n\t\t\tthis.inaccurate = true;\n\t\t}\n\t\t// get things to dupe\n\t\tconst dupeMap: {[k in ItemType]: ItemStack[]} = {\n\t\t\t[ItemType.Material]: [],\n\t\t\t[ItemType.Meal]: [],\n\t\t\t[ItemType.Key]: []\n\t\t};\n\t\tfor(let i=Math.max(0, this.slots.length-this.numBroken);iitemToType(stack.item)===ItemType.Material);\n\t\tconst meals = this.savedSlots.filter(stack=>itemToType(stack.item)===ItemType.Meal);\n\t\tconst keyItems = this.savedSlots.filter(stack=>itemToType(stack.item)===ItemType.Key);\n\t\t// apply dupe\n\t\tthis.slots = [];\n\t\t// duped materials go to the left\n\t\tthis.slots.push(...dupeMap[ItemType.Material].map(stack=>({...stack})));\n\t\tthis.slots.push(...materials.map(stack=>({...stack})));\n\t\tthis.slots.push(...dupeMap[ItemType.Meal].map(stack=>({...stack})));\n\t\tthis.slots.push(...meals.map(stack=>({...stack})));\n\t\t// key items to the right\n\t\tthis.slots.push(...keyItems.map(stack=>({...stack})));\n\t\tthis.slots.push(...dupeMap[ItemType.Key].map(stack=>({...stack})));\n\n\t\tthis.isInitialSort = true;\n\t\tthis.isAltered = false;\n\t\tthis.isSaveAltered = false;\n\t}\n\n\tpublic sortKey() {\n\t\tconst nonKeyItems = this.slots.filter(stack=>itemToType(stack.item)!==ItemType.Key);\n\t\tconst keyItems = this.slots.filter(stack=>itemToType(stack.item)===ItemType.Key);\n\t\tkeyItems.sort((a,b)=>{\n\t\t\treturn getKeyItemSortOrder(a.item) - getKeyItemSortOrder(b.item);\n\t\t});\n\t\tthis.slots = [...nonKeyItems, ...keyItems];\n\t\tthis.isAltered=true;\n\t\tthis.isInitialSort=false;\n\t}\n\n\tpublic sortMaterial() {\n\t\tconst nonMaterial = this.slots.filter(stack=>itemToType(stack.item)!==ItemType.Material);\n\t\tconst materials = this.slots.filter(stack=>itemToType(stack.item)===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 - nonMaterial.length);\n\t\t\tconst sortPart = materials.splice(0, materials.length-brokenSlots);\n\t\t\tsortPart.sort((a,b)=>{\n\t\t\t\treturn getMaterialSortOrder(a.item) - getMaterialSortOrder(b.item);\n\t\t\t});\n\t\t\tthis.slots = [...sortPart, ...materials, ...nonMaterial];\n\t\t\tthis.isInitialSort = false;\n\t\t}else{\n\t\t\tmaterials.sort((a,b)=>{\n\t\t\t\treturn getMaterialSortOrder(a.item) - getMaterialSortOrder(b.item);\n\t\t\t});\n\t\t\tthis.slots = [...materials, ...nonMaterial];\n\t\t}\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic remove(item: Item, count: number, slot: number) {\n\t\tlet s = 0;\n\t\tfor(let i = 0; icount>0);\n\t\tthis.isAltered=true;\n\t}\n\n\tpublic add(item: Item, count: number) {\n\t\tlet added = false;\n\t\tif(isStackable(item)){\n\t\t\tfor(let i = 0; iitemToType(stack.item)===ItemType.Material);\n\t\t\t\t\tthis.slots.splice(materials.length, 0, {\n\t\t\t\t\t\titem, count\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase ItemType.Meal: {\n\t\t\t\t\tconst keyItems = this.slots.filter(stack=>itemToType(stack.item)===ItemType.Key);\n\t\t\t\t\tthis.slots.splice(-keyItems.length, 0, {\n\t\t\t\t\t\titem, count\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase ItemType.Key: {\n\t\t\t\t\tthis.slots.push({\n\t\t\t\t\t\titem, count\n\t\t\t\t\t});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.isAltered=true;\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 isContextSelected?: boolean,\n error?: boolean,\n onClick: ()=>void,\n onContextMenu?: (x: number, y: number)=>void\n}>;\n\nexport const CommandItem: React.FC = ({isSelected, isContextSelected,error, children, onClick, onContextMenu}) => {\n\treturn {\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","type ItemStackProps = {\n name: string,\n count: number,\n isBroken: boolean\n};\n\nexport const ItemStack: React.FC = ({name, count, isBroken})=>{\n\treturn [{name} x{count}]{isBroken && \" (broken)\"}
;\n};\n","import { ItemStack } from \"./ItemStack\";\n\nexport type ItemListProps = {\n items: {name: string, count: number}[],\n numBroken: number\n}\n\nexport const ItemList: React.FC = ({items, numBroken}) => {\n\treturn <>\n\t\t{\n\t\t\titems.map(({name, count}, 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, CommandBreakSlots, CommandInitialize, CommandNothing, CommandReload, CommandRemoveMaterial, CommandRemoveUnstackableMaterial, CommandSave, CommandSortKey, CommandSortMaterial } from \"./Command\";\nimport { Item } from \"./Item\";\nimport { ItemStack } from \"./ItemStack\";\n\nexport const parseCommand = (cmdString: string): Command | undefined => {\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);\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);\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\n\treturn undefined;\n};\n","import clsx from \"clsx\";\nimport { ItemList, ItemListProps } from \"components/ItemList\";\nimport { Command } from \"core/Command\";\nimport { itemToType } from \"core/Item\";\nimport { ItemStack, ItemType } from \"core/ItemStack\";\nimport { parseCommand } from \"core/Parser\";\n\nimport React, { useEffect, useState } from \"react\";\n\ntype DisplayPaneProps = {\n command: string,\n displayIndex: number,\n stacks: ItemStack[],\n numBroken: number,\n editCommand: (c: Command)=>void\n}\n\nconst stacksToItemListProps = (stacks: ItemStack[], numBroken: number): [ItemListProps, ItemListProps, ItemListProps] => {\n\tconst materials = stacks.filter(stack=>itemToType(stack.item)==ItemType.Material);\n\tconst meals = stacks.filter(stack=>itemToType(stack.item)==ItemType.Meal);\n\tconst keyItems = stacks.filter(stack=>itemToType(stack.item)==ItemType.Key);\n\treturn [\n\t\t{\n\t\t\titems: stacksToNameAndCount(materials),\n\t\t\tnumBroken: Math.max(0, numBroken - keyItems.length - meals.length )\n\t\t},\n\t\t{\n\t\t\titems: stacksToNameAndCount(meals),\n\t\t\tnumBroken: Math.max(0, numBroken - keyItems.length)\n\t\t},{\n\t\t\titems: stacksToNameAndCount(keyItems),\n\t\t\tnumBroken\n\t\t},\n\t];\n};\n\nconst stacksToNameAndCount = (stacks: ItemStack[]): ItemListProps[\"items\"] => {\n\treturn stacks.map(({item, count})=>({name: item, count}));\n};\n\nexport const DisplayPane: React.FC = ({command,editCommand,displayIndex, stacks, numBroken})=>{\n\tconst [commandString, setCommandString] = useState(\"\");\n\tconst [hasError, setHasError] = useState(false);\n\tconst [materialListProps, mealListProps, keyItemListProps] = stacksToItemListProps(stacks, numBroken);\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
\n \n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t\n\t\t
\n\n\t
;\n};\n","import { Command, CommandAddMaterial, CommandBreakSlots, CommandInitialize, CommandNothing, CommandReload, CommandRemoveMaterial, CommandRemoveUnstackableMaterial, CommandSave, CommandSortKey, CommandSortMaterial } from \"./Command\";\nimport { Item } from \"./Item\";\n\nconst Buffer = require(\"buffer/\").Buffer; /* eslint-disable-line @typescript-eslint/no-var-requires*/\n\nexport const serializeCommands = (commands: Command[]): string => {\n\tconst sizeBuf: Buffer = Buffer.alloc(4);\n\tsizeBuf.writeInt32LE(commands.length);\n\n\tconst commandBuffers = commands.map(c=>c.toBuffer());\n\tconst allBufs = Buffer.concat([sizeBuf, ...commandBuffers]);\n\t\n\treturn allBufs.toString(\"base64\");\n};\n\nexport const deserialzeCommands = (base64str: string): Command[] => {\n\tconst buf: Buffer = Buffer.from(base64str, \"base64\");\n\tconst size = buf.readInt32LE();\n\tlet off = 4;\n\tconst commands: Command[] = [];\n\tfor(let i=0;i= 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 { deserialzeCommands, serializeCommands } from \"core/serialize\";\nimport { saveAs } from \"data/FileSaver\";\nimport { parseCommand } from \"core/Parser\";\n\nconst getDefaultCommands = (): Command[]=>{\n\tconst encoded = localStorage.getItem(\"HDS.CurrentCommands\");\n\tif(encoded){\n\t\treturn deserialzeCommands(encoded);\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},\n\t\t\t{\n\t\t\t\titem: Item.Slate,\n\t\t\t\tcount: 1,\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},\n\t\t\t{\n\t\t\t\titem: Item.SpiritOrb,\n\t\t\t\tcount: 4,\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 [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\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.clone());\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\tconst encoded = serializeCommands(commands);\n\t\tlocalStorage.setItem(\"HDS.CurrentCommands\", encoded);\n\t}, [commands]);\n\n\tconst uploadRef = useRef(null);\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\terror={inventories[i].isInaccurate()}\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}}>(new)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(uploadRef.current){\n\t\t\t\t\t\t\tuploadRef.current.click();\n\t\t\t\t\t\t}\n\t\t\t\t\t}}>(import)\n\t\t\t\t\t{\n\t\t\t\t\t\tconst lines = commands.map(c=>c.getDisplayString());\n\t\t\t\t\t\tconst text = lines.join(\"\\n\");\n\t\t\t\t\t\tsaveAs(text, \"dupe.txt\");\n\t\t\t\t\t}}>(export)\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{\n\t\t\t\t\t\t\t\tconst arrCopy = [...commands];\n\t\t\t\t\t\t\t\tarrCopy.splice(contextIndex, 0, new CommandNothing());\n\t\t\t\t\t\t\t\tsetCommands(arrCopy);\n\t\t\t\t\t\t\t\tsetContextMenuShowing(false);\n\t\t\t\t\t\t\t\tsetContextIndex(-1);\n\t\t\t\t\t\t\t}}>Insert Above\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(confirm(\"Delete?\")){\n\t\t\t\t\t\t\t\t\tsetCommands(commands.filter((_,i)=>i!==contextIndex));\n\t\t\t\t\t\t\t\t\tif(displayIndex >= commands.length){\n\t\t\t\t\t\t\t\t\t\tsetDisplayIndex(commands.length-1);\n\t\t\t\t\t\t\t\t\t}\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}\n\t\t\t\t\t\t\t}}>Delete\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":["module","exports","self","ReferenceError","__esModule","instance","Constructor","TypeError","_defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","protoProps","staticProps","prototype","getPrototypeOf","isNativeReflectConstruct","possibleConstructorReturn","Derived","hasNativeReflectConstruct","result","Super","NewTarget","this","constructor","Reflect","construct","arguments","apply","_getPrototypeOf","o","setPrototypeOf","bind","__proto__","subClass","superClass","create","value","sham","Proxy","Boolean","valueOf","call","e","_typeof","assertThisInitialized","_setPrototypeOf","p","obj","Symbol","iterator","byteLength","b64","lens","getLens","validLen","placeHoldersLen","toByteArray","tmp","arr","Arr","_byteLength","curByte","len","revLookup","charCodeAt","fromByteArray","uint8","extraBytes","parts","maxChunkLength","len2","push","encodeChunk","lookup","join","Uint8Array","Array","code","Error","indexOf","start","end","num","output","base64","require","ieee754","customInspectSymbol","Buffer","K_MAX_LENGTH","createBuffer","RangeError","buf","arg","encodingOrOffset","allocUnsafe","from","string","encoding","isEncoding","actual","write","slice","fromString","ArrayBuffer","isView","arrayView","isInstance","copy","fromArrayBuffer","buffer","byteOffset","fromArrayLike","fromArrayView","SharedArrayBuffer","b","isBuffer","checked","undefined","numberIsNaN","type","isArray","data","fromObject","toPrimitive","assertSize","size","array","toString","mustMatch","loweredCase","utf8ToBytes","base64ToBytes","toLowerCase","slowToString","hexSlice","utf8Slice","asciiSlice","latin1Slice","base64Slice","utf16leSlice","swap","n","m","bidirectionalIndexOf","val","dir","arrayIndexOf","lastIndexOf","indexSize","arrLength","valLength","String","read","readUInt16BE","foundIndex","found","j","hexWrite","offset","Number","remaining","strLen","parsed","parseInt","substr","utf8Write","blitBuffer","asciiWrite","str","byteArray","asciiToBytes","base64Write","ucs2Write","units","c","hi","lo","utf16leToBytes","Math","min","res","firstByte","codePoint","bytesPerSequence","secondByte","thirdByte","fourthByte","tempCodePoint","codePoints","MAX_ARGUMENTS_LENGTH","fromCharCode","decodeCodePointsArray","TYPED_ARRAY_SUPPORT","proto","foo","typedArraySupport","console","error","get","poolSize","alloc","fill","allocUnsafeSlow","_isBuffer","compare","a","x","y","concat","list","pos","set","swap16","swap32","swap64","toLocaleString","equals","inspect","max","replace","trim","thisStart","thisEnd","thisCopy","targetCopy","includes","isFinite","toJSON","_arr","ret","out","hexSliceLookupTable","bytes","checkOffset","ext","checkInt","wrtBigUInt64LE","checkIntBI","BigInt","wrtBigUInt64BE","checkIEEE754","writeFloat","littleEndian","noAssert","writeDouble","newBuf","subarray","readUintLE","readUIntLE","mul","readUintBE","readUIntBE","readUint8","readUInt8","readUint16LE","readUInt16LE","readUint16BE","readUint32LE","readUInt32LE","readUint32BE","readUInt32BE","readBigUInt64LE","defineBigIntMethod","validateNumber","first","last","boundsError","readBigUInt64BE","readIntLE","pow","readIntBE","readInt8","readInt16LE","readInt16BE","readInt32LE","readInt32BE","readBigInt64LE","readBigInt64BE","readFloatLE","readFloatBE","readDoubleLE","readDoubleBE","writeUintLE","writeUIntLE","writeUintBE","writeUIntBE","writeUint8","writeUInt8","writeUint16LE","writeUInt16LE","writeUint16BE","writeUInt16BE","writeUint32LE","writeUInt32LE","writeUint32BE","writeUInt32BE","writeBigUInt64LE","writeBigUInt64BE","writeIntLE","limit","sub","writeIntBE","writeInt8","writeInt16LE","writeInt16BE","writeInt32LE","writeInt32BE","writeBigInt64LE","writeBigInt64BE","writeFloatLE","writeFloatBE","writeDoubleLE","writeDoubleBE","targetStart","copyWithin","errors","E","sym","getMessage","Base","name","stack","message","addNumericalSeparator","range","ERR_OUT_OF_RANGE","checkBounds","ERR_INVALID_ARG_TYPE","floor","ERR_BUFFER_OUT_OF_BOUNDS","input","msg","received","isInteger","abs","INVALID_BASE64_RE","Infinity","leadSurrogate","split","base64clean","src","dst","alphabet","table","i16","fn","BufferBigIntNotDefined","isLE","mLen","nBytes","eLen","eMax","eBias","nBits","d","s","NaN","rt","isNaN","log","LN2","aa","ca","encodeURIComponent","da","Set","ea","fa","ha","add","ia","window","document","createElement","ja","hasOwnProperty","ka","la","ma","v","f","g","acceptsBooleans","attributeName","attributeNamespace","mustUseProperty","propertyName","sanitizeURL","removeEmptyString","z","forEach","ra","sa","toUpperCase","ta","pa","qa","test","oa","removeAttribute","setAttribute","setAttributeNS","xlinkHref","ua","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","va","for","wa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","Ga","Ha","Ia","Ja","Ka","La","A","assign","Ma","match","Na","Oa","prepareStackTrace","l","h","k","displayName","Pa","tag","render","Qa","$$typeof","_context","_payload","_init","Ra","Sa","Ta","nodeName","Va","_valueTracker","getOwnPropertyDescriptor","getValue","setValue","stopTracking","Ua","Wa","Xa","activeElement","body","Ya","defaultChecked","defaultValue","_wrapperState","initialChecked","Za","initialValue","controlled","ab","bb","cb","db","ownerDocument","eb","fb","options","selected","defaultSelected","disabled","gb","dangerouslySetInnerHTML","children","hb","ib","jb","textContent","kb","lb","mb","nb","namespaceURI","innerHTML","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","setProperty","keys","charAt","substring","tb","menuitem","area","base","br","col","embed","hr","img","keygen","link","meta","param","source","track","wbr","ub","vb","is","wb","xb","srcElement","correspondingUseElement","parentNode","yb","zb","Ab","Bb","Cb","stateNode","Db","Eb","Fb","Gb","Hb","Ib","Jb","Kb","Lb","Mb","addEventListener","removeEventListener","Nb","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","clz32","pc","qc","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","Md","Esc","Spacebar","Left","Up","Right","Down","Del","Win","Menu","Apps","Scroll","MozPrintableKey","Nd","Od","Alt","Control","Meta","Shift","Pd","Qd","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","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","nextSibling","Le","contains","compareDocumentPosition","Me","HTMLIFrameElement","contentWindow","href","Ne","contentEditable","Oe","focusedElem","selectionRange","documentElement","selectionStart","selectionEnd","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","nf","Ub","listener","D","of","has","pf","qf","rf","random","sf","capture","passive","t","J","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","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","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","getDerivedStateFromProps","getSnapshotBeforeUpdate","UNSAFE_componentWillMount","componentWillMount","componentDidMount","sh","ref","_owner","_stringRef","th","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","ii","ji","ki","getSnapshot","li","mi","R","ni","lastEffect","stores","oi","pi","qi","ri","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","digest","Li","Mi","Ni","WeakMap","Oi","Pi","Qi","Ri","getDerivedStateFromError","componentDidCatch","Si","componentStack","Ti","pingCache","Ui","Vi","Wi","Xi","ReactCurrentOwner","Yi","Zi","$i","aj","bj","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","tail","tailMode","yj","Ej","S","Fj","Gj","wasMultiple","multiple","suppressHydrationWarning","onClick","onclick","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","Wk","mk","ceil","nk","ok","pk","Y","Z","qk","rk","sk","tk","uk","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","createPortal","createRoot","unstable_strictMode","findDOMNode","flushSync","hydrate","hydrateRoot","hydratedSources","_getVersion","_source","unmountComponentAtNode","unstable_batchedUpdates","unstable_renderSubtreeIntoContainer","checkDCE","err","__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","unstable_getFirstCallbackNode","unstable_next","unstable_pauseExecution","unstable_runWithPriority","delay","unstable_wrapCallback","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","chunkId","all","reduce","promises","miniCssF","prop","inProgress","dataWebpackPrefix","script","needAttach","scripts","getElementsByTagName","getAttribute","charset","timeout","nc","onScriptComplete","prev","onerror","onload","doneFns","head","toStringTag","installedChunks","installedChunkData","promise","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","ItemType","Item","_arrayLikeToArray","arr2","_unsupportedIterableToArray","minLen","_toConsumableArray","iter","_slicedToArray","_i","_s","_e","_n","_d","_classCallCheck","_createClass","_defineProperty","ItemIds","Slate","Glider","SpiritOrb","Diamond","Lotus","SilentPrincess","Honey","Acorn","FaroshScale","FaroshClaw","FaroshHorn","HeartyBass","Beetle","Opal","Tail","Spring","Shaft","Core","Wood","SpeedFood","itemToType","item","Key","Meal","Material","KeyItemSortOrderMap","getKeyItemSortOrder","MaterialSortOrderMap","getMaterialSortOrder","CommandNothing","_buf","Op","_inv","CommandInitialize","stacks","inv","init","CommandBreakSlots","numToBreak","addBrokenSlots","CommandSave","save","CommandReload","reload","CommandSortKey","sortKey","CommandSortMaterial","sortMaterial","Verbs","VerbToId","CommandRemoveMaterial","verb","slot","remove","CommandRemoveUnstackableMaterial","CommandAddMaterial","ownKeys","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","_objectSpread2","getOwnPropertyDescriptors","defineProperties","Inventory","slots","savedSlots","numBroken","isInitialSort","isAltered","isSaveAltered","inaccurate","other","dupeMap","materials","meals","keyItems","nonKeyItems","sort","nonMaterial","brokenSlots","sortPart","added","isStackable","toVal","mix","CommandItem","isSelected","isContextSelected","onContextMenu","className","clsx","ItemStack","isBroken","ItemList","items","broken","parseCommand","cmdString","tokens","stacksToNameAndCount","DisplayPane","command","editCommand","displayIndex","commandString","setCommandString","hasError","setHasError","stacksToItemListProps","materialListProps","mealListProps","keyItemListProps","float","border","boxSizing","marginBottom","marginTop","fontSize","placeholder","onChange","parsedCommand","alert","borderTop","borderBottom","overflowY","_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","readAsDataURL","getDefaultCommands","encoded","localStorage","getItem","base64str","off","commands","op","fromBuffer","deserialzeCommands","App","setCommands","setDisplayIndex","contextMenuX","setContextMenuX","contextMenuY","setContextMenuY","contextMenuShowing","setContextMenuShowing","contextIndex","setContextIndex","inventories","execute","clone","onkeydown","sizeBuf","commandBuffers","toBuffer","serializeCommands","setItem","uploadRef","hidden","files","parsedCommands","listStyleType","paddingInlineStart","isInaccurate","getDisplayString","arrCopy","content","filename","FileSaverFunction","getSlots","getNumBroken","position","backgroundColor","margin","confirm","_","onPerfEntry","Function","getCLS","getFID","getFCP","getLCP","getTTFB","ReactDOM","getElementById","reportWebVitals"],"sourceRoot":""}
\ No newline at end of file
diff --git a/docs/static/media/AncientArrow.9a1a41d05b09babd770d.png b/docs/static/media/AncientArrow.9a1a41d05b09babd770d.png
new file mode 100644
index 0000000..6b82f69
Binary files /dev/null and b/docs/static/media/AncientArrow.9a1a41d05b09babd770d.png differ
diff --git a/docs/static/media/BombArrow.6b5994846aa06c8a8e92.png b/docs/static/media/BombArrow.6b5994846aa06c8a8e92.png
new file mode 100644
index 0000000..f63de4c
Binary files /dev/null and b/docs/static/media/BombArrow.6b5994846aa06c8a8e92.png differ
diff --git a/docs/static/media/Diamond.df6931b37a1f47165e37.png b/docs/static/media/Diamond.df6931b37a1f47165e37.png
new file mode 100644
index 0000000..bb3e125
Binary files /dev/null and b/docs/static/media/Diamond.df6931b37a1f47165e37.png differ
diff --git a/docs/static/media/FaroshClaw.4da7a445c986e0279916.png b/docs/static/media/FaroshClaw.4da7a445c986e0279916.png
new file mode 100644
index 0000000..2f7c53a
Binary files /dev/null and b/docs/static/media/FaroshClaw.4da7a445c986e0279916.png differ
diff --git a/docs/static/media/FaroshHorn.ea7e3cbc262af3c30e1d.png b/docs/static/media/FaroshHorn.ea7e3cbc262af3c30e1d.png
new file mode 100644
index 0000000..cb8ce9a
Binary files /dev/null and b/docs/static/media/FaroshHorn.ea7e3cbc262af3c30e1d.png differ
diff --git a/docs/static/media/FaroshScale.cc674ca9ac3cb63f99a3.png b/docs/static/media/FaroshScale.cc674ca9ac3cb63f99a3.png
new file mode 100644
index 0000000..32dd3e2
Binary files /dev/null and b/docs/static/media/FaroshScale.cc674ca9ac3cb63f99a3.png differ
diff --git a/docs/static/media/FireArrow.103898dc3f492d3293bd.png b/docs/static/media/FireArrow.103898dc3f492d3293bd.png
new file mode 100644
index 0000000..c929ac6
Binary files /dev/null and b/docs/static/media/FireArrow.103898dc3f492d3293bd.png differ
diff --git a/docs/static/media/ForestDwellerBow.d2a6ab2d3f59bcc67b4b.png b/docs/static/media/ForestDwellerBow.d2a6ab2d3f59bcc67b4b.png
new file mode 100644
index 0000000..042dfea
Binary files /dev/null and b/docs/static/media/ForestDwellerBow.d2a6ab2d3f59bcc67b4b.png differ
diff --git a/docs/static/media/HeartyBass.4e0f8e06034479e163fe.png b/docs/static/media/HeartyBass.4e0f8e06034479e163fe.png
new file mode 100644
index 0000000..7e1cbe4
Binary files /dev/null and b/docs/static/media/HeartyBass.4e0f8e06034479e163fe.png differ
diff --git a/docs/static/media/IceArrow.c227e7fda67cfc094e27.png b/docs/static/media/IceArrow.c227e7fda67cfc094e27.png
new file mode 100644
index 0000000..ba10f0c
Binary files /dev/null and b/docs/static/media/IceArrow.c227e7fda67cfc094e27.png differ
diff --git a/docs/static/media/Lotus.6006e27a51c66a0b9d3b.png b/docs/static/media/Lotus.6006e27a51c66a0b9d3b.png
new file mode 100644
index 0000000..9816493
Binary files /dev/null and b/docs/static/media/Lotus.6006e27a51c66a0b9d3b.png differ
diff --git a/docs/static/media/NormalArrow.1c54890bf60a08914a20.png b/docs/static/media/NormalArrow.1c54890bf60a08914a20.png
new file mode 100644
index 0000000..a8f8c4d
Binary files /dev/null and b/docs/static/media/NormalArrow.1c54890bf60a08914a20.png differ
diff --git a/docs/static/media/Opal.2e20b71d79a80f905a80.png b/docs/static/media/Opal.2e20b71d79a80f905a80.png
new file mode 100644
index 0000000..e0bf890
Binary files /dev/null and b/docs/static/media/Opal.2e20b71d79a80f905a80.png differ
diff --git a/docs/static/media/PotLid.baf78a40199753b3af39.png b/docs/static/media/PotLid.baf78a40199753b3af39.png
new file mode 100644
index 0000000..4749985
Binary files /dev/null and b/docs/static/media/PotLid.baf78a40199753b3af39.png differ
diff --git a/docs/static/media/Shaft.328e8aa17c1e5f9f0058.png b/docs/static/media/Shaft.328e8aa17c1e5f9f0058.png
new file mode 100644
index 0000000..867bfbb
Binary files /dev/null and b/docs/static/media/Shaft.328e8aa17c1e5f9f0058.png differ
diff --git a/docs/static/media/ShockArrow.823f535857deb6e461ab.png b/docs/static/media/ShockArrow.823f535857deb6e461ab.png
new file mode 100644
index 0000000..d85eae7
Binary files /dev/null and b/docs/static/media/ShockArrow.823f535857deb6e461ab.png differ
diff --git a/docs/static/media/SilentPrincess.6b9283141fbc5993b481.png b/docs/static/media/SilentPrincess.6b9283141fbc5993b481.png
new file mode 100644
index 0000000..61ae3f8
Binary files /dev/null and b/docs/static/media/SilentPrincess.6b9283141fbc5993b481.png differ
diff --git a/docs/static/media/SpeedFood.1bde9cae9ffc0c3906ea.png b/docs/static/media/SpeedFood.1bde9cae9ffc0c3906ea.png
new file mode 100644
index 0000000..c6a465b
Binary files /dev/null and b/docs/static/media/SpeedFood.1bde9cae9ffc0c3906ea.png differ
diff --git a/docs/static/media/SpiritOrb.66f25f8bbb0f27f0f568.png b/docs/static/media/SpiritOrb.66f25f8bbb0f27f0f568.png
new file mode 100644
index 0000000..07de689
Binary files /dev/null and b/docs/static/media/SpiritOrb.66f25f8bbb0f27f0f568.png differ
diff --git a/docs/static/media/Spring.bb7dcfa111b7b56ab25a.png b/docs/static/media/Spring.bb7dcfa111b7b56ab25a.png
new file mode 100644
index 0000000..c1f211d
Binary files /dev/null and b/docs/static/media/Spring.bb7dcfa111b7b56ab25a.png differ
diff --git a/docs/static/media/Tail.a43cfa310e2c86532247.png b/docs/static/media/Tail.a43cfa310e2c86532247.png
new file mode 100644
index 0000000..0dccf6a
Binary files /dev/null and b/docs/static/media/Tail.a43cfa310e2c86532247.png differ
diff --git a/docs/static/media/Wood.8105d493814e4ecd145f.png b/docs/static/media/Wood.8105d493814e4ecd145f.png
new file mode 100644
index 0000000..b520c1e
Binary files /dev/null and b/docs/static/media/Wood.8105d493814e4ecd145f.png differ