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OAAAA,CAAK6C,IAAI,OAAO/C,KAAK,oBAExB,GAAAhJ,EAAAC,GAAA,EAACC,MAAAA,CAAIwS,GAAG,gBACN,GAAA1S,EAAAC,GAAA,EAAC0S,EAAAA,UAAgB,WACf,GAAA3S,EAAAC,GAAA,EAAC2S,EAAGA,CAAAA,SAId","sources":["webpack://_N_E/","webpack://_N_E/./src/lib/Window.jsx","webpack://_N_E/./src/lib/AppContextTypes.js","webpack://_N_E/./src/gen/command_pb.js","webpack://_N_E/./src/lib/utils.js","webpack://_N_E/./src/lib/api.jsx","webpack://_N_E/./src/lib/AppContext.jsx","webpack://_N_E/./src/lib/CommandBar.jsx","webpack://_N_E/./src/lib/LoginModal.jsx","webpack://_N_E/./src/lib/EditModal.jsx","webpack://_N_E/./src/lib/Terminal.jsx","webpack://_N_E/./src/gen/command_connect.js","webpack://_N_E/./src/lib/use-client.jsx","webpack://_N_E/./src/lib/App.jsx","webpack://_N_E/./src/pages/index.jsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/\",\n function () {\n return require(\"private-next-pages/index.jsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/\"])\n });\n }\n ","import React, { useEffect, useRef } from 'react';\nconst Window = (props) => {\n const contentRef = useRef(null);\n useEffect(() => {\n let el = contentRef.current;\n if (el) {\n el.scrollTop = el.scrollHeight;\n }\n });\n return (
\r\n
\r\n {props.children}\r\n
\r\n
);\n};\nexport default Window;\n","export var ActionType;\n(function (ActionType) {\n ActionType[ActionType[\"AddSection\"] = 0] = \"AddSection\";\n ActionType[ActionType[\"ClearSections\"] = 1] = \"ClearSections\";\n ActionType[ActionType[\"AutoComplete\"] = 2] = \"AutoComplete\";\n ActionType[ActionType[\"ClearAutoComp\"] = 3] = \"ClearAutoComp\";\n ActionType[ActionType[\"SetCurrentDir\"] = 4] = \"SetCurrentDir\";\n ActionType[ActionType[\"NewCommand\"] = 5] = \"NewCommand\";\n ActionType[ActionType[\"SetAutoComp\"] = 6] = \"SetAutoComp\";\n ActionType[ActionType[\"SetCommand\"] = 7] = \"SetCommand\";\n ActionType[ActionType[\"NextCommand\"] = 8] = \"NextCommand\";\n ActionType[ActionType[\"PrevCommand\"] = 9] = \"PrevCommand\";\n ActionType[ActionType[\"LoginFlow\"] = 10] = \"LoginFlow\";\n ActionType[ActionType[\"RegisterFlow\"] = 11] = \"RegisterFlow\";\n ActionType[ActionType[\"StartEditing\"] = 12] = \"StartEditing\";\n ActionType[ActionType[\"EndEditing\"] = 13] = \"EndEditing\";\n ActionType[ActionType[\"Bootstrap\"] = 14] = \"Bootstrap\";\n})(ActionType || (ActionType = {}));\n","// @generated by protoc-gen-es v1.10.0 with parameter \"target=ts\"\n// @generated from file proto/command/v1/command.proto (package mainframe, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\nimport { Message, proto3 } from \"@bufbuild/protobuf\";\n/**\n * @generated from enum mainframe.CommandType\n */\nexport var CommandType;\n(function (CommandType) {\n /**\n * @generated from enum value: ls = 0;\n */\n CommandType[CommandType[\"ls\"] = 0] = \"ls\";\n /**\n * @generated from enum value: cat = 1;\n */\n CommandType[CommandType[\"cat\"] = 1] = \"cat\";\n /**\n * @generated from enum value: cd = 2;\n */\n CommandType[CommandType[\"cd\"] = 2] = \"cd\";\n /**\n * @generated from enum value: help = 3;\n */\n CommandType[CommandType[\"help\"] = 3] = \"help\";\n /**\n * @generated from enum value: clear = 4;\n */\n CommandType[CommandType[\"clear\"] = 4] = \"clear\";\n /**\n * @generated from enum value: landing = 5;\n */\n CommandType[CommandType[\"landing\"] = 5] = \"landing\";\n /**\n * @generated from enum value: download_resume = 6;\n */\n CommandType[CommandType[\"download_resume\"] = 6] = \"download_resume\";\n /**\n * @generated from enum value: login = 7;\n */\n CommandType[CommandType[\"login\"] = 7] = \"login\";\n /**\n * @generated from enum value: exec = 8;\n */\n CommandType[CommandType[\"exec\"] = 8] = \"exec\";\n})(CommandType || (CommandType = {}));\n// Retrieve enum metadata with: proto3.getEnumType(CommandType)\nproto3.util.setEnumType(CommandType, \"mainframe.CommandType\", [\n { no: 0, name: \"ls\" },\n { no: 1, name: \"cat\" },\n { no: 2, name: \"cd\" },\n { no: 3, name: \"help\" },\n { no: 4, name: \"clear\" },\n { no: 5, name: \"landing\" },\n { no: 6, name: \"download_resume\" },\n { no: 7, name: \"login\" },\n { no: 8, name: \"exec\" },\n]);\n/**\n * @generated from enum mainframe.SudoCommandType\n */\nexport var SudoCommandType;\n(function (SudoCommandType) {\n /**\n * @generated from enum value: logout = 0;\n */\n SudoCommandType[SudoCommandType[\"logout\"] = 0] = \"logout\";\n /**\n * @generated from enum value: touch = 1;\n */\n SudoCommandType[SudoCommandType[\"touch\"] = 1] = \"touch\";\n /**\n * @generated from enum value: mkdir = 2;\n */\n SudoCommandType[SudoCommandType[\"mkdir\"] = 2] = \"mkdir\";\n /**\n * @generated from enum value: rm = 3;\n */\n SudoCommandType[SudoCommandType[\"rm\"] = 3] = \"rm\";\n /**\n * @generated from enum value: adduser = 4;\n */\n SudoCommandType[SudoCommandType[\"adduser\"] = 4] = \"adduser\";\n /**\n * @generated from enum value: edit = 5;\n */\n SudoCommandType[SudoCommandType[\"edit\"] = 5] = \"edit\";\n /**\n * @generated from enum value: seed = 6;\n */\n SudoCommandType[SudoCommandType[\"seed\"] = 6] = \"seed\";\n /**\n * @generated from enum value: dump = 7;\n */\n SudoCommandType[SudoCommandType[\"dump\"] = 7] = \"dump\";\n})(SudoCommandType || (SudoCommandType = {}));\n// Retrieve enum metadata with: proto3.getEnumType(SudoCommandType)\nproto3.util.setEnumType(SudoCommandType, \"mainframe.SudoCommandType\", [\n { no: 0, name: \"logout\" },\n { no: 1, name: \"touch\" },\n { no: 2, name: \"mkdir\" },\n { no: 3, name: \"rm\" },\n { no: 4, name: \"adduser\" },\n { no: 5, name: \"edit\" },\n { no: 6, name: \"seed\" },\n { no: 7, name: \"dump\" },\n]);\n/**\n * @generated from enum mainframe.ResponseType\n */\nexport var ResponseType;\n(function (ResponseType) {\n /**\n * @generated from enum value: text = 0;\n */\n ResponseType[ResponseType[\"text\"] = 0] = \"text\";\n /**\n * @generated from enum value: markdown = 1;\n */\n ResponseType[ResponseType[\"markdown\"] = 1] = \"markdown\";\n /**\n * @generated from enum value: html = 2;\n */\n ResponseType[ResponseType[\"html\"] = 2] = \"html\";\n /**\n * @generated from enum value: json = 3;\n */\n ResponseType[ResponseType[\"json\"] = 3] = \"json\";\n})(ResponseType || (ResponseType = {}));\n// Retrieve enum metadata with: proto3.getEnumType(ResponseType)\nproto3.util.setEnumType(ResponseType, \"mainframe.ResponseType\", [\n { no: 0, name: \"text\" },\n { no: 1, name: \"markdown\" },\n { no: 2, name: \"html\" },\n { no: 3, name: \"json\" },\n]);\n/**\n * @generated from message mainframe.AutoCompResponse\n */\nexport class AutoCompResponse extends Message {\n constructor(data) {\n super();\n /**\n * @generated from field: repeated string completions = 1;\n */\n this.completions = [];\n proto3.util.initPartial(data, this);\n }\n static fromBinary(bytes, options) {\n return new AutoCompResponse().fromBinary(bytes, options);\n }\n static fromJson(jsonValue, options) {\n return new AutoCompResponse().fromJson(jsonValue, options);\n }\n static fromJsonString(jsonString, options) {\n return new AutoCompResponse().fromJsonString(jsonString, options);\n }\n static equals(a, b) {\n return proto3.util.equals(AutoCompResponse, a, b);\n }\n}\nAutoCompResponse.runtime = proto3;\nAutoCompResponse.typeName = \"mainframe.AutoCompResponse\";\nAutoCompResponse.fields = proto3.util.newFieldList(() => [\n { no: 1, name: \"completions\", kind: \"scalar\", T: 9 /* ScalarType.STRING */, repeated: true },\n]);\n/**\n * @generated from message mainframe.Folder\n */\nexport class Folder extends Message {\n constructor(data) {\n super();\n /**\n * @generated from field: string path = 5;\n */\n this.path = \"\";\n proto3.util.initPartial(data, this);\n }\n static fromBinary(bytes, options) {\n return new Folder().fromBinary(bytes, options);\n }\n static fromJson(jsonValue, options) {\n return new Folder().fromJson(jsonValue, options);\n }\n static fromJsonString(jsonString, options) {\n return new Folder().fromJsonString(jsonString, options);\n }\n static equals(a, b) {\n return proto3.util.equals(Folder, a, b);\n }\n}\nFolder.runtime = proto3;\nFolder.typeName = \"mainframe.Folder\";\nFolder.fields = proto3.util.newFieldList(() => [\n { no: 5, name: \"path\", kind: \"scalar\", T: 9 /* ScalarType.STRING */ },\n]);\n/**\n * @generated from message mainframe.SudoCommand\n */\nexport class SudoCommand extends Message {\n constructor(data) {\n super();\n /**\n * @generated from field: mainframe.SudoCommandType command = 1;\n */\n this.command = SudoCommandType.logout;\n /**\n * @generated from field: repeated string args = 2;\n */\n this.args = [];\n /**\n * @generated from field: string jwt = 4;\n */\n this.jwt = \"\";\n proto3.util.initPartial(data, this);\n }\n static fromBinary(bytes, options) {\n return new SudoCommand().fromBinary(bytes, options);\n }\n static fromJson(jsonValue, options) {\n return new SudoCommand().fromJson(jsonValue, options);\n }\n static fromJsonString(jsonString, options) {\n return new SudoCommand().fromJsonString(jsonString, options);\n }\n static equals(a, b) {\n return proto3.util.equals(SudoCommand, a, b);\n }\n}\nSudoCommand.runtime = proto3;\nSudoCommand.typeName = \"mainframe.SudoCommand\";\nSudoCommand.fields = proto3.util.newFieldList(() => [\n { no: 1, name: \"command\", kind: \"enum\", T: proto3.getEnumType(SudoCommandType) },\n { no: 2, name: \"args\", kind: \"scalar\", T: 9 /* ScalarType.STRING */, repeated: true },\n { no: 3, name: \"currentDir\", kind: \"message\", T: Folder },\n { no: 4, name: \"jwt\", kind: \"scalar\", T: 9 /* ScalarType.STRING */ },\n]);\n/**\n * @generated from message mainframe.Command\n */\nexport class Command extends Message {\n constructor(data) {\n super();\n /**\n * @generated from field: mainframe.CommandType command = 1;\n */\n this.command = CommandType.ls;\n /**\n * @generated from field: repeated string args = 2;\n */\n this.args = [];\n proto3.util.initPartial(data, this);\n }\n static fromBinary(bytes, options) {\n return new Command().fromBinary(bytes, options);\n }\n static fromJson(jsonValue, options) {\n return new Command().fromJson(jsonValue, options);\n }\n static fromJsonString(jsonString, options) {\n return new Command().fromJsonString(jsonString, options);\n }\n static equals(a, b) {\n return proto3.util.equals(Command, a, b);\n }\n}\nCommand.runtime = proto3;\nCommand.typeName = \"mainframe.Command\";\nCommand.fields = proto3.util.newFieldList(() => [\n { no: 1, name: \"command\", kind: \"enum\", T: proto3.getEnumType(CommandType) },\n { no: 2, name: \"args\", kind: \"scalar\", T: 9 /* ScalarType.STRING */, repeated: true },\n { no: 3, name: \"currentDir\", kind: \"message\", T: Folder },\n]);\n/**\n * @generated from message mainframe.Response\n */\nexport class Response extends Message {\n constructor(data) {\n super();\n /**\n * @generated from field: string resp = 3;\n */\n this.resp = \"\";\n /**\n * @generated from field: mainframe.ResponseType type = 4;\n */\n this.type = ResponseType.text;\n proto3.util.initPartial(data, this);\n }\n static fromBinary(bytes, options) {\n return new Response().fromBinary(bytes, options);\n }\n static fromJson(jsonValue, options) {\n return new Response().fromJson(jsonValue, options);\n }\n static fromJsonString(jsonString, options) {\n return new Response().fromJsonString(jsonString, options);\n }\n static equals(a, b) {\n return proto3.util.equals(Response, a, b);\n }\n}\nResponse.runtime = proto3;\nResponse.typeName = \"mainframe.Response\";\nResponse.fields = proto3.util.newFieldList(() => [\n { no: 1, name: \"command\", kind: \"message\", T: Command },\n { no: 2, name: \"currentDir\", kind: \"message\", T: Folder },\n { no: 3, name: \"resp\", kind: \"scalar\", T: 9 /* ScalarType.STRING */ },\n { no: 4, name: \"type\", kind: \"enum\", T: proto3.getEnumType(ResponseType) },\n]);\n/**\n * @generated from message mainframe.SudoResponse\n */\nexport class SudoResponse extends Message {\n constructor(data) {\n super();\n /**\n * @generated from field: string resp = 3;\n */\n this.resp = \"\";\n /**\n * @generated from field: mainframe.ResponseType type = 4;\n */\n this.type = ResponseType.text;\n proto3.util.initPartial(data, this);\n }\n static fromBinary(bytes, options) {\n return new SudoResponse().fromBinary(bytes, options);\n }\n static fromJson(jsonValue, options) {\n return new SudoResponse().fromJson(jsonValue, options);\n }\n static fromJsonString(jsonString, options) {\n return new SudoResponse().fromJsonString(jsonString, options);\n }\n static equals(a, b) {\n return proto3.util.equals(SudoResponse, a, b);\n }\n}\nSudoResponse.runtime = proto3;\nSudoResponse.typeName = \"mainframe.SudoResponse\";\nSudoResponse.fields = proto3.util.newFieldList(() => [\n { no: 1, name: \"command\", kind: \"message\", T: SudoCommand },\n { no: 2, name: \"currentDir\", kind: \"message\", T: Folder },\n { no: 3, name: \"resp\", kind: \"scalar\", T: 9 /* ScalarType.STRING */ },\n { no: 4, name: \"type\", kind: \"enum\", T: proto3.getEnumType(ResponseType) },\n]);\n","export function isValidEnum(str, map) {\n return str in map;\n}\nexport const arrays_equal = (a, b) => !!a && !!b && !(a < b || b < a);\nexport function deltaReducer(reducer) {\n return (state, action) => (Object.assign(Object.assign({}, state), reducer(state, action)));\n}\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport { ActionType } from './AppContextTypes';\nimport { useCookies } from 'react-cookie';\nimport { CommandType, SudoCommandType, Command, ResponseType, SudoCommand } from '@gen/command_pb';\nimport { useMemo } from 'react';\nimport { Empty } from 'google-protobuf/google/protobuf/empty_pb';\nimport { isValidEnum } from './utils';\nimport ReactMarkdown from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\nconst JWT_COOKIE_KEY = 'jwt';\nexport function useCommandNames(jwt) {\n return useMemo(() => [...Object.keys(CommandType), ...(jwt ? Object.keys(SudoCommandType) : [])].map(cmd => cmd.toLowerCase()), [jwt]);\n}\nfunction useCookie(key) {\n const [cookies, setCookie, removeCookie] = useCookies([key]);\n return [cookies[key] || null, (newJwt) => setCookie(key, newJwt), () => removeCookie(key)];\n}\nexport function useApi(state, dispatch, props, inputOpenFileRef) {\n const [jwt, setJwt, removeJwt] = useCookie(JWT_COOKIE_KEY);\n const cmdNames = useCommandNames(jwt);\n const parseCommand = (command) => {\n const split = command.match(/(?:[^\\s\"]+|\"[^\"]*\")+/g);\n if (split) {\n let [cmd, ...args] = split.map(part => part.replace(/\"/g, \"\"));\n cmd = cmd.toLowerCase();\n return { cmd, args };\n }\n return null;\n };\n const runCommands = async (commands, currentDir) => {\n for (const command of commands) {\n currentDir = await sendCommand(command, false, currentDir);\n }\n return currentDir;\n };\n const sendCommand = async (command, interactive, currentDir) => {\n currentDir = currentDir || state.currentDir;\n if (interactive) {\n dispatch({\n type: ActionType.AddSection,\n section:
{state.prompt + command}
\n });\n dispatch({ type: ActionType.ClearAutoComp });\n }\n if (command !== \"\") {\n if (interactive) {\n dispatch({ type: ActionType.NewCommand, payload: { command } });\n }\n const split = parseCommand(command);\n if (split) {\n const { cmd, args } = split;\n if (isValidEnum(cmd, CommandType)) {\n switch (CommandType[cmd]) {\n case CommandType.clear: {\n dispatch({ type: ActionType.ClearAutoComp });\n dispatch({ type: ActionType.ClearSections });\n return currentDir;\n }\n case CommandType.landing: {\n window.location.href = 'http://www.bentekkie.com';\n return currentDir;\n }\n case CommandType.download_resume: {\n const link = document.createElement('a');\n link.download = \"Benjamin Segall's Resume.pdf\";\n link.href = 'https://docs.google.com/document/d/1Czpzbfjk5HsOYjFMAOYXI3GqX4QSqU9Knjtdf0Sr8XA/export?format=pdf';\n const clickEvent = document.createEvent(\"MouseEvent\");\n clickEvent.initEvent(\"click\", true, true);\n link.dispatchEvent(clickEvent);\n const element = document.getElementById(\"content\");\n if (element) {\n element.scrollTop = element.scrollHeight;\n }\n return currentDir;\n }\n case CommandType.login: {\n if (args.length === 0) {\n dispatch({\n type: ActionType.LoginFlow,\n payload: { loggingIn: true }\n });\n }\n return currentDir;\n }\n case CommandType.exec: {\n if (args.length === 1) {\n let command = new Command({\n args: args,\n command: CommandType.cat,\n currentDir: currentDir\n });\n return props.client.runCommand(command).then(resp => {\n if (resp) {\n if (resp.type === ResponseType.markdown) {\n const rawCommands = resp.resp.split('\\n');\n return runCommands(rawCommands, currentDir);\n }\n else {\n receiveResponse(resp);\n return resp.currentDir;\n }\n }\n else {\n console.error(\"Null Response\");\n return currentDir;\n }\n }).catch(err => {\n console.error(err);\n return currentDir;\n });\n }\n else {\n return currentDir;\n }\n }\n default: {\n let command = new Command({\n currentDir,\n args,\n command: CommandType[cmd]\n });\n return props.client.runCommand(command).then(resp => {\n receiveResponse(resp);\n return resp.currentDir;\n }).catch(err => {\n console.error(err);\n return currentDir;\n });\n }\n }\n }\n else if (isValidEnum(cmd, SudoCommandType) && jwt !== null) {\n switch (SudoCommandType[cmd]) {\n case SudoCommandType.seed: {\n if (inputOpenFileRef.current) {\n inputOpenFileRef.current.click();\n }\n return currentDir;\n }\n case SudoCommandType.logout: {\n removeJwt();\n return currentDir;\n }\n case SudoCommandType.adduser:\n if (args.length === 0) {\n dispatch({\n type: ActionType.RegisterFlow,\n payload: {\n registering: true\n }\n });\n return currentDir;\n }\n default: {\n break;\n }\n }\n let command = new SudoCommand({\n currentDir,\n args,\n command: SudoCommandType[cmd],\n jwt,\n });\n return props.client.runSudoCommand(command).then(resp => {\n receiveSudoResponse(resp);\n return resp.currentDir;\n }).catch(err => {\n console.error(err);\n return currentDir;\n });\n }\n else {\n console.error(`Invalid command \"${command}\"`);\n if (interactive) {\n dispatch({\n type: ActionType.AddSection,\n section:
Invalid command `"`{command}`"`
\n });\n }\n return currentDir;\n }\n }\n }\n };\n const receiveSudoResponse = (resp) => {\n const currentDir = resp.currentDir;\n if (currentDir) {\n const command = resp.command;\n if (command && command.command === SudoCommandType.edit && !state.editing && resp.type === ResponseType.markdown) {\n /* console.log({\n type: ActionType.StartEditing,\n payload: {\n editorFile: {\n path: command.getArgsList()[0],\n contents: resp.getResp()\n }\n }\n }) */\n dispatch({\n type: ActionType.StartEditing,\n payload: {\n editorFile: {\n path: command.args[0],\n contents: resp.resp\n }\n }\n });\n return;\n }\n let tmp = currentDir.path;\n let tl = tmp.split(\"/\");\n if (tl.length > 2) {\n tmp = \"/../\" + tl[tl.length - 1];\n }\n dispatch({\n type: ActionType.AddSection,\n section: parseResponse(resp),\n currentDir,\n prompt: \"B:\" + tmp + \">\"\n });\n }\n };\n const parseResponse = (resp) => {\n switch (resp.type) {\n case ResponseType.text:\n return

{resp.resp}

;\n case ResponseType.html:\n return

;\n case ResponseType.markdown:\n return {children};\n },\n }} remarkPlugins={[remarkGfm]}>{resp.resp};\n case ResponseType.json:\n var element = document.createElement('a');\n element.setAttribute('href', 'data:application/json;charset=utf-8,' + encodeURIComponent(resp.resp));\n element.setAttribute('download', \"dump.json\");\n element.style.display = 'none';\n document.body.appendChild(element);\n element.click();\n }\n };\n const receiveResponse = (resp) => {\n const command = resp.command;\n if (command && command.command === CommandType.login) {\n const text = resp.resp;\n if (text && text.startsWith(\"JWT:\")) {\n const jwt = text.substring(4);\n setJwt(jwt);\n return;\n }\n }\n const currentDir = resp.currentDir;\n if (currentDir) {\n let tmp = currentDir.path;\n let tl = tmp.split(\"/\");\n if (tl.length > 2) {\n tmp = \"/../\" + tl[tl.length - 1];\n }\n dispatch({\n type: ActionType.AddSection,\n section: parseResponse(resp),\n currentDir,\n prompt: \"B:\" + tmp + \">\"\n });\n }\n };\n return {\n sendCommand,\n autoComplete: () => {\n if (state.autoComp.frag === \"\" || !state.command.startsWith(state.autoComp.frag)) {\n let split = state.command.match(/(?:[^\\s\"]+|\"[^\"]*\")+/g);\n if (!split)\n split = [];\n for (let i = 0; i < split.length; i++) {\n split[i] = split[i].replace(/\"/g, \"\");\n }\n if (cmdNames.indexOf(split[0]) >= 0 && split[1] !== undefined) {\n const command = split[0].toLowerCase();\n if (isValidEnum(command, CommandType)) {\n let c = new Command({\n command: CommandType[command],\n currentDir: state.currentDir,\n args: split.slice(1)\n });\n props.client.autoComplete(c).then(resp => {\n dispatch({ type: ActionType.AutoComplete, payload: { rawAutoComp: resp.completions } });\n }).catch(err => {\n console.error(err);\n });\n }\n else if (isValidEnum(command, SudoCommandType) && jwt != null) {\n let c = new SudoCommand({\n command: SudoCommandType[command],\n currentDir: state.currentDir,\n args: split.slice(1),\n jwt,\n });\n props.client.sudoAutoComplete(c).then(resp => {\n dispatch({ type: ActionType.AutoComplete, payload: { rawAutoComp: resp.completions } });\n }).catch(err => {\n console.error(err);\n });\n }\n }\n else {\n let filteredArr = cmdNames.filter((s) => {\n return s.startsWith(state.command);\n });\n dispatch({\n type: ActionType.SetAutoComp,\n payload: (filteredArr.length > 0) ? {\n command: filteredArr[0],\n autoComp: {\n frag: state.command,\n cIndex: 1 % filteredArr.length,\n comps: filteredArr\n }\n } : {\n autoComp: Object.assign(Object.assign({}, state.autoComp), { comps: filteredArr })\n }\n });\n }\n }\n else if (state.autoComp.comps.length > 0) {\n dispatch({\n type: ActionType.SetAutoComp,\n payload: {\n command: state.autoComp.comps[state.autoComp.cIndex],\n autoComp: Object.assign(Object.assign({}, state.autoComp), { cIndex: (state.autoComp.cIndex + 1) % state.autoComp.comps.length })\n }\n });\n }\n },\n bootstrap: () => {\n if (!state.bootstrapped) {\n console.log(\"Bootstrap\");\n dispatch({ type: ActionType.Bootstrap });\n props.client.getRoot(new Empty()).then(resp => {\n dispatch({ type: ActionType.SetCurrentDir, payload: { currentDir: resp } });\n sendCommand(\"exec init\", false, resp);\n });\n }\n },\n setCommand: (command) => dispatch({ type: ActionType.SetCommand, payload: { command } }),\n clearAutoComplete: () => dispatch({ type: ActionType.ClearAutoComp }),\n nextCommand: () => dispatch({ type: ActionType.NextCommand }),\n prevCommand: () => dispatch({ type: ActionType.PrevCommand }),\n login: (username, password) => {\n let command = new Command({\n currentDir: state.currentDir,\n args: [username, password],\n command: CommandType.login\n });\n props.client.runCommand(command).then(receiveResponse).catch(console.error);\n dispatch({\n type: ActionType.LoginFlow,\n payload: { loggingIn: false }\n });\n },\n register: (username, password) => {\n if (jwt) {\n let command = new SudoCommand({\n currentDir: state.currentDir,\n args: [username, password],\n command: SudoCommandType.adduser,\n jwt,\n });\n props.client.runSudoCommand(command).then(receiveSudoResponse).catch(console.error);\n }\n dispatch({\n type: ActionType.RegisterFlow,\n payload: { registering: false }\n });\n },\n updateFile: (newContents) => {\n dispatch({ type: ActionType.EndEditing });\n if (jwt != null) {\n const command = new SudoCommand({\n jwt,\n currentDir: state.currentDir,\n command: SudoCommandType.edit,\n args: [state.editorFile.path, newContents],\n });\n props.client.runSudoCommand(command).then(receiveSudoResponse).then(console.error);\n }\n },\n seedDb: (filelist) => {\n if (filelist && filelist.length === 1) {\n const item = filelist.item(0);\n if (item) {\n console.log(item);\n const reader = new FileReader();\n reader.addEventListener(\"load\", event => {\n if (event.target instanceof FileReader && event.target.result && !(event.target.result instanceof ArrayBuffer)) {\n if (jwt != null) {\n const wipeDB = prompt(\"Wipe db?\", \"false\") === \"true\";\n const command = new SudoCommand({\n jwt,\n currentDir: state.currentDir,\n command: SudoCommandType.seed,\n args: [event.target.result, wipeDB.toString()]\n });\n props.client.runSudoCommand(command).then(receiveSudoResponse).then(console.error);\n }\n }\n });\n reader.addEventListener(\"error\", event => {\n console.log(event);\n });\n reader.readAsText(item);\n }\n }\n },\n loggedIn: () => jwt !== null\n };\n}\n","import { useReducer, useRef, useContext, createContext } from 'react';\nimport { ActionType } from './AppContextTypes';\nimport { useApi } from './api';\nimport { arrays_equal, deltaReducer } from './utils';\nconst initialState = {\n bootstrapped: false,\n sections: [],\n prompt: \"B:/>\",\n command_arr: [],\n current_command: 0,\n command: \"\",\n rawAutoComp: [],\n currentDir: undefined,\n autoComp: {\n frag: \"\",\n cIndex: 0,\n comps: []\n },\n loggingIn: false,\n registering: false,\n editing: false,\n editorFile: {\n path: \"\",\n contents: \"\"\n }\n};\nconst reducer = deltaReducer((state, action) => {\n switch (action.type) {\n case ActionType.AddSection:\n return {\n sections: [...state.sections, action.section],\n currentDir: action.currentDir || state.currentDir,\n prompt: action.prompt || state.prompt\n };\n case ActionType.ClearSections:\n return { sections: [] };\n case ActionType.AutoComplete:\n const rawAutoComp = action.payload.rawAutoComp;\n if (rawAutoComp.length > 0 && !arrays_equal(rawAutoComp, state.rawAutoComp)) {\n const filteredArr = rawAutoComp.filter((s) => s.startsWith(state.command));\n if (filteredArr.length > 0) {\n return {\n rawAutoComp: rawAutoComp,\n command: filteredArr[0],\n autoComp: {\n frag: state.command,\n cIndex: 1 % filteredArr.length,\n comps: filteredArr\n }\n };\n }\n else {\n return {\n rawAutoComp: rawAutoComp,\n autoComp: Object.assign(Object.assign({}, state.autoComp), { comps: filteredArr })\n };\n }\n }\n return { rawAutoComp };\n case ActionType.ClearAutoComp:\n return {\n rawAutoComp: [],\n autoComp: {\n frag: \"\",\n cIndex: 0,\n comps: []\n }\n };\n case ActionType.NewCommand:\n return {\n command_arr: [...state.command_arr, action.payload.command],\n current_command: state.command_arr.length + 1\n };\n case ActionType.NextCommand:\n return (state.current_command > 0) ? {\n command: state.command_arr[state.current_command - 1],\n current_command: state.current_command - 1\n } : {};\n case ActionType.PrevCommand:\n return (state.current_command + 1 < state.command_arr.length) ? {\n command: state.command_arr[state.current_command + 1],\n current_command: state.current_command + 1\n } : { command: \"\" };\n case ActionType.StartEditing:\n return Object.assign(Object.assign({}, action.payload), { editing: true });\n case ActionType.EndEditing:\n return {\n editing: false,\n editorFile: {\n path: \"\",\n contents: \"\"\n }\n };\n case ActionType.Bootstrap:\n return {\n bootstrapped: true\n };\n case ActionType.RegisterFlow:\n case ActionType.LoginFlow:\n case ActionType.SetCurrentDir:\n case ActionType.SetCommand:\n case ActionType.SetAutoComp:\n return action.payload;\n }\n});\nconst AppContext = createContext(undefined);\nexport const AppContextProvider = (props) => {\n const [state, dispatch] = useReducer(reducer, initialState);\n const inputOpenFileRef = useRef(null);\n const api = useApi(state, dispatch, props, inputOpenFileRef);\n return \r\n {props.children}\r\n api.seedDb(e.target.files)}/>\r\n ;\n};\nexport function useAppContext() {\n return useContext(AppContext);\n}\n","import React from 'react';\nimport { useAppContext } from \"./AppContext\";\nconst CommandBar = () => {\n const [{ prompt, command }, { sendCommand, setCommand, clearAutoComplete, autoComplete, nextCommand, prevCommand, loggedIn }] = useAppContext();\n return

{\n sendCommand(command, true);\n setCommand(\"\");\n event.preventDefault();\n }}>\r\n
\r\n
{prompt}
\r\n setCommand(event.target.value)} placeholder=\"Enter command\" autoFocus autoCorrect=\"off\" autoComplete=\"off\" autoCapitalize=\"none\" onKeyDown={event => {\n switch (event.keyCode) {\n case 38:\n nextCommand();\n break;\n case 40:\n prevCommand();\n break;\n case 9:\n autoComplete();\n break;\n default:\n clearAutoComplete();\n return;\n }\n event.preventDefault();\n }}/>\r\n
\r\n \r\n
;\n};\nexport default CommandBar;\n","import React, { useState } from 'react';\nimport { useAppContext } from \"./AppContext\";\nimport ReactModal from 'react-modal';\nReactModal.setAppElement(\"#root\");\nexport const LoginModal = () => {\n const [{ loggingIn, registering }, { login, register }] = useAppContext();\n const [username, setUsername] = useState(\"\");\n const [password, setPassword] = useState(\"\");\n return (\r\n
{\n if (loggingIn) {\n login(username, password);\n setUsername(\"\");\n setPassword(\"\");\n }\n else if (registering) {\n register(username, password);\n setUsername(\"\");\n setPassword(\"\");\n }\n event.preventDefault();\n }}>\r\n
\r\n setUsername(event.target.value)}/>\r\n
\r\n
\r\n setPassword(event.target.value)}/>
\r\n \r\n\r\n
\r\n
);\n};\n","var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport React, { useEffect, useState } from 'react';\nimport { useAppContext } from \"./AppContext\";\nimport ReactModal from 'react-modal';\nimport ReactMde from \"react-mde\";\nimport ReactMarkdown from \"react-markdown\";\nimport remarkGfm from 'remark-gfm';\nReactModal.setAppElement(\"#root\");\nexport const EditModal = () => {\n const [{ editing, editorFile }, { updateFile }] = useAppContext();\n const [value, setValue] = useState(editorFile.contents);\n const [selectedTab, setSelectedTab] = useState(\"write\");\n useEffect(() => setValue(editorFile.contents), [editorFile.contents]);\n return (\r\n {children};\n },\n }} remarkPlugins={[remarkGfm]}>{md}}/>
\r\n \r\n
);\n};\n","import React, { useEffect } from 'react';\nimport Window from './Window';\nimport CommandBar from './CommandBar';\nimport { useAppContext } from \"./AppContext\";\nimport { LoginModal } from \"./LoginModal\";\nimport { EditModal } from \"./EditModal\";\nexport const Terminal = () => {\n const [{ sections }, { bootstrap, loggedIn }] = useAppContext();\n useEffect(bootstrap, [bootstrap]);\n return (
\r\n \r\n \r\n \r\n {sections.map((child, i) =>
{child}
)}\r\n
\r\n \r\n
);\n};\n","// @generated by protoc-gen-connect-es v1.5.0 with parameter \"target=ts\"\n// @generated from file proto/command/v1/command.proto (package mainframe, syntax proto3)\n/* eslint-disable */\n// @ts-nocheck\nimport { AutoCompResponse, Command, Folder, Response, SudoCommand, SudoResponse } from \"./command_pb.js\";\nimport { Empty, MethodKind } from \"@bufbuild/protobuf\";\n/**\n * @generated from service mainframe.shell\n */\nexport const shell = {\n typeName: \"mainframe.shell\",\n methods: {\n /**\n * @generated from rpc mainframe.shell.runCommand\n */\n runCommand: {\n name: \"runCommand\",\n I: Command,\n O: Response,\n kind: MethodKind.Unary,\n },\n /**\n * @generated from rpc mainframe.shell.runSudoCommand\n */\n runSudoCommand: {\n name: \"runSudoCommand\",\n I: SudoCommand,\n O: SudoResponse,\n kind: MethodKind.Unary,\n },\n /**\n * @generated from rpc mainframe.shell.autoComplete\n */\n autoComplete: {\n name: \"autoComplete\",\n I: Command,\n O: AutoCompResponse,\n kind: MethodKind.Unary,\n },\n /**\n * @generated from rpc mainframe.shell.sudoAutoComplete\n */\n sudoAutoComplete: {\n name: \"sudoAutoComplete\",\n I: SudoCommand,\n O: AutoCompResponse,\n kind: MethodKind.Unary,\n },\n /**\n * @generated from rpc mainframe.shell.getRoot\n */\n getRoot: {\n name: \"getRoot\",\n I: Empty,\n O: Folder,\n kind: MethodKind.Unary,\n },\n }\n};\n","// use-client.ts\nimport { useMemo } from \"react\";\nimport { createPromiseClient, } from \"@connectrpc/connect\";\nimport { createConnectTransport } from \"@connectrpc/connect-web\";\nconst transport = createConnectTransport({ baseUrl: `/grpc` });\n/**\n* Get a promise client for the given service.\n*/\nexport function useClient(service) {\n // We memoize the client, so that we only create one instance per service.\n return useMemo(() => createPromiseClient(service, transport), [service]);\n}\n","import { Terminal } from \"./Terminal\";\nimport { shell } from \"@gen/command_connect\";\nimport { AppContextProvider } from \"./AppContext\";\nimport { CookiesProvider } from 'react-cookie';\nimport { useClient } from './use-client';\nconst App = () => {\n const client = useClient(shell);\n if (!client) {\n return
;\n }\n return (\n \n \n \n );\n};\nexport default App;\n","import React from 'react';\nimport Head from 'next/head';\nimport App from '../lib/App';\nexport default function Home() {\n return (<>\n \n Bentekkie Mainframe\n \n \n \n \n \n \n
\n \n \n \n
\n );\n}\n"],"names":["window","__NEXT_P","push","__webpack_require__","ActionType","CommandType","SudoCommandType","ResponseType","reducer","lib_Window","contentRef","useRef","useEffect","el","current","scrollTop","scrollHeight","jsx_runtime","jsx","div","ref","className","props","children","proto3","util","setEnumType","no","name","AutoCompResponse","Message","fromBinary","bytes","options","fromJson","jsonValue","fromJsonString","jsonString","equals","a","b","constructor","data","completions","initPartial","runtime","typeName","fields","newFieldList","kind","T","repeated","Folder","path","SudoCommand","command","logout","args","jwt","getEnumType","Command","ls","Response","resp","type","text","SudoResponse","arrays_equal","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","initialState","bootstrapped","sections","prompt","command_arr","current_command","rawAutoComp","currentDir","undefined","autoComp","frag","cIndex","comps","loggingIn","registering","editing","editorFile","contents","state","action","AddSection","section","ClearSections","AutoComplete","payload","filteredArr","filter","startsWith","assign","ClearAutoComp","NewCommand","NextCommand","PrevCommand","StartEditing","EndEditing","Bootstrap","RegisterFlow","LoginFlow","SetCurrentDir","SetCommand","SetAutoComp","AppContext","createContext","AppContextProvider","dispatch","useReducer","inputOpenFileRef","api","useApi","setJwt","removeJwt","useCookie","key","cookies","setCookie","removeCookie","useCookies","newJwt","cmdNames","useMemo","keys","map","cmd","toLowerCase","parseCommand","split","match","part","replace","runCommands","commands","sendCommand","interactive","jsxs","br","str","clear","landing","location","href","download_resume","link","document","createElement","download","clickEvent","createEvent","initEvent","dispatchEvent","element","getElementById","login","exec","cat","client","runCommand","then","markdown","receiveResponse","console","error","catch","err","isValidEnum","concat","seed","click","adduser","runSudoCommand","receiveSudoResponse","edit","tmp","tl","parseResponse","html","dangerouslySetInnerHTML","__html","ReactMarkdown","components","_a","_b","node","url","URL","origin","target","rel","remarkPlugins","remarkGfm","json","setAttribute","encodeURIComponent","style","display","body","appendChild","substring","autoComplete","c","slice","sudoAutoComplete","bootstrap","log","getRoot","Empty","setCommand","clearAutoComplete","nextCommand","prevCommand","username","password","register","updateFile","newContents","seedDb","filelist","item","reader","FileReader","addEventListener","event","result","ArrayBuffer","wipeDB","toString","readAsText","loggedIn","Provider","value","input","onChange","files","useAppContext","useContext","lib_CommandBar","form","onSubmit","preventDefault","width","color","placeholder","autoFocus","autoCorrect","autoCapitalize","onKeyDown","keyCode","tabIndex","ReactModal","LoginModal","setUsername","useState","setPassword","isOpen","content","position","left","right","top","bottom","background","label","htmlFor","EditModal","setValue","selectedTab","setSelectedTab","ReactMde","onTabChange","generateMarkdownPreview","md","button","onClick","Terminal","Window","child","CommandBar","shell","methods","I","O","MethodKind","Unary","transport","createConnectTransport","baseUrl","lib_App","createPromiseClient","CookiesProvider","Home","Fragment","Head","title","meta","id","React","App"],"sourceRoot":""}