{"version":3,"sources":["webpack:///./node_modules/react-console-emulator/dist/Terminal.js","webpack:///./node_modules/react-console-emulator/dist/TerminalMessage.js","webpack:///./node_modules/react-console-emulator/dist/defs/types/TerminalMessage.js","webpack:///./node_modules/react-console-emulator/dist/defs/styles/TerminalMessage.js","webpack:///./node_modules/react-console-emulator/dist/handlers/validateCommands.js","webpack:///./node_modules/react-console-emulator/dist/handlers/scrollHistory.js","webpack:///./node_modules/react-console-emulator/dist/utils/cleanArray.js","webpack:///./node_modules/react-console-emulator/dist/defs/styles/Terminal.js","webpack:///./node_modules/react-console-emulator/dist/defs/types/Terminal.js"],"names":["_interopRequireWildcard","_interopRequireDefault","Object","defineProperty","exports","value","_toConsumableArray2","_classCallCheck2","_createClass2","_possibleConstructorReturn2","_getPrototypeOf2","_assertThisInitialized2","_inherits2","_defineProperty2","_react","_defaults","_reactFastCompare","_TerminalMessage","_validateCommands2","_scrollHistory2","_Terminal","_Terminal2","Terminal","_Component","props","_this","this","call","state","commands","stdout","history","historyPosition","previousHistoryPosition","processing","terminalRoot","createRef","terminalInput","focusTerminal","bind","validateCommands","showWelcomeMessage","showHelp","pushToStdout","getStdout","clearStdout","processCommand","handleInput","key","window","getSelection","type","current","focus","rootNode","setTimeout","scrollTop","scrollHeight","validCommands","noDefaults","setState","_this2","msg","welcomeMessage","Array","isArray","map","item","c","cmdObj","usage","concat","description","message","rawInput","_this$state","push","line","i","createElement","content","_this3","commandResult","command","args","result","noAutomaticStdout","noHistory","promptLabel","input","split","splice","res","fn","apply","explicitExec","errorText","replace","clearInput","noAutoScroll","scrollToBottom","commandCallback","direction","toUpdate","event","scrollHistory","prevProps","autoFocus","styles","container","style","contentStyle","inputArea","inputAreaStyle","promptLabelStyle","inputStyle","ref","name","className","onClick","contentClassName","inputAreaClassName","promptLabelClassName","inputClassName","onKeyDown","autoComplete","disabled","disableOnProcess","Component","_extends2","_reactInnerHtml","_TerminalMessage2","TerminalMessage","arguments","dangerMode","_default","node","margin","lineHeight","helpFn","clearFn","defaultCommands","help","clear","immutables","keys","target","length","source","ownKeys","forEach","getOwnPropertyDescriptors","defineProperties","getOwnPropertyDescriptor","_objectSpread","Error","_typeof2","includes","indexOf","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","sym","enumerable","commandHistory","_cleanArray","reverse","position","previousPosition","termNode","dirtyArray","from","undefined","minWidth","minHeight","maxWidth","maxHeight","borderRadius","overflow","cursor","background","backgroundSize","padding","height","fontSize","color","fontFamily","display","width","paddingTop","border","flexGrow","outline","_propTypes","string","bool","oneOfType","array","isRequired","func"],"mappings":"2FAEA,IAAIA,EAA0B,EAAQ,KAElCC,EAAyB,EAAQ,IAErCC,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAiB,aAAI,EAErB,IAAIE,EAAsBL,EAAuB,EAAQ,MAErDM,EAAmBN,EAAuB,EAAQ,MAElDO,EAAgBP,EAAuB,EAAQ,MAE/CQ,EAA8BR,EAAuB,EAAQ,MAE7DS,EAAmBT,EAAuB,EAAQ,MAElDU,EAA0BV,EAAuB,EAAQ,MAEzDW,EAAaX,EAAuB,EAAQ,MAE5CY,EAAmBZ,EAAuB,EAAQ,MAElDa,EAASd,EAAwB,EAAQ,IAEzCe,EAAYd,EAAuB,EAAQ,MAE3Ce,EAAoBf,EAAuB,EAAQ,MAEnDgB,EAAmBhB,EAAuB,EAAQ,MAElDiB,EAAqBjB,EAAuB,EAAQ,MAEpDkB,EAAkBlB,EAAuB,EAAQ,MAEjDmB,EAAYnB,EAAuB,EAAQ,MAE3CoB,EAAapB,EAAuB,EAAQ,MAK5CqB,EAEJ,SAAUC,GAGR,SAASD,EAASE,GAChB,IAAIC,EAuBJ,OArBA,EAAIlB,EAA0B,SAAGmB,KAAMJ,IACvCG,GAAQ,EAAIhB,EAAqC,SAAGiB,MAAM,EAAIhB,EAA0B,SAAGY,GAAUK,KAAKD,KAAMF,KAC1GI,MAAQ,CACZC,SAAU,GACVC,OAAQ,GACRC,QAAS,GACTC,gB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C,OAAOC,eAAe+I,EAAQlG,EAAK9C,OAAOuJ,yBAAyBL,EAAQpG,OAAe,OAAOkG,EAmC/gBQ,CAAc,GAjCZ,CACf5C,MAAOqF,EAAoB,QAAEpC,OAC7BhD,aAAcoF,EAAoB,QAAEpC,OACpC9C,eAAgBkF,EAAoB,QAAEpC,OACtC7C,iBAAkBiF,EAAoB,QAAEpC,OACxC5C,WAAYgF,EAAoB,QAAEpC,QA4BS,GA1BxB,CACnBzC,UAAW6E,EAAoB,QAAEC,OACjC5E,iBAAkB2E,EAAoB,QAAEC,OACxC3E,mBAAoB0E,EAAoB,QAAEC,OAC1C1E,qBAAsByE,EAAoB,QAAEC,OAC5CzE,eAAgBwE,EAAoB,QAAEC,QAqByB,GAnB/C,CAChBzF,UAAWwF,EAAoB,QAAEE,KACjC/D,WAAY6D,EAAoB,QAAEE,KAClCtE,iBAAkBoE,EAAoB,QAAEE,KACxC1I,WAAYwI,EAAoB,QAAEE,KAClC/G,kBAAmB6G,EAAoB,QAAEE,KACzC9G,UAAW4G,EAAoB,QAAEE,KACjClG,aAAcgG,EAAoB,QAAEE,MAY4C,GAVjE,CACftI,eAAgBoI,EAAoB,QAAEG,UAAU,CAACH,EAAoB,QAAEE,KAAMF,EAAoB,QAAEI,MAAOJ,EAAoB,QAAEC,SAChI5G,YAAa2G,EAAoB,QAAEC,OACnCpG,UAAWmG,EAAoB,QAAEC,QAO+D,GAL/E,CACjBvK,SAAUsK,EAAoB,QAAEpC,OAAOyC,WACvCnG,gBAAiB8F,EAAoB,QAAEM,OAKzCrM,EAAiB,QAAImI","file":"npm.react-console-emulator.c920b4ddeb9b68365139.js","sourcesContent":["\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _toConsumableArray2 = _interopRequireDefault(require(\"@babel/runtime/helpers/toConsumableArray\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _assertThisInitialized2 = _interopRequireDefault(require(\"@babel/runtime/helpers/assertThisInitialized\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _defaults = _interopRequireDefault(require(\"defaults\"));\n\nvar _reactFastCompare = _interopRequireDefault(require(\"react-fast-compare\"));\n\nvar _TerminalMessage = _interopRequireDefault(require(\"./TerminalMessage\"));\n\nvar _validateCommands2 = _interopRequireDefault(require(\"./handlers/validateCommands\"));\n\nvar _scrollHistory2 = _interopRequireDefault(require(\"./handlers/scrollHistory\"));\n\nvar _Terminal = _interopRequireDefault(require(\"./defs/styles/Terminal\"));\n\nvar _Terminal2 = _interopRequireDefault(require(\"./defs/types/Terminal\"));\n\n// Components\n// Handlers\n// Definitions\nvar Terminal =\n/*#__PURE__*/\nfunction (_Component) {\n (0, _inherits2[\"default\"])(Terminal, _Component);\n\n function Terminal(props) {\n var _this;\n\n (0, _classCallCheck2[\"default\"])(this, Terminal);\n _this = (0, _possibleConstructorReturn2[\"default\"])(this, (0, _getPrototypeOf2[\"default\"])(Terminal).call(this, props));\n _this.state = {\n commands: {},\n stdout: [],\n history: [],\n historyPosition: null,\n previousHistoryPosition: null,\n processing: false\n };\n _this.terminalRoot = _react[\"default\"].createRef();\n _this.terminalInput = _react[\"default\"].createRef();\n _this.focusTerminal = _this.focusTerminal.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.validateCommands = _this.validateCommands.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.showWelcomeMessage = _this.showWelcomeMessage.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.showHelp = _this.showHelp.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.pushToStdout = _this.pushToStdout.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.getStdout = _this.getStdout.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.clearStdout = _this.clearStdout.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.processCommand = _this.processCommand.bind((0, _assertThisInitialized2[\"default\"])(_this));\n _this.handleInput = _this.handleInput.bind((0, _assertThisInitialized2[\"default\"])(_this));\n return _this;\n }\n\n (0, _createClass2[\"default\"])(Terminal, [{\n key: \"focusTerminal\",\n\n /* istanbul ignore next: Covered by interactivity tests */\n value: function focusTerminal() {\n // Only focus the terminal if text isn't being copied\n var isTextSelected = window.getSelection().type === 'Range';\n if (!isTextSelected) this.terminalInput.current.focus();\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"scrollToBottom\",\n value: function scrollToBottom() {\n var rootNode = this.terminalRoot.current; // This may look ridiculous, but it is necessary to decouple execution for just a millisecond in order to scroll all the way\n\n setTimeout(function () {\n rootNode.scrollTop = rootNode.scrollHeight;\n }, 1);\n }\n }, {\n key: \"validateCommands\",\n value: function validateCommands() {\n var validCommands = (0, _validateCommands2[\"default\"])(this.props.commands, this.showHelp, this.clearStdout, this.props.noDefaults);\n this.setState({\n commands: validCommands\n });\n }\n }, {\n key: \"showWelcomeMessage\",\n value: function showWelcomeMessage() {\n var _this2 = this;\n\n var msg = this.props.welcomeMessage;\n if (typeof msg === 'boolean') this.pushToStdout('Welcome to the React terminal! Type \\'help\\' to get a list of commands.');else if (Array.isArray(msg)) msg.map(function (item) {\n return _this2.pushToStdout(item);\n });else this.pushToStdout(msg);\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"showHelp\",\n value: function showHelp() {\n var commands = this.state.commands;\n\n for (var c in commands) {\n var cmdObj = commands[c];\n var usage = cmdObj.usage ? \" - \".concat(cmdObj.usage) : '';\n this.pushToStdout(\"\".concat(c, \" - \").concat(cmdObj.description).concat(usage));\n }\n }\n }, {\n key: \"pushToStdout\",\n value: function pushToStdout(message, rawInput) {\n var _this$state = this.state,\n stdout = _this$state.stdout,\n history = _this$state.history;\n stdout.push(message);\n /* istanbul ignore if: Covered by interactivity tests */\n\n if (rawInput) {\n // Only supplied if history is enabled\n history.push(rawInput);\n this.setState({\n stdout: stdout,\n history: history,\n historyPosition: null\n });\n } else {\n this.setState({\n stdout: stdout\n });\n }\n }\n }, {\n key: \"getStdout\",\n value: function getStdout() {\n return this.state.stdout.map(function (line, i) {\n return _react[\"default\"].createElement(_TerminalMessage[\"default\"], {\n key: i,\n content: line\n });\n });\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"clearStdout\",\n value: function clearStdout() {\n this.setState({\n stdout: []\n });\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"clearInput\",\n value: function clearInput() {\n this.setState({\n historyPosition: null\n });\n this.terminalInput.current.value = '';\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"processCommand\",\n value: function processCommand() {\n var _this3 = this;\n\n this.setState({\n processing: true\n }, function () {\n // Initialise command result object\n var commandResult = {\n command: null,\n args: [],\n rawInput: null,\n result: null\n };\n var rawInput = _this3.terminalInput.current.value;\n\n if (!_this3.props.noAutomaticStdout) {\n if (!_this3.props.noHistory) _this3.pushToStdout(\"\".concat(_this3.props.promptLabel || '$', \" \").concat(rawInput), rawInput);else _this3.pushToStdout(\"\".concat(_this3.props.promptLabel || '$', \" \").concat(rawInput));\n }\n\n if (rawInput) {\n var input = rawInput.split(' ');\n var command = input.splice(0, 1)[0]; // Removed portion is returned...\n\n var args = input; // ...and the rest can be used\n\n commandResult.rawInput = rawInput;\n commandResult.command = command;\n commandResult.args = args;\n var cmdObj = _this3.state.commands[command];\n if (!cmdObj) _this3.pushToStdout(_this3.props.errorText ? _this3.props.errorText.replace(/\\[command\\]/gi, command) : \"Command '\".concat(command, \"' not found!\"));else {\n var res = cmdObj.fn.apply(cmdObj, (0, _toConsumableArray2[\"default\"])(args));\n\n _this3.pushToStdout(res);\n\n commandResult.result = res;\n if (cmdObj.explicitExec) cmdObj.fn.apply(cmdObj, (0, _toConsumableArray2[\"default\"])(args));\n }\n }\n\n _this3.setState({\n processing: false\n }, function () {\n _this3.clearInput();\n\n if (!_this3.props.noAutoScroll) _this3.scrollToBottom();\n if (_this3.props.commandCallback) _this3.props.commandCallback(commandResult);\n });\n });\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"scrollHistory\",\n value: function scrollHistory(direction) {\n var toUpdate = (0, _scrollHistory2[\"default\"])(direction, this.state.history, this.state.historyPosition, this.state.previousHistoryPosition, this.terminalInput, this.props.noAutomaticStdout);\n this.setState(toUpdate);\n }\n /* istanbul ignore next: Covered by interactivity tests */\n\n }, {\n key: \"handleInput\",\n value: function handleInput(event) {\n switch (event.key) {\n case 'Enter':\n this.processCommand();\n break;\n\n case 'ArrowUp':\n this.scrollHistory('up');\n break;\n\n case 'ArrowDown':\n this.scrollHistory('down');\n break;\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n // If there was a change in commands, re-validate\n if (!(0, _reactFastCompare[\"default\"])(prevProps.commands, this.props.commands)) this.validateCommands();\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.validateCommands();\n if (this.props.welcomeMessage) this.showWelcomeMessage();\n /* istanbul ignore next: Covered by interactivity tests */\n\n if (this.props.autoFocus) this.focusTerminal();\n }\n }, {\n key: \"render\",\n value: function render() {\n var styles = {\n container: (0, _defaults[\"default\"])(this.props.style, _Terminal[\"default\"].container),\n content: (0, _defaults[\"default\"])(this.props.contentStyle, _Terminal[\"default\"].content),\n inputArea: (0, _defaults[\"default\"])(this.props.inputAreaStyle, _Terminal[\"default\"].inputArea),\n promptLabel: (0, _defaults[\"default\"])(this.props.promptLabelStyle, _Terminal[\"default\"].promptLabel),\n input: (0, _defaults[\"default\"])(this.props.inputStyle, _Terminal[\"default\"].input)\n };\n return _react[\"default\"].createElement(\"div\", {\n ref: this.terminalRoot,\n name: 'react-console-emulator',\n className: this.props.className,\n style: styles.container,\n onClick: this.focusTerminal\n }, _react[\"default\"].createElement(\"div\", {\n name: 'react-console-emulator__content',\n className: this.props.contentClassName,\n style: styles.content\n }, this.getStdout(), _react[\"default\"].createElement(\"div\", {\n name: 'react-console-emulator__inputArea',\n className: this.props.inputAreaClassName,\n style: styles.inputArea\n }, _react[\"default\"].createElement(\"span\", {\n name: 'react-console-emulator__promptLabel',\n className: this.props.promptLabelClassName,\n style: styles.promptLabel\n }, this.props.promptLabel || '$'), _react[\"default\"].createElement(\"input\", {\n ref: this.terminalInput,\n name: 'react-console-emulator__input',\n className: this.props.inputClassName,\n style: styles.input,\n onKeyDown: this.handleInput,\n type: 'text',\n autoComplete: 'off',\n disabled: this.props.disableOnProcess &&\n /* istanbul ignore next: Covered by interactivity tests */\n this.state.processing\n }))));\n }\n }]);\n return Terminal;\n}(_react.Component);\n\nexports[\"default\"] = Terminal;\n(0, _defineProperty2[\"default\"])(Terminal, \"propTypes\", _Terminal2[\"default\"]);","\"use strict\";\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _classCallCheck2 = _interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));\n\nvar _createClass2 = _interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));\n\nvar _possibleConstructorReturn2 = _interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));\n\nvar _getPrototypeOf2 = _interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));\n\nvar _inherits2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _react = _interopRequireWildcard(require(\"react\"));\n\nvar _reactInnerHtml = _interopRequireDefault(require(\"react-inner-html\"));\n\nvar _TerminalMessage = _interopRequireDefault(require(\"./defs/types/TerminalMessage\"));\n\nvar _TerminalMessage2 = _interopRequireDefault(require(\"./defs/styles/TerminalMessage\"));\n\nvar TerminalMessage =\n/*#__PURE__*/\nfunction (_Component) {\n (0, _inherits2[\"default\"])(TerminalMessage, _Component);\n\n function TerminalMessage() {\n (0, _classCallCheck2[\"default\"])(this, TerminalMessage);\n return (0, _possibleConstructorReturn2[\"default\"])(this, (0, _getPrototypeOf2[\"default\"])(TerminalMessage).apply(this, arguments));\n }\n\n (0, _createClass2[\"default\"])(TerminalMessage, [{\n key: \"render\",\n value: function render() {\n var content = this.props.content;\n var styles = {\n message: _TerminalMessage2[\"default\"]\n };\n return this.props.dangerMode ? _react[\"default\"].createElement(\"p\", (0, _extends2[\"default\"])({\n style: styles.message\n }, (0, _reactInnerHtml[\"default\"])(content))) : _react[\"default\"].createElement(\"p\", {\n style: styles.message\n }, content);\n }\n }]);\n return TerminalMessage;\n}(_react.Component);\n\nexports[\"default\"] = TerminalMessage;\n(0, _defineProperty2[\"default\"])(TerminalMessage, \"propTypes\", _TerminalMessage[\"default\"]);","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nvar _default = {\n content: _propTypes[\"default\"].node\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _default = {\n margin: '0',\n lineHeight: '21px'\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = validateCommands;\n\nvar _typeof2 = _interopRequireDefault(require(\"@babel/runtime/helpers/typeof\"));\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction validateCommands(commands, helpFn, clearFn, noDefaults) {\n var defaultCommands = {\n help: {\n description: 'Show a list of available commands.',\n fn: helpFn\n },\n clear: {\n description: 'Empty the terminal window.',\n explicitExec: true,\n fn: clearFn\n }\n };\n var immutables = Object.keys(defaultCommands);\n var validCommands; // Pre-register defaults\n\n if (!noDefaults) validCommands = _objectSpread({}, defaultCommands);else validCommands = {};\n\n for (var c in commands) {\n // Check that command contains a function\n if (typeof commands[c].fn !== 'function') {\n throw new Error(\"'fn' property of command '\".concat(c, \"' is invalid; expected 'function', got '\").concat((0, _typeof2[\"default\"])(commands[c].fn), \"'\"));\n } // Check that the command does not attempt to override immutables\n\n\n if (!noDefaults && immutables.includes(c)) {\n throw new Error(\"Attempting to overwrite default command '\".concat(immutables[immutables.indexOf(c)], \"'; cannot override default commands when noDefaults isn't set\"));\n } // Add description if missing\n\n\n if (!commands[c].description) commands[c].description = 'None'; // Pass validation\n\n validCommands[c] = commands[c];\n }\n\n return validCommands;\n}","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = scrollHistory;\n\nvar _cleanArray = _interopRequireDefault(require(\"../utils/cleanArray\"));\n\nfunction scrollHistory(direction, commandHistory, historyPosition, previousHistoryPosition, terminalInput, noAutomaticStdout) {\n var history = (0, _cleanArray[\"default\"])(commandHistory).reverse(); // Clean empty items and reverse order to ease position tracking\n\n var position = historyPosition;\n var previousPosition = previousHistoryPosition;\n var termNode = terminalInput.current;\n\n if (!noAutomaticStdout && history.length > 0) {\n // Only run if history is non-empty and in use\n switch (direction) {\n case 'up':\n if (position === null) {\n // If at no position, get most recent entry\n termNode.value = history[0];\n return {\n historyPosition: 0,\n previousHistoryPosition: null\n };\n } else if (position + 1 === history.length) {\n // If the first entry will be reached on this press, get it and decrement position by 1 to avoid confusing downscroll\n termNode.value = history[history.length - 1];\n return {\n historyPosition: history.length - 1,\n previousHistoryPosition: history.length - 2\n };\n } else {\n // Normal increment by one\n termNode.value = history[position + 1];\n return {\n historyPosition: position + 1,\n previousHistoryPosition: position\n };\n }\n\n case 'down':\n if (position === null || !history[position]) {\n // If at initial or out of range, clear (Unix-like behaviour)\n termNode.value = '';\n return {\n historyPosition: null,\n previousHistoryPosition: null\n };\n } else if (position - 1 === -1) {\n // Clear because user pressed up once and is now pressing down again => clear or is reaching bottom\n if (previousPosition === null || position === 0 && previousPosition === 1) termNode.value = '';else termNode.value = history[0];\n return {\n historyPosition: null,\n previousHistoryPosition: null\n };\n } else {\n // Normal decrement by one\n termNode.value = history[position - 1];\n return {\n historyPosition: position - 1,\n previousHistoryPosition: position\n };\n }\n\n }\n }\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = cleanArray;\n\n/**\r\n * Workaround to clean an array from 'ghost items'.\r\n * @param {Array} dirtyArray\r\n */\nfunction cleanArray(dirtyArray) {\n var newArray = Array.from(dirtyArray);\n return newArray.filter(function (i) {\n return i !== undefined;\n });\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar _default = {\n container: {\n minWidth: '500px',\n minHeight: '300px',\n maxWidth: '100%',\n // Fill parent before overflowing\n maxHeight: '100%',\n // Fill parent before overflowing\n borderRadius: '5px',\n overflow: 'auto',\n cursor: 'text',\n background: '#212121',\n backgroundSize: 'cover'\n },\n content: {\n padding: '20px',\n height: '100%',\n fontSize: '15px',\n color: '#FFFFFF',\n fontFamily: 'monospace'\n },\n inputArea: {\n display: 'inline-flex',\n width: '100%'\n },\n promptLabel: {\n paddingTop: '3px',\n color: '#EE9C34'\n },\n input: {\n border: '0',\n padding: '0 0 0 7px',\n margin: '0',\n flexGrow: '100',\n width: '100%',\n height: '22px',\n background: 'transparent',\n fontSize: '15px',\n color: '#F0BF81',\n fontFamily: 'monospace',\n outline: 'none' // Fix for outline showing up on some browsers\n\n }\n};\nexports[\"default\"] = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _defineProperty2 = _interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));\n\nvar _propTypes = _interopRequireDefault(require(\"prop-types\"));\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2[\"default\"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nvar styleTypes = {\n style: _propTypes[\"default\"].object,\n contentStyle: _propTypes[\"default\"].object,\n inputAreaStyle: _propTypes[\"default\"].object,\n promptLabelStyle: _propTypes[\"default\"].object,\n inputStyle: _propTypes[\"default\"].object\n};\nvar classNameTypes = {\n className: _propTypes[\"default\"].string,\n contentClassName: _propTypes[\"default\"].string,\n inputAreaClassName: _propTypes[\"default\"].string,\n promptLabelClassName: _propTypes[\"default\"].string,\n inputClassName: _propTypes[\"default\"].string\n};\nvar optionTypes = {\n autoFocus: _propTypes[\"default\"].bool,\n dangerMode: _propTypes[\"default\"].bool,\n disableOnProcess: _propTypes[\"default\"].bool,\n noDefaults: _propTypes[\"default\"].bool,\n noAutomaticStdout: _propTypes[\"default\"].bool,\n noHistory: _propTypes[\"default\"].bool,\n noAutoScroll: _propTypes[\"default\"].bool\n};\nvar labelTypes = {\n welcomeMessage: _propTypes[\"default\"].oneOfType([_propTypes[\"default\"].bool, _propTypes[\"default\"].array, _propTypes[\"default\"].string]),\n promptLabel: _propTypes[\"default\"].string,\n errorText: _propTypes[\"default\"].string\n};\nvar commandTypes = {\n commands: _propTypes[\"default\"].object.isRequired,\n commandCallback: _propTypes[\"default\"].func\n};\n\nvar _default = _objectSpread({}, styleTypes, {}, classNameTypes, {}, optionTypes, {}, labelTypes, {}, commandTypes);\n\nexports[\"default\"] = _default;"],"sourceRoot":""}