' + func(text) + '
'; -// * }); -// * -// * p('fred, barney, & pebbles'); -// * // => 'fred, barney, & pebbles
' -// */function wrap(value,wrapper){return partial(castFunction(wrapper),value);}/*------------------------------------------------------------------------*/ /** -// * Casts `value` as an array if it's not one. -// * -// * @static -// * @memberOf _ -// * @since 4.4.0 -// * @category Lang -// * @param {*} value The value to inspect. -// * @returns {Array} Returns the cast array. -// * @example -// * -// * _.castArray(1); -// * // => [1] -// * -// * _.castArray({ 'a': 1 }); -// * // => [{ 'a': 1 }] -// * -// * _.castArray('abc'); -// * // => ['abc'] -// * -// * _.castArray(null); -// * // => [null] -// * -// * _.castArray(undefined); -// * // => [undefined] -// * -// * _.castArray(); -// * // => [] -// * -// * var array = [1, 2, 3]; -// * console.log(_.castArray(array) === array); -// * // => true -// */function castArray(){if(!arguments.length){return [];}var value=arguments[0];return isArray(value)?value:[value];}/** -// * Creates a shallow clone of `value`. -// * -// * **Note:** This method is loosely based on the -// * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) -// * and supports cloning arrays, array buffers, booleans, date objects, maps, -// * numbers, `Object` objects, regexes, sets, strings, symbols, and typed -// * arrays. The own enumerable properties of `arguments` objects are cloned -// * as plain objects. An empty object is returned for uncloneable values such -// * as error objects, functions, DOM nodes, and WeakMaps. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to clone. -// * @returns {*} Returns the cloned value. -// * @see _.cloneDeep -// * @example -// * -// * var objects = [{ 'a': 1 }, { 'b': 2 }]; -// * -// * var shallow = _.clone(objects); -// * console.log(shallow[0] === objects[0]); -// * // => true -// */function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG);}/** -// * This method is like `_.clone` except that it accepts `customizer` which -// * is invoked to produce the cloned value. If `customizer` returns `undefined`, -// * cloning is handled by the method instead. The `customizer` is invoked with -// * up to four arguments; (value [, index|key, object, stack]). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to clone. -// * @param {Function} [customizer] The function to customize cloning. -// * @returns {*} Returns the cloned value. -// * @see _.cloneDeepWith -// * @example -// * -// * function customizer(value) { -// * if (_.isElement(value)) { -// * return value.cloneNode(false); -// * } -// * } -// * -// * var el = _.cloneWith(document.body, customizer); -// * -// * console.log(el === document.body); -// * // => false -// * console.log(el.nodeName); -// * // => 'BODY' -// * console.log(el.childNodes.length); -// * // => 0 -// */function cloneWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return baseClone(value,CLONE_SYMBOLS_FLAG,customizer);}/** -// * This method is like `_.clone` except that it recursively clones `value`. -// * -// * @static -// * @memberOf _ -// * @since 1.0.0 -// * @category Lang -// * @param {*} value The value to recursively clone. -// * @returns {*} Returns the deep cloned value. -// * @see _.clone -// * @example -// * -// * var objects = [{ 'a': 1 }, { 'b': 2 }]; -// * -// * var deep = _.cloneDeep(objects); -// * console.log(deep[0] === objects[0]); -// * // => false -// */function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG);}/** -// * This method is like `_.cloneWith` except that it recursively clones `value`. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to recursively clone. -// * @param {Function} [customizer] The function to customize cloning. -// * @returns {*} Returns the deep cloned value. -// * @see _.cloneWith -// * @example -// * -// * function customizer(value) { -// * if (_.isElement(value)) { -// * return value.cloneNode(true); -// * } -// * } -// * -// * var el = _.cloneDeepWith(document.body, customizer); -// * -// * console.log(el === document.body); -// * // => false -// * console.log(el.nodeName); -// * // => 'BODY' -// * console.log(el.childNodes.length); -// * // => 20 -// */function cloneDeepWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer);}/** -// * Checks if `object` conforms to `source` by invoking the predicate -// * properties of `source` with the corresponding property values of `object`. -// * -// * **Note:** This method is equivalent to `_.conforms` when `source` is -// * partially applied. -// * -// * @static -// * @memberOf _ -// * @since 4.14.0 -// * @category Lang -// * @param {Object} object The object to inspect. -// * @param {Object} source The object of property predicates to conform to. -// * @returns {boolean} Returns `true` if `object` conforms, else `false`. -// * @example -// * -// * var object = { 'a': 1, 'b': 2 }; -// * -// * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); -// * // => true -// * -// * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); -// * // => false -// */function conformsTo(object,source){return source==null||baseConformsTo(object,source,keys(source));}/** -// * Performs a -// * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) -// * comparison between two values to determine if they are equivalent. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @returns {boolean} Returns `true` if the values are equivalent, else `false`. -// * @example -// * -// * var object = { 'a': 1 }; -// * var other = { 'a': 1 }; -// * -// * _.eq(object, object); -// * // => true -// * -// * _.eq(object, other); -// * // => false -// * -// * _.eq('a', 'a'); -// * // => true -// * -// * _.eq('a', Object('a')); -// * // => false -// * -// * _.eq(NaN, NaN); -// * // => true -// */function eq(value,other){return value===other||value!==value&&other!==other;}/** -// * Checks if `value` is greater than `other`. -// * -// * @static -// * @memberOf _ -// * @since 3.9.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @returns {boolean} Returns `true` if `value` is greater than `other`, -// * else `false`. -// * @see _.lt -// * @example -// * -// * _.gt(3, 1); -// * // => true -// * -// * _.gt(3, 3); -// * // => false -// * -// * _.gt(1, 3); -// * // => false -// */var gt=createRelationalOperation(baseGt);/** -// * Checks if `value` is greater than or equal to `other`. -// * -// * @static -// * @memberOf _ -// * @since 3.9.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @returns {boolean} Returns `true` if `value` is greater than or equal to -// * `other`, else `false`. -// * @see _.lte -// * @example -// * -// * _.gte(3, 1); -// * // => true -// * -// * _.gte(3, 3); -// * // => true -// * -// * _.gte(1, 3); -// * // => false -// */var gte=createRelationalOperation(function(value,other){return value>=other;});/** -// * Checks if `value` is likely an `arguments` object. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an `arguments` object, -// * else `false`. -// * @example -// * -// * _.isArguments(function() { return arguments; }()); -// * // => true -// * -// * _.isArguments([1, 2, 3]); -// * // => false -// */var isArguments=baseIsArguments(function(){return arguments;}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,'callee')&&!propertyIsEnumerable.call(value,'callee');};/** -// * Checks if `value` is classified as an `Array` object. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an array, else `false`. -// * @example -// * -// * _.isArray([1, 2, 3]); -// * // => true -// * -// * _.isArray(document.body.children); -// * // => false -// * -// * _.isArray('abc'); -// * // => false -// * -// * _.isArray(_.noop); -// * // => false -// */var isArray=Array.isArray;/** -// * Checks if `value` is classified as an `ArrayBuffer` object. -// * -// * @static -// * @memberOf _ -// * @since 4.3.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. -// * @example -// * -// * _.isArrayBuffer(new ArrayBuffer(2)); -// * // => true -// * -// * _.isArrayBuffer(new Array(2)); -// * // => false -// */var isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):baseIsArrayBuffer;/** -// * Checks if `value` is array-like. A value is considered array-like if it's -// * not a function and has a `value.length` that's an integer greater than or -// * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is array-like, else `false`. -// * @example -// * -// * _.isArrayLike([1, 2, 3]); -// * // => true -// * -// * _.isArrayLike(document.body.children); -// * // => true -// * -// * _.isArrayLike('abc'); -// * // => true -// * -// * _.isArrayLike(_.noop); -// * // => false -// */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value);}/** -// * This method is like `_.isArrayLike` except that it also checks if `value` -// * is an object. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an array-like object, -// * else `false`. -// * @example -// * -// * _.isArrayLikeObject([1, 2, 3]); -// * // => true -// * -// * _.isArrayLikeObject(document.body.children); -// * // => true -// * -// * _.isArrayLikeObject('abc'); -// * // => false -// * -// * _.isArrayLikeObject(_.noop); -// * // => false -// */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value);}/** -// * Checks if `value` is classified as a boolean primitive or object. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. -// * @example -// * -// * _.isBoolean(false); -// * // => true -// * -// * _.isBoolean(null); -// * // => false -// */function isBoolean(value){return value===true||value===false||isObjectLike(value)&&baseGetTag(value)==boolTag;}/** -// * Checks if `value` is a buffer. -// * -// * @static -// * @memberOf _ -// * @since 4.3.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. -// * @example -// * -// * _.isBuffer(new Buffer(2)); -// * // => true -// * -// * _.isBuffer(new Uint8Array(2)); -// * // => false -// */var isBuffer=nativeIsBuffer||stubFalse;/** -// * Checks if `value` is classified as a `Date` object. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a date object, else `false`. -// * @example -// * -// * _.isDate(new Date); -// * // => true -// * -// * _.isDate('Mon April 23 2012'); -// * // => false -// */var isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate;/** -// * Checks if `value` is likely a DOM element. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. -// * @example -// * -// * _.isElement(document.body); -// * // => true -// * -// * _.isElement(''); -// * // => false -// */function isElement(value){return isObjectLike(value)&&value.nodeType===1&&!isPlainObject(value);}/** -// * Checks if `value` is an empty object, collection, map, or set. -// * -// * Objects are considered empty if they have no own enumerable string keyed -// * properties. -// * -// * Array-like values such as `arguments` objects, arrays, buffers, strings, or -// * jQuery-like collections are considered empty if they have a `length` of `0`. -// * Similarly, maps and sets are considered empty if they have a `size` of `0`. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is empty, else `false`. -// * @example -// * -// * _.isEmpty(null); -// * // => true -// * -// * _.isEmpty(true); -// * // => true -// * -// * _.isEmpty(1); -// * // => true -// * -// * _.isEmpty([1, 2, 3]); -// * // => false -// * -// * _.isEmpty({ 'a': 1 }); -// * // => false -// */function isEmpty(value){if(value==null){return true;}if(isArrayLike(value)&&(isArray(value)||typeof value=='string'||typeof value.splice=='function'||isBuffer(value)||isTypedArray(value)||isArguments(value))){return !value.length;}var tag=getTag(value);if(tag==mapTag||tag==setTag){return !value.size;}if(isPrototype(value)){return !baseKeys(value).length;}for(var key in value){if(hasOwnProperty.call(value,key)){return false;}}return true;}/** -// * Performs a deep comparison between two values to determine if they are -// * equivalent. -// * -// * **Note:** This method supports comparing arrays, array buffers, booleans, -// * date objects, error objects, maps, numbers, `Object` objects, regexes, -// * sets, strings, symbols, and typed arrays. `Object` objects are compared -// * by their own, not inherited, enumerable properties. Functions and DOM -// * nodes are compared by strict equality, i.e. `===`. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @returns {boolean} Returns `true` if the values are equivalent, else `false`. -// * @example -// * -// * var object = { 'a': 1 }; -// * var other = { 'a': 1 }; -// * -// * _.isEqual(object, other); -// * // => true -// * -// * object === other; -// * // => false -// */function isEqual(value,other){return baseIsEqual(value,other);}/** -// * This method is like `_.isEqual` except that it accepts `customizer` which -// * is invoked to compare values. If `customizer` returns `undefined`, comparisons -// * are handled by the method instead. The `customizer` is invoked with up to -// * six arguments: (objValue, othValue [, index|key, object, other, stack]). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @param {Function} [customizer] The function to customize comparisons. -// * @returns {boolean} Returns `true` if the values are equivalent, else `false`. -// * @example -// * -// * function isGreeting(value) { -// * return /^h(?:i|ello)$/.test(value); -// * } -// * -// * function customizer(objValue, othValue) { -// * if (isGreeting(objValue) && isGreeting(othValue)) { -// * return true; -// * } -// * } -// * -// * var array = ['hello', 'goodbye']; -// * var other = ['hi', 'goodbye']; -// * -// * _.isEqualWith(array, other, customizer); -// * // => true -// */function isEqualWith(value,other,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;var result=customizer?customizer(value,other):undefined$1;return result===undefined$1?baseIsEqual(value,other,undefined$1,customizer):!!result;}/** -// * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, -// * `SyntaxError`, `TypeError`, or `URIError` object. -// * -// * @static -// * @memberOf _ -// * @since 3.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an error object, else `false`. -// * @example -// * -// * _.isError(new Error); -// * // => true -// * -// * _.isError(Error); -// * // => false -// */function isError(value){if(!isObjectLike(value)){return false;}var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||typeof value.message=='string'&&typeof value.name=='string'&&!isPlainObject(value);}/** -// * Checks if `value` is a finite primitive number. -// * -// * **Note:** This method is based on -// * [`Number.isFinite`](https://mdn.io/Number/isFinite). -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. -// * @example -// * -// * _.isFinite(3); -// * // => true -// * -// * _.isFinite(Number.MIN_VALUE); -// * // => true -// * -// * _.isFinite(Infinity); -// * // => false -// * -// * _.isFinite('3'); -// * // => false -// */function isFinite(value){return typeof value=='number'&&nativeIsFinite(value);}/** -// * Checks if `value` is classified as a `Function` object. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a function, else `false`. -// * @example -// * -// * _.isFunction(_); -// * // => true -// * -// * _.isFunction(/abc/); -// * // => false -// */function isFunction(value){if(!isObject(value)){return false;}// The use of `Object#toString` avoids issues with the `typeof` operator -// // in Safari 9 which returns 'object' for typed arrays and other constructors. -// var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag;}/** -// * Checks if `value` is an integer. -// * -// * **Note:** This method is based on -// * [`Number.isInteger`](https://mdn.io/Number/isInteger). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an integer, else `false`. -// * @example -// * -// * _.isInteger(3); -// * // => true -// * -// * _.isInteger(Number.MIN_VALUE); -// * // => false -// * -// * _.isInteger(Infinity); -// * // => false -// * -// * _.isInteger('3'); -// * // => false -// */function isInteger(value){return typeof value=='number'&&value==toInteger(value);}/** -// * Checks if `value` is a valid array-like length. -// * -// * **Note:** This method is loosely based on -// * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. -// * @example -// * -// * _.isLength(3); -// * // => true -// * -// * _.isLength(Number.MIN_VALUE); -// * // => false -// * -// * _.isLength(Infinity); -// * // => false -// * -// * _.isLength('3'); -// * // => false -// */function isLength(value){return typeof value=='number'&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER;}/** -// * Checks if `value` is the -// * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) -// * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is an object, else `false`. -// * @example -// * -// * _.isObject({}); -// * // => true -// * -// * _.isObject([1, 2, 3]); -// * // => true -// * -// * _.isObject(_.noop); -// * // => true -// * -// * _.isObject(null); -// * // => false -// */function isObject(value){var type=typeof value;return value!=null&&(type=='object'||type=='function');}/** -// * Checks if `value` is object-like. A value is object-like if it's not `null` -// * and has a `typeof` result of "object". -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is object-like, else `false`. -// * @example -// * -// * _.isObjectLike({}); -// * // => true -// * -// * _.isObjectLike([1, 2, 3]); -// * // => true -// * -// * _.isObjectLike(_.noop); -// * // => false -// * -// * _.isObjectLike(null); -// * // => false -// */function isObjectLike(value){return value!=null&&typeof value=='object';}/** -// * Checks if `value` is classified as a `Map` object. -// * -// * @static -// * @memberOf _ -// * @since 4.3.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a map, else `false`. -// * @example -// * -// * _.isMap(new Map); -// * // => true -// * -// * _.isMap(new WeakMap); -// * // => false -// */var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;/** -// * Performs a partial deep comparison between `object` and `source` to -// * determine if `object` contains equivalent property values. -// * -// * **Note:** This method is equivalent to `_.matches` when `source` is -// * partially applied. -// * -// * Partial comparisons will match empty array and empty object `source` -// * values against any array or object value, respectively. See `_.isEqual` -// * for a list of supported value comparisons. -// * -// * @static -// * @memberOf _ -// * @since 3.0.0 -// * @category Lang -// * @param {Object} object The object to inspect. -// * @param {Object} source The object of property values to match. -// * @returns {boolean} Returns `true` if `object` is a match, else `false`. -// * @example -// * -// * var object = { 'a': 1, 'b': 2 }; -// * -// * _.isMatch(object, { 'b': 2 }); -// * // => true -// * -// * _.isMatch(object, { 'b': 1 }); -// * // => false -// */function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source));}/** -// * This method is like `_.isMatch` except that it accepts `customizer` which -// * is invoked to compare values. If `customizer` returns `undefined`, comparisons -// * are handled by the method instead. The `customizer` is invoked with five -// * arguments: (objValue, srcValue, index|key, object, source). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {Object} object The object to inspect. -// * @param {Object} source The object of property values to match. -// * @param {Function} [customizer] The function to customize comparisons. -// * @returns {boolean} Returns `true` if `object` is a match, else `false`. -// * @example -// * -// * function isGreeting(value) { -// * return /^h(?:i|ello)$/.test(value); -// * } -// * -// * function customizer(objValue, srcValue) { -// * if (isGreeting(objValue) && isGreeting(srcValue)) { -// * return true; -// * } -// * } -// * -// * var object = { 'greeting': 'hello' }; -// * var source = { 'greeting': 'hi' }; -// * -// * _.isMatchWith(object, source, customizer); -// * // => true -// */function isMatchWith(object,source,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return baseIsMatch(object,source,getMatchData(source),customizer);}/** -// * Checks if `value` is `NaN`. -// * -// * **Note:** This method is based on -// * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as -// * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for -// * `undefined` and other non-number values. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. -// * @example -// * -// * _.isNaN(NaN); -// * // => true -// * -// * _.isNaN(new Number(NaN)); -// * // => true -// * -// * isNaN(undefined); -// * // => true -// * -// * _.isNaN(undefined); -// * // => false -// */function isNaN(value){// An `NaN` primitive is the only value that is not equal to itself. -// // Perform the `toStringTag` check first to avoid errors with some -// // ActiveX objects in IE. -// return isNumber(value)&&value!=+value;}/** -// * Checks if `value` is a pristine native function. -// * -// * **Note:** This method can't reliably detect native functions in the presence -// * of the core-js package because core-js circumvents this kind of detection. -// * Despite multiple requests, the core-js maintainer has made it clear: any -// * attempt to fix the detection will be obstructed. As a result, we're left -// * with little choice but to throw an error. Unfortunately, this also affects -// * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), -// * which rely on core-js. -// * -// * @static -// * @memberOf _ -// * @since 3.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a native function, -// * else `false`. -// * @example -// * -// * _.isNative(Array.prototype.push); -// * // => true -// * -// * _.isNative(_); -// * // => false -// */function isNative(value){if(isMaskable(value)){throw new Error(CORE_ERROR_TEXT);}return baseIsNative(value);}/** -// * Checks if `value` is `null`. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is `null`, else `false`. -// * @example -// * -// * _.isNull(null); -// * // => true -// * -// * _.isNull(void 0); -// * // => false -// */function isNull(value){return value===null;}/** -// * Checks if `value` is `null` or `undefined`. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is nullish, else `false`. -// * @example -// * -// * _.isNil(null); -// * // => true -// * -// * _.isNil(void 0); -// * // => true -// * -// * _.isNil(NaN); -// * // => false -// */function isNil(value){return value==null;}/** -// * Checks if `value` is classified as a `Number` primitive or object. -// * -// * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are -// * classified as numbers, use the `_.isFinite` method. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a number, else `false`. -// * @example -// * -// * _.isNumber(3); -// * // => true -// * -// * _.isNumber(Number.MIN_VALUE); -// * // => true -// * -// * _.isNumber(Infinity); -// * // => true -// * -// * _.isNumber('3'); -// * // => false -// */function isNumber(value){return typeof value=='number'||isObjectLike(value)&&baseGetTag(value)==numberTag;}/** -// * Checks if `value` is a plain object, that is, an object created by the -// * `Object` constructor or one with a `[[Prototype]]` of `null`. -// * -// * @static -// * @memberOf _ -// * @since 0.8.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. -// * @example -// * -// * function Foo() { -// * this.a = 1; -// * } -// * -// * _.isPlainObject(new Foo); -// * // => false -// * -// * _.isPlainObject([1, 2, 3]); -// * // => false -// * -// * _.isPlainObject({ 'x': 0, 'y': 0 }); -// * // => true -// * -// * _.isPlainObject(Object.create(null)); -// * // => true -// */function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag){return false;}var proto=getPrototype(value);if(proto===null){return true;}var Ctor=hasOwnProperty.call(proto,'constructor')&&proto.constructor;return typeof Ctor=='function'&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString;}/** -// * Checks if `value` is classified as a `RegExp` object. -// * -// * @static -// * @memberOf _ -// * @since 0.1.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. -// * @example -// * -// * _.isRegExp(/abc/); -// * // => true -// * -// * _.isRegExp('/abc/'); -// * // => false -// */var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp;/** -// * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 -// * double precision number which isn't the result of a rounded unsafe integer. -// * -// * **Note:** This method is based on -// * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. -// * @example -// * -// * _.isSafeInteger(3); -// * // => true -// * -// * _.isSafeInteger(Number.MIN_VALUE); -// * // => false -// * -// * _.isSafeInteger(Infinity); -// * // => false -// * -// * _.isSafeInteger('3'); -// * // => false -// */function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER;}/** -// * Checks if `value` is classified as a `Set` object. -// * -// * @static -// * @memberOf _ -// * @since 4.3.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a set, else `false`. -// * @example -// * -// * _.isSet(new Set); -// * // => true -// * -// * _.isSet(new WeakSet); -// * // => false -// */var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;/** -// * Checks if `value` is classified as a `String` primitive or object. -// * -// * @static -// * @since 0.1.0 -// * @memberOf _ -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a string, else `false`. -// * @example -// * -// * _.isString('abc'); -// * // => true -// * -// * _.isString(1); -// * // => false -// */function isString(value){return typeof value=='string'||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag;}/** -// * Checks if `value` is classified as a `Symbol` primitive or object. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. -// * @example -// * -// * _.isSymbol(Symbol.iterator); -// * // => true -// * -// * _.isSymbol('abc'); -// * // => false -// */function isSymbol(value){return typeof value=='symbol'||isObjectLike(value)&&baseGetTag(value)==symbolTag;}/** -// * Checks if `value` is classified as a typed array. -// * -// * @static -// * @memberOf _ -// * @since 3.0.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. -// * @example -// * -// * _.isTypedArray(new Uint8Array); -// * // => true -// * -// * _.isTypedArray([]); -// * // => false -// */var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;/** -// * Checks if `value` is `undefined`. -// * -// * @static -// * @since 0.1.0 -// * @memberOf _ -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. -// * @example -// * -// * _.isUndefined(void 0); -// * // => true -// * -// * _.isUndefined(null); -// * // => false -// */function isUndefined(value){return value===undefined$1;}/** -// * Checks if `value` is classified as a `WeakMap` object. -// * -// * @static -// * @memberOf _ -// * @since 4.3.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. -// * @example -// * -// * _.isWeakMap(new WeakMap); -// * // => true -// * -// * _.isWeakMap(new Map); -// * // => false -// */function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag;}/** -// * Checks if `value` is classified as a `WeakSet` object. -// * -// * @static -// * @memberOf _ -// * @since 4.3.0 -// * @category Lang -// * @param {*} value The value to check. -// * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. -// * @example -// * -// * _.isWeakSet(new WeakSet); -// * // => true -// * -// * _.isWeakSet(new Set); -// * // => false -// */function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag;}/** -// * Checks if `value` is less than `other`. -// * -// * @static -// * @memberOf _ -// * @since 3.9.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @returns {boolean} Returns `true` if `value` is less than `other`, -// * else `false`. -// * @see _.gt -// * @example -// * -// * _.lt(1, 3); -// * // => true -// * -// * _.lt(3, 3); -// * // => false -// * -// * _.lt(3, 1); -// * // => false -// */var lt=createRelationalOperation(baseLt);/** -// * Checks if `value` is less than or equal to `other`. -// * -// * @static -// * @memberOf _ -// * @since 3.9.0 -// * @category Lang -// * @param {*} value The value to compare. -// * @param {*} other The other value to compare. -// * @returns {boolean} Returns `true` if `value` is less than or equal to -// * `other`, else `false`. -// * @see _.gte -// * @example -// * -// * _.lte(1, 3); -// * // => true -// * -// * _.lte(3, 3); -// * // => true -// * -// * _.lte(3, 1); -// * // => false -// */var lte=createRelationalOperation(function(value,other){return value<=other;});/** -// * Converts `value` to an array. -// * -// * @static -// * @since 0.1.0 -// * @memberOf _ -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {Array} Returns the converted array. -// * @example -// * -// * _.toArray({ 'a': 1, 'b': 2 }); -// * // => [1, 2] -// * -// * _.toArray('abc'); -// * // => ['a', 'b', 'c'] -// * -// * _.toArray(1); -// * // => [] -// * -// * _.toArray(null); -// * // => [] -// */function toArray(value){if(!value){return [];}if(isArrayLike(value)){return isString(value)?stringToArray(value):copyArray(value);}if(symIterator&&value[symIterator]){return iteratorToArray(value[symIterator]());}var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value);}/** -// * Converts `value` to a finite number. -// * -// * @static -// * @memberOf _ -// * @since 4.12.0 -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {number} Returns the converted number. -// * @example -// * -// * _.toFinite(3.2); -// * // => 3.2 -// * -// * _.toFinite(Number.MIN_VALUE); -// * // => 5e-324 -// * -// * _.toFinite(Infinity); -// * // => 1.7976931348623157e+308 -// * -// * _.toFinite('3.2'); -// * // => 3.2 -// */function toFinite(value){if(!value){return value===0?value:0;}value=toNumber(value);if(value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER;}return value===value?value:0;}/** -// * Converts `value` to an integer. -// * -// * **Note:** This method is loosely based on -// * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {number} Returns the converted integer. -// * @example -// * -// * _.toInteger(3.2); -// * // => 3 -// * -// * _.toInteger(Number.MIN_VALUE); -// * // => 0 -// * -// * _.toInteger(Infinity); -// * // => 1.7976931348623157e+308 -// * -// * _.toInteger('3.2'); -// * // => 3 -// */function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0;}/** -// * Converts `value` to an integer suitable for use as the length of an -// * array-like object. -// * -// * **Note:** This method is based on -// * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {number} Returns the converted integer. -// * @example -// * -// * _.toLength(3.2); -// * // => 3 -// * -// * _.toLength(Number.MIN_VALUE); -// * // => 0 -// * -// * _.toLength(Infinity); -// * // => 4294967295 -// * -// * _.toLength('3.2'); -// * // => 3 -// */function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0;}/** -// * Converts `value` to a number. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to process. -// * @returns {number} Returns the number. -// * @example -// * -// * _.toNumber(3.2); -// * // => 3.2 -// * -// * _.toNumber(Number.MIN_VALUE); -// * // => 5e-324 -// * -// * _.toNumber(Infinity); -// * // => Infinity -// * -// * _.toNumber('3.2'); -// * // => 3.2 -// */function toNumber(value){if(typeof value=='number'){return value;}if(isSymbol(value)){return NAN;}if(isObject(value)){var other=typeof value.valueOf=='function'?value.valueOf():value;value=isObject(other)?other+'':other;}if(typeof value!='string'){return value===0?value:+value;}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value;}/** -// * Converts `value` to a plain object flattening inherited enumerable string -// * keyed properties of `value` to own properties of the plain object. -// * -// * @static -// * @memberOf _ -// * @since 3.0.0 -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {Object} Returns the converted plain object. -// * @example -// * -// * function Foo() { -// * this.b = 2; -// * } -// * -// * Foo.prototype.c = 3; -// * -// * _.assign({ 'a': 1 }, new Foo); -// * // => { 'a': 1, 'b': 2 } -// * -// * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); -// * // => { 'a': 1, 'b': 2, 'c': 3 } -// */function toPlainObject(value){return copyObject(value,keysIn(value));}/** -// * Converts `value` to a safe integer. A safe integer can be compared and -// * represented correctly. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {number} Returns the converted integer. -// * @example -// * -// * _.toSafeInteger(3.2); -// * // => 3 -// * -// * _.toSafeInteger(Number.MIN_VALUE); -// * // => 0 -// * -// * _.toSafeInteger(Infinity); -// * // => 9007199254740991 -// * -// * _.toSafeInteger('3.2'); -// * // => 3 -// */function toSafeInteger(value){return value?baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER):value===0?value:0;}/** -// * Converts `value` to a string. An empty string is returned for `null` -// * and `undefined` values. The sign of `-0` is preserved. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Lang -// * @param {*} value The value to convert. -// * @returns {string} Returns the converted string. -// * @example -// * -// * _.toString(null); -// * // => '' -// * -// * _.toString(-0); -// * // => '-0' -// * -// * _.toString([1, 2, 3]); -// * // => '1,2,3' -// */function toString(value){return value==null?'':baseToString(value);}/*------------------------------------------------------------------------*/ /** -// * Assigns own enumerable string keyed properties of source objects to the -// * destination object. Source objects are applied from left to right. -// * Subsequent sources overwrite property assignments of previous sources. -// * -// * **Note:** This method mutates `object` and is loosely based on -// * [`Object.assign`](https://mdn.io/Object/assign). -// * -// * @static -// * @memberOf _ -// * @since 0.10.0 -// * @category Object -// * @param {Object} object The destination object. -// * @param {...Object} [sources] The source objects. -// * @returns {Object} Returns `object`. -// * @see _.assignIn -// * @example -// * -// * function Foo() { -// * this.a = 1; -// * } -// * -// * function Bar() { -// * this.c = 3; -// * } -// * -// * Foo.prototype.b = 2; -// * Bar.prototype.d = 4; -// * -// * _.assign({ 'a': 0 }, new Foo, new Bar); -// * // => { 'a': 1, 'c': 3 } -// */var assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source)){copyObject(source,keys(source),object);return;}for(var key in source){if(hasOwnProperty.call(source,key)){assignValue(object,key,source[key]);}}});/** -// * This method is like `_.assign` except that it iterates over own and -// * inherited source properties. -// * -// * **Note:** This method mutates `object`. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @alias extend -// * @category Object -// * @param {Object} object The destination object. -// * @param {...Object} [sources] The source objects. -// * @returns {Object} Returns `object`. -// * @see _.assign -// * @example -// * -// * function Foo() { -// * this.a = 1; -// * } -// * -// * function Bar() { -// * this.c = 3; -// * } -// * -// * Foo.prototype.b = 2; -// * Bar.prototype.d = 4; -// * -// * _.assignIn({ 'a': 0 }, new Foo, new Bar); -// * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } -// */var assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object);});/** -// * This method is like `_.assignIn` except that it accepts `customizer` -// * which is invoked to produce the assigned values. If `customizer` returns -// * `undefined`, assignment is handled by the method instead. The `customizer` -// * is invoked with five arguments: (objValue, srcValue, key, object, source). -// * -// * **Note:** This method mutates `object`. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @alias extendWith -// * @category Object -// * @param {Object} object The destination object. -// * @param {...Object} sources The source objects. -// * @param {Function} [customizer] The function to customize assigned values. -// * @returns {Object} Returns `object`. -// * @see _.assignWith -// * @example -// * -// * function customizer(objValue, srcValue) { -// * return _.isUndefined(objValue) ? srcValue : objValue; -// * } -// * -// * var defaults = _.partialRight(_.assignInWith, customizer); -// * -// * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); -// * // => { 'a': 1, 'b': 2 } -// */var assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer);});/** -// * This method is like `_.assign` except that it accepts `customizer` -// * which is invoked to produce the assigned values. If `customizer` returns -// * `undefined`, assignment is handled by the method instead. The `customizer` -// * is invoked with five arguments: (objValue, srcValue, key, object, source). -// * -// * **Note:** This method mutates `object`. -// * -// * @static -// * @memberOf _ -// * @since 4.0.0 -// * @category Object -// * @param {Object} object The destination object. -// * @param {...Object} sources The source objects. -// * @param {Function} [customizer] The function to customize assigned values. -// * @returns {Object} Returns `object`. -// * @see _.assignInWith -// * @example -// * -// * function customizer(objValue, srcValue) { -// * return _.isUndefined(objValue) ? srcValue : objValue; -// * } -// * -// * var defaults = _.partialRight(_.assignWith, customizer); -// * -// * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); -// * // => { 'a': 1, 'b': 2 } -// */var assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer);});/** -// * Creates an array of values corresponding to `paths` of `object`. -// * -// * @static -// * @memberOf _ -// * @since 1.0.0 -// * @category Object -// * @param {Object} object The object to iterate over. -// * @param {...(string|string[])} [paths] The property paths to pick. -// * @returns {Array} Returns the picked values. -// * @example -// * -// * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; -// * -// * _.at(object, ['a[0].b.c', 'a[1]']); -// * // => [3, 4] -// */var at=flatRest(baseAt);/** -// * Creates an object that inherits from the `prototype` object. If a -// * `properties` object is given, its own enumerable string keyed properties -// * are assigned to the created object. -// * -// * @static -// * @memberOf _ -// * @since 2.3.0 -// * @category Object -// * @param {Object} prototype The object to inherit from. -// * @param {Object} [properties] The properties to assign to the object. -// * @returns {Object} Returns the new object. -// * @example -// * -// * function Shape() { -// * this.x = 0; -// * this.y = 0; -// * } -// * -// * function Circle() { -// * Shape.call(this); -// * } -// * -// * Circle.prototype = _.create(Shape.prototype, { -// * 'constructor': Circle -// * }); -// * -// * var circle = new Circle; -// * circle instanceof Circle; -// * // => true -// * -// * circle instanceof Shape; -// * // => true -// */function create(prototype,properties){var result=baseCreate(prototype);return properties==null?result:baseAssign(result,properties);}/** -// * Assigns own and inherited enumerable string keyed properties of source -// * objects to the destination object for all destination properties that -// * resolve to `undefined`. Source objects are applied from left to right. -// * Once a property is set, additional values of the same property are ignored. -// * -// * **Note:** This method mutates `object`. -// * -// * @static -// * @since 0.1.0 -// * @memberOf _ -// * @category Object -// * @param {Object} object The destination object. -// * @param {...Object} [sources] The source objects. -// * @returns {Object} Returns `object`. -// * @see _.defaultsDeep -// * @example -// * -// * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); -// * // => { 'a': 1, 'b': 2 } -// */var defaults=baseRest(function(object,sources){object=Object(object);var index=-1;var length=sources.length;var guard=length>2?sources[2]:undefined$1;if(guard&&isIterateeCall(sources[0],sources[1],guard)){length=1;}while(++index