{"version":3,"file":"smart-array-filter.min.js","sources":["../node_modules/lodash.escaperegexp/index.js","../lib-esm/match/recursiveMatch.js","../lib-esm/match/nativeMatch.js","../lib-esm/match/match.js","../lib-esm/utils/getCheckNumber.js","../lib-esm/utils/getCheckString.js","../lib-esm/utils/convertKeywordsToCriteria.js","../lib-esm/utils/ensureObjectOfRegExps.js","../lib-esm/utils/parseKeywords.js","../lib-esm/index.js"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g,\n    reHasRegExpChar = RegExp(reRegExpChar.source);\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n    symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\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  if (isSymbol(value)) {\n    return symbolToString ? symbolToString.call(value) : '';\n  }\n  var result = (value + '');\n  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n  return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n  return typeof value == 'symbol' ||\n    (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n  return value == null ? '' : baseToString(value);\n}\n\n/**\n * Escapes the `RegExp` special characters \"^\", \"$\", \"\\\", \".\", \"*\", \"+\",\n * \"?\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", and \"|\" in `string`.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to escape.\n * @returns {string} Returns the escaped string.\n * @example\n *\n * _.escapeRegExp('[lodash](https://lodash.com/)');\n * // => '\\[lodash\\]\\(https://lodash\\.com/\\)'\n */\nfunction escapeRegExp(string) {\n  string = toString(string);\n  return (string && reHasRegExpChar.test(string))\n    ? string.replace(reRegExpChar, '\\\\$&')\n    : string;\n}\n\nmodule.exports = escapeRegExp;\n","import nativeMatch from './nativeMatch';\n/**\n * RecursiveMatch.\n *\n * @param element - String | number | Record<string, string>.\n * @param criterium - Criterion.\n * @param keys - String[].\n * @param options - Object.\n * @param options.ignorePaths - RegExp[].\n * @returns Boolean.\n */\nexport default function recursiveMatch(element, criterium, keys, options) {\n    if (typeof element === 'object') {\n        if (Array.isArray(element)) {\n            for (const elm of element) {\n                if (recursiveMatch(elm, criterium, keys, options)) {\n                    return true;\n                }\n            }\n        }\n        else {\n            for (const i in element) {\n                keys.push(i);\n                const didMatch = recursiveMatch(element[i], criterium, keys, options);\n                keys.pop();\n                if (didMatch)\n                    return true;\n            }\n        }\n    }\n    else if (criterium.is) {\n        // we check for the presence of a key (jpath)\n        if (criterium.is.test(keys.join('.'))) {\n            return !!element;\n        }\n        else {\n            return false;\n        }\n    }\n    else {\n        // need to check if keys match\n        const joinedKeys = keys.join('.');\n        for (const ignorePath of options.ignorePaths) {\n            if (ignorePath.test(joinedKeys))\n                return false;\n        }\n        if (criterium.key) {\n            if (!criterium.key.test(joinedKeys))\n                return false;\n        }\n        return nativeMatch(element, criterium);\n    }\n    return false;\n}\n//# sourceMappingURL=recursiveMatch.js.map","/**\n * NativeMatch.\n *\n * @param element - String|number.\n * @param keyword - Criterion.\n * @returns Boolean.\n */\nexport default function nativeMatch(element, keyword) {\n    if (typeof element === 'string') {\n        return keyword.checkString(element);\n    }\n    else if (typeof element === 'number') {\n        return keyword.checkNumber(element);\n    }\n    else {\n        return false;\n    }\n}\n//# sourceMappingURL=nativeMatch.js.map","import recursiveMatch from './recursiveMatch';\n/**\n * Match.\n *\n * @param element - String | number | Record<string, string>.\n * @param criteria - Criterion[].\n * @param predicate - String.\n * @param options - Object.\n * @param options.ignorePaths - RegExp[].\n * @param options.pathAlias - Record<string, string|RegExp>s.\n * @returns Boolean.\n */\nexport default function match(element, criteria, predicate, options) {\n    if (criteria.length) {\n        let found = false;\n        for (const criterion of criteria) {\n            // match XOR negate\n            if (recursiveMatch(element, criterion, [], options)\n                ? !criterion.negate\n                : criterion.negate) {\n                if (predicate === 'OR') {\n                    return true;\n                }\n                found = true;\n            }\n            else if (predicate === 'AND') {\n                return false;\n            }\n        }\n        return found;\n    }\n    return true;\n}\n//# sourceMappingURL=match.js.map","const operators = {\n    '<': function lt(values) {\n        return (number) => {\n            return number < values[0];\n        };\n    },\n    '<=': function lte(values) {\n        return (number) => {\n            return number <= values[0];\n        };\n    },\n    '=': function equal(values) {\n        return (number) => {\n            return number === values[0];\n        };\n    },\n    '>=': function gte(values) {\n        return (number) => {\n            return number >= values[0];\n        };\n    },\n    '>': function gt(values) {\n        return (number) => {\n            return number > values[0];\n        };\n    },\n    '..': function range(values) {\n        return (number) => number >= values[0] && number <= values[1];\n    },\n};\n/**\n * @internal\n */\nexport default function getCheckNumber(keyword) {\n    const { values, operator } = splitNumberOperator(keyword);\n    const checkOperator = operators[operator];\n    if (!checkOperator) {\n        throw new Error(`unknown operator ${operator}`);\n    }\n    return checkOperator(values);\n}\n/**\n * @internal\n */\nexport function splitNumberOperator(keyword) {\n    const match = /^\\s*\\(?\\s*(?<startOperator><=|>=|<|=|>|\\.\\.)?(?<firstValue>-?\\d*\\.?\\d+)(?:(?<afterDots>\\.\\.)(?<secondValue>-?\\d*\\.?\\d*))?\\s*\\)?\\s*$/.exec(keyword);\n    if (!match) {\n        return {\n            operator: '=',\n            values: [Number(keyword)],\n        };\n    }\n    if (!match.groups) {\n        throw new Error('unreachable');\n    }\n    const { startOperator, firstValue, afterDots, secondValue } = match.groups;\n    let operator = startOperator;\n    let values = firstValue ? [Number(firstValue)] : [];\n    // ..12\n    if (startOperator === '..') {\n        operator = '<=';\n    }\n    // 12..\n    else if (!startOperator && afterDots && !secondValue) {\n        operator = '>=';\n    }\n    // 12..14\n    else if (afterDots) {\n        operator = '..';\n    }\n    if (secondValue) {\n        values.push(Number(secondValue));\n    }\n    return {\n        values,\n        operator: operator || '=',\n    };\n}\n//# sourceMappingURL=getCheckNumber.js.map","import escapeRegExp from 'lodash.escaperegexp';\nconst operators = {\n    '<': function lt(query) {\n        return (string) => {\n            return string < query[0];\n        };\n    },\n    '<=': function lte(query) {\n        return (string) => {\n            return string <= query[0];\n        };\n    },\n    '=': function equal(query, insensitive) {\n        const regVal = `^${escapeRegExp(query[0])}$`;\n        const reg = new RegExp(regVal, insensitive);\n        return (string) => {\n            return reg.test(string);\n        };\n    },\n    '~': function fuzzy(query, insensitive) {\n        const regVal = escapeRegExp(query[0]);\n        const reg = new RegExp(regVal, insensitive);\n        return (string) => {\n            return reg.test(string);\n        };\n    },\n    '>=': function lge(query) {\n        return (string) => {\n            return string >= query[0];\n        };\n    },\n    '>': function lg(query) {\n        return (string) => {\n            return string > query[0];\n        };\n    },\n    '..': function range(query) {\n        return (string) => {\n            return string >= query[0] && string <= query[1];\n        };\n    },\n};\n/**\n * GetCheckString.\n *\n * @param keyword - String.\n * @param insensitive - String.\n * @returns CheckString. (string)=>boolean.\n */\nexport default function getCheckString(keyword, insensitive) {\n    const { values, operator } = splitStringOperator(keyword);\n    const operatorCheck = operators[operator];\n    if (!operatorCheck) {\n        throw new Error(`unreachable unknown operator ${operator}`);\n    }\n    return operatorCheck(values, insensitive);\n}\n/**\n * @internal\n */\nexport function splitStringOperator(keyword) {\n    const parts = keyword.split('..');\n    const match = /^\\s*\\(?(?<operator><=|<|=|>=|>)?\\s*(?<value>\\S*)\\s*\\)?$/.exec(parts[0]);\n    if (!match) {\n        // Should never happen\n        return {\n            operator: '~',\n            values: [keyword],\n        };\n    }\n    if (!match.groups) {\n        throw new Error('unreachable');\n    }\n    let { operator, value } = match.groups;\n    let secondQuery = parts[1];\n    let values = [value];\n    if (parts.length > 1) {\n        operator = '..';\n        if (!secondQuery) {\n            operator = '>=';\n        }\n        else if (!value) {\n            values = [secondQuery];\n            operator = '<=';\n        }\n        else {\n            values.push(secondQuery);\n        }\n    }\n    return {\n        operator: operator || '~',\n        values,\n    };\n}\n//# sourceMappingURL=getCheckString.js.map","import escapeRegExp from 'lodash.escaperegexp';\nimport getCheckNumber from './getCheckNumber';\nimport getCheckString from './getCheckString';\n/**\n * @internal\n */\nexport default function convertKeywordsToCriteria(keywords, options) {\n    const { insensitive, pathAlias } = options;\n    return keywords.map((keyword) => {\n        const criterion = {};\n        if (keyword.startsWith('-')) {\n            criterion.negate = true;\n            keyword = keyword.substring(1);\n        }\n        const colon = keyword.indexOf(':');\n        if (colon > -1) {\n            const value = keyword.substring(colon + 1);\n            if (colon > 0) {\n                const key = keyword.substring(0, colon);\n                if (key === 'is') {\n                    // a property path exists\n                    criterion.is = new RegExp(`(^|\\\\.)${escapeRegExp(value)}(\\\\.|$)`, insensitive);\n                }\n                if (pathAlias[key]) {\n                    criterion.key = pathAlias[key];\n                }\n                else {\n                    criterion.key = new RegExp(`(^|\\\\.)${escapeRegExp(key)}(\\\\.|$)`, insensitive);\n                }\n            }\n            fillCriterion(criterion, value, insensitive);\n        }\n        else {\n            fillCriterion(criterion, keyword, insensitive);\n        }\n        return criterion;\n    });\n}\n/**\n * FillCriterion.\n *\n * @param criterion - Criterion.\n * @param keyword - String.\n * @param insensitive - String.\n */\nfunction fillCriterion(criterion, keyword, insensitive) {\n    criterion.checkString = getCheckString(keyword, insensitive);\n    criterion.checkNumber = getCheckNumber(keyword);\n}\n//# sourceMappingURL=convertKeywordsToCriteria.js.map","import escapeRegExp from 'lodash.escaperegexp';\n/**\n * EnsureObjectOfRegExps.\n *\n * @param object  - { [index: string]: string|RegExp }.\n * @param options - Object.\n * @param options.insensitive - String.\n * @returns - Record<string, string|RegExp>.\n */\nexport default function ensureObjectOfRegExps(object, options) {\n    const { insensitive } = options;\n    const toReturn = {};\n    for (const [key, value] of Object.entries(object)) {\n        if (value instanceof RegExp) {\n            toReturn[key] = value;\n        }\n        else {\n            toReturn[key] = new RegExp(`(^|\\\\.)${escapeRegExp(value)}(\\\\.|$)`, insensitive);\n        }\n    }\n    return toReturn;\n}\n//# sourceMappingURL=ensureObjectOfRegExps.js.map","let separators = /[ ;,\\t\\r\\n]/;\n/**\n * Need to convert a string to an array of keywords taking into account single and boule quotes.\n *\n * @param keywords - String.\n * @returns String[].\n */\nexport default function parseKeywords(keywords) {\n    const result = [];\n    let inQuotes = false;\n    let inSeparator = true;\n    let currentWord = [];\n    let previous = '';\n    for (let i = 0; i < keywords.length; i++) {\n        const current = keywords.charAt(i);\n        if (inQuotes) {\n            if (previous === '\"') {\n                // escaped quote\n                if (current === '\"') {\n                    previous = '';\n                    continue;\n                }\n                // end of quoted part\n                currentWord.pop(); // remove last quote that was added\n                inQuotes = false;\n                i--;\n                continue;\n            }\n            currentWord.push(current);\n            previous = current;\n            continue;\n        }\n        if (inSeparator) {\n            // still in separator ?\n            if (separators.test(current)) {\n                previous = current;\n                continue;\n            }\n            inSeparator = false;\n        }\n        // start of quoted part\n        if (current === '\"') {\n            inQuotes = true;\n            previous = '';\n            continue;\n        }\n        // start of separator part\n        if (separators.test(current)) {\n            if (currentWord.length)\n                result.push(currentWord.join(''));\n            currentWord = [];\n            inSeparator = true;\n            continue;\n        }\n        currentWord.push(current);\n        previous = '';\n    }\n    if (previous === '\"')\n        currentWord.pop();\n    if (currentWord.length)\n        result.push(currentWord.join(''));\n    return result;\n}\n//# sourceMappingURL=parseKeywords.js.map","import escapeRegExp from 'lodash.escaperegexp';\nimport match from './match/match';\nimport convertKeywordsToCriteria from './utils/convertKeywordsToCriteria';\nimport ensureObjectOfRegExps from './utils/ensureObjectOfRegExps';\nimport parseKeywords from './utils/parseKeywords';\n/**\n *\n * Filter.\n *\n * @param data - Array to filter.\n * @param [options={}] - Object.\n * @param [options.limit=Infinity] - Maximum number of results.\n * @param [options.caseSensitive=false] - By default we ignore case.\n * @param [options.ignorePaths=[]] - Array of jpath to ignore.\n * @param [options.pathAlias={}] - Key (string), value (string of regexp).\n * @param [options.keywords=[]] - List of keywords used to filter the array.\n * @param [options.index=false] - Returns the indices in the array that match.\n * @param [options.predicate='AND'] - Could be either AND or OR.\n * @returns String[] | number[].\n */\nexport function filter(data, options = {}) {\n    let { index = false, predicate = 'AND', ignorePaths: ignorePathsOption = [], pathAlias: pathAliasOption = {}, } = options;\n    const limit = options.limit ? options.limit : Infinity;\n    const insensitive = options.caseSensitive ? '' : 'i';\n    let keywords = options.keywords || [];\n    const pathAlias = ensureObjectOfRegExps(pathAliasOption, { insensitive });\n    const ignorePaths = ignorePathsOption.map((path) => typeof path === 'string'\n        ? new RegExp(`(^|\\\\.)${escapeRegExp(path)}(\\\\.|$)`, insensitive)\n        : path);\n    if (typeof keywords === 'string') {\n        keywords = parseKeywords(keywords);\n    }\n    const criteria = convertKeywordsToCriteria(keywords, {\n        insensitive,\n        pathAlias,\n    });\n    let matched = 0;\n    if (index) {\n        const result = [];\n        for (let i = 0; i < data.length && matched < limit; i++) {\n            if (match(data[i], criteria, predicate, { ignorePaths, pathAlias })) {\n                matched = result.push(i);\n            }\n        }\n        return result;\n    }\n    else {\n        const result = [];\n        for (let i = 0; i < data.length && matched < limit; i++) {\n            if (match(data[i], criteria, predicate, { ignorePaths, pathAlias })) {\n                matched = result.push(data[i]);\n            }\n        }\n        return result;\n    }\n}\n//# sourceMappingURL=index.js.map"],"names":["symbolTag","reRegExpChar","reHasRegExpChar","RegExp","source","freeGlobal","global","Object","freeSelf","self","root","Function","objectToString","prototype","toString","Symbol","symbolProto","undefined","symbolToString","baseToString","value","isObjectLike","call","isSymbol","result","string","test","replace","recursiveMatch","element","criterium","keys","options","is","join","joinedKeys","ignorePath","ignorePaths","key","keyword","checkString","checkNumber","nativeMatch","Array","isArray","elm","i","push","didMatch","pop","match","criteria","predicate","length","found","criterion","negate","operators","values","number","getCheckNumber","operator","exec","Number","groups","Error","startOperator","firstValue","afterDots","secondValue","splitNumberOperator","checkOperator","query","insensitive","regVal","escapeRegExp","reg","getCheckString","parts","split","secondQuery","splitStringOperator","operatorCheck","convertKeywordsToCriteria","keywords","pathAlias","map","startsWith","substring","colon","indexOf","fillCriterion","ensureObjectOfRegExps","object","toReturn","entries","separators","parseKeywords","inQuotes","inSeparator","currentWord","previous","current","charAt","data","index","ignorePathsOption","pathAliasOption","limit","Infinity","caseSensitive","path","matched"],"mappings":"6YAaIA,EAAY,kBAMZC,EAAe,sBACfC,EAAkBC,OAAOF,EAAaG,QAGtCC,EAA8B,iBAAVC,GAAsBA,GAAUA,EAAOC,SAAWA,QAAUD,EAGhFE,EAA0B,iBAARC,MAAoBA,MAAQA,KAAKF,SAAWA,QAAUE,KAGxEC,EAAOL,GAAcG,GAAYG,SAAS,cAATA,GAUjCC,EAPcL,OAAOM,UAOQC,SAG7BC,EAASL,EAAKK,OAGdC,EAAcD,EAASA,EAAOF,eAAYI,EAC1CC,EAAiBF,EAAcA,EAAYF,cAAWG,EAU1D,SAASE,EAAaC,MAEA,iBAATA,SACFA,KAsDX,SAAkBA,SACO,iBAATA,GAtBhB,SAAsBA,WACXA,GAAyB,iBAATA,EAsBtBC,CAAaD,IAAUR,EAAeU,KAAKF,IAAUpB,EAtDpDuB,CAASH,UACJF,EAAiBA,EAAeI,KAAKF,GAAS,OAEnDI,EAAUJ,EAAQ,SACJ,KAAVI,GAAkB,EAAIJ,IAvDjB,SAuDwC,KAAOI,QA6F9D,SAAsBC,GAnBtB,IAAkBL,SAoBhBK,EAnBgB,OADAL,EAoBEK,GAnBK,GAAKN,EAAaC,KAoBvBlB,EAAgBwB,KAAKD,GACnCA,EAAOE,QAAQ1B,EAAc,QAC7BwB,GCnJQ,SAAUG,EACtBC,EACAC,EACAC,EACAC,MAI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