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5F,IAAuBI,IACtB,iCACE,SAAC,KAAM,CAACqE,QAAS8E,EAAe,UAC9B,SAAC9D,EAAA,EAAI,CAACjF,KAAK,YAEb,SAACgJ,GAAA,EAAO,WAZqB,SAAC,EAAO,KAJJ,SAAC,EAAK,IAFtB,IAuB3B,CAEAtB,GAAatK,UAAY,CACvB+K,SAAU9K,IAAAA,KAAAA,WACVqJ,SAAUrJ,IAAAA,KAAAA,WACVgL,QAAShL,IAAAA,KAAAA,WACT+K,SAAU/K,IAAAA,KAAAA,YAGZ,iCC/IA,IAAI4L,EAAc,EAAQ,MACtBC,EAAe,EAAQ,MAkC3BC,EAAOC,QAJP,SAAiBC,EAAQC,GACvB,OAAOD,IAAWC,GAAUL,EAAYI,EAAQC,EAAQJ,EAAaI,GACvE","sources":["webpack:///./src/Dialogs/LayoutGenerationError.js","webpack:///./src/Sources/Github/ValidationErrors.js","webpack:///./src/Sources/Github/storage.js","webpack:///./src/Sources/Github/store.js","webpack:///./src/Dialogs/SuggestRemoteRepo.js","webpack:///./src/Dialogs/SuggestRepoSelection.js","webpack:///./src/Dialogs/SuggestWrongRepo.js","webpack:///./src/Dialogs/Blocked.js","webpack:///./src/Dialogs/MissingLayout.js","webpack:///./src/Sources/Github/Dialogs/Login.js","webpack:///./src/Sources/Github/Dialogs/Install.js","webpack:///./src/Dialogs/MissingKeymaps.js","webpack:///./src/Sources/Github/GitHubExpandedPicker.js","webpack:///./src/Sources/Github/GitHubCompactPicker.js","webpack:///./src/Sources/Github/repository-options.js","webpack:///./src/Sources/Github/Picker.js","webpack:///./node_modules/lodash/isMatch.js"],"sourcesContent":["import PropTypes from 'prop-types'\n\nimport DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\nimport { GitHubIssuesLink } from './support'\n\nfunction LayoutGenerationError (props) {\n const { onDismiss } = props\n\n return (\n <Modal>\n <DialogBox onDismiss={onDismiss}>\n <h2>Automatic Layout Generation Failed</h2>\n <p>\n No accompanying layout was found with your keymap file and the Keymap\n Editor was unable to generate one automatically for you.\n </p>\n <p>\n Something went wrong with the attempted automatic layout generation\n for your keyboard and there's no automatic way to recover, but if you\n want to reach out for assistance maybe we can work together to resolve\n any technical issues or else craft a manual layout for your keyboard.\n </p>\n <p>\n Share your experience at {GitHubIssuesLink}.\n </p>\n </DialogBox>\n </Modal>\n )\n}\n\nLayoutGenerationError.propTypes = {\n onDismiss: PropTypes.func.isRequired\n}\n\nexport default LayoutGenerationError\n","import DialogBox from '../../Common/DialogBox'\nimport Modal from '../../Common/Modal'\n\nfunction fileFromTitle (title) {\n if (title === 'InfoValidationError') {\n return 'config/info.json'\n } else if (title === 'KeymapValidationError') {\n return 'config/keymap.json'\n }\n}\n\nconst listStyle = {\n maxHeight: '300px',\n overflow: 'auto',\n padding: '10px',\n fontFamily: 'monospace',\n fontSize: '80%',\n backgroundColor: 'rgb(239, 239, 239, 0.5)'\n}\n\nconst listItemStyle = { margin: '10px' }\n\nexport default function ValidationErrors (props) {\n const { onDismiss, title, errors } = props\n const file = fileFromTitle(title)\n\n return (\n <Modal>\n <DialogBox onDismiss={onDismiss}>\n <h2>{title}</h2>\n {file && (\n <p>Errors in the file <code>{file}</code>.</p>\n )}\n <ul style={listStyle}>\n {errors.map((error, i) => (\n <li key={i} style={listItemStyle}>\n {error}\n </li>\n ))}\n </ul>\n </DialogBox>\n </Modal>\n )\n}\n","const REPOSITORY = 'selectedGithubRepository'\nconst BRANCH = 'selectedGithubBranch'\nconst KEYBOARD = 'selectedGithubKeyboard'\n\nexport function getPersistedRepository () {\n try {\n return JSON.parse(localStorage.getItem(REPOSITORY))\n } catch {\n return null\n }\n}\n\nexport function setPersistedRepository (repository) {\n localStorage.setItem(REPOSITORY, JSON.stringify(repository))\n}\n\nexport function getPersistedBranch (repoId) {\n try {\n return JSON.parse(localStorage.getItem(`${BRANCH}:${repoId}`))\n } catch {\n return null\n }\n}\n\nexport function getPersistedKeyboard (repoId, branch) {\n try {\n return JSON.parse(localStorage.getItem(`${KEYBOARD}:${repoId}:${branch}`))\n } catch {\n return null\n }\n}\n\nexport function setPersistedBranch (repoId, branch) {\n localStorage.setItem(`${BRANCH}:${repoId}`, JSON.stringify(branch))\n}\n\nexport function setPersistedKeyboard (repoId, branch, keyboard) {\n localStorage.setItem(`${KEYBOARD}:${repoId}:${branch}`, JSON.stringify(keyboard))\n}\n","import { createSlice } from '@reduxjs/toolkit'\nimport find from 'lodash/find'\nimport map from 'lodash/map'\nimport { useMemo, useReducer } from 'react'\n\nimport github from './api'\nimport * as storage from './storage'\n\nconst INITIAL_STATE = {\n blocked: false,\n initialized: false,\n selectedRepoId: null,\n selectedBranchName: null,\n selectedKeyboard: null,\n branches: [],\n keyboards: [],\n loading: false,\n warningFlags: []\n}\n\nexport const pickerSlice = createSlice({\n name: 'github-picker',\n initialState: INITIAL_STATE,\n reducers: {\n clearSelection (state) {\n state.warningFlags = []\n state.loading = false\n },\n integrationInitialized (state) {\n const persistedRepoId = storage.getPersistedRepository()\n const repositories = github.repositories || []\n let selectedRepoId\n\n if (find(repositories, { id: persistedRepoId })) {\n selectedRepoId = persistedRepoId\n } else if (repositories.length > 0) {\n selectedRepoId = repositories[0].id\n }\n\n state.initialized = true\n state.selectedRepoId = selectedRepoId\n },\n loadingBranchesList (state) { state.loading = true },\n loadedBranchesList (state, action) {\n const { selectedRepoId } = state\n const { branches } = action.payload\n const repository = find(github.repositories, { id: selectedRepoId })\n\n state.branches = branches\n state.keyboard = null\n state.keyboards = []\n state.loading = false\n\n const available = map(branches, 'name')\n const defaultBranch = repository.default_branch\n const previousBranch = storage.getPersistedBranch(selectedRepoId)\n const onlyBranch = branches.length === 1 ? branches[0].name : null\n\n for (const branch of [onlyBranch, previousBranch, defaultBranch]) {\n if (available.includes(branch)) {\n state.selectedBranchName = branch\n state.selectedKeyboard = storage.getPersistedKeyboard(selectedRepoId, branch)\n break\n }\n }\n },\n loadingKeyboardsList (state) { state.loading = true },\n loadedKeyboardsList (state, action) {\n const { selectedRepoId, selectedBranchName } = state\n const { keyboards, default: defaultKeyboard } = action.payload\n\n state.keyboards = keyboards\n state.loading = false\n\n const previousKeyboard = storage.getPersistedKeyboard(selectedRepoId, selectedBranchName)\n const onlyKeyboard = keyboards.length === 1 ? keyboards[0] : null\n\n for (const keyboard of [onlyKeyboard, previousKeyboard, defaultKeyboard]) {\n if (keyboards.includes(keyboard)) {\n state.selectedKeyboard = keyboard\n break\n }\n }\n },\n selectedRepository (state, action) {\n state.selectedRepoId = action.payload.repository.id\n state.selectedBranchName = null\n state.selectedKeyboard = null\n\n storage.setPersistedRepository(state.selectedRepoId)\n },\n selectedBranch (state, action) {\n state.selectedBranchName = action.payload.name\n state.selectedKeyboard = storage.getPersistedKeyboard(\n state.selectedRepoId,\n state.selectedBranchName\n )\n storage.setPersistedBranch(\n state.selectedRepoId,\n state.selectedBranchName\n )\n },\n selectedKeyboard (state, action) {\n state.selectedKeyboard = action.payload.name\n storage.setPersistedKeyboard(\n state.selectedRepoId,\n state.selectedBranchName,\n state.selectedKeyboard\n )\n },\n keyboardLoading (state, action) {\n state.loading = true\n },\n keyboardLoadedSuccess (state, action) {\n const { response: { keymap } } = action.payload\n state.warningFlags = keymap.warningFlags || []\n state.loading = false\n }\n }\n})\n\nfunction useActionDispatchers (dispatch) {\n return useMemo(() => (\n Object.keys(pickerSlice.actions).reduce((actions, action) => {\n actions[action] = (...args) => dispatch(pickerSlice.actions[action](...args))\n return actions\n }, {})\n ), [dispatch])\n}\n\nexport function usePickerStore () {\n const [state, dispatch] = useReducer(pickerSlice.reducer, INITIAL_STATE)\n const dispatchers = useActionDispatchers(dispatch)\n\n return [state, dispatchers]\n}\n","import PropTypes from 'prop-types'\n\nimport DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\n\nfunction SuggestRemoteRepo (props) {\n const { onDismiss, missingPath } = props\n return (\n <Modal>\n <DialogBox onDismiss={onDismiss}>\n <h2>Missing keyboard definition?</h2>\n <p>\n Hi there! The repository you're trying to load from doesn't have a\n defined <code>{missingPath}</code>. Right now this application is\n expecting to look at that directory to discover keyboard definitions\n for experimental features like automatic layout generation.\n </p>\n <p>\n Is it possible that the keyboard you're trying to edit relies on data\n from the ZMK or other repositories? Fetching from other repositories is\n not currently supported.\n </p>\n <p>\n I'm a humble developer and have only worked with configurations for my\n own handwired builds, so if you feel you're receiving this message in\n error then please consider opening an issue on this project's GitHub\n repository to let me know what I can do differently.\n </p>\n </DialogBox>\n </Modal>\n )\n}\n\nSuggestRemoteRepo.propTypes = {\n onDismiss: PropTypes.func.isRequired,\n missingPath: PropTypes.string.isRequired\n}\n\nexport default SuggestRemoteRepo\n","import PropTypes from 'prop-types'\n\nimport Link from '../Common/Link'\nimport DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\nimport IconButton from '../Common/IconButton'\n\nfunction SuggestRepoSelection ({ installation }) {\n const url = `https://github.com/settings/installations/${installation.id}`\n\n return (\n <Modal>\n <DialogBox style={{ maxWidth: 'min-content' }} dismissText={null}>\n <h2>App Disabled</h2>\n <p>\n Hello there, your installation of the keymap editor's GitHub app is\n currently disabled. <em>This is not a ban!</em>\n </p>\n <p>\n When you installed this app for your GitHub account you installed it\n for <em>all</em> of your repositories, and we need to do a little\n cleanup as we roll out some new features as it's very likely you will\n have other repositories unrelated to ZMK keyboard configurations.\n </p>\n <h3>How to fix this</h3>\n <p>\n If you're still interested in using the keymap editor (and I'd love\n for you to be able to) please go to your <Link href={url}>installation\n settings</Link> on GitHub and select only the repositories you want to\n use with this tool. As soon as that's done you'll be sent back here\n and ready to go.\n </p>\n <div style={{ display: 'flex', gap: '20px', textAlign: 'center' }}>\n <div>\n <p>\n <img alt=\"Example correct GitHub installation selection\" src=\"repo-selection-good.png\" />\n </p>\n <p>\n <strong>Do this!</strong>\n </p>\n </div>\n\n <div>\n <p>\n <img alt=\"Example incorrect GitHub installation selection\" src=\"repo-selection-bad.png\" />\n </p>\n <p>\n <strong>Don't do this!</strong>\n </p>\n </div>\n </div>\n <IconButton\n collection=\"brands\"\n icon=\"github\"\n text=\"Fix Repository Selection\"\n style={{ display: 'block', margin: '0 auto', fontSize: '120%', padding: '5px 10px' }}\n onClick={() => { window.location.href = url }}\n />\n <p>\n As always, if you're looking for clarification or further assistance\n please visit our GitHub repo and open an issue or start a discussion.\n </p>\n </DialogBox>\n </Modal>\n )\n}\n\nSuggestRepoSelection.propTypes = {\n installation: PropTypes.shape({\n id: PropTypes.number.isRequired\n }).isRequired\n}\n\nexport default SuggestRepoSelection\n","import PropTypes from 'prop-types'\n\nimport DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\nimport { GeneralHelpOfferCopy } from './support'\n\nfunction SuggestWrongRepo (props) {\n const { onDismiss } = props\n\n return (\n <Modal>\n <DialogBox onDismiss={onDismiss}>\n <h2>Is this a zmk-config repo?</h2>\n <p>\n Hi there! The repository you're trying to load from doesn't have a\n defined <code>config</code> directory. Right now this application is\n expecting to look at that directory to discover keymaps and other\n metadata.\n </p>\n {GeneralHelpOfferCopy}\n </DialogBox>\n </Modal>\n )\n}\n\nSuggestWrongRepo.propTypes = {\n onDismiss: PropTypes.func.isRequired,\n otherRepoOrBranchAvailable: PropTypes.bool\n}\n\nexport default SuggestWrongRepo\n","import DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\n\nfunction Blocked () {\n return (\n <Modal>\n <DialogBox dismissText={null}>\n <h2>GitHub Account Blocked</h2>\n <p>\n Hi, your access to this application has been disabled.\n </p>\n <p>\n This could be an innocent mistake. Possibly you've misunderstood the\n intended purpose of this app, possibly I got carried away with some\n housekeeping. If you want more information or feel this was done in\n error, please reach out to <em>nickcoutsos</em> on GitHub or Discord\n (you can find me on the ZMK server).\n </p>\n </DialogBox>\n </Modal>\n )\n}\n\nexport default Blocked\n","import PropTypes from 'prop-types'\n\nimport DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\nimport { GeneralHelpOfferCopy, KeymapLayoutResources } from './support'\n\nfunction MissingLayout (props) {\n const { onDismiss } = props\n\n return (\n <Modal>\n <DialogBox onDismiss={onDismiss}>\n <h2>No Layout Available</h2>\n <p>\n Your keymap doesn't have an accompanying layout and we don't know\n enough about your keyboard to generate one for you automatically.\n </p>\n <p>\n If you meant to include layout data, please make sure that its in the\n same directory as your keymap,\n like <code>config/info.json</code> or <code>config/<keyboard>.json</code>.\n </p>\n {KeymapLayoutResources}\n {GeneralHelpOfferCopy}\n </DialogBox>\n </Modal>\n )\n}\n\nMissingLayout.propTypes = {\n onDismiss: PropTypes.func.isRequired\n}\n\nexport default MissingLayout\n","import DialogBox from '../../../Common/DialogBox'\nimport Modal from '../../../Common/Modal'\nimport IconButton from '../../../Common/IconButton'\nimport github from '../api'\n\nfunction Login () {\n return (\n <Modal centerOnly>\n <DialogBox dismissText={null} style={{ width: '400px' }}>\n <h2>Authenticate with GitHub</h2>\n <p>\n Please log-in to GitHub to continue.\n </p>\n <IconButton\n collection=\"brands\"\n icon=\"github\"\n text=\"Login with GitHub\"\n style={{ display: 'block', margin: '0 auto' }}\n onClick={() => github.beginLoginFlow()}\n />\n </DialogBox>\n </Modal>\n )\n}\n\nLogin.propTypes = {}\n\nexport default Login\n","import DialogBox from '../../../Common/DialogBox'\nimport Modal from '../../../Common/Modal'\nimport IconButton from '../../../Common/IconButton'\nimport github from '../api'\n\nfunction Install () {\n const greeting = github.username\n ? `Welcome, ${github.username}!`\n : 'Welcome!'\n\n return (\n <Modal centerOnly>\n <DialogBox style={{ maxWidth: 'min-content' }} dismissText={null}>\n <h2>{greeting}</h2>\n <p>\n To begin importing your own keymaps, you'll need to grant the Keymap\n Editor app access to your relevant GitHub repositories. Please make\n sure to <em>only</em> select repositories that are set up for ZMK\n keyboard configurations.\n </p>\n <p>\n This app requires read and write access to the repositories you select\n in order to write to arbitrary <code>.keymap</code> files. It also\n receives all build action events for the repository, which generates\n quite a bit of traffic.\n </p>\n <div style={{ display: 'flex', gap: '20px', textAlign: 'center' }}>\n <div>\n <p>\n <img alt=\"Example correct GitHub installation selection\" src=\"repo-selection-good.png\" />\n </p>\n <p>\n <strong>Do this!</strong>\n </p>\n </div>\n\n <div>\n <p>\n <img alt=\"Example incorrect GitHub installation selection\" src=\"repo-selection-bad.png\" />\n </p>\n <p>\n <strong>Don't do this!</strong>\n </p>\n </div>\n </div>\n <p>\n Selecting <code>All repositories</code> for the app installation will\n lead to a suspension.\n </p>\n <IconButton\n collection=\"brands\"\n icon=\"github\"\n text=\"Add Repository\"\n style={{ display: 'block', margin: '0 auto', fontSize: '120%', padding: '5px 10px' }}\n onClick={() => github.beginInstallAppFlow()}\n />\n </DialogBox>\n </Modal>\n )\n}\n\nInstall.propTypes = {}\n\nexport default Install\n","import PropTypes from 'prop-types'\n\nimport DialogBox from '../Common/DialogBox'\nimport Modal from '../Common/Modal'\nimport { GitHubIssuesLink } from './support'\n\nfunction MissingKeymaps (props) {\n const { onDismiss } = props\n\n return (\n <Modal>\n <DialogBox onDismiss={onDismiss}>\n <h2>No Keymap Available</h2>\n <p>\n We couldn't find a <code>.keymap</code> file in your <code>config/</code> folder.\n </p>\n <p>\n Please ensure that any keymap(s) you wish to edit are placed in that\n directory even if an accompanying keyboard definition exists in your\n under the <code>config/boards/...</code> directory.\n </p>\n <p>\n If you have any questions please feel free to reach out by creating an\n issue at {GitHubIssuesLink}.\n </p>\n </DialogBox>\n </Modal>\n )\n}\n\nMissingKeymaps.propTypes = {\n onDismiss: PropTypes.func.isRequired\n}\n\nexport default MissingKeymaps\n","import find from 'lodash/find'\n\nimport { Control, Select } from '../Controls'\nimport Spinner from '../../Common/Spinner'\n\nimport github from './api'\nimport Icon from '../../Common/Icon'\n\nfunction Protected () {\n return (\n <Icon\n name=\"shield\"\n title=\"Branch is protected -- cannot commit changes\"\n />\n )\n}\n\nexport function GithHubExpandedPicker ({ state, actions, choices, selections }) {\n const { repositories, repositoryChoices, branchChoices, keyboardChoices } = choices\n const { selectedRepoChoice, selectedBranchChoice, selectedKeyboardChoice } = selections\n const { branches, keyboards, loading } = state\n\n function handleSelectRepo ({ id, type }) {\n if (type === 'installation') {\n github.manageInstallationRepos(id)\n return\n }\n\n const repository = find(repositories, { id })\n actions.selectedRepository({ repository })\n }\n\n return (\n <>\n <Select\n label=\"Repository\"\n value={selectedRepoChoice}\n options={repositoryChoices}\n onChange={handleSelectRepo}\n getValue={option => option.id}\n getOptionValue={option => option.id}\n getOptionLabel={option => option.full || option.name}\n formatOptionLabel={(option, { context }) => (\n <>{context === 'value' ? option.name : option.full || option.name}</>\n )}\n />\n\n {branches.length > 1 && (\n <Select\n label=\"Branch\"\n value={selectedBranchChoice}\n options={branchChoices}\n onChange={({ id }) => actions.selectedBranch({ name: id })}\n getOptionValue={option => option.id}\n getOptionLabel={option => option.name}\n formatOptionLabel={option => (\n <>\n {option.protected && <Protected />} {option.name}\n </>\n )}\n />\n )}\n\n {keyboards.length > 1 && (\n <Select\n label=\"Keyboard\"\n value={selectedKeyboardChoice}\n options={keyboardChoices}\n getOptionValue={option => option.id}\n getOptionLabel={option => option.name}\n onChange={({ id }) => actions.selectedKeyboard({ name: id })}\n />\n )}\n\n {loading && (\n <Control>\n <Spinner />\n </Control>\n )}\n </>\n )\n}\n","import Icon from '../../Common/Icon'\nimport Spinner from '../../Common/Spinner'\nimport { Control } from '../Controls'\n\nimport styles from './styles.module.css'\n\nexport function GitHubCompactPicker ({ choices, selections, state, onExpand }) {\n const { keyboardChoices } = choices\n const { selectedRepoChoice } = selections\n const { selectedBranchName, selectedKeyboard, loading } = state\n\n return (\n <div onClick={onExpand}>\n <div className={styles.compactWrapper}>\n <Control id=\"compact-github-picker\" style={{\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n lineHeight: 'normal'\n }}>\n <span>{selectedRepoChoice.name}</span>\n <span style={{ marginLeft: '10px', fontSize: '65%' }}>\n <Icon name=\"code-branch\" />{selectedBranchName}\n </span>\n </Control>\n <Control style={{ }}>\n / {loading ? <Spinner /> : (selectedKeyboard || keyboardChoices[0]?.name)}\n </Control>\n </div>\n </div>\n )\n}\n","import find from 'lodash/find'\nimport { useEffect, useMemo } from 'react'\n\nimport github from './api'\n\n// TODO: most of this should probably just be turned into thunks in the reducer\n\nexport function useRepositoryOptions (state, actions) {\n const {\n branches,\n keyboards,\n selectedRepoId,\n selectedBranchName,\n selectedKeyboard\n } = state\n\n const repositories = (github.repositories || []).map(repo => ({\n id: repo.id,\n name: repo.name,\n full: repo.full_name\n }))\n\n const extras = (github.installations || []).map(installation => ({\n id: installation.id,\n type: 'installation',\n name: `[Manage available repos for ${installation.account.login}...]`\n }))\n\n const repositoryChoices = useMemo(() => [...repositories, ...extras], [repositories, extras])\n const branchChoices = useMemo(() => branches.map(branch => ({ id: branch.name, name: branch.name, protected: branch.protected })), [branches])\n const keyboardChoices = useMemo(() => keyboards.map(keyboard => ({ id: keyboard, name: keyboard })), [keyboards])\n\n const selectedRepoChoice = useMemo(() => find(repositories, { id: selectedRepoId }), [repositories, selectedRepoId])\n const selectedBranchChoice = useMemo(() => find(branchChoices, { id: selectedBranchName }), [branchChoices, selectedBranchName])\n const selectedKeyboardChoice = useMemo(() => find(keyboardChoices, { id: selectedKeyboard }), [keyboardChoices, selectedKeyboard])\n\n useEffect(() => {\n if (!selectedRepoId) {\n return\n }\n\n (async function () {\n actions.loadingBranchesList()\n\n const repository = find(github.repositories, { id: selectedRepoId })\n const branches = await github.fetchRepoBranches(repository)\n\n actions.loadedBranchesList({ branches })\n })()\n }, [selectedRepoId, actions])\n\n useEffect(() => {\n if (!selectedRepoId || !selectedBranchName) {\n return\n }\n\n (async function () {\n actions.loadingKeyboardsList()\n\n const repository = find(github.repositories, { id: selectedRepoId })\n const keyboardsList = await github.fetchBranchKeyboards(repository, selectedBranchName)\n\n actions.loadedKeyboardsList(keyboardsList)\n })()\n }, [selectedRepoId, selectedBranchName, actions])\n\n return [\n { repositories, repositoryChoices, branchChoices, keyboardChoices },\n { selectedRepoChoice, selectedBranchChoice, selectedKeyboardChoice }\n ]\n}\n","import find from 'lodash/find'\nimport isMatch from 'lodash/isMatch'\nimport { useCallback, useEffect } from 'react'\nimport PropTypes from 'prop-types'\n\nimport github from './api'\nimport ValidationErrors from './ValidationErrors'\nimport { usePickerStore } from './store'\n\nimport { Button } from '../Controls'\nimport SuggestRemoteRepo from '../../Dialogs/SuggestRemoteRepo'\nimport SuggestRepoSelection from '../../Dialogs/SuggestRepoSelection'\nimport SuggestWrongRepo from '../../Dialogs/SuggestWrongRepo'\nimport LayoutGenerationError from '../../Dialogs/LayoutGenerationError'\nimport Blocked from '../../Dialogs/Blocked'\nimport MissingLayout from '../../Dialogs/MissingLayout'\n\nimport Login from './Dialogs/Login'\nimport Install from './Dialogs/Install'\nimport Icon from '../../Common/Icon'\nimport MissingKeymaps from '../../Dialogs/MissingKeymaps'\nimport { GithHubExpandedPicker } from './GitHubExpandedPicker'\nimport { GitHubCompactPicker } from './GitHubCompactPicker'\n\nimport { useRepositoryOptions } from './repository-options'\nimport { Actions } from './Actions'\n\nconst isMissingConfig = err => isMatch(err, { name: 'MissingRepoFile', path: 'config' })\nconst isMissingKeymaps = err => isMatch(err, { name: 'MissingRepoFile', intent: 'directory-structure' })\nconst isMissingLayout = err => (\n isMatch(err, { name: 'MissingRepoFile', path: 'config/info.json' }) ||\n isMatch(err, { name: 'MissingRepoFile', intent: 'metadata' })\n)\nconst isMissingBoard = err => (\n err?.name === 'MissingRepoFile' &&\n err?.path.match(/config\\/boards\\/[^/]+\\/[^/]+\\/[^/]+?\\..*$/)\n)\n\nfunction GithubPicker (props) {\n const [state, actions] = usePickerStore()\n const [choices, selections] = useRepositoryOptions(state, actions)\n\n const { initialized, selectedRepoId, selectedBranchName } = state\n const { selectedKeyboard } = state\n const { loading } = state\n\n const { expanded, onSelect, onExpand, onError } = props\n\n useEffect(() => {\n const login = () => github.beginLoginFlow()\n const blocked = () => { actions.clearSelection(); onError({ dialog: Blocked }) }\n const layoutGenerationError = () => { actions.clearSelection(); onError({ dialog: LayoutGenerationError }) }\n const repoValidation = error => {\n let dialog = ValidationErrors\n if (isMissingConfig(error)) dialog = SuggestWrongRepo\n if (isMissingBoard(error)) dialog = SuggestRemoteRepo\n if (isMissingLayout(error)) dialog = MissingLayout\n if (isMissingKeymaps(error)) dialog = MissingKeymaps\n\n actions.clearSelection()\n onError({\n dialog,\n dialogProps: {\n title: error.name,\n errors: error.errors\n }\n })\n }\n\n github.init().then(actions.integrationInitialized)\n github.on('authentication-failed', login)\n github.on('blocked', blocked)\n github.on('repo-validation-error', repoValidation)\n github.on('layout-generation-failed', layoutGenerationError)\n\n return () => {\n github.off('authentication-failed', login)\n github.off('blocked', blocked)\n github.off('repo-validation-error', repoValidation)\n github.off('layout-generation-failed', layoutGenerationError)\n }\n }, [actions, onError])\n\n const loadKeyboard = useCallback(async function (repoId, branch, keyboard) {\n const available = github.repositories\n const repository = find(available, { id: repoId })?.full_name\n const isProtected = find(choices.branchChoices, { id: branch })?.protected\n\n actions.keyboardLoading()\n\n const response = await github.fetchLayoutAndKeymap(repository, branch, {\n keyboard\n })\n\n actions.keyboardLoadedSuccess({ response })\n\n onSelect({ github: { repository, branch, keyboard, isProtected }, ...response })\n }, [actions, choices.branchChoices, onSelect])\n\n const reloadKeyboard = useCallback(() => (\n loadKeyboard(selectedRepoId, selectedBranchName, selectedKeyboard)\n ), [loadKeyboard, selectedRepoId, selectedBranchName, selectedKeyboard])\n\n useEffect(() => {\n if (!selectedRepoId || !selectedBranchName) {\n return\n }\n\n loadKeyboard(selectedRepoId, selectedBranchName, selectedKeyboard)\n }, [selectedRepoId, selectedBranchName, selectedKeyboard, loadKeyboard])\n\n if (!initialized) return null\n if (state.blocked) return <Blocked />\n if (!github.isGitHubAuthorized()) return <Login />\n if (github.isAppSuspendedForRepoSelection()) {\n return <SuggestRepoSelection installation={github.installations[0]} />\n }\n if (!github.isAppInstalled()) return <Install />\n\n return (\n <>\n {expanded\n ? <GithHubExpandedPicker state={state} actions={actions} choices={choices} selections={selections} />\n : <GitHubCompactPicker onExpand={onExpand} state={state} actions={actions} choices={choices} selections={selections} />}\n {selectedBranchName && !loading && (\n <>\n <Button onClick={reloadKeyboard}>\n <Icon name=\"sync\" />\n </Button>\n <Actions />\n </>\n )}\n </>\n )\n}\n\nGithubPicker.propTypes = {\n expanded: PropTypes.bool.isRequired,\n onExpand: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n onSelect: PropTypes.func.isRequired\n}\n\nexport default GithubPicker\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData');\n\n/**\n * Performs a partial deep comparison between `object` and `source` to\n * determine if `object` contains equivalent property values.\n *\n * **Note:** This method is equivalent to `_.matches` when `source` is\n * partially applied.\n *\n * Partial comparisons will match empty array and empty object `source`\n * values against any array or object value, respectively. See `_.isEqual`\n * for a list of supported value comparisons.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n *\n * _.isMatch(object, { 'b': 2 });\n * // => true\n *\n * _.isMatch(object, { 'b': 1 });\n * // => false\n */\nfunction isMatch(object, source) {\n return object === source || baseIsMatch(object, source, getMatchData(source));\n}\n\nmodule.exports = isMatch;\n"],"names":["LayoutGenerationError","props","onDismiss","GitHubIssuesLink","propTypes","PropTypes","listStyle","maxHeight","overflow","padding","fontFamily","fontSize","backgroundColor","listItemStyle","margin","ValidationErrors","title","errors","file","fileFromTitle","Modal","DialogBox","style","map","error","i","REPOSITORY","BRANCH","KEYBOARD","getPersistedKeyboard","repoId","branch","JSON","parse","localStorage","getItem","INITIAL_STATE","blocked","initialized","selectedRepoId","selectedBranchName","selectedKeyboard","branches","keyboards","loading","warningFlags","pickerSlice","createSlice","name","initialState","reducers","clearSelection","state","integrationInitialized","persistedRepoId","storage","repositories","github","find","id","length","loadingBranchesList","loadedBranchesList","action","payload","repository","keyboard","available","defaultBranch","default_branch","previousBranch","includes","loadingKeyboardsList","loadedKeyboardsList","defaultKeyboard","default","previousKeyboard","selectedRepository","setItem","stringify","selectedBranch","keyboardLoading","keyboardLoadedSuccess","keymap","response","usePickerStore","dispatch","useReducer","reducer","dispatchers","useMemo","Object","keys","actions","reduce","SuggestRemoteRepo","missingPath","SuggestRepoSelection","installation","url","maxWidth","dismissText","Link","href","display","gap","textAlign","alt","src","IconButton","collection","icon","text","onClick","window","location","isRequired","SuggestWrongRepo","GeneralHelpOfferCopy","otherRepoOrBranchAvailable","MissingLayout","KeymapLayoutResources","Login","centerOnly","width","Install","greeting","MissingKeymaps","Protected","Icon","GithHubExpandedPicker","choices","selections","repositoryChoices","branchChoices","keyboardChoices","selectedRepoChoice","selectedBranchChoice","selectedKeyboardChoice","label","value","options","onChange","type","getValue","option","getOptionValue","getOptionLabel","full","formatOptionLabel","context","protected","Spinner","GitHubCompactPicker","onExpand","className","styles","flexDirection","justifyContent","lineHeight","marginLeft","isMissingConfig","err","isMatch","path","isMissingKeymaps","intent","isMissingLayout","isMissingBoard","match","GithubPicker","repo","full_name","extras","account","login","useEffect","keyboardsList","useRepositoryOptions","expanded","onSelect","onError","dialog","Blocked","layoutGenerationError","repoValidation","dialogProps","then","loadKeyboard","useCallback","isProtected","reloadKeyboard","Actions","baseIsMatch","getMatchData","module","exports","object","source"],"sourceRoot":""}
|