{"version":3,"file":"KitSearch-5ro5napg.js","sources":["../../../../node_modules/remove-accents/index.js","../../../../node_modules/match-sorter/dist/match-sorter.esm.js","../../../app/javascript/components/KitSearch.tsx"],"sourcesContent":["var characterMap = {\n\t\"À\": \"A\",\n\t\"Á\": \"A\",\n\t\"Â\": \"A\",\n\t\"Ã\": \"A\",\n\t\"Ä\": \"A\",\n\t\"Å\": \"A\",\n\t\"Ấ\": \"A\",\n\t\"Ắ\": \"A\",\n\t\"Ẳ\": \"A\",\n\t\"Ẵ\": \"A\",\n\t\"Ặ\": \"A\",\n\t\"Æ\": \"AE\",\n\t\"Ầ\": \"A\",\n\t\"Ằ\": \"A\",\n\t\"Ȃ\": \"A\",\n\t\"Ả\": \"A\",\n\t\"Ạ\": \"A\",\n\t\"Ẩ\": \"A\",\n\t\"Ẫ\": \"A\",\n\t\"Ậ\": \"A\",\n\t\"Ç\": \"C\",\n\t\"Ḉ\": \"C\",\n\t\"È\": \"E\",\n\t\"É\": \"E\",\n\t\"Ê\": \"E\",\n\t\"Ë\": \"E\",\n\t\"Ế\": \"E\",\n\t\"Ḗ\": \"E\",\n\t\"Ề\": \"E\",\n\t\"Ḕ\": \"E\",\n\t\"Ḝ\": \"E\",\n\t\"Ȇ\": \"E\",\n\t\"Ẻ\": \"E\",\n\t\"Ẽ\": \"E\",\n\t\"Ẹ\": \"E\",\n\t\"Ể\": \"E\",\n\t\"Ễ\": \"E\",\n\t\"Ệ\": \"E\",\n\t\"Ì\": \"I\",\n\t\"Í\": \"I\",\n\t\"Î\": \"I\",\n\t\"Ï\": \"I\",\n\t\"Ḯ\": \"I\",\n\t\"Ȋ\": \"I\",\n\t\"Ỉ\": \"I\",\n\t\"Ị\": \"I\",\n\t\"Ð\": \"D\",\n\t\"Ñ\": \"N\",\n\t\"Ò\": \"O\",\n\t\"Ó\": \"O\",\n\t\"Ô\": \"O\",\n\t\"Õ\": \"O\",\n\t\"Ö\": \"O\",\n\t\"Ø\": \"O\",\n\t\"Ố\": \"O\",\n\t\"Ṍ\": \"O\",\n\t\"Ṓ\": \"O\",\n\t\"Ȏ\": \"O\",\n\t\"Ỏ\": \"O\",\n\t\"Ọ\": \"O\",\n\t\"Ổ\": \"O\",\n\t\"Ỗ\": \"O\",\n\t\"Ộ\": \"O\",\n\t\"Ờ\": \"O\",\n\t\"Ở\": \"O\",\n\t\"Ỡ\": \"O\",\n\t\"Ớ\": \"O\",\n\t\"Ợ\": \"O\",\n\t\"Ù\": \"U\",\n\t\"Ú\": \"U\",\n\t\"Û\": \"U\",\n\t\"Ü\": \"U\",\n\t\"Ủ\": \"U\",\n\t\"Ụ\": \"U\",\n\t\"Ử\": \"U\",\n\t\"Ữ\": \"U\",\n\t\"Ự\": \"U\",\n\t\"Ý\": \"Y\",\n\t\"à\": \"a\",\n\t\"á\": \"a\",\n\t\"â\": \"a\",\n\t\"ã\": \"a\",\n\t\"ä\": \"a\",\n\t\"å\": \"a\",\n\t\"ấ\": \"a\",\n\t\"ắ\": \"a\",\n\t\"ẳ\": \"a\",\n\t\"ẵ\": \"a\",\n\t\"ặ\": \"a\",\n\t\"æ\": \"ae\",\n\t\"ầ\": \"a\",\n\t\"ằ\": \"a\",\n\t\"ȃ\": \"a\",\n\t\"ả\": \"a\",\n\t\"ạ\": \"a\",\n\t\"ẩ\": \"a\",\n\t\"ẫ\": \"a\",\n\t\"ậ\": \"a\",\n\t\"ç\": \"c\",\n\t\"ḉ\": \"c\",\n\t\"è\": \"e\",\n\t\"é\": \"e\",\n\t\"ê\": \"e\",\n\t\"ë\": \"e\",\n\t\"ế\": \"e\",\n\t\"ḗ\": \"e\",\n\t\"ề\": \"e\",\n\t\"ḕ\": \"e\",\n\t\"ḝ\": \"e\",\n\t\"ȇ\": \"e\",\n\t\"ẻ\": \"e\",\n\t\"ẽ\": \"e\",\n\t\"ẹ\": \"e\",\n\t\"ể\": \"e\",\n\t\"ễ\": \"e\",\n\t\"ệ\": \"e\",\n\t\"ì\": \"i\",\n\t\"í\": \"i\",\n\t\"î\": \"i\",\n\t\"ï\": \"i\",\n\t\"ḯ\": \"i\",\n\t\"ȋ\": \"i\",\n\t\"ỉ\": \"i\",\n\t\"ị\": \"i\",\n\t\"ð\": \"d\",\n\t\"ñ\": \"n\",\n\t\"ò\": \"o\",\n\t\"ó\": \"o\",\n\t\"ô\": \"o\",\n\t\"õ\": \"o\",\n\t\"ö\": \"o\",\n\t\"ø\": \"o\",\n\t\"ố\": \"o\",\n\t\"ṍ\": \"o\",\n\t\"ṓ\": \"o\",\n\t\"ȏ\": \"o\",\n\t\"ỏ\": \"o\",\n\t\"ọ\": \"o\",\n\t\"ổ\": \"o\",\n\t\"ỗ\": \"o\",\n\t\"ộ\": \"o\",\n\t\"ờ\": \"o\",\n\t\"ở\": \"o\",\n\t\"ỡ\": \"o\",\n\t\"ớ\": \"o\",\n\t\"ợ\": \"o\",\n\t\"ù\": \"u\",\n\t\"ú\": \"u\",\n\t\"û\": \"u\",\n\t\"ü\": \"u\",\n\t\"ủ\": \"u\",\n\t\"ụ\": \"u\",\n\t\"ử\": \"u\",\n\t\"ữ\": \"u\",\n\t\"ự\": \"u\",\n\t\"ý\": \"y\",\n\t\"ÿ\": \"y\",\n\t\"Ā\": \"A\",\n\t\"ā\": \"a\",\n\t\"Ă\": \"A\",\n\t\"ă\": \"a\",\n\t\"Ą\": \"A\",\n\t\"ą\": \"a\",\n\t\"Ć\": \"C\",\n\t\"ć\": \"c\",\n\t\"Ĉ\": \"C\",\n\t\"ĉ\": \"c\",\n\t\"Ċ\": \"C\",\n\t\"ċ\": \"c\",\n\t\"Č\": \"C\",\n\t\"č\": \"c\",\n\t\"C̆\": \"C\",\n\t\"c̆\": \"c\",\n\t\"Ď\": \"D\",\n\t\"ď\": \"d\",\n\t\"Đ\": \"D\",\n\t\"đ\": \"d\",\n\t\"Ē\": \"E\",\n\t\"ē\": \"e\",\n\t\"Ĕ\": \"E\",\n\t\"ĕ\": \"e\",\n\t\"Ė\": \"E\",\n\t\"ė\": \"e\",\n\t\"Ę\": \"E\",\n\t\"ę\": \"e\",\n\t\"Ě\": \"E\",\n\t\"ě\": \"e\",\n\t\"Ĝ\": \"G\",\n\t\"Ǵ\": \"G\",\n\t\"ĝ\": \"g\",\n\t\"ǵ\": \"g\",\n\t\"Ğ\": \"G\",\n\t\"ğ\": \"g\",\n\t\"Ġ\": \"G\",\n\t\"ġ\": \"g\",\n\t\"Ģ\": \"G\",\n\t\"ģ\": \"g\",\n\t\"Ĥ\": \"H\",\n\t\"ĥ\": \"h\",\n\t\"Ħ\": \"H\",\n\t\"ħ\": \"h\",\n\t\"Ḫ\": \"H\",\n\t\"ḫ\": \"h\",\n\t\"Ĩ\": \"I\",\n\t\"ĩ\": \"i\",\n\t\"Ī\": \"I\",\n\t\"ī\": \"i\",\n\t\"Ĭ\": \"I\",\n\t\"ĭ\": \"i\",\n\t\"Į\": \"I\",\n\t\"į\": \"i\",\n\t\"İ\": \"I\",\n\t\"ı\": \"i\",\n\t\"IJ\": \"IJ\",\n\t\"ij\": \"ij\",\n\t\"Ĵ\": \"J\",\n\t\"ĵ\": \"j\",\n\t\"Ķ\": \"K\",\n\t\"ķ\": \"k\",\n\t\"Ḱ\": \"K\",\n\t\"ḱ\": \"k\",\n\t\"K̆\": \"K\",\n\t\"k̆\": \"k\",\n\t\"Ĺ\": \"L\",\n\t\"ĺ\": \"l\",\n\t\"Ļ\": \"L\",\n\t\"ļ\": \"l\",\n\t\"Ľ\": \"L\",\n\t\"ľ\": \"l\",\n\t\"Ŀ\": \"L\",\n\t\"ŀ\": \"l\",\n\t\"Ł\": \"l\",\n\t\"ł\": \"l\",\n\t\"Ḿ\": \"M\",\n\t\"ḿ\": \"m\",\n\t\"M̆\": \"M\",\n\t\"m̆\": \"m\",\n\t\"Ń\": \"N\",\n\t\"ń\": \"n\",\n\t\"Ņ\": \"N\",\n\t\"ņ\": \"n\",\n\t\"Ň\": \"N\",\n\t\"ň\": \"n\",\n\t\"ʼn\": \"n\",\n\t\"N̆\": \"N\",\n\t\"n̆\": \"n\",\n\t\"Ō\": \"O\",\n\t\"ō\": \"o\",\n\t\"Ŏ\": \"O\",\n\t\"ŏ\": \"o\",\n\t\"Ő\": \"O\",\n\t\"ő\": \"o\",\n\t\"Œ\": \"OE\",\n\t\"œ\": \"oe\",\n\t\"P̆\": \"P\",\n\t\"p̆\": \"p\",\n\t\"Ŕ\": \"R\",\n\t\"ŕ\": \"r\",\n\t\"Ŗ\": \"R\",\n\t\"ŗ\": \"r\",\n\t\"Ř\": \"R\",\n\t\"ř\": \"r\",\n\t\"R̆\": \"R\",\n\t\"r̆\": \"r\",\n\t\"Ȓ\": \"R\",\n\t\"ȓ\": \"r\",\n\t\"Ś\": \"S\",\n\t\"ś\": \"s\",\n\t\"Ŝ\": \"S\",\n\t\"ŝ\": \"s\",\n\t\"Ş\": \"S\",\n\t\"Ș\": \"S\",\n\t\"ș\": \"s\",\n\t\"ş\": \"s\",\n\t\"Š\": \"S\",\n\t\"š\": \"s\",\n\t\"Ţ\": \"T\",\n\t\"ţ\": \"t\",\n\t\"ț\": \"t\",\n\t\"Ț\": \"T\",\n\t\"Ť\": \"T\",\n\t\"ť\": \"t\",\n\t\"Ŧ\": \"T\",\n\t\"ŧ\": \"t\",\n\t\"T̆\": \"T\",\n\t\"t̆\": \"t\",\n\t\"Ũ\": \"U\",\n\t\"ũ\": \"u\",\n\t\"Ū\": \"U\",\n\t\"ū\": \"u\",\n\t\"Ŭ\": \"U\",\n\t\"ŭ\": \"u\",\n\t\"Ů\": \"U\",\n\t\"ů\": \"u\",\n\t\"Ű\": \"U\",\n\t\"ű\": \"u\",\n\t\"Ų\": \"U\",\n\t\"ų\": \"u\",\n\t\"Ȗ\": \"U\",\n\t\"ȗ\": \"u\",\n\t\"V̆\": \"V\",\n\t\"v̆\": \"v\",\n\t\"Ŵ\": \"W\",\n\t\"ŵ\": \"w\",\n\t\"Ẃ\": \"W\",\n\t\"ẃ\": \"w\",\n\t\"X̆\": \"X\",\n\t\"x̆\": \"x\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"i̋\": \"i\",\n\t\"Ǹ\": \"N\",\n\t\"ǹ\": \"n\",\n\t\"Ồ\": \"O\",\n\t\"ồ\": \"o\",\n\t\"Ṑ\": \"O\",\n\t\"ṑ\": \"o\",\n\t\"Ừ\": \"U\",\n\t\"ừ\": \"u\",\n\t\"Ẁ\": \"W\",\n\t\"ẁ\": \"w\",\n\t\"Ỳ\": \"Y\",\n\t\"ỳ\": \"y\",\n\t\"Ȁ\": \"A\",\n\t\"ȁ\": \"a\",\n\t\"Ȅ\": \"E\",\n\t\"ȅ\": \"e\",\n\t\"Ȉ\": \"I\",\n\t\"ȉ\": \"i\",\n\t\"Ȍ\": \"O\",\n\t\"ȍ\": \"o\",\n\t\"Ȑ\": \"R\",\n\t\"ȑ\": \"r\",\n\t\"Ȕ\": \"U\",\n\t\"ȕ\": \"u\",\n\t\"B̌\": \"B\",\n\t\"b̌\": \"b\",\n\t\"Č̣\": \"C\",\n\t\"č̣\": \"c\",\n\t\"Ê̌\": \"E\",\n\t\"ê̌\": \"e\",\n\t\"F̌\": \"F\",\n\t\"f̌\": \"f\",\n\t\"Ǧ\": \"G\",\n\t\"ǧ\": \"g\",\n\t\"Ȟ\": \"H\",\n\t\"ȟ\": \"h\",\n\t\"J̌\": \"J\",\n\t\"ǰ\": \"j\",\n\t\"Ǩ\": \"K\",\n\t\"ǩ\": \"k\",\n\t\"M̌\": \"M\",\n\t\"m̌\": \"m\",\n\t\"P̌\": \"P\",\n\t\"p̌\": \"p\",\n\t\"Q̌\": \"Q\",\n\t\"q̌\": \"q\",\n\t\"Ř̩\": \"R\",\n\t\"ř̩\": \"r\",\n\t\"Ṧ\": \"S\",\n\t\"ṧ\": \"s\",\n\t\"V̌\": \"V\",\n\t\"v̌\": \"v\",\n\t\"W̌\": \"W\",\n\t\"w̌\": \"w\",\n\t\"X̌\": \"X\",\n\t\"x̌\": \"x\",\n\t\"Y̌\": \"Y\",\n\t\"y̌\": \"y\",\n\t\"A̧\": \"A\",\n\t\"a̧\": \"a\",\n\t\"B̧\": \"B\",\n\t\"b̧\": \"b\",\n\t\"Ḑ\": \"D\",\n\t\"ḑ\": \"d\",\n\t\"Ȩ\": \"E\",\n\t\"ȩ\": \"e\",\n\t\"Ɛ̧\": \"E\",\n\t\"ɛ̧\": \"e\",\n\t\"Ḩ\": \"H\",\n\t\"ḩ\": \"h\",\n\t\"I̧\": \"I\",\n\t\"i̧\": \"i\",\n\t\"Ɨ̧\": \"I\",\n\t\"ɨ̧\": \"i\",\n\t\"M̧\": \"M\",\n\t\"m̧\": \"m\",\n\t\"O̧\": \"O\",\n\t\"o̧\": \"o\",\n\t\"Q̧\": \"Q\",\n\t\"q̧\": \"q\",\n\t\"U̧\": \"U\",\n\t\"u̧\": \"u\",\n\t\"X̧\": \"X\",\n\t\"x̧\": \"x\",\n\t\"Z̧\": \"Z\",\n\t\"z̧\": \"z\",\n\t\"й\":\"и\",\n\t\"Й\":\"И\",\n\t\"ё\":\"е\",\n\t\"Ё\":\"Е\",\n};\n\nvar chars = Object.keys(characterMap).join('|');\nvar allAccents = new RegExp(chars, 'g');\nvar firstAccent = new RegExp(chars, '');\n\nfunction matcher(match) {\n\treturn characterMap[match];\n}\n\nvar removeAccents = function(string) {\n\treturn string.replace(allAccents, matcher);\n};\n\nvar hasAccents = function(string) {\n\treturn !!string.match(firstAccent);\n};\n\nmodule.exports = removeAccents;\nmodule.exports.has = hasAccents;\nmodule.exports.remove = removeAccents;\n","import removeAccents from 'remove-accents';\n\n/**\n * @name match-sorter\n * @license MIT license.\n * @copyright (c) 2020 Kent C. Dodds\n * @author Kent C. Dodds (https://kentcdodds.com)\n */\nconst rankings = {\n CASE_SENSITIVE_EQUAL: 7,\n EQUAL: 6,\n STARTS_WITH: 5,\n WORD_STARTS_WITH: 4,\n CONTAINS: 3,\n ACRONYM: 2,\n MATCHES: 1,\n NO_MATCH: 0\n};\nconst defaultBaseSortFn = (a, b) => String(a.rankedValue).localeCompare(String(b.rankedValue));\n\n/**\n * Takes an array of items and a value and returns a new array with the items that match the given value\n * @param {Array} items - the items to sort\n * @param {String} value - the value to use for ranking\n * @param {Object} options - Some options to configure the sorter\n * @return {Array} - the new sorted array\n */\nfunction matchSorter(items, value, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n keys,\n threshold = rankings.MATCHES,\n baseSort = defaultBaseSortFn,\n sorter = matchedItems => matchedItems.sort((a, b) => sortRankedValues(a, b, baseSort))\n } = options;\n const matchedItems = items.reduce(reduceItemsToRanked, []);\n return sorter(matchedItems).map(_ref => {\n let {\n item\n } = _ref;\n return item;\n });\n function reduceItemsToRanked(matches, item, index) {\n const rankingInfo = getHighestRanking(item, keys, value, options);\n const {\n rank,\n keyThreshold = threshold\n } = rankingInfo;\n if (rank >= keyThreshold) {\n matches.push({\n ...rankingInfo,\n item,\n index\n });\n }\n return matches;\n }\n}\nmatchSorter.rankings = rankings;\n\n/**\n * Gets the highest ranking for value for the given item based on its values for the given keys\n * @param {*} item - the item to rank\n * @param {Array} keys - the keys to get values from the item for the ranking\n * @param {String} value - the value to rank against\n * @param {Object} options - options to control the ranking\n * @return {{rank: Number, keyIndex: Number, keyThreshold: Number}} - the highest ranking\n */\nfunction getHighestRanking(item, keys, value, options) {\n if (!keys) {\n // if keys is not specified, then we assume the item given is ready to be matched\n const stringItem = item;\n return {\n // ends up being duplicate of 'item' in matches but consistent\n rankedValue: stringItem,\n rank: getMatchRanking(stringItem, value, options),\n keyIndex: -1,\n keyThreshold: options.threshold\n };\n }\n const valuesToRank = getAllValuesToRank(item, keys);\n return valuesToRank.reduce((_ref2, _ref3, i) => {\n let {\n rank,\n rankedValue,\n keyIndex,\n keyThreshold\n } = _ref2;\n let {\n itemValue,\n attributes\n } = _ref3;\n let newRank = getMatchRanking(itemValue, value, options);\n let newRankedValue = rankedValue;\n const {\n minRanking,\n maxRanking,\n threshold\n } = attributes;\n if (newRank < minRanking && newRank >= rankings.MATCHES) {\n newRank = minRanking;\n } else if (newRank > maxRanking) {\n newRank = maxRanking;\n }\n if (newRank > rank) {\n rank = newRank;\n keyIndex = i;\n keyThreshold = threshold;\n newRankedValue = itemValue;\n }\n return {\n rankedValue: newRankedValue,\n rank,\n keyIndex,\n keyThreshold\n };\n }, {\n rankedValue: item,\n rank: rankings.NO_MATCH,\n keyIndex: -1,\n keyThreshold: options.threshold\n });\n}\n\n/**\n * Gives a rankings score based on how well the two strings match.\n * @param {String} testString - the string to test against\n * @param {String} stringToRank - the string to rank\n * @param {Object} options - options for the match (like keepDiacritics for comparison)\n * @returns {Number} the ranking for how well stringToRank matches testString\n */\nfunction getMatchRanking(testString, stringToRank, options) {\n testString = prepareValueForComparison(testString, options);\n stringToRank = prepareValueForComparison(stringToRank, options);\n\n // too long\n if (stringToRank.length > testString.length) {\n return rankings.NO_MATCH;\n }\n\n // case sensitive equals\n if (testString === stringToRank) {\n return rankings.CASE_SENSITIVE_EQUAL;\n }\n\n // Lower casing before further comparison\n testString = testString.toLowerCase();\n stringToRank = stringToRank.toLowerCase();\n\n // case insensitive equals\n if (testString === stringToRank) {\n return rankings.EQUAL;\n }\n\n // starts with\n if (testString.startsWith(stringToRank)) {\n return rankings.STARTS_WITH;\n }\n\n // word starts with\n if (testString.includes(` ${stringToRank}`)) {\n return rankings.WORD_STARTS_WITH;\n }\n\n // contains\n if (testString.includes(stringToRank)) {\n return rankings.CONTAINS;\n } else if (stringToRank.length === 1) {\n // If the only character in the given stringToRank\n // isn't even contained in the testString, then\n // it's definitely not a match.\n return rankings.NO_MATCH;\n }\n\n // acronym\n if (getAcronym(testString).includes(stringToRank)) {\n return rankings.ACRONYM;\n }\n\n // will return a number between rankings.MATCHES and\n // rankings.MATCHES + 1 depending on how close of a match it is.\n return getClosenessRanking(testString, stringToRank);\n}\n\n/**\n * Generates an acronym for a string.\n *\n * @param {String} string the string for which to produce the acronym\n * @returns {String} the acronym\n */\nfunction getAcronym(string) {\n let acronym = '';\n const wordsInString = string.split(' ');\n wordsInString.forEach(wordInString => {\n const splitByHyphenWords = wordInString.split('-');\n splitByHyphenWords.forEach(splitByHyphenWord => {\n acronym += splitByHyphenWord.substr(0, 1);\n });\n });\n return acronym;\n}\n\n/**\n * Returns a score based on how spread apart the\n * characters from the stringToRank are within the testString.\n * A number close to rankings.MATCHES represents a loose match. A number close\n * to rankings.MATCHES + 1 represents a tighter match.\n * @param {String} testString - the string to test against\n * @param {String} stringToRank - the string to rank\n * @returns {Number} the number between rankings.MATCHES and\n * rankings.MATCHES + 1 for how well stringToRank matches testString\n */\nfunction getClosenessRanking(testString, stringToRank) {\n let matchingInOrderCharCount = 0;\n let charNumber = 0;\n function findMatchingCharacter(matchChar, string, index) {\n for (let j = index, J = string.length; j < J; j++) {\n const stringChar = string[j];\n if (stringChar === matchChar) {\n matchingInOrderCharCount += 1;\n return j + 1;\n }\n }\n return -1;\n }\n function getRanking(spread) {\n const spreadPercentage = 1 / spread;\n const inOrderPercentage = matchingInOrderCharCount / stringToRank.length;\n const ranking = rankings.MATCHES + inOrderPercentage * spreadPercentage;\n return ranking;\n }\n const firstIndex = findMatchingCharacter(stringToRank[0], testString, 0);\n if (firstIndex < 0) {\n return rankings.NO_MATCH;\n }\n charNumber = firstIndex;\n for (let i = 1, I = stringToRank.length; i < I; i++) {\n const matchChar = stringToRank[i];\n charNumber = findMatchingCharacter(matchChar, testString, charNumber);\n const found = charNumber > -1;\n if (!found) {\n return rankings.NO_MATCH;\n }\n }\n const spread = charNumber - firstIndex;\n return getRanking(spread);\n}\n\n/**\n * Sorts items that have a rank, index, and keyIndex\n * @param {Object} a - the first item to sort\n * @param {Object} b - the second item to sort\n * @return {Number} -1 if a should come first, 1 if b should come first, 0 if equal\n */\nfunction sortRankedValues(a, b, baseSort) {\n const aFirst = -1;\n const bFirst = 1;\n const {\n rank: aRank,\n keyIndex: aKeyIndex\n } = a;\n const {\n rank: bRank,\n keyIndex: bKeyIndex\n } = b;\n const same = aRank === bRank;\n if (same) {\n if (aKeyIndex === bKeyIndex) {\n // use the base sort function as a tie-breaker\n return baseSort(a, b);\n } else {\n return aKeyIndex < bKeyIndex ? aFirst : bFirst;\n }\n } else {\n return aRank > bRank ? aFirst : bFirst;\n }\n}\n\n/**\n * Prepares value for comparison by stringifying it, removing diacritics (if specified)\n * @param {String} value - the value to clean\n * @param {Object} options - {keepDiacritics: whether to remove diacritics}\n * @return {String} the prepared value\n */\nfunction prepareValueForComparison(value, _ref4) {\n let {\n keepDiacritics\n } = _ref4;\n // value might not actually be a string at this point (we don't get to choose)\n // so part of preparing the value for comparison is ensure that it is a string\n value = `${value}`; // toString\n if (!keepDiacritics) {\n value = removeAccents(value);\n }\n return value;\n}\n\n/**\n * Gets value for key in item at arbitrarily nested keypath\n * @param {Object} item - the item\n * @param {Object|Function} key - the potentially nested keypath or property callback\n * @return {Array} - an array containing the value(s) at the nested keypath\n */\nfunction getItemValues(item, key) {\n if (typeof key === 'object') {\n key = key.key;\n }\n let value;\n if (typeof key === 'function') {\n value = key(item);\n } else if (item == null) {\n value = null;\n } else if (Object.hasOwnProperty.call(item, key)) {\n value = item[key];\n } else if (key.includes('.')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return getNestedValues(key, item);\n } else {\n value = null;\n }\n\n // because `value` can also be undefined\n if (value == null) {\n return [];\n }\n if (Array.isArray(value)) {\n return value;\n }\n return [String(value)];\n}\n\n/**\n * Given path: \"foo.bar.baz\"\n * And item: {foo: {bar: {baz: 'buzz'}}}\n * -> 'buzz'\n * @param path a dot-separated set of keys\n * @param item the item to get the value from\n */\nfunction getNestedValues(path, item) {\n const keys = path.split('.');\n let values = [item];\n for (let i = 0, I = keys.length; i < I; i++) {\n const nestedKey = keys[i];\n let nestedValues = [];\n for (let j = 0, J = values.length; j < J; j++) {\n const nestedItem = values[j];\n if (nestedItem == null) continue;\n if (Object.hasOwnProperty.call(nestedItem, nestedKey)) {\n const nestedValue = nestedItem[nestedKey];\n if (nestedValue != null) {\n nestedValues.push(nestedValue);\n }\n } else if (nestedKey === '*') {\n // ensure that values is an array\n nestedValues = nestedValues.concat(nestedItem);\n }\n }\n values = nestedValues;\n }\n if (Array.isArray(values[0])) {\n // keep allowing the implicit wildcard for an array of strings at the end of\n // the path; don't use `.flat()` because that's not available in node.js v10\n const result = [];\n return result.concat(...values);\n }\n // Based on our logic it should be an array of strings by now...\n // assuming the user's path terminated in strings\n return values;\n}\n\n/**\n * Gets all the values for the given keys in the given item and returns an array of those values\n * @param item - the item from which the values will be retrieved\n * @param keys - the keys to use to retrieve the values\n * @return objects with {itemValue, attributes}\n */\nfunction getAllValuesToRank(item, keys) {\n const allValues = [];\n for (let j = 0, J = keys.length; j < J; j++) {\n const key = keys[j];\n const attributes = getKeyAttributes(key);\n const itemValues = getItemValues(item, key);\n for (let i = 0, I = itemValues.length; i < I; i++) {\n allValues.push({\n itemValue: itemValues[i],\n attributes\n });\n }\n }\n return allValues;\n}\nconst defaultKeyAttributes = {\n maxRanking: Infinity,\n minRanking: -Infinity\n};\n/**\n * Gets all the attributes for the given key\n * @param key - the key from which the attributes will be retrieved\n * @return object containing the key's attributes\n */\nfunction getKeyAttributes(key) {\n if (typeof key === 'string') {\n return defaultKeyAttributes;\n }\n return {\n ...defaultKeyAttributes,\n ...key\n };\n}\n\n/*\neslint\n no-continue: \"off\",\n*/\n\nexport { defaultBaseSortFn, matchSorter, rankings };\n","import { useEffect, useState } from 'react'\nimport { Typeahead, Badge, Flex } from 'playbook-ui'\nimport { matchSorter } from 'match-sorter'\nimport { VisualGuidelinesItems } from './MainSidebar/MenuData/GuidelinesNavItems'\n\ntype Kit = {\n label: string,\n value: string,\n}\n\ntype KitSearchProps = {\n classname: string,\n kits: Kit[],\n id: string,\n}\n\ninterface VisualGuidelineItem {\n label: string,\n value: string,\n}\n\nconst combineKitsandVisualGuidelines = (\n kits: Kit[],\n VisualGuidelineItems: VisualGuidelineItem[]):\n (Kit | VisualGuidelineItem)[] => {\n return [...kits, ...VisualGuidelineItems].sort((a, b) => a.label.localeCompare(b.label))\n}\n\nconst KitSearch = ({ classname, id, kits }: KitSearchProps) => {\n const kitsAndGuidelines = combineKitsandVisualGuidelines(kits, VisualGuidelinesItems)\n\n const [filteredKits, setFilteredKits] = useState(kitsAndGuidelines)\n\n useEffect(() => {\n if (id === 'desktop-kit-search') {\n window.addEventListener('keydown', (e) => {\n if (e.ctrlKey && e.key === 'k') {\n const kitSearch = document.querySelector('#desktop-kit-search #react-select-2-input') as HTMLInputElement\n kitSearch === document.activeElement ? kitSearch.blur() : kitSearch.focus()\n }\n })\n }\n }, [ id ])\n\n const handleChange = (selection: any) => {\n if (selection) {\n window.location = selection.value\n }\n }\n\n const handleFilteredKits = (query: string) => {\n if (query) {\n const results = matchSorter(kitsAndGuidelines, query, { keys: ['label'] })\n setFilteredKits(results)\n } else {\n setFilteredKits(kitsAndGuidelines)\n }\n }\n\n const Item = ({ labelLeft }: { labelLeft: string }) => (\n \n {labelLeft}\n \n \n )\n\n return (\n
\n (\n value.includes(\"guidelines\") ? : <>{label}\n )}\n />\n
\n )\n}\n\nexport default KitSearch\n"],"names":["characterMap","chars","allAccents","firstAccent","matcher","match","removeAccents","string","hasAccents","removeAccentsModule","rankings","defaultBaseSortFn","a","b","matchSorter","items","value","options","keys","threshold","baseSort","sorter","matchedItems","sortRankedValues","reduceItemsToRanked","_ref","item","matches","index","rankingInfo","getHighestRanking","rank","keyThreshold","stringItem","getMatchRanking","getAllValuesToRank","_ref2","_ref3","i","rankedValue","keyIndex","itemValue","attributes","newRank","newRankedValue","minRanking","maxRanking","testString","stringToRank","prepareValueForComparison","getAcronym","getClosenessRanking","acronym","wordInString","splitByHyphenWord","matchingInOrderCharCount","charNumber","findMatchingCharacter","matchChar","j","J","getRanking","spread","spreadPercentage","inOrderPercentage","firstIndex","I","aRank","aKeyIndex","bRank","bKeyIndex","_ref4","keepDiacritics","getItemValues","key","getNestedValues","path","values","nestedKey","nestedValues","nestedItem","nestedValue","allValues","getKeyAttributes","itemValues","defaultKeyAttributes","combineKitsandVisualGuidelines","kits","VisualGuidelineItems","KitSearch","classname","id","kitsAndGuidelines","VisualGuidelinesItems","filteredKits","setFilteredKits","useState","useEffect","e","kitSearch","handleChange","selection","handleFilteredKits","query","results","Item","labelLeft","Flex","jsx","Badge","Typeahead","label"],"mappings":"yQAAIA,EAAe,CAClB,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,KACL,EAAK,KACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,IACN,EAAK,IACL,EAAK,IACL,GAAM,IACN,GAAM,I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