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AS,QAAG,IAAS9L,IAAI0L,EAAEK,IAAI/L,GAAG,CAAC,IAAIiH,EAAEjH,EAAEgM,cAAc,SAAS/E,EAAEgF,UAAU,ktDAAktDP,EAAExN,IAAI8B,EAAEiH,GAAG,IAAI9G,EAA16D,KAAg7DA,GAAG8G,EAAEiF,aAAa,QAAQ/L,GAAGH,EAAEmM,KAAKC,YAAYnF,EAAE,CAAC,GAAE,IAA6K,IAAIO,EAAE6D,EAAEpL,EAAE2I,EAAE7J,GAAG6I,EAAEJ,EAAE,GAAGgB,EAAEhB,EAAE,GAAGkB,EAAEI,EAAE,CAAC,iBAAiB3I,IAAI,OAAO,gBAAgB,MAAM2G,EAAE,CAAC,EAAElJ,EAAE,CAACmM,IAAI1J,EAAEyJ,UAAUpB,IAAI,gBAAgBwC,EAAE,CAACC,KAAKvD,EAAEqD,SAASzC,IAAI,gBAAgBuC,EAAE,CAACC,IAAIpD,EAAEY,EAAEyC,SAASzC,EAAEsB,UAAU,iCAAiC,EAAukDuC,EAAG,CAACR,aAAa,CAACrD,EAAE,EAAE5K,EAAE,EAAEgL,EAAE,GAAG0C,OAAO,SAASpL,GAAG,OAAO0K,EAAE,CAACpC,EAAEtI,EAAEsI,EAAE5K,EAAEsC,EAAEtC,EAAEgL,EAAE1I,EAAE0I,EAAE/J,EAAE,GAAG,EAAE2M,SAAS,SAAStL,GAAG,MAAM,CAACsI,GAAGxI,EAAE8K,EAAE5K,IAAIsI,EAAE5K,EAAEoC,EAAEpC,EAAEgL,EAAE5I,EAAE4I,GAAG,IAAI5I,CAAC,EAAEuL,MAAMH,GAAGkB,EAAG,SAAStM,GAAG,OAAO,gBAAgB2L,EAAE7E,EAAE,CAAC,EAAE9G,EAAE,CAAC4L,WAAWS,IAAK,C","sources":["webpack:///./node_modules/fuzzysort/fuzzysort.js","webpack:///./node_modules/react-colorful/dist/index.mjs"],"sourcesContent":["/*\r\n fuzzysort.js https://github.com/farzher/fuzzysort\r\n SublimeText-like Fuzzy Search\r\n\r\n fuzzysort.single('fs', 'Fuzzy Search') // {score: -16}\r\n fuzzysort.single('test', 'test') // {score: 0}\r\n fuzzysort.single('doesnt exist', 'target') // null\r\n\r\n fuzzysort.go('mr', [{file:'Monitor.cpp'}, {file:'MeshRenderer.cpp'}], {key:'file'})\r\n // [{score:-18, obj:{file:'MeshRenderer.cpp'}}, {score:-6009, obj:{file:'Monitor.cpp'}}]\r\n\r\n fuzzysort.go('mr', ['Monitor.cpp', 'MeshRenderer.cpp'])\r\n // [{score: -18, target: \"MeshRenderer.cpp\"}, {score: -6009, target: \"Monitor.cpp\"}]\r\n\r\n fuzzysort.highlight(fuzzysort.single('fs', 'Fuzzy Search'), '', '')\r\n // Fuzzy Search\r\n*/\r\n\r\n// UMD (Universal Module Definition) for fuzzysort\r\n;(function(root, UMD) {\r\n if(typeof define === 'function' && define.amd) define([], UMD)\r\n else if(typeof module === 'object' && module.exports) module.exports = UMD()\r\n else root.fuzzysort = UMD()\r\n})(this, function UMD() { function fuzzysortNew(instanceOptions) {\r\n\r\n var fuzzysort = {\r\n\r\n single: function(search, target, options) { ;if(search=='farzher')return{target:\"farzher was here (^-^*)/\",score:0,indexes:[0,1,2,3,4,5,6]}\r\n if(!search) return null\r\n if(!isObj(search)) search = fuzzysort.getPreparedSearch(search)\r\n\r\n if(!target) return null\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo\r\n : instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo\r\n : true\r\n var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo\r\n return algorithm(search, target, search[0])\r\n },\r\n\r\n go: function(search, targets, options) { ;if(search=='farzher')return[{target:\"farzher was here (^-^*)/\",score:0,indexes:[0,1,2,3,4,5,6],obj:targets?targets[0]:null}]\r\n if(!search) return noResults\r\n search = fuzzysort.prepareSearch(search)\r\n var searchLowerCode = search[0]\r\n\r\n var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991\r\n var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991\r\n var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo\r\n : instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo\r\n : true\r\n var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo\r\n var resultsLen = 0; var limitedCount = 0\r\n var targetsLen = targets.length\r\n\r\n // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]\r\n\r\n // options.keys\r\n if(options && options.keys) {\r\n var scoreFn = options.scoreFn || defaultScoreFn\r\n var keys = options.keys\r\n var keysLen = keys.length\r\n for(var i = targetsLen - 1; i >= 0; --i) { var obj = targets[i]\r\n var objResults = new Array(keysLen)\r\n for (var keyI = keysLen - 1; keyI >= 0; --keyI) {\r\n var key = keys[keyI]\r\n var target = getValue(obj, key)\r\n if(!target) { objResults[keyI] = null; continue }\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n objResults[keyI] = algorithm(search, target, searchLowerCode)\r\n }\r\n objResults.obj = obj // before scoreFn so scoreFn can use it\r\n var score = scoreFn(objResults)\r\n if(score === null) continue\r\n if(score < threshold) continue\r\n objResults.score = score\r\n if(resultsLen < limit) { q.add(objResults); ++resultsLen }\r\n else {\r\n ++limitedCount\r\n if(score > q.peek().score) q.replaceTop(objResults)\r\n }\r\n }\r\n\r\n // options.key\r\n } else if(options && options.key) {\r\n var key = options.key\r\n for(var i = targetsLen - 1; i >= 0; --i) { var obj = targets[i]\r\n var target = getValue(obj, key)\r\n if(!target) continue\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n var result = algorithm(search, target, searchLowerCode)\r\n if(result === null) continue\r\n if(result.score < threshold) continue\r\n\r\n // have to clone result so duplicate targets from different obj can each reference the correct obj\r\n result = {target:result.target, _targetLowerCodes:null, _nextBeginningIndexes:null, score:result.score, indexes:result.indexes, obj:obj} // hidden\r\n\r\n if(resultsLen < limit) { q.add(result); ++resultsLen }\r\n else {\r\n ++limitedCount\r\n if(result.score > q.peek().score) q.replaceTop(result)\r\n }\r\n }\r\n\r\n // no keys\r\n } else {\r\n for(var i = targetsLen - 1; i >= 0; --i) { var target = targets[i]\r\n if(!target) continue\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n var result = algorithm(search, target, searchLowerCode)\r\n if(result === null) continue\r\n if(result.score < threshold) continue\r\n if(resultsLen < limit) { q.add(result); ++resultsLen }\r\n else {\r\n ++limitedCount\r\n if(result.score > q.peek().score) q.replaceTop(result)\r\n }\r\n }\r\n }\r\n\r\n if(resultsLen === 0) return noResults\r\n var results = new Array(resultsLen)\r\n for(var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll()\r\n results.total = resultsLen + limitedCount\r\n return results\r\n },\r\n\r\n goAsync: function(search, targets, options) {\r\n var canceled = false\r\n var p = new Promise(function(resolve, reject) { ;if(search=='farzher')return resolve([{target:\"farzher was here (^-^*)/\",score:0,indexes:[0,1,2,3,4,5,6],obj:targets?targets[0]:null}])\r\n if(!search) return resolve(noResults)\r\n search = fuzzysort.prepareSearch(search)\r\n var searchLowerCode = search[0]\r\n\r\n var q = fastpriorityqueue()\r\n var iCurrent = targets.length - 1\r\n var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991\r\n var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991\r\n var allowTypo = options && options.allowTypo!==undefined ? options.allowTypo\r\n : instanceOptions && instanceOptions.allowTypo!==undefined ? instanceOptions.allowTypo\r\n : true\r\n var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo\r\n var resultsLen = 0; var limitedCount = 0\r\n function step() {\r\n if(canceled) return reject('canceled')\r\n\r\n var startMs = Date.now()\r\n\r\n // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]\r\n\r\n // options.keys\r\n if(options && options.keys) {\r\n var scoreFn = options.scoreFn || defaultScoreFn\r\n var keys = options.keys\r\n var keysLen = keys.length\r\n for(; iCurrent >= 0; --iCurrent) {\r\n if(iCurrent%1000/*itemsPerCheck*/ === 0) {\r\n if(Date.now() - startMs >= 10/*asyncInterval*/) {\r\n isNode?setImmediate(step):setTimeout(step)\r\n return\r\n }\r\n }\r\n\r\n var obj = targets[iCurrent]\r\n var objResults = new Array(keysLen)\r\n for (var keyI = keysLen - 1; keyI >= 0; --keyI) {\r\n var key = keys[keyI]\r\n var target = getValue(obj, key)\r\n if(!target) { objResults[keyI] = null; continue }\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n objResults[keyI] = algorithm(search, target, searchLowerCode)\r\n }\r\n objResults.obj = obj // before scoreFn so scoreFn can use it\r\n var score = scoreFn(objResults)\r\n if(score === null) continue\r\n if(score < threshold) continue\r\n objResults.score = score\r\n if(resultsLen < limit) { q.add(objResults); ++resultsLen }\r\n else {\r\n ++limitedCount\r\n if(score > q.peek().score) q.replaceTop(objResults)\r\n }\r\n }\r\n\r\n // options.key\r\n } else if(options && options.key) {\r\n var key = options.key\r\n for(; iCurrent >= 0; --iCurrent) {\r\n if(iCurrent%1000/*itemsPerCheck*/ === 0) {\r\n if(Date.now() - startMs >= 10/*asyncInterval*/) {\r\n isNode?setImmediate(step):setTimeout(step)\r\n return\r\n }\r\n }\r\n\r\n var obj = targets[iCurrent]\r\n var target = getValue(obj, key)\r\n if(!target) continue\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n var result = algorithm(search, target, searchLowerCode)\r\n if(result === null) continue\r\n if(result.score < threshold) continue\r\n\r\n // have to clone result so duplicate targets from different obj can each reference the correct obj\r\n result = {target:result.target, _targetLowerCodes:null, _nextBeginningIndexes:null, score:result.score, indexes:result.indexes, obj:obj} // hidden\r\n\r\n if(resultsLen < limit) { q.add(result); ++resultsLen }\r\n else {\r\n ++limitedCount\r\n if(result.score > q.peek().score) q.replaceTop(result)\r\n }\r\n }\r\n\r\n // no keys\r\n } else {\r\n for(; iCurrent >= 0; --iCurrent) {\r\n if(iCurrent%1000/*itemsPerCheck*/ === 0) {\r\n if(Date.now() - startMs >= 10/*asyncInterval*/) {\r\n isNode?setImmediate(step):setTimeout(step)\r\n return\r\n }\r\n }\r\n\r\n var target = targets[iCurrent]\r\n if(!target) continue\r\n if(!isObj(target)) target = fuzzysort.getPrepared(target)\r\n\r\n var result = algorithm(search, target, searchLowerCode)\r\n if(result === null) continue\r\n if(result.score < threshold) continue\r\n if(resultsLen < limit) { q.add(result); ++resultsLen }\r\n else {\r\n ++limitedCount\r\n if(result.score > q.peek().score) q.replaceTop(result)\r\n }\r\n }\r\n }\r\n\r\n if(resultsLen === 0) return resolve(noResults)\r\n var results = new Array(resultsLen)\r\n for(var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll()\r\n results.total = resultsLen + limitedCount\r\n resolve(results)\r\n }\r\n\r\n isNode?setImmediate(step):step() //setTimeout here is too slow\r\n })\r\n p.cancel = function() { canceled = true }\r\n return p\r\n },\r\n\r\n highlight: function(result, hOpen, hClose) {\r\n if(typeof hOpen == 'function') return fuzzysort.highlightCallback(result, hOpen)\r\n if(result === null) return null\r\n if(hOpen === undefined) hOpen = ''\r\n if(hClose === undefined) hClose = ''\r\n var highlighted = ''\r\n var matchesIndex = 0\r\n var opened = false\r\n var target = result.target\r\n var targetLen = target.length\r\n var matchesBest = result.indexes\r\n for(var i = 0; i < targetLen; ++i) { var char = target[i]\r\n if(matchesBest[matchesIndex] === i) {\r\n ++matchesIndex\r\n if(!opened) { opened = true\r\n highlighted += hOpen\r\n }\r\n\r\n if(matchesIndex === matchesBest.length) {\r\n highlighted += char + hClose + target.substr(i+1)\r\n break\r\n }\r\n } else {\r\n if(opened) { opened = false\r\n highlighted += hClose\r\n }\r\n }\r\n highlighted += char\r\n }\r\n\r\n return highlighted\r\n },\r\n highlightCallback: function(result, cb) {\r\n if(result === null) return null\r\n var target = result.target\r\n var targetLen = target.length\r\n var indexes = result.indexes\r\n var highlighted = ''\r\n var matchI = 0\r\n var indexesI = 0\r\n var opened = false\r\n var result = []\r\n for(var i = 0; i < targetLen; ++i) { var char = target[i]\r\n if(indexes[indexesI] === i) {\r\n ++indexesI\r\n if(!opened) { opened = true\r\n result.push(highlighted); highlighted = ''\r\n }\r\n\r\n if(indexesI === indexes.length) {\r\n highlighted += char\r\n result.push(cb(highlighted, matchI++)); highlighted = ''\r\n result.push(target.substr(i+1))\r\n break\r\n }\r\n } else {\r\n if(opened) { opened = false\r\n result.push(cb(highlighted, matchI++)); highlighted = ''\r\n }\r\n }\r\n highlighted += char\r\n }\r\n return result\r\n },\r\n\r\n prepare: function(target) {\r\n if(!target) return {target: '', _targetLowerCodes: [0/*this 0 doesn't make sense. here because an empty array causes the algorithm to deoptimize and run 50% slower!*/], _nextBeginningIndexes: null, score: null, indexes: null, obj: null} // hidden\r\n return {target:target, _targetLowerCodes:fuzzysort.prepareLowerCodes(target), _nextBeginningIndexes:null, score:null, indexes:null, obj:null} // hidden\r\n },\r\n prepareSlow: function(target) {\r\n if(!target) return {target: '', _targetLowerCodes: [0/*this 0 doesn't make sense. here because an empty array causes the algorithm to deoptimize and run 50% slower!*/], _nextBeginningIndexes: null, score: null, indexes: null, obj: null} // hidden\r\n return {target:target, _targetLowerCodes:fuzzysort.prepareLowerCodes(target), _nextBeginningIndexes:fuzzysort.prepareNextBeginningIndexes(target), score:null, indexes:null, obj:null} // hidden\r\n },\r\n prepareSearch: function(search) {\r\n if(!search) search = ''\r\n return fuzzysort.prepareLowerCodes(search)\r\n },\r\n\r\n\r\n\r\n // Below this point is only internal code\r\n // Below this point is only internal code\r\n // Below this point is only internal code\r\n // Below this point is only internal code\r\n\r\n\r\n\r\n getPrepared: function(target) {\r\n if(target.length > 999) return fuzzysort.prepare(target) // don't cache huge targets\r\n var targetPrepared = preparedCache.get(target)\r\n if(targetPrepared !== undefined) return targetPrepared\r\n targetPrepared = fuzzysort.prepare(target)\r\n preparedCache.set(target, targetPrepared)\r\n return targetPrepared\r\n },\r\n getPreparedSearch: function(search) {\r\n if(search.length > 999) return fuzzysort.prepareSearch(search) // don't cache huge searches\r\n var searchPrepared = preparedSearchCache.get(search)\r\n if(searchPrepared !== undefined) return searchPrepared\r\n searchPrepared = fuzzysort.prepareSearch(search)\r\n preparedSearchCache.set(search, searchPrepared)\r\n return searchPrepared\r\n },\r\n\r\n algorithm: function(searchLowerCodes, prepared, searchLowerCode) {\r\n var targetLowerCodes = prepared._targetLowerCodes\r\n var searchLen = searchLowerCodes.length\r\n var targetLen = targetLowerCodes.length\r\n var searchI = 0 // where we at\r\n var targetI = 0 // where you at\r\n var typoSimpleI = 0\r\n var matchesSimpleLen = 0\r\n\r\n // very basic fuzzy match; to remove non-matching targets ASAP!\r\n // walk through target. find sequential matches.\r\n // if all chars aren't found then exit\r\n for(;;) {\r\n var isMatch = searchLowerCode === targetLowerCodes[targetI]\r\n if(isMatch) {\r\n matchesSimple[matchesSimpleLen++] = targetI\r\n ++searchI; if(searchI === searchLen) break\r\n searchLowerCode = searchLowerCodes[typoSimpleI===0?searchI : (typoSimpleI===searchI?searchI+1 : (typoSimpleI===searchI-1?searchI-1 : searchI))]\r\n }\r\n\r\n ++targetI; if(targetI >= targetLen) { // Failed to find searchI\r\n // Check for typo or exit\r\n // we go as far as possible before trying to transpose\r\n // then we transpose backwards until we reach the beginning\r\n for(;;) {\r\n if(searchI <= 1) return null // not allowed to transpose first char\r\n if(typoSimpleI === 0) { // we haven't tried to transpose yet\r\n --searchI\r\n var searchLowerCodeNew = searchLowerCodes[searchI]\r\n if(searchLowerCode === searchLowerCodeNew) continue // doesn't make sense to transpose a repeat char\r\n typoSimpleI = searchI\r\n } else {\r\n if(typoSimpleI === 1) return null // reached the end of the line for transposing\r\n --typoSimpleI\r\n searchI = typoSimpleI\r\n searchLowerCode = searchLowerCodes[searchI + 1]\r\n var searchLowerCodeNew = searchLowerCodes[searchI]\r\n if(searchLowerCode === searchLowerCodeNew) continue // doesn't make sense to transpose a repeat char\r\n }\r\n matchesSimpleLen = searchI\r\n targetI = matchesSimple[matchesSimpleLen - 1] + 1\r\n break\r\n }\r\n }\r\n }\r\n\r\n var searchI = 0\r\n var typoStrictI = 0\r\n var successStrict = false\r\n var matchesStrictLen = 0\r\n\r\n var nextBeginningIndexes = prepared._nextBeginningIndexes\r\n if(nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target)\r\n var firstPossibleI = targetI = matchesSimple[0]===0 ? 0 : nextBeginningIndexes[matchesSimple[0]-1]\r\n\r\n // Our target string successfully matched all characters in sequence!\r\n // Let's try a more advanced and strict test to improve the score\r\n // only count it as a match if it's consecutive or a beginning character!\r\n if(targetI !== targetLen) for(;;) {\r\n if(targetI >= targetLen) {\r\n // We failed to find a good spot for this search char, go back to the previous search char and force it forward\r\n if(searchI <= 0) { // We failed to push chars forward for a better match\r\n // transpose, starting from the beginning\r\n ++typoStrictI; if(typoStrictI > searchLen-2) break\r\n if(searchLowerCodes[typoStrictI] === searchLowerCodes[typoStrictI+1]) continue // doesn't make sense to transpose a repeat char\r\n targetI = firstPossibleI\r\n continue\r\n }\r\n\r\n --searchI\r\n var lastMatch = matchesStrict[--matchesStrictLen]\r\n targetI = nextBeginningIndexes[lastMatch]\r\n\r\n } else {\r\n var isMatch = searchLowerCodes[typoStrictI===0?searchI : (typoStrictI===searchI?searchI+1 : (typoStrictI===searchI-1?searchI-1 : searchI))] === targetLowerCodes[targetI]\r\n if(isMatch) {\r\n matchesStrict[matchesStrictLen++] = targetI\r\n ++searchI; if(searchI === searchLen) { successStrict = true; break }\r\n ++targetI\r\n } else {\r\n targetI = nextBeginningIndexes[targetI]\r\n }\r\n }\r\n }\r\n\r\n { // tally up the score & keep track of matches for highlighting later\r\n if(successStrict) { var matchesBest = matchesStrict; var matchesBestLen = matchesStrictLen }\r\n else { var matchesBest = matchesSimple; var matchesBestLen = matchesSimpleLen }\r\n var score = 0\r\n var lastTargetI = -1\r\n for(var i = 0; i < searchLen; ++i) { var targetI = matchesBest[i]\r\n // score only goes down if they're not consecutive\r\n if(lastTargetI !== targetI - 1) score -= targetI\r\n lastTargetI = targetI\r\n }\r\n if(!successStrict) {\r\n score *= 1000\r\n if(typoSimpleI !== 0) score += -20/*typoPenalty*/\r\n } else {\r\n if(typoStrictI !== 0) score += -20/*typoPenalty*/\r\n }\r\n score -= targetLen - searchLen\r\n prepared.score = score\r\n prepared.indexes = new Array(matchesBestLen); for(var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]\r\n\r\n return prepared\r\n }\r\n },\r\n\r\n algorithmNoTypo: function(searchLowerCodes, prepared, searchLowerCode) {\r\n var targetLowerCodes = prepared._targetLowerCodes\r\n var searchLen = searchLowerCodes.length\r\n var targetLen = targetLowerCodes.length\r\n var searchI = 0 // where we at\r\n var targetI = 0 // where you at\r\n var matchesSimpleLen = 0\r\n\r\n // very basic fuzzy match; to remove non-matching targets ASAP!\r\n // walk through target. find sequential matches.\r\n // if all chars aren't found then exit\r\n for(;;) {\r\n var isMatch = searchLowerCode === targetLowerCodes[targetI]\r\n if(isMatch) {\r\n matchesSimple[matchesSimpleLen++] = targetI\r\n ++searchI; if(searchI === searchLen) break\r\n searchLowerCode = searchLowerCodes[searchI]\r\n }\r\n ++targetI; if(targetI >= targetLen) return null // Failed to find searchI\r\n }\r\n\r\n var searchI = 0\r\n var successStrict = false\r\n var matchesStrictLen = 0\r\n\r\n var nextBeginningIndexes = prepared._nextBeginningIndexes\r\n if(nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target)\r\n var firstPossibleI = targetI = matchesSimple[0]===0 ? 0 : nextBeginningIndexes[matchesSimple[0]-1]\r\n\r\n // Our target string successfully matched all characters in sequence!\r\n // Let's try a more advanced and strict test to improve the score\r\n // only count it as a match if it's consecutive or a beginning character!\r\n if(targetI !== targetLen) for(;;) {\r\n if(targetI >= targetLen) {\r\n // We failed to find a good spot for this search char, go back to the previous search char and force it forward\r\n if(searchI <= 0) break // We failed to push chars forward for a better match\r\n\r\n --searchI\r\n var lastMatch = matchesStrict[--matchesStrictLen]\r\n targetI = nextBeginningIndexes[lastMatch]\r\n\r\n } else {\r\n var isMatch = searchLowerCodes[searchI] === targetLowerCodes[targetI]\r\n if(isMatch) {\r\n matchesStrict[matchesStrictLen++] = targetI\r\n ++searchI; if(searchI === searchLen) { successStrict = true; break }\r\n ++targetI\r\n } else {\r\n targetI = nextBeginningIndexes[targetI]\r\n }\r\n }\r\n }\r\n\r\n { // tally up the score & keep track of matches for highlighting later\r\n if(successStrict) { var matchesBest = matchesStrict; var matchesBestLen = matchesStrictLen }\r\n else { var matchesBest = matchesSimple; var matchesBestLen = matchesSimpleLen }\r\n var score = 0\r\n var lastTargetI = -1\r\n for(var i = 0; i < searchLen; ++i) { var targetI = matchesBest[i]\r\n // score only goes down if they're not consecutive\r\n if(lastTargetI !== targetI - 1) score -= targetI\r\n lastTargetI = targetI\r\n }\r\n if(!successStrict) score *= 1000\r\n score -= targetLen - searchLen\r\n prepared.score = score\r\n prepared.indexes = new Array(matchesBestLen); for(var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]\r\n\r\n return prepared\r\n }\r\n },\r\n\r\n prepareLowerCodes: function(str) {\r\n var strLen = str.length\r\n var lowerCodes = [] // new Array(strLen) sparse array is too slow\r\n var lower = str.toLowerCase()\r\n for(var i = 0; i < strLen; ++i) lowerCodes[i] = lower.charCodeAt(i)\r\n return lowerCodes\r\n },\r\n prepareBeginningIndexes: function(target) {\r\n var targetLen = target.length\r\n var beginningIndexes = []; var beginningIndexesLen = 0\r\n var wasUpper = false\r\n var wasAlphanum = false\r\n for(var i = 0; i < targetLen; ++i) {\r\n var targetCode = target.charCodeAt(i)\r\n var isUpper = targetCode>=65&&targetCode<=90\r\n var isAlphanum = isUpper || targetCode>=97&&targetCode<=122 || targetCode>=48&&targetCode<=57\r\n var isBeginning = isUpper && !wasUpper || !wasAlphanum || !isAlphanum\r\n wasUpper = isUpper\r\n wasAlphanum = isAlphanum\r\n if(isBeginning) beginningIndexes[beginningIndexesLen++] = i\r\n }\r\n return beginningIndexes\r\n },\r\n prepareNextBeginningIndexes: function(target) {\r\n var targetLen = target.length\r\n var beginningIndexes = fuzzysort.prepareBeginningIndexes(target)\r\n var nextBeginningIndexes = [] // new Array(targetLen) sparse array is too slow\r\n var lastIsBeginning = beginningIndexes[0]\r\n var lastIsBeginningI = 0\r\n for(var i = 0; i < targetLen; ++i) {\r\n if(lastIsBeginning > i) {\r\n nextBeginningIndexes[i] = lastIsBeginning\r\n } else {\r\n lastIsBeginning = beginningIndexes[++lastIsBeginningI]\r\n nextBeginningIndexes[i] = lastIsBeginning===undefined ? targetLen : lastIsBeginning\r\n }\r\n }\r\n return nextBeginningIndexes\r\n },\r\n\r\n cleanup: cleanup,\r\n new: fuzzysortNew,\r\n }\r\n return fuzzysort\r\n} // fuzzysortNew\r\n\r\n// This stuff is outside fuzzysortNew, because it's shared with instances of fuzzysort.new()\r\nvar isNode = typeof require !== 'undefined' && typeof window === 'undefined'\r\nvar MyMap = typeof Map === 'function' ? Map : function(){var s=Object.create(null);this.get=function(k){return s[k]};this.set=function(k,val){s[k]=val;return this};this.clear=function(){s=Object.create(null)}}\r\nvar preparedCache = new MyMap()\r\nvar preparedSearchCache = new MyMap()\r\nvar noResults = []; noResults.total = 0\r\nvar matchesSimple = []; var matchesStrict = []\r\nfunction cleanup() { preparedCache.clear(); preparedSearchCache.clear(); matchesSimple = []; matchesStrict = [] }\r\nfunction defaultScoreFn(a) {\r\n var max = -9007199254740991\r\n for (var i = a.length - 1; i >= 0; --i) {\r\n var result = a[i]; if(result === null) continue\r\n var score = result.score\r\n if(score > max) max = score\r\n }\r\n if(max === -9007199254740991) return null\r\n return max\r\n}\r\n\r\n// prop = 'key' 2.5ms optimized for this case, seems to be about as fast as direct obj[prop]\r\n// prop = 'key1.key2' 10ms\r\n// prop = ['key1', 'key2'] 27ms\r\nfunction getValue(obj, prop) {\r\n var tmp = obj[prop]; if(tmp !== undefined) return tmp\r\n var segs = prop\r\n if(!Array.isArray(prop)) segs = prop.split('.')\r\n var len = segs.length\r\n var i = -1\r\n while (obj && (++i < len)) obj = obj[segs[i]]\r\n return obj\r\n}\r\n\r\nfunction isObj(x) { return typeof x === 'object' } // faster as a function\r\n\r\n// Hacked version of https://github.com/lemire/FastPriorityQueue.js\r\nvar fastpriorityqueue=function(){var r=[],o=0,e={};function n(){for(var e=0,n=r[e],c=1;c>1]=r[e],c=1+(e<<1)}for(var a=e-1>>1;e>0&&n.score>1)r[e]=r[a];r[e]=n}return e.add=function(e){var n=o;r[o++]=e;for(var c=n-1>>1;n>0&&e.score>1)r[n]=r[c];r[n]=e},e.poll=function(){if(0!==o){var e=r[0];return r[0]=r[--o],n(),e}},e.peek=function(e){if(0!==o)return r[0]},e.replaceTop=function(o){r[0]=o,n()},e};\r\nvar q = fastpriorityqueue() // reuse this, except for async, it needs to make its own\r\n\r\nreturn fuzzysortNew()\r\n}) // UMD\r\n\r\n// TODO: (performance) wasm version!?\r\n// TODO: (performance) threads?\r\n// TODO: (performance) avoid cache misses\r\n// TODO: (performance) preparedCache is a memory leak\r\n// TODO: (like sublime) backslash === forwardslash\r\n// TODO: (like sublime) spaces: \"a b\" should do 2 searches 1 for a and 1 for b\r\n// TODO: (scoring) garbage in targets that allows most searches to strict match need a penality\r\n// TODO: (performance) idk if allowTypo is optimized\r\n","import e,{useRef as r,useMemo as t,useEffect as n,useState as o,useCallback as a,useLayoutEffect as l}from\"react\";function u(){return(u=Object.assign||function(e){for(var r=1;r=0||(o[t]=e[t]);return o}function i(e){var t=r(e),n=r(function(e){t.current&&t.current(e)});return t.current=e,n.current}var s=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=1),e>t?t:e0:e.buttons>0)&&m.current?g(d(m.current,e,b.current)):t(!1)},r=function(){return t(!1)};function t(t){var n=_.current,o=v(m.current),a=t?o.addEventListener:o.removeEventListener;a(n?\"touchmove\":\"mousemove\",e),a(n?\"touchend\":\"mouseup\",r)}return[function(e){var r=e.nativeEvent,n=m.current;if(n&&(h(r),!function(e,r){return r&&!f(e)}(r,_.current)&&n)){if(f(r)){_.current=!0;var o=r.changedTouches||[];o.length&&(b.current=o[0].identifier)}n.focus(),g(d(n,r,b.current)),t(!0)}},function(e){var r=e.which||e.keyCode;r<37||r>40||(e.preventDefault(),p({left:39===r?.05:37===r?-.05:0,top:40===r?.05:38===r?-.05:0}))},t]},[p,g]),C=x[0],E=x[1],H=x[2];return n(function(){return H},[H]),e.createElement(\"div\",u({},s,{onTouchStart:C,onMouseDown:C,className:\"react-colorful__interactive\",ref:m,onKeyDown:E,tabIndex:0,role:\"slider\"}))}),g=function(e){return e.filter(Boolean).join(\" \")},p=function(r){var t=r.color,n=r.left,o=r.top,a=void 0===o?.5:o,l=g([\"react-colorful__pointer\",r.className]);return e.createElement(\"div\",{className:l,style:{top:100*a+\"%\",left:100*n+\"%\"}},e.createElement(\"div\",{className:\"react-colorful__pointer-fill\",style:{backgroundColor:t}}))},b=function(e,r,t){return void 0===r&&(r=0),void 0===t&&(t=Math.pow(10,r)),Math.round(t*e)/t},_={grad:.9,turn:360,rad:360/(2*Math.PI)},x=function(e){return L(C(e))},C=function(e){return\"#\"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?b(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?b(parseInt(e.substring(6,8),16)/255,2):1}},E=function(e,r){return void 0===r&&(r=\"deg\"),Number(e)*(_[r]||1)},H=function(e){var r=/hsla?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?N({h:E(r[1],r[2]),s:Number(r[3]),l:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},M=H,N=function(e){var r=e.s,t=e.l;return{h:e.h,s:(r*=(t<50?t:100-t)/100)>0?2*r/(t+r)*100:0,v:t+r,a:e.a}},w=function(e){return K(I(e))},y=function(e){var r=e.s,t=e.v,n=e.a,o=(200-r)*t/100;return{h:b(e.h),s:b(o>0&&o<200?r*t/100/(o<=100?o:200-o)*100:0),l:b(o/2),a:b(n,2)}},q=function(e){var r=y(e);return\"hsl(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%)\"},k=function(e){var r=y(e);return\"hsla(\"+r.h+\", \"+r.s+\"%, \"+r.l+\"%, \"+r.a+\")\"},I=function(e){var r=e.h,t=e.s,n=e.v,o=e.a;r=r/360*6,t/=100,n/=100;var a=Math.floor(r),l=n*(1-t),u=n*(1-(r-a)*t),c=n*(1-(1-r+a)*t),i=a%6;return{r:b(255*[n,u,l,l,c,n][i]),g:b(255*[c,n,n,u,l,l][i]),b:b(255*[l,l,c,n,n,u][i]),a:b(o,2)}},O=function(e){var r=/hsva?\\(?\\s*(-?\\d*\\.?\\d+)(deg|rad|grad|turn)?[,\\s]+(-?\\d*\\.?\\d+)%?[,\\s]+(-?\\d*\\.?\\d+)%?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?A({h:E(r[1],r[2]),s:Number(r[3]),v:Number(r[4]),a:void 0===r[5]?1:Number(r[5])/(r[6]?100:1)}):{h:0,s:0,v:0,a:1}},j=O,z=function(e){var r=/rgba?\\(?\\s*(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?[,\\s]+(-?\\d*\\.?\\d+)(%)?,?\\s*[/\\s]*(-?\\d*\\.?\\d+)?(%)?\\s*\\)?/i.exec(e);return r?L({r:Number(r[1])/(r[2]?100/255:1),g:Number(r[3])/(r[4]?100/255:1),b:Number(r[5])/(r[6]?100/255:1),a:void 0===r[7]?1:Number(r[7])/(r[8]?100:1)}):{h:0,s:0,v:0,a:1}},B=z,D=function(e){var r=e.toString(16);return r.length<2?\"0\"+r:r},K=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=o<1?D(b(255*o)):\"\";return\"#\"+D(r)+D(t)+D(n)+a},L=function(e){var r=e.r,t=e.g,n=e.b,o=e.a,a=Math.max(r,t,n),l=a-Math.min(r,t,n),u=l?a===r?(t-n)/l:a===t?2+(n-r)/l:4+(r-t)/l:0;return{h:b(60*(u<0?u+6:u)),s:b(a?l/a*100:0),v:b(a/255*100),a:o}},A=function(e){return{h:b(e.h),s:b(e.s),v:b(e.v),a:b(e.a,2)}},S=e.memo(function(r){var t=r.hue,n=r.onChange,o=g([\"react-colorful__hue\",r.className]);return e.createElement(\"div\",{className:o},e.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:s(t+360*e.left,0,360)})},\"aria-label\":\"Hue\",\"aria-valuenow\":b(t),\"aria-valuemax\":\"360\",\"aria-valuemin\":\"0\"},e.createElement(p,{className:\"react-colorful__hue-pointer\",left:t/360,color:q({h:t,s:100,v:100,a:1})})))}),T=e.memo(function(r){var t=r.hsva,n=r.onChange,o={backgroundColor:q({h:t.h,s:100,v:100,a:1})};return e.createElement(\"div\",{className:\"react-colorful__saturation\",style:o},e.createElement(m,{onMove:function(e){n({s:100*e.left,v:100-100*e.top})},onKey:function(e){n({s:s(t.s+100*e.left,0,100),v:s(t.v-100*e.top,0,100)})},\"aria-label\":\"Color\",\"aria-valuetext\":\"Saturation \"+b(t.s)+\"%, Brightness \"+b(t.v)+\"%\"},e.createElement(p,{className:\"react-colorful__saturation-pointer\",top:1-t.v/100,left:t.s/100,color:q(t)})))}),F=function(e,r){if(e===r)return!0;for(var t in e)if(e[t]!==r[t])return!1;return!0},P=function(e,r){return e.replace(/\\s/g,\"\")===r.replace(/\\s/g,\"\")},X=function(e,r){return e.toLowerCase()===r.toLowerCase()||F(C(e),C(r))};function Y(e,t,l){var u=i(l),c=o(function(){return e.toHsva(t)}),s=c[0],f=c[1],v=r({color:t,hsva:s});n(function(){if(!e.equal(t,v.current.color)){var r=e.toHsva(t);v.current={hsva:r,color:t},f(r)}},[t,e]),n(function(){var r;F(s,v.current.hsva)||e.equal(r=e.fromHsva(s),v.current.color)||(v.current={hsva:s,color:r},u(r))},[s,e,u]);var d=a(function(e){f(function(r){return Object.assign({},r,e)})},[]);return[s,d]}var R,V=\"undefined\"!=typeof window?l:n,$=function(){return R||(\"undefined\"!=typeof __webpack_nonce__?__webpack_nonce__:void 0)},G=function(e){R=e},J=new Map,Q=function(e){V(function(){var r=e.current?e.current.ownerDocument:document;if(void 0!==r&&!J.has(r)){var t=r.createElement(\"style\");t.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:\"\";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\\'data:image/svg+xml;charset=utf-8,\\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',J.set(r,t);var n=$();n&&t.setAttribute(\"nonce\",n),r.head.appendChild(t)}},[])},U=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h,className:\"react-colorful__last-control\"}))},W={defaultColor:\"000\",toHsva:x,fromHsva:function(e){return w({h:e.h,s:e.s,v:e.v,a:1})},equal:X},Z=function(r){return e.createElement(U,u({},r,{colorModel:W}))},ee=function(r){var t=r.className,n=r.hsva,o=r.onChange,a={backgroundImage:\"linear-gradient(90deg, \"+k(Object.assign({},n,{a:0}))+\", \"+k(Object.assign({},n,{a:1}))+\")\"},l=g([\"react-colorful__alpha\",t]),u=b(100*n.a);return e.createElement(\"div\",{className:l},e.createElement(\"div\",{className:\"react-colorful__alpha-gradient\",style:a}),e.createElement(m,{onMove:function(e){o({a:e.left})},onKey:function(e){o({a:s(n.a+e.left)})},\"aria-label\":\"Alpha\",\"aria-valuetext\":u+\"%\",\"aria-valuenow\":u,\"aria-valuemin\":\"0\",\"aria-valuemax\":\"100\"},e.createElement(p,{className:\"react-colorful__alpha-pointer\",left:n.a,color:k(n)})))},re=function(t){var n=t.className,o=t.colorModel,a=t.color,l=void 0===a?o.defaultColor:a,i=t.onChange,s=c(t,[\"className\",\"colorModel\",\"color\",\"onChange\"]),f=r(null);Q(f);var v=Y(o,l,i),d=v[0],h=v[1],m=g([\"react-colorful\",n]);return e.createElement(\"div\",u({},s,{ref:f,className:m}),e.createElement(T,{hsva:d,onChange:h}),e.createElement(S,{hue:d.h,onChange:h}),e.createElement(ee,{hsva:d,onChange:h,className:\"react-colorful__last-control\"}))},te={defaultColor:\"0001\",toHsva:x,fromHsva:w,equal:X},ne=function(r){return e.createElement(re,u({},r,{colorModel:te}))},oe={defaultColor:{h:0,s:0,l:0,a:1},toHsva:N,fromHsva:y,equal:F},ae=function(r){return e.createElement(re,u({},r,{colorModel:oe}))},le={defaultColor:\"hsla(0, 0%, 0%, 1)\",toHsva:H,fromHsva:k,equal:P},ue=function(r){return e.createElement(re,u({},r,{colorModel:le}))},ce={defaultColor:{h:0,s:0,l:0},toHsva:function(e){return N({h:e.h,s:e.s,l:e.l,a:1})},fromHsva:function(e){return{h:(r=y(e)).h,s:r.s,l:r.l};var r},equal:F},ie=function(r){return e.createElement(U,u({},r,{colorModel:ce}))},se={defaultColor:\"hsl(0, 0%, 0%)\",toHsva:M,fromHsva:q,equal:P},fe=function(r){return e.createElement(U,u({},r,{colorModel:se}))},ve={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:A,equal:F},de=function(r){return e.createElement(re,u({},r,{colorModel:ve}))},he={defaultColor:\"hsva(0, 0%, 0%, 1)\",toHsva:O,fromHsva:function(e){var r=A(e);return\"hsva(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%, \"+r.a+\")\"},equal:P},me=function(r){return e.createElement(re,u({},r,{colorModel:he}))},ge={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var r=A(e);return{h:r.h,s:r.s,v:r.v}},equal:F},pe=function(r){return e.createElement(U,u({},r,{colorModel:ge}))},be={defaultColor:\"hsv(0, 0%, 0%)\",toHsva:j,fromHsva:function(e){var r=A(e);return\"hsv(\"+r.h+\", \"+r.s+\"%, \"+r.v+\"%)\"},equal:P},_e=function(r){return e.createElement(U,u({},r,{colorModel:be}))},xe={defaultColor:{r:0,g:0,b:0,a:1},toHsva:L,fromHsva:I,equal:F},Ce=function(r){return e.createElement(re,u({},r,{colorModel:xe}))},Ee={defaultColor:\"rgba(0, 0, 0, 1)\",toHsva:z,fromHsva:function(e){var r=I(e);return\"rgba(\"+r.r+\", \"+r.g+\", \"+r.b+\", \"+r.a+\")\"},equal:P},He=function(r){return e.createElement(re,u({},r,{colorModel:Ee}))},Me={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return L({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(r=I(e)).r,g:r.g,b:r.b};var r},equal:F},Ne=function(r){return e.createElement(U,u({},r,{colorModel:Me}))},we={defaultColor:\"rgb(0, 0, 0)\",toHsva:B,fromHsva:function(e){var r=I(e);return\"rgb(\"+r.r+\", \"+r.g+\", \"+r.b+\")\"},equal:P},ye=function(r){return e.createElement(U,u({},r,{colorModel:we}))},qe=/^#?([0-9A-F]{3,8})$/i,ke=function(r){var t=r.color,l=void 0===t?\"\":t,s=r.onChange,f=r.onBlur,v=r.escape,d=r.validate,h=r.format,m=r.process,g=c(r,[\"color\",\"onChange\",\"onBlur\",\"escape\",\"validate\",\"format\",\"process\"]),p=o(function(){return v(l)}),b=p[0],_=p[1],x=i(s),C=i(f),E=a(function(e){var r=v(e.target.value);_(r),d(r)&&x(m?m(r):r)},[v,m,d,x]),H=a(function(e){d(e.target.value)||_(v(l)),C(e)},[l,v,d,C]);return n(function(){_(v(l))},[l,v]),e.createElement(\"input\",u({},g,{value:h?h(b):b,spellCheck:\"false\",onChange:E,onBlur:H}))},Ie=function(e){return\"#\"+e},Oe=function(r){var t=r.prefixed,n=r.alpha,o=c(r,[\"prefixed\",\"alpha\"]),l=a(function(e){return e.replace(/([^0-9A-F]+)/gi,\"\").substring(0,n?8:6)},[n]),i=a(function(e){return function(e,r){var t=qe.exec(e),n=t?t[1].length:0;return 3===n||6===n||!!r&&4===n||!!r&&8===n}(e,n)},[n]);return e.createElement(ke,u({},o,{escape:l,format:t?Ie:void 0,process:Ie,validate:i}))};export{ne as HexAlphaColorPicker,Oe as HexColorInput,Z as HexColorPicker,ie as HslColorPicker,fe as HslStringColorPicker,ae as HslaColorPicker,ue as HslaStringColorPicker,pe as HsvColorPicker,_e as HsvStringColorPicker,de as HsvaColorPicker,me as HsvaStringColorPicker,Ne as RgbColorPicker,ye as RgbStringColorPicker,Ce as RgbaColorPicker,He as RgbaStringColorPicker,G as setNonce};\n//# sourceMappingURL=index.module.js.map\n"],"names":["isNode","window","MyMap","Map","s","Object","create","this","get","k","set","val","clear","preparedCache","preparedSearchCache","noResults","total","matchesSimple","matchesStrict","cleanup","defaultScoreFn","a","max","i","length","result","score","getValue","obj","prop","tmp","undefined","segs","Array","isArray","split","len","isObj","x","fastpriorityqueue","r","o","e","n","c","f","add","poll","peek","replaceTop","q","fuzzysortNew","instanceOptions","fuzzysort","single","search","target","options","indexes","getPreparedSearch","getPrepared","allowTypo","algorithm","algorithmNoTypo","go","targets","searchLowerCode","prepareSearch","threshold","limit","resultsLen","limitedCount","targetsLen","keys","scoreFn","keysLen","objResults","keyI","key","_targetLowerCodes","_nextBeginningIndexes","results","goAsync","canceled","p","Promise","resolve","reject","iCurrent","step","startMs","Date","now","setImmediate","setTimeout","cancel","highlight","hOpen","hClose","highlightCallback","highlighted","matchesIndex","opened","targetLen","matchesBest","char","substr","cb","matchI","indexesI","push","prepare","prepareLowerCodes","prepareSlow","prepareNextBeginningIndexes","targetPrepared","searchPrepared","searchLowerCodes","prepared","targetLowerCodes","searchLen","searchI","targetI","typoSimpleI","matchesSimpleLen","typoStrictI","successStrict","matchesStrictLen","nextBeginningIndexes","firstPossibleI","matchesBestLen","lastTargetI","str","strLen","lowerCodes","lower","toLowerCase","charCodeAt","prepareBeginningIndexes","beginningIndexes","beginningIndexesLen","wasUpper","wasAlphanum","targetCode","isUpper","isAlphanum","isBeginning","lastIsBeginning","lastIsBeginningI","new","u","assign","arguments","t","prototype","hasOwnProperty","call","apply","indexOf","current","v","ownerDocument","defaultView","self","d","getBoundingClientRect","identifier","touches","left","pageX","pageXOffset","width","top","pageY","pageYOffset","height","h","preventDefault","m","onMove","l","onKey","g","b","_","buttons","addEventListener","removeEventListener","nativeEvent","changedTouches","focus","which","keyCode","C","E","H","onTouchStart","onMouseDown","className","ref","onKeyDown","tabIndex","role","filter","Boolean","join","color","style","backgroundColor","Math","pow","round","N","PI","y","S","hue","onChange","T","hsva","F","Y","toHsva","equal","fromHsva","V","J","U","colorModel","defaultColor","document","has","createElement","innerHTML","setAttribute","head","appendChild","ce","ie"],"sourceRoot":""}