{“ast”:null,“code”:“function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }nn/**n * @licensen * Lodash ]0x[0-9a-f]
$/i;n /** Used to detect binary string values. */nn var reIsBinary = /^0b[01]+$/i;n /** Used to detect host constructors (Safari). */nn var reIsHostCtor = /^\[object .+?Constructor\]$/;n /** Used to detect octal string values. */nn var reIsOctal = /^0o[0-7]+$/i;n /** Used to detect unsigned integer values. */nn var reIsUint = /^(?:0|[1-9]\d*)$/;n /** Used to match Latin Unicode letters (excluding mathematical operators). */nn var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;n /** Used to ensure capturing order of template delimiters. */nn var reNoMatch = /($^)/;n /** Used to match unescaped characters in compiled string literals. */nn var reUnescapedString = /[’\n\r\u2028\u2029\\]/g;n /** Used to compose unicode character classes. */nn var rsAstralRange = "\\ud800-\\udfff",n rsComboMarksRange = "\\u0300-\\u036f",n reComboHalfMarksRange = "\\ufe20-\\ufe2f",n rsComboSymbolsRange = "\\u20d0-\\u20ff",n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,n rsDingbatRange = "\\u2700-\\u27bf",n rsLowerRange = ‘a-z\\xdf-\\xf6\\xf8-\\xff’,n rsMathOpRange = ‘\\xac\\xb1\\xd7\\xf7’,n rsNonCharRange = ‘\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf’,n rsPunctuationRange = "\\u2000-\\u206f",n rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",n rsUpperRange = ‘A-Z\\xc0-\\xd6\\xd8-\\xde’,n rsVarRange = "\\ufe0e\\ufe0f",n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;n /** Used to compose unicode capture groups. */nn var rsApos = "[‘\u2019]",n rsAstral = ’[‘ + rsAstralRange + ’]‘,n rsBreak = ’[‘ + rsBreakRange + ’]‘,n rsCombo = ’[‘ + rsComboRange + ’]‘,n rsDigits = ’\\d+‘,n rsDingbat = ’[‘ + rsDingbatRange + ’]‘,n rsLower = ’[‘ + rsLowerRange + ’]‘,n rsMisc = ’[^‘ + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ’]‘,n rsFitz = "\\ud83c[\\udffb-\\udfff]",n rsModifier = ’(?:‘ + rsCombo + ’|‘ + rsFitz + ’)‘,n rsNonAstral = ’[^‘ + rsAstralRange + ’]‘,n rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}",n rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]",n rsUpper = ’[‘ + rsUpperRange + ’]‘,n rsZWJ = "\\u200d";n /** Used to compose unicode regexes. */nn var rsMiscLower = ’(?:‘ + rsLower + ’|‘ + rsMisc + ’)‘,n rsMiscUpper = ’(?:‘ + rsUpper + ’|‘ + rsMisc + ’)‘,n rsOptContrLower = ’(?:‘ + rsApos + ’(?:d|ll|m|re|s|t|ve))?‘,n rsOptContrUpper = ’(?:‘ + rsApos + ’(?:D|LL|M|RE|S|T|VE))?‘,n reOptMod = rsModifier + ’?‘,n rsOptVar = ’[‘ + rsVarRange + ’]?‘,n rsOptJoin = ’(?:‘ + rsZWJ + ’(?:‘ + [rsNonAstral, rsRegional, rsSurrPair].join(’|‘) + ’)‘ + rsOptVar + reOptMod + ’)*‘,n rsOrdLower = ’\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])‘,n rsOrdUpper = ’\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])‘,n rsSeq = rsOptVar + reOptMod + rsOptJoin,n rsEmoji = ’(?:‘ + [rsDingbat, rsRegional, rsSurrPair].join(’|‘) + ’)‘ + rsSeq,n rsSymbol = ’(?:‘ + [rsNonAstral + rsCombo + ’?‘, rsCombo, rsRegional, rsSurrPair, rsAstral].join(’|‘) + ’)‘;n /** Used to match apostrophes. */nn var reApos = RegExp(rsApos, ’g’);n /**n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) andn * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).n */nn var reComboMark = RegExp(rsCombo, ‘g’);n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */nn var reUnicode = RegExp(rsFitz + ‘(?=’ + rsFitz + ‘)|’ + rsSymbol + rsSeq, ‘g’);n /** Used to match complex or compound words. */nn var reUnicodeWord = RegExp([rsUpper + ‘?’ + rsLower + ‘+’ + rsOptContrLower + ‘(?=’ + [rsBreak, rsUpper, ‘$’].join(‘|’) + ‘)’, rsMiscUpper + ‘+’ + rsOptContrUpper + ‘(?=’ + [rsBreak, rsUpper + rsMiscLower, ‘$’].join(‘|’) + ‘)’, rsUpper + ‘?’ + rsMiscLower + ‘+’ + rsOptContrLower, rsUpper + ‘+’ + rsOptContrUpper, rsOrdUpper, rsOrdLower, rsDigits, rsEmoji].join(‘|’), ‘g’);n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */nn var reHasUnicode = RegExp(‘[’ + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ‘]’);n /** Used to detect strings that need a more robust regexp to match words. */nn var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9]|[a-zA-Z]|[^a-zA-Z0-9 ]/;n /** Used to assign default `context` object properties. */nn var contextProps = ['Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'];n /** Used to make template sourceURLs easier to identify. */nn var templateCounter = -1;n /** Used to identify `toStringTag` values of typed arrays. */nn var typedArrayTags = {};n typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = true;n typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = typedArrayTags = false;n /** Used to identify `toStringTag` values supported by `_.clone`. */nn var cloneableTags = {};n cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = cloneableTags = true;n cloneableTags = cloneableTags = cloneableTags = false;n /** Used to map Latin Unicode letters to basic Latin letters. */nn var deburredLetters = {n // Latin-1 Supplement block.n '\xc0': 'A',n '\xc1': 'A',n '\xc2': 'A',n '\xc3': 'A',n '\xc4': 'A',n '\xc5': 'A',n '\xe0': 'a',n '\xe1': 'a',n '\xe2': 'a',n '\xe3': 'a',n '\xe4': 'a',n '\xe5': 'a',n '\xc7': 'C',n '\xe7': 'c',n '\xd0': 'D',n '\xf0': 'd',n '\xc8': 'E',n '\xc9': 'E',n '\xca': 'E',n '\xcb': 'E',n '\xe8': 'e',n '\xe9': 'e',n '\xea': 'e',n '\xeb': 'e',n '\xcc': 'I',n '\xcd': 'I',n '\xce': 'I',n '\xcf': 'I',n '\xec': 'i',n '\xed': 'i',n '\xee': 'i',n '\xef': 'i',n '\xd1': 'N',n '\xf1': 'n',n '\xd2': 'O',n '\xd3': 'O',n '\xd4': 'O',n '\xd5': 'O',n '\xd6': 'O',n '\xd8': 'O',n '\xf2': 'o',n '\xf3': 'o',n '\xf4': 'o',n '\xf5': 'o',n '\xf6': 'o',n '\xf8': 'o',n '\xd9': 'U',n '\xda': 'U',n '\xdb': 'U',n '\xdc': 'U',n '\xf9': 'u',n '\xfa': 'u',n '\xfb': 'u',n '\xfc': 'u',n '\xdd': 'Y',n '\xfd': 'y',n '\xff': 'y',n '\xc6': 'Ae',n '\xe6': 'ae',n '\xde': 'Th',n '\xfe': 'th',n '\xdf': 'ss',n // Latin Extended-A block.n "\u0100": 'A',n "\u0102": 'A',n "\u0104": 'A',n "\u0101": 'a',n "\u0103": 'a',n "\u0105": 'a',n "\u0106": 'C',n "\u0108": 'C',n "\u010A": 'C',n "\u010C": 'C',n "\u0107": 'c',n "\u0109": 'c',n "\u010B": 'c',n "\u010D": 'c',n "\u010E": 'D',n "\u0110": 'D',n "\u010F": 'd',n "\u0111": 'd',n "\u0112": 'E',n "\u0114": 'E',n "\u0116": 'E',n "\u0118": 'E',n "\u011A": 'E',n "\u0113": 'e',n "\u0115": 'e',n "\u0117": 'e',n "\u0119": 'e',n "\u011B": 'e',n "\u011C": 'G',n "\u011E": 'G',n "\u0120": 'G',n "\u0122": 'G',n "\u011D": 'g',n "\u011F": 'g',n "\u0121": 'g',n "\u0123": 'g',n "\u0124": 'H',n "\u0126": 'H',n "\u0125": 'h',n "\u0127": 'h',n "\u0128": 'I',n "\u012A": 'I',n "\u012C": 'I',n "\u012E": 'I',n "\u0130": 'I',n "\u0129": 'i',n "\u012B": 'i',n "\u012D": 'i',n "\u012F": 'i',n "\u0131": 'i',n "\u0134": 'J',n "\u0135": 'j',n "\u0136": 'K',n "\u0137": 'k',n "\u0138": 'k',n "\u0139": 'L',n "\u013B": 'L',n "\u013D": 'L',n "\u013F": 'L',n "\u0141": 'L',n "\u013A": 'l',n "\u013C": 'l',n "\u013E": 'l',n "\u0140": 'l',n "\u0142": 'l',n "\u0143": 'N',n "\u0145": 'N',n "\u0147": 'N',n "\u014A": 'N',n "\u0144": 'n',n "\u0146": 'n',n "\u0148": 'n',n "\u014B": 'n',n "\u014C": 'O',n "\u014E": 'O',n "\u0150": 'O',n "\u014D": 'o',n "\u014F": 'o',n "\u0151": 'o',n "\u0154": 'R',n "\u0156": 'R',n "\u0158": 'R',n "\u0155": 'r',n "\u0157": 'r',n "\u0159": 'r',n "\u015A": 'S',n "\u015C": 'S',n "\u015E": 'S',n "\u0160": 'S',n "\u015B": 's',n "\u015D": 's',n "\u015F": 's',n "\u0161": 's',n "\u0162": 'T',n "\u0164": 'T',n "\u0166": 'T',n "\u0163": 't',n "\u0165": 't',n "\u0167": 't',n "\u0168": 'U',n "\u016A": 'U',n "\u016C": 'U',n "\u016E": 'U',n "\u0170": 'U',n "\u0172": 'U',n "\u0169": 'u',n "\u016B": 'u',n "\u016D": 'u',n "\u016F": 'u',n "\u0171": 'u',n "\u0173": 'u',n "\u0174": 'W',n "\u0175": 'w',n "\u0176": 'Y',n "\u0177": 'y',n "\u0178": 'Y',n "\u0179": 'Z',n "\u017B": 'Z',n "\u017D": 'Z',n "\u017A": 'z',n "\u017C": 'z',n "\u017E": 'z',n "\u0132": 'IJ',n "\u0133": 'ij',n "\u0152": 'Oe',n "\u0153": 'oe',n "\u0149": "'n",n "\u017F": 's'n };n /** Used to map characters to HTML entities. */nn var htmlEscapes = {n '&': '&',n '<': '<',n '>': '>',n '"': '"',n "'": '''n };n /** Used to map HTML entities to characters. */nn var htmlUnescapes = {n '&': '&',n '<': '<',n '>': '>',n '"': '"',n ''': "'"n };n /** Used to escape characters for inclusion in compiled string literals. */nn var stringEscapes = {n '\\': '\\',n "'": "'",n '\n': 'n',n '\r': 'r',n "\u2028": 'u2028',n "\u2029": 'u2029'n };n /** Built-in method references without a dependency on `root`. */nn var freeParseFloat = parseFloat,n freeParseInt = parseInt;n /** Detect free variable `global` from Node.js. */nn var freeGlobal = (typeof global === "undefined" ? "undefined" : _typeof(global)) == 'object' && global && global.Object === Object
&& global;n /** Detect free variable `self`. */nn var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object
&& self;n /** Used as a reference to the global object. */nn var root = freeGlobal || freeSelf || Function('return this')();n /** Detect free variable `exports`. */nn var freeExports = (typeof exports === "undefined" ? "undefined" : _typeof(exports)) == 'object' && exports && !exports.nodeType && exports;n /** Detect free variable `module`. */nn var freeModule = freeExports && (typeof module === "undefined" ? "undefined" : _typeof(module)) == 'object' && module && !module.nodeType && module;n /** Detect the popular CommonJS extension `module.exports`. */nn var moduleExports = freeModule && freeModule.exports === freeExports;n /** Detect free variable `process` from Node.js. */nn var freeProcess = moduleExports && freeGlobal.process;n /** Used to access faster Node.js helpers. */nn var nodeUtil = function () {n try {n // Use `util.types` for Node.js 10+.n var types = freeModule && freeModule.require && freeModule.require('util').types;nn if (types) {n return types;n } // Legacy `process.binding('util')` for Node.js < 10.nnn return freeProcess && freeProcess.binding && freeProcess.binding('util');n } catch (e) {}n }();n /* Node.js helper references. */nnn var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,n nodeIsDate = nodeUtil && nodeUtil.isDate,n nodeIsMap = nodeUtil && nodeUtil.isMap,n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,n nodeIsSet = nodeUtil && nodeUtil.isSet,n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;n /————————————————————————–/nn /**n * A faster alternative to `Function#apply`, this function invokes `func`n * with the `this` binding of `thisArg` and the arguments of `args`.n *n * @privaten * @param {Function} func The function to invoke.n * @param {*} thisArg The `this` binding of `func`.n * @param {Array} args The arguments to invoke `func` with.n * @returns {*} Returns the result of `func`.n */nn function apply(func, thisArg, args) {n switch (args.length) {n case 0:n return func.call(thisArg);nn case 1:n return func.call(thisArg, args);nn case 2:n return func.call(thisArg, args, args);nn case 3:n return func.call(thisArg, args, args, args);n }nn return func.apply(thisArg, args);n }n /**n * A specialized version of `baseAggregator` for arrays.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} setter The function to set `accumulator` values.n * @param {Function} iteratee The iteratee to transform keys.n * @param {Object} accumulator The initial aggregated object.n * @returns {Function} Returns `accumulator`.n */nnn function arrayAggregator(array, setter, iteratee, accumulator) {n var index = -1,n length = array == null ? 0 : array.length;nn while (++index < length) {n var value = array;n setter(accumulator, value, iteratee(value), array);n }nn return accumulator;n }n /**n * A specialized version of `_.forEach` for arrays without support forn * iteratee shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array} Returns `array`.n */nnn function arrayEach(array, iteratee) {n var index = -1,n length = array == null ? 0 : array.length;nn while (++index < length) {n if (iteratee(array, index, array) === false) {n break;n }n }nn return array;n }n /**n * A specialized version of `_.forEachRight` for arrays without support forn * iteratee shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array} Returns `array`.n */nnn function arrayEachRight(array, iteratee) {n var length = array == null ? 0 : array.length;nn while (length–) {n if (iteratee(array, length, array) === false) {n break;n }n }nn return array;n }n /**n * A specialized version of `_.every` for arrays without support forn * iteratee shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} predicate The function invoked per iteration.n * @returns {boolean} Returns `true` if all elements pass the predicate check,n * else `false`.n */nnn function arrayEvery(array, predicate) {n var index = -1,n length = array == null ? 0 : array.length;nn while (++index < length) {n if (!predicate(array, index, array)) {n return false;n }n }nn return true;n }n /**n * A specialized version of `_.filter` for arrays without support forn * iteratee shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} predicate The function invoked per iteration.n * @returns {Array} Returns the new filtered array.n */nnn function arrayFilter(array, predicate) {n var index = -1,n length = array == null ? 0 : array.length,n resIndex = 0,n result = [];nn while (++index < length) {n var value = array;nn if (predicate(value, index, array)) {n result = value;n }n }nn return result;n }n /**n * A specialized version of `_.includes` for arrays without support forn * specifying an index to search from.n *n * @privaten * @param {Array} [array] The array to inspect.n * @param {*} target The value to search for.n * @returns {boolean} Returns `true` if `target` is found, else `false`.n */nnn function arrayIncludes(array, value) {n var length = array == null ? 0 : array.length;n return !!length && baseIndexOf(array, value, 0) > -1;n }n /**n * This function is like `arrayIncludes` except that it accepts a comparator.n *n * @privaten * @param {Array} [array] The array to inspect.n * @param {*} target The value to search for.n * @param {Function} comparator The comparator invoked per element.n * @returns {boolean} Returns `true` if `target` is found, else `false`.n */nnn function arrayIncludesWith(array, value, comparator) {n var index = -1,n length = array == null ? 0 : array.length;nn while (++index < length) {n if (comparator(value, array)) {n return true;n }n }nn return false;n }n /**n * A specialized version of `_.map` for arrays without support for iterateen * shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array} Returns the new mapped array.n */nnn function arrayMap(array, iteratee) {n var index = -1,n length = array == null ? 0 : array.length,n result = Array(length);nn while (++index < length) {n result = iteratee(array, index, array);n }nn return result;n }n /**n * Appends the elements of `values` to `array`.n *n * @privaten * @param {Array} array The array to modify.n * @param {Array} values The values to append.n * @returns {Array} Returns `array`.n */nnn function arrayPush(array, values) {n var index = -1,n length = values.length,n offset = array.length;nn while (++index < length) {n array[offset + index] = values;n }nn return array;n }n /**n * A specialized version of `_.reduce` for arrays without support forn * iteratee shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @param {*} [accumulator] The initial value.n * @param {boolean} [initAccum] Specify using the first element of `array` asn * the initial value.n * @returns {*} Returns the accumulated value.n */nnn function arrayReduce(array, iteratee, accumulator, initAccum) {n var index = -1,n length = array == null ? 0 : array.length;nn if (initAccum && length) {n accumulator = array;n }nn while (++index < length) {n accumulator = iteratee(accumulator, array, index, array);n }nn return accumulator;n }n /**n * A specialized version of `_.reduceRight` for arrays without support forn * iteratee shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @param {*} [accumulator] The initial value.n * @param {boolean} [initAccum] Specify using the last element of `array` asn * the initial value.n * @returns {*} Returns the accumulated value.n */nnn function arrayReduceRight(array, iteratee, accumulator, initAccum) {n var length = array == null ? 0 : array.length;nn if (initAccum && length) {n accumulator = array;n }nn while (length–) {n accumulator = iteratee(accumulator, array, length, array);n }nn return accumulator;n }n /**n * A specialized version of `_.some` for arrays without support for iterateen * shorthands.n *n * @privaten * @param {Array} [array] The array to iterate over.n * @param {Function} predicate The function invoked per iteration.n * @returns {boolean} Returns `true` if any element passes the predicate check,n * else `false`.n */nnn function arraySome(array, predicate) {n var index = -1,n length = array == null ? 0 : array.length;nn while (++index < length) {n if (predicate(array, index, array)) {n return true;n }n }nn return false;n }n /**n * Gets the size of an ASCII `string`.n *n * @privaten * @param {string} string The string inspect.n * @returns {number} Returns the string size.n */nnn var asciiSize = baseProperty('length');n /**n * Converts an ASCII `string` to an array.n *n * @privaten * @param {string} string The string to convert.n * @returns {Array} Returns the converted array.n */nn function asciiToArray(string) {n return string.split('');n }n /**n * Splits an ASCII `string` into an array of its words.n *n * @privaten * @param {string} The string to inspect.n * @returns {Array} Returns the words of `string`.n */nnn function asciiWords(string) {n return string.match(reAsciiWord) || [];n }n /**n * The base implementation of methods like `_.findKey` and `_.findLastKey`,n * without support for iteratee shorthands, which iterates over `collection`n * using `eachFunc`.n *n * @privaten * @param {Array|Object} collection The collection to inspect.n * @param {Function} predicate The function invoked per iteration.n * @param {Function} eachFunc The function to iterate over `collection`.n * @returns {*} Returns the found element or its key, else `undefined`.n */nnn function baseFindKey(collection, predicate, eachFunc) {n var result;n eachFunc(collection, function (value, key, collection) {n if (predicate(value, key, collection)) {n result = key;n return false;n }n });n return result;n }n /**n * The base implementation of `_.findIndex` and `_.findLastIndex` withoutn * support for iteratee shorthands.n *n * @privaten * @param {Array} array The array to inspect.n * @param {Function} predicate The function invoked per iteration.n * @param {number} fromIndex The index to search from.n * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {number} Returns the index of the matched value, else `-1`.n */nnn function baseFindIndex(array, predicate, fromIndex, fromRight) {n var length = array.length,n index = fromIndex + (fromRight ? 1 : -1);nn while (fromRight ? index– : ++index < length) {n if (predicate(array, index, array)) {n return index;n }n }nn return -1;n }n /**n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.n *n * @privaten * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @param {number} fromIndex The index to search from.n * @returns {number} Returns the index of the matched value, else `-1`.n */nnn function baseIndexOf(array, value, fromIndex) {n return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);n }n /**n * This function is like `baseIndexOf` except that it accepts a comparator.n *n * @privaten * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @param {number} fromIndex The index to search from.n * @param {Function} comparator The comparator invoked per element.n * @returns {number} Returns the index of the matched value, else `-1`.n */nnn function baseIndexOfWith(array, value, fromIndex, comparator) {n var index = fromIndex - 1,n length = array.length;nn while (++index < length) {n if (comparator(array, value)) {n return index;n }n }nn return -1;n }n /**n * The base implementation of `_.isNaN` without support for number objects.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.n */nnn function baseIsNaN(value) {n return value !== value;n }n /**n * The base implementation of `_.mean` and `_.meanBy` without support forn * iteratee shorthands.n *n * @privaten * @param {Array} array The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {number} Returns the mean.n */nnn function baseMean(array, iteratee) {n var length = array == null ? 0 : array.length;n return length ? baseSum(array, iteratee) / length : NAN;n }n /**n * The base implementation of `_.property` without support for deep paths.n *n * @privaten * @param {string} key The key of the property to get.n * @returns {Function} Returns the new accessor function.n */nnn function baseProperty(key) {n return function (object) {n return object == null ? undefined : object;n };n }n /**n * The base implementation of `_.propertyOf` without support for deep paths.n *n * @privaten * @param {Object} object The object to query.n * @returns {Function} Returns the new accessor function.n */nnn function basePropertyOf(object) {n return function (key) {n return object == null ? undefined : object;n };n }n /**n * The base implementation of `_.reduce` and `_.reduceRight`, without supportn * for iteratee shorthands, which iterates over `collection` using `eachFunc`.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @param {*} accumulator The initial value.n * @param {boolean} initAccum Specify using the first or last element ofn * `collection` as the initial value.n * @param {Function} eachFunc The function to iterate over `collection`.n * @returns {*} Returns the accumulated value.n */nnn function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {n eachFunc(collection, function (value, index, collection) {n accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection);n });n return accumulator;n }n /**n * The base implementation of `_.sortBy` which uses `comparer` to define then * sort order of `array` and replaces criteria objects with their correspondingn * values.n *n * @privaten * @param {Array} array The array to sort.n * @param {Function} comparer The function to define sort order.n * @returns {Array} Returns `array`.n */nnn function baseSortBy(array, comparer) {n var length = array.length;n array.sort(comparer);nn while (length–) {n array = array.value;n }nn return array;n }n /**n * The base implementation of `_.sum` and `_.sumBy` without support forn * iteratee shorthands.n *n * @privaten * @param {Array} array The array to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {number} Returns the sum.n */nnn function baseSum(array, iteratee) {n var result,n index = -1,n length = array.length;nn while (++index < length) {n var current = iteratee(array);nn if (current !== undefined) {n result = result === undefined ? current : result + current;n }n }nn return result;n }n /**n * The base implementation of `_.times` without support for iteratee shorthandsn * or max array length checks.n *n * @privaten * @param {number} n The number of times to invoke `iteratee`.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array} Returns the array of results.n */nnn function baseTimes(n, iteratee) {n var index = -1,n result = Array(n);nn while (++index < n) {n result = iteratee(index);n }nn return result;n }n /**n * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an arrayn * of key-value pairs for `object` corresponding to the property names of `props`.n *n * @privaten * @param {Object} object The object to query.n * @param {Array} props The property names to get values for.n * @returns {Object} Returns the key-value pairs.n */nnn function baseToPairs(object, props) {n return arrayMap(props, function (key) {n return [key, object];n });n }n /**n * The base implementation of `_.unary` without support for storing metadata.n *n * @privaten * @param {Function} func The function to cap arguments for.n * @returns {Function} Returns the new capped function.n */nnn function baseUnary(func) {n return function (value) {n return func(value);n };n }n /**n * The base implementation of `_.values` and `_.valuesIn` which creates ann * array of `object` property values corresponding to the property namesn * of `props`.n *n * @privaten * @param {Object} object The object to query.n * @param {Array} props The property names to get values for.n * @returns {Object} Returns the array of property values.n */nnn function baseValues(object, props) {n return arrayMap(props, function (key) {n return object;n });n }n /**n * Checks if a `cache` value for `key` exists.n *n * @privaten * @param {Object} cache The cache to query.n * @param {string} key The key of the entry to check.n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.n */nnn function cacheHas(cache, key) {n return cache.has(key);n }n /**n * Used by `_.trim` and `_.trimStart` to get the index of the first string symboln * that is not found in the character symbols.n *n * @privaten * @param {Array} strSymbols The string symbols to inspect.n * @param {Array} chrSymbols The character symbols to find.n * @returns {number} Returns the index of the first unmatched string symbol.n */nnn function charsStartIndex(strSymbols, chrSymbols) {n var index = -1,n length = strSymbols.length;nn while (++index < length && baseIndexOf(chrSymbols, strSymbols, 0) > -1) {}nn return index;n }n /**n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symboln * that is not found in the character symbols.n *n * @privaten * @param {Array} strSymbols The string symbols to inspect.n * @param {Array} chrSymbols The character symbols to find.n * @returns {number} Returns the index of the last unmatched string symbol.n */nnn function charsEndIndex(strSymbols, chrSymbols) {n var index = strSymbols.length;nn while (index– && baseIndexOf(chrSymbols, strSymbols, 0) > -1) {}nn return index;n }n /**n * Gets the number of `placeholder` occurrences in `array`.n *n * @privaten * @param {Array} array The array to inspect.n * @param {*} placeholder The placeholder to search for.n * @returns {number} Returns the placeholder count.n */nnn function countHolders(array, placeholder) {n var length = array.length,n result = 0;nn while (length–) {n if (array === placeholder) {n ++result;n }n }nn return result;n }n /**n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-An * letters to basic Latin letters.n *n * @privaten * @param {string} letter The matched letter to deburr.n * @returns {string} Returns the deburred letter.n */nnn var deburrLetter = basePropertyOf(deburredLetters);n /**n * Used by `_.escape` to convert characters to HTML entities.n *n * @privaten * @param {string} chr The matched character to escape.n * @returns {string} Returns the escaped character.n */nn var escapeHtmlChar = basePropertyOf(htmlEscapes);n /**n * Used by `_.template` to escape characters for inclusion in compiled string literals.n *n * @privaten * @param {string} chr The matched character to escape.n * @returns {string} Returns the escaped character.n */nn function escapeStringChar(chr) {n return '\\' + stringEscapes;n }n /**n * Gets the value at `key` of `object`.n *n * @privaten * @param {Object} [object] The object to query.n * @param {string} key The key of the property to get.n * @returns {*} Returns the property value.n */nnn function getValue(object, key) {n return object == null ? undefined : object;n }n /**n * Checks if `string` contains Unicode symbols.n *n * @privaten * @param {string} string The string to inspect.n * @returns {boolean} Returns `true` if a symbol is found, else `false`.n */nnn function hasUnicode(string) {n return reHasUnicode.test(string);n }n /**n * Checks if `string` contains a word composed of Unicode symbols.n *n * @privaten * @param {string} string The string to inspect.n * @returns {boolean} Returns `true` if a word is found, else `false`.n */nnn function hasUnicodeWord(string) {n return reHasUnicodeWord.test(string);n }n /**n * Converts `iterator` to an array.n *n * @privaten * @param {Object} iterator The iterator to convert.n * @returns {Array} Returns the converted array.n */nnn function iteratorToArray(iterator) {n var data,n result = [];nn while (!(data = iterator.next()).done) {n result.push(data.value);n }nn return result;n }n /**n * Converts `map` to its key-value pairs.n *n * @privaten * @param {Object} map The map to convert.n * @returns {Array} Returns the key-value pairs.n */nnn function mapToArray(map) {n var index = -1,n result = Array(map.size);n map.forEach(function (value, key) {n result = [key, value];n });n return result;n }n /**n * Creates a unary function that invokes `func` with its argument transformed.n *n * @privaten * @param {Function} func The function to wrap.n * @param {Function} transform The argument transform.n * @returns {Function} Returns the new function.n */nnn function overArg(func, transform) {n return function (arg) {n return func(transform(arg));n };n }n /**n * Replaces all `placeholder` elements in `array` with an internal placeholdern * and returns an array of their indexes.n *n * @privaten * @param {Array} array The array to modify.n * @param {*} placeholder The placeholder to replace.n * @returns {Array} Returns the new array of placeholder indexes.n */nnn function replaceHolders(array, placeholder) {n var index = -1,n length = array.length,n resIndex = 0,n result = [];nn while (++index < length) {n var value = array;nn if (value === placeholder || value === PLACEHOLDER) {n array = PLACEHOLDER;n result = index;n }n }nn return result;n }n /**n * Converts `set` to an array of its values.n *n * @privaten * @param {Object} set The set to convert.n * @returns {Array} Returns the values.n */nnn function setToArray(set) {n var index = -1,n result = Array(set.size);n set.forEach(function (value) {n result = value;n });n return result;n }n /**n * Converts `set` to its value-value pairs.n *n * @privaten * @param {Object} set The set to convert.n * @returns {Array} Returns the value-value pairs.n */nnn function setToPairs(set) {n var index = -1,n result = Array(set.size);n set.forEach(function (value) {n result = [value, value];n });n return result;n }n /**n * A specialized version of `_.indexOf` which performs strict equalityn * comparisons of values, i.e. `===`.n *n * @privaten * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @param {number} fromIndex The index to search from.n * @returns {number} Returns the index of the matched value, else `-1`.n */nnn function strictIndexOf(array, value, fromIndex) {n var index = fromIndex - 1,n length = array.length;nn while (++index < length) {n if (array === value) {n return index;n }n }nn return -1;n }n /**n * A specialized version of `_.lastIndexOf` which performs strict equalityn * comparisons of values, i.e. `===`.n *n * @privaten * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @param {number} fromIndex The index to search from.n * @returns {number} Returns the index of the matched value, else `-1`.n */nnn function strictLastIndexOf(array, value, fromIndex) {n var index = fromIndex + 1;nn while (index–) {n if (array === value) {n return index;n }n }nn return index;n }n /**n * Gets the number of symbols in `string`.n *n * @privaten * @param {string} string The string to inspect.n * @returns {number} Returns the string size.n */nnn function stringSize(string) {n return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);n }n /**n * Converts `string` to an array.n *n * @privaten * @param {string} string The string to convert.n * @returns {Array} Returns the converted array.n */nnn function stringToArray(string) {n return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);n }n /**n * Used by `_.unescape` to convert HTML entities to characters.n *n * @privaten * @param {string} chr The matched character to unescape.n * @returns {string} Returns the unescaped character.n */nnn var unescapeHtmlChar = basePropertyOf(htmlUnescapes);n /**n * Gets the size of a Unicode `string`.n *n * @privaten * @param {string} string The string inspect.n * @returns {number} Returns the string size.n */nn function unicodeSize(string) {n var result = reUnicode.lastIndex = 0;nn while (reUnicode.test(string)) {n ++result;n }nn return result;n }n /**n * Converts a Unicode `string` to an array.n *n * @privaten * @param {string} string The string to convert.n * @returns {Array} Returns the converted array.n */nnn function unicodeToArray(string) {n return string.match(reUnicode) || [];n }n /**n * Splits a Unicode `string` into an array of its words.n *n * @privaten * @param {string} The string to inspect.n * @returns {Array} Returns the words of `string`.n */nnn function unicodeWords(string) {n return string.match(reUnicodeWord) || [];n }n /————————————————————————–/nn /**n * Create a new pristine `lodash` function using the `context` object.n *n * @staticn * @memberOf _n * @since 1.1.0n * @category Utiln * @param {Object} [context=root] The context object.n * @returns {Function} Returns a new `lodash` function.n * @examplen *n * _.mixin({ 'foo': _.constant('foo') });n *n * var lodash = _.runInContext();n * lodash.mixin({ 'bar': lodash.constant('bar') });n *n * .isFunction(.foo);n * // => truen * .isFunction(.bar);n * // => falsen *n * lodash.isFunction(lodash.foo);n * // => falsen * lodash.isFunction(lodash.bar);n * // => truen *n * // Create a suped-up `defer` in Node.js.n * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;n */nnn var runInContext = function runInContext(context) {n context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));n /** Built-in constructor references. */nn var Array = context.Array,n Date = context.Date,n Error = context.Error,n Function
= context.Function,n Math = context.Math,n Object
= context.Object,n RegExp = context.RegExp,n String = context.String,n TypeError = context.TypeError;n /** Used for built-in method references. */nn var arrayProto = Array.prototype,n funcProto = Function.prototype,n objectProto = Object.prototype;n /** Used to detect overreaching core-js shims. */nn var coreJsData = context[‘core-js_shared’];n /** Used to resolve the decompiled source of functions. */nn var funcToString = funcProto.toString;n /** Used to check objects for own properties. */nn var hasOwnProperty = objectProto.hasOwnProperty;n /** Used to generate unique IDs. */nn var idCounter = 0;n /** Used to detect methods masquerading as native. */nn var maskSrcKey = function () {n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');n return uid ? 'Symbol(src)_1.' + uid : '';n }();n /**n * Used to resolve then * [`toStringTag`](ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)n * of values.n */nnn var nativeObjectToString = objectProto.toString;n /** Used to infer the `Object` constructor. */nn var objectCtorString = funcToString.call(Object
);n /** Used to restore the original `_` reference in `_.noConflict`. */nn var oldDash = root._;n /** Used to detect if a method is native. */nn var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$');n /** Built-in value references. */nn var Buffer = moduleExports ? context.Buffer : undefined,n _Symbol = context.Symbol,n Uint8Array = context.Uint8Array,n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,n getPrototype = overArg(Object.getPrototypeOf, Object
),n objectCreate = Object.create,n propertyIsEnumerable = objectProto.propertyIsEnumerable,n splice = arrayProto.splice,n spreadableSymbol = _Symbol ? _Symbol.isConcatSpreadable : undefined,n symIterator = _Symbol ? _Symbol.iterator : undefined,n symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;nn var defineProperty = function () {n try {n var func = getNative(Object
, 'defineProperty');n func({}, '', {});n return func;n } catch (e) {}n }();n /** Mocked built-ins. */nnn var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,n ctxNow = Date && Date.now !== root.Date.now && Date.now,n ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;n /* Built-in method references for those with the same name as other `lodash` methods. */nn var nativeCeil = Math.ceil,n nativeFloor = Math.floor,n nativeGetSymbols = Object.getOwnPropertySymbols,n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,n nativeIsFinite = context.isFinite,n nativeJoin = arrayProto.join,n nativeKeys = overArg(Object.keys, Object
),n nativeMax = Math.max,n nativeMin = Math.min,n nativeNow = Date.now,n nativeParseInt = context.parseInt,n nativeRandom = Math.random,n nativeReverse = arrayProto.reverse;n /* Built-in method references that are verified to be native. */nn var DataView = getNative(context, 'DataView'),n Map = getNative(context, 'Map'),n Promise = getNative(context, 'Promise'),n Set = getNative(context, 'Set'),n WeakMap = getNative(context, 'WeakMap'),n nativeCreate = getNative(Object
, 'create');n /** Used to store function metadata. */nn var metaMap = WeakMap && new WeakMap();n /** Used to lookup unminified function names. */nn var realNames = {};n /** Used to detect maps, sets, and weakmaps. */nn var dataViewCtorString = toSource(DataView),n mapCtorString = toSource(Map),n promiseCtorString = toSource(Promise),n setCtorString = toSource(Set),n weakMapCtorString = toSource(WeakMap);n /** Used to convert symbols to primitives and strings. */nn var symbolProto = _Symbol ? _Symbol.prototype : undefined,n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,n symbolToString = symbolProto ? symbolProto.toString : undefined;n /————————————————————————/nn /**n * Creates a `lodash` object which wraps `value` to enable implicit methodn * chain sequences. Methods that operate on and return arrays, collections,n * and functions can be chained together. Methods that retrieve a single valuen * or may return a primitive value will automatically end the chain sequencen * and return the unwrapped value. Otherwise, the value must be unwrappedn * with `_#value`.n *n * Explicit chain sequences, which must be unwrapped with `_#value`, may ben * enabled using `_.chain`.n *n * The execution of chained methods is lazy, that is, it's deferred untiln * `_#value` is implicitly or explicitly called.n *n * Lazy evaluation allows several methods to support shortcut fusion.n * Shortcut fusion is an optimization to merge iteratee calls; this avoidsn * the creation of intermediate arrays and can greatly reduce the number ofn * iteratee executions. Sections of a chain sequence qualify for shortcutn * fusion if the section is applied to an array and iteratees accept onlyn * one argument. The heuristic for whether a section qualifies for shortcutn * fusion is subject to change.n *n * Chaining is supported in custom builds as long as the `_#value` method isn * directly or indirectly included in the build.n *n * In addition to lodash methods, wrappers have `Array` and `String` methods.n *n * The wrapper `Array` methods are:n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`n *n * The wrapper `String` methods are:n * `replace` and `split`n *n * The wrapper methods that support shortcut fusion are:n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`n *n * The chainable wrapper methods are:n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,n * `zipObject`, `zipObjectDeep`, and `zipWith`n *n * The wrapper methods that are not chainable by default are:n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,n * `upperFirst`, `value`, and `words`n *n * @name _n * @constructorn * @category Seqn * @param {*} value The value to wrap in a `lodash` instance.n * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * function square(n) {n * return n * n;n * }n *n * var wrapped = _([1, 2, 3]);n *n * // Returns an unwrapped value.n * wrapped.reduce(_.add);n * // => 6n *n * // Returns a wrapped value.n * var squares = wrapped.map(square);n *n * _.isArray(squares);n * // => falsen *n * _.isArray(squares.value());n * // => truen */nn function lodash(value) {n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {n if (value instanceof LodashWrapper) {n return value;n }nn if (hasOwnProperty.call(value, '__wrapped__')) {n return wrapperClone(value);n }n }nn return new LodashWrapper(value);n }n /**n * The base implementation of `_.create` without support for assigningn * properties to the created object.n *n * @privaten * @param {Object} proto The object to inherit from.n * @returns {Object} Returns the new object.n */nnn var baseCreate = function () {n function object() {}nn return function (proto) {n if (!isObject(proto)) {n return {};n }nn if (objectCreate) {n return objectCreate(proto);n }nn object.prototype = proto;n var result = new object();n object.prototype = undefined;n return result;n };n }();n /**n * The function whose prototype chain sequence wrappers inherit from.n *n * @privaten */nnn function baseLodash() {} // No operation performed.nn /**n * The base constructor for creating `lodash` wrapper objects.n *n * @privaten * @param {*} value The value to wrap.n * @param {boolean} [chainAll] Enable explicit method chain sequences.n */nnn function LodashWrapper(value, chainAll) {n this.__wrapped__ = value;n this.__actions__ = [];n this.__chain__ = !!chainAll;n this.__index__ = 0;n this.__values__ = undefined;n }n /**n * By default, the template delimiters used by lodash are like those inn * embedded Ruby (ERB) as well as ES2015 template strings. Change then * following template settings to use alternative delimiters.n *n * @staticn * @memberOf _n * @type {Object}n */nnn lodash.templateSettings = {n /**n * Used to detect `data` property values to be HTML-escaped.n *n * @memberOf _.templateSettingsn * @type {RegExp}n */n 'escape': reEscape,nn /**n * Used to detect code to be evaluated.n *n * @memberOf _.templateSettingsn * @type {RegExp}n */n 'evaluate': reEvaluate,nn /**n * Used to detect `data` property values to inject.n *n * @memberOf _.templateSettingsn * @type {RegExp}n */n 'interpolate': reInterpolate,nn /**n * Used to reference the data object in the template text.n *n * @memberOf _.templateSettingsn * @type {string}n */n 'variable': '',nn /**n * Used to import variables into the compiled template.n *n * @memberOf _.templateSettingsn * @type {Object}n */n 'imports': {n /**n * A reference to the `lodash` function.n *n * @memberOf _.templateSettings.importsn * @type {Function}n */n '_': lodashn }n }; // Ensure wrappers are instances of `baseLodash`.nn lodash.prototype = baseLodash.prototype;n lodash.prototype.constructor = lodash;n LodashWrapper.prototype = baseCreate(baseLodash.prototype);n LodashWrapper.prototype.constructor = LodashWrapper;n /————————————————————————/nn /**n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.n *n * @privaten * @constructorn * @param {*} value The value to wrap.n */nn function LazyWrapper(value) {n this.__wrapped__ = value;n this.__actions__ = [];n this.__dir__ = 1;n this.__filtered__ = false;n this.__iteratees__ = [];n this.__takeCount__ = MAX_ARRAY_LENGTH;n this.__views__ = [];n }n /**n * Creates a clone of the lazy wrapper object.n *n * @privaten * @name clonen * @memberOf LazyWrappern * @returns {Object} Returns the cloned `LazyWrapper` object.n */nnn function lazyClone() {n var result = new LazyWrapper(this.__wrapped__);n result.__actions__ = copyArray(this.__actions__);n result.__dir__ = this.__dir__;n result.__filtered__ = this.__filtered__;n result.__iteratees__ = copyArray(this.__iteratees__);n result.__takeCount__ = this.__takeCount__;n result.__views__ = copyArray(this.__views__);n return result;n }n /**n * Reverses the direction of lazy iteration.n *n * @privaten * @name reversen * @memberOf LazyWrappern * @returns {Object} Returns the new reversed `LazyWrapper` object.n */nnn function lazyReverse() {n if (this.__filtered__) {n var result = new LazyWrapper(this);n result.__dir__ = -1;n result.__filtered__ = true;n } else {n result = this.clone();n result.__dir__ *= -1;n }nn return result;n }n /**n * Extracts the unwrapped value from its lazy wrapper.n *n * @privaten * @name valuen * @memberOf LazyWrappern * @returns {*} Returns the unwrapped value.n */nnn function lazyValue() {n var array = this.__wrapped__.value(),n dir = this.__dir__,n isArr = isArray(array),n isRight = dir < 0,n arrLength = isArr ? array.length : 0,n view = getView(0, arrLength, this.__views__),n start = view.start,n end = view.end,n length = end - start,n index = isRight ? end : start - 1,n iteratees = this.__iteratees__,n iterLength = iteratees.length,n resIndex = 0,n takeCount = nativeMin(length, this.__takeCount__);nn if (!isArr || !isRight && arrLength == length && takeCount == length) {n return baseWrapperValue(array, this.__actions__);n }nn var result = [];nn outer: while (length– && resIndex < takeCount) {n index += dir;n var iterIndex = -1,n value = array;nn while (++iterIndex < iterLength) {n var data = iteratees,n iteratee = data.iteratee,n type = data.type,n computed = iteratee(value);nn if (type == LAZY_MAP_FLAG) {n value = computed;n } else if (!computed) {n if (type == LAZY_FILTER_FLAG) {n continue outer;n } else {n break outer;n }n }n }nn result = value;n }nn return result;n } // Ensure `LazyWrapper` is an instance of `baseLodash`.nnn LazyWrapper.prototype = baseCreate(baseLodash.prototype);n LazyWrapper.prototype.constructor = LazyWrapper;n /————————————————————————/nn /**n * Creates a hash object.n *n * @privaten * @constructorn * @param {Array} [entries] The key-value pairs to cache.n */nn function Hash(entries) {n var index = -1,n length = entries == null ? 0 : entries.length;n this.clear();nn while (++index < length) {n var entry = entries;n this.set(entry, entry);n }n }n /**n * Removes all key-value entries from the hash.n *n * @privaten * @name clearn * @memberOf Hashn */nnn function hashClear() {n this.__data__ = nativeCreate ? nativeCreate(null) : {};n this.size = 0;n }n /**n * Removes `key` and its value from the hash.n *n * @privaten * @name deleten * @memberOf Hashn * @param {Object} hash The hash to modify.n * @param {string} key The key of the value to remove.n * @returns {boolean} Returns `true` if the entry was removed, else `false`.n */nnn function hashDelete(key) {n var result = this.has(key) && delete this.__data__;n this.size -= result ? 1 : 0;n return result;n }n /**n * Gets the hash value for `key`.n *n * @privaten * @name getn * @memberOf Hashn * @param {string} key The key of the value to get.n * @returns {*} Returns the entry value.n */nnn function hashGet(key) {n var data = this.__data__;nn if (nativeCreate) {n var result = data;n return result === HASH_UNDEFINED ? undefined : result;n }nn return hasOwnProperty.call(data, key) ? data : undefined;n }n /**n * Checks if a hash value for `key` exists.n *n * @privaten * @name hasn * @memberOf Hashn * @param {string} key The key of the entry to check.n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.n */nnn function hashHas(key) {n var data = this.__data__;n return nativeCreate ? data !== undefined : hasOwnProperty.call(data, key);n }n /**n * Sets the hash `key` to `value`.n *n * @privaten * @name setn * @memberOf Hashn * @param {string} key The key of the value to set.n * @param {*} value The value to set.n * @returns {Object} Returns the hash instance.n */nnn function hashSet(key, value) {n var data = this.__data__;n this.size += this.has(key) ? 0 : 1;n data = nativeCreate && value === undefined ? HASH_UNDEFINED : value;n return this;n } // Add methods to `Hash`.nnn Hash.prototype.clear = hashClear;n Hash.prototype = hashDelete;n Hash.prototype.get = hashGet;n Hash.prototype.has = hashHas;n Hash.prototype.set = hashSet;n /————————————————————————/nn /**n * Creates an list cache object.n *n * @privaten * @constructorn * @param {Array} [entries] The key-value pairs to cache.n */nn function ListCache(entries) {n var index = -1,n length = entries == null ? 0 : entries.length;n this.clear();nn while (++index < length) {n var entry = entries;n this.set(entry, entry);n }n }n /**n * Removes all key-value entries from the list cache.n *n * @privaten * @name clearn * @memberOf ListCachen */nnn function listCacheClear() {n this.__data__ = [];n this.size = 0;n }n /**n * Removes `key` and its value from the list cache.n *n * @privaten * @name deleten * @memberOf ListCachen * @param {string} key The key of the value to remove.n * @returns {boolean} Returns `true` if the entry was removed, else `false`.n */nnn function listCacheDelete(key) {n var data = this.__data__,n index = assocIndexOf(data, key);nn if (index < 0) {n return false;n }nn var lastIndex = data.length - 1;nn if (index == lastIndex) {n data.pop();n } else {n splice.call(data, index, 1);n }nn –this.size;n return true;n }n /**n * Gets the list cache value for `key`.n *n * @privaten * @name getn * @memberOf ListCachen * @param {string} key The key of the value to get.n * @returns {*} Returns the entry value.n */nnn function listCacheGet(key) {n var data = this.__data__,n index = assocIndexOf(data, key);n return index < 0 ? undefined : data[1];n }n /**n * Checks if a list cache value for `key` exists.n *n * @privaten * @name hasn * @memberOf ListCachen * @param {string} key The key of the entry to check.n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.n */nnn function listCacheHas(key) {n return assocIndexOf(this.__data__, key) > -1;n }n /**n * Sets the list cache `key` to `value`.n *n * @privaten * @name setn * @memberOf ListCachen * @param {string} key The key of the value to set.n * @param {*} value The value to set.n * @returns {Object} Returns the list cache instance.n */nnn function listCacheSet(key, value) {n var data = this.__data__,n index = assocIndexOf(data, key);nn if (index < 0) {n ++this.size;n data.push([key, value]);n } else {n data[1] = value;n }nn return this;n } // Add methods to `ListCache`.nnn ListCache.prototype.clear = listCacheClear;n ListCache.prototype = listCacheDelete;n ListCache.prototype.get = listCacheGet;n ListCache.prototype.has = listCacheHas;n ListCache.prototype.set = listCacheSet;n /————————————————————————/nn /**n * Creates a map cache object to store key-value pairs.n *n * @privaten * @constructorn * @param {Array} [entries] The key-value pairs to cache.n */nn function MapCache(entries) {n var index = -1,n length = entries == null ? 0 : entries.length;n this.clear();nn while (++index < length) {n var entry = entries;n this.set(entry, entry);n }n }n /**n * Removes all key-value entries from the map.n *n * @privaten * @name clearn * @memberOf MapCachen */nnn function mapCacheClear() {n this.size = 0;n this.__data__ = {n 'hash': new Hash(),n 'map': new (Map || ListCache)(),n 'string': new Hash()n };n }n /**n * Removes `key` and its value from the map.n *n * @privaten * @name deleten * @memberOf MapCachen * @param {string} key The key of the value to remove.n * @returns {boolean} Returns `true` if the entry was removed, else `false`.n */nnn function mapCacheDelete(key) {n var result = getMapData(this, key)(key);n this.size -= result ? 1 : 0;n return result;n }n /**n * Gets the map value for `key`.n *n * @privaten * @name getn * @memberOf MapCachen * @param {string} key The key of the value to get.n * @returns {*} Returns the entry value.n */nnn function mapCacheGet(key) {n return getMapData(this, key).get(key);n }n /**n * Checks if a map value for `key` exists.n *n * @privaten * @name hasn * @memberOf MapCachen * @param {string} key The key of the entry to check.n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.n */nnn function mapCacheHas(key) {n return getMapData(this, key).has(key);n }n /**n * Sets the map `key` to `value`.n *n * @privaten * @name setn * @memberOf MapCachen * @param {string} key The key of the value to set.n * @param {*} value The value to set.n * @returns {Object} Returns the map cache instance.n */nnn function mapCacheSet(key, value) {n var data = getMapData(this, key),n size = data.size;n data.set(key, value);n this.size += data.size == size ? 0 : 1;n return this;n } // Add methods to `MapCache`.nnn MapCache.prototype.clear = mapCacheClear;n MapCache.prototype = mapCacheDelete;n MapCache.prototype.get = mapCacheGet;n MapCache.prototype.has = mapCacheHas;n MapCache.prototype.set = mapCacheSet;n /————————————————————————/nn /**n *n * Creates an array cache object to store unique values.n *n * @privaten * @constructorn * @param {Array} [values] The values to cache.n */nn function SetCache(values) {n var index = -1,n length = values == null ? 0 : values.length;n this.__data__ = new MapCache();nn while (++index < length) {n this.add(values);n }n }n /**n * Adds `value` to the array cache.n *n * @privaten * @name addn * @memberOf SetCachen * @alias pushn * @param {*} value The value to cache.n * @returns {Object} Returns the cache instance.n */nnn function setCacheAdd(value) {n this.__data__.set(value, HASH_UNDEFINED);nn return this;n }n /**n * Checks if `value` is in the array cache.n *n * @privaten * @name hasn * @memberOf SetCachen * @param {*} value The value to search for.n * @returns {number} Returns `true` if `value` is found, else `false`.n */nnn function setCacheHas(value) {n return this.__data__.has(value);n } // Add methods to `SetCache`.nnn SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;n SetCache.prototype.has = setCacheHas;n /————————————————————————/nn /**n * Creates a stack cache object to store key-value pairs.n *n * @privaten * @constructorn * @param {Array} [entries] The key-value pairs to cache.n */nn function Stack(entries) {n var data = this.__data__ = new ListCache(entries);n this.size = data.size;n }n /**n * Removes all key-value entries from the stack.n *n * @privaten * @name clearn * @memberOf Stackn */nnn function stackClear() {n this.__data__ = new ListCache();n this.size = 0;n }n /**n * Removes `key` and its value from the stack.n *n * @privaten * @name deleten * @memberOf Stackn * @param {string} key The key of the value to remove.n * @returns {boolean} Returns `true` if the entry was removed, else `false`.n */nnn function stackDelete(key) {n var data = this.__data__,n result = data(key);n this.size = data.size;n return result;n }n /**n * Gets the stack value for `key`.n *n * @privaten * @name getn * @memberOf Stackn * @param {string} key The key of the value to get.n * @returns {*} Returns the entry value.n */nnn function stackGet(key) {n return this.__data__.get(key);n }n /**n * Checks if a stack value for `key` exists.n *n * @privaten * @name hasn * @memberOf Stackn * @param {string} key The key of the entry to check.n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.n */nnn function stackHas(key) {n return this.__data__.has(key);n }n /**n * Sets the stack `key` to `value`.n *n * @privaten * @name setn * @memberOf Stackn * @param {string} key The key of the value to set.n * @param {*} value The value to set.n * @returns {Object} Returns the stack cache instance.n */nnn function stackSet(key, value) {n var data = this.__data__;nn if (data instanceof ListCache) {n var pairs = data.__data__;nn if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {n pairs.push([key, value]);n this.size = ++data.size;n return this;n }nn data = this.__data__ = new MapCache(pairs);n }nn data.set(key, value);n this.size = data.size;n return this;n } // Add methods to `Stack`.nnn Stack.prototype.clear = stackClear;n Stack.prototype = stackDelete;n Stack.prototype.get = stackGet;n Stack.prototype.has = stackHas;n Stack.prototype.set = stackSet;n /————————————————————————/nn /**n * Creates an array of the enumerable property names of the array-like `value`.n *n * @privaten * @param {*} value The value to query.n * @param {boolean} inherited Specify returning inherited property names.n * @returns {Array} Returns the array of property names.n */nn function arrayLikeKeys(value, inherited) {n var isArr = isArray(value),n isArg = !isArr && isArguments(value),n isBuff = !isArr && !isArg && isBuffer(value),n isType = !isArr && !isArg && !isBuff && isTypedArray(value),n skipIndexes = isArr || isArg || isBuff || isType,n result = skipIndexes ? baseTimes(value.length, String) : [],n length = result.length;nn for (var key in value) {n if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode.n key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers.n isBuff && (key == 'offset' || key == 'parent') || // PhantomJS 2 has enumerable non-index properties on typed arrays.n isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset') || // Skip index properties.n isIndex(key, length)))) {n result.push(key);n }n }nn return result;n }n /**n * A specialized version of `_.sample` for arrays.n *n * @privaten * @param {Array} array The array to sample.n * @returns {*} Returns the random element.n */nnn function arraySample(array) {n var length = array.length;n return length ? array[baseRandom(0, length - 1)] : undefined;n }n /**n * A specialized version of `_.sampleSize` for arrays.n *n * @privaten * @param {Array} array The array to sample.n * @param {number} n The number of elements to sample.n * @returns {Array} Returns the random elements.n */nnn function arraySampleSize(array, n) {n return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));n }n /**n * A specialized version of `_.shuffle` for arrays.n *n * @privaten * @param {Array} array The array to shuffle.n * @returns {Array} Returns the new shuffled array.n */nnn function arrayShuffle(array) {n return shuffleSelf(copyArray(array));n }n /**n * This function is like `assignValue` except that it doesn't assignn * `undefined` values.n *n * @privaten * @param {Object} object The object to modify.n * @param {string} key The key of the property to assign.n * @param {*} value The value to assign.n */nnn function assignMergeValue(object, key, value) {n if (value !== undefined && !eq(object, value) || value === undefined && !(key in object)) {n baseAssignValue(object, key, value);n }n }n /**n * Assigns `value` to `key` of `object` if the existing value is not equivalentn * using [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons.n *n * @privaten * @param {Object} object The object to modify.n * @param {string} key The key of the property to assign.n * @param {*} value The value to assign.n */nnn function assignValue(object, key, value) {n var objValue = object;nn if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {n baseAssignValue(object, key, value);n }n }n /**n * Gets the index at which the `key` is found in `array` of key-value pairs.n *n * @privaten * @param {Array} array The array to inspect.n * @param {*} key The key to search for.n * @returns {number} Returns the index of the matched value, else `-1`.n */nnn function assocIndexOf(array, key) {n var length = array.length;nn while (length–) {n if (eq(array[0], key)) {n return length;n }n }nn return -1;n }n /**n * Aggregates elements of `collection` on `accumulator` with keys transformedn * by `iteratee` and values set by `setter`.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} setter The function to set `accumulator` values.n * @param {Function} iteratee The iteratee to transform keys.n * @param {Object} accumulator The initial aggregated object.n * @returns {Function} Returns `accumulator`.n */nnn function baseAggregator(collection, setter, iteratee, accumulator) {n baseEach(collection, function (value, key, collection) {n setter(accumulator, value, iteratee(value), collection);n });n return accumulator;n }n /**n * The base implementation of `_.assign` without support for multiple sourcesn * or `customizer` functions.n *n * @privaten * @param {Object} object The destination object.n * @param {Object} source The source object.n * @returns {Object} Returns `object`.n */nnn function baseAssign(object, source) {n return object && copyObject(source, keys(source), object);n }n /**n * The base implementation of `_.assignIn` without support for multiple sourcesn * or `customizer` functions.n *n * @privaten * @param {Object} object The destination object.n * @param {Object} source The source object.n * @returns {Object} Returns `object`.n */nnn function baseAssignIn(object, source) {n return object && copyObject(source, keysIn(source), object);n }n /**n * The base implementation of `assignValue` and `assignMergeValue` withoutn * value checks.n *n * @privaten * @param {Object} object The object to modify.n * @param {string} key The key of the property to assign.n * @param {*} value The value to assign.n */nnn function baseAssignValue(object, key, value) {n if (key == '__proto__' && defineProperty) {n defineProperty(object, key, {n 'configurable': true,n 'enumerable': true,n 'value': value,n 'writable': truen });n } else {n object = value;n }n }n /**n * The base implementation of `_.at` without support for individual paths.n *n * @privaten * @param {Object} object The object to iterate over.n * @param {string[]} paths The property paths to pick.n * @returns {Array} Returns the picked elements.n */nnn function baseAt(object, paths) {n var index = -1,n length = paths.length,n result = Array(length),n skip = object == null;nn while (++index < length) {n result = skip ? undefined : get(object, paths);n }nn return result;n }n /**n * The base implementation of `_.clamp` which doesn't coerce arguments.n *n * @privaten * @param {number} number The number to clamp.n * @param {number} [lower] The lower bound.n * @param {number} upper The upper bound.n * @returns {number} Returns the clamped number.n */nnn function baseClamp(number, lower, upper) {n if (number === number) {n if (upper !== undefined) {n number = number <= upper ? number : upper;n }nn if (lower !== undefined) {n number = number >= lower ? number : lower;n }n }nn return number;n }n /**n * The base implementation of `_.clone` and `_.cloneDeep` which tracksn * traversed objects.n *n * @privaten * @param {*} value The value to clone.n * @param {boolean} bitmask The bitmask flags.n * 1 - Deep clonen * 2 - Flatten inherited propertiesn * 4 - Clone symbolsn * @param {Function} [customizer] The function to customize cloning.n * @param {string} [key] The key of `value`.n * @param {Object} [object] The parent object of `value`.n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.n * @returns {*} Returns the cloned value.n */nnn function baseClone(value, bitmask, customizer, key, object, stack) {n var result,n isDeep = bitmask & CLONE_DEEP_FLAG,n isFlat = bitmask & CLONE_FLAT_FLAG,n isFull = bitmask & CLONE_SYMBOLS_FLAG;nn if (customizer) {n result = object ? customizer(value, key, object, stack) : customizer(value);n }nn if (result !== undefined) {n return result;n }nn if (!isObject(value)) {n return value;n }nn var isArr = isArray(value);nn if (isArr) {n result = initCloneArray(value);nn if (!isDeep) {n return copyArray(value, result);n }n } else {n var tag = getTag(value),n isFunc = tag == funcTag || tag == genTag;nn if (isBuffer(value)) {n return cloneBuffer(value, isDeep);n }nn if (tag == objectTag || tag == argsTag || isFunc && !object) {n result = isFlat || isFunc ? {} : initCloneObject(value);nn if (!isDeep) {n return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));n }n } else {n if (!cloneableTags) {n return object ? value : {};n }nn result = initCloneByTag(value, tag, isDeep);n }n } // Check for circular references and return its corresponding clone.nnn stack || (stack = new Stack());n var stacked = stack.get(value);nn if (stacked) {n return stacked;n }nn stack.set(value, result);nn if (isSet(value)) {n value.forEach(function (subValue) {n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));n });n } else if (isMap(value)) {n value.forEach(function (subValue, key) {n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));n });n }nn var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;n var props = isArr ? undefined : keysFunc(value);n arrayEach(props || value, function (subValue, key) {n if (props) {n key = subValue;n subValue = value;n } // Recursively populate clone (susceptible to call stack limits).nnn assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));n });n return result;n }n /**n * The base implementation of `_.conforms` which doesn't clone `source`.n *n * @privaten * @param {Object} source The object of property predicates to conform to.n * @returns {Function} Returns the new spec function.n */nnn function baseConforms(source) {n var props = keys(source);n return function (object) {n return baseConformsTo(object, source, props);n };n }n /**n * The base implementation of `_.conformsTo` which accepts `props` to check.n *n * @privaten * @param {Object} object The object to inspect.n * @param {Object} source The object of property predicates to conform to.n * @returns {boolean} Returns `true` if `object` conforms, else `false`.n */nnn function baseConformsTo(object, source, props) {n var length = props.length;nn if (object == null) {n return !length;n }nn object = Object(object);nn while (length–) {n var key = props,n predicate = source,n value = object;nn if (value === undefined && !(key in object) || !predicate(value)) {n return false;n }n }nn return true;n }n /**n * The base implementation of `_.delay` and `_.defer` which accepts `args`n * to provide to `func`.n *n * @privaten * @param {Function} func The function to delay.n * @param {number} wait The number of milliseconds to delay invocation.n * @param {Array} args The arguments to provide to `func`.n * @returns {number|Object} Returns the timer id or timeout object.n */nnn function baseDelay(func, wait, args) {n if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn return setTimeout(function () {n func.apply(undefined, args);n }, wait);n }n /**n * The base implementation of methods like `_.difference` without supportn * for excluding multiple arrays or iteratee shorthands.n *n * @privaten * @param {Array} array The array to inspect.n * @param {Array} values The values to exclude.n * @param {Function} [iteratee] The iteratee invoked per element.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of filtered values.n */nnn function baseDifference(array, values, iteratee, comparator) {n var index = -1,n includes = arrayIncludes,n isCommon = true,n length = array.length,n result = [],n valuesLength = values.length;nn if (!length) {n return result;n }nn if (iteratee) {n values = arrayMap(values, baseUnary(iteratee));n }nn if (comparator) {n includes = arrayIncludesWith;n isCommon = false;n } else if (values.length >= LARGE_ARRAY_SIZE) {n includes = cacheHas;n isCommon = false;n values = new SetCache(values);n }nn outer: while (++index < length) {n var value = array,n computed = iteratee == null ? value : iteratee(value);n value = comparator || value !== 0 ? value : 0;nn if (isCommon && computed === computed) {n var valuesIndex = valuesLength;nn while (valuesIndex–) {n if (values === computed) {n continue outer;n }n }nn result.push(value);n } else if (!includes(values, computed, comparator)) {n result.push(value);n }n }nn return result;n }n /**n * The base implementation of `_.forEach` without support for iteratee shorthands.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array|Object} Returns `collection`.n */nnn var baseEach = createBaseEach(baseForOwn);n /**n * The base implementation of `_.forEachRight` without support for iteratee shorthands.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array|Object} Returns `collection`.n */nn var baseEachRight = createBaseEach(baseForOwnRight, true);n /**n * The base implementation of `_.every` without support for iteratee shorthands.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} predicate The function invoked per iteration.n * @returns {boolean} Returns `true` if all elements pass the predicate check,n * else `false`n */nn function baseEvery(collection, predicate) {n var result = true;n baseEach(collection, function (value, index, collection) {n result = !!predicate(value, index, collection);n return result;n });n return result;n }n /**n * The base implementation of methods like `_.max` and `_.min` which accepts an * `comparator` to determine the extremum value.n *n * @privaten * @param {Array} array The array to iterate over.n * @param {Function} iteratee The iteratee invoked per iteration.n * @param {Function} comparator The comparator used to compare values.n * @returns {*} Returns the extremum value.n */nnn function baseExtremum(array, iteratee, comparator) {n var index = -1,n length = array.length;nn while (++index < length) {n var value = array,n current = iteratee(value);nn if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) {n var computed = current,n result = value;n }n }nn return result;n }n /**n * The base implementation of `_.fill` without an iteratee call guard.n *n * @privaten * @param {Array} array The array to fill.n * @param {*} value The value to fill `array` with.n * @param {number} [start=0] The start position.n * @param {number} [end=array.length] The end position.n * @returns {Array} Returns `array`.n */nnn function baseFill(array, value, start, end) {n var length = array.length;n start = toInteger(start);nn if (start < 0) {n start = -start > length ? 0 : length + start;n }nn end = end === undefined || end > length ? length : toInteger(end);nn if (end < 0) {n end += length;n }nn end = start > end ? 0 : toLength(end);nn while (start < end) {n array = value;n }nn return array;n }n /**n * The base implementation of `_.filter` without support for iteratee shorthands.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} predicate The function invoked per iteration.n * @returns {Array} Returns the new filtered array.n */nnn function baseFilter(collection, predicate) {n var result = [];n baseEach(collection, function (value, index, collection) {n if (predicate(value, index, collection)) {n result.push(value);n }n });n return result;n }n /**n * The base implementation of `_.flatten` with support for restricting flattening.n *n * @privaten * @param {Array} array The array to flatten.n * @param {number} depth The maximum recursion depth.n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.n * @param {Array} [result= The initial result value.n * @returns {Array} Returns the new flattened array.n */nnn function baseFlatten(array, depth, predicate, isStrict, result) {n var index = -1,n length = array.length;n predicate || (predicate = isFlattenable);n result || (result = []);nn while (++index < length) {n var value = array;nn if (depth > 0 && predicate(value)) {n if (depth > 1) {n // Recursively flatten arrays (susceptible to call stack limits).n baseFlatten(value, depth - 1, predicate, isStrict, result);n } else {n arrayPush(result, value);n }n } else if (!isStrict) {n result = value;n }n }nn return result;n }n /**n * The base implementation of `baseForOwn` which iterates over `object`n * properties returned by `keysFunc` and invokes `iteratee` for each property.n * Iteratee functions may exit iteration early by explicitly returning `false`.n *n * @privaten * @param {Object} object The object to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @param {Function} keysFunc The function to get the keys of `object`.n * @returns {Object} Returns `object`.n */nnn var baseFor = createBaseFor();n /**n * This function is like `baseFor` except that it iterates over propertiesn * in the opposite order.n *n * @privaten * @param {Object} object The object to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @param {Function} keysFunc The function to get the keys of `object`.n * @returns {Object} Returns `object`.n */nn var baseForRight = createBaseFor(true);n /**n * The base implementation of `_.forOwn` without support for iteratee shorthands.n *n * @privaten * @param {Object} object The object to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Object} Returns `object`.n */nn function baseForOwn(object, iteratee) {n return object && baseFor(object, iteratee, keys);n }n /**n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.n *n * @privaten * @param {Object} object The object to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Object} Returns `object`.n */nnn function baseForOwnRight(object, iteratee) {n return object && baseForRight(object, iteratee, keys);n }n /**n * The base implementation of `_.functions` which creates an array ofn * `object` function property names filtered from `props`.n *n * @privaten * @param {Object} object The object to inspect.n * @param {Array} props The property names to filter.n * @returns {Array} Returns the function names.n */nnn function baseFunctions(object, props) {n return arrayFilter(props, function (key) {n return isFunction(object);n });n }n /**n * The base implementation of `_.get` without support for default values.n *n * @privaten * @param {Object} object The object to query.n * @param {Array|string} path The path of the property to get.n * @returns {*} Returns the resolved value.n */nnn function baseGet(object, path) {n path = castPath(path, object);n var index = 0,n length = path.length;nn while (object != null && index < length) {n object = object[toKey(path)];n }nn return index && index == length ? object : undefined;n }n /**n * The base implementation of `getAllKeys` and `getAllKeysIn` which usesn * `keysFunc` and `symbolsFunc` to get the enumerable property names andn * symbols of `object`.n *n * @privaten * @param {Object} object The object to query.n * @param {Function} keysFunc The function to get the keys of `object`.n * @param {Function} symbolsFunc The function to get the symbols of `object`.n * @returns {Array} Returns the array of property names and symbols.n */nnn function baseGetAllKeys(object, keysFunc, symbolsFunc) {n var result = keysFunc(object);n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));n }n /**n * The base implementation of `getTag` without fallbacks for buggy environments.n *n * @privaten * @param {*} value The value to query.n * @returns {string} Returns the `toStringTag`.n */nnn function baseGetTag(value) {n if (value == null) {n return value === undefined ? undefinedTag : nullTag;n }nn return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);n }n /**n * The base implementation of `_.gt` which doesn't coerce arguments.n *n * @privaten * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if `value` is greater than `other`,n * else `false`.n */nnn function baseGt(value, other) {n return value > other;n }n /**n * The base implementation of `_.has` without support for deep paths.n *n * @privaten * @param {Object} [object] The object to query.n * @param {Array|string} key The key to check.n * @returns {boolean} Returns `true` if `key` exists, else `false`.n */nnn function baseHas(object, key) {n return object != null && hasOwnProperty.call(object, key);n }n /**n * The base implementation of `_.hasIn` without support for deep paths.n *n * @privaten * @param {Object} [object] The object to query.n * @param {Array|string} key The key to check.n * @returns {boolean} Returns `true` if `key` exists, else `false`.n */nnn function baseHasIn(object, key) {n return object != null && key in Object(object);n }n /**n * The base implementation of `_.inRange` which doesn't coerce arguments.n *n * @privaten * @param {number} number The number to check.n * @param {number} start The start of the range.n * @param {number} end The end of the range.n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.n */nnn function baseInRange(number, start, end) {n return number >= nativeMin(start, end) && number < nativeMax(start, end);n }n /**n * The base implementation of methods like `_.intersection`, without supportn * for iteratee shorthands, that accepts an array of arrays to inspect.n *n * @privaten * @param {Array} arrays The arrays to inspect.n * @param {Function} [iteratee] The iteratee invoked per element.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of shared values.n */nnn function baseIntersection(arrays, iteratee, comparator) {n var includes = comparator ? arrayIncludesWith : arrayIncludes,n length = arrays.length,n othLength = arrays.length,n othIndex = othLength,n caches = Array(othLength),n maxLength = Infinity,n result = [];nn while (othIndex–) {n var array = arrays;nn if (othIndex && iteratee) {n array = arrayMap(array, baseUnary(iteratee));n }nn maxLength = nativeMin(array.length, maxLength);n caches = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;n }nn array = arrays;n var index = -1,n seen = caches;nn outer: while (++index < length && result.length < maxLength) {n var value = array,n computed = iteratee ? iteratee(value) : value;n value = comparator || value !== 0 ? value : 0;nn if (!(seen ? cacheHas(seen, computed) : includes(result, computed, comparator))) {n othIndex = othLength;nn while (–othIndex) {n var cache = caches;nn if (!(cache ? cacheHas(cache, computed) : includes(arrays, computed, comparator))) {n continue outer;n }n }nn if (seen) {n seen.push(computed);n }nn result.push(value);n }n }nn return result;n }n /**n * The base implementation of `_.invert` and `_.invertBy` which invertsn * `object` with values transformed by `iteratee` and set by `setter`.n *n * @privaten * @param {Object} object The object to iterate over.n * @param {Function} setter The function to set `accumulator` values.n * @param {Function} iteratee The iteratee to transform values.n * @param {Object} accumulator The initial inverted object.n * @returns {Function} Returns `accumulator`.n */nnn function baseInverter(object, setter, iteratee, accumulator) {n baseForOwn(object, function (value, key, object) {n setter(accumulator, iteratee(value), key, object);n });n return accumulator;n }n /**n * The base implementation of `_.invoke` without support for individualn * method arguments.n *n * @privaten * @param {Object} object The object to query.n * @param {Array|string} path The path of the method to invoke.n * @param {Array} args The arguments to invoke the method with.n * @returns {*} Returns the result of the invoked method.n */nnn function baseInvoke(object, path, args) {n path = castPath(path, object);n object = parent(object, path);n var func = object == null ? object : object;n return func == null ? undefined : apply(func, object, args);n }n /**n * The base implementation of `_.isArguments`.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an `arguments` object,n */nnn function baseIsArguments(value) {n return isObjectLike(value) && baseGetTag(value) == argsTag;n }n /**n * The base implementation of `_.isArrayBuffer` without Node.js optimizations.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.n */nnn function baseIsArrayBuffer(value) {n return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;n }n /**n * The base implementation of `_.isDate` without Node.js optimizations.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.n */nnn function baseIsDate(value) {n return isObjectLike(value) && baseGetTag(value) == dateTag;n }n /**n * The base implementation of `_.isEqual` which supports partial comparisonsn * and tracks traversed objects.n *n * @privaten * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @param {boolean} bitmask The bitmask flags.n * 1 - Unordered comparisonn * 2 - Partial comparisonn * @param {Function} [customizer] The function to customize comparisons.n * @param {Object} [stack] Tracks traversed `value` and `other` objects.n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.n */nnn function baseIsEqual(value, other, bitmask, customizer, stack) {n if (value === other) {n return true;n }nn if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {n return value !== value && other !== other;n }nn return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);n }n /**n * A specialized version of `baseIsEqual` for arrays and objects which performsn * deep comparisons and tracks traversed objects enabling objects with circularn * references to be compared.n *n * @privaten * @param {Object} object The object to compare.n * @param {Object} other The other object to compare.n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.n * @param {Function} customizer The function to customize comparisons.n * @param {Function} equalFunc The function to determine equivalents of values.n * @param {Object} [stack] Tracks traversed `object` and `other` objects.n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.n */nnn function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {n var objIsArr = isArray(object),n othIsArr = isArray(other),n objTag = objIsArr ? arrayTag : getTag(object),n othTag = othIsArr ? arrayTag : getTag(other);n objTag = objTag == argsTag ? objectTag : objTag;n othTag = othTag == argsTag ? objectTag : othTag;n var objIsObj = objTag == objectTag,n othIsObj = othTag == objectTag,n isSameTag = objTag == othTag;nn if (isSameTag && isBuffer(object)) {n if (!isBuffer(other)) {n return false;n }nn objIsArr = true;n objIsObj = false;n }nn if (isSameTag && !objIsObj) {n stack || (stack = new Stack());n return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);n }nn if (!(bitmask & COMPARE_PARTIAL_FLAG)) {n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');nn if (objIsWrapped || othIsWrapped) {n var objUnwrapped = objIsWrapped ? object.value() : object,n othUnwrapped = othIsWrapped ? other.value() : other;n stack || (stack = new Stack());n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);n }n }nn if (!isSameTag) {n return false;n }nn stack || (stack = new Stack());n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);n }n /**n * The base implementation of `_.isMap` without Node.js optimizations.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a map, else `false`.n */nnn function baseIsMap(value) {n return isObjectLike(value) && getTag(value) == mapTag;n }n /**n * The base implementation of `_.isMatch` without support for iteratee shorthands.n *n * @privaten * @param {Object} object The object to inspect.n * @param {Object} source The object of property values to match.n * @param {Array} matchData The property names, values, and compare flags to match.n * @param {Function} [customizer] The function to customize comparisons.n * @returns {boolean} Returns `true` if `object` is a match, else `false`.n */nnn function baseIsMatch(object, source, matchData, customizer) {n var index = matchData.length,n length = index,n noCustomizer = !customizer;nn if (object == null) {n return !length;n }nn object = Object(object);nn while (index–) {n var data = matchData;nn if (noCustomizer && data ? data !== object[data] : !(data in object)) {n return false;n }n }nn while (++index < length) {n data = matchData;n var key = data,n objValue = object,n srcValue = data;nn if (noCustomizer && data) {n if (objValue === undefined && !(key in object)) {n return false;n }n } else {n var stack = new Stack();nn if (customizer) {n var result = customizer(objValue, srcValue, key, object, source, stack);n }nn if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {n return false;n }n }n }nn return true;n }n /**n * The base implementation of `_.isNative` without bad shim checks.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a native function,n * else `false`.n */nnn function baseIsNative(value) {n if (!isObject(value) || isMasked(value)) {n return false;n }nn var pattern = isFunction(value) ? reIsNative : reIsHostCtor;n return pattern.test(toSource(value));n }n /**n * The base implementation of `_.isRegExp` without Node.js optimizations.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.n */nnn function baseIsRegExp(value) {n return isObjectLike(value) && baseGetTag(value) == regexpTag;n }n /**n * The base implementation of `_.isSet` without Node.js optimizations.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a set, else `false`.n */nnn function baseIsSet(value) {n return isObjectLike(value) && getTag(value) == setTag;n }n /**n * The base implementation of `_.isTypedArray` without Node.js optimizations.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.n */nnn function baseIsTypedArray(value) {n return isObjectLike(value) && isLength(value.length) && !!typedArrayTags;n }n /**n * The base implementation of `_.iteratee`.n *n * @privaten * @param {*} [value=_.identity] The value to convert to an iteratee.n * @returns {Function} Returns the iteratee.n */nnn function baseIteratee(value) {n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.n // See bugs.webkit.org/show_bug.cgi?id=156034 for more details.n if (typeof value == 'function') {n return value;n }nn if (value == null) {n return identity;n }nn if (_typeof(value) == 'object') {n return isArray(value) ? baseMatchesProperty(value, value) : baseMatches(value);n }nn return property(value);n }n /**n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names.n */nnn function baseKeys(object) {n if (!isPrototype(object)) {n return nativeKeys(object);n }nn var result = [];nn for (var key in Object(object)) {n if (hasOwnProperty.call(object, key) && key != 'constructor') {n result.push(key);n }n }nn return result;n }n /**n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names.n */nnn function baseKeysIn(object) {n if (!isObject(object)) {n return nativeKeysIn(object);n }nn var isProto = isPrototype(object),n result = [];nn for (var key in object) {n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {n result.push(key);n }n }nn return result;n }n /**n * The base implementation of `_.lt` which doesn't coerce arguments.n *n * @privaten * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if `value` is less than `other`,n * else `false`.n */nnn function baseLt(value, other) {n return value < other;n }n /**n * The base implementation of `_.map` without support for iteratee shorthands.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} iteratee The function invoked per iteration.n * @returns {Array} Returns the new mapped array.n */nnn function baseMap(collection, iteratee) {n var index = -1,n result = isArrayLike(collection) ? Array(collection.length) : [];n baseEach(collection, function (value, key, collection) {n result = iteratee(value, key, collection);n });n return result;n }n /**n * The base implementation of `_.matches` which doesn't clone `source`.n *n * @privaten * @param {Object} source The object of property values to match.n * @returns {Function} Returns the new spec function.n */nnn function baseMatches(source) {n var matchData = getMatchData(source);nn if (matchData.length == 1 && matchData[2]) {n return matchesStrictComparable(matchData[0], matchData[1]);n }nn return function (object) {n return object === source || baseIsMatch(object, source, matchData);n };n }n /**n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.n *n * @privaten * @param {string} path The path of the property to get.n * @param {*} srcValue The value to match.n * @returns {Function} Returns the new spec function.n */nnn function baseMatchesProperty(path, srcValue) {n if (isKey(path) && isStrictComparable(srcValue)) {n return matchesStrictComparable(toKey(path), srcValue);n }nn return function (object) {n var objValue = get(object, path);n return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);n };n }n /**n * The base implementation of `_.merge` without support for multiple sources.n *n * @privaten * @param {Object} object The destination object.n * @param {Object} source The source object.n * @param {number} srcIndex The index of `source`.n * @param {Function} [customizer] The function to customize merged values.n * @param {Object} [stack] Tracks traversed source values and their mergedn * counterparts.n */nnn function baseMerge(object, source, srcIndex, customizer, stack) {n if (object === source) {n return;n }nn baseFor(source, function (srcValue, key) {n stack || (stack = new Stack());nn if (isObject(srcValue)) {n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);n } else {n var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + '', object, source, stack) : undefined;nn if (newValue === undefined) {n newValue = srcValue;n }nn assignMergeValue(object, key, newValue);n }n }, keysIn);n }n /**n * A specialized version of `baseMerge` for arrays and objects which performsn * deep merges and tracks traversed objects enabling objects with circularn * references to be merged.n *n * @privaten * @param {Object} object The destination object.n * @param {Object} source The source object.n * @param {string} key The key of the value to merge.n * @param {number} srcIndex The index of `source`.n * @param {Function} mergeFunc The function to merge values.n * @param {Function} [customizer] The function to customize assigned values.n * @param {Object} [stack] Tracks traversed source values and their mergedn * counterparts.n */nnn function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {n var objValue = safeGet(object, key),n srcValue = safeGet(source, key),n stacked = stack.get(srcValue);nn if (stacked) {n assignMergeValue(object, key, stacked);n return;n }nn var newValue = customizer ? customizer(objValue, srcValue, key + '', object, source, stack) : undefined;n var isCommon = newValue === undefined;nn if (isCommon) {n var isArr = isArray(srcValue),n isBuff = !isArr && isBuffer(srcValue),n isTyped = !isArr && !isBuff && isTypedArray(srcValue);n newValue = srcValue;nn if (isArr || isBuff || isTyped) {n if (isArray(objValue)) {n newValue = objValue;n } else if (isArrayLikeObject(objValue)) {n newValue = copyArray(objValue);n } else if (isBuff) {n isCommon = false;n newValue = cloneBuffer(srcValue, true);n } else if (isTyped) {n isCommon = false;n newValue = cloneTypedArray(srcValue, true);n } else {n newValue = [];n }n } else if (isPlainObject(srcValue) || isArguments(srcValue)) {n newValue = objValue;nn if (isArguments(objValue)) {n newValue = toPlainObject(objValue);n } else if (!isObject(objValue) || isFunction(objValue)) {n newValue = initCloneObject(srcValue);n }n } else {n isCommon = false;n }n }nn if (isCommon) {n // Recursively merge objects and arrays (susceptible to call stack limits).n stack.set(srcValue, newValue);n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);n stack(srcValue);n }nn assignMergeValue(object, key, newValue);n }n /**n * The base implementation of `_.nth` which doesn't coerce arguments.n *n * @privaten * @param {Array} array The array to query.n * @param {number} n The index of the element to return.n * @returns {*} Returns the nth element of `array`.n */nnn function baseNth(array, n) {n var length = array.length;nn if (!length) {n return;n }nn n += n < 0 ? length : 0;n return isIndex(n, length) ? array : undefined;n }n /**n * The base implementation of `_.orderBy` without param guards.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function[]|Object|string[]} iteratees The iteratees to sort by.n * @param {string[]} orders The sort orders of `iteratees`.n * @returns {Array} Returns the new sorted array.n */nnn function baseOrderBy(collection, iteratees, orders) {n var index = -1;n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));n var result = baseMap(collection, function (value, key, collection) {n var criteria = arrayMap(iteratees, function (iteratee) {n return iteratee(value);n });n return {n 'criteria': criteria,n 'index': ++index,n 'value': valuen };n });n return baseSortBy(result, function (object, other) {n return compareMultiple(object, other, orders);n });n }n /**n * The base implementation of `_.pick` without support for individualn * property identifiers.n *n * @privaten * @param {Object} object The source object.n * @param {string[]} paths The property paths to pick.n * @returns {Object} Returns the new object.n */nnn function basePick(object, paths) {n return basePickBy(object, paths, function (value, path) {n return hasIn(object, path);n });n }n /**n * The base implementation of `_.pickBy` without support for iteratee shorthands.n *n * @privaten * @param {Object} object The source object.n * @param {string[]} paths The property paths to pick.n * @param {Function} predicate The function invoked per property.n * @returns {Object} Returns the new object.n */nnn function basePickBy(object, paths, predicate) {n var index = -1,n length = paths.length,n result = {};nn while (++index < length) {n var path = paths,n value = baseGet(object, path);nn if (predicate(value, path)) {n baseSet(result, castPath(path, object), value);n }n }nn return result;n }n /**n * A specialized version of `baseProperty` which supports deep paths.n *n * @privaten * @param {Array|string} path The path of the property to get.n * @returns {Function} Returns the new accessor function.n */nnn function basePropertyDeep(path) {n return function (object) {n return baseGet(object, path);n };n }n /**n * The base implementation of `_.pullAllBy` without support for iterateen * shorthands.n *n * @privaten * @param {Array} array The array to modify.n * @param {Array} values The values to remove.n * @param {Function} [iteratee] The iteratee invoked per element.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns `array`.n */nnn function basePullAll(array, values, iteratee, comparator) {n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,n index = -1,n length = values.length,n seen = array;nn if (array === values) {n values = copyArray(values);n }nn if (iteratee) {n seen = arrayMap(array, baseUnary(iteratee));n }nn while (++index < length) {n var fromIndex = 0,n value = values,n computed = iteratee ? iteratee(value) : value;nn while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {n if (seen !== array) {n splice.call(seen, fromIndex, 1);n }nn splice.call(array, fromIndex, 1);n }n }nn return array;n }n /**n * The base implementation of `_.pullAt` without support for individualn * indexes or capturing the removed elements.n *n * @privaten * @param {Array} array The array to modify.n * @param {number[]} indexes The indexes of elements to remove.n * @returns {Array} Returns `array`.n */nnn function basePullAt(array, indexes) {n var length = array ? indexes.length : 0,n lastIndex = length - 1;nn while (length–) {n var index = indexes;nn if (length == lastIndex || index !== previous) {n var previous = index;nn if (isIndex(index)) {n splice.call(array, index, 1);n } else {n baseUnset(array, index);n }n }n }nn return array;n }n /**n * The base implementation of `_.random` without support for returningn * floating-point numbers.n *n * @privaten * @param {number} lower The lower bound.n * @param {number} upper The upper bound.n * @returns {number} Returns the random number.n */nnn function baseRandom(lower, upper) {n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));n }n /**n * The base implementation of `_.range` and `_.rangeRight` which doesn'tn * coerce arguments.n *n * @privaten * @param {number} start The start of the range.n * @param {number} end The end of the range.n * @param {number} step The value to increment or decrement by.n * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {Array} Returns the range of numbers.n */nnn function baseRange(start, end, step, fromRight) {n var index = -1,n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),n result = Array(length);nn while (length–) {n result[fromRight ? length : ++index] = start;n start += step;n }nn return result;n }n /**n * The base implementation of `_.repeat` which doesn't coerce arguments.n *n * @privaten * @param {string} string The string to repeat.n * @param {number} n The number of times to repeat the string.n * @returns {string} Returns the repeated string.n */nnn function baseRepeat(string, n) {n var result = '';nn if (!string || n < 1 || n > MAX_SAFE_INTEGER) {n return result;n } // Leverage the exponentiation by squaring algorithm for a faster repeat.n // See en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.nnn do {n if (n % 2) {n result += string;n }nn n = nativeFloor(n / 2);nn if (n) {n string += string;n }n } while (n);nn return result;n }n /**n * The base implementation of `_.rest` which doesn't validate or coerce arguments.n *n * @privaten * @param {Function} func The function to apply a rest parameter to.n * @param {number} [start=func.length-1] The start position of the rest parameter.n * @returns {Function} Returns the new function.n */nnn function baseRest(func, start) {n return setToString(overRest(func, start, identity), func + '');n }n /**n * The base implementation of `_.sample`.n *n * @privaten * @param {Array|Object} collection The collection to sample.n * @returns {*} Returns the random element.n */nnn function baseSample(collection) {n return arraySample(values(collection));n }n /**n * The base implementation of `_.sampleSize` without param guards.n *n * @privaten * @param {Array|Object} collection The collection to sample.n * @param {number} n The number of elements to sample.n * @returns {Array} Returns the random elements.n */nnn function baseSampleSize(collection, n) {n var array = values(collection);n return shuffleSelf(array, baseClamp(n, 0, array.length));n }n /**n * The base implementation of `_.set`.n *n * @privaten * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to set.n * @param {*} value The value to set.n * @param {Function} [customizer] The function to customize path creation.n * @returns {Object} Returns `object`.n */nnn function baseSet(object, path, value, customizer) {n if (!isObject(object)) {n return object;n }nn path = castPath(path, object);n var index = -1,n length = path.length,n lastIndex = length - 1,n nested = object;nn while (nested != null && ++index < length) {n var key = toKey(path),n newValue = value;nn if (index != lastIndex) {n var objValue = nested;n newValue = customizer ? customizer(objValue, key, nested) : undefined;nn if (newValue === undefined) {n newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};n }n }nn assignValue(nested, key, newValue);n nested = nested;n }nn return object;n }n /**n * The base implementation of `setData` without support for hot loop shorting.n *n * @privaten * @param {Function} func The function to associate metadata with.n * @param {*} data The metadata.n * @returns {Function} Returns `func`.n */nnn var baseSetData = !metaMap ? identity : function (func, data) {n metaMap.set(func, data);n return func;n };n /**n * The base implementation of `setToString` without support for hot loop shorting.n *n * @privaten * @param {Function} func The function to modify.n * @param {Function} string The `toString` result.n * @returns {Function} Returns `func`.n */nn var baseSetToString = !defineProperty ? identity : function (func, string) {n return defineProperty(func, 'toString', {n 'configurable': true,n 'enumerable': false,n 'value': constant(string),n 'writable': truen });n };n /**n * The base implementation of `_.shuffle`.n *n * @privaten * @param {Array|Object} collection The collection to shuffle.n * @returns {Array} Returns the new shuffled array.n */nn function baseShuffle(collection) {n return shuffleSelf(values(collection));n }n /**n * The base implementation of `_.slice` without an iteratee call guard.n *n * @privaten * @param {Array} array The array to slice.n * @param {number} [start=0] The start position.n * @param {number} [end=array.length] The end position.n * @returns {Array} Returns the slice of `array`.n */nnn function baseSlice(array, start, end) {n var index = -1,n length = array.length;nn if (start < 0) {n start = -start > length ? 0 : length + start;n }nn end = end > length ? length : end;nn if (end < 0) {n end += length;n }nn length = start > end ? 0 : end - start >>> 0;n start >>>= 0;n var result = Array(length);nn while (++index < length) {n result = array[index + start];n }nn return result;n }n /**n * The base implementation of `_.some` without support for iteratee shorthands.n *n * @privaten * @param {Array|Object} collection The collection to iterate over.n * @param {Function} predicate The function invoked per iteration.n * @returns {boolean} Returns `true` if any element passes the predicate check,n * else `false`.n */nnn function baseSome(collection, predicate) {n var result;n baseEach(collection, function (value, index, collection) {n result = predicate(value, index, collection);n return !result;n });n return !!result;n }n /**n * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` whichn * performs a binary search of `array` to determine the index at which `value`n * should be inserted into `array` in order to maintain its sort order.n *n * @privaten * @param {Array} array The sorted array to inspect.n * @param {*} value The value to evaluate.n * @param {boolean} [retHighest] Specify returning the highest qualified index.n * @returns {number} Returns the index at which `value` should be insertedn * into `array`.n */nnn function baseSortedIndex(array, value, retHighest) {n var low = 0,n high = array == null ? low : array.length;nn if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {n while (low < high) {n var mid = low + high >>> 1,n computed = array;nn if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {n low = mid + 1;n } else {n high = mid;n }n }nn return high;n }nn return baseSortedIndexBy(array, value, identity, retHighest);n }n /**n * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`n * which invokes `iteratee` for `value` and each element of `array` to computen * their sort ranking. The iteratee is invoked with one argument; (value).n *n * @privaten * @param {Array} array The sorted array to inspect.n * @param {*} value The value to evaluate.n * @param {Function} iteratee The iteratee invoked per element.n * @param {boolean} [retHighest] Specify returning the highest qualified index.n * @returns {number} Returns the index at which `value` should be insertedn * into `array`.n */nnn function baseSortedIndexBy(array, value, iteratee, retHighest) {n value = iteratee(value);n var low = 0,n high = array == null ? 0 : array.length,n valIsNaN = value !== value,n valIsNull = value === null,n valIsSymbol = isSymbol(value),n valIsUndefined = value === undefined;nn while (low < high) {n var mid = nativeFloor((low + high) / 2),n computed = iteratee(array),n othIsDefined = computed !== undefined,n othIsNull = computed === null,n othIsReflexive = computed === computed,n othIsSymbol = isSymbol(computed);nn if (valIsNaN) {n var setLow = retHighest || othIsReflexive;n } else if (valIsUndefined) {n setLow = othIsReflexive && (retHighest || othIsDefined);n } else if (valIsNull) {n setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);n } else if (valIsSymbol) {n setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);n } else if (othIsNull || othIsSymbol) {n setLow = false;n } else {n setLow = retHighest ? computed <= value : computed < value;n }nn if (setLow) {n low = mid + 1;n } else {n high = mid;n }n }nn return nativeMin(high, MAX_ARRAY_INDEX);n }n /**n * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` withoutn * support for iteratee shorthands.n *n * @privaten * @param {Array} array The array to inspect.n * @param {Function} [iteratee] The iteratee invoked per element.n * @returns {Array} Returns the new duplicate free array.n */nnn function baseSortedUniq(array, iteratee) {n var index = -1,n length = array.length,n resIndex = 0,n result = [];nn while (++index < length) {n var value = array,n computed = iteratee ? iteratee(value) : value;nn if (!index || !eq(computed, seen)) {n var seen = computed;n result = value === 0 ? 0 : value;n }n }nn return result;n }n /**n * The base implementation of `_.toNumber` which doesn't ensure correctn * conversions of binary, hexadecimal, or octal string values.n *n * @privaten * @param {*} value The value to process.n * @returns {number} Returns the number.n */nnn function baseToNumber(value) {n if (typeof value == 'number') {n return value;n }nn if (isSymbol(value)) {n return NAN;n }nn return +value;n }n /**n * The base implementation of `_.toString` which doesn't convert nullishn * values to empty strings.n *n * @privaten * @param {*} value The value to process.n * @returns {string} Returns the string.n */nnn function baseToString(value) {n // Exit early for strings to avoid a performance hit in some environments.n if (typeof value == 'string') {n return value;n }nn if (isArray(value)) {n // Recursively convert values (susceptible to call stack limits).n return arrayMap(value, baseToString) + '';n }nn if (isSymbol(value)) {n return symbolToString ? symbolToString.call(value) : '';n }nn var result = value + '';n return result == '0' && 1 / value == -INFINITY ? '-0' : result;n }n /**n * The base implementation of `_.uniqBy` without support for iteratee shorthands.n *n * @privaten * @param {Array} array The array to inspect.n * @param {Function} [iteratee] The iteratee invoked per element.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new duplicate free array.n */nnn function baseUniq(array, iteratee, comparator) {n var index = -1,n includes = arrayIncludes,n length = array.length,n isCommon = true,n result = [],n seen = result;nn if (comparator) {n isCommon = false;n includes = arrayIncludesWith;n } else if (length >= LARGE_ARRAY_SIZE) {n var set = iteratee ? null : createSet(array);nn if (set) {n return setToArray(set);n }nn isCommon = false;n includes = cacheHas;n seen = new SetCache();n } else {n seen = iteratee ? [] : result;n }nn outer: while (++index < length) {n var value = array,n computed = iteratee ? iteratee(value) : value;n value = comparator || value !== 0 ? value : 0;nn if (isCommon && computed === computed) {n var seenIndex = seen.length;nn while (seenIndex–) {n if (seen === computed) {n continue outer;n }n }nn if (iteratee) {n seen.push(computed);n }nn result.push(value);n } else if (!includes(seen, computed, comparator)) {n if (seen !== result) {n seen.push(computed);n }nn result.push(value);n }n }nn return result;n }n /**n * The base implementation of `_.unset`.n *n * @privaten * @param {Object} object The object to modify.n * @param {Array|string} path The property path to unset.n * @returns {boolean} Returns `true` if the property is deleted, else `false`.n */nnn function baseUnset(object, path) {n path = castPath(path, object);n object = parent(object, path);n return object == null || delete object;n }n /**n * The base implementation of `_.update`.n *n * @privaten * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to update.n * @param {Function} updater The function to produce the updated value.n * @param {Function} [customizer] The function to customize path creation.n * @returns {Object} Returns `object`.n */nnn function baseUpdate(object, path, updater, customizer) {n return baseSet(object, path, updater(baseGet(object, path)), customizer);n }n /**n * The base implementation of methods like `_.dropWhile` and `_.takeWhile`n * without support for iteratee shorthands.n *n * @privaten * @param {Array} array The array to query.n * @param {Function} predicate The function invoked per iteration.n * @param {boolean} [isDrop] Specify dropping elements instead of taking them.n * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {Array} Returns the slice of `array`.n */nnn function baseWhile(array, predicate, isDrop, fromRight) {n var length = array.length,n index = fromRight ? length : -1;nn while ((fromRight ? index– : ++index < length) && predicate(array, index, array)) {}nn return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);n }n /**n * The base implementation of `wrapperValue` which returns the result ofn * performing a sequence of actions on the unwrapped `value`, where eachn * successive action is supplied the return value of the previous.n *n * @privaten * @param {*} value The unwrapped value.n * @param {Array} actions Actions to perform to resolve the unwrapped value.n * @returns {*} Returns the resolved value.n */nnn function baseWrapperValue(value, actions) {n var result = value;nn if (result instanceof LazyWrapper) {n result = result.value();n }nn return arrayReduce(actions, function (result, action) {n return action.func.apply(action.thisArg, arrayPush(, action.args));n }, result);n }n /**n * The base implementation of methods like `_.xor`, without support forn * iteratee shorthands, that accepts an array of arrays to inspect.n *n * @privaten * @param {Array} arrays The arrays to inspect.n * @param {Function} [iteratee] The iteratee invoked per element.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of values.n */nnn function baseXor(arrays, iteratee, comparator) {n var length = arrays.length;nn if (length < 2) {n return length ? baseUniq(arrays) : [];n }nn var index = -1,n result = Array(length);nn while (++index < length) {n var array = arrays,n othIndex = -1;nn while (++othIndex < length) {n if (othIndex != index) {n result = baseDifference(result || array, arrays, iteratee, comparator);n }n }n }nn return baseUniq(baseFlatten(result, 1), iteratee, comparator);n }n /**n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.n *n * @privaten * @param {Array} props The property identifiers.n * @param {Array} values The property values.n * @param {Function} assignFunc The function to assign values.n * @returns {Object} Returns the new object.n */nnn function baseZipObject(props, values, assignFunc) {n var index = -1,n length = props.length,n valsLength = values.length,n result = {};nn while (++index < length) {n var value = index < valsLength ? values : undefined;n assignFunc(result, props, value);n }nn return result;n }n /**n * Casts `value` to an empty array if it's not an array like object.n *n * @privaten * @param {*} value The value to inspect.n * @returns {Array|Object} Returns the cast array-like object.n */nnn function castArrayLikeObject(value) {n return isArrayLikeObject(value) ? value : [];n }n /**n * Casts `value` to `identity` if it's not a function.n *n * @privaten * @param {*} value The value to inspect.n * @returns {Function} Returns cast function.n */nnn function castFunction(value) {n return typeof value == 'function' ? value : identity;n }n /**n * Casts `value` to a path array if it's not one.n *n * @privaten * @param {*} value The value to inspect.n * @param {Object} [object] The object to query keys on.n * @returns {Array} Returns the cast property path array.n */nnn function castPath(value, object) {n if (isArray(value)) {n return value;n }nn return isKey(value, object) ? [value] : stringToPath(toString(value));n }n /**n * A `baseRest` alias which can be replaced with `identity` by modulen * replacement plugins.n *n * @privaten * @type {Function}n * @param {Function} func The function to apply a rest parameter to.n * @returns {Function} Returns the new function.n */nnn var castRest = baseRest;n /**n * Casts `array` to a slice if it's needed.n *n * @privaten * @param {Array} array The array to inspect.n * @param {number} start The start position.n * @param {number} [end=array.length] The end position.n * @returns {Array} Returns the cast slice.n */nn function castSlice(array, start, end) {n var length = array.length;n end = end === undefined ? length : end;n return !start && end >= length ? array : baseSlice(array, start, end);n }n /**n * A simple wrapper around the global [`clearTimeout`](mdn.io/clearTimeout).n *n * @privaten * @param {number|Object} id The timer id or timeout object of the timer to clear.n */nnn var clearTimeout = ctxClearTimeout || function (id) {n return root.clearTimeout(id);n };n /**n * Creates a clone of `buffer`.n *n * @privaten * @param {Buffer} buffer The buffer to clone.n * @param {boolean} [isDeep] Specify a deep clone.n * @returns {Buffer} Returns the cloned buffer.n */nnn function cloneBuffer(buffer, isDeep) {n if (isDeep) {n return buffer.slice();n }nn var length = buffer.length,n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);n buffer.copy(result);n return result;n }n /**n * Creates a clone of `arrayBuffer`.n *n * @privaten * @param {ArrayBuffer} arrayBuffer The array buffer to clone.n * @returns {ArrayBuffer} Returns the cloned array buffer.n */nnn function cloneArrayBuffer(arrayBuffer) {n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);n new Uint8Array(result).set(new Uint8Array(arrayBuffer));n return result;n }n /**n * Creates a clone of `dataView`.n *n * @privaten * @param {Object} dataView The data view to clone.n * @param {boolean} [isDeep] Specify a deep clone.n * @returns {Object} Returns the cloned data view.n */nnn function cloneDataView(dataView, isDeep) {n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);n }n /**n * Creates a clone of `regexp`.n *n * @privaten * @param {Object} regexp The regexp to clone.n * @returns {Object} Returns the cloned regexp.n */nnn function cloneRegExp(regexp) {n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));n result.lastIndex = regexp.lastIndex;n return result;n }n /**n * Creates a clone of the `symbol` object.n *n * @privaten * @param {Object} symbol The symbol object to clone.n * @returns {Object} Returns the cloned symbol object.n */nnn function cloneSymbol(symbol) {n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};n }n /**n * Creates a clone of `typedArray`.n *n * @privaten * @param {Object} typedArray The typed array to clone.n * @param {boolean} [isDeep] Specify a deep clone.n * @returns {Object} Returns the cloned typed array.n */nnn function cloneTypedArray(typedArray, isDeep) {n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);n }n /**n * Compares values to sort them in ascending order.n *n * @privaten * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {number} Returns the sort order indicator for `value`.n */nnn function compareAscending(value, other) {n if (value !== other) {n var valIsDefined = value !== undefined,n valIsNull = value === null,n valIsReflexive = value === value,n valIsSymbol = isSymbol(value);n var othIsDefined = other !== undefined,n othIsNull = other === null,n othIsReflexive = other === other,n othIsSymbol = isSymbol(other);nn if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {n return 1;n }nn if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {n return -1;n }n }nn return 0;n }n /**n * Used by `_.orderBy` to compare multiple properties of a value to anothern * and stable sort them.n *n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,n * specify an order of "desc" for descending or "asc" for ascending sort ordern * of corresponding values.n *n * @privaten * @param {Object} object The object to compare.n * @param {Object} other The other object to compare.n * @param {boolean[]|string} orders The order to sort by for each property.n * @returns {number} Returns the sort order indicator for `object`.n */nnn function compareMultiple(object, other, orders) {n var index = -1,n objCriteria = object.criteria,n othCriteria = other.criteria,n length = objCriteria.length,n ordersLength = orders.length;nn while (++index < length) {n var result = compareAscending(objCriteria, othCriteria);nn if (result) {n if (index >= ordersLength) {n return result;n }nn var order = orders;n return result * (order == 'desc' ? -1 : 1);n }n } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applicationsn // that causes it, under certain circumstances, to provide the same value forn // `object` and `other`. See github.com/jashkenas/underscore/pull/1247n // for more details.n //n // This also ensures a stable sort in V8 and other engines.n // See bugs.chromium.org/p/v8/issues/detail?id=90 for more details.nnn return object.index - other.index;n }n /**n * Creates an array that is the composition of partially applied arguments,n * placeholders, and provided arguments into a single array of arguments.n *n * @privaten * @param {Array} args The provided arguments.n * @param {Array} partials The arguments to prepend to those provided.n * @param {Array} holders The `partials` placeholder indexes.n * @params {boolean} [isCurried] Specify composing for a curried function.n * @returns {Array} Returns the new array of composed arguments.n */nnn function composeArgs(args, partials, holders, isCurried) {n var argsIndex = -1,n argsLength = args.length,n holdersLength = holders.length,n leftIndex = -1,n leftLength = partials.length,n rangeLength = nativeMax(argsLength - holdersLength, 0),n result = Array(leftLength + rangeLength),n isUncurried = !isCurried;nn while (++leftIndex < leftLength) {n result = partials;n }nn while (++argsIndex < holdersLength) {n if (isUncurried || argsIndex < argsLength) {n result[holders] = args;n }n }nn while (rangeLength–) {n result = args;n }nn return result;n }n /**n * This function is like `composeArgs` except that the arguments compositionn * is tailored for `_.partialRight`.n *n * @privaten * @param {Array} args The provided arguments.n * @param {Array} partials The arguments to append to those provided.n * @param {Array} holders The `partials` placeholder indexes.n * @params {boolean} [isCurried] Specify composing for a curried function.n * @returns {Array} Returns the new array of composed arguments.n */nnn function composeArgsRight(args, partials, holders, isCurried) {n var argsIndex = -1,n argsLength = args.length,n holdersIndex = -1,n holdersLength = holders.length,n rightIndex = -1,n rightLength = partials.length,n rangeLength = nativeMax(argsLength - holdersLength, 0),n result = Array(rangeLength + rightLength),n isUncurried = !isCurried;nn while (++argsIndex < rangeLength) {n result = args;n }nn var offset = argsIndex;nn while (++rightIndex < rightLength) {n result[offset + rightIndex] = partials;n }nn while (++holdersIndex < holdersLength) {n if (isUncurried || argsIndex < argsLength) {n result[offset + holders] = args;n }n }nn return result;n }n /**n * Copies the values of `source` to `array`.n *n * @privaten * @param {Array} source The array to copy values from.n * @param {Array} [array= The array to copy values to.n * @returns {Array} Returns `array`.n */nnn function copyArray(source, array) {n var index = -1,n length = source.length;n array || (array = Array(length));nn while (++index < length) {n array = source;n }nn return array;n }n /**n * Copies properties of `source` to `object`.n *n * @privaten * @param {Object} source The object to copy properties from.n * @param {Array} props The property identifiers to copy.n * @param {Object} [object={}] The object to copy properties to.n * @param {Function} [customizer] The function to customize copied values.n * @returns {Object} Returns `object`.n */nnn function copyObject(source, props, object, customizer) {n var isNew = !object;n object || (object = {});n var index = -1,n length = props.length;nn while (++index < length) {n var key = props;n var newValue = customizer ? customizer(object, source, key, object, source) : undefined;nn if (newValue === undefined) {n newValue = source;n }nn if (isNew) {n baseAssignValue(object, key, newValue);n } else {n assignValue(object, key, newValue);n }n }nn return object;n }n /**n * Copies own symbols of `source` to `object`.n *n * @privaten * @param {Object} source The object to copy symbols from.n * @param {Object} [object={}] The object to copy symbols to.n * @returns {Object} Returns `object`.n */nnn function copySymbols(source, object) {n return copyObject(source, getSymbols(source), object);n }n /**n * Copies own and inherited symbols of `source` to `object`.n *n * @privaten * @param {Object} source The object to copy symbols from.n * @param {Object} [object={}] The object to copy symbols to.n * @returns {Object} Returns `object`.n */nnn function copySymbolsIn(source, object) {n return copyObject(source, getSymbolsIn(source), object);n }n /**n * Creates a function like `_.groupBy`.n *n * @privaten * @param {Function} setter The function to set accumulator values.n * @param {Function} [initializer] The accumulator object initializer.n * @returns {Function} Returns the new aggregator function.n */nnn function createAggregator(setter, initializer) {n return function (collection, iteratee) {n var func = isArray(collection) ? arrayAggregator : baseAggregator,n accumulator = initializer ? initializer() : {};n return func(collection, setter, getIteratee(iteratee, 2), accumulator);n };n }n /**n * Creates a function like `_.assign`.n *n * @privaten * @param {Function} assigner The function to assign values.n * @returns {Function} Returns the new assigner function.n */nnn function createAssigner(assigner) {n return baseRest(function (object, sources) {n var index = -1,n length = sources.length,n customizer = length > 1 ? sources[length - 1] : undefined,n guard = length > 2 ? sources : undefined;n customizer = assigner.length > 3 && typeof customizer == 'function' ? (length–, customizer) : undefined;nn if (guard && isIterateeCall(sources, sources, guard)) {n customizer = length < 3 ? undefined : customizer;n length = 1;n }nn object = Object(object);nn while (++index < length) {n var source = sources;nn if (source) {n assigner(object, source, index, customizer);n }n }nn return object;n });n }n /**n * Creates a `baseEach` or `baseEachRight` function.n *n * @privaten * @param {Function} eachFunc The function to iterate over a collection.n * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {Function} Returns the new base function.n */nnn function createBaseEach(eachFunc, fromRight) {n return function (collection, iteratee) {n if (collection == null) {n return collection;n }nn if (!isArrayLike(collection)) {n return eachFunc(collection, iteratee);n }nn var length = collection.length,n index = fromRight ? length : -1,n iterable = Object(collection);nn while (fromRight ? index– : ++index < length) {n if (iteratee(iterable, index, iterable) === false) {n break;n }n }nn return collection;n };n }n /**n * Creates a base function for methods like `_.forIn` and `_.forOwn`.n *n * @privaten * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {Function} Returns the new base function.n */nnn function createBaseFor(fromRight) {n return function (object, iteratee, keysFunc) {n var index = -1,n iterable = Object(object),n props = keysFunc(object),n length = props.length;nn while (length–) {n var key = props[fromRight ? length : ++index];nn if (iteratee(iterable, key, iterable) === false) {n break;n }n }nn return object;n };n }n /**n * Creates a function that wraps `func` to invoke it with the optional `this`n * binding of `thisArg`.n *n * @privaten * @param {Function} func The function to wrap.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @param {*} [thisArg] The `this` binding of `func`.n * @returns {Function} Returns the new wrapped function.n */nnn function createBind(func, bitmask, thisArg) {n var isBind = bitmask & WRAP_BIND_FLAG,n Ctor = createCtor(func);nn function wrapper() {n var fn = this && this !== root && this instanceof wrapper ? Ctor : func;n return fn.apply(isBind ? thisArg : this, arguments);n }nn return wrapper;n }n /**n * Creates a function like `_.lowerFirst`.n *n * @privaten * @param {string} methodName The name of the `String` case method to use.n * @returns {Function} Returns the new case function.n */nnn function createCaseFirst(methodName) {n return function (string) {n string = toString(string);n var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;n var chr = strSymbols ? strSymbols : string.charAt(0);n var trailing = strSymbols ? castSlice(strSymbols, 1).join('') : string.slice(1);n return chr() + trailing;n };n }n /**n * Creates a function like `_.camelCase`.n *n * @privaten * @param {Function} callback The function to combine each word.n * @returns {Function} Returns the new compounder function.n */nnn function createCompounder(callback) {n return function (string) {n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');n };n }n /**n * Creates a function that produces an instance of `Ctor` regardless ofn * whether it was invoked as part of a `new` expression or by `call` or `apply`.n *n * @privaten * @param {Function} Ctor The constructor to wrap.n * @returns {Function} Returns the new wrapped function.n */nnn function createCtor(Ctor) {n return function () {n // Use a `switch` statement to work with class constructors. Seen // ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslistn // for more details.n var args = arguments;nn switch (args.length) {n case 0:n return new Ctor();nn case 1:n return new Ctor(args);nn case 2:n return new Ctor(args, args);nn case 3:n return new Ctor(args, args, args);nn case 4:n return new Ctor(args, args, args, args);nn case 5:n return new Ctor(args, args, args, args, args);nn case 6:n return new Ctor(args, args, args, args, args, args);nn case 7:n return new Ctor(args, args, args, args, args, args, args);n }nn var thisBinding = baseCreate(Ctor.prototype),n result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior.n // See es5.github.io/#x13.2.2 for more details.nn return isObject(result) ? result : thisBinding;n };n }n /**n * Creates a function that wraps `func` to enable currying.n *n * @privaten * @param {Function} func The function to wrap.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @param {number} arity The arity of `func`.n * @returns {Function} Returns the new wrapped function.n */nnn function createCurry(func, bitmask, arity) {n var Ctor = createCtor(func);nn function wrapper() {n var length = arguments.length,n args = Array(length),n index = length,n placeholder = getHolder(wrapper);nn while (index–) {n args = arguments;n }nn var holders = length < 3 && args !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);n length -= holders.length;nn if (length < arity) {n return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length);n }nn var fn = this && this !== root && this instanceof wrapper ? Ctor : func;n return apply(fn, this, args);n }nn return wrapper;n }n /**n * Creates a `_.find` or `_.findLast` function.n *n * @privaten * @param {Function} findIndexFunc The function to find the collection index.n * @returns {Function} Returns the new find function.n */nnn function createFind(findIndexFunc) {n return function (collection, predicate, fromIndex) {n var iterable = Object(collection);nn if (!isArrayLike(collection)) {n var iteratee = getIteratee(predicate, 3);n collection = keys(collection);nn predicate = function predicate(key) {n return iteratee(iterable, key, iterable);n };n }nn var index = findIndexFunc(collection, predicate, fromIndex);n return index > -1 ? iterable[iteratee ? collection : index] : undefined;n };n }n /**n * Creates a `_.flow` or `_.flowRight` function.n *n * @privaten * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {Function} Returns the new flow function.n */nnn function createFlow(fromRight) {n return flatRest(function (funcs) {n var length = funcs.length,n index = length,n prereq = LodashWrapper.prototype.thru;nn if (fromRight) {n funcs.reverse();n }nn while (index–) {n var func = funcs;nn if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn if (prereq && !wrapper && getFuncName(func) == 'wrapper') {n var wrapper = new LodashWrapper([], true);n }n }nn index = wrapper ? index : length;nn while (++index < length) {n func = funcs;n var funcName = getFuncName(func),n data = funcName == 'wrapper' ? getData(func) : undefined;nn if (data && isLaziable(data) && data == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data.length && data == 1) {n wrapper = wrapper[getFuncName(data)].apply(wrapper, data);n } else {n wrapper = func.length == 1 && isLaziable(func) ? wrapper() : wrapper.thru(func);n }n }nn return function () {n var args = arguments,n value = args;nn if (wrapper && args.length == 1 && isArray(value)) {n return wrapper.plant(value).value();n }nn var index = 0,n result = length ? funcs.apply(this, args) : value;nn while (++index < length) {n result = funcs.call(this, result);n }nn return result;n };n });n }n /**n * Creates a function that wraps `func` to invoke it with optional `this`n * binding of `thisArg`, partial application, and currying.n *n * @privaten * @param {Function|string} func The function or method name to wrap.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @param {*} [thisArg] The `this` binding of `func`.n * @param {Array} [partials] The arguments to prepend to those provided ton * the new function.n * @param {Array} [holders] The `partials` placeholder indexes.n * @param {Array} [partialsRight] The arguments to append to those providedn * to the new function.n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.n * @param {Array} [argPos] The argument positions of the new function.n * @param {number} [ary] The arity cap of `func`.n * @param {number} [arity] The arity of `func`.n * @returns {Function} Returns the new wrapped function.n */nnn function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {n var isAry = bitmask & WRAP_ARY_FLAG,n isBind = bitmask & WRAP_BIND_FLAG,n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),n isFlip = bitmask & WRAP_FLIP_FLAG,n Ctor = isBindKey ? undefined : createCtor(func);nn function wrapper() {n var length = arguments.length,n args = Array(length),n index = length;nn while (index–) {n args = arguments;n }nn if (isCurried) {n var placeholder = getHolder(wrapper),n holdersCount = countHolders(args, placeholder);n }nn if (partials) {n args = composeArgs(args, partials, holders, isCurried);n }nn if (partialsRight) {n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);n }nn length -= holdersCount;nn if (isCurried && length < arity) {n var newHolders = replaceHolders(args, placeholder);n return createRecurry(func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length);n }nn var thisBinding = isBind ? thisArg : this,n fn = isBindKey ? thisBinding : func;n length = args.length;nn if (argPos) {n args = reorder(args, argPos);n } else if (isFlip && length > 1) {n args.reverse();n }nn if (isAry && ary < length) {n args.length = ary;n }nn if (this && this !== root && this instanceof wrapper) {n fn = Ctor || createCtor(fn);n }nn return fn.apply(thisBinding, args);n }nn return wrapper;n }n /**n * Creates a function like `_.invertBy`.n *n * @privaten * @param {Function} setter The function to set accumulator values.n * @param {Function} toIteratee The function to resolve iteratees.n * @returns {Function} Returns the new inverter function.n */nnn function createInverter(setter, toIteratee) {n return function (object, iteratee) {n return baseInverter(object, setter, toIteratee(iteratee), {});n };n }n /**n * Creates a function that performs a mathematical operation on two values.n *n * @privaten * @param {Function} operator The function to perform the operation.n * @param {number} [defaultValue] The value used for `undefined` arguments.n * @returns {Function} Returns the new mathematical operation function.n */nnn function createMathOperation(operator, defaultValue) {n return function (value, other) {n var result;nn if (value === undefined && other === undefined) {n return defaultValue;n }nn if (value !== undefined) {n result = value;n }nn if (other !== undefined) {n if (result === undefined) {n return other;n }nn if (typeof value == 'string' || typeof other == 'string') {n value = baseToString(value);n other = baseToString(other);n } else {n value = baseToNumber(value);n other = baseToNumber(other);n }nn result = operator(value, other);n }nn return result;n };n }n /**n * Creates a function like `_.over`.n *n * @privaten * @param {Function} arrayFunc The function to iterate over iteratees.n * @returns {Function} Returns the new over function.n */nnn function createOver(arrayFunc) {n return flatRest(function (iteratees) {n iteratees = arrayMap(iteratees, baseUnary(getIteratee()));n return baseRest(function (args) {n var thisArg = this;n return arrayFunc(iteratees, function (iteratee) {n return apply(iteratee, thisArg, args);n });n });n });n }n /**n * Creates the padding for `string` based on `length`. The `chars` stringn * is truncated if the number of characters exceeds `length`.n *n * @privaten * @param {number} length The padding length.n * @param {string} [chars=' '] The string used as padding.n * @returns {string} Returns the padding for `string`.n */nnn function createPadding(length, chars) {n chars = chars === undefined ? ' ' : baseToString(chars);n var charsLength = chars.length;nn if (charsLength < 2) {n return charsLength ? baseRepeat(chars, length) : chars;n }nn var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));n return hasUnicode(chars) ? castSlice(stringToArray(result), 0, length).join('') : result.slice(0, length);n }n /**n * Creates a function that wraps `func` to invoke it with the `this` bindingn * of `thisArg` and `partials` prepended to the arguments it receives.n *n * @privaten * @param {Function} func The function to wrap.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @param {*} thisArg The `this` binding of `func`.n * @param {Array} partials The arguments to prepend to those provided ton * the new function.n * @returns {Function} Returns the new wrapped function.n */nnn function createPartial(func, bitmask, thisArg, partials) {n var isBind = bitmask & WRAP_BIND_FLAG,n Ctor = createCtor(func);nn function wrapper() {n var argsIndex = -1,n argsLength = arguments.length,n leftIndex = -1,n leftLength = partials.length,n args = Array(leftLength + argsLength),n fn = this && this !== root && this instanceof wrapper ? Ctor : func;nn while (++leftIndex < leftLength) {n args = partials;n }nn while (argsLength–) {n args = arguments;n }nn return apply(fn, isBind ? thisArg : this, args);n }nn return wrapper;n }n /**n * Creates a `_.range` or `_.rangeRight` function.n *n * @privaten * @param {boolean} [fromRight] Specify iterating from right to left.n * @returns {Function} Returns the new range function.n */nnn function createRange(fromRight) {n return function (start, end, step) {n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {n end = step = undefined;n } // Ensure the sign of `-0` is preserved.nnn start = toFinite(start);nn if (end === undefined) {n end = start;n start = 0;n } else {n end = toFinite(end);n }nn step = step === undefined ? start < end ? 1 : -1 : toFinite(step);n return baseRange(start, end, step, fromRight);n };n }n /**n * Creates a function that performs a relational operation on two values.n *n * @privaten * @param {Function} operator The function to perform the operation.n * @returns {Function} Returns the new relational operation function.n */nnn function createRelationalOperation(operator) {n return function (value, other) {n if (!(typeof value == 'string' && typeof other == 'string')) {n value = toNumber(value);n other = toNumber(other);n }nn return operator(value, other);n };n }n /**n * Creates a function that wraps `func` to continue currying.n *n * @privaten * @param {Function} func The function to wrap.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @param {Function} wrapFunc The function to create the `func` wrapper.n * @param {*} placeholder The placeholder value.n * @param {*} [thisArg] The `this` binding of `func`.n * @param {Array} [partials] The arguments to prepend to those provided ton * the new function.n * @param {Array} [holders] The `partials` placeholder indexes.n * @param {Array} [argPos] The argument positions of the new function.n * @param {number} [ary] The arity cap of `func`.n * @param {number} [arity] The arity of `func`.n * @returns {Function} Returns the new wrapped function.n */nnn function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {n var isCurry = bitmask & WRAP_CURRY_FLAG,n newHolders = isCurry ? holders : undefined,n newHoldersRight = isCurry ? undefined : holders,n newPartials = isCurry ? partials : undefined,n newPartialsRight = isCurry ? undefined : partials;n bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);nn if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);n }nn var newData = [func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity];n var result = wrapFunc.apply(undefined, newData);nn if (isLaziable(func)) {n setData(result, newData);n }nn result.placeholder = placeholder;n return setWrapToString(result, func, bitmask);n }n /**n * Creates a function like `_.round`.n *n * @privaten * @param {string} methodName The name of the `Math` method to use when rounding.n * @returns {Function} Returns the new round function.n */nnn function createRound(methodName) {n var func = Math;n return function (number, precision) {n number = toNumber(number);n precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);nn if (precision && nativeIsFinite(number)) {n // Shift with exponential notation to avoid floating-point issues.n // See [MDN](mdn.io/round#Examples) for more details.n var pair = (toString(number) + 'e').split('e'),n value = func(pair + 'e' + (+pair + precision));n pair = (toString(value) + 'e').split('e');n return +(pair + 'e' + (+pair - precision));n }nn return func(number);n };n }n /**n * Creates a set object of `values`.n *n * @privaten * @param {Array} values The values to add to the set.n * @returns {Object} Returns the new set.n */nnn var createSet = !(Set && 1 / setToArray(new Set([, -0])) == INFINITY) ? noop : function (values) {n return new Set(values);n };n /**n * Creates a `_.toPairs` or `_.toPairsIn` function.n *n * @privaten * @param {Function} keysFunc The function to get the keys of a given object.n * @returns {Function} Returns the new pairs function.n */nn function createToPairs(keysFunc) {n return function (object) {n var tag = getTag(object);nn if (tag == mapTag) {n return mapToArray(object);n }nn if (tag == setTag) {n return setToPairs(object);n }nn return baseToPairs(object, keysFunc(object));n };n }n /**n * Creates a function that either curries or invokes `func` with optionaln * `this` binding and partially applied arguments.n *n * @privaten * @param {Function|string} func The function or method name to wrap.n * @param {number} bitmask The bitmask flags.n * 1 - `_.bind`n * 2 - `_.bindKey`n * 4 - `_.curry` or `_.curryRight` of a bound functionn * 8 - `_.curry`n * 16 - `_.curryRight`n * 32 - `_.partial`n * 64 - `_.partialRight`n * 128 - `_.rearg`n * 256 - `_.ary`n * 512 - `_.flip`n * @param {*} [thisArg] The `this` binding of `func`.n * @param {Array} [partials] The arguments to be partially applied.n * @param {Array} [holders] The `partials` placeholder indexes.n * @param {Array} [argPos] The argument positions of the new function.n * @param {number} [ary] The arity cap of `func`.n * @param {number} [arity] The arity of `func`.n * @returns {Function} Returns the new wrapped function.n */nnn function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;nn if (!isBindKey && typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn var length = partials ? partials.length : 0;nn if (!length) {n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);n partials = holders = undefined;n }nn ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);n arity = arity === undefined ? arity : toInteger(arity);n length -= holders ? holders.length : 0;nn if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {n var partialsRight = partials,n holdersRight = holders;n partials = holders = undefined;n }nn var data = isBindKey ? undefined : getData(func);n var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];nn if (data) {n mergeData(newData, data);n }nn func = newData;n bitmask = newData;n thisArg = newData;n partials = newData;n holders = newData;n arity = newData = newData === undefined ? isBindKey ? 0 : func.length : nativeMax(newData - length, 0);nn if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);n }nn if (!bitmask || bitmask == WRAP_BIND_FLAG) {n var result = createBind(func, bitmask, thisArg);n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {n result = createCurry(func, bitmask, arity);n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {n result = createPartial(func, bitmask, thisArg, partials);n } else {n result = createHybrid.apply(undefined, newData);n }nn var setter = data ? baseSetData : setData;n return setWrapToString(setter(result, newData), func, bitmask);n }n /**n * Used by `_.defaults` to customize its `_.assignIn` use to assign propertiesn * of source objects to the destination object for all destination propertiesn * that resolve to `undefined`.n *n * @privaten * @param {*} objValue The destination value.n * @param {*} srcValue The source value.n * @param {string} key The key of the property to assign.n * @param {Object} object The parent object of `objValue`.n * @returns {*} Returns the value to assign.n */nnn function customDefaultsAssignIn(objValue, srcValue, key, object) {n if (objValue === undefined || eq(objValue, objectProto) && !hasOwnProperty.call(object, key)) {n return srcValue;n }nn return objValue;n }n /**n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge sourcen * objects into destination objects that are passed thru.n *n * @privaten * @param {*} objValue The destination value.n * @param {*} srcValue The source value.n * @param {string} key The key of the property to merge.n * @param {Object} object The parent object of `objValue`.n * @param {Object} source The parent object of `srcValue`.n * @param {Object} [stack] Tracks traversed source values and their mergedn * counterparts.n * @returns {*} Returns the value to assign.n */nnn function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {n if (isObject(objValue) && isObject(srcValue)) {n // Recursively merge objects and arrays (susceptible to call stack limits).n stack.set(srcValue, objValue);n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);n stack(srcValue);n }nn return objValue;n }n /**n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plainn * objects.n *n * @privaten * @param {*} value The value to inspect.n * @param {string} key The key of the property to inspect.n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.n */nnn function customOmitClone(value) {n return isPlainObject(value) ? undefined : value;n }n /**n * A specialized version of `baseIsEqualDeep` for arrays with support forn * partial deep comparisons.n *n * @privaten * @param {Array} array The array to compare.n * @param {Array} other The other array to compare.n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.n * @param {Function} customizer The function to customize comparisons.n * @param {Function} equalFunc The function to determine equivalents of values.n * @param {Object} stack Tracks traversed `array` and `other` objects.n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.n */nnn function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,n arrLength = array.length,n othLength = other.length;nn if (arrLength != othLength && !(isPartial && othLength > arrLength)) {n return false;n } // Assume cyclic values are equal.nnn var stacked = stack.get(array);nn if (stacked && stack.get(other)) {n return stacked == other;n }nn var index = -1,n result = true,n seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;n stack.set(array, other);n stack.set(other, array); // Ignore non-index properties.nn while (++index < arrLength) {n var arrValue = array,n othValue = other;nn if (customizer) {n var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);n }nn if (compared !== undefined) {n if (compared) {n continue;n }nn result = false;n break;n } // Recursively compare arrays (susceptible to call stack limits).nnn if (seen) {n if (!arraySome(other, function (othValue, othIndex) {n if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {n return seen.push(othIndex);n }n })) {n result = false;n break;n }n } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {n result = false;n break;n }n }nn stack(array);n stack(other);n return result;n }n /**n * A specialized version of `baseIsEqualDeep` for comparing objects ofn * the same `toStringTag`.n *n * Note: This function only supports comparing values with tags ofn * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.n *n * @privaten * @param {Object} object The object to compare.n * @param {Object} other The other object to compare.n * @param {string} tag The `toStringTag` of the objects to compare.n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.n * @param {Function} customizer The function to customize comparisons.n * @param {Function} equalFunc The function to determine equivalents of values.n * @param {Object} stack Tracks traversed `object` and `other` objects.n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.n */nnn function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {n switch (tag) {n case dataViewTag:n if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {n return false;n }nn object = object.buffer;n other = other.buffer;nn case arrayBufferTag:n if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {n return false;n }nn return true;nn case boolTag:n case dateTag:n case numberTag:n // Coerce booleans to `1` or `0` and dates to milliseconds.n // Invalid dates are coerced to `NaN`.n return eq(+object, +other);nn case errorTag:n return object.name == other.name && object.message == other.message;nn case regexpTag:n case stringTag:n // Coerce regexes to strings and treat strings, primitives and objects,n // as equal. See www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostringn // for more details.n return object == other + '';nn case mapTag:n var convert = mapToArray;nn case setTag:n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;n convert || (convert = setToArray);nn if (object.size != other.size && !isPartial) {n return false;n } // Assume cyclic values are equal.nnn var stacked = stack.get(object);nn if (stacked) {n return stacked == other;n }nn bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits).nn stack.set(object, other);n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);n stack(object);n return result;nn case symbolTag:n if (symbolValueOf) {n return symbolValueOf.call(object) == symbolValueOf.call(other);n }nn }nn return false;n }n /**n * A specialized version of `baseIsEqualDeep` for objects with support forn * partial deep comparisons.n *n * @privaten * @param {Object} object The object to compare.n * @param {Object} other The other object to compare.n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.n * @param {Function} customizer The function to customize comparisons.n * @param {Function} equalFunc The function to determine equivalents of values.n * @param {Object} stack Tracks traversed `object` and `other` objects.n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.n */nnn function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,n objProps = getAllKeys(object),n objLength = objProps.length,n othProps = getAllKeys(other),n othLength = othProps.length;nn if (objLength != othLength && !isPartial) {n return false;n }nn var index = objLength;nn while (index–) {n var key = objProps;nn if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {n return false;n }n } // Assume cyclic values are equal.nnn var stacked = stack.get(object);nn if (stacked && stack.get(other)) {n return stacked == other;n }nn var result = true;n stack.set(object, other);n stack.set(other, object);n var skipCtor = isPartial;nn while (++index < objLength) {n key = objProps;n var objValue = object,n othValue = other;nn if (customizer) {n var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);n } // Recursively compare objects (susceptible to call stack limits).nnn if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {n result = false;n break;n }nn skipCtor || (skipCtor = key == 'constructor');n }nn if (result && !skipCtor) {n var objCtor = object.constructor,n othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal.nn if (objCtor != othCtor && 'constructor' in object && 'constructor' in other && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) {n result = false;n }n }nn stack(object);n stack(other);n return result;n }n /**n * A specialized version of `baseRest` which flattens the rest array.n *n * @privaten * @param {Function} func The function to apply a rest parameter to.n * @returns {Function} Returns the new function.n */nnn function flatRest(func) {n return setToString(overRest(func, undefined, flatten), func + '');n }n /**n * Creates an array of own enumerable property names and symbols of `object`.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names and symbols.n */nnn function getAllKeys(object) {n return baseGetAllKeys(object, keys, getSymbols);n }n /**n * Creates an array of own and inherited enumerable property names andn * symbols of `object`.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names and symbols.n */nnn function getAllKeysIn(object) {n return baseGetAllKeys(object, keysIn, getSymbolsIn);n }n /**n * Gets metadata for `func`.n *n * @privaten * @param {Function} func The function to query.n * @returns {*} Returns the metadata for `func`.n */nnn var getData = !metaMap ? noop : function (func) {n return metaMap.get(func);n };n /**n * Gets the name of `func`.n *n * @privaten * @param {Function} func The function to query.n * @returns {string} Returns the function name.n */nn function getFuncName(func) {n var result = func.name + '',n array = realNames,n length = hasOwnProperty.call(realNames, result) ? array.length : 0;nn while (length–) {n var data = array,n otherFunc = data.func;nn if (otherFunc == null || otherFunc == func) {n return data.name;n }n }nn return result;n }n /**n * Gets the argument placeholder value for `func`.n *n * @privaten * @param {Function} func The function to inspect.n * @returns {*} Returns the placeholder value.n */nnn function getHolder(func) {n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;n return object.placeholder;n }n /**n * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,n * this function returns the custom method, otherwise it returns `baseIteratee`.n * If arguments are provided, the chosen function is invoked with them andn * its result is returned.n *n * @privaten * @param {*} [value] The value to convert to an iteratee.n * @param {number} [arity] The arity of the created iteratee.n * @returns {Function} Returns the chosen function or its result.n */nnn function getIteratee() {n var result = lodash.iteratee || iteratee;n result = result === iteratee ? baseIteratee : result;n return arguments.length ? result(arguments, arguments) : result;n }n /**n * Gets the data for `map`.n *n * @privaten * @param {Object} map The map to query.n * @param {string} key The reference key.n * @returns {*} Returns the map data.n */nnn function getMapData(map, key) {n var data = map.__data__;n return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;n }n /**n * Gets the property names, values, and compare flags of `object`.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the match data of `object`.n */nnn function getMatchData(object) {n var result = keys(object),n length = result.length;nn while (length–) {n var key = result,n value = object;n result = [key, value, isStrictComparable(value)];n }nn return result;n }n /**n * Gets the native function at `key` of `object`.n *n * @privaten * @param {Object} object The object to query.n * @param {string} key The key of the method to get.n * @returns {*} Returns the function if it's native, else `undefined`.n */nnn function getNative(object, key) {n var value = getValue(object, key);n return baseIsNative(value) ? value : undefined;n }n /**n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.n *n * @privaten * @param {*} value The value to query.n * @returns {string} Returns the raw `toStringTag`.n */nnn function getRawTag(value) {n var isOwn = hasOwnProperty.call(value, symToStringTag),n tag = value;nn try {n value = undefined;n var unmasked = true;n } catch (e) {}nn var result = nativeObjectToString.call(value);nn if (unmasked) {n if (isOwn) {n value = tag;n } else {n delete value;n }n }nn return result;n }n /**n * Creates an array of the own enumerable symbols of `object`.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of symbols.n */nnn var getSymbols = !nativeGetSymbols ? stubArray : function (object) {n if (object == null) {n return [];n }nn object = Object(object);n return arrayFilter(nativeGetSymbols(object), function (symbol) {n return propertyIsEnumerable.call(object, symbol);n });n };n /**n * Creates an array of the own and inherited enumerable symbols of `object`.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of symbols.n */nn var getSymbolsIn = !nativeGetSymbols ? stubArray : function (object) {n var result = [];nn while (object) {n arrayPush(result, getSymbols(object));n object = getPrototype(object);n }nn return result;n };n /**n * Gets the `toStringTag` of `value`.n *n * @privaten * @param {*} value The value to query.n * @returns {string} Returns the `toStringTag`.n */nn var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.nn if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise && getTag(Promise.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {n getTag = function getTag(value) {n var result = baseGetTag(value),n Ctor = result == objectTag ? value.constructor : undefined,n ctorString = Ctor ? toSource(Ctor) : '';nn if (ctorString) {n switch (ctorString) {n case dataViewCtorString:n return dataViewTag;nn case mapCtorString:n return mapTag;nn case promiseCtorString:n return promiseTag;nn case setCtorString:n return setTag;nn case weakMapCtorString:n return weakMapTag;n }n }nn return result;n };n }n /**n * Gets the view, applying any `transforms` to the `start` and `end` positions.n *n * @privaten * @param {number} start The start of the view.n * @param {number} end The end of the view.n * @param {Array} transforms The transformations to apply to the view.n * @returns {Object} Returns an object containing the `start` and `end`n * positions of the view.n */nnn function getView(start, end, transforms) {n var index = -1,n length = transforms.length;nn while (++index < length) {n var data = transforms,n size = data.size;nn switch (data.type) {n case 'drop':n start += size;n break;nn case 'dropRight':n end -= size;n break;nn case 'take':n end = nativeMin(end, start + size);n break;nn case 'takeRight':n start = nativeMax(start, end - size);n break;n }n }nn return {n 'start': start,n 'end': endn };n }n /**n * Extracts wrapper details from the `source` body comment.n *n * @privaten * @param {string} source The source to inspect.n * @returns {Array} Returns the wrapper details.n */nnn function getWrapDetails(source) {n var match = source.match(reWrapDetails);n return match ? match.split(reSplitDetails) : [];n }n /**n * Checks if `path` exists on `object`.n *n * @privaten * @param {Object} object The object to query.n * @param {Array|string} path The path to check.n * @param {Function} hasFunc The function to check properties.n * @returns {boolean} Returns `true` if `path` exists, else `false`.n */nnn function hasPath(object, path, hasFunc) {n path = castPath(path, object);n var index = -1,n length = path.length,n result = false;nn while (++index < length) {n var key = toKey(path);nn if (!(result = object != null && hasFunc(object, key))) {n break;n }nn object = object;n }nn if (result || ++index != length) {n return result;n }nn length = object == null ? 0 : object.length;n return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));n }n /**n * Initializes an array clone.n *n * @privaten * @param {Array} array The array to clone.n * @returns {Array} Returns the initialized clone.n */nnn function initCloneArray(array) {n var length = array.length,n result = new array.constructor(length); // Add properties assigned by `RegExp#exec`.nn if (length && typeof array == 'string' && hasOwnProperty.call(array, 'index')) {n result.index = array.index;n result.input = array.input;n }nn return result;n }n /**n * Initializes an object clone.n *n * @privaten * @param {Object} object The object to clone.n * @returns {Object} Returns the initialized clone.n */nnn function initCloneObject(object) {n return typeof object.constructor == 'function' && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};n }n /**n * Initializes an object clone based on its `toStringTag`.n *n * Note: This function only supports cloning values with tags ofn * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.n *n * @privaten * @param {Object} object The object to clone.n * @param {string} tag The `toStringTag` of the object to clone.n * @param {boolean} [isDeep] Specify a deep clone.n * @returns {Object} Returns the initialized clone.n */nnn function initCloneByTag(object, tag, isDeep) {n var Ctor = object.constructor;nn switch (tag) {n case arrayBufferTag:n return cloneArrayBuffer(object);nn case boolTag:n case dateTag:n return new Ctor(+object);nn case dataViewTag:n return cloneDataView(object, isDeep);nn case float32Tag:n case float64Tag:n case int8Tag:n case int16Tag:n case int32Tag:n case uint8Tag:n case uint8ClampedTag:n case uint16Tag:n case uint32Tag:n return cloneTypedArray(object, isDeep);nn case mapTag:n return new Ctor();nn case numberTag:n case stringTag:n return new Ctor(object);nn case regexpTag:n return cloneRegExp(object);nn case setTag:n return new Ctor();nn case symbolTag:n return cloneSymbol(object);n }n }n /**n * Inserts wrapper `details` in a comment at the top of the `source` body.n *n * @privaten * @param {string} source The source to modify.n * @returns {Array} details The details to insert.n * @returns {string} Returns the modified source.n */nnn function insertWrapDetails(source, details) {n var length = details.length;nn if (!length) {n return source;n }nn var lastIndex = length - 1;n details = (length > 1 ? '& ' : '') + details;n details = details.join(length > 2 ? ', ' : ' ');n return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');n }n /**n * Checks if `value` is a flattenable `arguments` object or array.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.n */nnn function isFlattenable(value) {n return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value);n }n /**n * Checks if `value` is a valid array-like index.n *n * @privaten * @param {*} value The value to check.n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.n */nnn function isIndex(value, length) {n var type = _typeof(value);nn length = length == null ? MAX_SAFE_INTEGER : length;n return !!length && (type == 'number' || type != 'symbol' && reIsUint.test(value)) && value > -1 && value % 1 == 0 && value < length;n }n /**n * Checks if the given arguments are from an iteratee call.n *n * @privaten * @param {*} value The potential iteratee value argument.n * @param {*} index The potential iteratee index or key argument.n * @param {*} object The potential iteratee object argument.n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,n * else `false`.n */nnn function isIterateeCall(value, index, object) {n if (!isObject(object)) {n return false;n }nn var type = _typeof(index);nn if (type == 'number' ? isArrayLike(object) && isIndex(index, object.length) : type == 'string' && index in object) {n return eq(object, value);n }nn return false;n }n /**n * Checks if `value` is a property name and not a property path.n *n * @privaten * @param {*} value The value to check.n * @param {Object} [object] The object to query keys on.n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.n */nnn function isKey(value, object) {n if (isArray(value)) {n return false;n }nn var type = _typeof(value);nn if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {n return true;n }nn return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);n }n /**n * Checks if `value` is suitable for use as unique object key.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.n */nnn function isKeyable(value) {n var type = _typeof(value);nn return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;n }n /**n * Checks if `func` has a lazy counterpart.n *n * @privaten * @param {Function} func The function to check.n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,n * else `false`.n */nnn function isLaziable(func) {n var funcName = getFuncName(func),n other = lodash;nn if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {n return false;n }nn if (func === other) {n return true;n }nn var data = getData(other);n return !!data && func === data;n }n /**n * Checks if `func` has its source masked.n *n * @privaten * @param {Function} func The function to check.n * @returns {boolean} Returns `true` if `func` is masked, else `false`.n */nnn function isMasked(func) {n return !!maskSrcKey && maskSrcKey in func;n }n /**n * Checks if `func` is capable of being masked.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `func` is maskable, else `false`.n */nnn var isMaskable = coreJsData ? isFunction : stubFalse;n /**n * Checks if `value` is likely a prototype object.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.n */nn function isPrototype(value) {n var Ctor = value && value.constructor,n proto = typeof Ctor == 'function' && Ctor.prototype || objectProto;n return value === proto;n }n /**n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.n *n * @privaten * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` if suitable for strictn * equality comparisons, else `false`.n */nnn function isStrictComparable(value) {n return value === value && !isObject(value);n }n /**n * A specialized version of `matchesProperty` for source values suitablen * for strict equality comparisons, i.e. `===`.n *n * @privaten * @param {string} key The key of the property to get.n * @param {*} srcValue The value to match.n * @returns {Function} Returns the new spec function.n */nnn function matchesStrictComparable(key, srcValue) {n return function (object) {n if (object == null) {n return false;n }nn return object === srcValue && (srcValue !== undefined || key in Object(object));n };n }n /**n * A specialized version of `_.memoize` which clears the memoized function'sn * cache when it exceeds `MAX_MEMOIZE_SIZE`.n *n * @privaten * @param {Function} func The function to have its output memoized.n * @returns {Function} Returns the new memoized function.n */nnn function memoizeCapped(func) {n var result = memoize(func, function (key) {n if (cache.size === MAX_MEMOIZE_SIZE) {n cache.clear();n }nn return key;n });n var cache = result.cache;n return result;n }n /**n * Merges the function metadata of `source` into `data`.n *n * Merging metadata reduces the number of wrappers used to invoke a function.n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`n * may be applied regardless of execution order. Methods like `_.ary` andn * `_.rearg` modify function arguments, making the order in which they aren * executed important, preventing the merging of metadata. However, we maken * an exception for a safe combined case where curried functions have `_.ary`n * and or `_.rearg` applied.n *n * @privaten * @param {Array} data The destination metadata.n * @param {Array} source The source metadata.n * @returns {Array} Returns `data`.n */nnn function mergeData(data, source) {n var bitmask = data,n srcBitmask = source,n newBitmask = bitmask | srcBitmask,n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);n var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data.length <= source || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source.length <= source && bitmask == WRAP_CURRY_FLAG; // Exit early if metadata can't be merged.nn if (!(isCommon || isCombo)) {n return data;n } // Use source `thisArg` if available.nnn if (srcBitmask & WRAP_BIND_FLAG) {n data = source; // Set when currying a bound function.nn newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;n } // Compose partial arguments.nnn var value = source;nn if (value) {n var partials = data;n data = partials ? composeArgs(partials, value, source) : value;n data = partials ? replaceHolders(data, PLACEHOLDER) : source;n } // Compose partial right arguments.nnn value = source;nn if (value) {n partials = data;n data = partials ? composeArgsRight(partials, value, source) : value;n data = partials ? replaceHolders(data, PLACEHOLDER) : source;n } // Use source `argPos` if available.nnn value = source;nn if (value) {n data = value;n } // Use source `ary` if it's smaller.nnn if (srcBitmask & WRAP_ARY_FLAG) {n data = data == null ? source : nativeMin(data, source);n } // Use source `arity` if one is not provided.nnn if (data == null) {n data = source;n } // Use source `func` and merge bitmasks.nnn data = source;n data = newBitmask;n return data;n }n /**n * This function is liken * [`Object.keys`](ecma-international.org/ecma-262/7.0/#sec-object.keys)n * except that it includes inherited enumerable properties.n *n * @privaten * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names.n */nnn function nativeKeysIn(object) {n var result = [];nn if (object != null) {n for (var key in Object(object)) {n result.push(key);n }n }nn return result;n }n /**n * Converts `value` to a string using `Object.prototype.toString`.n *n * @privaten * @param {*} value The value to convert.n * @returns {string} Returns the converted string.n */nnn function objectToString(value) {n return nativeObjectToString.call(value);n }n /**n * A specialized version of `baseRest` which transforms the rest array.n *n * @privaten * @param {Function} func The function to apply a rest parameter to.n * @param {number} [start=func.length-1] The start position of the rest parameter.n * @param {Function} transform The rest array transform.n * @returns {Function} Returns the new function.n */nnn function overRest(func, start, transform) {n start = nativeMax(start === undefined ? func.length - 1 : start, 0);n return function () {n var args = arguments,n index = -1,n length = nativeMax(args.length - start, 0),n array = Array(length);nn while (++index < length) {n array = args[start + index];n }nn index = -1;n var otherArgs = Array(start + 1);nn while (++index < start) {n otherArgs = args;n }nn otherArgs = transform(array);n return apply(func, this, otherArgs);n };n }n /**n * Gets the parent value at `path` of `object`.n *n * @privaten * @param {Object} object The object to query.n * @param {Array} path The path to get the parent value of.n * @returns {*} Returns the parent value.n */nnn function parent(object, path) {n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));n }n /**n * Reorder `array` according to the specified indexes where the element atn * the first index is assigned as the first element, the element atn * the second index is assigned as the second element, and so on.n *n * @privaten * @param {Array} array The array to reorder.n * @param {Array} indexes The arranged array indexes.n * @returns {Array} Returns `array`.n */nnn function reorder(array, indexes) {n var arrLength = array.length,n length = nativeMin(indexes.length, arrLength),n oldArray = copyArray(array);nn while (length–) {n var index = indexes;n array = isIndex(index, arrLength) ? oldArray : undefined;n }nn return array;n }n /**n * Gets the value at `key`, unless `key` is "__proto__" or "constructor".n *n * @privaten * @param {Object} object The object to query.n * @param {string} key The key of the property to get.n * @returns {*} Returns the property value.n */nnn function safeGet(object, key) {n if (key === 'constructor' && typeof object === 'function') {n return;n }nn if (key == '__proto__') {n return;n }nn return object;n }n /**n * Sets metadata for `func`.n *n * Note: If this function becomes hot, i.e. is invoked a lot in a shortn * period of time, it will trip its breaker and transition to an identityn * function to avoid garbage collection pauses in V8. Seen * [V8 issue 2070](bugs.chromium.org/p/v8/issues/detail?id=2070)n * for more details.n *n * @privaten * @param {Function} func The function to associate metadata with.n * @param {*} data The metadata.n * @returns {Function} Returns `func`.n */nnn var setData = shortOut(baseSetData);n /**n * A simple wrapper around the global [`setTimeout`](mdn.io/setTimeout).n *n * @privaten * @param {Function} func The function to delay.n * @param {number} wait The number of milliseconds to delay invocation.n * @returns {number|Object} Returns the timer id or timeout object.n */nn var setTimeout = ctxSetTimeout || function (func, wait) {n return root.setTimeout(func, wait);n };n /**n * Sets the `toString` method of `func` to return `string`.n *n * @privaten * @param {Function} func The function to modify.n * @param {Function} string The `toString` result.n * @returns {Function} Returns `func`.n */nnn var setToString = shortOut(baseSetToString);n /**n * Sets the `toString` method of `wrapper` to mimic the source of `reference`n * with wrapper details in a comment at the top of the source body.n *n * @privaten * @param {Function} wrapper The function to modify.n * @param {Function} reference The reference function.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @returns {Function} Returns `wrapper`.n */nn function setWrapToString(wrapper, reference, bitmask) {n var source = reference + '';n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));n }n /**n * Creates a function that'll short out and invoke `identity` insteadn * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`n * milliseconds.n *n * @privaten * @param {Function} func The function to restrict.n * @returns {Function} Returns the new shortable function.n */nnn function shortOut(func) {n var count = 0,n lastCalled = 0;n return function () {n var stamp = nativeNow(),n remaining = HOT_SPAN - (stamp - lastCalled);n lastCalled = stamp;nn if (remaining > 0) {n if (++count >= HOT_COUNT) {n return arguments;n }n } else {n count = 0;n }nn return func.apply(undefined, arguments);n };n }n /**n * A specialized version of `_.shuffle` which mutates and sets the size of `array`.n *n * @privaten * @param {Array} array The array to shuffle.n * @param {number} [size=array.length] The size of `array`.n * @returns {Array} Returns `array`.n */nnn function shuffleSelf(array, size) {n var index = -1,n length = array.length,n lastIndex = length - 1;n size = size === undefined ? length : size;nn while (++index < size) {n var rand = baseRandom(index, lastIndex),n value = array;n array = array;n array = value;n }nn array.length = size;n return array;n }n /**n * Converts `string` to a property path array.n *n * @privaten * @param {string} string The string to convert.n * @returns {Array} Returns the property path array.n */nnn var stringToPath = memoizeCapped(function (string) {n var result = [];nn if (string.charCodeAt(0) === 46n /* . */n ) {n result.push('');n }nn string.replace(rePropName, function (match, number, quote, subString) {n result.push(quote ? subString.replace(reEscapeChar, '$1') : number || match);n });n return result;n });n /**n * Converts `value` to a string key if it's not a string or symbol.n *n * @privaten * @param {*} value The value to inspect.n * @returns {string|symbol} Returns the key.n */nn function toKey(value) {n if (typeof value == 'string' || isSymbol(value)) {n return value;n }nn var result = value + '';n return result == '0' && 1 / value == -INFINITY ? '-0' : result;n }n /**n * Converts `func` to its source code.n *n * @privaten * @param {Function} func The function to convert.n * @returns {string} Returns the source code.n */nnn function toSource(func) {n if (func != null) {n try {n return funcToString.call(func);n } catch (e) {}nn try {n return func + '';n } catch (e) {}n }nn return '';n }n /**n * Updates wrapper `details` based on `bitmask` flags.n *n * @privaten * @returns {Array} details The details to modify.n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.n * @returns {Array} Returns `details`.n */nnn function updateWrapDetails(details, bitmask) {n arrayEach(wrapFlags, function (pair) {n var value = '_.' + pair;nn if (bitmask & pair && !arrayIncludes(details, value)) {n details.push(value);n }n });n return details.sort();n }n /**n * Creates a clone of `wrapper`.n *n * @privaten * @param {Object} wrapper The wrapper to clone.n * @returns {Object} Returns the cloned wrapper.n */nnn function wrapperClone(wrapper) {n if (wrapper instanceof LazyWrapper) {n return wrapper.clone();n }nn var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);n result.__actions__ = copyArray(wrapper.__actions__);n result.__index__ = wrapper.__index__;n result.__values__ = wrapper.__values__;n return result;n }n /————————————————————————/nn /**n * Creates an array of elements split into groups the length of `size`.n * If `array` can't be split evenly, the final chunk will be the remainingn * elements.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to process.n * @param {number} [size=1] The length of each chunkn * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the new array of chunks.n * @examplen *n * _.chunk(['a', 'b', 'c', 'd'], 2);n * // => [['a', 'b'], ['c', 'd']]n *n * _.chunk(['a', 'b', 'c', 'd'], 3);n * // => [['a', 'b', 'c'], ['d']]n */nnn function chunk(array, size, guard) {n if (guard ? isIterateeCall(array, size, guard) : size === undefined) {n size = 1;n } else {n size = nativeMax(toInteger(size), 0);n }nn var length = array == null ? 0 : array.length;nn if (!length || size < 1) {n return [];n }nn var index = 0,n resIndex = 0,n result = Array(nativeCeil(length / size));nn while (index < length) {n result = baseSlice(array, index, index += size);n }nn return result;n }n /**n * Creates an array with all falsey values removed. The values `false`, `null`,n * `0`, `""`, `undefined`, and `NaN` are falsey.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to compact.n * @returns {Array} Returns the new array of filtered values.n * @examplen *n * _.compact([0, 1, false, 2, '', 3]);n * // => [1, 2, 3]n */nnn function compact(array) {n var index = -1,n length = array == null ? 0 : array.length,n resIndex = 0,n result = [];nn while (++index < length) {n var value = array;nn if (value) {n result = value;n }n }nn return result;n }n /**n * Creates a new array concatenating `array` with any additional arraysn * and/or values.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to concatenate.n * @param {…*} [values] The values to concatenate.n * @returns {Array} Returns the new concatenated array.n * @examplen *n * var array = [1];n * var other = _.concat(array, 2, [3], [[4]]);n *n * console.log(other);n * // => [1, 2, 3, [4]]n *n * console.log(array);n * // => [1]n */nnn function concat() {n var length = arguments.length;nn if (!length) {n return [];n }nn var args = Array(length - 1),n array = arguments,n index = length;nn while (index–) {n args[index - 1] = arguments;n }nn return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));n }n /**n * Creates an array of `array` values not included in the other given arraysn * using [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons. The order and references of result values aren * determined by the first array.n *n * Note: Unlike `_.pullAll`, this method returns a new array.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {…Array} [values] The values to exclude.n * @returns {Array} Returns the new array of filtered values.n * @see _.without, _.xorn * @examplen *n * _.difference([2, 1], [2, 3]);n * // => [1]n */nnn var difference = baseRest(function (array, values) {n return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : [];n });n /**n * This method is like `_.difference` except that it accepts `iteratee` whichn * is invoked for each element of `array` and `values` to generate the criterionn * by which they're compared. The order and references of result values aren * determined by the first array. The iteratee is invoked with one argument:n * (value).n *n * Note: Unlike `_.pullAllBy`, this method returns a new array.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {…Array} [values] The values to exclude.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Array} Returns the new array of filtered values.n * @examplen *n * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);n * // => [1.2]n *n * // The `_.property` iteratee shorthand.n * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');n * // => [{ 'x': 2 }]n */nn var differenceBy = baseRest(function (array, values) {n var iteratee = last(values);nn if (isArrayLikeObject(iteratee)) {n iteratee = undefined;n }nn return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) : [];n });n /**n * This method is like `_.difference` except that it accepts `comparator`n * which is invoked to compare elements of `array` to `values`. The order andn * references of result values are determined by the first array. The comparatorn * is invoked with two arguments: (arrVal, othVal).n *n * Note: Unlike `_.pullAllWith`, this method returns a new array.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {…Array} [values] The values to exclude.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of filtered values.n * @examplen *n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];n *n * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);n * // => [{ 'x': 2, 'y': 1 }]n */nn var differenceWith = baseRest(function (array, values) {n var comparator = last(values);nn if (isArrayLikeObject(comparator)) {n comparator = undefined;n }nn return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) : [];n });n /**n * Creates a slice of `array` with `n` elements dropped from the beginning.n *n * @staticn * @memberOf _n * @since 0.5.0n * @category Arrayn * @param {Array} array The array to query.n * @param {number} [n=1] The number of elements to drop.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * _.drop([1, 2, 3]);n * // => [2, 3]n *n * _.drop([1, 2, 3], 2);n * // => [3]n *n * _.drop([1, 2, 3], 5);n * // => []n *n * _.drop([1, 2, 3], 0);n * // => [1, 2, 3]n */nn function drop(array, n, guard) {n var length = array == null ? 0 : array.length;nn if (!length) {n return [];n }nn n = guard || n === undefined ? 1 : toInteger(n);n return baseSlice(array, n < 0 ? 0 : n, length);n }n /**n * Creates a slice of `array` with `n` elements dropped from the end.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to query.n * @param {number} [n=1] The number of elements to drop.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * _.dropRight([1, 2, 3]);n * // => [1, 2]n *n * _.dropRight([1, 2, 3], 2);n * // => [1]n *n * _.dropRight([1, 2, 3], 5);n * // => []n *n * _.dropRight([1, 2, 3], 0);n * // => [1, 2, 3]n */nnn function dropRight(array, n, guard) {n var length = array == null ? 0 : array.length;nn if (!length) {n return [];n }nn n = guard || n === undefined ? 1 : toInteger(n);n n = length - n;n return baseSlice(array, 0, n < 0 ? 0 : n);n }n /**n * Creates a slice of `array` excluding elements dropped from the end.n * Elements are dropped until `predicate` returns falsey. The predicate isn * invoked with three arguments: (value, index, array).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to query.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * var users = [n * { 'user': 'barney', 'active': true },n * { 'user': 'fred', 'active': false },n * { 'user': 'pebbles', 'active': false }n * ];n *n * _.dropRightWhile(users, function(o) { return !o.active; });n * // => objects for ['barney']n *n * // The `_.matches` iteratee shorthand.n * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });n * // => objects for ['barney', 'fred']n *n * // The `_.matchesProperty` iteratee shorthand.n * _.dropRightWhile(users, ['active', false]);n * // => objects for ['barney']n *n * // The `_.property` iteratee shorthand.n * _.dropRightWhile(users, 'active');n * // => objects for ['barney', 'fred', 'pebbles']n */nnn function dropRightWhile(array, predicate) {n return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];n }n /**n * Creates a slice of `array` excluding elements dropped from the beginning.n * Elements are dropped until `predicate` returns falsey. The predicate isn * invoked with three arguments: (value, index, array).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to query.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * var users = [n * { 'user': 'barney', 'active': false },n * { 'user': 'fred', 'active': false },n * { 'user': 'pebbles', 'active': true }n * ];n *n * _.dropWhile(users, function(o) { return !o.active; });n * // => objects for ['pebbles']n *n * // The `_.matches` iteratee shorthand.n * _.dropWhile(users, { 'user': 'barney', 'active': false });n * // => objects for ['fred', 'pebbles']n *n * // The `_.matchesProperty` iteratee shorthand.n * _.dropWhile(users, ['active', false]);n * // => objects for ['pebbles']n *n * // The `_.property` iteratee shorthand.n * _.dropWhile(users, 'active');n * // => objects for ['barney', 'fred', 'pebbles']n */nnn function dropWhile(array, predicate) {n return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];n }n /**n * Fills elements of `array` with `value` from `start` up to, but notn * including, `end`.n *n * Note: This method mutates `array`.n *n * @staticn * @memberOf _n * @since 3.2.0n * @category Arrayn * @param {Array} array The array to fill.n * @param {*} value The value to fill `array` with.n * @param {number} [start=0] The start position.n * @param {number} [end=array.length] The end position.n * @returns {Array} Returns `array`.n * @examplen *n * var array = [1, 2, 3];n *n * _.fill(array, 'a');n * console.log(array);n * // => ['a', 'a', 'a']n *n * _.fill(Array(3), 2);n * // => [2, 2, 2]n *n * _.fill([4, 6, 8, 10], '*', 1, 3);n * // => [4, '*', '*', 10]n */nnn function fill(array, value, start, end) {n var length = array == null ? 0 : array.length;nn if (!length) {n return [];n }nn if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {n start = 0;n end = length;n }nn return baseFill(array, value, start, end);n }n /**n * This method is like `_.find` except that it returns the index of the firstn * element `predicate` returns truthy for instead of the element itself.n *n * @staticn * @memberOf _n * @since 1.1.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @param {number} [fromIndex=0] The index to search from.n * @returns {number} Returns the index of the found element, else `-1`.n * @examplen *n * var users = [n * { 'user': 'barney', 'active': false },n * { 'user': 'fred', 'active': false },n * { 'user': 'pebbles', 'active': true }n * ];n *n * _.findIndex(users, function(o) { return o.user == 'barney'; });n * // => 0n *n * // The `_.matches` iteratee shorthand.n * _.findIndex(users, { 'user': 'fred', 'active': false });n * // => 1n *n * // The `_.matchesProperty` iteratee shorthand.n * _.findIndex(users, ['active', false]);n * // => 0n *n * // The `_.property` iteratee shorthand.n * _.findIndex(users, 'active');n * // => 2n */nnn function findIndex(array, predicate, fromIndex) {n var length = array == null ? 0 : array.length;nn if (!length) {n return -1;n }nn var index = fromIndex == null ? 0 : toInteger(fromIndex);nn if (index < 0) {n index = nativeMax(length + index, 0);n }nn return baseFindIndex(array, getIteratee(predicate, 3), index);n }n /**n * This method is like `_.findIndex` except that it iterates over elementsn * of `collection` from right to left.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @param {number} [fromIndex=array.length-1] The index to search from.n * @returns {number} Returns the index of the found element, else `-1`.n * @examplen *n * var users = [n * { 'user': 'barney', 'active': true },n * { 'user': 'fred', 'active': false },n * { 'user': 'pebbles', 'active': false }n * ];n *n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });n * // => 2n *n * // The `_.matches` iteratee shorthand.n * _.findLastIndex(users, { 'user': 'barney', 'active': true });n * // => 0n *n * // The `_.matchesProperty` iteratee shorthand.n * _.findLastIndex(users, ['active', false]);n * // => 2n *n * // The `_.property` iteratee shorthand.n * _.findLastIndex(users, 'active');n * // => 0n */nnn function findLastIndex(array, predicate, fromIndex) {n var length = array == null ? 0 : array.length;nn if (!length) {n return -1;n }nn var index = length - 1;nn if (fromIndex !== undefined) {n index = toInteger(fromIndex);n index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);n }nn return baseFindIndex(array, getIteratee(predicate, 3), index, true);n }n /**n * Flattens `array` a single level deep.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to flatten.n * @returns {Array} Returns the new flattened array.n * @examplen *n * _.flatten([1, [2, [3, [4]], 5]]);n * // => [1, 2, [3, [4]], 5]n */nnn function flatten(array) {n var length = array == null ? 0 : array.length;n return length ? baseFlatten(array, 1) : [];n }n /**n * Recursively flattens `array`.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to flatten.n * @returns {Array} Returns the new flattened array.n * @examplen *n * _.flattenDeep([1, [2, [3, [4]], 5]]);n * // => [1, 2, 3, 4, 5]n */nnn function flattenDeep(array) {n var length = array == null ? 0 : array.length;n return length ? baseFlatten(array, INFINITY) : [];n }n /**n * Recursively flatten `array` up to `depth` times.n *n * @staticn * @memberOf _n * @since 4.4.0n * @category Arrayn * @param {Array} array The array to flatten.n * @param {number} [depth=1] The maximum recursion depth.n * @returns {Array} Returns the new flattened array.n * @examplen *n * var array = [1, [2, [3, [4]], 5]];n *n * _.flattenDepth(array, 1);n * // => [1, 2, [3, [4]], 5]n *n * _.flattenDepth(array, 2);n * // => [1, 2, 3, [4], 5]n */nnn function flattenDepth(array, depth) {n var length = array == null ? 0 : array.length;nn if (!length) {n return [];n }nn depth = depth === undefined ? 1 : toInteger(depth);n return baseFlatten(array, depth);n }n /**n * The inverse of `_.toPairs`; this method returns an object composedn * from key-value `pairs`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} pairs The key-value pairs.n * @returns {Object} Returns the new object.n * @examplen *n * _.fromPairs([['a', 1], ['b', 2]]);n * // => { 'a': 1, 'b': 2 }n */nnn function fromPairs(pairs) {n var index = -1,n length = pairs == null ? 0 : pairs.length,n result = {};nn while (++index < length) {n var pair = pairs;n result[pair] = pair;n }nn return result;n }n /**n * Gets the first element of `array`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @alias firstn * @category Arrayn * @param {Array} array The array to query.n * @returns {*} Returns the first element of `array`.n * @examplen *n * _.head([1, 2, 3]);n * // => 1n *n * _.head([]);n * // => undefinedn */nnn function head(array) {n return array && array.length ? array : undefined;n }n /**n * Gets the index at which the first occurrence of `value` is found in `array`n * using [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons. If `fromIndex` is negative, it's used as then * offset from the end of `array`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @param {number} [fromIndex=0] The index to search from.n * @returns {number} Returns the index of the matched value, else `-1`.n * @examplen *n * _.indexOf([1, 2, 1, 2], 2);n * // => 1n *n * // Search
from the `fromIndex`.n * _.indexOf([1, 2, 1, 2], 2, 2);n * // => 3n */nnn function indexOf(array, value, fromIndex) {n var length = array == null ? 0 : array.length;nn if (!length) {n return -1;n }nn var index = fromIndex == null ? 0 : toInteger(fromIndex);nn if (index < 0) {n index = nativeMax(length + index, 0);n }nn return baseIndexOf(array, value, index);n }n /**n * Gets all but the last element of `array`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to query.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * _.initial([1, 2, 3]);n * // => [1, 2]n */nnn function initial(array) {n var length = array == null ? 0 : array.length;n return length ? baseSlice(array, 0, -1) : [];n }n /**n * Creates an array of unique values that are included in all given arraysn * using [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons. The order and references of result values aren * determined by the first array.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @returns {Array} Returns the new array of intersecting values.n * @examplen *n * _.intersection([2, 1], [2, 3]);n * // => [2]n */nnn var intersection = baseRest(function (arrays) {n var mapped = arrayMap(arrays, castArrayLikeObject);n return mapped.length && mapped === arrays ? baseIntersection(mapped) : [];n });n /**n * This method is like `_.intersection` except that it accepts `iteratee`n * which is invoked for each element of each `arrays` to generate the criterionn * by which they're compared. The order and references of result values aren * determined by the first array. The iteratee is invoked with one argument:n * (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Array} Returns the new array of intersecting values.n * @examplen *n * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);n * // => [2.1]n *n * // The `_.property` iteratee shorthand.n * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');n * // => [{ 'x': 1 }]n */nn var intersectionBy = baseRest(function (arrays) {n var iteratee = last(arrays),n mapped = arrayMap(arrays, castArrayLikeObject);nn if (iteratee === last(mapped)) {n iteratee = undefined;n } else {n mapped.pop();n }nn return mapped.length && mapped === arrays ? baseIntersection(mapped, getIteratee(iteratee, 2)) : [];n });n /**n * This method is like `_.intersection` except that it accepts `comparator`n * which is invoked to compare elements of `arrays`. The order and referencesn * of result values are determined by the first array. The comparator isn * invoked with two arguments: (arrVal, othVal).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of intersecting values.n * @examplen *n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];n *n * _.intersectionWith(objects, others, _.isEqual);n * // => [{ 'x': 1, 'y': 2 }]n */nn var intersectionWith = baseRest(function (arrays) {n var comparator = last(arrays),n mapped = arrayMap(arrays, castArrayLikeObject);n comparator = typeof comparator == 'function' ? comparator : undefined;nn if (comparator) {n mapped.pop();n }nn return mapped.length && mapped === arrays ? baseIntersection(mapped, undefined, comparator) : [];n });n /**n * Converts all elements in `array` into a string separated by `separator`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to convert.n * @param {string} [separator=','] The element separator.n * @returns {string} Returns the joined string.n * @examplen *n * _.join(['a', 'b', 'c'], '~');n * // => 'a~b~c'n */nn function join(array, separator) {n return array == null ? '' : nativeJoin.call(array, separator);n }n /**n * Gets the last element of `array`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to query.n * @returns {*} Returns the last element of `array`.n * @examplen *n * _.last([1, 2, 3]);n * // => 3n */nnn function last(array) {n var length = array == null ? 0 : array.length;n return length ? array[length - 1] : undefined;n }n /**n * This method is like `_.indexOf` except that it iterates over elements ofn * `array` from right to left.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @param {number} [fromIndex=array.length-1] The index to search from.n * @returns {number} Returns the index of the matched value, else `-1`.n * @examplen *n * _.lastIndexOf([1, 2, 1, 2], 2);n * // => 3n *n * // Search
from the `fromIndex`.n * _.lastIndexOf([1, 2, 1, 2], 2, 2);n * // => 1n */nnn function lastIndexOf(array, value, fromIndex) {n var length = array == null ? 0 : array.length;nn if (!length) {n return -1;n }nn var index = length;nn if (fromIndex !== undefined) {n index = toInteger(fromIndex);n index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);n }nn return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);n }n /**n * Gets the element at index `n` of `array`. If `n` is negative, the nthn * element from the end is returned.n *n * @staticn * @memberOf _n * @since 4.11.0n * @category Arrayn * @param {Array} array The array to query.n * @param {number} [n=0] The index of the element to return.n * @returns {*} Returns the nth element of `array`.n * @examplen *n * var array = ['a', 'b', 'c', 'd'];n *n * _.nth(array, 1);n * // => 'b'n *n * _.nth(array, -2);n * // => 'c';n */nnn function nth(array, n) {n return array && array.length ? baseNth(array, toInteger(n)) : undefined;n }n /**n * Removes all given values from `array` usingn * [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons.n *n * Note: Unlike `_.without`, this method mutates `array`. Use `_.remove`n * to remove elements from an array by predicate.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Arrayn * @param {Array} array The array to modify.n * @param {…*} [values] The values to remove.n * @returns {Array} Returns `array`.n * @examplen *n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];n *n * _.pull(array, 'a', 'c');n * console.log(array);n * // => ['b', 'b']n */nnn var pull = baseRest(pullAll);n /**n * This method is like `_.pull` except that it accepts an array of values to remove.n *n * Note: Unlike `_.difference`, this method mutates `array`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to modify.n * @param {Array} values The values to remove.n * @returns {Array} Returns `array`.n * @examplen *n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];n *n * _.pullAll(array, ['a', 'c']);n * console.log(array);n * // => ['b', 'b']n */nn function pullAll(array, values) {n return array && array.length && values && values.length ? basePullAll(array, values) : array;n }n /**n * This method is like `_.pullAll` except that it accepts `iteratee` which isn * invoked for each element of `array` and `values` to generate the criterionn * by which they're compared. The iteratee is invoked with one argument: (value).n *n * Note: Unlike `_.differenceBy`, this method mutates `array`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to modify.n * @param {Array} values The values to remove.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Array} Returns `array`.n * @examplen *n * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];n *n * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');n * console.log(array);n * // => [{ 'x': 2 }]n */nnn function pullAllBy(array, values, iteratee) {n return array && array.length && values && values.length ? basePullAll(array, values, getIteratee(iteratee, 2)) : array;n }n /**n * This method is like `_.pullAll` except that it accepts `comparator` whichn * is invoked to compare elements of `array` to `values`. The comparator isn * invoked with two arguments: (arrVal, othVal).n *n * Note: Unlike `_.differenceWith`, this method mutates `array`.n *n * @staticn * @memberOf _n * @since 4.6.0n * @category Arrayn * @param {Array} array The array to modify.n * @param {Array} values The values to remove.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns `array`.n * @examplen *n * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];n *n * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);n * console.log(array);n * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]n */nnn function pullAllWith(array, values, comparator) {n return array && array.length && values && values.length ? basePullAll(array, values, undefined, comparator) : array;n }n /**n * Removes elements from `array` corresponding to `indexes` and returns ann * array of removed elements.n *n * Note: Unlike `_.at`, this method mutates `array`.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to modify.n * @param {…(number|number[])} [indexes] The indexes of elements to remove.n * @returns {Array} Returns the new array of removed elements.n * @examplen *n * var array = ['a', 'b', 'c', 'd'];n * var pulled = _.pullAt(array, [1, 3]);n *n * console.log(array);n * // => ['a', 'c']n *n * console.log(pulled);n * // => ['b', 'd']n */nnn var pullAt = flatRest(function (array, indexes) {n var length = array == null ? 0 : array.length,n result = baseAt(array, indexes);n basePullAt(array, arrayMap(indexes, function (index) {n return isIndex(index, length) ? +index : index;n }).sort(compareAscending));n return result;n });n /**n * Removes all elements from `array` that `predicate` returns truthy forn * and returns an array of the removed elements. The predicate is invokedn * with three arguments: (value, index, array).n *n * Note: Unlike `_.filter`, this method mutates `array`. Use `_.pull`n * to pull elements from an array by value.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Arrayn * @param {Array} array The array to modify.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the new array of removed elements.n * @examplen *n * var array = [1, 2, 3, 4];n * var evens = _.remove(array, function(n) {n * return n % 2 == 0;n * });n *n * console.log(array);n * // => [1, 3]n *n * console.log(evens);n * // => [2, 4]n */nn function remove(array, predicate) {n var result = [];nn if (!(array && array.length)) {n return result;n }nn var index = -1,n indexes = [],n length = array.length;n predicate = getIteratee(predicate, 3);nn while (++index < length) {n var value = array;nn if (predicate(value, index, array)) {n result.push(value);n indexes.push(index);n }n }nn basePullAt(array, indexes);n return result;n }n /**n * Reverses `array` so that the first element becomes the last, the secondn * element becomes the second to last, and so on.n *n * Note: This method mutates `array` and is based onn * [`Array#reverse`](mdn.io/Array/reverse).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to modify.n * @returns {Array} Returns `array`.n * @examplen *n * var array = [1, 2, 3];n *n * _.reverse(array);n * // => [3, 2, 1]n *n * console.log(array);n * // => [3, 2, 1]n */nnn function reverse(array) {n return array == null ? array : nativeReverse.call(array);n }n /**n * Creates a slice of `array` from `start` up to, but not including, `end`.n *n * Note: This method is used instead ofn * [`Array#slice`](mdn.io/Array/slice) to ensure dense arrays aren * returned.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to slice.n * @param {number} [start=0] The start position.n * @param {number} [end=array.length] The end position.n * @returns {Array} Returns the slice of `array`.n */nnn function slice(array, start, end) {n var length = array == null ? 0 : array.length;nn if (!length) {n return [];n }nn if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {n start = 0;n end = length;n } else {n start = start == null ? 0 : toInteger(start);n end = end === undefined ? length : toInteger(end);n }nn return baseSlice(array, start, end);n }n /**n * Uses a binary search to determine the lowest index at which `value`n * should be inserted into `array` in order to maintain its sort order.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The sorted array to inspect.n * @param {*} value The value to evaluate.n * @returns {number} Returns the index at which `value` should be insertedn * into `array`.n * @examplen *n * _.sortedIndex([30, 50], 40);n * // => 1n */nnn function sortedIndex(array, value) {n return baseSortedIndex(array, value);n }n /**n * This method is like `_.sortedIndex` except that it accepts `iteratee`n * which is invoked for `value` and each element of `array` to compute theirn * sort ranking. The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The sorted array to inspect.n * @param {*} value The value to evaluate.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {number} Returns the index at which `value` should be insertedn * into `array`.n * @examplen *n * var objects = [{ 'x': 4 }, { 'x': 5 }];n *n * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });n * // => 0n *n * // The `_.property` iteratee shorthand.n * _.sortedIndexBy(objects, { 'x': 4 }, 'x');n * // => 0n */nnn function sortedIndexBy(array, value, iteratee) {n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));n }n /**n * This method is like `_.indexOf` except that it performs a binaryn * search on a sorted `array`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @returns {number} Returns the index of the matched value, else `-1`.n * @examplen *n * _.sortedIndexOf([4, 5, 5, 5, 6], 5);n * // => 1n */nnn function sortedIndexOf(array, value) {n var length = array == null ? 0 : array.length;nn if (length) {n var index = baseSortedIndex(array, value);nn if (index < length && eq(array, value)) {n return index;n }n }nn return -1;n }n /**n * This method is like `_.sortedIndex` except that it returns the highestn * index at which `value` should be inserted into `array` in order ton * maintain its sort order.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The sorted array to inspect.n * @param {*} value The value to evaluate.n * @returns {number} Returns the index at which `value` should be insertedn * into `array`.n * @examplen *n * _.sortedLastIndex([4, 5, 5, 5, 6], 5);n * // => 4n */nnn function sortedLastIndex(array, value) {n return baseSortedIndex(array, value, true);n }n /**n * This method is like `_.sortedLastIndex` except that it accepts `iteratee`n * which is invoked for `value` and each element of `array` to compute theirn * sort ranking. The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The sorted array to inspect.n * @param {*} value The value to evaluate.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {number} Returns the index at which `value` should be insertedn * into `array`.n * @examplen *n * var objects = [{ 'x': 4 }, { 'x': 5 }];n *n * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });n * // => 1n *n * // The `_.property` iteratee shorthand.n * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');n * // => 1n */nnn function sortedLastIndexBy(array, value, iteratee) {n return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);n }n /**n * This method is like `_.lastIndexOf` except that it performs a binaryn * search on a sorted `array`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {*} value The value to search for.n * @returns {number} Returns the index of the matched value, else `-1`.n * @examplen *n * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);n * // => 3n */nnn function sortedLastIndexOf(array, value) {n var length = array == null ? 0 : array.length;nn if (length) {n var index = baseSortedIndex(array, value, true) - 1;nn if (eq(array, value)) {n return index;n }n }nn return -1;n }n /**n * This method is like `_.uniq` except that it's designed and optimizedn * for sorted arrays.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @returns {Array} Returns the new duplicate free array.n * @examplen *n * _.sortedUniq([1, 1, 2]);n * // => [1, 2]n */nnn function sortedUniq(array) {n return array && array.length ? baseSortedUniq(array) : [];n }n /**n * This method is like `_.uniqBy` except that it's designed and optimizedn * for sorted arrays.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {Function} [iteratee] The iteratee invoked per element.n * @returns {Array} Returns the new duplicate free array.n * @examplen *n * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);n * // => [1.1, 2.3]n */nnn function sortedUniqBy(array, iteratee) {n return array && array.length ? baseSortedUniq(array, getIteratee(iteratee, 2)) : [];n }n /**n * Gets all but the first element of `array`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to query.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * _.tail([1, 2, 3]);n * // => [2, 3]n */nnn function tail(array) {n var length = array == null ? 0 : array.length;n return length ? baseSlice(array, 1, length) : [];n }n /**n * Creates a slice of `array` with `n` elements taken from the beginning.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to query.n * @param {number} [n=1] The number of elements to take.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * _.take([1, 2, 3]);n * // => [1]n *n * _.take([1, 2, 3], 2);n * // => [1, 2]n *n * _.take([1, 2, 3], 5);n * // => [1, 2, 3]n *n * _.take([1, 2, 3], 0);n * // => []n */nnn function take(array, n, guard) {n if (!(array && array.length)) {n return [];n }nn n = guard || n === undefined ? 1 : toInteger(n);n return baseSlice(array, 0, n < 0 ? 0 : n);n }n /**n * Creates a slice of `array` with `n` elements taken from the end.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to query.n * @param {number} [n=1] The number of elements to take.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * _.takeRight([1, 2, 3]);n * // => [3]n *n * _.takeRight([1, 2, 3], 2);n * // => [2, 3]n *n * _.takeRight([1, 2, 3], 5);n * // => [1, 2, 3]n *n * _.takeRight([1, 2, 3], 0);n * // => []n */nnn function takeRight(array, n, guard) {n var length = array == null ? 0 : array.length;nn if (!length) {n return [];n }nn n = guard || n === undefined ? 1 : toInteger(n);n n = length - n;n return baseSlice(array, n < 0 ? 0 : n, length);n }n /**n * Creates a slice of `array` with elements taken from the end. Elements aren * taken until `predicate` returns falsey. The predicate is invoked withn * three arguments: (value, index, array).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to query.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * var users = [n * { 'user': 'barney', 'active': true },n * { 'user': 'fred', 'active': false },n * { 'user': 'pebbles', 'active': false }n * ];n *n * _.takeRightWhile(users, function(o) { return !o.active; });n * // => objects for ['fred', 'pebbles']n *n * // The `_.matches` iteratee shorthand.n * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });n * // => objects for ['pebbles']n *n * // The `_.matchesProperty` iteratee shorthand.n * _.takeRightWhile(users, ['active', false]);n * // => objects for ['fred', 'pebbles']n *n * // The `_.property` iteratee shorthand.n * _.takeRightWhile(users, 'active');n * // => []n */nnn function takeRightWhile(array, predicate) {n return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];n }n /**n * Creates a slice of `array` with elements taken from the beginning. Elementsn * are taken until `predicate` returns falsey. The predicate is invoked withn * three arguments: (value, index, array).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Arrayn * @param {Array} array The array to query.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the slice of `array`.n * @examplen *n * var users = [n * { 'user': 'barney', 'active': false },n * { 'user': 'fred', 'active': false },n * { 'user': 'pebbles', 'active': true }n * ];n *n * _.takeWhile(users, function(o) { return !o.active; });n * // => objects for ['barney', 'fred']n *n * // The `_.matches` iteratee shorthand.n * _.takeWhile(users, { 'user': 'barney', 'active': false });n * // => objects for ['barney']n *n * // The `_.matchesProperty` iteratee shorthand.n * _.takeWhile(users, ['active', false]);n * // => objects for ['barney', 'fred']n *n * // The `_.property` iteratee shorthand.n * _.takeWhile(users, 'active');n * // => []n */nnn function takeWhile(array, predicate) {n return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];n }n /**n * Creates an array of unique values, in order, from all given arrays usingn * [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @returns {Array} Returns the new array of combined values.n * @examplen *n * _.union(, [1, 2]);n * // => [2, 1]n */nnn var union = baseRest(function (arrays) {n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));n });n /**n * This method is like `_.union` except that it accepts `iteratee` which isn * invoked for each element of each `arrays` to generate the criterion byn * which uniqueness is computed. Result values are chosen from the firstn * array in which the value occurs. The iteratee is invoked with one argument:n * (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Array} Returns the new array of combined values.n * @examplen *n * _.unionBy(, [1.2, 2.3], Math.floor);n * // => [2.1, 1.2]n *n * // The `_.property` iteratee shorthand.n * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');n * // => [{ 'x': 1 }, { 'x': 2 }]n */nn var unionBy = baseRest(function (arrays) {n var iteratee = last(arrays);nn if (isArrayLikeObject(iteratee)) {n iteratee = undefined;n }nn return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));n });n /**n * This method is like `_.union` except that it accepts `comparator` whichn * is invoked to compare elements of `arrays`. Result values are chosen fromn * the first array in which the value occurs. The comparator is invokedn * with two arguments: (arrVal, othVal).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of combined values.n * @examplen *n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];n *n * _.unionWith(objects, others, _.isEqual);n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]n */nn var unionWith = baseRest(function (arrays) {n var comparator = last(arrays);n comparator = typeof comparator == 'function' ? comparator : undefined;n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);n });n /**n * Creates a duplicate-free version of an array, usingn * [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons, in which only the first occurrence of each elementn * is kept. The order of result values is determined by the order they occurn * in the array.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to inspect.n * @returns {Array} Returns the new duplicate free array.n * @examplen *n * _.uniq([2, 1, 2]);n * // => [2, 1]n */nn function uniq(array) {n return array && array.length ? baseUniq(array) : [];n }n /**n * This method is like `_.uniq` except that it accepts `iteratee` which isn * invoked for each element in `array` to generate the criterion by whichn * uniqueness is computed. The order of result values is determined by then * order they occur in the array. The iteratee is invoked with one argument:n * (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Array} Returns the new duplicate free array.n * @examplen *n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);n * // => [2.1, 1.2]n *n * // The `_.property` iteratee shorthand.n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');n * // => [{ 'x': 1 }, { 'x': 2 }]n */nnn function uniqBy(array, iteratee) {n return array && array.length ? baseUniq(array, getIteratee(iteratee, 2)) : [];n }n /**n * This method is like `_.uniq` except that it accepts `comparator` whichn * is invoked to compare elements of `array`. The order of result values isn * determined by the order they occur in the array.The comparator is invokedn * with two arguments: (arrVal, othVal).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new duplicate free array.n * @examplen *n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];n *n * _.uniqWith(objects, _.isEqual);n * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]n */nnn function uniqWith(array, comparator) {n comparator = typeof comparator == 'function' ? comparator : undefined;n return array && array.length ? baseUniq(array, undefined, comparator) : [];n }n /**n * This method is like `_.zip` except that it accepts an array of groupedn * elements and creates an array regrouping the elements to their pre-zipn * configuration.n *n * @staticn * @memberOf _n * @since 1.2.0n * @category Arrayn * @param {Array} array The array of grouped elements to process.n * @returns {Array} Returns the new array of regrouped elements.n * @examplen *n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);n * // => [['a', 1, true], ['b', 2, false]]n *n * _.unzip(zipped);n * // => [['a', 'b'], [1, 2], [true, false]]n */nnn function unzip(array) {n if (!(array && array.length)) {n return [];n }nn var length = 0;n array = arrayFilter(array, function (group) {n if (isArrayLikeObject(group)) {n length = nativeMax(group.length, length);n return true;n }n });n return baseTimes(length, function (index) {n return arrayMap(array, baseProperty(index));n });n }n /**n * This method is like `_.unzip` except that it accepts `iteratee` to specifyn * how regrouped values should be combined. The iteratee is invoked with then * elements of each group: (…group).n *n * @staticn * @memberOf _n * @since 3.8.0n * @category Arrayn * @param {Array} array The array of grouped elements to process.n * @param {Function} [iteratee=_.identity] The function to combinen * regrouped values.n * @returns {Array} Returns the new array of regrouped elements.n * @examplen *n * var zipped = _.zip([1, 2], [10, 20], [100, 200]);n * // => [[1, 10, 100], [2, 20, 200]]n *n * _.unzipWith(zipped, _.add);n * // => [3, 30, 300]n */nnn function unzipWith(array, iteratee) {n if (!(array && array.length)) {n return [];n }nn var result = unzip(array);nn if (iteratee == null) {n return result;n }nn return arrayMap(result, function (group) {n return apply(iteratee, undefined, group);n });n }n /**n * Creates an array excluding all given values usingn * [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * for equality comparisons.n *n * Note: Unlike `_.pull`, this method returns a new array.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {Array} array The array to inspect.n * @param {…*} [values] The values to exclude.n * @returns {Array} Returns the new array of filtered values.n * @see _.difference, _.xorn * @examplen *n * _.without([2, 1, 2, 3], 1, 2);n * // => [3]n */nnn var without = baseRest(function (array, values) {n return isArrayLikeObject(array) ? baseDifference(array, values) : [];n });n /**n * Creates an array of unique values that is then * [symmetric difference](en.wikipedia.org/wiki/Symmetric_difference)n * of the given arrays. The order of result values is determined by the ordern * they occur in the arrays.n *n * @staticn * @memberOf _n * @since 2.4.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @returns {Array} Returns the new array of filtered values.n * @see _.difference, _.withoutn * @examplen *n * _.xor([2, 1], [2, 3]);n * // => [1, 3]n */nn var xor = baseRest(function (arrays) {n return baseXor(arrayFilter(arrays, isArrayLikeObject));n });n /**n * This method is like `_.xor` except that it accepts `iteratee` which isn * invoked for each element of each `arrays` to generate the criterion byn * which by which they're compared. The order of result values is determinedn * by the order they occur in the arrays. The iteratee is invoked with onen * argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Array} Returns the new array of filtered values.n * @examplen *n * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);n * // => [1.2, 3.4]n *n * // The `_.property` iteratee shorthand.n * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');n * // => [{ 'x': 2 }]n */nn var xorBy = baseRest(function (arrays) {n var iteratee = last(arrays);nn if (isArrayLikeObject(iteratee)) {n iteratee = undefined;n }nn return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));n });n /**n * This method is like `_.xor` except that it accepts `comparator` which isn * invoked to compare elements of `arrays`. The order of result values isn * determined by the order they occur in the arrays. The comparator is invokedn * with two arguments: (arrVal, othVal).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Arrayn * @param {…Array} [arrays] The arrays to inspect.n * @param {Function} [comparator] The comparator invoked per element.n * @returns {Array} Returns the new array of filtered values.n * @examplen *n * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];n * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];n *n * _.xorWith(objects, others, _.isEqual);n * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]n */nn var xorWith = baseRest(function (arrays) {n var comparator = last(arrays);n comparator = typeof comparator == 'function' ? comparator : undefined;n return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);n });n /**n * Creates an array of grouped elements, the first of which contains then * first elements of the given arrays, the second of which contains then * second elements of the given arrays, and so on.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Arrayn * @param {…Array} [arrays] The arrays to process.n * @returns {Array} Returns the new array of grouped elements.n * @examplen *n * _.zip(['a', 'b'], [1, 2], [true, false]);n * // => [['a', 1, true], ['b', 2, false]]n */nn var zip = baseRest(unzip);n /**n * This method is like `_.fromPairs` except that it accepts two arrays,n * one of property identifiers and one of corresponding values.n *n * @staticn * @memberOf _n * @since 0.4.0n * @category Arrayn * @param {Array} [props= The property identifiers.n * @param {Array} [values= The property values.n * @returns {Object} Returns the new object.n * @examplen *n * _.zipObject(['a', 'b'], [1, 2]);n * // => { 'a': 1, 'b': 2 }n */nn function zipObject(props, values) {n return baseZipObject(props || [], values || [], assignValue);n }n /**n * This method is like `_.zipObject` except that it supports property paths.n *n * @staticn * @memberOf _n * @since 4.1.0n * @category Arrayn * @param {Array} [props= The property identifiers.n * @param {Array} [values= The property values.n * @returns {Object} Returns the new object.n * @examplen *n * _.zipObjectDeep([‘a.b.c', 'a.b.d'], [1, 2]);n * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }n */nnn function zipObjectDeep(props, values) {n return baseZipObject(props || [], values || [], baseSet);n }n /**n * This method is like `_.zip` except that it accepts `iteratee` to specifyn * how grouped values should be combined. The iteratee is invoked with then * elements of each group: (…group).n *n * @staticn * @memberOf _n * @since 3.8.0n * @category Arrayn * @param {…Array} [arrays] The arrays to process.n * @param {Function} [iteratee=_.identity] The function to combinen * grouped values.n * @returns {Array} Returns the new array of grouped elements.n * @examplen *n * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {n * return a + b + c;n * });n * // => [111, 222]n */nnn var zipWith = baseRest(function (arrays) {n var length = arrays.length,n iteratee = length > 1 ? arrays[length - 1] : undefined;n iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;n return unzipWith(arrays, iteratee);n });n /————————————————————————/nn /**n * Creates a `lodash` wrapper instance that wraps `value` with explicit methodn * chain sequences enabled. The result of such sequences must be unwrappedn * with `_#value`.n *n * @staticn * @memberOf _n * @since 1.3.0n * @category Seqn * @param {*} value The value to wrap.n * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36 },n * { 'user': 'fred', 'age': 40 },n * { 'user': 'pebbles', 'age': 1 }n * ];n *n * var youngest = _n * .chain(users)n * .sortBy('age')n * .map(function(o) {n * return o.user + ' is ' + o.age;n * })n * .head()n * .value();n * // => 'pebbles is 1'n */nn function chain(value) {n var result = lodash(value);n result.__chain__ = true;n return result;n }n /**n * This method invokes `interceptor` and returns `value`. The interceptorn * is invoked with one argument; (value). The purpose of this method is ton * "tap into" a method chain sequence in order to modify intermediate results.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Seqn * @param {*} value The value to provide to `interceptor`.n * @param {Function} interceptor The function to invoke.n * @returns {*} Returns `value`.n * @examplen *n * _([1, 2, 3])n * .tap(function(array) {n * // Mutate input array.n * array.pop();n * })n * .reverse()n * .value();n * // => [2, 1]n */nnn function tap(value, interceptor) {n interceptor(value);n return value;n }n /**n * This method is like `_.tap` except that it returns the result of `interceptor`.n * The purpose of this method is to "pass thru" values replacing intermediaten * results in a method chain sequence.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Seqn * @param {*} value The value to provide to `interceptor`.n * @param {Function} interceptor The function to invoke.n * @returns {*} Returns the result of `interceptor`.n * @examplen *n * _(' abc ')n * .chain()n * .trim()n * .thru(function(value) {n * return [value];n * })n * .value();n * // => ['abc']n */nnn function thru(value, interceptor) {n return interceptor(value);n }n /**n * This method is the wrapper version of `_.at`.n *n * @name atn * @memberOf _n * @since 1.0.0n * @category Seqn * @param {…(string|string[])} [paths] The property paths to pick.n * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };n *n * _(object).at([’a.b.c', 'a']).value();n * // => [3, 4]n */nnn var wrapperAt = flatRest(function (paths) {n var length = paths.length,n start = length ? paths : 0,n value = this.__wrapped__,n interceptor = function interceptor(object) {n return baseAt(object, paths);n };nn if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {n return this.thru(interceptor);n }nn value = value.slice(start, +start + (length ? 1 : 0));nn value.__actions__.push({n 'func': thru,n 'args': [interceptor],n 'thisArg': undefinedn });nn return new LodashWrapper(value, this.__chain__).thru(function (array) {n if (length && !array.length) {n array.push(undefined);n }nn return array;n });n });n /**n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.n *n * @name chainn * @memberOf _n * @since 0.1.0n * @category Seqn * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36 },n * { 'user': 'fred', 'age': 40 }n * ];n *n * // A sequence without explicit chaining.n * _(users).head();n * // => { 'user': 'barney', 'age': 36 }n *n * // A sequence with explicit chaining.n * _(users)n * .chain()n * .head()n * .pick('user')n * .value();n * // => { 'user': 'barney' }n */nn function wrapperChain() {n return chain(this);n }n /**n * Executes the chain sequence and returns the wrapped result.n *n * @name commitn * @memberOf _n * @since 3.2.0n * @category Seqn * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * var array = [1, 2];n * var wrapped = _(array).push(3);n *n * console.log(array);n * // => [1, 2]n *n * wrapped = wrapped.commit();n * console.log(array);n * // => [1, 2, 3]n *n * wrapped.last();n * // => 3n *n * console.log(array);n * // => [1, 2, 3]n */nnn function wrapperCommit() {n return new LodashWrapper(this.value(), this.__chain__);n }n /**n * Gets the next value on a wrapped object following then * [iterator protocol](mdn.io/iteration_protocols#iterator).n *n * @name nextn * @memberOf _n * @since 4.0.0n * @category Seqn * @returns {Object} Returns the next iterator value.n * @examplen *n * var wrapped = _([1, 2]);n *n * wrapped.next();n * // => { 'done': false, 'value': 1 }n *n * wrapped.next();n * // => { 'done': false, 'value': 2 }n *n * wrapped.next();n * // => { 'done': true, 'value': undefined }n */nnn function wrapperNext() {n if (this.__values__ === undefined) {n this.__values__ = toArray(this.value());n }nn var done = this.__index__ >= this.__values__.length,n value = done ? undefined : this.__values__;n return {n 'done': done,n 'value': valuen };n }n /**n * Enables the wrapper to be iterable.n *n * @name Symbol.iteratorn * @memberOf _n * @since 4.0.0n * @category Seqn * @returns {Object} Returns the wrapper object.n * @examplen *n * var wrapped = _([1, 2]);n *n * wrapped() === wrapped;n * // => truen *n * Array.from(wrapped);n * // => [1, 2]n */nnn function wrapperToIterator() {n return this;n }n /**n * Creates a clone of the chain sequence planting `value` as the wrapped value.n *n * @name plantn * @memberOf _n * @since 3.2.0n * @category Seqn * @param {*} value The value to plant.n * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * function square(n) {n * return n * n;n * }n *n * var wrapped = _([1, 2]).map(square);n * var other = wrapped.plant([3, 4]);n *n * other.value();n * // => [9, 16]n *n * wrapped.value();n * // => [1, 4]n */nnn function wrapperPlant(value) {n var result,n parent = this;nn while (parent instanceof baseLodash) {n var clone = wrapperClone(parent);n clone.__index__ = 0;n clone.__values__ = undefined;nn if (result) {n previous.__wrapped__ = clone;n } else {n result = clone;n }nn var previous = clone;n parent = parent.__wrapped__;n }nn previous.__wrapped__ = value;n return result;n }n /**n * This method is the wrapper version of `_.reverse`.n *n * Note: This method mutates the wrapped array.n *n * @name reversen * @memberOf _n * @since 0.1.0n * @category Seqn * @returns {Object} Returns the new `lodash` wrapper instance.n * @examplen *n * var array = [1, 2, 3];n *n * _(array).reverse().value()n * // => [3, 2, 1]n *n * console.log(array);n * // => [3, 2, 1]n */nnn function wrapperReverse() {n var value = this.__wrapped__;nn if (value instanceof LazyWrapper) {n var wrapped = value;nn if (this.__actions__.length) {n wrapped = new LazyWrapper(this);n }nn wrapped = wrapped.reverse();nn wrapped.__actions__.push({n 'func': thru,n 'args': [reverse],n 'thisArg': undefinedn });nn return new LodashWrapper(wrapped, this.__chain__);n }nn return this.thru(reverse);n }n /**n * Executes the chain sequence to resolve the unwrapped value.n *n * @name valuen * @memberOf _n * @since 0.1.0n * @alias toJSON, valueOfn * @category Seqn * @returns {*} Returns the resolved unwrapped value.n * @examplen *n * _([1, 2, 3]).value();n * // => [1, 2, 3]n */nnn function wrapperValue() {n return baseWrapperValue(this.__wrapped__, this.__actions__);n }n /————————————————————————/nn /**n * Creates an object composed of keys generated from the results of runningn * each element of `collection` thru `iteratee`. The corresponding value ofn * each key is the number of times the key was returned by `iteratee`. Then * iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 0.5.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.n * @returns {Object} Returns the composed aggregate object.n * @examplen *n * _.countBy([6.1, 4.2, 6.3], Math.floor);n * // => { '4': 1, '6': 2 }n *n * // The `_.property` iteratee shorthand.n * _.countBy(['one', 'two', 'three'], 'length');n * // => { '3': 2, '5': 1 }n */nnn var countBy = createAggregator(function (result, value, key) {n if (hasOwnProperty.call(result, key)) {n ++result;n } else {n baseAssignValue(result, key, 1);n }n });n /**n * Checks if `predicate` returns truthy for all elements of `collection`.n * Iteration is stopped once `predicate` returns falsey. The predicate isn * invoked with three arguments: (value, index|key, collection).n *n * Note: This method returns `true` forn * [empty collections](en.wikipedia.org/wiki/Empty_set) becausen * [everything is true](en.wikipedia.org/wiki/Vacuous_truth) ofn * elements of empty collections.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {boolean} Returns `true` if all elements pass the predicate check,n * else `false`.n * @examplen *n * _.every([true, 1, null, 'yes'], Boolean);n * // => falsen *n * var users = [n * { 'user': 'barney', 'age': 36, 'active': false },n * { 'user': 'fred', 'age': 40, 'active': false }n * ];n *n * // The `_.matches` iteratee shorthand.n * _.every(users, { 'user': 'barney', 'active': false });n * // => falsen *n * // The `_.matchesProperty` iteratee shorthand.n * _.every(users, ['active', false]);n * // => truen *n * // The `_.property` iteratee shorthand.n * _.every(users, 'active');n * // => falsen */nn function every(collection, predicate, guard) {n var func = isArray(collection) ? arrayEvery : baseEvery;nn if (guard && isIterateeCall(collection, predicate, guard)) {n predicate = undefined;n }nn return func(collection, getIteratee(predicate, 3));n }n /**n * Iterates over elements of `collection`, returning an array of all elementsn * `predicate` returns truthy for. The predicate is invoked with threen * arguments: (value, index|key, collection).n *n * Note: Unlike `_.remove`, this method returns a new array.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the new filtered array.n * @see _.rejectn * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36, 'active': true },n * { 'user': 'fred', 'age': 40, 'active': false }n * ];n *n * _.filter(users, function(o) { return !o.active; });n * // => objects for ['fred']n *n * // The `_.matches` iteratee shorthand.n * _.filter(users, { 'age': 36, 'active': true });n * // => objects for ['barney']n *n * // The `_.matchesProperty` iteratee shorthand.n * _.filter(users, ['active', false]);n * // => objects for ['fred']n *n * // The `_.property` iteratee shorthand.n * _.filter(users, 'active');n * // => objects for ['barney']n */nnn function filter(collection, predicate) {n var func = isArray(collection) ? arrayFilter : baseFilter;n return func(collection, getIteratee(predicate, 3));n }n /**n * Iterates over elements of `collection`, returning the first elementn * `predicate` returns truthy for. The predicate is invoked with threen * arguments: (value, index|key, collection).n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to inspect.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @param {number} [fromIndex=0] The index to search from.n * @returns {*} Returns the matched element, else `undefined`.n * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36, 'active': true },n * { 'user': 'fred', 'age': 40, 'active': false },n * { 'user': 'pebbles', 'age': 1, 'active': true }n * ];n *n * _.find(users, function(o) { return o.age < 40; });n * // => object for 'barney'n *n * // The `_.matches` iteratee shorthand.n * _.find(users, { 'age': 1, 'active': true });n * // => object for 'pebbles'n *n * // The `_.matchesProperty` iteratee shorthand.n * _.find(users, ['active', false]);n * // => object for 'fred'n *n * // The `_.property` iteratee shorthand.n * _.find(users, 'active');n * // => object for 'barney'n */nnn var find = createFind(findIndex);n /**n * This method is like `_.find` except that it iterates over elements ofn * `collection` from right to left.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Collectionn * @param {Array|Object} collection The collection to inspect.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @param {number} [fromIndex=collection.length-1] The index to search from.n * @returns {*} Returns the matched element, else `undefined`.n * @examplen *n * _.findLast([1, 2, 3, 4], function(n) {n * return n % 2 == 1;n * });n * // => 3n */nn var findLast = createFind(findLastIndex);n /**n * Creates a flattened array of values by running each element in `collection`n * thru `iteratee` and flattening the mapped results. The iteratee is invokedn * with three arguments: (value, index|key, collection).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Array} Returns the new flattened array.n * @examplen *n * function duplicate(n) {n * return [n, n];n * }n *n * _.flatMap([1, 2], duplicate);n * // => [1, 1, 2, 2]n */nn function flatMap(collection, iteratee) {n return baseFlatten(map(collection, iteratee), 1);n }n /**n * This method is like `_.flatMap` except that it recursively flattens then * mapped results.n *n * @staticn * @memberOf _n * @since 4.7.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Array} Returns the new flattened array.n * @examplen *n * function duplicate(n) {n * return [[[n, n]]];n * }n *n * _.flatMapDeep([1, 2], duplicate);n * // => [1, 1, 2, 2]n */nnn function flatMapDeep(collection, iteratee) {n return baseFlatten(map(collection, iteratee), INFINITY);n }n /**n * This method is like `_.flatMap` except that it recursively flattens then * mapped results up to `depth` times.n *n * @staticn * @memberOf _n * @since 4.7.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @param {number} [depth=1] The maximum recursion depth.n * @returns {Array} Returns the new flattened array.n * @examplen *n * function duplicate(n) {n * return [[[n, n]]];n * }n *n * _.flatMapDepth([1, 2], duplicate, 2);n * // => [[1, 1], [2, 2]]n */nnn function flatMapDepth(collection, iteratee, depth) {n depth = depth === undefined ? 1 : toInteger(depth);n return baseFlatten(map(collection, iteratee), depth);n }n /**n * Iterates over elements of `collection` and invokes `iteratee` for each element.n * The iteratee is invoked with three arguments: (value, index|key, collection).n * Iteratee functions may exit iteration early by explicitly returning `false`.n *n * Note: As with other "Collections" methods, objects with a "length"n * property are iterated like arrays. To avoid this behavior use `_.forIn`n * or `_.forOwn` for object iteration.n *n * @staticn * @memberOf _n * @since 0.1.0n * @alias eachn * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Array|Object} Returns `collection`.n * @see _.forEachRightn * @examplen *n * _.forEach([1, 2], function(value) {n * console.log(value);n * });n * // => Logs `1` then `2`.n *n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {n * console.log(key);n * });n * // => Logs 'a' then 'b' (iteration order is not guaranteed).n */nnn function forEach(collection, iteratee) {n var func = isArray(collection) ? arrayEach : baseEach;n return func(collection, getIteratee(iteratee, 3));n }n /**n * This method is like `_.forEach` except that it iterates over elements ofn * `collection` from right to left.n *n * @staticn * @memberOf _n * @since 2.0.0n * @alias eachRightn * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Array|Object} Returns `collection`.n * @see _.forEachn * @examplen *n * _.forEachRight([1, 2], function(value) {n * console.log(value);n * });n * // => Logs `2` then `1`.n */nnn function forEachRight(collection, iteratee) {n var func = isArray(collection) ? arrayEachRight : baseEachRight;n return func(collection, getIteratee(iteratee, 3));n }n /**n * Creates an object composed of keys generated from the results of runningn * each element of `collection` thru `iteratee`. The order of grouped valuesn * is determined by the order they occur in `collection`. The correspondingn * value of each key is an array of elements responsible for generating then * key. The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.n * @returns {Object} Returns the composed aggregate object.n * @examplen *n * _.groupBy([6.1, 4.2, 6.3], Math.floor);n * // => { '4': [4.2], '6': [6.1, 6.3] }n *n * // The `_.property` iteratee shorthand.n * _.groupBy(['one', 'two', 'three'], 'length');n * // => { '3': ['one', 'two'], '5': ['three'] }n */nnn var groupBy = createAggregator(function (result, value, key) {n if (hasOwnProperty.call(result, key)) {n result.push(value);n } else {n baseAssignValue(result, key, [value]);n }n });n /**n * Checks if `value` is in `collection`. If `collection` is a string, it'sn * checked for a substring of `value`, otherwisen * [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * is used for equality comparisons. If `fromIndex` is negative, it's used asn * the offset from the end of `collection`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object|string} collection The collection to inspect.n * @param {*} value The value to search for.n * @param {number} [fromIndex=0] The index to search from.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.n * @returns {boolean} Returns `true` if `value` is found, else `false`.n * @examplen *n * _.includes([1, 2, 3], 1);n * // => truen *n * _.includes([1, 2, 3], 1, 2);n * // => falsen *n * _.includes({ 'a': 1, 'b': 2 }, 1);n * // => truen *n * _.includes('abcd', 'bc');n * // => truen */nn function includes(collection, value, fromIndex, guard) {n collection = isArrayLike(collection) ? collection : values(collection);n fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;n var length = collection.length;nn if (fromIndex < 0) {n fromIndex = nativeMax(length + fromIndex, 0);n }nn return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;n }n /**n * Invokes the method at `path` of each element in `collection`, returningn * an array of the results of each invoked method. Any additional argumentsn * are provided to each invoked method. If `path` is a function, it's invokedn * for, and `this` bound to, each element in `collection`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Array|Function|string} path The path of the method to invoke orn * the function invoked per iteration.n * @param {…*} [args] The arguments to invoke each method with.n * @returns {Array} Returns the array of results.n * @examplen *n * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');n * // => [[1, 5, 7], [1, 2, 3]]n *n * _.invokeMap([123, 456], String.prototype.split, '');n * // => [['1', '2', '3'], ['4', '5', '6']]n */nnn var invokeMap = baseRest(function (collection, path, args) {n var index = -1,n isFunc = typeof path == 'function',n result = isArrayLike(collection) ? Array(collection.length) : [];n baseEach(collection, function (value) {n result = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);n });n return result;n });n /**n * Creates an object composed of keys generated from the results of runningn * each element of `collection` thru `iteratee`. The corresponding value ofn * each key is the last element responsible for generating the key. Then * iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.n * @returns {Object} Returns the composed aggregate object.n * @examplen *n * var array = [n * { 'dir': 'left', 'code': 97 },n * { 'dir': 'right', 'code': 100 }n * ];n *n * _.keyBy(array, function(o) {n * return String.fromCharCode(o.code);n * });n * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }n *n * _.keyBy(array, 'dir');n * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }n */nn var keyBy = createAggregator(function (result, value, key) {n baseAssignValue(result, key, value);n });n /**n * Creates an array of values by running each element in `collection` thrun * `iteratee`. The iteratee is invoked with three arguments:n * (value, index|key, collection).n *n * Many lodash methods are guarded to work as iteratees for methods liken * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.n *n * The guarded methods are:n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Array} Returns the new mapped array.n * @examplen *n * function square(n) {n * return n * n;n * }n *n * _.map([4, 8], square);n * // => [16, 64]n *n * _.map({ 'a': 4, 'b': 8 }, square);n * // => [16, 64] (iteration order is not guaranteed)n *n * var users = [n * { 'user': 'barney' },n * { 'user': 'fred' }n * ];n *n * // The `_.property` iteratee shorthand.n * _.map(users, 'user');n * // => ['barney', 'fred']n */nn function map(collection, iteratee) {n var func = isArray(collection) ? arrayMap : baseMap;n return func(collection, getIteratee(iteratee, 3));n }n /**n * This method is like `_.sortBy` except that it allows specifying the sortn * orders of the iteratees to sort by. If `orders` is unspecified, all valuesn * are sorted in ascending order. Otherwise, specify an order of "desc" forn * descending or "asc" for ascending sort order of corresponding values.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Array[]|Function|Object[]|string} [iteratees=]n * The iteratees to sort by.n * @param {string[]} [orders] The sort orders of `iteratees`.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.n * @returns {Array} Returns the new sorted array.n * @examplen *n * var users = [n * { 'user': 'fred', 'age': 48 },n * { 'user': 'barney', 'age': 34 },n * { 'user': 'fred', 'age': 40 },n * { 'user': 'barney', 'age': 36 }n * ];n *n * // Sort by `user` in ascending order and by `age` in descending order.n * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]n */nnn function orderBy(collection, iteratees, orders, guard) {n if (collection == null) {n return [];n }nn if (!isArray(iteratees)) {n iteratees = iteratees == null ? [] : [iteratees];n }nn orders = guard ? undefined : orders;nn if (!isArray(orders)) {n orders = orders == null ? [] : [orders];n }nn return baseOrderBy(collection, iteratees, orders);n }n /**n * Creates an array of elements split into two groups, the first of whichn * contains elements `predicate` returns truthy for, the second of whichn * contains elements `predicate` returns falsey for. The predicate isn * invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the array of grouped elements.n * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36, 'active': false },n * { 'user': 'fred', 'age': 40, 'active': true },n * { 'user': 'pebbles', 'age': 1, 'active': false }n * ];n *n * _.partition(users, function(o) { return o.active; });n * // => objects for [['fred'], ['barney', 'pebbles']]n *n * // The `_.matches` iteratee shorthand.n * _.partition(users, { 'age': 1, 'active': false });n * // => objects for [['pebbles'], ['barney', 'fred']]n *n * // The `_.matchesProperty` iteratee shorthand.n * _.partition(users, ['active', false]);n * // => objects for [['barney', 'pebbles'], ['fred']]n *n * // The `_.property` iteratee shorthand.n * _.partition(users, 'active');n * // => objects for [['fred'], ['barney', 'pebbles']]n */nnn var partition = createAggregator(function (result, value, key) {n result[key ? 0 : 1].push(value);n }, function () {n return [[], []];n });n /**n * Reduces `collection` to a value which is the accumulated result of runningn * each element in `collection` thru `iteratee`, where each successiven * invocation is supplied the return value of the previous. If `accumulator`n * is not given, the first element of `collection` is used as the initialn * value. The iteratee is invoked with four arguments:n * (accumulator, value, index|key, collection).n *n * Many lodash methods are guarded to work as iteratees for methods liken * `_.reduce`, `_.reduceRight`, and `_.transform`.n *n * The guarded methods are:n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,n * and `sortBy`n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @param {*} [accumulator] The initial value.n * @returns {*} Returns the accumulated value.n * @see _.reduceRightn * @examplen *n * _.reduce([1, 2], function(sum, n) {n * return sum + n;n * }, 0);n * // => 3n *n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {n * (result || (result = [])).push(key);n * return result;n * }, {});n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)n */nn function reduce(collection, iteratee, accumulator) {n var func = isArray(collection) ? arrayReduce : baseReduce,n initAccum = arguments.length < 3;n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);n }n /**n * This method is like `_.reduce` except that it iterates over elements ofn * `collection` from right to left.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @param {*} [accumulator] The initial value.n * @returns {*} Returns the accumulated value.n * @see _.reducen * @examplen *n * var array = [[0, 1], [2, 3], [4, 5]];n *n * _.reduceRight(array, function(flattened, other) {n * return flattened.concat(other);n * }, []);n * // => [4, 5, 2, 3, 0, 1]n */nnn function reduceRight(collection, iteratee, accumulator) {n var func = isArray(collection) ? arrayReduceRight : baseReduce,n initAccum = arguments.length < 3;n return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);n }n /**n * The opposite of `_.filter`; this method returns the elements of `collection`n * that `predicate` does not return truthy for.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {Array} Returns the new filtered array.n * @see _.filtern * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36, 'active': false },n * { 'user': 'fred', 'age': 40, 'active': true }n * ];n *n * _.reject(users, function(o) { return !o.active; });n * // => objects for ['fred']n *n * // The `_.matches` iteratee shorthand.n * _.reject(users, { 'age': 40, 'active': true });n * // => objects for ['barney']n *n * // The `_.matchesProperty` iteratee shorthand.n * _.reject(users, ['active', false]);n * // => objects for ['fred']n *n * // The `_.property` iteratee shorthand.n * _.reject(users, 'active');n * // => objects for ['barney']n */nnn function reject(collection, predicate) {n var func = isArray(collection) ? arrayFilter : baseFilter;n return func(collection, negate(getIteratee(predicate, 3)));n }n /**n * Gets a random element from `collection`.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Collectionn * @param {Array|Object} collection The collection to sample.n * @returns {*} Returns the random element.n * @examplen *n * _.sample([1, 2, 3, 4]);n * // => 2n */nnn function sample(collection) {n var func = isArray(collection) ? arraySample : baseSample;n return func(collection);n }n /**n * Gets `n` random elements at unique keys from `collection` up to then * size of `collection`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Collectionn * @param {Array|Object} collection The collection to sample.n * @param {number} [n=1] The number of elements to sample.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the random elements.n * @examplen *n * _.sampleSize([1, 2, 3], 2);n * // => [3, 1]n *n * _.sampleSize([1, 2, 3], 4);n * // => [2, 3, 1]n */nnn function sampleSize(collection, n, guard) {n if (guard ? isIterateeCall(collection, n, guard) : n === undefined) {n n = 1;n } else {n n = toInteger(n);n }nn var func = isArray(collection) ? arraySampleSize : baseSampleSize;n return func(collection, n);n }n /**n * Creates an array of shuffled values, using a version of then * [Fisher-Yates shuffle](en.wikipedia.org/wiki/Fisher-Yates_shuffle).n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to shuffle.n * @returns {Array} Returns the new shuffled array.n * @examplen *n * _.shuffle([1, 2, 3, 4]);n * // => [4, 1, 3, 2]n */nnn function shuffle(collection) {n var func = isArray(collection) ? arrayShuffle : baseShuffle;n return func(collection);n }n /**n * Gets the size of `collection` by returning its length for array-liken * values or the number of own enumerable string keyed properties for objects.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object|string} collection The collection to inspect.n * @returns {number} Returns the collection size.n * @examplen *n * _.size([1, 2, 3]);n * // => 3n *n * _.size({ 'a': 1, 'b': 2 });n * // => 2n *n * _.size('pebbles');n * // => 7n */nnn function size(collection) {n if (collection == null) {n return 0;n }nn if (isArrayLike(collection)) {n return isString(collection) ? stringSize(collection) : collection.length;n }nn var tag = getTag(collection);nn if (tag == mapTag || tag == setTag) {n return collection.size;n }nn return baseKeys(collection).length;n }n /**n * Checks if `predicate` returns truthy for any element of `collection`.n * Iteration is stopped once `predicate` returns truthy. The predicate isn * invoked with three arguments: (value, index|key, collection).n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {boolean} Returns `true` if any element passes the predicate check,n * else `false`.n * @examplen *n * _.some([null, 0, 'yes', false], Boolean);n * // => truen *n * var users = [n * { 'user': 'barney', 'active': true },n * { 'user': 'fred', 'active': false }n * ];n *n * // The `_.matches` iteratee shorthand.n * _.some(users, { 'user': 'barney', 'active': false });n * // => falsen *n * // The `_.matchesProperty` iteratee shorthand.n * _.some(users, ['active', false]);n * // => truen *n * // The `_.property` iteratee shorthand.n * _.some(users, 'active');n * // => truen */nnn function some(collection, predicate, guard) {n var func = isArray(collection) ? arraySome : baseSome;nn if (guard && isIterateeCall(collection, predicate, guard)) {n predicate = undefined;n }nn return func(collection, getIteratee(predicate, 3));n }n /**n * Creates an array of elements, sorted in ascending order by the results ofn * running each element in a collection thru each iteratee. This methodn * performs a stable sort, that is, it preserves the original sort order ofn * equal elements. The iteratees are invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Collectionn * @param {Array|Object} collection The collection to iterate over.n * @param {…(Function|Function[])} [iteratees=]n * The iteratees to sort by.n * @returns {Array} Returns the new sorted array.n * @examplen *n * var users = [n * { 'user': 'fred', 'age': 48 },n * { 'user': 'barney', 'age': 36 },n * { 'user': 'fred', 'age': 40 },n * { 'user': 'barney', 'age': 34 }n * ];n *n * _.sortBy(users, [function(o) { return o.user; }]);n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]n *n * _.sortBy(users, ['user', 'age']);n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]n */nnn var sortBy = baseRest(function (collection, iteratees) {n if (collection == null) {n return [];n }nn var length = iteratees.length;nn if (length > 1 && isIterateeCall(collection, iteratees, iteratees)) {n iteratees = [];n } else if (length > 2 && isIterateeCall(iteratees, iteratees, iteratees)) {n iteratees = [iteratees];n }nn return baseOrderBy(collection, baseFlatten(iteratees, 1), []);n });n /————————————————————————/nn /**n * Gets the timestamp of the number of milliseconds that have elapsed sincen * the Unix epoch (1 January 1970 00:00:00 UTC).n *n * @staticn * @memberOf _n * @since 2.4.0n * @category Daten * @returns {number} Returns the timestamp.n * @examplen *n * _.defer(function(stamp) {n * console.log(_.now() - stamp);n * }, _.now());n * // => Logs the number of milliseconds it took for the deferred invocation.n */nn var now = ctxNow || function () {n return root.Date.now();n };n /————————————————————————/nn /**n * The opposite of `_.before`; this method creates a function that invokesn * `func` once it's called `n` or more times.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {number} n The number of calls before `func` is invoked.n * @param {Function} func The function to restrict.n * @returns {Function} Returns the new restricted function.n * @examplen *n * var saves = ['profile', 'settings'];n *n * var done = _.after(saves.length, function() {n * console.log('done saving!');n * });n *n * _.forEach(saves, function(type) {n * asyncSave({ 'type': type, 'complete': done });n * });n * // => Logs 'done saving!' after the two async saves have completed.n */nnn function after(n, func) {n if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn n = toInteger(n);n return function () {n if (–n < 1) {n return func.apply(this, arguments);n }n };n }n /**n * Creates a function that invokes `func`, with up to `n` arguments,n * ignoring any additional arguments.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Functionn * @param {Function} func The function to cap arguments for.n * @param {number} [n=func.length] The arity cap.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Function} Returns the new capped function.n * @examplen *n * _.map(['6', '8', '10'], _.ary(parseInt, 1));n * // => [6, 8, 10]n */nnn function ary(func, n, guard) {n n = guard ? undefined : n;n n = func && n == null ? func.length : n;n return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);n }n /**n * Creates a function that invokes `func`, with the `this` binding and argumentsn * of the created function, while it's called less than `n` times. Subsequentn * calls to the created function return the result of the last `func` invocation.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Functionn * @param {number} n The number of calls at which `func` is no longer invoked.n * @param {Function} func The function to restrict.n * @returns {Function} Returns the new restricted function.n * @examplen *n * jQuery(element).on('click', _.before(5, addContactToList));n * // => Allows adding up to 4 contacts to the list.n */nnn function before(n, func) {n var result;nn if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn n = toInteger(n);n return function () {n if (–n > 0) {n result = func.apply(this, arguments);n }nn if (n <= 1) {n func = undefined;n }nn return result;n };n }n /**n * Creates a function that invokes `func` with the `this` binding of `thisArg`n * and `partials` prepended to the arguments it receives.n *n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,n * may be used as a placeholder for partially applied arguments.n *n * Note: Unlike native `Function#bind`, this method doesn't set the "length"n * property of bound functions.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to bind.n * @param {*} thisArg The `this` binding of `func`.n * @param {…*} [partials] The arguments to be partially applied.n * @returns {Function} Returns the new bound function.n * @examplen *n * function greet(greeting, punctuation) {n * return greeting + ' ' + this.user + punctuation;n * }n *n * var object = { 'user': 'fred' };n *n * var bound = _.bind(greet, object, 'hi');n * bound('!');n * // => 'hi fred!'n *n * // Bound with placeholders.n * var bound = _.bind(greet, object, _, '!');n * bound('hi');n * // => 'hi fred!'n */nnn var bind = baseRest(function (func, thisArg, partials) {n var bitmask = WRAP_BIND_FLAG;nn if (partials.length) {n var holders = replaceHolders(partials, getHolder(bind));n bitmask |= WRAP_PARTIAL_FLAG;n }nn return createWrap(func, bitmask, thisArg, partials, holders);n });n /**n * Creates a function that invokes the method at `object` with `partials`n * prepended to the arguments it receives.n *n * This method differs from `_.bind` by allowing bound functions to referencen * methods that may be redefined or don't yet exist. Seen * [Peter Michaux's article](peter.michaux.ca/articles/lazy-function-definition-pattern)n * for more details.n *n * The `_.bindKey.placeholder` value, which defaults to `_` in monolithicn * builds, may be used as a placeholder for partially applied arguments.n *n * @staticn * @memberOf _n * @since 0.10.0n * @category Functionn * @param {Object} object The object to invoke the method on.n * @param {string} key The key of the method.n * @param {…*} [partials] The arguments to be partially applied.n * @returns {Function} Returns the new bound function.n * @examplen *n * var object = {n * 'user': 'fred',n * 'greet': function(greeting, punctuation) {n * return greeting + ' ' + this.user + punctuation;n * }n * };n *n * var bound = _.bindKey(object, 'greet', 'hi');n * bound('!');n * // => 'hi fred!'n *n * object.greet = function(greeting, punctuation) {n * return greeting + 'ya ' + this.user + punctuation;n * };n *n * bound('!');n * // => 'hiya fred!'n *n * // Bound with placeholders.n * var bound = _.bindKey(object, 'greet', _, '!');n * bound('hi');n * // => 'hiya fred!'n */nn var bindKey = baseRest(function (object, key, partials) {n var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;nn if (partials.length) {n var holders = replaceHolders(partials, getHolder(bindKey));n bitmask |= WRAP_PARTIAL_FLAG;n }nn return createWrap(key, bitmask, object, partials, holders);n });n /**n * Creates a function that accepts arguments of `func` and either invokesn * `func` returning its result, if at least `arity` number of arguments haven * been provided, or returns a function that accepts the remaining `func`n * arguments, and so on. The arity of `func` may be specified if `func.length`n * is not sufficient.n *n * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,n * may be used as a placeholder for provided arguments.n *n * Note: This method doesn't set the "length" property of curried functions.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Functionn * @param {Function} func The function to curry.n * @param {number} [arity=func.length] The arity of `func`.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Function} Returns the new curried function.n * @examplen *n * var abc = function(a, b, c) {n * return [a, b, c];n * };n *n * var curried = _.curry(abc);n *n * curried(1)(2)(3);n * // => [1, 2, 3]n *n * curried(1, 2)(3);n * // => [1, 2, 3]n *n * curried(1, 2, 3);n * // => [1, 2, 3]n *n * // Curried with placeholders.n * curried(1)(_, 3)(2);n * // => [1, 2, 3]n */nn function curry(func, arity, guard) {n arity = guard ? undefined : arity;n var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);n result.placeholder = curry.placeholder;n return result;n }n /**n * This method is like `_.curry` except that arguments are applied to `func`n * in the manner of `_.partialRight` instead of `_.partial`.n *n * The `_.curryRight.placeholder` value, which defaults to `_` in monolithicn * builds, may be used as a placeholder for provided arguments.n *n * Note: This method doesn't set the "length" property of curried functions.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Functionn * @param {Function} func The function to curry.n * @param {number} [arity=func.length] The arity of `func`.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Function} Returns the new curried function.n * @examplen *n * var abc = function(a, b, c) {n * return [a, b, c];n * };n *n * var curried = _.curryRight(abc);n *n * curried(3)(2)(1);n * // => [1, 2, 3]n *n * curried(2, 3)(1);n * // => [1, 2, 3]n *n * curried(1, 2, 3);n * // => [1, 2, 3]n *n * // Curried with placeholders.n * curried(3)(1, _)(2);n * // => [1, 2, 3]n */nnn function curryRight(func, arity, guard) {n arity = guard ? undefined : arity;n var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);n result.placeholder = curryRight.placeholder;n return result;n }n /**n * Creates a debounced function that delays invoking `func` until after `wait`n * milliseconds have elapsed since the last time the debounced function wasn * invoked. The debounced function comes with a `cancel` method to canceln * delayed `func` invocations and a `flush` method to immediately invoke them.n * Provide `options` to indicate whether `func` should be invoked on then * leading and/or trailing edge of the `wait` timeout. The `func` is invokedn * with the last arguments provided to the debounced function. Subsequentn * calls to the debounced function return the result of the last `func`n * invocation.n *n * Note: If `leading` and `trailing` options are `true`, `func` isn * invoked on the trailing edge of the timeout only if the debounced functionn * is invoked more than once during the `wait` timeout.n *n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferredn * until to the next tick, similar to `setTimeout` with a timeout of `0`.n *n * See [David Corbacho's article](css-tricks.com/debouncing-throttling-explained-examples/)n * for details over the differences between `_.debounce` and `_.throttle`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to debounce.n * @param {number} [wait=0] The number of milliseconds to delay.n * @param {Object} [options={}] The options object.n * @param {boolean} [options.leading=false]n * Specify invoking on the leading edge of the timeout.n * @param {number} [options.maxWait]n * The maximum time `func` is allowed to be delayed before it's invoked.n * @param {boolean} [options.trailing=true]n * Specify invoking on the trailing edge of the timeout.n * @returns {Function} Returns the new debounced function.n * @examplen *n * // Avoid costly calculations while the window size is in flux.n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));n *n * // Invoke `sendMail` when clicked, debouncing subsequent calls.n * jQuery(element).on('click', _.debounce(sendMail, 300, {n * 'leading': true,n * 'trailing': falsen * }));n *n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });n * var source = new EventSource('/stream');n * jQuery(source).on('message', debounced);n *n * // Cancel the trailing debounced invocation.n * jQuery(window).on('popstate', debounced.cancel);n */nnn function debounce(func, wait, options) {n var lastArgs,n lastThis,n maxWait,n result,n timerId,n lastCallTime,n lastInvokeTime = 0,n leading = false,n maxing = false,n trailing = true;nn if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn wait = toNumber(wait) || 0;nn if (isObject(options)) {n leading = !!options.leading;n maxing = 'maxWait' in options;n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;n trailing = 'trailing' in options ? !!options.trailing : trailing;n }nn function invokeFunc(time) {n var args = lastArgs,n thisArg = lastThis;n lastArgs = lastThis = undefined;n lastInvokeTime = time;n result = func.apply(thisArg, args);n return result;n }nn function leadingEdge(time) {n // Reset any `maxWait` timer.n lastInvokeTime = time; // Start the timer for the trailing edge.nn timerId = setTimeout(timerExpired, wait); // Invoke the leading edge.nn return leading ? invokeFunc(time) : result;n }nn function remainingWait(time) {n var timeSinceLastCall = time - lastCallTime,n timeSinceLastInvoke = time - lastInvokeTime,n timeWaiting = wait - timeSinceLastCall;n return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;n }nn function shouldInvoke(time) {n var timeSinceLastCall = time - lastCallTime,n timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at then // trailing edge, the system time has gone backwards and we're treatingn // it as the trailing edge, or we've hit the `maxWait` limit.nn return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;n }nn function timerExpired() {n var time = now();nn if (shouldInvoke(time)) {n return trailingEdge(time);n } // Restart the timer.nnn timerId = setTimeout(timerExpired, remainingWait(time));n }nn function trailingEdge(time) {n timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has beenn // debounced at least once.nn if (trailing && lastArgs) {n return invokeFunc(time);n }nn lastArgs = lastThis = undefined;n return result;n }nn function cancel() {n if (timerId !== undefined) {n clearTimeout(timerId);n }nn lastInvokeTime = 0;n lastArgs = lastCallTime = lastThis = timerId = undefined;n }nn function flush() {n return timerId === undefined ? result : trailingEdge(now());n }nn function debounced() {n var time = now(),n isInvoking = shouldInvoke(time);n lastArgs = arguments;n lastThis = this;n lastCallTime = time;nn if (isInvoking) {n if (timerId === undefined) {n return leadingEdge(lastCallTime);n }nn if (maxing) {n // Handle invocations in a tight loop.n clearTimeout(timerId);n timerId = setTimeout(timerExpired, wait);n return invokeFunc(lastCallTime);n }n }nn if (timerId === undefined) {n timerId = setTimeout(timerExpired, wait);n }nn return result;n }nn debounced.cancel = cancel;n debounced.flush = flush;n return debounced;n }n /**n * Defers invoking the `func` until the current call stack has cleared. Anyn * additional arguments are provided to `func` when it's invoked.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to defer.n * @param {…*} [args] The arguments to invoke `func` with.n * @returns {number} Returns the timer id.n * @examplen *n * _.defer(function(text) {n * console.log(text);n * }, 'deferred');n * // => Logs 'deferred' after one millisecond.n */nnn var defer = baseRest(function (func, args) {n return baseDelay(func, 1, args);n });n /**n * Invokes `func` after `wait` milliseconds. Any additional arguments aren * provided to `func` when it's invoked.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to delay.n * @param {number} wait The number of milliseconds to delay invocation.n * @param {…*} [args] The arguments to invoke `func` with.n * @returns {number} Returns the timer id.n * @examplen *n * _.delay(function(text) {n * console.log(text);n * }, 1000, 'later');n * // => Logs 'later' after one second.n */nn var delay = baseRest(function (func, wait, args) {n return baseDelay(func, toNumber(wait) || 0, args);n });n /**n * Creates a function that invokes `func` with arguments reversed.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Functionn * @param {Function} func The function to flip arguments for.n * @returns {Function} Returns the new flipped function.n * @examplen *n * var flipped = _.flip(function() {n * return _.toArray(arguments);n * });n *n * flipped('a', 'b', 'c', 'd');n * // => ['d', 'c', 'b', 'a']n */nn function flip(func) {n return createWrap(func, WRAP_FLIP_FLAG);n }n /**n * Creates a function that memoizes the result of `func`. If `resolver` isn * provided, it determines the cache key for storing the result based on then * arguments provided to the memoized function. By default, the first argumentn * provided to the memoized function is used as the map cache key. The `func`n * is invoked with the `this` binding of the memoized function.n *n * Note: The cache is exposed as the `cache` property on the memoizedn * function. Its creation may be customized by replacing the `_.memoize.Cache`n * constructor with one whose instances implement then * [`Map`](ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)n * method interface of `clear`, `delete`, `get`, `has`, and `set`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to have its output memoized.n * @param {Function} [resolver] The function to resolve the cache key.n * @returns {Function} Returns the new memoized function.n * @examplen *n * var object = { 'a': 1, 'b': 2 };n * var other = { 'c': 3, 'd': 4 };n *n * var values = .memoize(.values);n * values(object);n * // => [1, 2]n *n * values(other);n * // => [3, 4]n *n * object.a = 2;n * values(object);n * // => [1, 2]n *n * // Modify the result cache.n * values.cache.set(object, ['a', 'b']);n * values(object);n * // => ['a', 'b']n *n * // Replace `_.memoize.Cache`.n * _.memoize.Cache = WeakMap;n */nnn function memoize(func, resolver) {n if (typeof func != 'function' || resolver != null && typeof resolver != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn var memoized = function memoized() {n var args = arguments,n key = resolver ? resolver.apply(this, args) : args,n cache = memoized.cache;nn if (cache.has(key)) {n return cache.get(key);n }nn var result = func.apply(this, args);n memoized.cache = cache.set(key, result) || cache;n return result;n };nn memoized.cache = new (memoize.Cache || MapCache)();n return memoized;n } // Expose `MapCache`.nnn memoize.Cache = MapCache;n /**n * Creates a function that negates the result of the predicate `func`. Then * `func` predicate is invoked with the `this` binding and arguments of then * created function.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Functionn * @param {Function} predicate The predicate to negate.n * @returns {Function} Returns the new negated function.n * @examplen *n * function isEven(n) {n * return n % 2 == 0;n * }n *n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));n * // => [1, 3, 5]n */nn function negate(predicate) {n if (typeof predicate != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn return function () {n var args = arguments;nn switch (args.length) {n case 0:n return !predicate.call(this);nn case 1:n return !predicate.call(this, args);nn case 2:n return !predicate.call(this, args, args);nn case 3:n return !predicate.call(this, args, args, args);n }nn return !predicate.apply(this, args);n };n }n /**n * Creates a function that is restricted to invoking `func` once. Repeat callsn * to the function return the value of the first invocation. The `func` isn * invoked with the `this` binding and arguments of the created function.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to restrict.n * @returns {Function} Returns the new restricted function.n * @examplen *n * var initialize = _.once(createApplication);n * initialize();n * initialize();n * // => `createApplication` is invoked oncen */nnn function once(func) {n return before(2, func);n }n /**n * Creates a function that invokes `func` with its arguments transformed.n *n * @staticn * @since 4.0.0n * @memberOf _n * @category Functionn * @param {Function} func The function to wrap.n * @param {…(Function|Function[])} [transforms=]n * The argument transforms.n * @returns {Function} Returns the new function.n * @examplen *n * function doubled(n) {n * return n * 2;n * }n *n * function square(n) {n * return n * n;n * }n *n * var func = _.overArgs(function(x, y) {n * return [x, y];n * }, [square, doubled]);n *n * func(9, 3);n * // => [81, 6]n *n * func(10, 5);n * // => [100, 10]n */nnn var overArgs = castRest(function (func, transforms) {n transforms = transforms.length == 1 && isArray(transforms) ? arrayMap(transforms, baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));n var funcsLength = transforms.length;n return baseRest(function (args) {n var index = -1,n length = nativeMin(args.length, funcsLength);nn while (++index < length) {n args = transforms.call(this, args);n }nn return apply(func, this, args);n });n });n /**n * Creates a function that invokes `func` with `partials` prepended to then * arguments it receives. This method is like `_.bind` except it does notn * alter the `this` binding.n *n * The `_.partial.placeholder` value, which defaults to `_` in monolithicn * builds, may be used as a placeholder for partially applied arguments.n *n * Note: This method doesn't set the "length" property of partiallyn * applied functions.n *n * @staticn * @memberOf _n * @since 0.2.0n * @category Functionn * @param {Function} func The function to partially apply arguments to.n * @param {…*} [partials] The arguments to be partially applied.n * @returns {Function} Returns the new partially applied function.n * @examplen *n * function greet(greeting, name) {n * return greeting + ' ' + name;n * }n *n * var sayHelloTo = _.partial(greet, 'hello');n * sayHelloTo('fred');n * // => 'hello fred'n *n * // Partially applied with placeholders.n * var greetFred = _.partial(greet, _, 'fred');n * greetFred('hi');n * // => 'hi fred'n */nn var partial = baseRest(function (func, partials) {n var holders = replaceHolders(partials, getHolder(partial));n return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);n });n /**n * This method is like `_.partial` except that partially applied argumentsn * are appended to the arguments it receives.n *n * The `_.partialRight.placeholder` value, which defaults to `_` in monolithicn * builds, may be used as a placeholder for partially applied arguments.n *n * Note: This method doesn't set the "length" property of partiallyn * applied functions.n *n * @staticn * @memberOf _n * @since 1.0.0n * @category Functionn * @param {Function} func The function to partially apply arguments to.n * @param {…*} [partials] The arguments to be partially applied.n * @returns {Function} Returns the new partially applied function.n * @examplen *n * function greet(greeting, name) {n * return greeting + ' ' + name;n * }n *n * var greetFred = _.partialRight(greet, 'fred');n * greetFred('hi');n * // => 'hi fred'n *n * // Partially applied with placeholders.n * var sayHelloTo = _.partialRight(greet, 'hello', _);n * sayHelloTo('fred');n * // => 'hello fred'n */nn var partialRight = baseRest(function (func, partials) {n var holders = replaceHolders(partials, getHolder(partialRight));n return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);n });n /**n * Creates a function that invokes `func` with arguments arranged accordingn * to the specified `indexes` where the argument value at the first index isn * provided as the first argument, the argument value at the second index isn * provided as the second argument, and so on.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Functionn * @param {Function} func The function to rearrange arguments for.n * @param {…(number|number[])} indexes The arranged argument indexes.n * @returns {Function} Returns the new function.n * @examplen *n * var rearged = _.rearg(function(a, b, c) {n * return [a, b, c];n * }, [2, 0, 1]);n *n * rearged('b', 'c', 'a')n * // => ['a', 'b', 'c']n */nn var rearg = flatRest(function (func, indexes) {n return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);n });n /**n * Creates a function that invokes `func` with the `this` binding of then * created function and arguments from `start` and beyond provided asn * an array.n *n * Note: This method is based on then * [rest parameter](mdn.io/rest_parameters).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Functionn * @param {Function} func The function to apply a rest parameter to.n * @param {number} [start=func.length-1] The start position of the rest parameter.n * @returns {Function} Returns the new function.n * @examplen *n * var say = _.rest(function(what, names) {n * return what + ' ' + _.initial(names).join(', ') +n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);n * });n *n * say('hello', 'fred', 'barney', 'pebbles');n * // => 'hello fred, barney, & pebbles'n */nn function rest(func, start) {n if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn start = start === undefined ? start : toInteger(start);n return baseRest(func, start);n }n /**n * Creates a function that invokes `func` with the `this` binding of then * create function and an array of arguments much liken * [`Function#apply`](www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).n *n * Note: This method is based on then * [spread operator](mdn.io/spread_operator).n *n * @staticn * @memberOf _n * @since 3.2.0n * @category Functionn * @param {Function} func The function to spread arguments over.n * @param {number} [start=0] The start position of the spread.n * @returns {Function} Returns the new function.n * @examplen *n * var say = _.spread(function(who, what) {n * return who + ' says ' + what;n * });n *n * say(['fred', 'hello']);n * // => 'fred says hello'n *n * var numbers = Promise.all([n * Promise.resolve(40),n * Promise.resolve(36)n * ]);n *n * numbers.then(_.spread(function(x, y) {n * return x + y;n * }));n * // => a Promise of 76n */nnn function spread(func, start) {n if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn start = start == null ? 0 : nativeMax(toInteger(start), 0);n return baseRest(function (args) {n var array = args,n otherArgs = castSlice(args, 0, start);nn if (array) {n arrayPush(otherArgs, array);n }nn return apply(func, this, otherArgs);n });n }n /**n * Creates a throttled function that only invokes `func` at most once pern * every `wait` milliseconds. The throttled function comes with a `cancel`n * method to cancel delayed `func` invocations and a `flush` method ton * immediately invoke them. Provide `options` to indicate whether `func`n * should be invoked on the leading and/or trailing edge of the `wait`n * timeout. The `func` is invoked with the last arguments provided to then * throttled function. Subsequent calls to the throttled function return then * result of the last `func` invocation.n *n * Note: If `leading` and `trailing` options are `true`, `func` isn * invoked on the trailing edge of the timeout only if the throttled functionn * is invoked more than once during the `wait` timeout.n *n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferredn * until to the next tick, similar to `setTimeout` with a timeout of `0`.n *n * See [David Corbacho's article](css-tricks.com/debouncing-throttling-explained-examples/)n * for details over the differences between `_.throttle` and `_.debounce`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {Function} func The function to throttle.n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.n * @param {Object} [options={}] The options object.n * @param {boolean} [options.leading=true]n * Specify invoking on the leading edge of the timeout.n * @param {boolean} [options.trailing=true]n * Specify invoking on the trailing edge of the timeout.n * @returns {Function} Returns the new throttled function.n * @examplen *n * // Avoid excessively updating the position while scrolling.n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));n *n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });n * jQuery(element).on('click', throttled);n *n * // Cancel the trailing throttled invocation.n * jQuery(window).on('popstate', throttled.cancel);n */nnn function throttle(func, wait, options) {n var leading = true,n trailing = true;nn if (typeof func != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn if (isObject(options)) {n leading = 'leading' in options ? !!options.leading : leading;n trailing = 'trailing' in options ? !!options.trailing : trailing;n }nn return debounce(func, wait, {n 'leading': leading,n 'maxWait': wait,n 'trailing': trailingn });n }n /**n * Creates a function that accepts up to one argument, ignoring anyn * additional arguments.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Functionn * @param {Function} func The function to cap arguments for.n * @returns {Function} Returns the new capped function.n * @examplen *n * _.map(['6', '8', '10'], _.unary(parseInt));n * // => [6, 8, 10]n */nnn function unary(func) {n return ary(func, 1);n }n /**n * Creates a function that provides `value` to `wrapper` as its firstn * argument. Any additional arguments provided to the function are appendedn * to those provided to the `wrapper`. The wrapper is invoked with the `this`n * binding of the created function.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Functionn * @param {*} value The value to wrap.n * @param {Function} [wrapper=identity] The wrapper function.n * @returns {Function} Returns the new function.n * @examplen *n * var p = .wrap(.escape, function(func, text) {n * return '<p>' + func(text) + '</p>';n * });n *n * p('fred, barney, & pebbles');n * // => '<p>fred, barney, & pebbles</p>'n */nnn function wrap(value, wrapper) {n return partial(castFunction(wrapper), value);n }n /————————————————————————/nn /**n * Casts `value` as an array if it's not one.n *n * @staticn * @memberOf _n * @since 4.4.0n * @category Langn * @param {*} value The value to inspect.n * @returns {Array} Returns the cast array.n * @examplen *n * _.castArray(1);n * // => [1]n *n * _.castArray({ 'a': 1 });n * // => [{ 'a': 1 }]n *n * _.castArray('abc');n * // => ['abc']n *n * _.castArray(null);n * // => [null]n *n * _.castArray(undefined);n * // => [undefined]n *n * _.castArray();n * // => []n *n * var array = [1, 2, 3];n * console.log(_.castArray(array) === array);n * // => truen */nnn function castArray() {n if (!arguments.length) {n return [];n }nn var value = arguments;n return isArray(value) ? value : [value];n }n /**n * Creates a shallow clone of `value`.n *n * Note: This method is loosely based on then * [structured clone algorithm](mdn.io/Structured_clone_algorithm)n * and supports cloning arrays, array buffers, booleans, date objects, maps,n * numbers, `Object` objects, regexes, sets, strings, symbols, and typedn * arrays. The own enumerable properties of `arguments` objects are clonedn * as plain objects. An empty object is returned for uncloneable values suchn * as error objects, functions, DOM nodes, and WeakMaps.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to clone.n * @returns {*} Returns the cloned value.n * @see _.cloneDeepn * @examplen *n * var objects = [{ 'a': 1 }, { 'b': 2 }];n *n * var shallow = _.clone(objects);n * console.log(shallow === objects);n * // => truen */nnn function clone(value) {n return baseClone(value, CLONE_SYMBOLS_FLAG);n }n /**n * This method is like `_.clone` except that it accepts `customizer` whichn * is invoked to produce the cloned value. If `customizer` returns `undefined`,n * cloning is handled by the method instead. The `customizer` is invoked withn * up to four arguments; (value [, index|key, object, stack]).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to clone.n * @param {Function} [customizer] The function to customize cloning.n * @returns {*} Returns the cloned value.n * @see _.cloneDeepWithn * @examplen *n * function customizer(value) {n * if (_.isElement(value)) {n * return value.cloneNode(false);n * }n * }n *n * var el = _.cloneWith(document.body, customizer);n *n * console.log(el === document.body);n * // => falsen * console.log(el.nodeName);n * // => 'BODY'n * console.log(el.childNodes.length);n * // => 0n */nnn function cloneWith(value, customizer) {n customizer = typeof customizer == 'function' ? customizer : undefined;n return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);n }n /**n * This method is like `_.clone` except that it recursively clones `value`.n *n * @staticn * @memberOf _n * @since 1.0.0n * @category Langn * @param {*} value The value to recursively clone.n * @returns {*} Returns the deep cloned value.n * @see _.clonen * @examplen *n * var objects = [{ 'a': 1 }, { 'b': 2 }];n *n * var deep = _.cloneDeep(objects);n * console.log(deep === objects);n * // => falsen */nnn function cloneDeep(value) {n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);n }n /**n * This method is like `_.cloneWith` except that it recursively clones `value`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to recursively clone.n * @param {Function} [customizer] The function to customize cloning.n * @returns {*} Returns the deep cloned value.n * @see _.cloneWithn * @examplen *n * function customizer(value) {n * if (_.isElement(value)) {n * return value.cloneNode(true);n * }n * }n *n * var el = _.cloneDeepWith(document.body, customizer);n *n * console.log(el === document.body);n * // => falsen * console.log(el.nodeName);n * // => 'BODY'n * console.log(el.childNodes.length);n * // => 20n */nnn function cloneDeepWith(value, customizer) {n customizer = typeof customizer == 'function' ? customizer : undefined;n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);n }n /**n * Checks if `object` conforms to `source` by invoking the predicaten * properties of `source` with the corresponding property values of `object`.n *n * Note: This method is equivalent to `_.conforms` when `source` isn * partially applied.n *n * @staticn * @memberOf _n * @since 4.14.0n * @category Langn * @param {Object} object The object to inspect.n * @param {Object} source The object of property predicates to conform to.n * @returns {boolean} Returns `true` if `object` conforms, else `false`.n * @examplen *n * var object = { 'a': 1, 'b': 2 };n *n * _.conformsTo(object, { 'b': function(n) { return n > 1; } });n * // => truen *n * _.conformsTo(object, { 'b': function(n) { return n > 2; } });n * // => falsen */nnn function conformsTo(object, source) {n return source == null || baseConformsTo(object, source, keys(source));n }n /**n * Performs an * [`SameValueZero`](ecma-international.org/ecma-262/7.0/#sec-samevaluezero)n * comparison between two values to determine if they are equivalent.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.n * @examplen *n * var object = { 'a': 1 };n * var other = { 'a': 1 };n *n * _.eq(object, object);n * // => truen *n * _.eq(object, other);n * // => falsen *n * _.eq('a', 'a');n * // => truen *n * _.eq('a', Object('a'));n * // => falsen *n * _.eq(NaN, NaN);n * // => truen */nnn function eq(value, other) {n return value === other || value !== value && other !== other;n }n /**n * Checks if `value` is greater than `other`.n *n * @staticn * @memberOf _n * @since 3.9.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if `value` is greater than `other`,n * else `false`.n * @see _.ltn * @examplen *n * _.gt(3, 1);n * // => truen *n * _.gt(3, 3);n * // => falsen *n * _.gt(1, 3);n * // => falsen */nnn var gt = createRelationalOperation(baseGt);n /**n * Checks if `value` is greater than or equal to `other`.n *n * @staticn * @memberOf _n * @since 3.9.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if `value` is greater than or equal ton * `other`, else `false`.n * @see _.lten * @examplen *n * _.gte(3, 1);n * // => truen *n * _.gte(3, 3);n * // => truen *n * _.gte(1, 3);n * // => falsen */nn var gte = createRelationalOperation(function (value, other) {n return value >= other;n });n /**n * Checks if `value` is likely an `arguments` object.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an `arguments` object,n * else `false`.n * @examplen *n * _.isArguments(function() { return arguments; }());n * // => truen *n * _.isArguments([1, 2, 3]);n * // => falsen */nn var isArguments = baseIsArguments(function () {n return arguments;n }()) ? baseIsArguments : function (value) {n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');n };n /**n * Checks if `value` is classified as an `Array` object.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an array, else `false`.n * @examplen *n * _.isArray([1, 2, 3]);n * // => truen *n * _.isArray(document.body.children);n * // => falsen *n * _.isArray('abc');n * // => falsen *n * .isArray(.noop);n * // => falsen */nn var isArray = Array.isArray;n /**n * Checks if `value` is classified as an `ArrayBuffer` object.n *n * @staticn * @memberOf _n * @since 4.3.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.n * @examplen *n * _.isArrayBuffer(new ArrayBuffer(2));n * // => truen *n * _.isArrayBuffer(new Array(2));n * // => falsen */nn var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;n /**n * Checks if `value` is array-like. A value is considered array-like if it'sn * not a function and has a `value.length` that's an integer greater than orn * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.n * @examplen *n * _.isArrayLike([1, 2, 3]);n * // => truen *n * _.isArrayLike(document.body.children);n * // => truen *n * _.isArrayLike('abc');n * // => truen *n * .isArrayLike(.noop);n * // => falsen */nn function isArrayLike(value) {n return value != null && isLength(value.length) && !isFunction(value);n }n /**n * This method is like `_.isArrayLike` except that it also checks if `value`n * is an object.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an array-like object,n * else `false`.n * @examplen *n * _.isArrayLikeObject([1, 2, 3]);n * // => truen *n * _.isArrayLikeObject(document.body.children);n * // => truen *n * _.isArrayLikeObject('abc');n * // => falsen *n * .isArrayLikeObject(.noop);n * // => falsen */nnn function isArrayLikeObject(value) {n return isObjectLike(value) && isArrayLike(value);n }n /**n * Checks if `value` is classified as a boolean primitive or object.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.n * @examplen *n * _.isBoolean(false);n * // => truen *n * _.isBoolean(null);n * // => falsen */nnn function isBoolean(value) {n return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;n }n /**n * Checks if `value` is a buffer.n *n * @staticn * @memberOf _n * @since 4.3.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.n * @examplen *n * _.isBuffer(new Buffer(2));n * // => truen *n * _.isBuffer(new Uint8Array(2));n * // => falsen */nnn var isBuffer = nativeIsBuffer || stubFalse;n /**n * Checks if `value` is classified as a `Date` object.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.n * @examplen *n * _.isDate(new Date);n * // => truen *n * _.isDate('Mon April 23 2012');n * // => falsen */nn var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;n /**n * Checks if `value` is likely a DOM element.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.n * @examplen *n * _.isElement(document.body);n * // => truen *n * _.isElement('<body>');n * // => falsen */nn function isElement(value) {n return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);n }n /**n * Checks if `value` is an empty object, collection, map, or set.n *n * Objects are considered empty if they have no own enumerable string keyedn * properties.n *n * Array-like values such as `arguments` objects, arrays, buffers, strings, orn * jQuery-like collections are considered empty if they have a `length` of `0`.n * Similarly, maps and sets are considered empty if they have a `size` of `0`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is empty, else `false`.n * @examplen *n * _.isEmpty(null);n * // => truen *n * _.isEmpty(true);n * // => truen *n * _.isEmpty(1);n * // => truen *n * _.isEmpty([1, 2, 3]);n * // => falsen *n * _.isEmpty({ 'a': 1 });n * // => falsen */nnn function isEmpty(value) {n if (value == null) {n return true;n }nn if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) {n return !value.length;n }nn var tag = getTag(value);nn if (tag == mapTag || tag == setTag) {n return !value.size;n }nn if (isPrototype(value)) {n return !baseKeys(value).length;n }nn for (var key in value) {n if (hasOwnProperty.call(value, key)) {n return false;n }n }nn return true;n }n /**n * Performs a deep comparison between two values to determine if they aren * equivalent.n *n * Note: This method supports comparing arrays, array buffers, booleans,n * date objects, error objects, maps, numbers, `Object` objects, regexes,n * sets, strings, symbols, and typed arrays. `Object` objects are comparedn * by their own, not inherited, enumerable properties. Functions and DOMn * nodes are compared by strict equality, i.e. `===`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.n * @examplen *n * var object = { 'a': 1 };n * var other = { 'a': 1 };n *n * _.isEqual(object, other);n * // => truen *n * object === other;n * // => falsen */nnn function isEqual(value, other) {n return baseIsEqual(value, other);n }n /**n * This method is like `_.isEqual` except that it accepts `customizer` whichn * is invoked to compare values. If `customizer` returns `undefined`, comparisonsn * are handled by the method instead. The `customizer` is invoked with up ton * six arguments: (objValue, othValue [, index|key, object, other, stack]).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @param {Function} [customizer] The function to customize comparisons.n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.n * @examplen *n * function isGreeting(value) {n * return /^h(?:i|ello)$/.test(value);n * }n *n * function customizer(objValue, othValue) {n * if (isGreeting(objValue) && isGreeting(othValue)) {n * return true;n * }n * }n *n * var array = ['hello', 'goodbye'];n * var other = ['hi', 'goodbye'];n *n * _.isEqualWith(array, other, customizer);n * // => truen */nnn function isEqualWith(value, other, customizer) {n customizer = typeof customizer == 'function' ? customizer : undefined;n var result = customizer ? customizer(value, other) : undefined;n return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;n }n /**n * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,n * `SyntaxError`, `TypeError`, or `URIError` object.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an error object, else `false`.n * @examplen *n * _.isError(new Error);n * // => truen *n * _.isError(Error);n * // => falsen */nnn function isError(value) {n if (!isObjectLike(value)) {n return false;n }nn var tag = baseGetTag(value);n return tag == errorTag || tag == domExcTag || typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value);n }n /**n * Checks if `value` is a finite primitive number.n *n * Note: This method is based onn * [`Number.isFinite`](mdn.io/Number/isFinite).n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.n * @examplen *n * _.isFinite(3);n * // => truen *n * _.isFinite(Number
.MIN_VALUE);n * // => truen *n * _.isFinite(Infinity);n * // => falsen *n * _.isFinite('3');n * // => falsen */nnn function isFinite(value) {n return typeof value == 'number' && nativeIsFinite(value);n }n /**n * Checks if `value` is classified as a `Function` object.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a function, else `false`.n * @examplen *n * .isFunction();n * // => truen *n * _.isFunction(/abc/);n * // => falsen */nnn function isFunction(value) {n if (!isObject(value)) {n return false;n } // The use of `Object#toString` avoids issues with the `typeof` operatorn // in Safari 9 which returns 'object' for typed arrays and other constructors.nnn var tag = baseGetTag(value);n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;n }n /**n * Checks if `value` is an integer.n *n * Note: This method is based onn * [`Number.isInteger`](mdn.io/Number/isInteger).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.n * @examplen *n * _.isInteger(3);n * // => truen *n * _.isInteger(Number
.MIN_VALUE);n * // => falsen *n * _.isInteger(Infinity);n * // => falsen *n * _.isInteger('3');n * // => falsen */nnn function isInteger(value) {n return typeof value == 'number' && value == toInteger(value);n }n /**n * Checks if `value` is a valid array-like length.n *n * Note: This method is loosely based onn * [`ToLength`](ecma-international.org/ecma-262/7.0/#sec-tolength).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.n * @examplen *n * _.isLength(3);n * // => truen *n * _.isLength(Number
.MIN_VALUE);n * // => falsen *n * _.isLength(Infinity);n * // => falsen *n * _.isLength('3');n * // => falsen */nnn function isLength(value) {n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;n }n /**n * Checks if `value` is then * [language type](www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is an object, else `false`.n * @examplen *n * _.isObject({});n * // => truen *n * _.isObject([1, 2, 3]);n * // => truen *n * .isObject(.noop);n * // => truen *n * _.isObject(null);n * // => falsen */nnn function isObject(value) {n var type = _typeof(value);nn return value != null && (type == 'object' || type == 'function');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 * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.n * @examplen *n * _.isObjectLike({});n * // => truen *n * _.isObjectLike([1, 2, 3]);n * // => truen *n * .isObjectLike(.noop);n * // => falsen *n * _.isObjectLike(null);n * // => falsen */nnn function isObjectLike(value) {n return value != null && _typeof(value) == 'object';n }n /**n * Checks if `value` is classified as a `Map` object.n *n * @staticn * @memberOf _n * @since 4.3.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a map, else `false`.n * @examplen *n * _.isMap(new Map);n * // => truen *n * _.isMap(new WeakMap);n * // => falsen */nnn var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;n /**n * Performs a partial deep comparison between `object` and `source` ton * determine if `object` contains equivalent property values.n *n * Note: This method is equivalent to `_.matches` when `source` isn * partially applied.n *n * Partial comparisons will match empty array and empty object `source`n * values against any array or object value, respectively. See `_.isEqual`n * for a list of supported value comparisons.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Langn * @param {Object} object The object to inspect.n * @param {Object} source The object of property values to match.n * @returns {boolean} Returns `true` if `object` is a match, else `false`.n * @examplen *n * var object = { 'a': 1, 'b': 2 };n *n * _.isMatch(object, { 'b': 2 });n * // => truen *n * _.isMatch(object, { 'b': 1 });n * // => falsen */nn function isMatch(object, source) {n return object === source || baseIsMatch(object, source, getMatchData(source));n }n /**n * This method is like `_.isMatch` except that it accepts `customizer` whichn * is invoked to compare values. If `customizer` returns `undefined`, comparisonsn * are handled by the method instead. The `customizer` is invoked with fiven * arguments: (objValue, srcValue, index|key, object, source).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {Object} object The object to inspect.n * @param {Object} source The object of property values to match.n * @param {Function} [customizer] The function to customize comparisons.n * @returns {boolean} Returns `true` if `object` is a match, else `false`.n * @examplen *n * function isGreeting(value) {n * return /^h(?:i|ello)$/.test(value);n * }n *n * function customizer(objValue, srcValue) {n * if (isGreeting(objValue) && isGreeting(srcValue)) {n * return true;n * }n * }n *n * var object = { 'greeting': 'hello' };n * var source = { 'greeting': 'hi' };n *n * _.isMatchWith(object, source, customizer);n * // => truen */nnn function isMatchWith(object, source, customizer) {n customizer = typeof customizer == 'function' ? customizer : undefined;n return baseIsMatch(object, source, getMatchData(source), customizer);n }n /**n * Checks if `value` is `NaN`.n *n * Note: This method is based onn * [`Number.isNaN`](mdn.io/Number/isNaN) and is not the same asn * global [`isNaN`](mdn.io/isNaN) which returns `true` forn * `undefined` and other non-number values.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.n * @examplen *n * _.isNaN(NaN);n * // => truen *n * _.isNaN(new Number(NaN));n * // => truen *n * isNaN(undefined);n * // => truen *n * _.isNaN(undefined);n * // => falsen */nnn function isNaN(value) {n // An `NaN` primitive is the only value that is not equal to itself.n // Perform the `toStringTag` check first to avoid errors with somen // ActiveX objects in IE.n return isNumber(value) && value != +value;n }n /**n * Checks if `value` is a pristine native function.n *n * Note: This method can't reliably detect native functions in the presencen * of the core-js package because core-js circumvents this kind of detection.n * Despite multiple requests, the core-js maintainer has made it clear: anyn * attempt to fix the detection will be obstructed. As a result, we're leftn * with little choice but to throw an error. Unfortunately, this also affectsn * packages, like [babel-polyfill](www.npmjs.com/package/babel-polyfill),n * which rely on core-js.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a native function,n * else `false`.n * @examplen *n * _.isNative(Array.prototype.push);n * // => truen *n * .isNative();n * // => falsen */nnn function isNative(value) {n if (isMaskable(value)) {n throw new Error(CORE_ERROR_TEXT);n }nn return baseIsNative(value);n }n /**n * Checks if `value` is `null`.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.n * @examplen *n * _.isNull(null);n * // => truen *n * _.isNull(void 0);n * // => falsen */nnn function isNull(value) {n return value === null;n }n /**n * Checks if `value` is `null` or `undefined`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.n * @examplen *n * _.isNil(null);n * // => truen *n * _.isNil(void 0);n * // => truen *n * _.isNil(NaN);n * // => falsen */nnn function isNil(value) {n return value == null;n }n /**n * Checks if `value` is classified as a `Number` primitive or object.n *n * Note: To exclude `Infinity`, `-Infinity`, and `NaN`, which aren * classified as numbers, use the `_.isFinite` method.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a number, else `false`.n * @examplen *n * _.isNumber(3);n * // => truen *n * _.isNumber(Number
.MIN_VALUE);n * // => truen *n * _.isNumber(Infinity);n * // => truen *n * _.isNumber('3');n * // => falsen */nnn function isNumber(value) {n return typeof value == 'number' || isObjectLike(value) && baseGetTag(value) == numberTag;n }n /**n * Checks if `value` is a plain object, that is, an object created by then * `Object` constructor or one with a `[[Prototype]]` of `null`.n *n * @staticn * @memberOf _n * @since 0.8.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.n * @examplen *n * function Foo() {n * this.a = 1;n * }n *n * _.isPlainObject(new Foo);n * // => falsen *n * _.isPlainObject([1, 2, 3]);n * // => falsen *n * _.isPlainObject({ 'x': 0, 'y': 0 });n * // => truen *n * _.isPlainObject(Object.create(null));n * // => truen */nnn function isPlainObject(value) {n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {n return false;n }nn var proto = getPrototype(value);nn if (proto === null) {n return true;n }nn var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;n }n /**n * Checks if `value` is classified as a `RegExp` object.n *n * @staticn * @memberOf _n * @since 0.1.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.n * @examplen *n * _.isRegExp(/abc/);n * // => truen *n * _.isRegExp('/abc/');n * // => falsen */nnn var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;n /**n * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754n * double precision number which isn't the result of a rounded unsafe integer.n *n * Note: This method is based onn * [`Number.isSafeInteger`](mdn.io/Number/isSafeInteger).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.n * @examplen *n * _.isSafeInteger(3);n * // => truen *n * _.isSafeInteger(Number
.MIN_VALUE);n * // => falsen *n * _.isSafeInteger(Infinity);n * // => falsen *n * _.isSafeInteger('3');n * // => falsen */nn function isSafeInteger(value) {n return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;n }n /**n * Checks if `value` is classified as a `Set` object.n *n * @staticn * @memberOf _n * @since 4.3.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a set, else `false`.n * @examplen *n * _.isSet(new Set);n * // => truen *n * _.isSet(new WeakSet);n * // => falsen */nnn var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;n /**n * Checks if `value` is classified as a `String` primitive or object.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a string, else `false`.n * @examplen *n * _.isString('abc');n * // => truen *n * _.isString(1);n * // => falsen */nn function isString(value) {n return typeof value == 'string' || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;n }n /**n * Checks if `value` is classified as a `Symbol` primitive or object.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.n * @examplen *n * _.isSymbol(Symbol.iterator);n * // => truen *n * _.isSymbol('abc');n * // => falsen */nnn function isSymbol(value) {n return _typeof(value) == 'symbol' || isObjectLike(value) && baseGetTag(value) == symbolTag;n }n /**n * Checks if `value` is classified as a typed array.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.n * @examplen *n * _.isTypedArray(new Uint8Array);n * // => truen *n * _.isTypedArray([]);n * // => falsen */nnn var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;n /**n * Checks if `value` is `undefined`.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.n * @examplen *n * _.isUndefined(void 0);n * // => truen *n * _.isUndefined(null);n * // => falsen */nn function isUndefined(value) {n return value === undefined;n }n /**n * Checks if `value` is classified as a `WeakMap` object.n *n * @staticn * @memberOf _n * @since 4.3.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.n * @examplen *n * _.isWeakMap(new WeakMap);n * // => truen *n * _.isWeakMap(new Map);n * // => falsen */nnn function isWeakMap(value) {n return isObjectLike(value) && getTag(value) == weakMapTag;n }n /**n * Checks if `value` is classified as a `WeakSet` object.n *n * @staticn * @memberOf _n * @since 4.3.0n * @category Langn * @param {*} value The value to check.n * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.n * @examplen *n * _.isWeakSet(new WeakSet);n * // => truen *n * _.isWeakSet(new Set);n * // => falsen */nnn function isWeakSet(value) {n return isObjectLike(value) && baseGetTag(value) == weakSetTag;n }n /**n * Checks if `value` is less than `other`.n *n * @staticn * @memberOf _n * @since 3.9.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if `value` is less than `other`,n * else `false`.n * @see _.gtn * @examplen *n * _.lt(1, 3);n * // => truen *n * _.lt(3, 3);n * // => falsen *n * _.lt(3, 1);n * // => falsen */nnn var lt = createRelationalOperation(baseLt);n /**n * Checks if `value` is less than or equal to `other`.n *n * @staticn * @memberOf _n * @since 3.9.0n * @category Langn * @param {*} value The value to compare.n * @param {*} other The other value to compare.n * @returns {boolean} Returns `true` if `value` is less than or equal ton * `other`, else `false`.n * @see _.gten * @examplen *n * _.lte(1, 3);n * // => truen *n * _.lte(3, 3);n * // => truen *n * _.lte(3, 1);n * // => falsen */nn var lte = createRelationalOperation(function (value, other) {n return value <= other;n });n /**n * Converts `value` to an array.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Langn * @param {*} value The value to convert.n * @returns {Array} Returns the converted array.n * @examplen *n * _.toArray({ 'a': 1, 'b': 2 });n * // => [1, 2]n *n * _.toArray('abc');n * // => ['a', 'b', 'c']n *n * _.toArray(1);n * // => []n *n * _.toArray(null);n * // => []n */nn function toArray(value) {n if (!value) {n return [];n }nn if (isArrayLike(value)) {n return isString(value) ? stringToArray(value) : copyArray(value);n }nn if (symIterator && value) {n return iteratorToArray(value());n }nn var tag = getTag(value),n func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;n return func(value);n }n /**n * Converts `value` to a finite number.n *n * @staticn * @memberOf _n * @since 4.12.0n * @category Langn * @param {*} value The value to convert.n * @returns {number} Returns the converted number.n * @examplen *n * _.toFinite(3.2);n * // => 3.2n *n * _.toFinite(Number
.MIN_VALUE);n * // => 5e-324n *n * _.toFinite(Infinity);n * // => 1.7976931348623157e+308n *n * _.toFinite('3.2');n * // => 3.2n */nnn function toFinite(value) {n if (!value) {n return value === 0 ? value : 0;n }nn value = toNumber(value);nn if (value === INFINITY || value === -INFINITY) {n var sign = value < 0 ? -1 : 1;n return sign * MAX_INTEGER;n }nn return value === value ? value : 0;n }n /**n * Converts `value` to an integer.n *n * Note: This method is loosely based onn * [`ToInteger`](www.ecma-international.org/ecma-262/7.0/#sec-tointeger).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to convert.n * @returns {number} Returns the converted integer.n * @examplen *n * _.toInteger(3.2);n * // => 3n *n * _.toInteger(Number
.MIN_VALUE);n * // => 0n *n * _.toInteger(Infinity);n * // => 1.7976931348623157e+308n *n * _.toInteger('3.2');n * // => 3n */nnn function toInteger(value) {n var result = toFinite(value),n remainder = result % 1;n return result === result ? remainder ? result - remainder : result : 0;n }n /**n * Converts `value` to an integer suitable for use as the length of ann * array-like object.n *n * Note: This method is based onn * [`ToLength`](ecma-international.org/ecma-262/7.0/#sec-tolength).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to convert.n * @returns {number} Returns the converted integer.n * @examplen *n * _.toLength(3.2);n * // => 3n *n * _.toLength(Number
.MIN_VALUE);n * // => 0n *n * _.toLength(Infinity);n * // => 4294967295n *n * _.toLength('3.2');n * // => 3n */nnn function toLength(value) {n return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;n }n /**n * Converts `value` to a number.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to process.n * @returns {number} Returns the number.n * @examplen *n * _.toNumber(3.2);n * // => 3.2n *n * _.toNumber(Number
.MIN_VALUE);n * // => 5e-324n *n * _.toNumber(Infinity);n * // => Infinityn *n * _.toNumber('3.2');n * // => 3.2n */nnn function toNumber(value) {n if (typeof value == 'number') {n return value;n }nn if (isSymbol(value)) {n return NAN;n }nn if (isObject(value)) {n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;n value = isObject(other) ? other + '' : other;n }nn if (typeof value != 'string') {n return value === 0 ? value : +value;n }nn value = value.replace(reTrim, '');n var isBinary = reIsBinary.test(value);n return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;n }n /**n * Converts `value` to a plain object flattening inherited enumerable stringn * keyed properties of `value` to own properties of the plain object.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Langn * @param {*} value The value to convert.n * @returns {Object} Returns the converted plain object.n * @examplen *n * function Foo() {n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.assign({ 'a': 1 }, new Foo);n * // => { 'a': 1, 'b': 2 }n *n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));n * // => { 'a': 1, 'b': 2, 'c': 3 }n */nnn function toPlainObject(value) {n return copyObject(value, keysIn(value));n }n /**n * Converts `value` to a safe integer. A safe integer can be compared andn * represented correctly.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to convert.n * @returns {number} Returns the converted integer.n * @examplen *n * _.toSafeInteger(3.2);n * // => 3n *n * _.toSafeInteger(Number
.MIN_VALUE);n * // => 0n *n * _.toSafeInteger(Infinity);n * // => 9007199254740991n *n * _.toSafeInteger('3.2');n * // => 3n */nnn function toSafeInteger(value) {n return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;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 * @staticn * @memberOf _n * @since 4.0.0n * @category Langn * @param {*} value The value to convert.n * @returns {string} Returns the converted string.n * @examplen *n * _.toString(null);n * // => ''n *n * _.toString(-0);n * // => '-0'n *n * _.toString([1, 2, 3]);n * // => '1,2,3'n */nnn function toString(value) {n return value == null ? '' : baseToString(value);n }n /————————————————————————/nn /**n * Assigns own enumerable string keyed properties of source objects to then * destination object. Source objects are applied from left to right.n * Subsequent sources overwrite property assignments of previous sources.n *n * Note: This method mutates `object` and is loosely based onn * [`Object.assign`](mdn.io/Object/assign).n *n * @staticn * @memberOf _n * @since 0.10.0n * @category Objectn * @param {Object} object The destination object.n * @param {…Object} [sources] The source objects.n * @returns {Object} Returns `object`.n * @see _.assignInn * @examplen *n * function Foo() {n * this.a = 1;n * }n *n * function Bar() {n * this.c = 3;n * }n *n * Foo.prototype.b = 2;n * Bar.prototype.d = 4;n *n * _.assign({ 'a': 0 }, new Foo, new Bar);n * // => { 'a': 1, 'c': 3 }n */nnn var assign = createAssigner(function (object, source) {n if (isPrototype(source) || isArrayLike(source)) {n copyObject(source, keys(source), object);n return;n }nn for (var key in source) {n if (hasOwnProperty.call(source, key)) {n assignValue(object, key, source);n }n }n });n /**n * This method is like `_.assign` except that it iterates over own andn * inherited source properties.n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @alias extendn * @category Objectn * @param {Object} object The destination object.n * @param {…Object} [sources] The source objects.n * @returns {Object} Returns `object`.n * @see _.assignn * @examplen *n * function Foo() {n * this.a = 1;n * }n *n * function Bar() {n * this.c = 3;n * }n *n * Foo.prototype.b = 2;n * Bar.prototype.d = 4;n *n * _.assignIn({ 'a': 0 }, new Foo, new Bar);n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }n */nn var assignIn = createAssigner(function (object, source) {n copyObject(source, keysIn(source), object);n });n /**n * This method is like `_.assignIn` except that it accepts `customizer`n * which is invoked to produce the assigned values. If `customizer` returnsn * `undefined`, assignment is handled by the method instead. The `customizer`n * is invoked with five arguments: (objValue, srcValue, key, object, source).n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @alias extendWithn * @category Objectn * @param {Object} object The destination object.n * @param {…Object} sources The source objects.n * @param {Function} [customizer] The function to customize assigned values.n * @returns {Object} Returns `object`.n * @see _.assignWithn * @examplen *n * function customizer(objValue, srcValue) {n * return _.isUndefined(objValue) ? srcValue : objValue;n * }n *n * var defaults = .partialRight(.assignInWith, customizer);n *n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });n * // => { 'a': 1, 'b': 2 }n */nn var assignInWith = createAssigner(function (object, source, srcIndex, customizer) {n copyObject(source, keysIn(source), object, customizer);n });n /**n * This method is like `_.assign` except that it accepts `customizer`n * which is invoked to produce the assigned values. If `customizer` returnsn * `undefined`, assignment is handled by the method instead. The `customizer`n * is invoked with five arguments: (objValue, srcValue, key, object, source).n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The destination object.n * @param {…Object} sources The source objects.n * @param {Function} [customizer] The function to customize assigned values.n * @returns {Object} Returns `object`.n * @see _.assignInWithn * @examplen *n * function customizer(objValue, srcValue) {n * return _.isUndefined(objValue) ? srcValue : objValue;n * }n *n * var defaults = .partialRight(.assignWith, customizer);n *n * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });n * // => { 'a': 1, 'b': 2 }n */nn var assignWith = createAssigner(function (object, source, srcIndex, customizer) {n copyObject(source, keys(source), object, customizer);n });n /**n * Creates an array of values corresponding to `paths` of `object`.n *n * @staticn * @memberOf _n * @since 1.0.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {…(string|string[])} [paths] The property paths to pick.n * @returns {Array} Returns the picked values.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };n *n * _.at(object, ['a.b.c', 'a']);n * // => [3, 4]n */nn var at = flatRest(baseAt);n /**n * Creates an object that inherits from the `prototype` object. If an * `properties` object is given, its own enumerable string keyed propertiesn * are assigned to the created object.n *n * @staticn * @memberOf _n * @since 2.3.0n * @category Objectn * @param {Object} prototype The object to inherit from.n * @param {Object} [properties] The properties to assign to the object.n * @returns {Object} Returns the new object.n * @examplen *n * function Shape() {n * this.x = 0;n * this.y = 0;n * }n *n * function Circle() {n * Shape.call(this);n * }n *n * Circle.prototype = _.create(Shape.prototype, {n * 'constructor': Circlen * });n *n * var circle = new Circle;n * circle instanceof Circle;n * // => truen *n * circle instanceof Shape;n * // => truen */nn function create(prototype, properties) {n var result = baseCreate(prototype);n return properties == null ? result : baseAssign(result, properties);n }n /**n * Assigns own and inherited enumerable string keyed properties of sourcen * objects to the destination object for all destination properties thatn * resolve to `undefined`. Source objects are applied from left to right.n * Once a property is set, additional values of the same property are ignored.n *n * Note: This method mutates `object`.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The destination object.n * @param {…Object} [sources] The source objects.n * @returns {Object} Returns `object`.n * @see _.defaultsDeepn * @examplen *n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });n * // => { 'a': 1, 'b': 2 }n */nnn var defaults = baseRest(function (object, sources) {n object = Object(object);n var index = -1;n var length = sources.length;n var guard = length > 2 ? sources : undefined;nn if (guard && isIterateeCall(sources, sources, guard)) {n length = 1;n }nn while (++index < length) {n var source = sources;n var props = keysIn(source);n var propsIndex = -1;n var propsLength = props.length;nn while (++propsIndex < propsLength) {n var key = props;n var value = object;nn if (value === undefined || eq(value, objectProto) && !hasOwnProperty.call(object, key)) {n object = source;n }n }n }nn return object;n });n /**n * This method is like `_.defaults` except that it recursively assignsn * default properties.n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 3.10.0n * @category Objectn * @param {Object} object The destination object.n * @param {…Object} [sources] The source objects.n * @returns {Object} Returns `object`.n * @see _.defaultsn * @examplen *n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });n * // => { 'a': { 'b': 2, 'c': 3 } }n */nn var defaultsDeep = baseRest(function (args) {n args.push(undefined, customDefaultsMerge);n return apply(mergeWith, undefined, args);n });n /**n * This method is like `_.find` except that it returns the key of the firstn * element `predicate` returns truthy for instead of the element itself.n *n * @staticn * @memberOf _n * @since 1.1.0n * @category Objectn * @param {Object} object The object to inspect.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {string|undefined} Returns the key of the matched element,n * else `undefined`.n * @examplen *n * var users = {n * 'barney': { 'age': 36, 'active': true },n * 'fred': { 'age': 40, 'active': false },n * 'pebbles': { 'age': 1, 'active': true }n * };n *n * _.findKey(users, function(o) { return o.age < 40; });n * // => 'barney' (iteration order is not guaranteed)n *n * // The `_.matches` iteratee shorthand.n * _.findKey(users, { 'age': 1, 'active': true });n * // => 'pebbles'n *n * // The `_.matchesProperty` iteratee shorthand.n * _.findKey(users, ['active', false]);n * // => 'fred'n *n * // The `_.property` iteratee shorthand.n * _.findKey(users, 'active');n * // => 'barney'n */nn function findKey(object, predicate) {n return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);n }n /**n * This method is like `_.findKey` except that it iterates over elements ofn * a collection in the opposite order.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Objectn * @param {Object} object The object to inspect.n * @param {Function} [predicate=_.identity] The function invoked per iteration.n * @returns {string|undefined} Returns the key of the matched element,n * else `undefined`.n * @examplen *n * var users = {n * 'barney': { 'age': 36, 'active': true },n * 'fred': { 'age': 40, 'active': false },n * 'pebbles': { 'age': 1, 'active': true }n * };n *n * _.findLastKey(users, function(o) { return o.age < 40; });n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'n *n * // The `_.matches` iteratee shorthand.n * _.findLastKey(users, { 'age': 36, 'active': true });n * // => 'barney'n *n * // The `_.matchesProperty` iteratee shorthand.n * _.findLastKey(users, ['active', false]);n * // => 'fred'n *n * // The `_.property` iteratee shorthand.n * _.findLastKey(users, 'active');n * // => 'pebbles'n */nnn function findLastKey(object, predicate) {n return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);n }n /**n * Iterates over own and inherited enumerable string keyed properties of ann * object and invokes `iteratee` for each property. The iteratee is invokedn * with three arguments: (value, key, object). Iteratee functions may exitn * iteration early by explicitly returning `false`.n *n * @staticn * @memberOf _n * @since 0.3.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Object} Returns `object`.n * @see _.forInRightn * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.forIn(new Foo, function(value, key) {n * console.log(key);n * });n * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).n */nnn function forIn(object, iteratee) {n return object == null ? object : baseFor(object, getIteratee(iteratee, 3), keysIn);n }n /**n * This method is like `_.forIn` except that it iterates over properties ofn * `object` in the opposite order.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Object} Returns `object`.n * @see _.forInn * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.forInRight(new Foo, function(value, key) {n * console.log(key);n * });n * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.n */nnn function forInRight(object, iteratee) {n return object == null ? object : baseForRight(object, getIteratee(iteratee, 3), keysIn);n }n /**n * Iterates over own enumerable string keyed properties of an object andn * invokes `iteratee` for each property. The iteratee is invoked with threen * arguments: (value, key, object). Iteratee functions may exit iterationn * early by explicitly returning `false`.n *n * @staticn * @memberOf _n * @since 0.3.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Object} Returns `object`.n * @see _.forOwnRightn * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.forOwn(new Foo, function(value, key) {n * console.log(key);n * });n * // => Logs 'a' then 'b' (iteration order is not guaranteed).n */nnn function forOwn(object, iteratee) {n return object && baseForOwn(object, getIteratee(iteratee, 3));n }n /**n * This method is like `_.forOwn` except that it iterates over properties ofn * `object` in the opposite order.n *n * @staticn * @memberOf _n * @since 2.0.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Object} Returns `object`.n * @see _.forOwnn * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.forOwnRight(new Foo, function(value, key) {n * console.log(key);n * });n * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.n */nnn function forOwnRight(object, iteratee) {n return object && baseForOwnRight(object, getIteratee(iteratee, 3));n }n /**n * Creates an array of function property names from own enumerable propertiesn * of `object`.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The object to inspect.n * @returns {Array} Returns the function names.n * @see _.functionsInn * @examplen *n * function Foo() {n * this.a = _.constant('a');n * this.b = _.constant('b');n * }n *n * Foo.prototype.c = _.constant('c');n *n * _.functions(new Foo);n * // => ['a', 'b']n */nnn function functions(object) {n return object == null ? [] : baseFunctions(object, keys(object));n }n /**n * Creates an array of function property names from own and inheritedn * enumerable properties of `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The object to inspect.n * @returns {Array} Returns the function names.n * @see _.functionsn * @examplen *n * function Foo() {n * this.a = _.constant('a');n * this.b = _.constant('b');n * }n *n * Foo.prototype.c = _.constant('c');n *n * _.functionsIn(new Foo);n * // => ['a', 'b', 'c']n */nnn function functionsIn(object) {n return object == null ? [] : baseFunctions(object, keysIn(object));n }n /**n * Gets the value at `path` of `object`. If the resolved value isn * `undefined`, the `defaultValue` is returned in its place.n *n * @staticn * @memberOf _n * @since 3.7.0n * @category Objectn * @param {Object} object The object to query.n * @param {Array|string} path The path of the property to get.n * @param {*} [defaultValue] The value returned for `undefined` resolved values.n * @returns {*} Returns the resolved value.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': 3 } }] };n *n * _.get(object, 'a.b.c');n * // => 3n *n * _.get(object, ['a', '0', 'b', 'c']);n * // => 3n *n * _.get(object, 'a.b.c', 'default');n * // => 'default'n */nnn function get(object, path, defaultValue) {n var result = object == null ? undefined : baseGet(object, path);n return result === undefined ? defaultValue : result;n }n /**n * Checks if `path` is a direct property of `object`.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The object to query.n * @param {Array|string} path The path to check.n * @returns {boolean} Returns `true` if `path` exists, else `false`.n * @examplen *n * var object = { 'a': { 'b': 2 } };n * var other = _.create({ 'a': _.create({ 'b': 2 }) });n *n * _.has(object, 'a');n * // => truen *n * _.has(object, 'a.b');n * // => truen *n * _.has(object, ['a', 'b']);n * // => truen *n * _.has(other, 'a');n * // => falsen */nnn function has(object, path) {n return object != null && hasPath(object, path, baseHas);n }n /**n * Checks if `path` is a direct or inherited property of `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The object to query.n * @param {Array|string} path The path to check.n * @returns {boolean} Returns `true` if `path` exists, else `false`.n * @examplen *n * var object = _.create({ 'a': _.create({ 'b': 2 }) });n *n * _.hasIn(object, 'a');n * // => truen *n * _.hasIn(object, 'a.b');n * // => truen *n * _.hasIn(object, ['a', 'b']);n * // => truen *n * _.hasIn(object, 'b');n * // => falsen */nnn function hasIn(object, path) {n return object != null && hasPath(object, path, baseHasIn);n }n /**n * Creates an object composed of the inverted keys and values of `object`.n * If `object` contains duplicate values, subsequent values overwriten * property assignments of previous values.n *n * @staticn * @memberOf _n * @since 0.7.0n * @category Objectn * @param {Object} object The object to invert.n * @returns {Object} Returns the new inverted object.n * @examplen *n * var object = { 'a': 1, 'b': 2, 'c': 1 };n *n * _.invert(object);n * // => { '1': 'c', '2': 'b' }n */nnn var invert = createInverter(function (result, value, key) {n if (value != null && typeof value.toString != 'function') {n value = nativeObjectToString.call(value);n }nn result = key;n }, constant(identity));n /**n * This method is like `_.invert` except that the inverted object is generatedn * from the results of running each element of `object` thru `iteratee`. Then * corresponding inverted value of each inverted key is an array of keysn * responsible for generating the inverted value. The iteratee is invokedn * with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.1.0n * @category Objectn * @param {Object} object The object to invert.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {Object} Returns the new inverted object.n * @examplen *n * var object = { 'a': 1, 'b': 2, 'c': 1 };n *n * _.invertBy(object);n * // => { '1': ['a', 'c'], '2': ['b'] }n *n * _.invertBy(object, function(value) {n * return 'group' + value;n * });n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }n */nn var invertBy = createInverter(function (result, value, key) {n if (value != null && typeof value.toString != 'function') {n value = nativeObjectToString.call(value);n }nn if (hasOwnProperty.call(result, value)) {n result.push(key);n } else {n result = [key];n }n }, getIteratee);n /**n * Invokes the method at `path` of `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The object to query.n * @param {Array|string} path The path of the method to invoke.n * @param {…*} [args] The arguments to invoke the method with.n * @returns {*} Returns the result of the invoked method.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };n *n * _.invoke(object, 'a.b.c.slice', 1, 3);n * // => [2, 3]n */nn var invoke = baseRest(baseInvoke);n /**n * Creates an array of the own enumerable property names of `object`.n *n * Note: Non-object values are coerced to objects. See then * [ES spec](ecma-international.org/ecma-262/7.0/#sec-object.keys)n * for more details.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names.n * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.keys(new Foo);n * // => ['a', 'b'] (iteration order is not guaranteed)n *n * _.keys('hi');n * // => ['0', '1']n */nn function keys(object) {n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);n }n /**n * Creates an array of the own and inherited enumerable property names of `object`.n *n * Note: Non-object values are coerced to objects.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Objectn * @param {Object} object The object to query.n * @returns {Array} Returns the array of property names.n * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.keysIn(new Foo);n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)n */nnn function keysIn(object) {n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);n }n /**n * The opposite of `_.mapValues`; this method creates an object with then * same values as `object` and keys generated by running each own enumerablen * string keyed property of `object` thru `iteratee`. The iteratee is invokedn * with three arguments: (value, key, object).n *n * @staticn * @memberOf _n * @since 3.8.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Object} Returns the new mapped object.n * @see _.mapValuesn * @examplen *n * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {n * return key + value;n * });n * // => { 'a1': 1, 'b2': 2 }n */nnn function mapKeys(object, iteratee) {n var result = {};n iteratee = getIteratee(iteratee, 3);n baseForOwn(object, function (value, key, object) {n baseAssignValue(result, iteratee(value, key, object), value);n });n return result;n }n /**n * Creates an object with the same keys as `object` and values generatedn * by running each own enumerable string keyed property of `object` thrun * `iteratee`. The iteratee is invoked with three arguments:n * (value, key, object).n *n * @staticn * @memberOf _n * @since 2.4.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Object} Returns the new mapped object.n * @see _.mapKeysn * @examplen *n * var users = {n * 'fred': { 'user': 'fred', 'age': 40 },n * 'pebbles': { 'user': 'pebbles', 'age': 1 }n * };n *n * _.mapValues(users, function(o) { return o.age; });n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)n *n * // The `_.property` iteratee shorthand.n * _.mapValues(users, 'age');n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)n */nnn function mapValues(object, iteratee) {n var result = {};n iteratee = getIteratee(iteratee, 3);n baseForOwn(object, function (value, key, object) {n baseAssignValue(result, key, iteratee(value, key, object));n });n return result;n }n /**n * This method is like `_.assign` except that it recursively merges own andn * inherited enumerable string keyed properties of source objects into then * destination object. Source properties that resolve to `undefined` aren * skipped if a destination value exists. Array and plain object propertiesn * are merged recursively. Other objects and value types are overridden byn * assignment. Source objects are applied from left to right. Subsequentn * sources overwrite property assignments of previous sources.n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 0.5.0n * @category Objectn * @param {Object} object The destination object.n * @param {…Object} [sources] The source objects.n * @returns {Object} Returns `object`.n * @examplen *n * var object = {n * 'a': [{ 'b': 2 }, { 'd': 4 }]n * };n *n * var other = {n * 'a': [{ 'c': 3 }, { 'e': 5 }]n * };n *n * _.merge(object, other);n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }n */nnn var merge = createAssigner(function (object, source, srcIndex) {n baseMerge(object, source, srcIndex);n });n /**n * This method is like `_.merge` except that it accepts `customizer` whichn * is invoked to produce the merged values of the destination and sourcen * properties. If `customizer` returns `undefined`, merging is handled by then * method instead. The `customizer` is invoked with six arguments:n * (objValue, srcValue, key, object, source, stack).n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The destination object.n * @param {…Object} sources The source objects.n * @param {Function} customizer The function to customize assigned values.n * @returns {Object} Returns `object`.n * @examplen *n * function customizer(objValue, srcValue) {n * if (_.isArray(objValue)) {n * return objValue.concat(srcValue);n * }n * }n *n * var object = { 'a': [1], 'b': [2] };n * var other = { 'a': [3], 'b': [4] };n *n * _.mergeWith(object, other, customizer);n * // => { 'a': [1, 3], 'b': [2, 4] }n */nn var mergeWith = createAssigner(function (object, source, srcIndex, customizer) {n baseMerge(object, source, srcIndex, customizer);n });n /**n * The opposite of `_.pick`; this method creates an object composed of then * own and inherited enumerable property paths of `object` that are not omitted.n *n * Note: This method is considerably slower than `_.pick`.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The source object.n * @param {…(string|string[])} [paths] The property paths to omit.n * @returns {Object} Returns the new object.n * @examplen *n * var object = { 'a': 1, 'b': '2', 'c': 3 };n *n * _.omit(object, ['a', 'c']);n * // => { 'b': '2' }n */nn var omit = flatRest(function (object, paths) {n var result = {};nn if (object == null) {n return result;n }nn var isDeep = false;n paths = arrayMap(paths, function (path) {n path = castPath(path, object);n isDeep || (isDeep = path.length > 1);n return path;n });n copyObject(object, getAllKeysIn(object), result);nn if (isDeep) {n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);n }nn var length = paths.length;nn while (length–) {n baseUnset(result, paths);n }nn return result;n });n /**n * The opposite of `_.pickBy`; this method creates an object composed ofn * the own and inherited enumerable string keyed properties of `object` thatn * `predicate` doesn't return truthy for. The predicate is invoked with twon * arguments: (value, key).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The source object.n * @param {Function} [predicate=_.identity] The function invoked per property.n * @returns {Object} Returns the new object.n * @examplen *n * var object = { 'a': 1, 'b': '2', 'c': 3 };n *n * _.omitBy(object, _.isNumber);n * // => { 'b': '2' }n */nn function omitBy(object, predicate) {n return pickBy(object, negate(getIteratee(predicate)));n }n /**n * Creates an object composed of the picked `object` properties.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The source object.n * @param {…(string|string[])} [paths] The property paths to pick.n * @returns {Object} Returns the new object.n * @examplen *n * var object = { 'a': 1, 'b': '2', 'c': 3 };n *n * _.pick(object, ['a', 'c']);n * // => { 'a': 1, 'c': 3 }n */nnn var pick = flatRest(function (object, paths) {n return object == null ? {} : basePick(object, paths);n });n /**n * Creates an object composed of the `object` properties `predicate` returnsn * truthy for. The predicate is invoked with two arguments: (value, key).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The source object.n * @param {Function} [predicate=_.identity] The function invoked per property.n * @returns {Object} Returns the new object.n * @examplen *n * var object = { 'a': 1, 'b': '2', 'c': 3 };n *n * _.pickBy(object, _.isNumber);n * // => { 'a': 1, 'c': 3 }n */nn function pickBy(object, predicate) {n if (object == null) {n return {};n }nn var props = arrayMap(getAllKeysIn(object), function (prop) {n return [prop];n });n predicate = getIteratee(predicate);n return basePickBy(object, props, function (value, path) {n return predicate(value, path);n });n }n /**n * This method is like `_.get` except that if the resolved value is an * function it's invoked with the `this` binding of its parent object andn * its result is returned.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The object to query.n * @param {Array|string} path The path of the property to resolve.n * @param {*} [defaultValue] The value returned for `undefined` resolved values.n * @returns {*} Returns the resolved value.n * @examplen *n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };n *n * _.result(object, 'a.b.c1');n * // => 3n *n * _.result(object, 'a.b.c2');n * // => 4n *n * _.result(object, 'a.b.c3', 'default');n * // => 'default'n *n * _.result(object, 'a.b.c3', _.constant('default'));n * // => 'default'n */nnn function result(object, path, defaultValue) {n path = castPath(path, object);n var index = -1,n length = path.length; // Ensure the loop is entered when path is empty.nn if (!length) {n length = 1;n object = undefined;n }nn while (++index < length) {n var value = object == null ? undefined : object[toKey(path)];nn if (value === undefined) {n index = length;n value = defaultValue;n }nn object = isFunction(value) ? value.call(object) : value;n }nn return object;n }n /**n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,n * it's created. Arrays are created for missing index properties while objectsn * are created for all other missing properties. Use `_.setWith` to customizen * `path` creation.n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 3.7.0n * @category Objectn * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to set.n * @param {*} value The value to set.n * @returns {Object} Returns `object`.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': 3 } }] };n *n * _.set(object, 'a.b.c', 4);n * console.log(object.a.b.c);n * // => 4n *n * _.set(object, ['x', '0', 'y', 'z'], 5);n * console.log(object.x.y.z);n * // => 5n */nnn function set(object, path, value) {n return object == null ? object : baseSet(object, path, value);n }n /**n * This method is like `_.set` except that it accepts `customizer` which isn * invoked to produce the objects of `path`. If `customizer` returns `undefined`n * path creation is handled by the method instead. The `customizer` is invokedn * with three arguments: (nsValue, key, nsObject).n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to set.n * @param {*} value The value to set.n * @param {Function} [customizer] The function to customize assigned values.n * @returns {Object} Returns `object`.n * @examplen *n * var object = {};n *n * _.setWith(object, '[0]', 'a', Object
);n * // => { '0': { '1': 'a' } }n */nnn function setWith(object, path, value, customizer) {n customizer = typeof customizer == 'function' ? customizer : undefined;n return object == null ? object : baseSet(object, path, value, customizer);n }n /**n * Creates an array of own enumerable string keyed-value pairs for `object`n * which can be consumed by `_.fromPairs`. If `object` is a map or set, itsn * entries are returned.n *n * @staticn * @memberOf _n * @since 4.0.0n * @alias entriesn * @category Objectn * @param {Object} object The object to query.n * @returns {Array} Returns the key-value pairs.n * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.toPairs(new Foo);n * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)n */nnn var toPairs = createToPairs(keys);n /**n * Creates an array of own and inherited enumerable string keyed-value pairsn * for `object` which can be consumed by `_.fromPairs`. If `object` is a mapn * or set, its entries are returned.n *n * @staticn * @memberOf _n * @since 4.0.0n * @alias entriesInn * @category Objectn * @param {Object} object The object to query.n * @returns {Array} Returns the key-value pairs.n * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.toPairsIn(new Foo);n * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)n */nn var toPairsIn = createToPairs(keysIn);n /**n * An alternative to `_.reduce`; this method transforms `object` to a newn * `accumulator` object which is the result of running each of its ownn * enumerable string keyed properties thru `iteratee`, with each invocationn * potentially mutating the `accumulator` object. If `accumulator` is notn * provided, a new object with the same `[[Prototype]]` will be used. Then * iteratee is invoked with four arguments: (accumulator, value, key, object).n * Iteratee functions may exit iteration early by explicitly returning `false`.n *n * @staticn * @memberOf _n * @since 1.3.0n * @category Objectn * @param {Object} object The object to iterate over.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @param {*} [accumulator] The custom accumulator value.n * @returns {*} Returns the accumulated value.n * @examplen *n * _.transform([2, 3, 4], function(result, n) {n * result.push(n *= n);n * return n % 2 == 0;n * }, []);n * // => [4, 9]n *n * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {n * (result || (result = [])).push(key);n * }, {});n * // => { '1': ['a', 'c'], '2': ['b'] }n */nn function transform(object, iteratee, accumulator) {n var isArr = isArray(object),n isArrLike = isArr || isBuffer(object) || isTypedArray(object);n iteratee = getIteratee(iteratee, 4);nn if (accumulator == null) {n var Ctor = object && object.constructor;nn if (isArrLike) {n accumulator = isArr ? new Ctor() : [];n } else if (isObject(object)) {n accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};n } else {n accumulator = {};n }n }nn (isArrLike ? arrayEach : baseForOwn)(object, function (value, index, object) {n return iteratee(accumulator, value, index, object);n });n return accumulator;n }n /**n * Removes the property at `path` of `object`.n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Objectn * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to unset.n * @returns {boolean} Returns `true` if the property is deleted, else `false`.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': 7 } }] };n * _.unset(object, 'a.b.c');n * // => truen *n * console.log(object);n * // => { 'a': [{ 'b': {} }] };n *n * _.unset(object, ['a', '0', 'b', 'c']);n * // => truen *n * console.log(object);n * // => { 'a': [{ 'b': {} }] };n */nnn function unset(object, path) {n return object == null ? true : baseUnset(object, path);n }n /**n * This method is like `_.set` except that accepts `updater` to produce then * value to set. Use `_.updateWith` to customize `path` creation. The `updater`n * is invoked with one argument: (value).n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.6.0n * @category Objectn * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to set.n * @param {Function} updater The function to produce the updated value.n * @returns {Object} Returns `object`.n * @examplen *n * var object = { 'a': [{ 'b': { 'c': 3 } }] };n *n * _.update(object, 'a.b.c', function(n) { return n * n; });n * console.log(object.a.b.c);n * // => 9n *n * _.update(object, 'x.y.z', function(n) { return n ? n + 1 : 0; });n * console.log(object.x.y.z);n * // => 0n */nnn function update(object, path, updater) {n return object == null ? object : baseUpdate(object, path, castFunction(updater));n }n /**n * This method is like `_.update` except that it accepts `customizer` which isn * invoked to produce the objects of `path`. If `customizer` returns `undefined`n * path creation is handled by the method instead. The `customizer` is invokedn * with three arguments: (nsValue, key, nsObject).n *n * Note: This method mutates `object`.n *n * @staticn * @memberOf _n * @since 4.6.0n * @category Objectn * @param {Object} object The object to modify.n * @param {Array|string} path The path of the property to set.n * @param {Function} updater The function to produce the updated value.n * @param {Function} [customizer] The function to customize assigned values.n * @returns {Object} Returns `object`.n * @examplen *n * var object = {};n *n * _.updateWith(object, '[0]', _.constant('a'), Object
);n * // => { '0': { '1': 'a' } }n */nnn function updateWith(object, path, updater, customizer) {n customizer = typeof customizer == 'function' ? customizer : undefined;n return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);n }n /**n * Creates an array of the own enumerable string keyed property values of `object`.n *n * Note: Non-object values are coerced to objects.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Objectn * @param {Object} object The object to query.n * @returns {Array} Returns the array of property values.n * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.values(new Foo);n * // => [1, 2] (iteration order is not guaranteed)n *n * _.values('hi');n * // => ['h', 'i']n */nnn function values(object) {n return object == null ? [] : baseValues(object, keys(object));n }n /**n * Creates an array of the own and inherited enumerable string keyed propertyn * values of `object`.n *n * Note: Non-object values are coerced to objects.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Objectn * @param {Object} object The object to query.n * @returns {Array} Returns the array of property values.n * @examplen *n * function Foo() {n * this.a = 1;n * this.b = 2;n * }n *n * Foo.prototype.c = 3;n *n * _.valuesIn(new Foo);n * // => [1, 2, 3] (iteration order is not guaranteed)n */nnn function valuesIn(object) {n return object == null ? [] : baseValues(object, keysIn(object));n }n /————————————————————————/nn /**n * Clamps `number` within the inclusive `lower` and `upper` bounds.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Numbern * @param {number} number The number to clamp.n * @param {number} [lower] The lower bound.n * @param {number} upper The upper bound.n * @returns {number} Returns the clamped number.n * @examplen *n * _.clamp(-10, -5, 5);n * // => -5n *n * _.clamp(10, -5, 5);n * // => 5n */nnn function clamp(number, lower, upper) {n if (upper === undefined) {n upper = lower;n lower = undefined;n }nn if (upper !== undefined) {n upper = toNumber(upper);n upper = upper === upper ? upper : 0;n }nn if (lower !== undefined) {n lower = toNumber(lower);n lower = lower === lower ? lower : 0;n }nn return baseClamp(toNumber(number), lower, upper);n }n /**n * Checks if `n` is between `start` and up to, but not including, `end`. Ifn * `end` is not specified, it's set to `start` with `start` then set to `0`.n * If `start` is greater than `end` the params are swapped to supportn * negative ranges.n *n * @staticn * @memberOf _n * @since 3.3.0n * @category Numbern * @param {number} number The number to check.n * @param {number} [start=0] The start of the range.n * @param {number} end The end of the range.n * @returns {boolean} Returns `true` if `number` is in the range, else `false`.n * @see _.range, _.rangeRightn * @examplen *n * _.inRange(3, 2, 4);n * // => truen *n * _.inRange(4, 8);n * // => truen *n * _.inRange(4, 2);n * // => falsen *n * _.inRange(2, 2);n * // => falsen *n * _.inRange(1.2, 2);n * // => truen *n * _.inRange(5.2, 4);n * // => falsen *n * _.inRange(-3, -2, -6);n * // => truen */nnn function inRange(number, start, end) {n start = toFinite(start);nn if (end === undefined) {n end = start;n start = 0;n } else {n end = toFinite(end);n }nn number = toNumber(number);n return baseInRange(number, start, end);n }n /**n * Produces a random number between the inclusive `lower` and `upper` bounds.n * If only one argument is provided a number between `0` and the given numbern * is returned. If `floating` is `true`, or either `lower` or `upper` aren * floats, a floating-point number is returned instead of an integer.n *n * Note: JavaScript follows the IEEE-754 standard for resolvingn * floating-point values which can produce unexpected results.n *n * @staticn * @memberOf _n * @since 0.7.0n * @category Numbern * @param {number} [lower=0] The lower bound.n * @param {number} [upper=1] The upper bound.n * @param {boolean} [floating] Specify returning a floating-point number.n * @returns {number} Returns the random number.n * @examplen *n * _.random(0, 5);n * // => an integer between 0 and 5n *n * _.random(5);n * // => also an integer between 0 and 5n *n * _.random(5, true);n * // => a floating-point number between 0 and 5n *n * _.random(1.2, 5.2);n * // => a floating-point number between 1.2 and 5.2n */nnn function random(lower, upper, floating) {n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {n upper = floating = undefined;n }nn if (floating === undefined) {n if (typeof upper == 'boolean') {n floating = upper;n upper = undefined;n } else if (typeof lower == 'boolean') {n floating = lower;n lower = undefined;n }n }nn if (lower === undefined && upper === undefined) {n lower = 0;n upper = 1;n } else {n lower = toFinite(lower);nn if (upper === undefined) {n upper = lower;n lower = 0;n } else {n upper = toFinite(upper);n }n }nn if (lower > upper) {n var temp = lower;n lower = upper;n upper = temp;n }nn if (floating || lower % 1 || upper % 1) {n var rand = nativeRandom();n return nativeMin(lower + rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1))), upper);n }nn return baseRandom(lower, upper);n }n /————————————————————————/nn /**n * Converts `string` to [camel case](en.wikipedia.org/wiki/CamelCase).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the camel cased string.n * @examplen *n * _.camelCase('Foo Bar');n * // => 'fooBar'n *n * _.camelCase('–foo-bar–');n * // => 'fooBar'n *n * _.camelCase('FOO_BAR');n * // => 'fooBar'n */nnn var camelCase = createCompounder(function (result, word, index) {n word = word.toLowerCase();n return result + (index ? capitalize(word) : word);n });n /**n * Converts the first character of `string` to upper case and the remainingn * to lower case.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to capitalize.n * @returns {string} Returns the capitalized string.n * @examplen *n * _.capitalize('FRED');n * // => 'Fred'n */nn function capitalize(string) {n return upperFirst(toString(string).toLowerCase());n }n /**n * Deburrs `string` by convertingn * [Latin-1 Supplement](en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)n * and [Latin Extended-A](en.wikipedia.org/wiki/Latin_Extended-A)n * letters to basic Latin letters and removingn * [combining diacritical marks](en.wikipedia.org/wiki/Combining_Diacritical_Marks).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to deburr.n * @returns {string} Returns the deburred string.n * @examplen *n * _.deburr('déjà vu');n * // => 'deja vu'n */nnn function deburr(string) {n string = toString(string);n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');n }n /**n * Checks if `string` ends with the given target string.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to inspect.n * @param {string} [target] The string to search for.n * @param {number} [position=string.length] The position to search up to.n * @returns {boolean} Returns `true` if `string` ends with `target`,n * else `false`.n * @examplen *n * _.endsWith('abc', 'c');n * // => truen *n * _.endsWith('abc', 'b');n * // => falsen *n * _.endsWith('abc', 'b', 2);n * // => truen */nnn function endsWith(string, target, position) {n string = toString(string);n target = baseToString(target);n var length = string.length;n position = position === undefined ? length : baseClamp(toInteger(position), 0, length);n var end = position;n position -= target.length;n return position >= 0 && string.slice(position, end) == target;n }n /**n * Converts the characters "&", "<", ">", '"', and "'" in `string` to theirn * corresponding HTML entities.n *n * Note: No other characters are escaped. To escape additionaln * characters use a third-party library like [he](mths.be/he).n *n * Though the ">" character is escaped for symmetry, characters liken * ">" and "/" don't need escaping in HTML and have no special meaningn * unless they're part of a tag or unquoted attribute value. Seen * [Mathias Bynens's article](mathiasbynens.be/notes/ambiguous-ampersands)n * (under "semi-related fun fact") for more details.n *n * When working with HTML you should alwaysn * [quote attribute values](wonko.com/post/html-escaping) to reducen * XSS vectors.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Stringn * @param {string} [string=''] The string to escape.n * @returns {string} Returns the escaped string.n * @examplen *n * _.escape('fred, barney, & pebbles');n * // => 'fred, barney, & pebbles'n */nnn function escape(string) {n string = toString(string);n return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;n }n /**n * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",n * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to escape.n * @returns {string} Returns the escaped string.n * @examplen *n * _.escapeRegExp(‘(lodash.com/)’);n * // => '\[lodash\]\(lodash\.com/\)‘n */nnn function escapeRegExp(string) {n string = toString(string);n return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, '\\$&') : string;n }n /**n * Converts `string` ton * [kebab case](en.wikipedia.org/wiki/Letter_case#Special_case_styles).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the kebab cased string.n * @examplen *n * _.kebabCase('Foo Bar');n * // => 'foo-bar'n *n * _.kebabCase('fooBar');n * // => 'foo-bar'n *n * _.kebabCase('FOO_BAR');n * // => 'foo-bar'n */nnn var kebabCase = createCompounder(function (result, word, index) {n return result + (index ? '-' : '') + word.toLowerCase();n });n /**n * Converts `string`, as space separated words, to lower case.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the lower cased string.n * @examplen *n * _.lowerCase('–Foo-Bar–');n * // => 'foo bar'n *n * _.lowerCase('fooBar');n * // => 'foo bar'n *n * _.lowerCase('FOO_BAR');n * // => 'foo bar'n */nn var lowerCase = createCompounder(function (result, word, index) {n return result + (index ? ' ' : '') + word.toLowerCase();n });n /**n * Converts the first character of `string` to lower case.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the converted string.n * @examplen *n * _.lowerFirst('Fred');n * // => 'fred'n *n * _.lowerFirst('FRED');n * // => 'fRED'n */nn var lowerFirst = createCaseFirst('toLowerCase');n /**n * Pads `string` on the left and right sides if it's shorter than `length`.n * Padding characters are truncated if they can't be evenly divided by `length`.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to pad.n * @param {number} [length=0] The padding length.n * @param {string} [chars=' '] The string used as padding.n * @returns {string} Returns the padded string.n * @examplen *n * _.pad('abc', 8);n * // => ' abc 'n *n * _.pad('abc', 8, '_-');n * // => '-abc-_'n *n * _.pad('abc', 3);n * // => 'abc'n */nn function pad(string, length, chars) {n string = toString(string);n length = toInteger(length);n var strLength = length ? stringSize(string) : 0;nn if (!length || strLength >= length) {n return string;n }nn var mid = (length - strLength) / 2;n return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);n }n /**n * Pads `string` on the right side if it's shorter than `length`. Paddingn * characters are truncated if they exceed `length`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to pad.n * @param {number} [length=0] The padding length.n * @param {string} [chars=' '] The string used as padding.n * @returns {string} Returns the padded string.n * @examplen *n * _.padEnd('abc', 6);n * // => 'abc 'n *n * _.padEnd('abc', 6, '_-');n * // => 'abc_-_'n *n * _.padEnd('abc', 3);n * // => 'abc'n */nnn function padEnd(string, length, chars) {n string = toString(string);n length = toInteger(length);n var strLength = length ? stringSize(string) : 0;n return length && strLength < length ? string + createPadding(length - strLength, chars) : string;n }n /**n * Pads `string` on the left side if it's shorter than `length`. Paddingn * characters are truncated if they exceed `length`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to pad.n * @param {number} [length=0] The padding length.n * @param {string} [chars=' '] The string used as padding.n * @returns {string} Returns the padded string.n * @examplen *n * _.padStart('abc', 6);n * // => ' abc'n *n * _.padStart('abc', 6, '_-');n * // => '_-_abc'n *n * _.padStart('abc', 3);n * // => 'abc'n */nnn function padStart(string, length, chars) {n string = toString(string);n length = toInteger(length);n var strLength = length ? stringSize(string) : 0;n return length && strLength < length ? createPadding(length - strLength, chars) + string : string;n }n /**n * Converts `string` to an integer of the specified radix. If `radix` isn * `undefined` or `0`, a `radix` of `10` is used unless `value` is an * hexadecimal, in which case a `radix` of `16` is used.n *n * Note: This method aligns with then * [ES5 implementation](es5.github.io/#x15.1.2.2) of `parseInt`.n *n * @staticn * @memberOf _n * @since 1.1.0n * @category Stringn * @param {string} string The string to convert.n * @param {number} [radix=10] The radix to interpret `value` by.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {number} Returns the converted integer.n * @examplen *n * _.parseInt('08');n * // => 8n *n * _.map(['6', '08', '10'], _.parseInt);n * // => [6, 8, 10]n */nnn function parseInt(string, radix, guard) {n if (guard || radix == null) {n radix = 0;n } else if (radix) {n radix = +radix;n }nn return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);n }n /**n * Repeats the given string `n` times.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to repeat.n * @param {number} [n=1] The number of times to repeat the string.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {string} Returns the repeated string.n * @examplen *n * _.repeat('*', 3);n * // => '***'n *n * _.repeat('abc', 2);n * // => 'abcabc'n *n * _.repeat('abc', 0);n * // => ''n */nnn function repeat(string, n, guard) {n if (guard ? isIterateeCall(string, n, guard) : n === undefined) {n n = 1;n } else {n n = toInteger(n);n }nn return baseRepeat(toString(string), n);n }n /**n * Replaces matches for `pattern` in `string` with `replacement`.n *n * Note: This method is based onn * [`String#replace`](mdn.io/String/replace).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to modify.n * @param {RegExp|string} pattern The pattern to replace.n * @param {Function|string} replacement The match replacement.n * @returns {string} Returns the modified string.n * @examplen *n * _.replace('Hi Fred', 'Fred', 'Barney');n * // => 'Hi Barney'n */nnn function replace() {n var args = arguments,n string = toString(args);n return args.length < 3 ? string : string.replace(args, args);n }n /**n * Converts `string` ton * [snake case](en.wikipedia.org/wiki/Snake_case).n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the snake cased string.n * @examplen *n * _.snakeCase('Foo Bar');n * // => 'foo_bar'n *n * _.snakeCase('fooBar');n * // => 'foo_bar'n *n * _.snakeCase('–FOO-BAR–');n * // => 'foo_bar'n */nnn var snakeCase = createCompounder(function (result, word, index) {n return result + (index ? '_' : '') + word.toLowerCase();n });n /**n * Splits `string` by `separator`.n *n * Note: This method is based onn * [`String#split`](mdn.io/String/split).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to split.n * @param {RegExp|string} separator The separator pattern to split by.n * @param {number} [limit] The length to truncate results to.n * @returns {Array} Returns the string segments.n * @examplen *n * _.split('a-b-c', '-', 2);n * // => ['a', 'b']n */nn function split(string, separator, limit) {n if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {n separator = limit = undefined;n }nn limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;nn if (!limit) {n return [];n }nn string = toString(string);nn if (string && (typeof separator == 'string' || separator != null && !isRegExp(separator))) {n separator = baseToString(separator);nn if (!separator && hasUnicode(string)) {n return castSlice(stringToArray(string), 0, limit);n }n }nn return string.split(separator, limit);n }n /**n * Converts `string` ton * [start case](en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).n *n * @staticn * @memberOf _n * @since 3.1.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the start cased string.n * @examplen *n * _.startCase('–foo-bar–');n * // => 'Foo Bar'n *n * _.startCase('fooBar');n * // => 'Foo Bar'n *n * _.startCase('FOO_BAR');n * // => 'FOO BAR'n */nnn var startCase = createCompounder(function (result, word, index) {n return result + (index ? ' ' : '') + upperFirst(word);n });n /**n * Checks if `string` starts with the given target string.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to inspect.n * @param {string} [target] The string to search for.n * @param {number} [position=0] The position to search from.n * @returns {boolean} Returns `true` if `string` starts with `target`,n * else `false`.n * @examplen *n * _.startsWith('abc', 'a');n * // => truen *n * _.startsWith('abc', 'b');n * // => falsen *n * _.startsWith('abc', 'b', 1);n * // => truen */nn function startsWith(string, target, position) {n string = toString(string);n position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);n target = baseToString(target);n return string.slice(position, position + target.length) == target;n }n /**n * Creates a compiled template function that can interpolate data propertiesn * in "interpolate" delimiters, HTML-escape interpolated data properties inn * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Datan * properties may be accessed as free variables in the template. If a settingn * object is given, it takes precedence over `_.templateSettings` values.n *n * Note: In the development build `_.template` utilizesn * [sourceURLs](www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)n * for easier debugging.n *n * For more information on precompiling templates seen * [lodash's custom builds documentation](lodash.com/custom-builds).n *n * For more information on Chrome extension sandboxes seen * [Chrome's extensions documentation](developer.chrome.com/extensions/sandboxingEval).n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Stringn * @param {string} [string=''] The template string.n * @param {Object} [options={}] The options object.n * @param {RegExp} [options.escape=_.templateSettings.escape]n * The HTML "escape" delimiter.n * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]n * The "evaluate" delimiter.n * @param {Object} [options.imports=_.templateSettings.imports]n * An object to import into the template as free variables.n * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]n * The "interpolate" delimiter.n * @param {string} [options.sourceURL=’lodash.templateSources']n * The sourceURL of the compiled template.n * @param {string} [options.variable='obj']n * The data object variable name.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Function} Returns the compiled template function.n * @examplen *n * // Use the "interpolate" delimiter to create a compiled template.n * var compiled = _.template('hello <%= user %>!');n * compiled({ 'user': 'fred' });n * // => 'hello fred!'n *n * // Use the HTML "escape" delimiter to escape data property values.n * var compiled = _.template('<%- value %>');n * compiled({ 'value': '<script>' });n * // => '<script>'n *n * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.n * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');n * compiled({ 'users': ['fred', 'barney'] });n * // => '<li>fred</li><li>barney</li>'n *n * // Use the internal `print` function in "evaluate" delimiters.n * var compiled = _.template('<% print("hello " + user); %>!');n * compiled({ 'user': 'barney' });n * // => 'hello barney!'n *n * // Use the ES template literal delimiter as an "interpolate" delimiter.n * // Disable support by replacing the "interpolate" delimiter.n * var compiled = _.template('hello ${ user }!');n * compiled({ 'user': 'pebbles' });n * // => 'hello pebbles!'n *n * // Use backslashes to treat delimiters as plain text.n * var compiled = _.template('<%= "\<%- value %\\>" %>');n * compiled({ 'value': 'ignored' });n * // => '<%- value %>'n *n * // Use the `imports` option to import `jQuery` as `jq`.n * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';n * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });n * compiled({ 'users': ['fred', 'barney'] });n * // => '<li>fred</li><li>barney</li>'n *n * // Use the `sourceURL` option to specify a custom sourceURL for the template.n * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });n * compiled(data);n * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.n *n * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.n * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });n * compiled.source;n * // => function(data) {n * // var __t, __p = '';n * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';n * // return __p;n * // }n *n * // Use custom template delimiters.n * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;n * var compiled = _.template('hello {{ user }}!');n * compiled({ 'user': 'mustache' });n * // => 'hello mustache!'n *n * // Use the `source` property to inline compiled templates for meaningfuln * // line numbers in error messages and stack traces.n * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\n * var JST = {\n * "main": ' + _.template(mainText).source + '\n * };\n * ');n */nnn function template(string, options, guard) {n // Based on John Resig's `tmpl` implementationn // (ejohn.org/blog/javascript-micro-templating/)n // and Laura Doktorova's doT.js (github.com/olado/doT).n var settings = lodash.templateSettings;nn if (guard && isIterateeCall(string, options, guard)) {n options = undefined;n }nn string = toString(string);n options = assignInWith({}, options, settings, customDefaultsAssignIn);n var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),n importsKeys = keys(imports),n importsValues = baseValues(imports, importsKeys);n var isEscaping,n isEvaluating,n index = 0,n interpolate = options.interpolate || reNoMatch,n source = "__p += '"; // Compile the regexp to match each delimiter.nn var reDelimiters = RegExp((options.escape || reNoMatch).source + '|' + interpolate.source + '|' + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + (options.evaluate || reNoMatch).source + '|$', 'g'); // Use a sourceURL for easier debugging.n // The sourceURL gets injected into the source that's eval-ed, so be carefuln // with lookup (in case of e.g. prototype pollution), and strip newlines if any.n // A newline wouldn't be a valid sourceURL anyway, and it'd enable code injection.nn var sourceURL = '//# sourceURL=' + (hasOwnProperty.call(options, 'sourceURL') ? (options.sourceURL + '').replace(//g, ' ') : 'lodash.templateSources[' + ++templateCounter + ']') + '\n';n string.replace(reDelimiters, function (match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {n interpolateValue || (interpolateValue = esTemplateValue); // Escape characters that can't be included in string literals.nn source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); // Replace delimiters with snippets.nn if (escapeValue) {n isEscaping = true;n source += "' +\n__e(" + escapeValue + ") +\n'";n }nn if (evaluateValue) {n isEvaluating = true;n source += "';\n" + evaluateValue + ";\n__p += '";n }nn if (interpolateValue) {n source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";n }nn index = offset + match.length; // The JS engine embedded in Adobe products needs `match` returned inn // order to produce the correct `offset` value.nn return match;n });n source += "';\n"; // If `variable` is not specified wrap a with-statement around the generatedn // code to add the data object to the top of the scope chain.n // Like with sourceURL, we take care to not check the option's prototype,n // as this configuration is a code injection vector.nn var variable = hasOwnProperty.call(options, 'variable') && options.variable;nn if (!variable) {n source = 'with (obj) {\n' + source + '\n}\n';n } // Cleanup code by stripping empty strings.nnn source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source).replace(reEmptyStringMiddle, '$1').replace(reEmptyStringTrailing, '$1;'); // Frame code as the function body.nn source = 'function(' + (variable || 'obj') + ') {\n' + (variable ? '' : 'obj || (obj = {});\n') + "var __t, __p = ''" + (isEscaping ? ', __e = _.escape' : '') + (isEvaluating ? ', __j = Array.prototype.join;\n' + "function print() { __p += __j.call(arguments, '') }\n" : ';\n') + source + 'return __p\n}';n var result = attempt(function () {n return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);n }); // Provide the compiled function's source by its `toString` method orn // the `source` property as a convenience for inlining compiled templates.nn result.source = source;nn if (isError(result)) {n throw result;n }nn return result;n }n /**n * Converts `string`, as a whole, to lower case just liken * [String#toLowerCase](mdn.io/toLowerCase).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the lower cased string.n * @examplen *n * _.toLower('–Foo-Bar–');n * // => '–foo-bar–'n *n * _.toLower('fooBar');n * // => 'foobar'n *n * _.toLower('FOO_BAR');n * // => 'foo_bar'n */nnn function toLower(value) {n return toString(value).toLowerCase();n }n /**n * Converts `string`, as a whole, to upper case just liken * [String#toUpperCase](mdn.io/toUpperCase).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the upper cased string.n * @examplen *n * _.toUpper('–foo-bar–');n * // => '–FOO-BAR–'n *n * _.toUpper('fooBar');n * // => 'FOOBAR'n *n * _.toUpper('foo_bar');n * // => 'FOO_BAR'n */nnn function toUpper(value) {n return toString(value).toUpperCase();n }n /**n * Removes leading and trailing whitespace or specified characters from `string`.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to trim.n * @param {string} [chars=whitespace] The characters to trim.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {string} Returns the trimmed string.n * @examplen *n * _.trim(' abc ');n * // => 'abc'n *n * _.trim('--abc--', '_-');n * // => 'abc'n *n * _.map([' foo ', ' bar '], _.trim);n * // => ['foo', 'bar']n */nnn function trim(string, chars, guard) {n string = toString(string);nn if (string && (guard || chars === undefined)) {n return string.replace(reTrim, '');n }nn if (!string || !(chars = baseToString(chars))) {n return string;n }nn var strSymbols = stringToArray(string),n chrSymbols = stringToArray(chars),n start = charsStartIndex(strSymbols, chrSymbols),n end = charsEndIndex(strSymbols, chrSymbols) + 1;n return castSlice(strSymbols, start, end).join('');n }n /**n * Removes trailing whitespace or specified characters from `string`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to trim.n * @param {string} [chars=whitespace] The characters to trim.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {string} Returns the trimmed string.n * @examplen *n * _.trimEnd(' abc ');n * // => ' abc'n *n * _.trimEnd('--abc--', '_-');n * // => '-_-abc'n */nnn function trimEnd(string, chars, guard) {n string = toString(string);nn if (string && (guard || chars === undefined)) {n return string.replace(reTrimEnd, '');n }nn if (!string || !(chars = baseToString(chars))) {n return string;n }nn var strSymbols = stringToArray(string),n end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;n return castSlice(strSymbols, 0, end).join('');n }n /**n * Removes leading whitespace or specified characters from `string`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to trim.n * @param {string} [chars=whitespace] The characters to trim.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {string} Returns the trimmed string.n * @examplen *n * _.trimStart(' abc ');n * // => 'abc 'n *n * _.trimStart('--abc--', '_-');n * // => 'abc-_-'n */nnn function trimStart(string, chars, guard) {n string = toString(string);nn if (string && (guard || chars === undefined)) {n return string.replace(reTrimStart, '');n }nn if (!string || !(chars = baseToString(chars))) {n return string;n }nn var strSymbols = stringToArray(string),n start = charsStartIndex(strSymbols, stringToArray(chars));n return castSlice(strSymbols, start).join('');n }n /**n * Truncates `string` if it's longer than the given maximum string length.n * The last characters of the truncated string are replaced with the omissionn * string which defaults to "…".n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to truncate.n * @param {Object} [options={}] The options object.n * @param {number} [options.length=30] The maximum string length.n * @param {string} [options.omission='…'] The string to indicate text is omitted.n * @param {RegExp|string} [options.separator] The separator pattern to truncate to.n * @returns {string} Returns the truncated string.n * @examplen *n * _.truncate('hi-diddly-ho there, neighborino');n * // => 'hi-diddly-ho there, neighbo…'n *n * _.truncate('hi-diddly-ho there, neighborino', {n * 'length': 24,n * 'separator': ' 'n * });n * // => 'hi-diddly-ho there,…'n *n * _.truncate('hi-diddly-ho there, neighborino', {n * 'length': 24,n * 'separator': /,? +/n * });n * // => 'hi-diddly-ho there…'n *n * _.truncate('hi-diddly-ho there, neighborino', {n * 'omission': ' […]'n * });n * // => 'hi-diddly-ho there, neig […]'n */nnn function truncate(string, options) {n var length = DEFAULT_TRUNC_LENGTH,n omission = DEFAULT_TRUNC_OMISSION;nn if (isObject(options)) {n var separator = 'separator' in options ? options.separator : separator;n length = 'length' in options ? toInteger(options.length) : length;n omission = 'omission' in options ? baseToString(options.omission) : omission;n }nn string = toString(string);n var strLength = string.length;nn if (hasUnicode(string)) {n var strSymbols = stringToArray(string);n strLength = strSymbols.length;n }nn if (length >= strLength) {n return string;n }nn var end = length - stringSize(omission);nn if (end < 1) {n return omission;n }nn var result = strSymbols ? castSlice(strSymbols, 0, end).join('') : string.slice(0, end);nn if (separator === undefined) {n return result + omission;n }nn if (strSymbols) {n end += result.length - end;n }nn if (isRegExp(separator)) {n if (string.slice(end).search(separator)) {n var match,n substring = result;nn if (!separator.global) {n separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');n }nn separator.lastIndex = 0;nn while (match = separator.exec(substring)) {n var newEnd = match.index;n }nn result = result.slice(0, newEnd === undefined ? end : newEnd);n }n } else if (string.indexOf(baseToString(separator), end) != end) {n var index = result.lastIndexOf(separator);nn if (index > -1) {n result = result.slice(0, index);n }n }nn return result + omission;n }n /**n * The inverse of `_.escape`; this method converts the HTML entitiesn * `&`, `<`, `>`, `"`, and `'` in `string` ton * their corresponding characters.n *n * Note: No other HTML entities are unescaped. To unescape additionaln * HTML entities use a third-party library like [he](mths.be/he).n *n * @staticn * @memberOf _n * @since 0.6.0n * @category Stringn * @param {string} [string=''] The string to unescape.n * @returns {string} Returns the unescaped string.n * @examplen *n * _.unescape('fred, barney, & pebbles');n * // => 'fred, barney, & pebbles'n */nnn function unescape(string) {n string = toString(string);n return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;n }n /**n * Converts `string`, as space separated words, to upper case.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the upper cased string.n * @examplen *n * _.upperCase('–foo-bar');n * // => 'FOO BAR'n *n * _.upperCase('fooBar');n * // => 'FOO BAR'n *n * _.upperCase('foo_bar');n * // => 'FOO BAR'n */nnn var upperCase = createCompounder(function (result, word, index) {n return result + (index ? ' ' : '') + word.toUpperCase();n });n /**n * Converts the first character of `string` to upper case.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Stringn * @param {string} [string=''] The string to convert.n * @returns {string} Returns the converted string.n * @examplen *n * _.upperFirst('fred');n * // => 'Fred'n *n * _.upperFirst('FRED');n * // => 'FRED'n */nn var upperFirst = createCaseFirst('toUpperCase');n /**n * Splits `string` into an array of its words.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Stringn * @param {string} [string=''] The string to inspect.n * @param {RegExp|string} [pattern] The pattern to match words.n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.n * @returns {Array} Returns the words of `string`.n * @examplen *n * _.words('fred, barney, & pebbles');n * // => ['fred', 'barney', 'pebbles']n *n * _.words('fred, barney, & pebbles', /[^, ]+/g);n * // => ['fred', 'barney', '&', 'pebbles']n */nn function words(string, pattern, guard) {n string = toString(string);n pattern = guard ? undefined : pattern;nn if (pattern === undefined) {n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);n }nn return string.match(pattern) || [];n }n /————————————————————————/nn /**n * Attempts to invoke `func`, returning either the result or the caught errorn * object. Any additional arguments are provided to `func` when it's invoked.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Utiln * @param {Function} func The function to attempt.n * @param {…*} [args] The arguments to invoke `func` with.n * @returns {*} Returns the `func` result or error object.n * @examplen *n * // Avoid throwing errors for invalid selectors.n * var elements = _.attempt(function(selector) {n * return document.querySelectorAll(selector);n * }, '>_>');n *n * if (_.isError(elements)) {n * elements = [];n * }n */nnn var attempt = baseRest(function (func, args) {n try {n return apply(func, undefined, args);n } catch (e) {n return isError(e) ? e : new Error(e);n }n });n /**n * Binds methods of an object to the object itself, overwriting the existingn * method.n *n * Note: This method doesn't set the "length" property of bound functions.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @param {Object} object The object to bind and assign the bound methods to.n * @param {…(string|string[])} methodNames The object method names to bind.n * @returns {Object} Returns `object`.n * @examplen *n * var view = {n * 'label': 'docs',n * 'click': function() {n * console.log('clicked ' + this.label);n * }n * };n *n * _.bindAll(view, ['click']);n * jQuery(element).on('click', view.click);n * // => Logs 'clicked docs' when clicked.n */nn var bindAll = flatRest(function (object, methodNames) {n arrayEach(methodNames, function (key) {n key = toKey(key);n baseAssignValue(object, key, bind(object, object));n });n return object;n });n /**n * Creates a function that iterates over `pairs` and invokes the correspondingn * function of the first predicate to return truthy. The predicate-functionn * pairs are invoked with the `this` binding and arguments of the createdn * function.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {Array} pairs The predicate-function pairs.n * @returns {Function} Returns the new composite function.n * @examplen *n * var func = _.cond([n * [_.matches({ 'a': 1 }), _.constant('matches A')],n * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],n * [_.stubTrue, _.constant('no match')]n * ]);n *n * func({ 'a': 1, 'b': 2 });n * // => 'matches A'n *n * func({ 'a': 0, 'b': 1 });n * // => 'matches B'n *n * func({ 'a': '1', 'b': '2' });n * // => 'no match'n */nn function cond(pairs) {n var length = pairs == null ? 0 : pairs.length,n toIteratee = getIteratee();n pairs = !length ? [] : arrayMap(pairs, function (pair) {n if (typeof pair != 'function') {n throw new TypeError(FUNC_ERROR_TEXT);n }nn return [toIteratee(pair), pair];n });n return baseRest(function (args) {n var index = -1;nn while (++index < length) {n var pair = pairs;nn if (apply(pair, this, args)) {n return apply(pair, this, args);n }n }n });n }n /**n * Creates a function that invokes the predicate properties of `source` withn * the corresponding property values of a given object, returning `true` ifn * all predicates return truthy, else `false`.n *n * Note: The created function is equivalent to `_.conformsTo` withn * `source` partially applied.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {Object} source The object of property predicates to conform to.n * @returns {Function} Returns the new spec function.n * @examplen *n * var objects = [n * { 'a': 2, 'b': 1 },n * { 'a': 1, 'b': 2 }n * ];n *n * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));n * // => [{ 'a': 1, 'b': 2 }]n */nnn function conforms(source) {n return baseConforms(baseClone(source, CLONE_DEEP_FLAG));n }n /**n * Creates a function that returns `value`.n *n * @staticn * @memberOf _n * @since 2.4.0n * @category Utiln * @param {*} value The value to return from the new function.n * @returns {Function} Returns the new constant function.n * @examplen *n * var objects = _.times(2, _.constant({ 'a': 1 }));n *n * console.log(objects);n * // => [{ 'a': 1 }, { 'a': 1 }]n *n * console.log(objects === objects);n * // => truen */nnn function constant(value) {n return function () {n return value;n };n }n /**n * Checks `value` to determine whether a default value should be returned inn * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,n * or `undefined`.n *n * @staticn * @memberOf _n * @since 4.14.0n * @category Utiln * @param {*} value The value to check.n * @param {*} defaultValue The default value.n * @returns {*} Returns the resolved value.n * @examplen *n * _.defaultTo(1, 10);n * // => 1n *n * _.defaultTo(undefined, 10);n * // => 10n */nnn function defaultTo(value, defaultValue) {n return value == null || value !== value ? defaultValue : value;n }n /**n * Creates a function that returns the result of invoking the given functionsn * with the `this` binding of the created function, where each successiven * invocation is supplied the return value of the previous.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Utiln * @param {…(Function|Function[])} [funcs] The functions to invoke.n * @returns {Function} Returns the new composite function.n * @see _.flowRightn * @examplen *n * function square(n) {n * return n * n;n * }n *n * var addSquare = _.flow([_.add, square]);n * addSquare(1, 2);n * // => 9n */nnn var flow = createFlow();n /**n * This method is like `_.flow` except that it creates a function thatn * invokes the given functions from right to left.n *n * @staticn * @since 3.0.0n * @memberOf _n * @category Utiln * @param {…(Function|Function[])} [funcs] The functions to invoke.n * @returns {Function} Returns the new composite function.n * @see _.flown * @examplen *n * function square(n) {n * return n * n;n * }n *n * var addSquare = _.flowRight([square, _.add]);n * addSquare(1, 2);n * // => 9n */nn var flowRight = createFlow(true);n /**n * This method returns the first argument it receives.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @param {*} value Any value.n * @returns {*} Returns `value`.n * @examplen *n * var object = { 'a': 1 };n *n * console.log(_.identity(object) === object);n * // => truen */nn function identity(value) {n return value;n }n /**n * Creates a function that invokes `func` with the arguments of the createdn * function. If `func` is a property name, the created function returns then * property value for a given element. If `func` is an array or object, then * created function returns `true` for elements that contain the equivalentn * source properties, otherwise it returns `false`.n *n * @staticn * @since 4.0.0n * @memberOf _n * @category Utiln * @param {*} [func=_.identity] The value to convert to a callback.n * @returns {Function} Returns the callback.n * @examplen *n * var users = [n * { 'user': 'barney', 'age': 36, 'active': true },n * { 'user': 'fred', 'age': 40, 'active': false }n * ];n *n * // The `_.matches` iteratee shorthand.n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]n *n * // The `_.matchesProperty` iteratee shorthand.n * _.filter(users, _.iteratee(['user', 'fred']));n * // => [{ 'user': 'fred', 'age': 40 }]n *n * // The `_.property` iteratee shorthand.n * _.map(users, _.iteratee('user'));n * // => ['barney', 'fred']n *n * // Create custom iteratee shorthands.n * _.iteratee = .wrap(.iteratee, function(iteratee, func) {n * return !_.isRegExp(func) ? iteratee(func) : function(string) {n * return func.test(string);n * };n * });n *n * _.filter(['abc', 'def'], /ef/);n * // => ['def']n */nnn function iteratee(func) {n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));n }n /**n * Creates a function that performs a partial deep comparison between a givenn * object and `source`, returning `true` if the given object has equivalentn * property values, else `false`.n *n * Note: The created function is equivalent to `_.isMatch` with `source`n * partially applied.n *n * Partial comparisons will match empty array and empty object `source`n * values against any array or object value, respectively. See `_.isEqual`n * for a list of supported value comparisons.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Utiln * @param {Object} source The object of property values to match.n * @returns {Function} Returns the new spec function.n * @examplen *n * var objects = [n * { 'a': 1, 'b': 2, 'c': 3 },n * { 'a': 4, 'b': 5, 'c': 6 }n * ];n *n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]n */nnn function matches(source) {n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));n }n /**n * Creates a function that performs a partial deep comparison between then * value at `path` of a given object to `srcValue`, returning `true` if then * object value is equivalent, else `false`.n *n * Note: Partial comparisons will match empty array and empty objectn * `srcValue` values against any array or object value, respectively. Seen * `_.isEqual` for a list of supported value comparisons.n *n * @staticn * @memberOf _n * @since 3.2.0n * @category Utiln * @param {Array|string} path The path of the property to get.n * @param {*} srcValue The value to match.n * @returns {Function} Returns the new spec function.n * @examplen *n * var objects = [n * { 'a': 1, 'b': 2, 'c': 3 },n * { 'a': 4, 'b': 5, 'c': 6 }n * ];n *n * _.find(objects, _.matchesProperty('a', 4));n * // => { 'a': 4, 'b': 5, 'c': 6 }n */nnn function matchesProperty(path, srcValue) {n return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));n }n /**n * Creates a function that invokes the method at `path` of a given object.n * Any additional arguments are provided to the invoked method.n *n * @staticn * @memberOf _n * @since 3.7.0n * @category Utiln * @param {Array|string} path The path of the method to invoke.n * @param {…*} [args] The arguments to invoke the method with.n * @returns {Function} Returns the new invoker function.n * @examplen *n * var objects = [n * { 'a': { 'b': _.constant(2) } },n * { 'a': { 'b': _.constant(1) } }n * ];n *n * _.map(objects, _.method('a.b'));n * // => [2, 1]n *n * _.map(objects, _.method(['a', 'b']));n * // => [2, 1]n */nnn var method = baseRest(function (path, args) {n return function (object) {n return baseInvoke(object, path, args);n };n });n /**n * The opposite of `_.method`; this method creates a function that invokesn * the method at a given path of `object`. Any additional arguments aren * provided to the invoked method.n *n * @staticn * @memberOf _n * @since 3.7.0n * @category Utiln * @param {Object} object The object to query.n * @param {…*} [args] The arguments to invoke the method with.n * @returns {Function} Returns the new invoker function.n * @examplen *n * var array = _.times(3, _.constant),n * object = { 'a': array, 'b': array, 'c': array };n *n * _.map([‘a', 'c'], _.methodOf(object));n * // => [2, 0]n *n * _.map([['a', '2'], ['c', '0']], _.methodOf(object));n * // => [2, 0]n */nn var methodOf = baseRest(function (object, args) {n return function (path) {n return baseInvoke(object, path, args);n };n });n /**n * Adds all own enumerable string keyed function properties of a sourcen * object to the destination object. If `object` is a function, then methodsn * are added to its prototype as well.n *n * Note: Use `_.runInContext` to create a pristine `lodash` function ton * avoid conflicts caused by modifying the original.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @param {Function|Object} [object=lodash] The destination object.n * @param {Object} source The object of functions to add.n * @param {Object} [options={}] The options object.n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.n * @returns {Function|Object} Returns `object`.n * @examplen *n * function vowels(string) {n * return _.filter(string, function(v) {n * return /[aeiou]/i.test(v);n * });n * }n *n * _.mixin({ 'vowels': vowels });n * _.vowels('fred');n * // => ['e']n *n * _('fred').vowels().value();n * // => ['e']n *n * _.mixin({ 'vowels': vowels }, { 'chain': false });n * _('fred').vowels();n * // => ['e']n */nn function mixin(object, source, options) {n var props = keys(source),n methodNames = baseFunctions(source, props);nn if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {n options = source;n source = object;n object = this;n methodNames = baseFunctions(source, keys(source));n }nn var chain = !(isObject(options) && 'chain' in options) || !!options.chain,n isFunc = isFunction(object);n arrayEach(methodNames, function (methodName) {n var func = source;n object = func;nn if (isFunc) {n object.prototype = function () {n var chainAll = this.__chain__;nn if (chain || chainAll) {n var result = object(this.__wrapped__),n actions = result.__actions__ = copyArray(this.__actions__);n actions.push({n 'func': func,n 'args': arguments,n 'thisArg': objectn });n result.__chain__ = chainAll;n return result;n }nn return func.apply(object, arrayPush(, arguments));n };n }n });n return object;n }n /**n * Reverts the `_` variable to its previous value and returns a reference ton * the `lodash` function.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @returns {Function} Returns the `lodash` function.n * @examplen *n * var lodash = _.noConflict();n */nnn function noConflict() {n if (root._ === this) {n root._ = oldDash;n }nn return this;n }n /**n * This method returns `undefined`.n *n * @staticn * @memberOf _n * @since 2.3.0n * @category Utiln * @examplen *n * _.times(2, _.noop);n * // => [undefined, undefined]n */nnn function noop() {} // No operation performed.nn /**n * Creates a function that gets the argument at index `n`. If `n` is negative,n * the nth argument from the end is returned.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {number} [n=0] The index of the argument to return.n * @returns {Function} Returns the new pass-thru function.n * @examplen *n * var func = _.nthArg(1);n * func('a', 'b', 'c', 'd');n * // => 'b'n *n * var func = _.nthArg(-2);n * func('a', 'b', 'c', 'd');n * // => 'c'n */nnn function nthArg(n) {n n = toInteger(n);n return baseRest(function (args) {n return baseNth(args, n);n });n }n /**n * Creates a function that invokes `iteratees` with the arguments it receivesn * and returns their results.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {…(Function|Function[])} [iteratees=]n * The iteratees to invoke.n * @returns {Function} Returns the new function.n * @examplen *n * var func = _.over([Math.max, Math.min]);n *n * func(1, 2, 3, 4);n * // => [4, 1]n */nnn var over = createOver(arrayMap);n /**n * Creates a function that checks if all of the `predicates` returnn * truthy when invoked with the arguments it receives.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {…(Function|Function[])} [predicates=]n * The predicates to check.n * @returns {Function} Returns the new function.n * @examplen *n * var func = _.overEvery([Boolean, isFinite]);n *n * func('1');n * // => truen *n * func(null);n * // => falsen *n * func(NaN);n * // => falsen */nn var overEvery = createOver(arrayEvery);n /**n * Creates a function that checks if any of the `predicates` returnn * truthy when invoked with the arguments it receives.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {…(Function|Function[])} [predicates=]n * The predicates to check.n * @returns {Function} Returns the new function.n * @examplen *n * var func = _.overSome([Boolean, isFinite]);n *n * func('1');n * // => truen *n * func(null);n * // => truen *n * func(NaN);n * // => falsen */nn var overSome = createOver(arraySome);n /**n * Creates a function that returns the value at `path` of a given object.n *n * @staticn * @memberOf _n * @since 2.4.0n * @category Utiln * @param {Array|string} path The path of the property to get.n * @returns {Function} Returns the new accessor function.n * @examplen *n * var objects = [n * { 'a': { 'b': 2 } },n * { 'a': { 'b': 1 } }n * ];n *n * _.map(objects, _.property('a.b'));n * // => [2, 1]n *n * .map(.sortBy(objects, _.property(['a', 'b'])), 'a.b');n * // => [1, 2]n */nn function property(path) {n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);n }n /**n * The opposite of `_.property`; this method creates a function that returnsn * the value at a given path of `object`.n *n * @staticn * @memberOf _n * @since 3.0.0n * @category Utiln * @param {Object} object The object to query.n * @returns {Function} Returns the new accessor function.n * @examplen *n * var array = [0, 1, 2],n * object = { 'a': array, 'b': array, 'c': array };n *n * _.map([’a', 'c'], _.propertyOf(object));n * // => [2, 0]n *n * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));n * // => [2, 0]n */nnn function propertyOf(object) {n return function (path) {n return object == null ? undefined : baseGet(object, path);n };n }n /**n * Creates an array of numbers (positive and/or negative) progressing fromn * `start` up to, but not including, `end`. A step of `-1` is used if a negativen * `start` is specified without an `end` or `step`. If `end` is not specified,n * it's set to `start` with `start` then set to `0`.n *n * Note: JavaScript follows the IEEE-754 standard for resolvingn * floating-point values which can produce unexpected results.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @param {number} [start=0] The start of the range.n * @param {number} end The end of the range.n * @param {number} [step=1] The value to increment or decrement by.n * @returns {Array} Returns the range of numbers.n * @see _.inRange, _.rangeRightn * @examplen *n * _.range(4);n * // => [0, 1, 2, 3]n *n * _.range(-4);n * // => [0, -1, -2, -3]n *n * _.range(1, 5);n * // => [1, 2, 3, 4]n *n * _.range(0, 20, 5);n * // => [0, 5, 10, 15]n *n * _.range(0, -4, -1);n * // => [0, -1, -2, -3]n *n * _.range(1, 4, 0);n * // => [1, 1, 1]n *n * _.range(0);n * // => []n */nnn var range = createRange();n /**n * This method is like `_.range` except that it populates values inn * descending order.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {number} [start=0] The start of the range.n * @param {number} end The end of the range.n * @param {number} [step=1] The value to increment or decrement by.n * @returns {Array} Returns the range of numbers.n * @see _.inRange, _.rangen * @examplen *n * _.rangeRight(4);n * // => [3, 2, 1, 0]n *n * _.rangeRight(-4);n * // => [-3, -2, -1, 0]n *n * _.rangeRight(1, 5);n * // => [4, 3, 2, 1]n *n * _.rangeRight(0, 20, 5);n * // => [15, 10, 5, 0]n *n * _.rangeRight(0, -4, -1);n * // => [-3, -2, -1, 0]n *n * _.rangeRight(1, 4, 0);n * // => [1, 1, 1]n *n * _.rangeRight(0);n * // => []n */nn var rangeRight = createRange(true);n /**n * This method returns a new empty array.n *n * @staticn * @memberOf _n * @since 4.13.0n * @category Utiln * @returns {Array} Returns the new empty array.n * @examplen *n * var arrays = _.times(2, _.stubArray);n *n * console.log(arrays);n * // => [[], []]n *n * console.log(arrays === arrays);n * // => falsen */nn function stubArray() {n return [];n }n /**n * This method returns `false`.n *n * @staticn * @memberOf _n * @since 4.13.0n * @category Utiln * @returns {boolean} Returns `false`.n * @examplen *n * _.times(2, _.stubFalse);n * // => [false, false]n */nnn function stubFalse() {n return false;n }n /**n * This method returns a new empty object.n *n * @staticn * @memberOf _n * @since 4.13.0n * @category Utiln * @returns {Object} Returns the new empty object.n * @examplen *n * var objects = _.times(2, _.stubObject);n *n * console.log(objects);n * // => [{}, {}]n *n * console.log(objects === objects);n * // => falsen */nnn function stubObject() {n return {};n }n /**n * This method returns an empty string.n *n * @staticn * @memberOf _n * @since 4.13.0n * @category Utiln * @returns {string} Returns the empty string.n * @examplen *n * _.times(2, _.stubString);n * // => ['', '']n */nnn function stubString() {n return '';n }n /**n * This method returns `true`.n *n * @staticn * @memberOf _n * @since 4.13.0n * @category Utiln * @returns {boolean} Returns `true`.n * @examplen *n * _.times(2, _.stubTrue);n * // => [true, true]n */nnn function stubTrue() {n return true;n }n /**n * Invokes the iteratee `n` times, returning an array of the results ofn * each invocation. The iteratee is invoked with one argument; (index).n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @param {number} n The number of times to invoke `iteratee`.n * @param {Function} [iteratee=_.identity] The function invoked per iteration.n * @returns {Array} Returns the array of results.n * @examplen *n * _.times(3, String);n * // => ['0', '1', '2']n *n * _.times(4, _.constant(0));n * // => [0, 0, 0, 0]n */nnn function times(n, iteratee) {n n = toInteger(n);nn if (n < 1 || n > MAX_SAFE_INTEGER) {n return [];n }nn var index = MAX_ARRAY_LENGTH,n length = nativeMin(n, MAX_ARRAY_LENGTH);n iteratee = getIteratee(iteratee);n n -= MAX_ARRAY_LENGTH;n var result = baseTimes(length, iteratee);nn while (++index < n) {n iteratee(index);n }nn return result;n }n /**n * Converts `value` to a property path array.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Utiln * @param {*} value The value to convert.n * @returns {Array} Returns the new property path array.n * @examplen *n * _.toPath('a.b.c');n * // => ['a', 'b', 'c']n *n * _.toPath(‘a.b.c');n * // => ['a', '0', 'b', 'c']n */nnn function toPath(value) {n if (isArray(value)) {n return arrayMap(value, toKey);n }nn return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));n }n /**n * Generates a unique ID. If `prefix` is given, the ID is appended to it.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Utiln * @param {string} [prefix=''] The value to prefix the ID with.n * @returns {string} Returns the unique ID.n * @examplen *n * _.uniqueId('contact_');n * // => 'contact_104'n *n * _.uniqueId();n * // => '105'n */nnn function uniqueId(prefix) {n var id = ++idCounter;n return toString(prefix) + id;n }n /————————————————————————/nn /**n * Adds two numbers.n *n * @staticn * @memberOf _n * @since 3.4.0n * @category Mathn * @param {number} augend The first number in an addition.n * @param {number} addend The second number in an addition.n * @returns {number} Returns the total.n * @examplen *n * _.add(6, 4);n * // => 10n */nnn var add = createMathOperation(function (augend, addend) {n return augend + addend;n }, 0);n /**n * Computes `number` rounded up to `precision`.n *n * @staticn * @memberOf _n * @since 3.10.0n * @category Mathn * @param {number} number The number to round up.n * @param {number} [precision=0] The precision to round up to.n * @returns {number} Returns the rounded up number.n * @examplen *n * _.ceil(4.006);n * // => 5n *n * _.ceil(6.004, 2);n * // => 6.01n *n * _.ceil(6040, -2);n * // => 6100n */nn var ceil = createRound('ceil');n /**n * Divide two numbers.n *n * @staticn * @memberOf _n * @since 4.7.0n * @category Mathn * @param {number} dividend The first number in a division.n * @param {number} divisor The second number in a division.n * @returns {number} Returns the quotient.n * @examplen *n * _.divide(6, 4);n * // => 1.5n */nn var divide = createMathOperation(function (dividend, divisor) {n return dividend / divisor;n }, 1);n /**n * Computes `number` rounded down to `precision`.n *n * @staticn * @memberOf _n * @since 3.10.0n * @category Mathn * @param {number} number The number to round down.n * @param {number} [precision=0] The precision to round down to.n * @returns {number} Returns the rounded down number.n * @examplen *n * _.floor(4.006);n * // => 4n *n * _.floor(0.046, 2);n * // => 0.04n *n * _.floor(4060, -2);n * // => 4000n */nn var floor = createRound('floor');n /**n * Computes the maximum value of `array`. If `array` is empty or falsey,n * `undefined` is returned.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Mathn * @param {Array} array The array to iterate over.n * @returns {*} Returns the maximum value.n * @examplen *n * _.max([4, 2, 8, 6]);n * // => 8n *n * _.max([]);n * // => undefinedn */nn function max(array) {n return array && array.length ? baseExtremum(array, identity, baseGt) : undefined;n }n /**n * This method is like `_.max` except that it accepts `iteratee` which isn * invoked for each element in `array` to generate the criterion by whichn * the value is ranked. The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Mathn * @param {Array} array The array to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {*} Returns the maximum value.n * @examplen *n * var objects = [{ 'n': 1 }, { 'n': 2 }];n *n * _.maxBy(objects, function(o) { return o.n; });n * // => { 'n': 2 }n *n * // The `_.property` iteratee shorthand.n * _.maxBy(objects, 'n');n * // => { 'n': 2 }n */nnn function maxBy(array, iteratee) {n return array && array.length ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) : undefined;n }n /**n * Computes the mean of the values in `array`.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Mathn * @param {Array} array The array to iterate over.n * @returns {number} Returns the mean.n * @examplen *n * _.mean([4, 2, 8, 6]);n * // => 5n */nnn function mean(array) {n return baseMean(array, identity);n }n /**n * This method is like `_.mean` except that it accepts `iteratee` which isn * invoked for each element in `array` to generate the value to be averaged.n * The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.7.0n * @category Mathn * @param {Array} array The array to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {number} Returns the mean.n * @examplen *n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];n *n * _.meanBy(objects, function(o) { return o.n; });n * // => 5n *n * // The `_.property` iteratee shorthand.n * _.meanBy(objects, 'n');n * // => 5n */nnn function meanBy(array, iteratee) {n return baseMean(array, getIteratee(iteratee, 2));n }n /**n * Computes the minimum value of `array`. If `array` is empty or falsey,n * `undefined` is returned.n *n * @staticn * @since 0.1.0n * @memberOf _n * @category Mathn * @param {Array} array The array to iterate over.n * @returns {*} Returns the minimum value.n * @examplen *n * _.min([4, 2, 8, 6]);n * // => 2n *n * _.min([]);n * // => undefinedn */nnn function min(array) {n return array && array.length ? baseExtremum(array, identity, baseLt) : undefined;n }n /**n * This method is like `_.min` except that it accepts `iteratee` which isn * invoked for each element in `array` to generate the criterion by whichn * the value is ranked. The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Mathn * @param {Array} array The array to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {*} Returns the minimum value.n * @examplen *n * var objects = [{ 'n': 1 }, { 'n': 2 }];n *n * _.minBy(objects, function(o) { return o.n; });n * // => { 'n': 1 }n *n * // The `_.property` iteratee shorthand.n * _.minBy(objects, 'n');n * // => { 'n': 1 }n */nnn function minBy(array, iteratee) {n return array && array.length ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) : undefined;n }n /**n * Multiply two numbers.n *n * @staticn * @memberOf _n * @since 4.7.0n * @category Mathn * @param {number} multiplier The first number in a multiplication.n * @param {number} multiplicand The second number in a multiplication.n * @returns {number} Returns the product.n * @examplen *n * _.multiply(6, 4);n * // => 24n */nnn var multiply = createMathOperation(function (multiplier, multiplicand) {n return multiplier * multiplicand;n }, 1);n /**n * Computes `number` rounded to `precision`.n *n * @staticn * @memberOf _n * @since 3.10.0n * @category Mathn * @param {number} number The number to round.n * @param {number} [precision=0] The precision to round to.n * @returns {number} Returns the rounded number.n * @examplen *n * _.round(4.006);n * // => 4n *n * _.round(4.006, 2);n * // => 4.01n *n * _.round(4060, -2);n * // => 4100n */nn var round = createRound('round');n /**n * Subtract two numbers.n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Mathn * @param {number} minuend The first number in a subtraction.n * @param {number} subtrahend The second number in a subtraction.n * @returns {number} Returns the difference.n * @examplen *n * _.subtract(6, 4);n * // => 2n */nn var subtract = createMathOperation(function (minuend, subtrahend) {n return minuend - subtrahend;n }, 0);n /**n * Computes the sum of the values in `array`.n *n * @staticn * @memberOf _n * @since 3.4.0n * @category Mathn * @param {Array} array The array to iterate over.n * @returns {number} Returns the sum.n * @examplen *n * _.sum([4, 2, 8, 6]);n * // => 20n */nn function sum(array) {n return array && array.length ? baseSum(array, identity) : 0;n }n /**n * This method is like `_.sum` except that it accepts `iteratee` which isn * invoked for each element in `array` to generate the value to be summed.n * The iteratee is invoked with one argument: (value).n *n * @staticn * @memberOf _n * @since 4.0.0n * @category Mathn * @param {Array} array The array to iterate over.n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.n * @returns {number} Returns the sum.n * @examplen *n * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];n *n * _.sumBy(objects, function(o) { return o.n; });n * // => 20n *n * // The `_.property` iteratee shorthand.n * _.sumBy(objects, 'n');n * // => 20n */nnn function sumBy(array, iteratee) {n return array && array.length ? baseSum(array, getIteratee(iteratee, 2)) : 0;n }n /————————————————————————/n // Add methods that return wrapped values in chain sequences.nnn lodash.after = after;n lodash.ary = ary;n lodash.assign = assign;n lodash.assignIn = assignIn;n lodash.assignInWith = assignInWith;n lodash.assignWith = assignWith;n lodash.at = at;n lodash.before = before;n lodash.bind = bind;n lodash.bindAll = bindAll;n lodash.bindKey = bindKey;n lodash.castArray = castArray;n lodash.chain = chain;n lodash.chunk = chunk;n lodash.compact = compact;n lodash.concat = concat;n lodash.cond = cond;n lodash.conforms = conforms;n lodash.constant = constant;n lodash.countBy = countBy;n lodash.create = create;n lodash.curry = curry;n lodash.curryRight = curryRight;n lodash.debounce = debounce;n lodash.defaults = defaults;n lodash.defaultsDeep = defaultsDeep;n lodash.defer = defer;n lodash.delay = delay;n lodash.difference = difference;n lodash.differenceBy = differenceBy;n lodash.differenceWith = differenceWith;n lodash.drop = drop;n lodash.dropRight = dropRight;n lodash.dropRightWhile = dropRightWhile;n lodash.dropWhile = dropWhile;n lodash.fill = fill;n lodash.filter = filter;n lodash.flatMap = flatMap;n lodash.flatMapDeep = flatMapDeep;n lodash.flatMapDepth = flatMapDepth;n lodash.flatten = flatten;n lodash.flattenDeep = flattenDeep;n lodash.flattenDepth = flattenDepth;n lodash.flip = flip;n lodash.flow = flow;n lodash.flowRight = flowRight;n lodash.fromPairs = fromPairs;n lodash.functions = functions;n lodash.functionsIn = functionsIn;n lodash.groupBy = groupBy;n lodash.initial = initial;n lodash.intersection = intersection;n lodash.intersectionBy = intersectionBy;n lodash.intersectionWith = intersectionWith;n lodash.invert = invert;n lodash.invertBy = invertBy;n lodash.invokeMap = invokeMap;n lodash.iteratee = iteratee;n lodash.keyBy = keyBy;n lodash.keys = keys;n lodash.keysIn = keysIn;n lodash.map = map;n lodash.mapKeys = mapKeys;n lodash.mapValues = mapValues;n lodash.matches = matches;n lodash.matchesProperty = matchesProperty;n lodash.memoize = memoize;n lodash.merge = merge;n lodash.mergeWith = mergeWith;n lodash.method = method;n lodash.methodOf = methodOf;n lodash.mixin = mixin;n lodash.negate = negate;n lodash.nthArg = nthArg;n lodash.omit = omit;n lodash.omitBy = omitBy;n lodash.once = once;n lodash.orderBy = orderBy;n lodash.over = over;n lodash.overArgs = overArgs;n lodash.overEvery = overEvery;n lodash.overSome = overSome;n lodash.partial = partial;n lodash.partialRight = partialRight;n lodash.partition = partition;n lodash.pick = pick;n lodash.pickBy = pickBy;n lodash.property = property;n lodash.propertyOf = propertyOf;n lodash.pull = pull;n lodash.pullAll = pullAll;n lodash.pullAllBy = pullAllBy;n lodash.pullAllWith = pullAllWith;n lodash.pullAt = pullAt;n lodash.range = range;n lodash.rangeRight = rangeRight;n lodash.rearg = rearg;n lodash.reject = reject;n lodash.remove = remove;n lodash.rest = rest;n lodash.reverse = reverse;n lodash.sampleSize = sampleSize;n lodash.set = set;n lodash.setWith = setWith;n lodash.shuffle = shuffle;n lodash.slice = slice;n lodash.sortBy = sortBy;n lodash.sortedUniq = sortedUniq;n lodash.sortedUniqBy = sortedUniqBy;n lodash.split = split;n lodash.spread = spread;n lodash.tail = tail;n lodash.take = take;n lodash.takeRight = takeRight;n lodash.takeRightWhile = takeRightWhile;n lodash.takeWhile = takeWhile;n lodash.tap = tap;n lodash.throttle = throttle;n lodash.thru = thru;n lodash.toArray = toArray;n lodash.toPairs = toPairs;n lodash.toPairsIn = toPairsIn;n lodash.toPath = toPath;n lodash.toPlainObject = toPlainObject;n lodash.transform = transform;n lodash.unary = unary;n lodash.union = union;n lodash.unionBy = unionBy;n lodash.unionWith = unionWith;n lodash.uniq = uniq;n lodash.uniqBy = uniqBy;n lodash.uniqWith = uniqWith;n lodash.unset = unset;n lodash.unzip = unzip;n lodash.unzipWith = unzipWith;n lodash.update = update;n lodash.updateWith = updateWith;n lodash.values = values;n lodash.valuesIn = valuesIn;n lodash.without = without;n lodash.words = words;n lodash.wrap = wrap;n lodash.xor = xor;n lodash.xorBy = xorBy;n lodash.xorWith = xorWith;n lodash.zip = zip;n lodash.zipObject = zipObject;n lodash.zipObjectDeep = zipObjectDeep;n lodash.zipWith = zipWith; // Add aliases.nn lodash.entries = toPairs;n lodash.entriesIn = toPairsIn;n lodash.extend = assignIn;n lodash.extendWith = assignInWith; // Add methods to `lodash.prototype`.nn mixin(lodash, lodash);n /————————————————————————/n // Add methods that return unwrapped values in chain sequences.nn lodash.add = add;n lodash.attempt = attempt;n lodash.camelCase = camelCase;n lodash.capitalize = capitalize;n lodash.ceil = ceil;n lodash.clamp = clamp;n lodash.clone = clone;n lodash.cloneDeep = cloneDeep;n lodash.cloneDeepWith = cloneDeepWith;n lodash.cloneWith = cloneWith;n lodash.conformsTo = conformsTo;n lodash.deburr = deburr;n lodash.defaultTo = defaultTo;n lodash.divide = divide;n lodash.endsWith = endsWith;n lodash.eq = eq;n lodash.escape = escape;n lodash.escapeRegExp = escapeRegExp;n lodash.every = every;n lodash.find = find;n lodash.findIndex = findIndex;n lodash.findKey = findKey;n lodash.findLast = findLast;n lodash.findLastIndex = findLastIndex;n lodash.findLastKey = findLastKey;n lodash.floor = floor;n lodash.forEach = forEach;n lodash.forEachRight = forEachRight;n lodash.forIn = forIn;n lodash.forInRight = forInRight;n lodash.forOwn = forOwn;n lodash.forOwnRight = forOwnRight;n lodash.get = get;n lodash.gt = gt;n lodash.gte = gte;n lodash.has = has;n lodash.hasIn = hasIn;n lodash.head = head;n lodash.identity = identity;n lodash.includes = includes;n lodash.indexOf = indexOf;n lodash.inRange = inRange;n lodash.invoke = invoke;n lodash.isArguments = isArguments;n lodash.isArray = isArray;n lodash.isArrayBuffer = isArrayBuffer;n lodash.isArrayLike = isArrayLike;n lodash.isArrayLikeObject = isArrayLikeObject;n lodash.isBoolean = isBoolean;n lodash.isBuffer = isBuffer;n lodash.isDate = isDate;n lodash.isElement = isElement;n lodash.isEmpty = isEmpty;n lodash.isEqual = isEqual;n lodash.isEqualWith = isEqualWith;n lodash.isError = isError;n lodash.isFinite = isFinite;n lodash.isFunction = isFunction;n lodash.isInteger = isInteger;n lodash.isLength = isLength;n lodash.isMap = isMap;n lodash.isMatch = isMatch;n lodash.isMatchWith = isMatchWith;n lodash.isNaN = isNaN;n lodash.isNative = isNative;n lodash.isNil = isNil;n lodash.isNull = isNull;n lodash.isNumber = isNumber;n lodash.isObject = isObject;n lodash.isObjectLike = isObjectLike;n lodash.isPlainObject = isPlainObject;n lodash.isRegExp = isRegExp;n lodash.isSafeInteger = isSafeInteger;n lodash.isSet = isSet;n lodash.isString = isString;n lodash.isSymbol = isSymbol;n lodash.isTypedArray = isTypedArray;n lodash.isUndefined = isUndefined;n lodash.isWeakMap = isWeakMap;n lodash.isWeakSet = isWeakSet;n lodash.join = join;n lodash.kebabCase = kebabCase;n lodash.last = last;n lodash.lastIndexOf = lastIndexOf;n lodash.lowerCase = lowerCase;n lodash.lowerFirst = lowerFirst;n lodash.lt = lt;n lodash.lte = lte;n lodash.max = max;n lodash.maxBy = maxBy;n lodash.mean = mean;n lodash.meanBy = meanBy;n lodash.min = min;n lodash.minBy = minBy;n lodash.stubArray = stubArray;n lodash.stubFalse = stubFalse;n lodash.stubObject = stubObject;n lodash.stubString = stubString;n lodash.stubTrue = stubTrue;n lodash.multiply = multiply;n lodash.nth = nth;n lodash.noConflict = noConflict;n lodash.noop = noop;n lodash.now = now;n lodash.pad = pad;n lodash.padEnd = padEnd;n lodash.padStart = padStart;n lodash.parseInt = parseInt;n lodash.random = random;n lodash.reduce = reduce;n lodash.reduceRight = reduceRight;n lodash.repeat = repeat;n lodash.replace = replace;n lodash.result = result;n lodash.round = round;n lodash.runInContext = runInContext;n lodash.sample = sample;n lodash.size = size;n lodash.snakeCase = snakeCase;n lodash.some = some;n lodash.sortedIndex = sortedIndex;n lodash.sortedIndexBy = sortedIndexBy;n lodash.sortedIndexOf = sortedIndexOf;n lodash.sortedLastIndex = sortedLastIndex;n lodash.sortedLastIndexBy = sortedLastIndexBy;n lodash.sortedLastIndexOf = sortedLastIndexOf;n lodash.startCase = startCase;n lodash.startsWith = startsWith;n lodash.subtract = subtract;n lodash.sum = sum;n lodash.sumBy = sumBy;n lodash.template = template;n lodash.times = times;n lodash.toFinite = toFinite;n lodash.toInteger = toInteger;n lodash.toLength = toLength;n lodash.toLower = toLower;n lodash.toNumber = toNumber;n lodash.toSafeInteger = toSafeInteger;n lodash.toString = toString;n lodash.toUpper = toUpper;n lodash.trim = trim;n lodash.trimEnd = trimEnd;n lodash.trimStart = trimStart;n lodash.truncate = truncate;n lodash.unescape = unescape;n lodash.uniqueId = uniqueId;n lodash.upperCase = upperCase;n lodash.upperFirst = upperFirst; // Add aliases.nn lodash.each = forEach;n lodash.eachRight = forEachRight;n lodash.first = head;n mixin(lodash, function () {n var source = {};n baseForOwn(lodash, function (func, methodName) {n if (!hasOwnProperty.call(lodash.prototype, methodName)) {n source = func;n }n });n return source;n }(), {n 'chain': falsen });n /————————————————————————/nn /**n * The semantic version number.n *n * @staticn * @memberOf _n * @type {string}n */nn lodash.VERSION = VERSION; // Assign default placeholders.nn arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function (methodName) {n lodash.placeholder = lodash;n }); // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.nn arrayEach(['drop', 'take'], function (methodName, index) {n LazyWrapper.prototype = function (n) {n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);n var result = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();nn if (result.__filtered__) {n result.__takeCount__ = nativeMin(n, result.__takeCount__);n } else {n result.__views__.push({n 'size': nativeMin(n, MAX_ARRAY_LENGTH),n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')n });n }nn return result;n };nn LazyWrapper.prototype[methodName + 'Right'] = function (n) {n return this.reverse()(n).reverse();n };n }); // Add `LazyWrapper` methods that accept an `iteratee` value.nn arrayEach(['filter', 'map', 'takeWhile'], function (methodName, index) {n var type = index + 1,n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;nn LazyWrapper.prototype = function (iteratee) {n var result = this.clone();nn result.__iteratees__.push({n 'iteratee': getIteratee(iteratee, 3),n 'type': typen });nn result.__filtered__ = result.__filtered__ || isFilter;n return result;n };n }); // Add `LazyWrapper` methods for `_.head` and `_.last`.nn arrayEach(['head', 'last'], function (methodName, index) {n var takeName = 'take' + (index ? 'Right' : '');nn LazyWrapper.prototype = function () {n return this(1).value();n };n }); // Add `LazyWrapper` methods for `_.initial` and `_.tail`.nn arrayEach(['initial', 'tail'], function (methodName, index) {n var dropName = 'drop' + (index ? '' : 'Right');nn LazyWrapper.prototype = function () {n return this.__filtered__ ? new LazyWrapper(this) : this(1);n };n });nn LazyWrapper.prototype.compact = function () {n return this.filter(identity);n };nn LazyWrapper.prototype.find = function (predicate) {n return this.filter(predicate).head();n };nn LazyWrapper.prototype.findLast = function (predicate) {n return this.reverse().find(predicate);n };nn LazyWrapper.prototype.invokeMap = baseRest(function (path, args) {n if (typeof path == 'function') {n return new LazyWrapper(this);n }nn return this.map(function (value) {n return baseInvoke(value, path, args);n });n });nn LazyWrapper.prototype.reject = function (predicate) {n return this.filter(negate(getIteratee(predicate)));n };nn LazyWrapper.prototype.slice = function (start, end) {n start = toInteger(start);n var result = this;nn if (result.__filtered__ && (start > 0 || end < 0)) {n return new LazyWrapper(result);n }nn if (start < 0) {n result = result.takeRight(-start);n } else if (start) {n result = result.drop(start);n }nn if (end !== undefined) {n end = toInteger(end);n result = end < 0 ? result.dropRight(-end) : result.take(end - start);n }nn return result;n };nn LazyWrapper.prototype.takeRightWhile = function (predicate) {n return this.reverse().takeWhile(predicate).reverse();n };nn LazyWrapper.prototype.toArray = function () {n return this.take(MAX_ARRAY_LENGTH);n }; // Add `LazyWrapper` methods to `lodash.prototype`.nnn baseForOwn(LazyWrapper.prototype, function (func, methodName) {n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),n isTaker = /^(?:head|last)$/.test(methodName),n lodashFunc = lodash[isTaker ? 'take' + (methodName == 'last' ? 'Right' : '') : methodName],n retUnwrapped = isTaker || /^find/.test(methodName);nn if (!lodashFunc) {n return;n }nn lodash.prototype = function () {n var value = this.__wrapped__,n args = isTaker ? [1] : arguments,n isLazy = value instanceof LazyWrapper,n iteratee = args,n useLazy = isLazy || isArray(value);nn var interceptor = function interceptor(value) {n var result = lodashFunc.apply(lodash, arrayPush(, args));n return isTaker && chainAll ? result : result;n };nn if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {n // Avoid lazy use if the iteratee has a "length" value other than `1`.n isLazy = useLazy = false;n }nn var chainAll = this.__chain__,n isHybrid = !!this.__actions__.length,n isUnwrapped = retUnwrapped && !chainAll,n onlyLazy = isLazy && !isHybrid;nn if (!retUnwrapped && useLazy) {n value = onlyLazy ? value : new LazyWrapper(this);n var result = func.apply(value, args);nn result.__actions__.push({n 'func': thru,n 'args': [interceptor],n 'thisArg': undefinedn });nn return new LodashWrapper(result, chainAll);n }nn if (isUnwrapped && onlyLazy) {n return func.apply(this, args);n }nn result = this.thru(interceptor);n return isUnwrapped ? isTaker ? result.value() : result.value() : result;n };n }); // Add `Array` methods to `lodash.prototype`.nn arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function (methodName) {n var func = arrayProto,n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',n retUnwrapped = /^(?:pop|shift)$/.test(methodName);nn lodash.prototype = function () {n var args = arguments;nn if (retUnwrapped && !this.__chain__) {n var value = this.value();n return func.apply(isArray(value) ? value : [], args);n }nn return this(function (value) {n return func.apply(isArray(value) ? value : [], args);n });n };n }); // Map minified method names to their real names.nn baseForOwn(LazyWrapper.prototype, function (func, methodName) {n var lodashFunc = lodash;nn if (lodashFunc) {n var key = lodashFunc.name + '';nn if (!hasOwnProperty.call(realNames, key)) {n realNames = [];n }nn realNames.push({n 'name': methodName,n 'func': lodashFuncn });n }n });n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{n 'name': 'wrapper',n 'func': undefinedn }]; // Add methods to `LazyWrapper`.nn LazyWrapper.prototype.clone = lazyClone;n LazyWrapper.prototype.reverse = lazyReverse;n LazyWrapper.prototype.value = lazyValue; // Add chain sequence methods to the `lodash` wrapper.nn lodash.prototype.at = wrapperAt;n lodash.prototype.chain = wrapperChain;n lodash.prototype.commit = wrapperCommit;n lodash.prototype.next = wrapperNext;n lodash.prototype.plant = wrapperPlant;n lodash.prototype.reverse = wrapperReverse;n lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; // Add lazy aliases.nn lodash.prototype.first = lodash.prototype.head;nn if (symIterator) {n lodash.prototype = wrapperToIterator;n }nn return lodash;n };n /————————————————————————–/n // Export lodash.nnn var _ = runInContext(); // Some AMD build optimizers, like r.js, check for condition patterns like:nnn if (typeof define == 'function' && _typeof(define.amd) == 'object' && define.amd) {n // Expose Lodash on the global object to prevent errors when Lodash isn // loaded by a script tag in the presence of an AMD loader.n // See requirejs.org/docs/errors.html#mismatch for more details.n // Use `_.noConflict` to remove Lodash from the global object.n root._ = _; // Define as an anonymous module so, through path mapping, it can ben // referenced as the "underscore" module.nn define(function () {n return _;n });n } // Check for `exports` after `define` in case a build optimizer adds it.n else if (freeModule) {n // Export for Node.js.n (freeModule.exports = _)._ = _; // Export for CommonJS support.nn freeExports._ = _;n } else {n // Export to the global object.n root._ = _;n }n}).call(this);”,“map”:null,“metadata”:{},“sourceType”:“module”}