{"version":3,"sources":["webpack:///./node_modules/fuse.js/dist/fuse.esm.js"],"names":["isArray","value","Array","getTag","isString","isNumber","isBoolean","isObject","isObjectLike","isDefined","isBlank","trim","length","undefined","Object","prototype","toString","call","LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY","key","concat","PATTERN_LENGTH_TOO_LARGE","max","hasOwn","hasOwnProperty","KeyStore","keys","this","_keys","_keyMap","totalWeight","forEach","obj","createKey","weight","push","id","keyId","JSON","stringify","path","src","getFn","createKeyPath","createKeyId","Error","name","MISSING_KEY_PROPERTY","INVALID_KEY_WEIGHT_VALUE","split","join","Config","isCaseSensitive","includeScore","shouldSort","sortFn","a","b","score","idx","includeMatches","findAllMatches","minMatchCharLength","location","threshold","distance","useExtendedSearch","list","arr","deepGet","index","result","baseToString","i","len","ignoreLocation","ignoreFieldNorm","fieldNormWeight","SPACE","FuseIndex","arguments","norm","mantissa","cache","Map","m","Math","pow","numTokens","match","has","get","n","parseFloat","round","set","clear","isCreated","setIndexRecords","docs","records","_keysMap","doc","docIndex","_addString","_addObject","size","splice","item","record","v","$","keyIndex","subRecords","stack","nestedArrIndex","pop","subRecord","k","createIndex","myIndex","setKeys","map","setSources","create","computeScore$1","pattern","errors","currentLocation","expectedLocation","accuracy","proximity","abs","convertMaskToIndices","matchmask","indices","start","end","createPatternAlphabet","mask","char","charAt","BitapSearch","options","toLowerCase","chunks","addChunk","startIndex","alphabet","remainder","substr","text","isMatch","allIndices","totalScore","hasMatches","_ref","patternAlphabet","patternLen","textLen","min","currentThreshold","bestLocation","computeMatches","matchMask","indexOf","lastBitArr","finalScore","binMax","binMin","binMid","floor","finish","bitArr","j","charMatch","search","BaseMatch","getMatch","multiRegex","singleRegex","exp","matches","FuzzyMatch","super","_bitapSearch","searchIn","IncludeMatch","searchers","startsWith","endsWith","searchersLen","SPACE_RE","MultiMatchSet","Set","type","ExtendedSearch","query","filter","results","queryItem","found","searcher","token","isMultiMatch","isSingleMatch","parseQuery","_","numMatches","qLen","pLen","constructor","registeredSearchers","createSearcher","searcherClass","condition","LogicalOperator","KeyType","isExpression","isPath","isLeaf","convertToExplicit","parse","auto","next","isQueryPath","node","children","operator","transformMatches","data","refIndex","transformScore","Fuse","_keyStore","setCollection","_docs","_myIndex","add","predicate","removeAt","limit","_searchStringList","_searchObjectList","_searchLogical","_ref2","_ref3","Number","EPSILON","computeScore","sort","slice","transformers","transformer","format","_ref4","expression","evaluate","_findMatches","getValueForItemAtKeyId","res","child","resultMap","_ref5","expResults","_ref6","_ref7","_ref8","_ref9","version","parseIndex","config","register"],"mappings":"4FASA,SAASA,EAAQC,GACf,OAAQC,MAAMF,QAA+CE,MAAMF,QAAQC,GAAjC,mBAAlBE,EAAOF,GAVjC,kCA0BA,SAASG,EAASH,GAChB,MAAwB,iBAAVA,EAEhB,SAASI,EAASJ,GAChB,MAAwB,iBAAVA,EAIhB,SAASK,EAAUL,GACjB,OAAiB,IAAVA,IAA4B,IAAVA,GAO3B,SAAsBA,GACpB,OAAOM,EAASN,IAAoB,OAAVA,EARkBO,CAAaP,IAA2B,oBAAjBE,EAAOF,GAE5E,SAASM,EAASN,GAChB,MAAwB,iBAAVA,EAOhB,SAASQ,EAAUR,GACjB,OAAOA,QAET,SAASS,EAAQT,GACf,OAAQA,EAAMU,OAAOC,OAKvB,SAAST,EAAOF,GACd,OAAgB,MAATA,OAA0BY,IAAVZ,EAAsB,qBAAuB,gBAAkBa,OAAOC,UAAUC,SAASC,KAAKhB,GAEvH,MAEMiB,EAAuCC,GAAO,yBAAyBC,OAAOD,GAC9EE,EAA2BC,GAAO,iCAAiCF,OAAOE,EAAK,KAG/EC,EAAST,OAAOC,UAAUS,eAChC,MAAMC,EACJ,YAAYC,GACVC,KAAKC,MAAQ,GACbD,KAAKE,QAAU,GACf,IAAIC,EAAc,EAClBJ,EAAKK,QAAQZ,IACX,IAAIa,EAAMC,EAAUd,GACpBW,GAAeE,EAAIE,OACnBP,KAAKC,MAAMO,KAAKH,GAChBL,KAAKE,QAAQG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,YAIN,OAAO+C,GAGXmD,EAAKoC,QAAU,QACfpC,EAAKlH,YAAcA,EACnBkH,EAAKqC,WA/qCL,SAAoBxC,GAClB,IAAI,MACF5L,EAAQS,EAAOT,MAAK,gBACpBmC,EAAkB1B,EAAO0B,iBACvBG,UAAUpE,OAAS,QAAsBC,IAAjBmE,UAAU,GAAmBA,UAAU,GAAK,GACxE,MAAM,KACJtD,EAAI,QACJ0E,GACEkI,EACE9G,EAAU,IAAIzC,EAAU,CAC5BrC,QACAmC,oBAIF,OAFA2C,EAAQC,QAAQ/F,GAChB8F,EAAQtB,gBAAgBE,GACjBoB,GAiqCTiH,EAAKsC,OAAS5N,EAEZsL,EAAK3B,WAAagB,EA9apB,WACEV,EAAoBjL,QAAQ6C,WAgb5BgM,CAAS5E","file":"bc62dab504a71ef8c5d240a105694d09627f06f3-ef1ae313742c011d210f.js","sourcesContent":["/**\n * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2022 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray ? getTag(value) === '[object Array]' : Array.isArray(value);\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\nfunction isString(value) {\n return typeof value === 'string';\n}\nfunction isNumber(value) {\n return typeof value === 'number';\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return value === true || value === false || isObjectLike(value) && getTag(value) == '[object Boolean]';\n}\nfunction isObject(value) {\n return typeof value === 'object';\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null;\n}\nfunction isDefined(value) {\n return value !== undefined && value !== null;\n}\nfunction isBlank(value) {\n return !value.trim().length;\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null ? value === undefined ? '[object Undefined]' : '[object Null]' : Object.prototype.toString.call(value);\n}\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = key => \"Invalid value for key \".concat(key);\nconst PATTERN_LENGTH_TOO_LARGE = max => \"Pattern length exceeds max of \".concat(max, \".\");\nconst MISSING_KEY_PROPERTY = name => \"Missing \".concat(name, \" property in key\");\nconst INVALID_KEY_WEIGHT_VALUE = key => \"Property 'weight' in key '\".concat(key, \"' must be a positive integer\");\nconst hasOwn = Object.prototype.hasOwnProperty;\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n let totalWeight = 0;\n keys.forEach(key => {\n let obj = createKey(key);\n totalWeight += obj.weight;\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach(key => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId];\n }\n keys() {\n return this._keys;\n }\n toJSON() {\n return JSON.stringify(this._keys);\n }\n}\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'));\n }\n const name = key.name;\n src = name;\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name));\n }\n }\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n return {\n path,\n id,\n weight,\n src,\n getFn\n };\n}\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.');\n}\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key;\n}\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return;\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n const value = obj[key];\n if (!isDefined(value)) {\n return;\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (index === path.length - 1 && (isString(value) || isNumber(value) || isBoolean(value))) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n return arr ? list : list[0];\n}\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) => a.score === b.score ? a.idx < b.idx ? -1 : 1 : a.score < b.score ? -1 : 1\n};\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm() {\n let weight = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;\n let mantissa = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n if (cache.has(numTokens)) {\n return cache.get(numTokens);\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n cache.set(numTokens, n);\n return n;\n },\n clear() {\n cache.clear();\n }\n };\n}\nclass FuseIndex {\n constructor() {\n let {\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n this.setIndexRecords();\n }\n setSources() {\n let docs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n this.docs = docs;\n }\n setIndexRecords() {\n let records = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n this.records = records;\n }\n setKeys() {\n let keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return;\n }\n this.isCreated = true;\n\n // List is Array\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]];\n }\n size() {\n return this.records.length;\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return;\n }\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = {\n i: docIndex,\n $: {}\n };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n if (!isDefined(value)) {\n return;\n }\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{\n nestedArrIndex: -1,\n value\n }];\n while (stack.length) {\n const {\n nestedArrIndex,\n value\n } = stack.pop();\n if (!isDefined(value)) {\n continue;\n }\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n record.$[keyIndex] = subRecord;\n }\n });\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n };\n }\n}\nfunction createIndex(keys, docs) {\n let {\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const myIndex = new FuseIndex({\n getFn,\n fieldNormWeight\n });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex;\n}\nfunction parseIndex(data) {\n let {\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const {\n keys,\n records\n } = data;\n const myIndex = new FuseIndex({\n getFn,\n fieldNormWeight\n });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex;\n}\nfunction computeScore$1(pattern) {\n let {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const accuracy = errors / pattern.length;\n if (ignoreLocation) {\n return accuracy;\n }\n const proximity = Math.abs(expectedLocation - currentLocation);\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy;\n }\n return accuracy + proximity / distance;\n}\nfunction convertMaskToIndices() {\n let matchmask = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n let minMatchCharLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Config.minMatchCharLength;\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n return indices;\n}\n\n// Machine word size\nconst MAX_BITS = 32;\nfunction search(text, pattern, patternAlphabet) {\n let {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS));\n }\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n const mask = 1 << patternLen - 1;\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches ? textLen : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n bitArr[finish + 1] = (1 << i) - 1;\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = (bitArr[j + 1] << 1 | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |= (lastBitArr[j + 1] | lastBitArr[j]) << 1 | 1 | lastBitArr[j + 1];\n }\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break;\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n if (score > currentThreshold) {\n break;\n }\n lastBitArr = bitArr;\n }\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n return result;\n}\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | 1 << len - i - 1;\n }\n return mask;\n}\nclass BitapSearch {\n constructor(pattern) {\n let {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.chunks = [];\n if (!this.pattern.length) {\n return;\n }\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n const len = this.pattern.length;\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n searchIn(text) {\n const {\n isCaseSensitive,\n includeMatches\n } = this.options;\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n return result;\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n this.chunks.forEach(_ref => {\n let {\n pattern,\n alphabet,\n startIndex\n } = _ref;\n const {\n isMatch,\n score,\n indices\n } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n if (isMatch) {\n hasMatches = true;\n }\n totalScore += score;\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n return result;\n }\n}\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex);\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex);\n }\n search( /*text*/) {}\n}\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null;\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact';\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/;\n }\n static get singleRegex() {\n return /^=(.*)$/;\n }\n search(text) {\n const isMatch = text === this.pattern;\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n };\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact';\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/;\n }\n static get singleRegex() {\n return /^!(.*)$/;\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n };\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact';\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/;\n }\n static get singleRegex() {\n return /^\\^(.*)$/;\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n };\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact';\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/;\n }\n static get singleRegex() {\n return /^!\\^(.*)$/;\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n };\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact';\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/;\n }\n static get singleRegex() {\n return /^(.*)\\$$/;\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n };\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact';\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/;\n }\n static get singleRegex() {\n return /^!(.*)\\$$/;\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n };\n }\n}\nclass FuzzyMatch extends BaseMatch {\n constructor(pattern) {\n let {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy';\n }\n static get multiRegex() {\n return /^\"(.*)\"$/;\n }\n static get singleRegex() {\n return /^(.*)$/;\n }\n search(text) {\n return this._bitapSearch.searchIn(text);\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include';\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/;\n }\n static get singleRegex() {\n return /^'(.*)$/;\n }\n search(text) {\n let location = 0;\n let index;\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n const isMatch = !!indices.length;\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n };\n }\n}\n\n// ā¯—Order is important. DO NOT CHANGE.\nconst searchers = [ExactMatch, IncludeMatch, PrefixExactMatch, InversePrefixExactMatch, InverseSuffixExactMatch, SuffixExactMatch, InverseExactMatch, FuzzyMatch];\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return pattern.split(OR_TOKEN).map(item => {\n let query = item.trim().split(SPACE_RE).filter(item => item && !!item.trim());\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n if (found) {\n continue;\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break;\n }\n }\n }\n return results;\n });\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(pattern) {\n let {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n static condition(_, options) {\n return options.useExtendedSearch;\n }\n searchIn(text) {\n const query = this.query;\n if (!query) {\n return {\n isMatch: false,\n score: 1\n };\n }\n const {\n includeMatches,\n isCaseSensitive\n } = this.options;\n text = isCaseSensitive ? text : text.toLowerCase();\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const {\n isMatch,\n indices,\n score\n } = searcher.search(text);\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break;\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n if (includeMatches) {\n result.indices = allIndices;\n }\n return result;\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n };\n }\n}\nconst registeredSearchers = [];\nfunction register() {\n registeredSearchers.push(...arguments);\n}\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options);\n }\n }\n return new BitapSearch(pattern, options);\n}\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\nconst isExpression = query => !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\nconst isPath = query => !!query[KeyType.PATH];\nconst isLeaf = query => !isArray(query) && isObject(query) && !isExpression(query);\nconst convertToExplicit = query => ({\n [LogicalOperator.AND]: Object.keys(query).map(key => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options) {\n let {\n auto = true\n } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const next = query => {\n let keys = Object.keys(query);\n const isQueryPath = isPath(query);\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query));\n }\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key));\n }\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n return obj;\n }\n let node = {\n children: [],\n operator: keys[0]\n };\n keys.forEach(key => {\n const value = query[key];\n if (isArray(value)) {\n value.forEach(item => {\n node.children.push(next(item));\n });\n }\n });\n return node;\n };\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n return next(query);\n}\n\n// Practical scoring function\nfunction computeScore(results, _ref2) {\n let {\n ignoreFieldNorm = Config.ignoreFieldNorm\n } = _ref2;\n results.forEach(result => {\n let totalScore = 1;\n result.matches.forEach(_ref3 => {\n let {\n key,\n norm,\n score\n } = _ref3;\n const weight = key ? key.weight : null;\n totalScore *= Math.pow(score === 0 && weight ? Number.EPSILON : score, (weight || 1) * (ignoreFieldNorm ? 1 : norm));\n });\n result.score = totalScore;\n });\n}\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n if (!isDefined(matches)) {\n return;\n }\n matches.forEach(match => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return;\n }\n const {\n indices,\n value\n } = match;\n let obj = {\n indices,\n value\n };\n if (match.key) {\n obj.key = match.key.src;\n }\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n data.matches.push(obj);\n });\n}\nfunction transformScore(result, data) {\n data.score = result.score;\n}\nfunction format(results, docs) {\n let {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const transformers = [];\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n return results.map(result => {\n const {\n idx\n } = result;\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n if (transformers.length) {\n transformers.forEach(transformer => {\n transformer(result, data);\n });\n }\n return data;\n });\n}\nclass Fuse {\n constructor(docs) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let index = arguments.length > 2 ? arguments[2] : undefined;\n this.options = {\n ...Config,\n ...options\n };\n if (this.options.useExtendedSearch && !true) {\n throw new Error(EXTENDED_SEARCH_UNAVAILABLE);\n }\n this._keyStore = new KeyStore(this.options.keys);\n this.setCollection(docs, index);\n }\n setCollection(docs, index) {\n this._docs = docs;\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE);\n }\n this._myIndex = index || createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n add(doc) {\n if (!isDefined(doc)) {\n return;\n }\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n remove() {\n let predicate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ( /* doc, idx */) => false;\n const results = [];\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n results.push(doc);\n }\n }\n return results;\n }\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n getIndex() {\n return this._myIndex;\n }\n search(query) {\n let {\n limit = -1\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n let results = isString(query) ? isString(this._docs[0]) ? this._searchStringList(query) : this._searchObjectList(query) : this._searchLogical(query);\n computeScore(results, {\n ignoreFieldNorm\n });\n if (shouldSort) {\n results.sort(sortFn);\n }\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n return format(results, this._docs, {\n includeMatches,\n includeScore\n });\n }\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const {\n records\n } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(_ref4 => {\n let {\n v: text,\n i: idx,\n n: norm\n } = _ref4;\n if (!isDefined(text)) {\n return;\n }\n const {\n isMatch,\n score,\n indices\n } = searcher.searchIn(text);\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{\n score,\n value: text,\n norm,\n indices\n }]\n });\n }\n });\n return results;\n }\n _searchLogical(query) {\n const expression = parse(query, this.options);\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const {\n keyId,\n searcher\n } = node;\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n if (matches && matches.length) {\n return [{\n idx,\n item,\n matches\n }];\n }\n return [];\n }\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return [];\n }\n }\n return res;\n };\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n records.forEach(_ref5 => {\n let {\n $: item,\n i: idx\n } = _ref5;\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = {\n idx,\n item,\n matches: []\n };\n results.push(resultMap[idx]);\n }\n expResults.forEach(_ref6 => {\n let {\n matches\n } = _ref6;\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n return results;\n }\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const {\n keys,\n records\n } = this._myIndex;\n const results = [];\n\n // List is Array\n records.forEach(_ref7 => {\n let {\n $: item,\n i: idx\n } = _ref7;\n if (!isDefined(item)) {\n return;\n }\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n }));\n });\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n return results;\n }\n _findMatches(_ref8) {\n let {\n key,\n value,\n searcher\n } = _ref8;\n if (!isDefined(value)) {\n return [];\n }\n let matches = [];\n if (isArray(value)) {\n value.forEach(_ref9 => {\n let {\n v: text,\n i: idx,\n n: norm\n } = _ref9;\n if (!isDefined(text)) {\n return;\n }\n const {\n isMatch,\n score,\n indices\n } = searcher.searchIn(text);\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const {\n v: text,\n n: norm\n } = value;\n const {\n isMatch,\n score,\n indices\n } = searcher.searchIn(text);\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n norm,\n indices\n });\n }\n }\n return matches;\n }\n}\nFuse.version = '6.6.2';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n{\n Fuse.parseQuery = parse;\n}\n{\n register(ExtendedSearch);\n}\nexport { Fuse as default };"],"sourceRoot":""}