-
-
Save mohsen1/9d7172ce4c0a190ebae0 to your computer and use it in GitHub Desktop.
Proof of concept using lodash for Backbone by cherry-picking all _.{method}s that Backbone uses from Lodash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keys | |
uniqueId | |
isEmpty | |
bind | |
once | |
each | |
extend | |
defaults | |
result | |
clone | |
escape | |
matches | |
has | |
isObject | |
isArray | |
isString | |
isFunction | |
invoke | |
pick | |
isRegExp | |
map | |
bindAll | |
any | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
var _ = { | |
keys: require('lodash/object/keys'), | |
result: require('lodash/object/result'), | |
extend: require('lodash/object/extend'), | |
defaults: require('lodash/object/defaults'), | |
has: require('lodash/object/has'), | |
pick: require('lodash/object/pick'), | |
bind: require('lodash/function/bind'), | |
once: require('lodash/function/once'), | |
bindAll: require('lodash/function/bindAll'), | |
uniqueId: require('lodash/utility/uniqueId'), | |
matches: require('lodash/utility/matches'), | |
invoke: require('lodash/collection/invoke'), | |
each: require('lodash/collection/each'), | |
map: require('lodash/collection/map'), | |
any: require('lodash/collection/any'), | |
escape: require('lodash/string/escape'), | |
clone: require('lodash/lang/clone'), | |
isEmpty: require('lodash/lang/isEmpty'), | |
isObject: require('lodash/lang/isObject'), | |
isArray: require('lodash/lang/isArray'), | |
isString: require('lodash/lang/isString'), | |
isFunction: require('lodash/lang/isFunction'), | |
isRegExp: require('lodash/lang/isRegExp') | |
} | |
},{"lodash/collection/any":2,"lodash/collection/each":3,"lodash/collection/invoke":5,"lodash/collection/map":6,"lodash/function/bind":10,"lodash/function/bindAll":11,"lodash/function/once":12,"lodash/lang/clone":76,"lodash/lang/isArray":78,"lodash/lang/isEmpty":79,"lodash/lang/isFunction":80,"lodash/lang/isObject":82,"lodash/lang/isRegExp":83,"lodash/lang/isString":84,"lodash/object/defaults":87,"lodash/object/extend":88,"lodash/object/has":90,"lodash/object/keys":91,"lodash/object/pick":93,"lodash/object/result":94,"lodash/string/escape":95,"lodash/utility/matches":100,"lodash/utility/uniqueId":102}],2:[function(require,module,exports){ | |
module.exports = require('./some'); | |
},{"./some":7}],3:[function(require,module,exports){ | |
module.exports = require('./forEach'); | |
},{"./forEach":4}],4:[function(require,module,exports){ | |
var arrayEach = require('../internal/arrayEach'), | |
baseEach = require('../internal/baseEach'), | |
bindCallback = require('../internal/bindCallback'), | |
isArray = require('../lang/isArray'); | |
/** | |
* Iterates over elements of `collection` invoking `iteratee` for each element. | |
* The `iteratee` is bound to `thisArg` and invoked with three arguments; | |
* (value, index|key, collection). Iterator functions may exit iteration early | |
* by explicitly returning `false`. | |
* | |
* **Note:** As with other "Collections" methods, objects with a `length` property | |
* are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` | |
* may be used for object iteration. | |
* | |
* @static | |
* @memberOf _ | |
* @alias each | |
* @category Collection | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function} [iteratee=_.identity] The function invoked per iteration. | |
* @param {*} [thisArg] The `this` binding of `iteratee`. | |
* @returns {Array|Object|string} Returns `collection`. | |
* @example | |
* | |
* _([1, 2]).forEach(function(n) { | |
* console.log(n); | |
* }).value(); | |
* // => logs each value from left to right and returns the array | |
* | |
* _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { | |
* console.log(n, key); | |
* }); | |
* // => logs each value-key pair and returns the object (iteration order is not guaranteed) | |
*/ | |
function forEach(collection, iteratee, thisArg) { | |
return (typeof iteratee == 'function' && typeof thisArg == 'undefined' && isArray(collection)) | |
? arrayEach(collection, iteratee) | |
: baseEach(collection, bindCallback(iteratee, thisArg, 3)); | |
} | |
module.exports = forEach; | |
},{"../internal/arrayEach":14,"../internal/baseEach":24,"../internal/bindCallback":43,"../lang/isArray":78}],5:[function(require,module,exports){ | |
var baseInvoke = require('../internal/baseInvoke'), | |
baseSlice = require('../internal/baseSlice'); | |
/** | |
* Invokes the method named by `methodName` on each element in `collection`, | |
* returning an array of the results of each invoked method. Any additional | |
* arguments are provided to each invoked method. If `methodName` is a function | |
* it is invoked for, and `this` bound to, each element in `collection`. | |
* | |
* @static | |
* @memberOf _ | |
* @category Collection | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function|string} methodName The name of the method to invoke or | |
* the function invoked per iteration. | |
* @param {...*} [args] The arguments to invoke the method with. | |
* @returns {Array} Returns the array of results. | |
* @example | |
* | |
* _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); | |
* // => [[1, 5, 7], [1, 2, 3]] | |
* | |
* _.invoke([123, 456], String.prototype.split, ''); | |
* // => [['1', '2', '3'], ['4', '5', '6']] | |
*/ | |
function invoke(collection, methodName) { | |
return baseInvoke(collection, methodName, baseSlice(arguments, 2)); | |
} | |
module.exports = invoke; | |
},{"../internal/baseInvoke":30,"../internal/baseSlice":40}],6:[function(require,module,exports){ | |
var arrayMap = require('../internal/arrayMap'), | |
baseCallback = require('../internal/baseCallback'), | |
baseMap = require('../internal/baseMap'), | |
isArray = require('../lang/isArray'); | |
/** | |
* Creates an array of values by running each element in `collection` through | |
* `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three | |
* arguments; (value, index|key, collection). | |
* | |
* If a property name is provided for `predicate` the created `_.property` | |
* style callback returns the property value of the given element. | |
* | |
* If a value is also provided for `thisArg` the created `_.matchesProperty` | |
* style callback returns `true` for elements that have a matching property | |
* value, else `false`. | |
* | |
* If an object is provided for `predicate` the created `_.matches` style | |
* callback returns `true` for elements that have the properties of the given | |
* object, else `false`. | |
* | |
* Many lodash methods are guarded to work as interatees for methods like | |
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. | |
* | |
* The guarded methods are: | |
* `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`, `drop`, | |
* `dropRight`, `fill`, `flatten`, `invert`, `max`, `min`, `parseInt`, `slice`, | |
* `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimLeft`, `trimRight`, | |
* `trunc`, `random`, `range`, `sample`, `uniq`, and `words` | |
* | |
* @static | |
* @memberOf _ | |
* @alias collect | |
* @category Collection | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function|Object|string} [iteratee=_.identity] The function invoked | |
* per iteration. | |
* create a `_.property` or `_.matches` style callback respectively. | |
* @param {*} [thisArg] The `this` binding of `iteratee`. | |
* @returns {Array} Returns the new mapped array. | |
* @example | |
* | |
* function timesThree(n) { | |
* return n * 3; | |
* } | |
* | |
* _.map([1, 2], timesThree); | |
* // => [3, 6] | |
* | |
* _.map({ 'a': 1, 'b': 2 }, timesThree); | |
* // => [3, 6] (iteration order is not guaranteed) | |
* | |
* var users = [ | |
* { 'user': 'barney' }, | |
* { 'user': 'fred' } | |
* ]; | |
* | |
* // using the `_.property` callback shorthand | |
* _.map(users, 'user'); | |
* // => ['barney', 'fred'] | |
*/ | |
function map(collection, iteratee, thisArg) { | |
var func = isArray(collection) ? arrayMap : baseMap; | |
iteratee = baseCallback(iteratee, thisArg, 3); | |
return func(collection, iteratee); | |
} | |
module.exports = map; | |
},{"../internal/arrayMap":15,"../internal/baseCallback":20,"../internal/baseMap":35,"../lang/isArray":78}],7:[function(require,module,exports){ | |
var arraySome = require('../internal/arraySome'), | |
baseCallback = require('../internal/baseCallback'), | |
baseSome = require('../internal/baseSome'), | |
isArray = require('../lang/isArray'); | |
/** | |
* Checks if `predicate` returns truthy for **any** element of `collection`. | |
* The function returns as soon as it finds a passing value and does not iterate | |
* over the entire collection. The predicate is bound to `thisArg` and invoked | |
* with three arguments; (value, index|key, collection). | |
* | |
* If a property name is provided for `predicate` the created `_.property` | |
* style callback returns the property value of the given element. | |
* | |
* If a value is also provided for `thisArg` the created `_.matchesProperty` | |
* style callback returns `true` for elements that have a matching property | |
* value, else `false`. | |
* | |
* If an object is provided for `predicate` the created `_.matches` style | |
* callback returns `true` for elements that have the properties of the given | |
* object, else `false`. | |
* | |
* @static | |
* @memberOf _ | |
* @alias any | |
* @category Collection | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function|Object|string} [predicate=_.identity] The function invoked | |
* per iteration. | |
* @param {*} [thisArg] The `this` binding of `predicate`. | |
* @returns {boolean} Returns `true` if any element passes the predicate check, | |
* else `false`. | |
* @example | |
* | |
* _.some([null, 0, 'yes', false], Boolean); | |
* // => true | |
* | |
* var users = [ | |
* { 'user': 'barney', 'active': true }, | |
* { 'user': 'fred', 'active': false } | |
* ]; | |
* | |
* // using the `_.matches` callback shorthand | |
* _.some(users, { user': 'barney', 'active': false }); | |
* // => false | |
* | |
* // using the `_.matchesProperty` callback shorthand | |
* _.some(users, 'active', false); | |
* // => true | |
* | |
* // using the `_.property` callback shorthand | |
* _.some(users, 'active'); | |
* // => true | |
*/ | |
function some(collection, predicate, thisArg) { | |
var func = isArray(collection) ? arraySome : baseSome; | |
if (typeof predicate != 'function' || typeof thisArg != 'undefined') { | |
predicate = baseCallback(predicate, thisArg, 3); | |
} | |
return func(collection, predicate); | |
} | |
module.exports = some; | |
},{"../internal/arraySome":16,"../internal/baseCallback":20,"../internal/baseSome":41,"../lang/isArray":78}],8:[function(require,module,exports){ | |
var isNative = require('../lang/isNative'); | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeNow = isNative(nativeNow = Date.now) && nativeNow; | |
/** | |
* Gets the number of milliseconds that have elapsed since the Unix epoch | |
* (1 January 1970 00:00:00 UTC). | |
* | |
* @static | |
* @memberOf _ | |
* @category Date | |
* @example | |
* | |
* _.defer(function(stamp) { | |
* console.log(_.now() - stamp); | |
* }, _.now()); | |
* // => logs the number of milliseconds it took for the deferred function to be invoked | |
*/ | |
var now = nativeNow || function() { | |
return new Date().getTime(); | |
}; | |
module.exports = now; | |
},{"../lang/isNative":81}],9:[function(require,module,exports){ | |
/** Used as the `TypeError` message for "Functions" methods. */ | |
var FUNC_ERROR_TEXT = 'Expected a function'; | |
/** | |
* Creates a function that invokes `func`, with the `this` binding and arguments | |
* of the created function, while it is called less than `n` times. Subsequent | |
* calls to the created function return the result of the last `func` invocation. | |
* | |
* @static | |
* @memberOf _ | |
* @category Function | |
* @param {number} n The number of calls at which `func` is no longer invoked. | |
* @param {Function} func The function to restrict. | |
* @returns {Function} Returns the new restricted function. | |
* @example | |
* | |
* jQuery('#add').on('click', _.before(5, addContactToList)); | |
* // => allows adding up to 4 contacts to the list | |
*/ | |
function before(n, func) { | |
var result; | |
if (typeof func != 'function') { | |
if (typeof n == 'function') { | |
var temp = n; | |
n = func; | |
func = temp; | |
} else { | |
throw new TypeError(FUNC_ERROR_TEXT); | |
} | |
} | |
return function() { | |
if (--n > 0) { | |
result = func.apply(this, arguments); | |
} else { | |
func = null; | |
} | |
return result; | |
}; | |
} | |
module.exports = before; | |
},{}],10:[function(require,module,exports){ | |
var baseSlice = require('../internal/baseSlice'), | |
createWrapper = require('../internal/createWrapper'), | |
replaceHolders = require('../internal/replaceHolders'); | |
/** Used to compose bitmasks for wrapper metadata. */ | |
var BIND_FLAG = 1, | |
PARTIAL_FLAG = 32; | |
/** | |
* Creates a function that invokes `func` with the `this` binding of `thisArg` | |
* and prepends any additional `_.bind` arguments to those provided to the | |
* bound function. | |
* | |
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, | |
* may be used as a placeholder for partially applied arguments. | |
* | |
* **Note:** Unlike native `Function#bind` this method does not set the `length` | |
* property of bound functions. | |
* | |
* @static | |
* @memberOf _ | |
* @category Function | |
* @param {Function} func The function to bind. | |
* @param {*} thisArg The `this` binding of `func`. | |
* @param {...*} [args] The arguments to be partially applied. | |
* @returns {Function} Returns the new bound function. | |
* @example | |
* | |
* var greet = function(greeting, punctuation) { | |
* return greeting + ' ' + this.user + punctuation; | |
* }; | |
* | |
* var object = { 'user': 'fred' }; | |
* | |
* var bound = _.bind(greet, object, 'hi'); | |
* bound('!'); | |
* // => 'hi fred!' | |
* | |
* // using placeholders | |
* var bound = _.bind(greet, object, _, '!'); | |
* bound('hi'); | |
* // => 'hi fred!' | |
*/ | |
function bind(func, thisArg) { | |
var bitmask = BIND_FLAG; | |
if (arguments.length > 2) { | |
var partials = baseSlice(arguments, 2), | |
holders = replaceHolders(partials, bind.placeholder); | |
bitmask |= PARTIAL_FLAG; | |
} | |
return createWrapper(func, bitmask, thisArg, partials, holders); | |
} | |
// Assign default placeholders. | |
bind.placeholder = {}; | |
module.exports = bind; | |
},{"../internal/baseSlice":40,"../internal/createWrapper":52,"../internal/replaceHolders":72}],11:[function(require,module,exports){ | |
var baseBindAll = require('../internal/baseBindAll'), | |
baseFlatten = require('../internal/baseFlatten'), | |
functions = require('../object/functions'); | |
/** | |
* Binds methods of an object to the object itself, overwriting the existing | |
* method. Method names may be specified as individual arguments or as arrays | |
* of method names. If no method names are provided all enumerable function | |
* properties, own and inherited, of `object` are bound. | |
* | |
* **Note:** This method does not set the `length` property of bound functions. | |
* | |
* @static | |
* @memberOf _ | |
* @category Function | |
* @param {Object} object The object to bind and assign the bound methods to. | |
* @param {...(string|string[])} [methodNames] The object method names to bind, | |
* specified as individual method names or arrays of method names. | |
* @returns {Object} Returns `object`. | |
* @example | |
* | |
* var view = { | |
* 'label': 'docs', | |
* 'onClick': function() { | |
* console.log('clicked ' + this.label); | |
* } | |
* }; | |
* | |
* _.bindAll(view); | |
* jQuery('#docs').on('click', view.onClick); | |
* // => logs 'clicked docs' when the element is clicked | |
*/ | |
function bindAll(object) { | |
return baseBindAll(object, | |
arguments.length > 1 | |
? baseFlatten(arguments, false, false, 1) | |
: functions(object) | |
); | |
} | |
module.exports = bindAll; | |
},{"../internal/baseBindAll":19,"../internal/baseFlatten":25,"../object/functions":89}],12:[function(require,module,exports){ | |
var before = require('./before'); | |
/** | |
* Creates a function that is restricted to invoking `func` once. Repeat calls | |
* to the function return the value of the first call. The `func` is invoked | |
* with the `this` binding of the created function. | |
* | |
* @static | |
* @memberOf _ | |
* @category Function | |
* @param {Function} func The function to restrict. | |
* @returns {Function} Returns the new restricted function. | |
* @example | |
* | |
* var initialize = _.once(createApplication); | |
* initialize(); | |
* initialize(); | |
* // `initialize` invokes `createApplication` once | |
*/ | |
function once(func) { | |
return before(func, 2); | |
} | |
module.exports = once; | |
},{"./before":9}],13:[function(require,module,exports){ | |
/** | |
* Copies the values of `source` to `array`. | |
* | |
* @private | |
* @param {Array} source The array to copy values from. | |
* @param {Array} [array=[]] The array to copy values to. | |
* @returns {Array} Returns `array`. | |
*/ | |
function arrayCopy(source, array) { | |
var index = -1, | |
length = source.length; | |
array || (array = Array(length)); | |
while (++index < length) { | |
array[index] = source[index]; | |
} | |
return array; | |
} | |
module.exports = arrayCopy; | |
},{}],14:[function(require,module,exports){ | |
/** | |
* A specialized version of `_.forEach` for arrays without support for callback | |
* shorthands or `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Array} Returns `array`. | |
*/ | |
function arrayEach(array, iteratee) { | |
var index = -1, | |
length = array.length; | |
while (++index < length) { | |
if (iteratee(array[index], index, array) === false) { | |
break; | |
} | |
} | |
return array; | |
} | |
module.exports = arrayEach; | |
},{}],15:[function(require,module,exports){ | |
/** | |
* A specialized version of `_.map` for arrays without support for callback | |
* shorthands or `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Array} Returns the new mapped array. | |
*/ | |
function arrayMap(array, iteratee) { | |
var index = -1, | |
length = array.length, | |
result = Array(length); | |
while (++index < length) { | |
result[index] = iteratee(array[index], index, array); | |
} | |
return result; | |
} | |
module.exports = arrayMap; | |
},{}],16:[function(require,module,exports){ | |
/** | |
* A specialized version of `_.some` for arrays without support for callback | |
* shorthands or `this` binding. | |
* | |
* @private | |
* @param {Array} array The array to iterate over. | |
* @param {Function} predicate The function invoked per iteration. | |
* @returns {boolean} Returns `true` if any element passes the predicate check, | |
* else `false`. | |
*/ | |
function arraySome(array, predicate) { | |
var index = -1, | |
length = array.length; | |
while (++index < length) { | |
if (predicate(array[index], index, array)) { | |
return true; | |
} | |
} | |
return false; | |
} | |
module.exports = arraySome; | |
},{}],17:[function(require,module,exports){ | |
/** | |
* Used by `_.defaults` to customize its `_.assign` use. | |
* | |
* @private | |
* @param {*} objectValue The destination object property value. | |
* @param {*} sourceValue The source object property value. | |
* @returns {*} Returns the value to assign to the destination object. | |
*/ | |
function assignDefaults(objectValue, sourceValue) { | |
return typeof objectValue == 'undefined' ? sourceValue : objectValue; | |
} | |
module.exports = assignDefaults; | |
},{}],18:[function(require,module,exports){ | |
var baseCopy = require('./baseCopy'), | |
keys = require('../object/keys'); | |
/** | |
* The base implementation of `_.assign` without support for argument juggling, | |
* multiple sources, and `this` binding `customizer` functions. | |
* | |
* @private | |
* @param {Object} object The destination object. | |
* @param {Object} source The source object. | |
* @param {Function} [customizer] The function to customize assigning values. | |
* @returns {Object} Returns the destination object. | |
*/ | |
function baseAssign(object, source, customizer) { | |
var props = keys(source); | |
if (!customizer) { | |
return baseCopy(source, object, props); | |
} | |
var index = -1, | |
length = props.length; | |
while (++index < length) { | |
var key = props[index], | |
value = object[key], | |
result = customizer(value, source[key], key, object, source); | |
if ((result === result ? result !== value : value === value) || | |
(typeof value == 'undefined' && !(key in object))) { | |
object[key] = result; | |
} | |
} | |
return object; | |
} | |
module.exports = baseAssign; | |
},{"../object/keys":91,"./baseCopy":22}],19:[function(require,module,exports){ | |
var createWrapper = require('./createWrapper'); | |
/** Used to compose bitmasks for wrapper metadata. */ | |
var BIND_FLAG = 1; | |
/** | |
* The base implementation of `_.bindAll` without support for individual | |
* method name arguments. | |
* | |
* @private | |
* @param {Object} object The object to bind and assign the bound methods to. | |
* @param {string[]} methodNames The object method names to bind. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseBindAll(object, methodNames) { | |
var index = -1, | |
length = methodNames.length; | |
while (++index < length) { | |
var key = methodNames[index]; | |
object[key] = createWrapper(object[key], BIND_FLAG, object); | |
} | |
return object; | |
} | |
module.exports = baseBindAll; | |
},{"./createWrapper":52}],20:[function(require,module,exports){ | |
var baseMatches = require('./baseMatches'), | |
baseMatchesProperty = require('./baseMatchesProperty'), | |
baseProperty = require('./baseProperty'), | |
bindCallback = require('./bindCallback'), | |
identity = require('../utility/identity'), | |
isBindable = require('./isBindable'); | |
/** | |
* The base implementation of `_.callback` which supports specifying the | |
* number of arguments to provide to `func`. | |
* | |
* @private | |
* @param {*} [func=_.identity] The value to convert to a callback. | |
* @param {*} [thisArg] The `this` binding of `func`. | |
* @param {number} [argCount] The number of arguments to provide to `func`. | |
* @returns {Function} Returns the callback. | |
*/ | |
function baseCallback(func, thisArg, argCount) { | |
var type = typeof func; | |
if (type == 'function') { | |
return (typeof thisArg != 'undefined' && isBindable(func)) | |
? bindCallback(func, thisArg, argCount) | |
: func; | |
} | |
if (func == null) { | |
return identity; | |
} | |
if (type == 'object') { | |
return baseMatches(func); | |
} | |
return typeof thisArg == 'undefined' | |
? baseProperty(func + '') | |
: baseMatchesProperty(func + '', thisArg); | |
} | |
module.exports = baseCallback; | |
},{"../utility/identity":99,"./baseMatches":36,"./baseMatchesProperty":37,"./baseProperty":38,"./bindCallback":43,"./isBindable":61}],21:[function(require,module,exports){ | |
var arrayCopy = require('./arrayCopy'), | |
arrayEach = require('./arrayEach'), | |
baseCopy = require('./baseCopy'), | |
baseForOwn = require('./baseForOwn'), | |
initCloneArray = require('./initCloneArray'), | |
initCloneByTag = require('./initCloneByTag'), | |
initCloneObject = require('./initCloneObject'), | |
isArray = require('../lang/isArray'), | |
isObject = require('../lang/isObject'), | |
keys = require('../object/keys'); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
funcTag = '[object Function]', | |
mapTag = '[object Map]', | |
numberTag = '[object Number]', | |
objectTag = '[object Object]', | |
regexpTag = '[object RegExp]', | |
setTag = '[object Set]', | |
stringTag = '[object String]', | |
weakMapTag = '[object WeakMap]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to identify `toStringTag` values supported by `_.clone`. */ | |
var cloneableTags = {}; | |
cloneableTags[argsTag] = cloneableTags[arrayTag] = | |
cloneableTags[arrayBufferTag] = cloneableTags[boolTag] = | |
cloneableTags[dateTag] = cloneableTags[float32Tag] = | |
cloneableTags[float64Tag] = cloneableTags[int8Tag] = | |
cloneableTags[int16Tag] = cloneableTags[int32Tag] = | |
cloneableTags[numberTag] = cloneableTags[objectTag] = | |
cloneableTags[regexpTag] = cloneableTags[stringTag] = | |
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = | |
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; | |
cloneableTags[errorTag] = cloneableTags[funcTag] = | |
cloneableTags[mapTag] = cloneableTags[setTag] = | |
cloneableTags[weakMapTag] = false; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* The base implementation of `_.clone` without support for argument juggling | |
* and `this` binding `customizer` functions. | |
* | |
* @private | |
* @param {*} value The value to clone. | |
* @param {boolean} [isDeep] Specify a deep clone. | |
* @param {Function} [customizer] The function to customize cloning values. | |
* @param {string} [key] The key of `value`. | |
* @param {Object} [object] The object `value` belongs to. | |
* @param {Array} [stackA=[]] Tracks traversed source objects. | |
* @param {Array} [stackB=[]] Associates clones with source counterparts. | |
* @returns {*} Returns the cloned value. | |
*/ | |
function baseClone(value, isDeep, customizer, key, object, stackA, stackB) { | |
var result; | |
if (customizer) { | |
result = object ? customizer(value, key, object) : customizer(value); | |
} | |
if (typeof result != 'undefined') { | |
return result; | |
} | |
if (!isObject(value)) { | |
return value; | |
} | |
var isArr = isArray(value); | |
if (isArr) { | |
result = initCloneArray(value); | |
if (!isDeep) { | |
return arrayCopy(value, result); | |
} | |
} else { | |
var tag = objToString.call(value), | |
isFunc = tag == funcTag; | |
if (tag == objectTag || tag == argsTag || (isFunc && !object)) { | |
result = initCloneObject(isFunc ? {} : value); | |
if (!isDeep) { | |
return baseCopy(value, result, keys(value)); | |
} | |
} else { | |
return cloneableTags[tag] | |
? initCloneByTag(value, tag, isDeep) | |
: (object ? value : {}); | |
} | |
} | |
// Check for circular references and return corresponding clone. | |
stackA || (stackA = []); | |
stackB || (stackB = []); | |
var length = stackA.length; | |
while (length--) { | |
if (stackA[length] == value) { | |
return stackB[length]; | |
} | |
} | |
// Add the source value to the stack of traversed objects and associate it with its clone. | |
stackA.push(value); | |
stackB.push(result); | |
// Recursively populate clone (susceptible to call stack limits). | |
(isArr ? arrayEach : baseForOwn)(value, function(subValue, key) { | |
result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB); | |
}); | |
return result; | |
} | |
module.exports = baseClone; | |
},{"../lang/isArray":78,"../lang/isObject":82,"../object/keys":91,"./arrayCopy":13,"./arrayEach":14,"./baseCopy":22,"./baseForOwn":28,"./initCloneArray":58,"./initCloneByTag":59,"./initCloneObject":60}],22:[function(require,module,exports){ | |
/** | |
* Copies the properties of `source` to `object`. | |
* | |
* @private | |
* @param {Object} source The object to copy properties from. | |
* @param {Object} [object={}] The object to copy properties to. | |
* @param {Array} props The property names to copy. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseCopy(source, object, props) { | |
if (!props) { | |
props = object; | |
object = {}; | |
} | |
var index = -1, | |
length = props.length; | |
while (++index < length) { | |
var key = props[index]; | |
object[key] = source[key]; | |
} | |
return object; | |
} | |
module.exports = baseCopy; | |
},{}],23:[function(require,module,exports){ | |
(function (global){ | |
var isObject = require('../lang/isObject'); | |
/** | |
* The base implementation of `_.create` without support for assigning | |
* properties to the created object. | |
* | |
* @private | |
* @param {Object} prototype The object to inherit from. | |
* @returns {Object} Returns the new object. | |
*/ | |
var baseCreate = (function() { | |
function Object() {} | |
return function(prototype) { | |
if (isObject(prototype)) { | |
Object.prototype = prototype; | |
var result = new Object; | |
Object.prototype = null; | |
} | |
return result || global.Object(); | |
}; | |
}()); | |
module.exports = baseCreate; | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{"../lang/isObject":82}],24:[function(require,module,exports){ | |
var baseForOwn = require('./baseForOwn'), | |
isLength = require('./isLength'), | |
toObject = require('./toObject'); | |
/** | |
* The base implementation of `_.forEach` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Array|Object|string} Returns `collection`. | |
*/ | |
function baseEach(collection, iteratee) { | |
var length = collection ? collection.length : 0; | |
if (!isLength(length)) { | |
return baseForOwn(collection, iteratee); | |
} | |
var index = -1, | |
iterable = toObject(collection); | |
while (++index < length) { | |
if (iteratee(iterable[index], index, iterable) === false) { | |
break; | |
} | |
} | |
return collection; | |
} | |
module.exports = baseEach; | |
},{"./baseForOwn":28,"./isLength":64,"./toObject":75}],25:[function(require,module,exports){ | |
var isArguments = require('../lang/isArguments'), | |
isArray = require('../lang/isArray'), | |
isLength = require('./isLength'), | |
isObjectLike = require('./isObjectLike'); | |
/** | |
* The base implementation of `_.flatten` with added support for restricting | |
* flattening and specifying the start index. | |
* | |
* @private | |
* @param {Array} array The array to flatten. | |
* @param {boolean} [isDeep] Specify a deep flatten. | |
* @param {boolean} [isStrict] Restrict flattening to arrays and `arguments` objects. | |
* @param {number} [fromIndex=0] The index to start from. | |
* @returns {Array} Returns the new flattened array. | |
*/ | |
function baseFlatten(array, isDeep, isStrict, fromIndex) { | |
var index = (fromIndex || 0) - 1, | |
length = array.length, | |
resIndex = -1, | |
result = []; | |
while (++index < length) { | |
var value = array[index]; | |
if (isObjectLike(value) && isLength(value.length) && (isArray(value) || isArguments(value))) { | |
if (isDeep) { | |
// Recursively flatten arrays (susceptible to call stack limits). | |
value = baseFlatten(value, isDeep, isStrict); | |
} | |
var valIndex = -1, | |
valLength = value.length; | |
result.length += valLength; | |
while (++valIndex < valLength) { | |
result[++resIndex] = value[valIndex]; | |
} | |
} else if (!isStrict) { | |
result[++resIndex] = value; | |
} | |
} | |
return result; | |
} | |
module.exports = baseFlatten; | |
},{"../lang/isArguments":77,"../lang/isArray":78,"./isLength":64,"./isObjectLike":65}],26:[function(require,module,exports){ | |
var toObject = require('./toObject'); | |
/** | |
* The base implementation of `baseForIn` and `baseForOwn` which iterates | |
* over `object` properties returned by `keysFunc` invoking `iteratee` for | |
* each property. Iterator functions may exit iteration early by explicitly | |
* returning `false`. | |
* | |
* @private | |
* @param {Object} object The object to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @param {Function} keysFunc The function to get the keys of `object`. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseFor(object, iteratee, keysFunc) { | |
var index = -1, | |
iterable = toObject(object), | |
props = keysFunc(object), | |
length = props.length; | |
while (++index < length) { | |
var key = props[index]; | |
if (iteratee(iterable[key], key, iterable) === false) { | |
break; | |
} | |
} | |
return object; | |
} | |
module.exports = baseFor; | |
},{"./toObject":75}],27:[function(require,module,exports){ | |
var baseFor = require('./baseFor'), | |
keysIn = require('../object/keysIn'); | |
/** | |
* The base implementation of `_.forIn` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Object} object The object to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseForIn(object, iteratee) { | |
return baseFor(object, iteratee, keysIn); | |
} | |
module.exports = baseForIn; | |
},{"../object/keysIn":92,"./baseFor":26}],28:[function(require,module,exports){ | |
var baseFor = require('./baseFor'), | |
keys = require('../object/keys'); | |
/** | |
* The base implementation of `_.forOwn` without support for callback | |
* shorthands and `this` binding. | |
* | |
* @private | |
* @param {Object} object The object to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Object} Returns `object`. | |
*/ | |
function baseForOwn(object, iteratee) { | |
return baseFor(object, iteratee, keys); | |
} | |
module.exports = baseForOwn; | |
},{"../object/keys":91,"./baseFor":26}],29:[function(require,module,exports){ | |
var isFunction = require('../lang/isFunction'); | |
/** | |
* The base implementation of `_.functions` which creates an array of | |
* `object` function property names filtered from those provided. | |
* | |
* @private | |
* @param {Object} object The object to inspect. | |
* @param {Array} props The property names to filter. | |
* @returns {Array} Returns the new array of filtered property names. | |
*/ | |
function baseFunctions(object, props) { | |
var index = -1, | |
length = props.length, | |
resIndex = -1, | |
result = []; | |
while (++index < length) { | |
var key = props[index]; | |
if (isFunction(object[key])) { | |
result[++resIndex] = key; | |
} | |
} | |
return result; | |
} | |
module.exports = baseFunctions; | |
},{"../lang/isFunction":80}],30:[function(require,module,exports){ | |
var baseEach = require('./baseEach'), | |
isLength = require('./isLength'); | |
/** | |
* The base implementation of `_.invoke` which requires additional arguments | |
* to be provided as an array of arguments rather than individually. | |
* | |
* @private | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function|string} methodName The name of the method to invoke or | |
* the function invoked per iteration. | |
* @param {Array} [args] The arguments to invoke the method with. | |
* @returns {Array} Returns the array of results. | |
*/ | |
function baseInvoke(collection, methodName, args) { | |
var index = -1, | |
isFunc = typeof methodName == 'function', | |
length = collection ? collection.length : 0, | |
result = isLength(length) ? Array(length) : []; | |
baseEach(collection, function(value) { | |
var func = isFunc ? methodName : (value != null && value[methodName]); | |
result[++index] = func ? func.apply(value, args) : undefined; | |
}); | |
return result; | |
} | |
module.exports = baseInvoke; | |
},{"./baseEach":24,"./isLength":64}],31:[function(require,module,exports){ | |
var baseIsEqualDeep = require('./baseIsEqualDeep'); | |
/** | |
* The base implementation of `_.isEqual` without support for `this` binding | |
* `customizer` functions. | |
* | |
* @private | |
* @param {*} value The value to compare. | |
* @param {*} other The other value to compare. | |
* @param {Function} [customizer] The function to customize comparing values. | |
* @param {boolean} [isWhere] Specify performing partial comparisons. | |
* @param {Array} [stackA] Tracks traversed `value` objects. | |
* @param {Array} [stackB] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the values are equivalent, else `false`. | |
*/ | |
function baseIsEqual(value, other, customizer, isWhere, stackA, stackB) { | |
// Exit early for identical values. | |
if (value === other) { | |
// Treat `+0` vs. `-0` as not equal. | |
return value !== 0 || (1 / value == 1 / other); | |
} | |
var valType = typeof value, | |
othType = typeof other; | |
// Exit early for unlike primitive values. | |
if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') || | |
value == null || other == null) { | |
// Return `false` unless both values are `NaN`. | |
return value !== value && other !== other; | |
} | |
return baseIsEqualDeep(value, other, baseIsEqual, customizer, isWhere, stackA, stackB); | |
} | |
module.exports = baseIsEqual; | |
},{"./baseIsEqualDeep":32}],32:[function(require,module,exports){ | |
var equalArrays = require('./equalArrays'), | |
equalByTag = require('./equalByTag'), | |
equalObjects = require('./equalObjects'), | |
isArray = require('../lang/isArray'), | |
isTypedArray = require('../lang/isTypedArray'); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
objectTag = '[object Object]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* A specialized version of `baseIsEqual` for arrays and objects which performs | |
* deep comparisons and tracks traversed objects enabling objects with circular | |
* references to be compared. | |
* | |
* @private | |
* @param {Object} object The object to compare. | |
* @param {Object} other The other object to compare. | |
* @param {Function} equalFunc The function to determine equivalents of values. | |
* @param {Function} [customizer] The function to customize comparing objects. | |
* @param {boolean} [isWhere] Specify performing partial comparisons. | |
* @param {Array} [stackA=[]] Tracks traversed `value` objects. | |
* @param {Array} [stackB=[]] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | |
*/ | |
function baseIsEqualDeep(object, other, equalFunc, customizer, isWhere, stackA, stackB) { | |
var objIsArr = isArray(object), | |
othIsArr = isArray(other), | |
objTag = arrayTag, | |
othTag = arrayTag; | |
if (!objIsArr) { | |
objTag = objToString.call(object); | |
if (objTag == argsTag) { | |
objTag = objectTag; | |
} else if (objTag != objectTag) { | |
objIsArr = isTypedArray(object); | |
} | |
} | |
if (!othIsArr) { | |
othTag = objToString.call(other); | |
if (othTag == argsTag) { | |
othTag = objectTag; | |
} else if (othTag != objectTag) { | |
othIsArr = isTypedArray(other); | |
} | |
} | |
var objIsObj = objTag == objectTag, | |
othIsObj = othTag == objectTag, | |
isSameTag = objTag == othTag; | |
if (isSameTag && !(objIsArr || objIsObj)) { | |
return equalByTag(object, other, objTag); | |
} | |
var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), | |
othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); | |
if (valWrapped || othWrapped) { | |
return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isWhere, stackA, stackB); | |
} | |
if (!isSameTag) { | |
return false; | |
} | |
// Assume cyclic values are equal. | |
// For more information on detecting circular references see https://es5.github.io/#JO. | |
stackA || (stackA = []); | |
stackB || (stackB = []); | |
var length = stackA.length; | |
while (length--) { | |
if (stackA[length] == object) { | |
return stackB[length] == other; | |
} | |
} | |
// Add `object` and `other` to the stack of traversed objects. | |
stackA.push(object); | |
stackB.push(other); | |
var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isWhere, stackA, stackB); | |
stackA.pop(); | |
stackB.pop(); | |
return result; | |
} | |
module.exports = baseIsEqualDeep; | |
},{"../lang/isArray":78,"../lang/isTypedArray":85,"./equalArrays":53,"./equalByTag":54,"./equalObjects":55}],33:[function(require,module,exports){ | |
/** | |
* The base implementation of `_.isFunction` without support for environments | |
* with incorrect `typeof` results. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
*/ | |
function baseIsFunction(value) { | |
// Avoid a Chakra JIT bug in compatibility modes of IE 11. | |
// See https://github.com/jashkenas/underscore/issues/1621 for more details. | |
return typeof value == 'function' || false; | |
} | |
module.exports = baseIsFunction; | |
},{}],34:[function(require,module,exports){ | |
var baseIsEqual = require('./baseIsEqual'); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* The base implementation of `_.isMatch` without support for callback | |
* shorthands or `this` binding. | |
* | |
* @private | |
* @param {Object} object The object to inspect. | |
* @param {Array} props The source property names to match. | |
* @param {Array} values The source values to match. | |
* @param {Array} strictCompareFlags Strict comparison flags for source values. | |
* @param {Function} [customizer] The function to customize comparing objects. | |
* @returns {boolean} Returns `true` if `object` is a match, else `false`. | |
*/ | |
function baseIsMatch(object, props, values, strictCompareFlags, customizer) { | |
var length = props.length; | |
if (object == null) { | |
return !length; | |
} | |
var index = -1, | |
noCustomizer = !customizer; | |
while (++index < length) { | |
if ((noCustomizer && strictCompareFlags[index]) | |
? values[index] !== object[props[index]] | |
: !hasOwnProperty.call(object, props[index]) | |
) { | |
return false; | |
} | |
} | |
index = -1; | |
while (++index < length) { | |
var key = props[index]; | |
if (noCustomizer && strictCompareFlags[index]) { | |
var result = hasOwnProperty.call(object, key); | |
} else { | |
var objValue = object[key], | |
srcValue = values[index]; | |
result = customizer ? customizer(objValue, srcValue, key) : undefined; | |
if (typeof result == 'undefined') { | |
result = baseIsEqual(srcValue, objValue, customizer, true); | |
} | |
} | |
if (!result) { | |
return false; | |
} | |
} | |
return true; | |
} | |
module.exports = baseIsMatch; | |
},{"./baseIsEqual":31}],35:[function(require,module,exports){ | |
var baseEach = require('./baseEach'); | |
/** | |
* The base implementation of `_.map` without support for callback shorthands | |
* or `this` binding. | |
* | |
* @private | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function} iteratee The function invoked per iteration. | |
* @returns {Array} Returns the new mapped array. | |
*/ | |
function baseMap(collection, iteratee) { | |
var result = []; | |
baseEach(collection, function(value, key, collection) { | |
result.push(iteratee(value, key, collection)); | |
}); | |
return result; | |
} | |
module.exports = baseMap; | |
},{"./baseEach":24}],36:[function(require,module,exports){ | |
var baseIsMatch = require('./baseIsMatch'), | |
isStrictComparable = require('./isStrictComparable'), | |
keys = require('../object/keys'); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* The base implementation of `_.matches` which does not clone `source`. | |
* | |
* @private | |
* @param {Object} source The object of property values to match. | |
* @returns {Function} Returns the new function. | |
*/ | |
function baseMatches(source) { | |
var props = keys(source), | |
length = props.length; | |
if (length == 1) { | |
var key = props[0], | |
value = source[key]; | |
if (isStrictComparable(value)) { | |
return function(object) { | |
return object != null && object[key] === value && hasOwnProperty.call(object, key); | |
}; | |
} | |
} | |
var values = Array(length), | |
strictCompareFlags = Array(length); | |
while (length--) { | |
value = source[props[length]]; | |
values[length] = value; | |
strictCompareFlags[length] = isStrictComparable(value); | |
} | |
return function(object) { | |
return baseIsMatch(object, props, values, strictCompareFlags); | |
}; | |
} | |
module.exports = baseMatches; | |
},{"../object/keys":91,"./baseIsMatch":34,"./isStrictComparable":66}],37:[function(require,module,exports){ | |
var baseIsEqual = require('./baseIsEqual'), | |
isStrictComparable = require('./isStrictComparable'); | |
/** | |
* The base implementation of `_.matchesProperty` which does not coerce `key` | |
* to a string. | |
* | |
* @private | |
* @param {string} key The key of the property to get. | |
* @param {*} value The value to compare. | |
* @returns {Function} Returns the new function. | |
*/ | |
function baseMatchesProperty(key, value) { | |
if (isStrictComparable(value)) { | |
return function(object) { | |
return object != null && object[key] === value; | |
}; | |
} | |
return function(object) { | |
return object != null && baseIsEqual(value, object[key], null, true); | |
}; | |
} | |
module.exports = baseMatchesProperty; | |
},{"./baseIsEqual":31,"./isStrictComparable":66}],38:[function(require,module,exports){ | |
/** | |
* The base implementation of `_.property` which does not coerce `key` to a string. | |
* | |
* @private | |
* @param {string} key The key of the property to get. | |
* @returns {Function} Returns the new function. | |
*/ | |
function baseProperty(key) { | |
return function(object) { | |
return object == null ? undefined : object[key]; | |
}; | |
} | |
module.exports = baseProperty; | |
},{}],39:[function(require,module,exports){ | |
var identity = require('../utility/identity'), | |
metaMap = require('./metaMap'); | |
/** | |
* The base implementation of `setData` without support for hot loop detection. | |
* | |
* @private | |
* @param {Function} func The function to associate metadata with. | |
* @param {*} data The metadata. | |
* @returns {Function} Returns `func`. | |
*/ | |
var baseSetData = !metaMap ? identity : function(func, data) { | |
metaMap.set(func, data); | |
return func; | |
}; | |
module.exports = baseSetData; | |
},{"../utility/identity":99,"./metaMap":68}],40:[function(require,module,exports){ | |
/** | |
* The base implementation of `_.slice` without an iteratee call guard. | |
* | |
* @private | |
* @param {Array} array The array to slice. | |
* @param {number} [start=0] The start position. | |
* @param {number} [end=array.length] The end position. | |
* @returns {Array} Returns the slice of `array`. | |
*/ | |
function baseSlice(array, start, end) { | |
var index = -1, | |
length = array.length; | |
start = start == null ? 0 : (+start || 0); | |
if (start < 0) { | |
start = -start > length ? 0 : (length + start); | |
} | |
end = (typeof end == 'undefined' || end > length) ? length : (+end || 0); | |
if (end < 0) { | |
end += length; | |
} | |
length = start > end ? 0 : (end - start) >>> 0; | |
start >>>= 0; | |
var result = Array(length); | |
while (++index < length) { | |
result[index] = array[index + start]; | |
} | |
return result; | |
} | |
module.exports = baseSlice; | |
},{}],41:[function(require,module,exports){ | |
var baseEach = require('./baseEach'); | |
/** | |
* The base implementation of `_.some` without support for callback shorthands | |
* or `this` binding. | |
* | |
* @private | |
* @param {Array|Object|string} collection The collection to iterate over. | |
* @param {Function} predicate The function invoked per iteration. | |
* @returns {boolean} Returns `true` if any element passes the predicate check, | |
* else `false`. | |
*/ | |
function baseSome(collection, predicate) { | |
var result; | |
baseEach(collection, function(value, index, collection) { | |
result = predicate(value, index, collection); | |
return !result; | |
}); | |
return !!result; | |
} | |
module.exports = baseSome; | |
},{"./baseEach":24}],42:[function(require,module,exports){ | |
/** | |
* Converts `value` to a string if it is not one. An empty string is returned | |
* for `null` or `undefined` values. | |
* | |
* @private | |
* @param {*} value The value to process. | |
* @returns {string} Returns the string. | |
*/ | |
function baseToString(value) { | |
if (typeof value == 'string') { | |
return value; | |
} | |
return value == null ? '' : (value + ''); | |
} | |
module.exports = baseToString; | |
},{}],43:[function(require,module,exports){ | |
var identity = require('../utility/identity'); | |
/** | |
* A specialized version of `baseCallback` which only supports `this` binding | |
* and specifying the number of arguments to provide to `func`. | |
* | |
* @private | |
* @param {Function} func The function to bind. | |
* @param {*} thisArg The `this` binding of `func`. | |
* @param {number} [argCount] The number of arguments to provide to `func`. | |
* @returns {Function} Returns the callback. | |
*/ | |
function bindCallback(func, thisArg, argCount) { | |
if (typeof func != 'function') { | |
return identity; | |
} | |
if (typeof thisArg == 'undefined') { | |
return func; | |
} | |
switch (argCount) { | |
case 1: return function(value) { | |
return func.call(thisArg, value); | |
}; | |
case 3: return function(value, index, collection) { | |
return func.call(thisArg, value, index, collection); | |
}; | |
case 4: return function(accumulator, value, index, collection) { | |
return func.call(thisArg, accumulator, value, index, collection); | |
}; | |
case 5: return function(value, other, key, object, source) { | |
return func.call(thisArg, value, other, key, object, source); | |
}; | |
} | |
return function() { | |
return func.apply(thisArg, arguments); | |
}; | |
} | |
module.exports = bindCallback; | |
},{"../utility/identity":99}],44:[function(require,module,exports){ | |
(function (global){ | |
var constant = require('../utility/constant'), | |
isNative = require('../lang/isNative'); | |
/** Native method references. */ | |
var ArrayBuffer = isNative(ArrayBuffer = global.ArrayBuffer) && ArrayBuffer, | |
bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice, | |
floor = Math.floor, | |
Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array; | |
/** Used to clone array buffers. */ | |
var Float64Array = (function() { | |
// Safari 5 errors when using an array buffer to initialize a typed array | |
// where the array buffer's `byteLength` is not a multiple of the typed | |
// array's `BYTES_PER_ELEMENT`. | |
try { | |
var func = isNative(func = global.Float64Array) && func, | |
result = new func(new ArrayBuffer(10), 0, 1) && func; | |
} catch(e) {} | |
return result; | |
}()); | |
/** Used as the size, in bytes, of each `Float64Array` element. */ | |
var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0; | |
/** | |
* Creates a clone of the given array buffer. | |
* | |
* @private | |
* @param {ArrayBuffer} buffer The array buffer to clone. | |
* @returns {ArrayBuffer} Returns the cloned array buffer. | |
*/ | |
function bufferClone(buffer) { | |
return bufferSlice.call(buffer, 0); | |
} | |
if (!bufferSlice) { | |
// PhantomJS has `ArrayBuffer` and `Uint8Array` but not `Float64Array`. | |
bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) { | |
var byteLength = buffer.byteLength, | |
floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0, | |
offset = floatLength * FLOAT64_BYTES_PER_ELEMENT, | |
result = new ArrayBuffer(byteLength); | |
if (floatLength) { | |
var view = new Float64Array(result, 0, floatLength); | |
view.set(new Float64Array(buffer, 0, floatLength)); | |
} | |
if (byteLength != offset) { | |
view = new Uint8Array(result, offset); | |
view.set(new Uint8Array(buffer, offset)); | |
} | |
return result; | |
}; | |
} | |
module.exports = bufferClone; | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{"../lang/isNative":81,"../utility/constant":98}],45:[function(require,module,exports){ | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMax = Math.max; | |
/** | |
* Creates an array that is the composition of partially applied arguments, | |
* placeholders, and provided arguments into a single array of arguments. | |
* | |
* @private | |
* @param {Array|Object} args The provided arguments. | |
* @param {Array} partials The arguments to prepend to those provided. | |
* @param {Array} holders The `partials` placeholder indexes. | |
* @returns {Array} Returns the new array of composed arguments. | |
*/ | |
function composeArgs(args, partials, holders) { | |
var holdersLength = holders.length, | |
argsIndex = -1, | |
argsLength = nativeMax(args.length - holdersLength, 0), | |
leftIndex = -1, | |
leftLength = partials.length, | |
result = Array(argsLength + leftLength); | |
while (++leftIndex < leftLength) { | |
result[leftIndex] = partials[leftIndex]; | |
} | |
while (++argsIndex < holdersLength) { | |
result[holders[argsIndex]] = args[argsIndex]; | |
} | |
while (argsLength--) { | |
result[leftIndex++] = args[argsIndex++]; | |
} | |
return result; | |
} | |
module.exports = composeArgs; | |
},{}],46:[function(require,module,exports){ | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMax = Math.max; | |
/** | |
* This function is like `composeArgs` except that the arguments composition | |
* is tailored for `_.partialRight`. | |
* | |
* @private | |
* @param {Array|Object} args The provided arguments. | |
* @param {Array} partials The arguments to append to those provided. | |
* @param {Array} holders The `partials` placeholder indexes. | |
* @returns {Array} Returns the new array of composed arguments. | |
*/ | |
function composeArgsRight(args, partials, holders) { | |
var holdersIndex = -1, | |
holdersLength = holders.length, | |
argsIndex = -1, | |
argsLength = nativeMax(args.length - holdersLength, 0), | |
rightIndex = -1, | |
rightLength = partials.length, | |
result = Array(argsLength + rightLength); | |
while (++argsIndex < argsLength) { | |
result[argsIndex] = args[argsIndex]; | |
} | |
var pad = argsIndex; | |
while (++rightIndex < rightLength) { | |
result[pad + rightIndex] = partials[rightIndex]; | |
} | |
while (++holdersIndex < holdersLength) { | |
result[pad + holders[holdersIndex]] = args[argsIndex++]; | |
} | |
return result; | |
} | |
module.exports = composeArgsRight; | |
},{}],47:[function(require,module,exports){ | |
var bindCallback = require('./bindCallback'), | |
isIterateeCall = require('./isIterateeCall'); | |
/** | |
* Creates a function that assigns properties of source object(s) to a given | |
* destination object. | |
* | |
* @private | |
* @param {Function} assigner The function to assign values. | |
* @returns {Function} Returns the new assigner function. | |
*/ | |
function createAssigner(assigner) { | |
return function() { | |
var length = arguments.length, | |
object = arguments[0]; | |
if (length < 2 || object == null) { | |
return object; | |
} | |
if (length > 3 && isIterateeCall(arguments[1], arguments[2], arguments[3])) { | |
length = 2; | |
} | |
// Juggle arguments. | |
if (length > 3 && typeof arguments[length - 2] == 'function') { | |
var customizer = bindCallback(arguments[--length - 1], arguments[length--], 5); | |
} else if (length > 2 && typeof arguments[length - 1] == 'function') { | |
customizer = arguments[--length]; | |
} | |
var index = 0; | |
while (++index < length) { | |
var source = arguments[index]; | |
if (source) { | |
assigner(object, source, customizer); | |
} | |
} | |
return object; | |
}; | |
} | |
module.exports = createAssigner; | |
},{"./bindCallback":43,"./isIterateeCall":63}],48:[function(require,module,exports){ | |
var createCtorWrapper = require('./createCtorWrapper'); | |
/** | |
* Creates a function that wraps `func` and invokes it with the `this` | |
* binding of `thisArg`. | |
* | |
* @private | |
* @param {Function} func The function to bind. | |
* @param {*} [thisArg] The `this` binding of `func`. | |
* @returns {Function} Returns the new bound function. | |
*/ | |
function createBindWrapper(func, thisArg) { | |
var Ctor = createCtorWrapper(func); | |
function wrapper() { | |
return (this instanceof wrapper ? Ctor : func).apply(thisArg, arguments); | |
} | |
return wrapper; | |
} | |
module.exports = createBindWrapper; | |
},{"./createCtorWrapper":49}],49:[function(require,module,exports){ | |
var baseCreate = require('./baseCreate'), | |
isObject = require('../lang/isObject'); | |
/** | |
* Creates a function that produces an instance of `Ctor` regardless of | |
* whether it was invoked as part of a `new` expression or by `call` or `apply`. | |
* | |
* @private | |
* @param {Function} Ctor The constructor to wrap. | |
* @returns {Function} Returns the new wrapped function. | |
*/ | |
function createCtorWrapper(Ctor) { | |
return function() { | |
var thisBinding = baseCreate(Ctor.prototype), | |
result = Ctor.apply(thisBinding, arguments); | |
// Mimic the constructor's `return` behavior. | |
// See https://es5.github.io/#x13.2.2 for more details. | |
return isObject(result) ? result : thisBinding; | |
}; | |
} | |
module.exports = createCtorWrapper; | |
},{"../lang/isObject":82,"./baseCreate":23}],50:[function(require,module,exports){ | |
var arrayCopy = require('./arrayCopy'), | |
composeArgs = require('./composeArgs'), | |
composeArgsRight = require('./composeArgsRight'), | |
createCtorWrapper = require('./createCtorWrapper'), | |
reorder = require('./reorder'), | |
replaceHolders = require('./replaceHolders'); | |
/** Used to compose bitmasks for wrapper metadata. */ | |
var BIND_FLAG = 1, | |
BIND_KEY_FLAG = 2, | |
CURRY_BOUND_FLAG = 4, | |
CURRY_FLAG = 8, | |
CURRY_RIGHT_FLAG = 16, | |
PARTIAL_FLAG = 32, | |
PARTIAL_RIGHT_FLAG = 64, | |
ARY_FLAG = 256; | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMax = Math.max; | |
/** | |
* Creates a function that wraps `func` and invokes it with optional `this` | |
* binding of, partial application, and currying. | |
* | |
* @private | |
* @param {Function|string} func The function or method name to reference. | |
* @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. | |
* @param {*} [thisArg] The `this` binding of `func`. | |
* @param {Array} [partials] The arguments to prepend to those provided to the new function. | |
* @param {Array} [holders] The `partials` placeholder indexes. | |
* @param {Array} [partialsRight] The arguments to append to those provided to the new function. | |
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes. | |
* @param {Array} [argPos] The argument positions of the new function. | |
* @param {number} [ary] The arity cap of `func`. | |
* @param {number} [arity] The arity of `func`. | |
* @returns {Function} Returns the new wrapped function. | |
*/ | |
function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { | |
var isAry = bitmask & ARY_FLAG, | |
isBind = bitmask & BIND_FLAG, | |
isBindKey = bitmask & BIND_KEY_FLAG, | |
isCurry = bitmask & CURRY_FLAG, | |
isCurryBound = bitmask & CURRY_BOUND_FLAG, | |
isCurryRight = bitmask & CURRY_RIGHT_FLAG; | |
var Ctor = !isBindKey && createCtorWrapper(func), | |
key = func; | |
function wrapper() { | |
// Avoid `arguments` object use disqualifying optimizations by | |
// converting it to an array before providing it to other functions. | |
var length = arguments.length, | |
index = length, | |
args = Array(length); | |
while (index--) { | |
args[index] = arguments[index]; | |
} | |
if (partials) { | |
args = composeArgs(args, partials, holders); | |
} | |
if (partialsRight) { | |
args = composeArgsRight(args, partialsRight, holdersRight); | |
} | |
if (isCurry || isCurryRight) { | |
var placeholder = wrapper.placeholder, | |
argsHolders = replaceHolders(args, placeholder); | |
length -= argsHolders.length; | |
if (length < arity) { | |
var newArgPos = argPos ? arrayCopy(argPos) : null, | |
newArity = nativeMax(arity - length, 0), | |
newsHolders = isCurry ? argsHolders : null, | |
newHoldersRight = isCurry ? null : argsHolders, | |
newPartials = isCurry ? args : null, | |
newPartialsRight = isCurry ? null : args; | |
bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); | |
bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); | |
if (!isCurryBound) { | |
bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); | |
} | |
var result = createHybridWrapper(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity); | |
result.placeholder = placeholder; | |
return result; | |
} | |
} | |
var thisBinding = isBind ? thisArg : this; | |
if (isBindKey) { | |
func = thisBinding[key]; | |
} | |
if (argPos) { | |
args = reorder(args, argPos); | |
} | |
if (isAry && ary < args.length) { | |
args.length = ary; | |
} | |
return (this instanceof wrapper ? (Ctor || createCtorWrapper(func)) : func).apply(thisBinding, args); | |
} | |
return wrapper; | |
} | |
module.exports = createHybridWrapper; | |
},{"./arrayCopy":13,"./composeArgs":45,"./composeArgsRight":46,"./createCtorWrapper":49,"./reorder":71,"./replaceHolders":72}],51:[function(require,module,exports){ | |
var createCtorWrapper = require('./createCtorWrapper'); | |
/** Used to compose bitmasks for wrapper metadata. */ | |
var BIND_FLAG = 1; | |
/** | |
* Creates a function that wraps `func` and invokes it with the optional `this` | |
* binding of `thisArg` and the `partials` prepended to those provided to | |
* the wrapper. | |
* | |
* @private | |
* @param {Function} func The function to partially apply arguments to. | |
* @param {number} bitmask The bitmask of flags. See `createWrapper` for more details. | |
* @param {*} thisArg The `this` binding of `func`. | |
* @param {Array} partials The arguments to prepend to those provided to the new function. | |
* @returns {Function} Returns the new bound function. | |
*/ | |
function createPartialWrapper(func, bitmask, thisArg, partials) { | |
var isBind = bitmask & BIND_FLAG, | |
Ctor = createCtorWrapper(func); | |
function wrapper() { | |
// Avoid `arguments` object use disqualifying optimizations by | |
// converting it to an array before providing it `func`. | |
var argsIndex = -1, | |
argsLength = arguments.length, | |
leftIndex = -1, | |
leftLength = partials.length, | |
args = Array(argsLength + leftLength); | |
while (++leftIndex < leftLength) { | |
args[leftIndex] = partials[leftIndex]; | |
} | |
while (argsLength--) { | |
args[leftIndex++] = arguments[++argsIndex]; | |
} | |
return (this instanceof wrapper ? Ctor : func).apply(isBind ? thisArg : this, args); | |
} | |
return wrapper; | |
} | |
module.exports = createPartialWrapper; | |
},{"./createCtorWrapper":49}],52:[function(require,module,exports){ | |
var baseSetData = require('./baseSetData'), | |
createBindWrapper = require('./createBindWrapper'), | |
createHybridWrapper = require('./createHybridWrapper'), | |
createPartialWrapper = require('./createPartialWrapper'), | |
getData = require('./getData'), | |
mergeData = require('./mergeData'), | |
setData = require('./setData'); | |
/** Used to compose bitmasks for wrapper metadata. */ | |
var BIND_FLAG = 1, | |
BIND_KEY_FLAG = 2, | |
PARTIAL_FLAG = 32, | |
PARTIAL_RIGHT_FLAG = 64; | |
/** Used as the `TypeError` message for "Functions" methods. */ | |
var FUNC_ERROR_TEXT = 'Expected a function'; | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMax = Math.max; | |
/** | |
* Creates a function that either curries or invokes `func` with optional | |
* `this` binding and partially applied arguments. | |
* | |
* @private | |
* @param {Function|string} func The function or method name to reference. | |
* @param {number} bitmask The bitmask of flags. | |
* The bitmask may be composed of the following flags: | |
* 1 - `_.bind` | |
* 2 - `_.bindKey` | |
* 4 - `_.curry` or `_.curryRight` of a bound function | |
* 8 - `_.curry` | |
* 16 - `_.curryRight` | |
* 32 - `_.partial` | |
* 64 - `_.partialRight` | |
* 128 - `_.rearg` | |
* 256 - `_.ary` | |
* @param {*} [thisArg] The `this` binding of `func`. | |
* @param {Array} [partials] The arguments to be partially applied. | |
* @param {Array} [holders] The `partials` placeholder indexes. | |
* @param {Array} [argPos] The argument positions of the new function. | |
* @param {number} [ary] The arity cap of `func`. | |
* @param {number} [arity] The arity of `func`. | |
* @returns {Function} Returns the new wrapped function. | |
*/ | |
function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { | |
var isBindKey = bitmask & BIND_KEY_FLAG; | |
if (!isBindKey && typeof func != 'function') { | |
throw new TypeError(FUNC_ERROR_TEXT); | |
} | |
var length = partials ? partials.length : 0; | |
if (!length) { | |
bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); | |
partials = holders = null; | |
} | |
length -= (holders ? holders.length : 0); | |
if (bitmask & PARTIAL_RIGHT_FLAG) { | |
var partialsRight = partials, | |
holdersRight = holders; | |
partials = holders = null; | |
} | |
var data = !isBindKey && getData(func), | |
newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; | |
if (data && data !== true) { | |
mergeData(newData, data); | |
bitmask = newData[1]; | |
arity = newData[9]; | |
} | |
newData[9] = arity == null | |
? (isBindKey ? 0 : func.length) | |
: (nativeMax(arity - length, 0) || 0); | |
if (bitmask == BIND_FLAG) { | |
var result = createBindWrapper(newData[0], newData[2]); | |
} else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) { | |
result = createPartialWrapper.apply(undefined, newData); | |
} else { | |
result = createHybridWrapper.apply(undefined, newData); | |
} | |
var setter = data ? baseSetData : setData; | |
return setter(result, newData); | |
} | |
module.exports = createWrapper; | |
},{"./baseSetData":39,"./createBindWrapper":48,"./createHybridWrapper":50,"./createPartialWrapper":51,"./getData":57,"./mergeData":67,"./setData":73}],53:[function(require,module,exports){ | |
/** | |
* A specialized version of `baseIsEqualDeep` for arrays with support for | |
* partial deep comparisons. | |
* | |
* @private | |
* @param {Array} array The array to compare. | |
* @param {Array} other The other array to compare. | |
* @param {Function} equalFunc The function to determine equivalents of values. | |
* @param {Function} [customizer] The function to customize comparing arrays. | |
* @param {boolean} [isWhere] Specify performing partial comparisons. | |
* @param {Array} [stackA] Tracks traversed `value` objects. | |
* @param {Array} [stackB] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. | |
*/ | |
function equalArrays(array, other, equalFunc, customizer, isWhere, stackA, stackB) { | |
var index = -1, | |
arrLength = array.length, | |
othLength = other.length, | |
result = true; | |
if (arrLength != othLength && !(isWhere && othLength > arrLength)) { | |
return false; | |
} | |
// Deep compare the contents, ignoring non-numeric properties. | |
while (result && ++index < arrLength) { | |
var arrValue = array[index], | |
othValue = other[index]; | |
result = undefined; | |
if (customizer) { | |
result = isWhere | |
? customizer(othValue, arrValue, index) | |
: customizer(arrValue, othValue, index); | |
} | |
if (typeof result == 'undefined') { | |
// Recursively compare arrays (susceptible to call stack limits). | |
if (isWhere) { | |
var othIndex = othLength; | |
while (othIndex--) { | |
othValue = other[othIndex]; | |
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB); | |
if (result) { | |
break; | |
} | |
} | |
} else { | |
result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isWhere, stackA, stackB); | |
} | |
} | |
} | |
return !!result; | |
} | |
module.exports = equalArrays; | |
},{}],54:[function(require,module,exports){ | |
/** `Object#toString` result references. */ | |
var boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
numberTag = '[object Number]', | |
regexpTag = '[object RegExp]', | |
stringTag = '[object String]'; | |
/** | |
* A specialized version of `baseIsEqualDeep` for comparing objects of | |
* the same `toStringTag`. | |
* | |
* **Note:** This function only supports comparing values with tags of | |
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. | |
* | |
* @private | |
* @param {Object} value The object to compare. | |
* @param {Object} other The other object to compare. | |
* @param {string} tag The `toStringTag` of the objects to compare. | |
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | |
*/ | |
function equalByTag(object, other, tag) { | |
switch (tag) { | |
case boolTag: | |
case dateTag: | |
// Coerce dates and booleans to numbers, dates to milliseconds and booleans | |
// to `1` or `0` treating invalid dates coerced to `NaN` as not equal. | |
return +object == +other; | |
case errorTag: | |
return object.name == other.name && object.message == other.message; | |
case numberTag: | |
// Treat `NaN` vs. `NaN` as equal. | |
return (object != +object) | |
? other != +other | |
// But, treat `-0` vs. `+0` as not equal. | |
: (object == 0 ? ((1 / object) == (1 / other)) : object == +other); | |
case regexpTag: | |
case stringTag: | |
// Coerce regexes to strings and treat strings primitives and string | |
// objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. | |
return object == (other + ''); | |
} | |
return false; | |
} | |
module.exports = equalByTag; | |
},{}],55:[function(require,module,exports){ | |
var keys = require('../object/keys'); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* A specialized version of `baseIsEqualDeep` for objects with support for | |
* partial deep comparisons. | |
* | |
* @private | |
* @param {Object} object The object to compare. | |
* @param {Object} other The other object to compare. | |
* @param {Function} equalFunc The function to determine equivalents of values. | |
* @param {Function} [customizer] The function to customize comparing values. | |
* @param {boolean} [isWhere] Specify performing partial comparisons. | |
* @param {Array} [stackA] Tracks traversed `value` objects. | |
* @param {Array} [stackB] Tracks traversed `other` objects. | |
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`. | |
*/ | |
function equalObjects(object, other, equalFunc, customizer, isWhere, stackA, stackB) { | |
var objProps = keys(object), | |
objLength = objProps.length, | |
othProps = keys(other), | |
othLength = othProps.length; | |
if (objLength != othLength && !isWhere) { | |
return false; | |
} | |
var hasCtor, | |
index = -1; | |
while (++index < objLength) { | |
var key = objProps[index], | |
result = hasOwnProperty.call(other, key); | |
if (result) { | |
var objValue = object[key], | |
othValue = other[key]; | |
result = undefined; | |
if (customizer) { | |
result = isWhere | |
? customizer(othValue, objValue, key) | |
: customizer(objValue, othValue, key); | |
} | |
if (typeof result == 'undefined') { | |
// Recursively compare objects (susceptible to call stack limits). | |
result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isWhere, stackA, stackB); | |
} | |
} | |
if (!result) { | |
return false; | |
} | |
hasCtor || (hasCtor = key == 'constructor'); | |
} | |
if (!hasCtor) { | |
var objCtor = object.constructor, | |
othCtor = other.constructor; | |
// Non `Object` object instances with different constructors are not equal. | |
if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && | |
!(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { | |
return false; | |
} | |
} | |
return true; | |
} | |
module.exports = equalObjects; | |
},{"../object/keys":91}],56:[function(require,module,exports){ | |
/** Used to map characters to HTML entities. */ | |
var htmlEscapes = { | |
'&': '&', | |
'<': '<', | |
'>': '>', | |
'"': '"', | |
"'": ''', | |
'`': '`' | |
}; | |
/** | |
* Used by `_.escape` to convert characters to HTML entities. | |
* | |
* @private | |
* @param {string} chr The matched character to escape. | |
* @returns {string} Returns the escaped character. | |
*/ | |
function escapeHtmlChar(chr) { | |
return htmlEscapes[chr]; | |
} | |
module.exports = escapeHtmlChar; | |
},{}],57:[function(require,module,exports){ | |
var metaMap = require('./metaMap'), | |
noop = require('../utility/noop'); | |
/** | |
* Gets metadata for `func`. | |
* | |
* @private | |
* @param {Function} func The function to query. | |
* @returns {*} Returns the metadata for `func`. | |
*/ | |
var getData = !metaMap ? noop : function(func) { | |
return metaMap.get(func); | |
}; | |
module.exports = getData; | |
},{"../utility/noop":101,"./metaMap":68}],58:[function(require,module,exports){ | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Initializes an array clone. | |
* | |
* @private | |
* @param {Array} array The array to clone. | |
* @returns {Array} Returns the initialized clone. | |
*/ | |
function initCloneArray(array) { | |
var length = array.length, | |
result = new array.constructor(length); | |
// Add array properties assigned by `RegExp#exec`. | |
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { | |
result.index = array.index; | |
result.input = array.input; | |
} | |
return result; | |
} | |
module.exports = initCloneArray; | |
},{}],59:[function(require,module,exports){ | |
var bufferClone = require('./bufferClone'); | |
/** `Object#toString` result references. */ | |
var boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
numberTag = '[object Number]', | |
regexpTag = '[object RegExp]', | |
stringTag = '[object String]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to match `RegExp` flags from their coerced string values. */ | |
var reFlags = /\w*$/; | |
/** | |
* Initializes an object clone based on its `toStringTag`. | |
* | |
* **Note:** This function only supports cloning values with tags of | |
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. | |
* | |
* | |
* @private | |
* @param {Object} object The object to clone. | |
* @param {string} tag The `toStringTag` of the object to clone. | |
* @param {boolean} [isDeep] Specify a deep clone. | |
* @returns {Object} Returns the initialized clone. | |
*/ | |
function initCloneByTag(object, tag, isDeep) { | |
var Ctor = object.constructor; | |
switch (tag) { | |
case arrayBufferTag: | |
return bufferClone(object); | |
case boolTag: | |
case dateTag: | |
return new Ctor(+object); | |
case float32Tag: case float64Tag: | |
case int8Tag: case int16Tag: case int32Tag: | |
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: | |
var buffer = object.buffer; | |
return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length); | |
case numberTag: | |
case stringTag: | |
return new Ctor(object); | |
case regexpTag: | |
var result = new Ctor(object.source, reFlags.exec(object)); | |
result.lastIndex = object.lastIndex; | |
} | |
return result; | |
} | |
module.exports = initCloneByTag; | |
},{"./bufferClone":44}],60:[function(require,module,exports){ | |
/** | |
* Initializes an object clone. | |
* | |
* @private | |
* @param {Object} object The object to clone. | |
* @returns {Object} Returns the initialized clone. | |
*/ | |
function initCloneObject(object) { | |
var Ctor = object.constructor; | |
if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) { | |
Ctor = Object; | |
} | |
return new Ctor; | |
} | |
module.exports = initCloneObject; | |
},{}],61:[function(require,module,exports){ | |
var baseSetData = require('./baseSetData'), | |
isNative = require('../lang/isNative'), | |
support = require('../support'); | |
/** Used to detect named functions. */ | |
var reFuncName = /^\s*function[ \n\r\t]+\w/; | |
/** Used to detect functions containing a `this` reference. */ | |
var reThis = /\bthis\b/; | |
/** Used to resolve the decompiled source of functions. */ | |
var fnToString = Function.prototype.toString; | |
/** | |
* Checks if `func` is eligible for `this` binding. | |
* | |
* @private | |
* @param {Function} func The function to check. | |
* @returns {boolean} Returns `true` if `func` is eligible, else `false`. | |
*/ | |
function isBindable(func) { | |
var result = !(support.funcNames ? func.name : support.funcDecomp); | |
if (!result) { | |
var source = fnToString.call(func); | |
if (!support.funcNames) { | |
result = !reFuncName.test(source); | |
} | |
if (!result) { | |
// Check if `func` references the `this` keyword and store the result. | |
result = reThis.test(source) || isNative(func); | |
baseSetData(func, result); | |
} | |
} | |
return result; | |
} | |
module.exports = isBindable; | |
},{"../lang/isNative":81,"../support":97,"./baseSetData":39}],62:[function(require,module,exports){ | |
/** | |
* Used as the maximum length of an array-like value. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) | |
* for more details. | |
*/ | |
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; | |
/** | |
* Checks if `value` is a valid array-like index. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. | |
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`. | |
*/ | |
function isIndex(value, length) { | |
value = +value; | |
length = length == null ? MAX_SAFE_INTEGER : length; | |
return value > -1 && value % 1 == 0 && value < length; | |
} | |
module.exports = isIndex; | |
},{}],63:[function(require,module,exports){ | |
var isIndex = require('./isIndex'), | |
isLength = require('./isLength'), | |
isObject = require('../lang/isObject'); | |
/** | |
* Checks if the provided arguments are from an iteratee call. | |
* | |
* @private | |
* @param {*} value The potential iteratee value argument. | |
* @param {*} index The potential iteratee index or key argument. | |
* @param {*} object The potential iteratee object argument. | |
* @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. | |
*/ | |
function isIterateeCall(value, index, object) { | |
if (!isObject(object)) { | |
return false; | |
} | |
var type = typeof index; | |
if (type == 'number') { | |
var length = object.length, | |
prereq = isLength(length) && isIndex(index, length); | |
} else { | |
prereq = type == 'string' && index in object; | |
} | |
var other = object[index]; | |
return prereq && (value === value ? value === other : other !== other); | |
} | |
module.exports = isIterateeCall; | |
},{"../lang/isObject":82,"./isIndex":62,"./isLength":64}],64:[function(require,module,exports){ | |
/** | |
* Used as the maximum length of an array-like value. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) | |
* for more details. | |
*/ | |
var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1; | |
/** | |
* Checks if `value` is a valid array-like length. | |
* | |
* **Note:** This function is based on ES `ToLength`. See the | |
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength) | |
* for more details. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`. | |
*/ | |
function isLength(value) { | |
return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; | |
} | |
module.exports = isLength; | |
},{}],65:[function(require,module,exports){ | |
/** | |
* Checks if `value` is object-like. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is object-like, else `false`. | |
*/ | |
function isObjectLike(value) { | |
return (value && typeof value == 'object') || false; | |
} | |
module.exports = isObjectLike; | |
},{}],66:[function(require,module,exports){ | |
var isObject = require('../lang/isObject'); | |
/** | |
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`. | |
* | |
* @private | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` if suitable for strict | |
* equality comparisons, else `false`. | |
*/ | |
function isStrictComparable(value) { | |
return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value)); | |
} | |
module.exports = isStrictComparable; | |
},{"../lang/isObject":82}],67:[function(require,module,exports){ | |
var arrayCopy = require('./arrayCopy'), | |
composeArgs = require('./composeArgs'), | |
composeArgsRight = require('./composeArgsRight'), | |
replaceHolders = require('./replaceHolders'); | |
/** Used to compose bitmasks for wrapper metadata. */ | |
var BIND_FLAG = 1, | |
BIND_KEY_FLAG = 2, | |
CURRY_BOUND_FLAG = 4, | |
CURRY_RIGHT_FLAG = 16, | |
REARG_FLAG = 128, | |
ARY_FLAG = 256; | |
/** Used as the internal argument placeholder. */ | |
var PLACEHOLDER = '__lodash_placeholder__'; | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMin = Math.min; | |
/** | |
* Merges the function metadata of `source` into `data`. | |
* | |
* Merging metadata reduces the number of wrappers required to invoke a function. | |
* This is possible because methods like `_.bind`, `_.curry`, and `_.partial` | |
* may be applied regardless of execution order. Methods like `_.ary` and `_.rearg` | |
* augment function arguments, making the order in which they are executed important, | |
* preventing the merging of metadata. However, we make an exception for a safe | |
* common case where curried functions have `_.ary` and or `_.rearg` applied. | |
* | |
* @private | |
* @param {Array} data The destination metadata. | |
* @param {Array} source The source metadata. | |
* @returns {Array} Returns `data`. | |
*/ | |
function mergeData(data, source) { | |
var bitmask = data[1], | |
srcBitmask = source[1], | |
newBitmask = bitmask | srcBitmask; | |
var arityFlags = ARY_FLAG | REARG_FLAG, | |
bindFlags = BIND_FLAG | BIND_KEY_FLAG, | |
comboFlags = arityFlags | bindFlags | CURRY_BOUND_FLAG | CURRY_RIGHT_FLAG; | |
var isAry = bitmask & ARY_FLAG && !(srcBitmask & ARY_FLAG), | |
isRearg = bitmask & REARG_FLAG && !(srcBitmask & REARG_FLAG), | |
argPos = (isRearg ? data : source)[7], | |
ary = (isAry ? data : source)[8]; | |
var isCommon = !(bitmask >= REARG_FLAG && srcBitmask > bindFlags) && | |
!(bitmask > bindFlags && srcBitmask >= REARG_FLAG); | |
var isCombo = (newBitmask >= arityFlags && newBitmask <= comboFlags) && | |
(bitmask < REARG_FLAG || ((isRearg || isAry) && argPos.length <= ary)); | |
// Exit early if metadata can't be merged. | |
if (!(isCommon || isCombo)) { | |
return data; | |
} | |
// Use source `thisArg` if available. | |
if (srcBitmask & BIND_FLAG) { | |
data[2] = source[2]; | |
// Set when currying a bound function. | |
newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG; | |
} | |
// Compose partial arguments. | |
var value = source[3]; | |
if (value) { | |
var partials = data[3]; | |
data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value); | |
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]); | |
} | |
// Compose partial right arguments. | |
value = source[5]; | |
if (value) { | |
partials = data[5]; | |
data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value); | |
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]); | |
} | |
// Use source `argPos` if available. | |
value = source[7]; | |
if (value) { | |
data[7] = arrayCopy(value); | |
} | |
// Use source `ary` if it's smaller. | |
if (srcBitmask & ARY_FLAG) { | |
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); | |
} | |
// Use source `arity` if one is not provided. | |
if (data[9] == null) { | |
data[9] = source[9]; | |
} | |
// Use source `func` and merge bitmasks. | |
data[0] = source[0]; | |
data[1] = newBitmask; | |
return data; | |
} | |
module.exports = mergeData; | |
},{"./arrayCopy":13,"./composeArgs":45,"./composeArgsRight":46,"./replaceHolders":72}],68:[function(require,module,exports){ | |
(function (global){ | |
var isNative = require('../lang/isNative'); | |
/** Native method references. */ | |
var WeakMap = isNative(WeakMap = global.WeakMap) && WeakMap; | |
/** Used to store function metadata. */ | |
var metaMap = WeakMap && new WeakMap; | |
module.exports = metaMap; | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{"../lang/isNative":81}],69:[function(require,module,exports){ | |
var toObject = require('./toObject'); | |
/** | |
* A specialized version of `_.pick` that picks `object` properties specified | |
* by the `props` array. | |
* | |
* @private | |
* @param {Object} object The source object. | |
* @param {string[]} props The property names to pick. | |
* @returns {Object} Returns the new object. | |
*/ | |
function pickByArray(object, props) { | |
object = toObject(object); | |
var index = -1, | |
length = props.length, | |
result = {}; | |
while (++index < length) { | |
var key = props[index]; | |
if (key in object) { | |
result[key] = object[key]; | |
} | |
} | |
return result; | |
} | |
module.exports = pickByArray; | |
},{"./toObject":75}],70:[function(require,module,exports){ | |
var baseForIn = require('./baseForIn'); | |
/** | |
* A specialized version of `_.pick` that picks `object` properties `predicate` | |
* returns truthy for. | |
* | |
* @private | |
* @param {Object} object The source object. | |
* @param {Function} predicate The function invoked per iteration. | |
* @returns {Object} Returns the new object. | |
*/ | |
function pickByCallback(object, predicate) { | |
var result = {}; | |
baseForIn(object, function(value, key, object) { | |
if (predicate(value, key, object)) { | |
result[key] = value; | |
} | |
}); | |
return result; | |
} | |
module.exports = pickByCallback; | |
},{"./baseForIn":27}],71:[function(require,module,exports){ | |
var arrayCopy = require('./arrayCopy'), | |
isIndex = require('./isIndex'); | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeMin = Math.min; | |
/** | |
* Reorder `array` according to the specified indexes where the element at | |
* the first index is assigned as the first element, the element at | |
* the second index is assigned as the second element, and so on. | |
* | |
* @private | |
* @param {Array} array The array to reorder. | |
* @param {Array} indexes The arranged array indexes. | |
* @returns {Array} Returns `array`. | |
*/ | |
function reorder(array, indexes) { | |
var arrLength = array.length, | |
length = nativeMin(indexes.length, arrLength), | |
oldArray = arrayCopy(array); | |
while (length--) { | |
var index = indexes[length]; | |
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; | |
} | |
return array; | |
} | |
module.exports = reorder; | |
},{"./arrayCopy":13,"./isIndex":62}],72:[function(require,module,exports){ | |
/** Used as the internal argument placeholder. */ | |
var PLACEHOLDER = '__lodash_placeholder__'; | |
/** | |
* Replaces all `placeholder` elements in `array` with an internal placeholder | |
* and returns an array of their indexes. | |
* | |
* @private | |
* @param {Array} array The array to modify. | |
* @param {*} placeholder The placeholder to replace. | |
* @returns {Array} Returns the new array of placeholder indexes. | |
*/ | |
function replaceHolders(array, placeholder) { | |
var index = -1, | |
length = array.length, | |
resIndex = -1, | |
result = []; | |
while (++index < length) { | |
if (array[index] === placeholder) { | |
array[index] = PLACEHOLDER; | |
result[++resIndex] = index; | |
} | |
} | |
return result; | |
} | |
module.exports = replaceHolders; | |
},{}],73:[function(require,module,exports){ | |
var baseSetData = require('./baseSetData'), | |
now = require('../date/now'); | |
/** Used to detect when a function becomes hot. */ | |
var HOT_COUNT = 150, | |
HOT_SPAN = 16; | |
/** | |
* Sets metadata for `func`. | |
* | |
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short | |
* period of time, it will trip its breaker and transition to an identity function | |
* to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070) | |
* for more details. | |
* | |
* @private | |
* @param {Function} func The function to associate metadata with. | |
* @param {*} data The metadata. | |
* @returns {Function} Returns `func`. | |
*/ | |
var setData = (function() { | |
var count = 0, | |
lastCalled = 0; | |
return function(key, value) { | |
var stamp = now(), | |
remaining = HOT_SPAN - (stamp - lastCalled); | |
lastCalled = stamp; | |
if (remaining > 0) { | |
if (++count >= HOT_COUNT) { | |
return key; | |
} | |
} else { | |
count = 0; | |
} | |
return baseSetData(key, value); | |
}; | |
}()); | |
module.exports = setData; | |
},{"../date/now":8,"./baseSetData":39}],74:[function(require,module,exports){ | |
var isArguments = require('../lang/isArguments'), | |
isArray = require('../lang/isArray'), | |
isIndex = require('./isIndex'), | |
isLength = require('./isLength'), | |
keysIn = require('../object/keysIn'), | |
support = require('../support'); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* A fallback implementation of `Object.keys` which creates an array of the | |
* own enumerable property names of `object`. | |
* | |
* @private | |
* @param {Object} object The object to inspect. | |
* @returns {Array} Returns the array of property names. | |
*/ | |
function shimKeys(object) { | |
var props = keysIn(object), | |
propsLength = props.length, | |
length = propsLength && object.length; | |
var allowIndexes = length && isLength(length) && | |
(isArray(object) || (support.nonEnumArgs && isArguments(object))); | |
var index = -1, | |
result = []; | |
while (++index < propsLength) { | |
var key = props[index]; | |
if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
module.exports = shimKeys; | |
},{"../lang/isArguments":77,"../lang/isArray":78,"../object/keysIn":92,"../support":97,"./isIndex":62,"./isLength":64}],75:[function(require,module,exports){ | |
var isObject = require('../lang/isObject'); | |
/** | |
* Converts `value` to an object if it is not one. | |
* | |
* @private | |
* @param {*} value The value to process. | |
* @returns {Object} Returns the object. | |
*/ | |
function toObject(value) { | |
return isObject(value) ? value : Object(value); | |
} | |
module.exports = toObject; | |
},{"../lang/isObject":82}],76:[function(require,module,exports){ | |
var baseClone = require('../internal/baseClone'), | |
bindCallback = require('../internal/bindCallback'), | |
isIterateeCall = require('../internal/isIterateeCall'); | |
/** | |
* Creates a clone of `value`. If `isDeep` is `true` nested objects are cloned, | |
* otherwise they are assigned by reference. If `customizer` is provided it is | |
* invoked to produce the cloned values. If `customizer` returns `undefined` | |
* cloning is handled by the method instead. The `customizer` is bound to | |
* `thisArg` and invoked with two argument; (value [, index|key, object]). | |
* | |
* **Note:** This method is loosely based on the structured clone algorithm. | |
* The enumerable properties of `arguments` objects and objects created by | |
* constructors other than `Object` are cloned to plain `Object` objects. An | |
* empty object is returned for uncloneable values such as functions, DOM nodes, | |
* Maps, Sets, and WeakMaps. See the [HTML5 specification](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm) | |
* for more details. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to clone. | |
* @param {boolean} [isDeep] Specify a deep clone. | |
* @param {Function} [customizer] The function to customize cloning values. | |
* @param {*} [thisArg] The `this` binding of `customizer`. | |
* @returns {*} Returns the cloned value. | |
* @example | |
* | |
* var users = [ | |
* { 'user': 'barney' }, | |
* { 'user': 'fred' } | |
* ]; | |
* | |
* var shallow = _.clone(users); | |
* shallow[0] === users[0]; | |
* // => true | |
* | |
* var deep = _.clone(users, true); | |
* deep[0] === users[0]; | |
* // => false | |
* | |
* // using a customizer callback | |
* var el = _.clone(document.body, function(value) { | |
* if (_.isElement(value)) { | |
* return value.cloneNode(false); | |
* } | |
* }); | |
* | |
* el === document.body | |
* // => false | |
* el.nodeName | |
* // => BODY | |
* el.childNodes.length; | |
* // => 0 | |
*/ | |
function clone(value, isDeep, customizer, thisArg) { | |
if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) { | |
isDeep = false; | |
} | |
else if (typeof isDeep == 'function') { | |
thisArg = customizer; | |
customizer = isDeep; | |
isDeep = false; | |
} | |
customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 1); | |
return baseClone(value, isDeep, customizer); | |
} | |
module.exports = clone; | |
},{"../internal/baseClone":21,"../internal/bindCallback":43,"../internal/isIterateeCall":63}],77:[function(require,module,exports){ | |
var isLength = require('../internal/isLength'), | |
isObjectLike = require('../internal/isObjectLike'); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as an `arguments` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isArguments(function() { return arguments; }()); | |
* // => true | |
* | |
* _.isArguments([1, 2, 3]); | |
* // => false | |
*/ | |
function isArguments(value) { | |
var length = isObjectLike(value) ? value.length : undefined; | |
return (isLength(length) && objToString.call(value) == argsTag) || false; | |
} | |
module.exports = isArguments; | |
},{"../internal/isLength":64,"../internal/isObjectLike":65}],78:[function(require,module,exports){ | |
var isLength = require('../internal/isLength'), | |
isNative = require('./isNative'), | |
isObjectLike = require('../internal/isObjectLike'); | |
/** `Object#toString` result references. */ | |
var arrayTag = '[object Array]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray; | |
/** | |
* Checks if `value` is classified as an `Array` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isArray([1, 2, 3]); | |
* // => true | |
* | |
* _.isArray(function() { return arguments; }()); | |
* // => false | |
*/ | |
var isArray = nativeIsArray || function(value) { | |
return (isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag) || false; | |
}; | |
module.exports = isArray; | |
},{"../internal/isLength":64,"../internal/isObjectLike":65,"./isNative":81}],79:[function(require,module,exports){ | |
var isArguments = require('./isArguments'), | |
isArray = require('./isArray'), | |
isFunction = require('./isFunction'), | |
isLength = require('../internal/isLength'), | |
isObjectLike = require('../internal/isObjectLike'), | |
isString = require('./isString'), | |
keys = require('../object/keys'); | |
/** | |
* Checks if a value is empty. A value is considered empty unless it is an | |
* `arguments` object, array, string, or jQuery-like collection with a length | |
* greater than `0` or an object with own enumerable properties. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {Array|Object|string} value The value to inspect. | |
* @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; | |
} | |
var length = value.length; | |
if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) || | |
(isObjectLike(value) && isFunction(value.splice)))) { | |
return !length; | |
} | |
return !keys(value).length; | |
} | |
module.exports = isEmpty; | |
},{"../internal/isLength":64,"../internal/isObjectLike":65,"../object/keys":91,"./isArguments":77,"./isArray":78,"./isFunction":80,"./isString":84}],80:[function(require,module,exports){ | |
(function (global){ | |
var baseIsFunction = require('../internal/baseIsFunction'), | |
isNative = require('./isNative'); | |
/** `Object#toString` result references. */ | |
var funcTag = '[object Function]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** Native method references. */ | |
var Uint8Array = isNative(Uint8Array = global.Uint8Array) && Uint8Array; | |
/** | |
* Checks if `value` is classified as a `Function` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isFunction(_); | |
* // => true | |
* | |
* _.isFunction(/abc/); | |
* // => false | |
*/ | |
var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) { | |
// The use of `Object#toString` avoids issues with the `typeof` operator | |
// in older versions of Chrome and Safari which return 'function' for regexes | |
// and Safari 8 equivalents which return 'object' for typed array constructors. | |
return objToString.call(value) == funcTag; | |
}; | |
module.exports = isFunction; | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{"../internal/baseIsFunction":33,"./isNative":81}],81:[function(require,module,exports){ | |
var escapeRegExp = require('../string/escapeRegExp'), | |
isObjectLike = require('../internal/isObjectLike'); | |
/** `Object#toString` result references. */ | |
var funcTag = '[object Function]'; | |
/** Used to detect host constructors (Safari > 5). */ | |
var reHostCtor = /^\[object .+?Constructor\]$/; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to resolve the decompiled source of functions. */ | |
var fnToString = Function.prototype.toString; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** Used to detect if a method is native. */ | |
var reNative = RegExp('^' + | |
escapeRegExp(objToString) | |
.replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' | |
); | |
/** | |
* Checks if `value` is a native function. | |
* | |
* @static | |
* @memberOf _ | |
* @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 (value == null) { | |
return false; | |
} | |
if (objToString.call(value) == funcTag) { | |
return reNative.test(fnToString.call(value)); | |
} | |
return (isObjectLike(value) && reHostCtor.test(value)) || false; | |
} | |
module.exports = isNative; | |
},{"../internal/isObjectLike":65,"../string/escapeRegExp":96}],82:[function(require,module,exports){ | |
/** | |
* Checks if `value` is the language type of `Object`. | |
* (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) | |
* | |
* **Note:** See the [ES5 spec](https://es5.github.io/#x8) for more details. | |
* | |
* @static | |
* @memberOf _ | |
* @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(1); | |
* // => false | |
*/ | |
function isObject(value) { | |
// Avoid a V8 JIT bug in Chrome 19-20. | |
// See https://code.google.com/p/v8/issues/detail?id=2291 for more details. | |
var type = typeof value; | |
return type == 'function' || (value && type == 'object') || false; | |
} | |
module.exports = isObject; | |
},{}],83:[function(require,module,exports){ | |
var isObjectLike = require('../internal/isObjectLike'); | |
/** `Object#toString` result references. */ | |
var regexpTag = '[object RegExp]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `RegExp` object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isRegExp(/abc/); | |
* // => true | |
* | |
* _.isRegExp('/abc/'); | |
* // => false | |
*/ | |
function isRegExp(value) { | |
return (isObjectLike(value) && objToString.call(value) == regexpTag) || false; | |
} | |
module.exports = isRegExp; | |
},{"../internal/isObjectLike":65}],84:[function(require,module,exports){ | |
var isObjectLike = require('../internal/isObjectLike'); | |
/** `Object#toString` result references. */ | |
var stringTag = '[object String]'; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a `String` primitive or object. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isString('abc'); | |
* // => true | |
* | |
* _.isString(1); | |
* // => false | |
*/ | |
function isString(value) { | |
return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag) || false; | |
} | |
module.exports = isString; | |
},{"../internal/isObjectLike":65}],85:[function(require,module,exports){ | |
var isLength = require('../internal/isLength'), | |
isObjectLike = require('../internal/isObjectLike'); | |
/** `Object#toString` result references. */ | |
var argsTag = '[object Arguments]', | |
arrayTag = '[object Array]', | |
boolTag = '[object Boolean]', | |
dateTag = '[object Date]', | |
errorTag = '[object Error]', | |
funcTag = '[object Function]', | |
mapTag = '[object Map]', | |
numberTag = '[object Number]', | |
objectTag = '[object Object]', | |
regexpTag = '[object RegExp]', | |
setTag = '[object Set]', | |
stringTag = '[object String]', | |
weakMapTag = '[object WeakMap]'; | |
var arrayBufferTag = '[object ArrayBuffer]', | |
float32Tag = '[object Float32Array]', | |
float64Tag = '[object Float64Array]', | |
int8Tag = '[object Int8Array]', | |
int16Tag = '[object Int16Array]', | |
int32Tag = '[object Int32Array]', | |
uint8Tag = '[object Uint8Array]', | |
uint8ClampedTag = '[object Uint8ClampedArray]', | |
uint16Tag = '[object Uint16Array]', | |
uint32Tag = '[object Uint32Array]'; | |
/** Used to identify `toStringTag` values of typed arrays. */ | |
var typedArrayTags = {}; | |
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = | |
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = | |
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = | |
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = | |
typedArrayTags[uint32Tag] = true; | |
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = | |
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = | |
typedArrayTags[dateTag] = typedArrayTags[errorTag] = | |
typedArrayTags[funcTag] = typedArrayTags[mapTag] = | |
typedArrayTags[numberTag] = typedArrayTags[objectTag] = | |
typedArrayTags[regexpTag] = typedArrayTags[setTag] = | |
typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** | |
* Used to resolve the `toStringTag` of values. | |
* See the [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) | |
* for more details. | |
*/ | |
var objToString = objectProto.toString; | |
/** | |
* Checks if `value` is classified as a typed array. | |
* | |
* @static | |
* @memberOf _ | |
* @category Lang | |
* @param {*} value The value to check. | |
* @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. | |
* @example | |
* | |
* _.isTypedArray(new Uint8Array); | |
* // => true | |
* | |
* _.isTypedArray([]); | |
* // => false | |
*/ | |
function isTypedArray(value) { | |
return (isObjectLike(value) && isLength(value.length) && typedArrayTags[objToString.call(value)]) || false; | |
} | |
module.exports = isTypedArray; | |
},{"../internal/isLength":64,"../internal/isObjectLike":65}],86:[function(require,module,exports){ | |
var baseAssign = require('../internal/baseAssign'), | |
createAssigner = require('../internal/createAssigner'); | |
/** | |
* Assigns own enumerable properties of source object(s) to the destination | |
* object. Subsequent sources overwrite property assignments of previous sources. | |
* If `customizer` is provided it is invoked to produce the assigned values. | |
* The `customizer` is bound to `thisArg` and invoked with five arguments; | |
* (objectValue, sourceValue, key, object, source). | |
* | |
* @static | |
* @memberOf _ | |
* @alias extend | |
* @category Object | |
* @param {Object} object The destination object. | |
* @param {...Object} [sources] The source objects. | |
* @param {Function} [customizer] The function to customize assigning values. | |
* @param {*} [thisArg] The `this` binding of `customizer`. | |
* @returns {Object} Returns `object`. | |
* @example | |
* | |
* _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); | |
* // => { 'user': 'fred', 'age': 40 } | |
* | |
* // using a customizer callback | |
* var defaults = _.partialRight(_.assign, function(value, other) { | |
* return typeof value == 'undefined' ? other : value; | |
* }); | |
* | |
* defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); | |
* // => { 'user': 'barney', 'age': 36 } | |
*/ | |
var assign = createAssigner(baseAssign); | |
module.exports = assign; | |
},{"../internal/baseAssign":18,"../internal/createAssigner":47}],87:[function(require,module,exports){ | |
var arrayCopy = require('../internal/arrayCopy'), | |
assign = require('./assign'), | |
assignDefaults = require('../internal/assignDefaults'); | |
/** | |
* Assigns own enumerable properties of source object(s) to the destination | |
* object for all destination properties that resolve to `undefined`. Once a | |
* property is set, additional defaults of the same property are ignored. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The destination object. | |
* @param {...Object} [sources] The source objects. | |
* @returns {Object} Returns `object`. | |
* @example | |
* | |
* _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); | |
* // => { 'user': 'barney', 'age': 36 } | |
*/ | |
function defaults(object) { | |
if (object == null) { | |
return object; | |
} | |
var args = arrayCopy(arguments); | |
args.push(assignDefaults); | |
return assign.apply(undefined, args); | |
} | |
module.exports = defaults; | |
},{"../internal/arrayCopy":13,"../internal/assignDefaults":17,"./assign":86}],88:[function(require,module,exports){ | |
module.exports = require('./assign'); | |
},{"./assign":86}],89:[function(require,module,exports){ | |
var baseFunctions = require('../internal/baseFunctions'), | |
keysIn = require('./keysIn'); | |
/** | |
* Creates an array of function property names from all enumerable properties, | |
* own and inherited, of `object`. | |
* | |
* @static | |
* @memberOf _ | |
* @alias methods | |
* @category Object | |
* @param {Object} object The object to inspect. | |
* @returns {Array} Returns the new array of property names. | |
* @example | |
* | |
* _.functions(_); | |
* // => ['after', 'ary', 'assign', ...] | |
*/ | |
function functions(object) { | |
return baseFunctions(object, keysIn(object)); | |
} | |
module.exports = functions; | |
},{"../internal/baseFunctions":29,"./keysIn":92}],90:[function(require,module,exports){ | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Checks if `key` exists as a direct property of `object` instead of an | |
* inherited property. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to inspect. | |
* @param {string} key The key to check. | |
* @returns {boolean} Returns `true` if `key` is a direct property, else `false`. | |
* @example | |
* | |
* var object = { 'a': 1, 'b': 2, 'c': 3 }; | |
* | |
* _.has(object, 'b'); | |
* // => true | |
*/ | |
function has(object, key) { | |
return object ? hasOwnProperty.call(object, key) : false; | |
} | |
module.exports = has; | |
},{}],91:[function(require,module,exports){ | |
var isLength = require('../internal/isLength'), | |
isNative = require('../lang/isNative'), | |
isObject = require('../lang/isObject'), | |
shimKeys = require('../internal/shimKeys'); | |
/* Native method references for those with the same name as other `lodash` methods. */ | |
var nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys; | |
/** | |
* Creates an array of the own enumerable property names of `object`. | |
* | |
* **Note:** Non-object values are coerced to objects. See the | |
* [ES spec](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.keys) | |
* for more details. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to inspect. | |
* @returns {Array} Returns the array of property names. | |
* @example | |
* | |
* function Foo() { | |
* this.a = 1; | |
* this.b = 2; | |
* } | |
* | |
* Foo.prototype.c = 3; | |
* | |
* _.keys(new Foo); | |
* // => ['a', 'b'] (iteration order is not guaranteed) | |
* | |
* _.keys('hi'); | |
* // => ['0', '1'] | |
*/ | |
var keys = !nativeKeys ? shimKeys : function(object) { | |
if (object) { | |
var Ctor = object.constructor, | |
length = object.length; | |
} | |
if ((typeof Ctor == 'function' && Ctor.prototype === object) || | |
(typeof object != 'function' && (length && isLength(length)))) { | |
return shimKeys(object); | |
} | |
return isObject(object) ? nativeKeys(object) : []; | |
}; | |
module.exports = keys; | |
},{"../internal/isLength":64,"../internal/shimKeys":74,"../lang/isNative":81,"../lang/isObject":82}],92:[function(require,module,exports){ | |
var isArguments = require('../lang/isArguments'), | |
isArray = require('../lang/isArray'), | |
isIndex = require('../internal/isIndex'), | |
isLength = require('../internal/isLength'), | |
isObject = require('../lang/isObject'), | |
support = require('../support'); | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to check objects for own properties. */ | |
var hasOwnProperty = objectProto.hasOwnProperty; | |
/** | |
* Creates an array of the own and inherited enumerable property names of `object`. | |
* | |
* **Note:** Non-object values are coerced to objects. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to inspect. | |
* @returns {Array} Returns the array of property names. | |
* @example | |
* | |
* function Foo() { | |
* this.a = 1; | |
* this.b = 2; | |
* } | |
* | |
* Foo.prototype.c = 3; | |
* | |
* _.keysIn(new Foo); | |
* // => ['a', 'b', 'c'] (iteration order is not guaranteed) | |
*/ | |
function keysIn(object) { | |
if (object == null) { | |
return []; | |
} | |
if (!isObject(object)) { | |
object = Object(object); | |
} | |
var length = object.length; | |
length = (length && isLength(length) && | |
(isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0; | |
var Ctor = object.constructor, | |
index = -1, | |
isProto = typeof Ctor == 'function' && Ctor.prototype === object, | |
result = Array(length), | |
skipIndexes = length > 0; | |
while (++index < length) { | |
result[index] = (index + ''); | |
} | |
for (var key in object) { | |
if (!(skipIndexes && isIndex(key, length)) && | |
!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
module.exports = keysIn; | |
},{"../internal/isIndex":62,"../internal/isLength":64,"../lang/isArguments":77,"../lang/isArray":78,"../lang/isObject":82,"../support":97}],93:[function(require,module,exports){ | |
var baseFlatten = require('../internal/baseFlatten'), | |
bindCallback = require('../internal/bindCallback'), | |
pickByArray = require('../internal/pickByArray'), | |
pickByCallback = require('../internal/pickByCallback'); | |
/** | |
* Creates an object composed of the picked `object` properties. Property | |
* names may be specified as individual arguments or as arrays of property | |
* names. If `predicate` is provided it is invoked for each property of `object` | |
* picking the properties `predicate` returns truthy for. The predicate is | |
* bound to `thisArg` and invoked with three arguments; (value, key, object). | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The source object. | |
* @param {Function|...(string|string[])} [predicate] The function invoked per | |
* iteration or property names to pick, specified as individual property | |
* names or arrays of property names. | |
* @param {*} [thisArg] The `this` binding of `predicate`. | |
* @returns {Object} Returns the new object. | |
* @example | |
* | |
* var object = { 'user': 'fred', 'age': 40 }; | |
* | |
* _.pick(object, 'user'); | |
* // => { 'user': 'fred' } | |
* | |
* _.pick(object, _.isString); | |
* // => { 'user': 'fred' } | |
*/ | |
function pick(object, predicate, thisArg) { | |
if (object == null) { | |
return {}; | |
} | |
return typeof predicate == 'function' | |
? pickByCallback(object, bindCallback(predicate, thisArg, 3)) | |
: pickByArray(object, baseFlatten(arguments, false, false, 1)); | |
} | |
module.exports = pick; | |
},{"../internal/baseFlatten":25,"../internal/bindCallback":43,"../internal/pickByArray":69,"../internal/pickByCallback":70}],94:[function(require,module,exports){ | |
var isFunction = require('../lang/isFunction'); | |
/** | |
* Resolves the value of property `key` on `object`. If the value of `key` is | |
* a function it is invoked with the `this` binding of `object` and its result | |
* is returned, else the property value is returned. If the property value is | |
* `undefined` the `defaultValue` is used in its place. | |
* | |
* @static | |
* @memberOf _ | |
* @category Object | |
* @param {Object} object The object to query. | |
* @param {string} key The key of the property to resolve. | |
* @param {*} [defaultValue] The value returned if the property value | |
* resolves to `undefined`. | |
* @returns {*} Returns the resolved value. | |
* @example | |
* | |
* var object = { 'user': 'fred', 'age': _.constant(40) }; | |
* | |
* _.result(object, 'user'); | |
* // => 'fred' | |
* | |
* _.result(object, 'age'); | |
* // => 40 | |
* | |
* _.result(object, 'status', 'busy'); | |
* // => 'busy' | |
* | |
* _.result(object, 'status', _.constant('busy')); | |
* // => 'busy' | |
*/ | |
function result(object, key, defaultValue) { | |
var value = object == null ? undefined : object[key]; | |
if (typeof value == 'undefined') { | |
value = defaultValue; | |
} | |
return isFunction(value) ? value.call(object) : value; | |
} | |
module.exports = result; | |
},{"../lang/isFunction":80}],95:[function(require,module,exports){ | |
var baseToString = require('../internal/baseToString'), | |
escapeHtmlChar = require('../internal/escapeHtmlChar'); | |
/** Used to match HTML entities and HTML characters. */ | |
var reUnescapedHtml = /[&<>"'`]/g, | |
reHasUnescapedHtml = RegExp(reUnescapedHtml.source); | |
/** | |
* Converts the characters "&", "<", ">", '"', "'", and '`', in `string` to | |
* their corresponding HTML entities. | |
* | |
* **Note:** No other characters are escaped. To escape additional characters | |
* use a third-party library like [_he_](https://mths.be/he). | |
* | |
* Though the ">" character is escaped for symmetry, characters like | |
* ">" and "/" don't require escaping in HTML and have no special meaning | |
* unless they're part of a tag or unquoted attribute value. | |
* See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) | |
* (under "semi-related fun fact") for more details. | |
* | |
* Backticks are escaped because in Internet Explorer < 9, they can break out | |
* of attribute values or HTML comments. See [#102](https://html5sec.org/#102), | |
* [#108](https://html5sec.org/#108), and [#133](https://html5sec.org/#133) of | |
* the [HTML5 Security Cheatsheet](https://html5sec.org/) for more details. | |
* | |
* When working with HTML you should always quote attribute values to reduce | |
* XSS vectors. See [Ryan Grove's article](http://wonko.com/post/html-escaping) | |
* for more details. | |
* | |
* @static | |
* @memberOf _ | |
* @category String | |
* @param {string} [string=''] The string to escape. | |
* @returns {string} Returns the escaped string. | |
* @example | |
* | |
* _.escape('fred, barney, & pebbles'); | |
* // => 'fred, barney, & pebbles' | |
*/ | |
function escape(string) { | |
// Reset `lastIndex` because in IE < 9 `String#replace` does not. | |
string = baseToString(string); | |
return (string && reHasUnescapedHtml.test(string)) | |
? string.replace(reUnescapedHtml, escapeHtmlChar) | |
: string; | |
} | |
module.exports = escape; | |
},{"../internal/baseToString":42,"../internal/escapeHtmlChar":56}],96:[function(require,module,exports){ | |
var baseToString = require('../internal/baseToString'); | |
/** | |
* Used to match `RegExp` special characters. | |
* See this [article on `RegExp` characters](http://www.regular-expressions.info/characters.html#special) | |
* for more details. | |
*/ | |
var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g, | |
reHasRegExpChars = RegExp(reRegExpChars.source); | |
/** | |
* Escapes the `RegExp` special characters "\", "^", "$", ".", "|", "?", "*", | |
* "+", "(", ")", "[", "]", "{" and "}" in `string`. | |
* | |
* @static | |
* @memberOf _ | |
* @category String | |
* @param {string} [string=''] The string to escape. | |
* @returns {string} Returns the escaped string. | |
* @example | |
* | |
* _.escapeRegExp('[lodash](https://lodash.com/)'); | |
* // => '\[lodash\]\(https://lodash\.com/\)' | |
*/ | |
function escapeRegExp(string) { | |
string = baseToString(string); | |
return (string && reHasRegExpChars.test(string)) | |
? string.replace(reRegExpChars, '\\$&') | |
: string; | |
} | |
module.exports = escapeRegExp; | |
},{"../internal/baseToString":42}],97:[function(require,module,exports){ | |
(function (global){ | |
var isNative = require('./lang/isNative'); | |
/** Used to detect functions containing a `this` reference. */ | |
var reThis = /\bthis\b/; | |
/** Used for native method references. */ | |
var objectProto = Object.prototype; | |
/** Used to detect DOM support. */ | |
var document = (document = global.window) && document.document; | |
/** Native method references. */ | |
var propertyIsEnumerable = objectProto.propertyIsEnumerable; | |
/** | |
* An object environment feature flags. | |
* | |
* @static | |
* @memberOf _ | |
* @type Object | |
*/ | |
var support = {}; | |
(function(x) { | |
/** | |
* Detect if functions can be decompiled by `Function#toString` | |
* (all but Firefox OS certified apps, older Opera mobile browsers, and | |
* the PlayStation 3; forced `false` for Windows 8 apps). | |
* | |
* @memberOf _.support | |
* @type boolean | |
*/ | |
support.funcDecomp = !isNative(global.WinRTError) && reThis.test(function() { return this; }); | |
/** | |
* Detect if `Function#name` is supported (all but IE). | |
* | |
* @memberOf _.support | |
* @type boolean | |
*/ | |
support.funcNames = typeof Function.name == 'string'; | |
/** | |
* Detect if the DOM is supported. | |
* | |
* @memberOf _.support | |
* @type boolean | |
*/ | |
try { | |
support.dom = document.createDocumentFragment().nodeType === 11; | |
} catch(e) { | |
support.dom = false; | |
} | |
/** | |
* Detect if `arguments` object indexes are non-enumerable. | |
* | |
* In Firefox < 4, IE < 9, PhantomJS, and Safari < 5.1 `arguments` object | |
* indexes are non-enumerable. Chrome < 25 and Node.js < 0.11.0 treat | |
* `arguments` object indexes as non-enumerable and fail `hasOwnProperty` | |
* checks for indexes that exceed their function's formal parameters with | |
* associated values of `0`. | |
* | |
* @memberOf _.support | |
* @type boolean | |
*/ | |
try { | |
support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1); | |
} catch(e) { | |
support.nonEnumArgs = true; | |
} | |
}(0, 0)); | |
module.exports = support; | |
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) | |
},{"./lang/isNative":81}],98:[function(require,module,exports){ | |
/** | |
* Creates a function that returns `value`. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @param {*} value The value to return from the new function. | |
* @returns {Function} Returns the new function. | |
* @example | |
* | |
* var object = { 'user': 'fred' }; | |
* var getter = _.constant(object); | |
* | |
* getter() === object; | |
* // => true | |
*/ | |
function constant(value) { | |
return function() { | |
return value; | |
}; | |
} | |
module.exports = constant; | |
},{}],99:[function(require,module,exports){ | |
/** | |
* This method returns the first argument provided to it. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @param {*} value Any value. | |
* @returns {*} Returns `value`. | |
* @example | |
* | |
* var object = { 'user': 'fred' }; | |
* | |
* _.identity(object) === object; | |
* // => true | |
*/ | |
function identity(value) { | |
return value; | |
} | |
module.exports = identity; | |
},{}],100:[function(require,module,exports){ | |
var baseClone = require('../internal/baseClone'), | |
baseMatches = require('../internal/baseMatches'); | |
/** | |
* Creates a function which performs a deep comparison between a given object | |
* and `source`, returning `true` if the given object has equivalent property | |
* values, else `false`. | |
* | |
* **Note:** This method supports comparing arrays, booleans, `Date` objects, | |
* numbers, `Object` objects, regexes, and strings. Objects are compared by | |
* their own, not inherited, enumerable properties. For comparing a single | |
* own or inherited property value see `_.matchesProperty`. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @param {Object} source The object of property values to match. | |
* @returns {Function} Returns the new function. | |
* @example | |
* | |
* var users = [ | |
* { 'user': 'barney', 'age': 36, 'active': true }, | |
* { 'user': 'fred', 'age': 40, 'active': false } | |
* ]; | |
* | |
* _.filter(users, _.matches({ 'age': 40, 'active': false })); | |
* // => [{ 'user': 'fred', 'age': 40, 'active': false }] | |
*/ | |
function matches(source) { | |
return baseMatches(baseClone(source, true)); | |
} | |
module.exports = matches; | |
},{"../internal/baseClone":21,"../internal/baseMatches":36}],101:[function(require,module,exports){ | |
/** | |
* A no-operation function which returns `undefined` regardless of the | |
* arguments it receives. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @example | |
* | |
* var object = { 'user': 'fred' }; | |
* | |
* _.noop(object) === undefined; | |
* // => true | |
*/ | |
function noop() { | |
// No operation performed. | |
} | |
module.exports = noop; | |
},{}],102:[function(require,module,exports){ | |
var baseToString = require('../internal/baseToString'); | |
/** Used to generate unique IDs. */ | |
var idCounter = 0; | |
/** | |
* Generates a unique ID. If `prefix` is provided the ID is appended to it. | |
* | |
* @static | |
* @memberOf _ | |
* @category Utility | |
* @param {string} [prefix] The value to prefix the ID with. | |
* @returns {string} Returns the unique ID. | |
* @example | |
* | |
* _.uniqueId('contact_'); | |
* // => 'contact_104' | |
* | |
* _.uniqueId(); | |
* // => '105' | |
*/ | |
function uniqueId(prefix) { | |
var id = ++idCounter; | |
return baseToString(prefix) + id; | |
} | |
module.exports = uniqueId; | |
},{"../internal/baseToString":42}]},{},[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a){({keys:a("lodash/object/keys"),result:a("lodash/object/result"),extend:a("lodash/object/extend"),defaults:a("lodash/object/defaults"),has:a("lodash/object/has"),pick:a("lodash/object/pick"),bind:a("lodash/function/bind"),once:a("lodash/function/once"),bindAll:a("lodash/function/bindAll"),uniqueId:a("lodash/utility/uniqueId"),matches:a("lodash/utility/matches"),invoke:a("lodash/collection/invoke"),each:a("lodash/collection/each"),map:a("lodash/collection/map"),any:a("lodash/collection/any"),escape:a("lodash/string/escape"),clone:a("lodash/lang/clone"),isEmpty:a("lodash/lang/isEmpty"),isObject:a("lodash/lang/isObject"),isArray:a("lodash/lang/isArray"),isString:a("lodash/lang/isString"),isFunction:a("lodash/lang/isFunction"),isRegExp:a("lodash/lang/isRegExp")})},{"lodash/collection/any":2,"lodash/collection/each":3,"lodash/collection/invoke":5,"lodash/collection/map":6,"lodash/function/bind":10,"lodash/function/bindAll":11,"lodash/function/once":12,"lodash/lang/clone":76,"lodash/lang/isArray":78,"lodash/lang/isEmpty":79,"lodash/lang/isFunction":80,"lodash/lang/isObject":82,"lodash/lang/isRegExp":83,"lodash/lang/isString":84,"lodash/object/defaults":87,"lodash/object/extend":88,"lodash/object/has":90,"lodash/object/keys":91,"lodash/object/pick":93,"lodash/object/result":94,"lodash/string/escape":95,"lodash/utility/matches":100,"lodash/utility/uniqueId":102}],2:[function(a,b){b.exports=a("./some")},{"./some":7}],3:[function(a,b){b.exports=a("./forEach")},{"./forEach":4}],4:[function(a,b){function c(a,b,c){return"function"==typeof b&&"undefined"==typeof c&&g(a)?d(a,b):e(a,f(b,c,3))}var d=a("../internal/arrayEach"),e=a("../internal/baseEach"),f=a("../internal/bindCallback"),g=a("../lang/isArray");b.exports=c},{"../internal/arrayEach":14,"../internal/baseEach":24,"../internal/bindCallback":43,"../lang/isArray":78}],5:[function(a,b){function c(a,b){return d(a,b,e(arguments,2))}var d=a("../internal/baseInvoke"),e=a("../internal/baseSlice");b.exports=c},{"../internal/baseInvoke":30,"../internal/baseSlice":40}],6:[function(a,b){function c(a,b,c){var h=g(a)?d:f;return b=e(b,c,3),h(a,b)}var d=a("../internal/arrayMap"),e=a("../internal/baseCallback"),f=a("../internal/baseMap"),g=a("../lang/isArray");b.exports=c},{"../internal/arrayMap":15,"../internal/baseCallback":20,"../internal/baseMap":35,"../lang/isArray":78}],7:[function(a,b){function c(a,b,c){var h=g(a)?d:f;return("function"!=typeof b||"undefined"!=typeof c)&&(b=e(b,c,3)),h(a,b)}var d=a("../internal/arraySome"),e=a("../internal/baseCallback"),f=a("../internal/baseSome"),g=a("../lang/isArray");b.exports=c},{"../internal/arraySome":16,"../internal/baseCallback":20,"../internal/baseSome":41,"../lang/isArray":78}],8:[function(a,b){var c=a("../lang/isNative"),d=c(d=Date.now)&&d,e=d||function(){return(new Date).getTime()};b.exports=e},{"../lang/isNative":81}],9:[function(a,b){function c(a,b){var c;if("function"!=typeof b){if("function"!=typeof a)throw new TypeError(d);var e=a;a=b,b=e}return function(){return--a>0?c=b.apply(this,arguments):b=null,c}}var d="Expected a function";b.exports=c},{}],10:[function(a,b){function c(a,b){var i=g;if(arguments.length>2){var j=d(arguments,2),k=f(j,c.placeholder);i|=h}return e(a,i,b,j,k)}var d=a("../internal/baseSlice"),e=a("../internal/createWrapper"),f=a("../internal/replaceHolders"),g=1,h=32;c.placeholder={},b.exports=c},{"../internal/baseSlice":40,"../internal/createWrapper":52,"../internal/replaceHolders":72}],11:[function(a,b){function c(a){return d(a,arguments.length>1?e(arguments,!1,!1,1):f(a))}var d=a("../internal/baseBindAll"),e=a("../internal/baseFlatten"),f=a("../object/functions");b.exports=c},{"../internal/baseBindAll":19,"../internal/baseFlatten":25,"../object/functions":89}],12:[function(a,b){function c(a){return d(a,2)}var d=a("./before");b.exports=c},{"./before":9}],13:[function(a,b){function c(a,b){var c=-1,d=a.length;for(b||(b=Array(d));++c<d;)b[c]=a[c];return b}b.exports=c},{}],14:[function(a,b){function c(a,b){for(var c=-1,d=a.length;++c<d&&b(a[c],c,a)!==!1;);return a}b.exports=c},{}],15:[function(a,b){function c(a,b){for(var c=-1,d=a.length,e=Array(d);++c<d;)e[c]=b(a[c],c,a);return e}b.exports=c},{}],16:[function(a,b){function c(a,b){for(var c=-1,d=a.length;++c<d;)if(b(a[c],c,a))return!0;return!1}b.exports=c},{}],17:[function(a,b){function c(a,b){return"undefined"==typeof a?b:a}b.exports=c},{}],18:[function(a,b){function c(a,b,c){var f=e(b);if(!c)return d(b,a,f);for(var g=-1,h=f.length;++g<h;){var i=f[g],j=a[i],k=c(j,b[i],i,a,b);(k===k?k===j:j!==j)&&("undefined"!=typeof j||i in a)||(a[i]=k)}return a}var d=a("./baseCopy"),e=a("../object/keys");b.exports=c},{"../object/keys":91,"./baseCopy":22}],19:[function(a,b){function c(a,b){for(var c=-1,f=b.length;++c<f;){var g=b[c];a[g]=d(a[g],e,a)}return a}var d=a("./createWrapper"),e=1;b.exports=c},{"./createWrapper":52}],20:[function(a,b){function c(a,b,c){var j=typeof a;return"function"==j?"undefined"!=typeof b&&i(a)?g(a,b,c):a:null==a?h:"object"==j?d(a):"undefined"==typeof b?f(a+""):e(a+"",b)}var d=a("./baseMatches"),e=a("./baseMatchesProperty"),f=a("./baseProperty"),g=a("./bindCallback"),h=a("../utility/identity"),i=a("./isBindable");b.exports=c},{"../utility/identity":99,"./baseMatches":36,"./baseMatchesProperty":37,"./baseProperty":38,"./bindCallback":43,"./isBindable":61}],21:[function(a,b){function c(a,b,o,p,q,r,t){var u;if(o&&(u=q?o(a,p,q):o(a)),"undefined"!=typeof u)return u;if(!l(a))return a;var w=k(a);if(w){if(u=h(a),!b)return d(a,u)}else{var x=M.call(a),y=x==s;if(x!=v&&x!=n&&(!y||q))return K[x]?i(a,x,b):q?a:{};if(u=j(y?{}:a),!b)return f(a,u,m(a))}r||(r=[]),t||(t=[]);for(var z=r.length;z--;)if(r[z]==a)return t[z];return r.push(a),t.push(u),(w?e:g)(a,function(d,e){u[e]=c(d,b,o,e,a,r,t)}),u}var d=a("./arrayCopy"),e=a("./arrayEach"),f=a("./baseCopy"),g=a("./baseForOwn"),h=a("./initCloneArray"),i=a("./initCloneByTag"),j=a("./initCloneObject"),k=a("../lang/isArray"),l=a("../lang/isObject"),m=a("../object/keys"),n="[object Arguments]",o="[object Array]",p="[object Boolean]",q="[object Date]",r="[object Error]",s="[object Function]",t="[object Map]",u="[object Number]",v="[object Object]",w="[object RegExp]",x="[object Set]",y="[object String]",z="[object WeakMap]",A="[object ArrayBuffer]",B="[object Float32Array]",C="[object Float64Array]",D="[object Int8Array]",E="[object Int16Array]",F="[object Int32Array]",G="[object Uint8Array]",H="[object Uint8ClampedArray]",I="[object Uint16Array]",J="[object Uint32Array]",K={};K[n]=K[o]=K[A]=K[p]=K[q]=K[B]=K[C]=K[D]=K[E]=K[F]=K[u]=K[v]=K[w]=K[y]=K[G]=K[H]=K[I]=K[J]=!0,K[r]=K[s]=K[t]=K[x]=K[z]=!1;var L=Object.prototype,M=L.toString;b.exports=c},{"../lang/isArray":78,"../lang/isObject":82,"../object/keys":91,"./arrayCopy":13,"./arrayEach":14,"./baseCopy":22,"./baseForOwn":28,"./initCloneArray":58,"./initCloneByTag":59,"./initCloneObject":60}],22:[function(a,b){function c(a,b,c){c||(c=b,b={});for(var d=-1,e=c.length;++d<e;){var f=c[d];b[f]=a[f]}return b}b.exports=c},{}],23:[function(a,b){(function(c){var d=a("../lang/isObject"),e=function(){function a(){}return function(b){if(d(b)){a.prototype=b;var e=new a;a.prototype=null}return e||c.Object()}}();b.exports=e}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isObject":82}],24:[function(a,b){function c(a,b){var c=a?a.length:0;if(!e(c))return d(a,b);for(var g=-1,h=f(a);++g<c&&b(h[g],g,h)!==!1;);return a}var d=a("./baseForOwn"),e=a("./isLength"),f=a("./toObject");b.exports=c},{"./baseForOwn":28,"./isLength":64,"./toObject":75}],25:[function(a,b){function c(a,b,h,i){for(var j=(i||0)-1,k=a.length,l=-1,m=[];++j<k;){var n=a[j];if(g(n)&&f(n.length)&&(e(n)||d(n))){b&&(n=c(n,b,h));var o=-1,p=n.length;for(m.length+=p;++o<p;)m[++l]=n[o]}else h||(m[++l]=n)}return m}var d=a("../lang/isArguments"),e=a("../lang/isArray"),f=a("./isLength"),g=a("./isObjectLike");b.exports=c},{"../lang/isArguments":77,"../lang/isArray":78,"./isLength":64,"./isObjectLike":65}],26:[function(a,b){function c(a,b,c){for(var e=-1,f=d(a),g=c(a),h=g.length;++e<h;){var i=g[e];if(b(f[i],i,f)===!1)break}return a}var d=a("./toObject");b.exports=c},{"./toObject":75}],27:[function(a,b){function c(a,b){return d(a,b,e)}var d=a("./baseFor"),e=a("../object/keysIn");b.exports=c},{"../object/keysIn":92,"./baseFor":26}],28:[function(a,b){function c(a,b){return d(a,b,e)}var d=a("./baseFor"),e=a("../object/keys");b.exports=c},{"../object/keys":91,"./baseFor":26}],29:[function(a,b){function c(a,b){for(var c=-1,e=b.length,f=-1,g=[];++c<e;){var h=b[c];d(a[h])&&(g[++f]=h)}return g}var d=a("../lang/isFunction");b.exports=c},{"../lang/isFunction":80}],30:[function(a,b){function c(a,b,c){var f=-1,g="function"==typeof b,h=a?a.length:0,i=e(h)?Array(h):[];return d(a,function(a){var d=g?b:null!=a&&a[b];i[++f]=d?d.apply(a,c):void 0}),i}var d=a("./baseEach"),e=a("./isLength");b.exports=c},{"./baseEach":24,"./isLength":64}],31:[function(a,b){function c(a,b,e,f,g,h){if(a===b)return 0!==a||1/a==1/b;var i=typeof a,j=typeof b;return"function"!=i&&"object"!=i&&"function"!=j&&"object"!=j||null==a||null==b?a!==a&&b!==b:d(a,b,c,e,f,g,h)}var d=a("./baseIsEqualDeep");b.exports=c},{"./baseIsEqualDeep":32}],32:[function(a,b){function c(a,b,c,l,o,p,q){var r=g(a),s=g(b),t=j,u=j;r||(t=n.call(a),t==i?t=k:t!=k&&(r=h(a))),s||(u=n.call(b),u==i?u=k:u!=k&&(s=h(b)));var v=t==k,w=u==k,x=t==u;if(x&&!r&&!v)return e(a,b,t);var y=v&&m.call(a,"__wrapped__"),z=w&&m.call(b,"__wrapped__");if(y||z)return c(y?a.value():a,z?b.value():b,l,o,p,q);if(!x)return!1;p||(p=[]),q||(q=[]);for(var A=p.length;A--;)if(p[A]==a)return q[A]==b;p.push(a),q.push(b);var B=(r?d:f)(a,b,c,l,o,p,q);return p.pop(),q.pop(),B}var d=a("./equalArrays"),e=a("./equalByTag"),f=a("./equalObjects"),g=a("../lang/isArray"),h=a("../lang/isTypedArray"),i="[object Arguments]",j="[object Array]",k="[object Object]",l=Object.prototype,m=l.hasOwnProperty,n=l.toString;b.exports=c},{"../lang/isArray":78,"../lang/isTypedArray":85,"./equalArrays":53,"./equalByTag":54,"./equalObjects":55}],33:[function(a,b){function c(a){return"function"==typeof a||!1}b.exports=c},{}],34:[function(a,b){function c(a,b,c,e,g){var h=b.length;if(null==a)return!h;for(var i=-1,j=!g;++i<h;)if(j&&e[i]?c[i]!==a[b[i]]:!f.call(a,b[i]))return!1;for(i=-1;++i<h;){var k=b[i];if(j&&e[i])var l=f.call(a,k);else{var m=a[k],n=c[i];l=g?g(m,n,k):void 0,"undefined"==typeof l&&(l=d(n,m,g,!0))}if(!l)return!1}return!0}var d=a("./baseIsEqual"),e=Object.prototype,f=e.hasOwnProperty;b.exports=c},{"./baseIsEqual":31}],35:[function(a,b){function c(a,b){var c=[];return d(a,function(a,d,e){c.push(b(a,d,e))}),c}var d=a("./baseEach");b.exports=c},{"./baseEach":24}],36:[function(a,b){function c(a){var b=f(a),c=b.length;if(1==c){var g=b[0],i=a[g];if(e(i))return function(a){return null!=a&&a[g]===i&&h.call(a,g)}}for(var j=Array(c),k=Array(c);c--;)i=a[b[c]],j[c]=i,k[c]=e(i);return function(a){return d(a,b,j,k)}}var d=a("./baseIsMatch"),e=a("./isStrictComparable"),f=a("../object/keys"),g=Object.prototype,h=g.hasOwnProperty;b.exports=c},{"../object/keys":91,"./baseIsMatch":34,"./isStrictComparable":66}],37:[function(a,b){function c(a,b){return e(b)?function(c){return null!=c&&c[a]===b}:function(c){return null!=c&&d(b,c[a],null,!0)}}var d=a("./baseIsEqual"),e=a("./isStrictComparable");b.exports=c},{"./baseIsEqual":31,"./isStrictComparable":66}],38:[function(a,b){function c(a){return function(b){return null==b?void 0:b[a]}}b.exports=c},{}],39:[function(a,b){var c=a("../utility/identity"),d=a("./metaMap"),e=d?function(a,b){return d.set(a,b),a}:c;b.exports=e},{"../utility/identity":99,"./metaMap":68}],40:[function(a,b){function c(a,b,c){var d=-1,e=a.length;b=null==b?0:+b||0,0>b&&(b=-b>e?0:e+b),c="undefined"==typeof c||c>e?e:+c||0,0>c&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=Array(e);++d<e;)f[d]=a[d+b];return f}b.exports=c},{}],41:[function(a,b){function c(a,b){var c;return d(a,function(a,d,e){return c=b(a,d,e),!c}),!!c}var d=a("./baseEach");b.exports=c},{"./baseEach":24}],42:[function(a,b){function c(a){return"string"==typeof a?a:null==a?"":a+""}b.exports=c},{}],43:[function(a,b){function c(a,b,c){if("function"!=typeof a)return d;if("undefined"==typeof b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)};case 5:return function(c,d,e,f,g){return a.call(b,c,d,e,f,g)}}return function(){return a.apply(b,arguments)}}var d=a("../utility/identity");b.exports=c},{"../utility/identity":99}],44:[function(a,b){(function(c){function d(a){return h.call(a,0)}var e=a("../utility/constant"),f=a("../lang/isNative"),g=f(g=c.ArrayBuffer)&&g,h=f(h=g&&new g(0).slice)&&h,i=Math.floor,j=f(j=c.Uint8Array)&&j,k=function(){try{var a=f(a=c.Float64Array)&&a,b=new a(new g(10),0,1)&&a}catch(d){}return b}(),l=k?k.BYTES_PER_ELEMENT:0;h||(d=g&&j?function(a){var b=a.byteLength,c=k?i(b/l):0,d=c*l,e=new g(b);if(c){var f=new k(e,0,c);f.set(new k(a,0,c))}return b!=d&&(f=new j(e,d),f.set(new j(a,d))),e}:e(null)),b.exports=d}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":81,"../utility/constant":98}],45:[function(a,b){function c(a,b,c){for(var e=c.length,f=-1,g=d(a.length-e,0),h=-1,i=b.length,j=Array(g+i);++h<i;)j[h]=b[h];for(;++f<e;)j[c[f]]=a[f];for(;g--;)j[h++]=a[f++];return j}var d=Math.max;b.exports=c},{}],46:[function(a,b){function c(a,b,c){for(var e=-1,f=c.length,g=-1,h=d(a.length-f,0),i=-1,j=b.length,k=Array(h+j);++g<h;)k[g]=a[g];for(var l=g;++i<j;)k[l+i]=b[i];for(;++e<f;)k[l+c[e]]=a[g++];return k}var d=Math.max;b.exports=c},{}],47:[function(a,b){function c(a){return function(){var b=arguments.length,c=arguments[0];if(2>b||null==c)return c;if(b>3&&e(arguments[1],arguments[2],arguments[3])&&(b=2),b>3&&"function"==typeof arguments[b-2])var f=d(arguments[--b-1],arguments[b--],5);else b>2&&"function"==typeof arguments[b-1]&&(f=arguments[--b]);for(var g=0;++g<b;){var h=arguments[g];h&&a(c,h,f)}return c}}var d=a("./bindCallback"),e=a("./isIterateeCall");b.exports=c},{"./bindCallback":43,"./isIterateeCall":63}],48:[function(a,b){function c(a,b){function c(){return(this instanceof c?e:a).apply(b,arguments)}var e=d(a);return c}var d=a("./createCtorWrapper");b.exports=c},{"./createCtorWrapper":49}],49:[function(a,b){function c(a){return function(){var b=d(a.prototype),c=a.apply(b,arguments);return e(c)?c:b}}var d=a("./baseCreate"),e=a("../lang/isObject");b.exports=c},{"../lang/isObject":82,"./baseCreate":23}],50:[function(a,b){function c(a,b,s,t,u,v,w,x,y,z){function A(){for(var l=arguments.length,m=l,n=Array(l);m--;)n[m]=arguments[m];if(t&&(n=e(n,t,u)),v&&(n=f(n,v,w)),E||G){var q=A.placeholder,J=i(n,q);if(l-=J.length,z>l){var K=x?d(x):null,L=r(z-l,0),M=E?J:null,N=E?null:J,O=E?n:null,P=E?null:n;b|=E?o:p,b&=~(E?p:o),F||(b&=~(j|k));var Q=c(a,b,s,O,M,P,N,K,y,L);return Q.placeholder=q,Q}}var R=C?s:this;return D&&(a=R[I]),x&&(n=h(n,x)),B&&y<n.length&&(n.length=y),(this instanceof A?H||g(a):a).apply(R,n)}var B=b&q,C=b&j,D=b&k,E=b&m,F=b&l,G=b&n,H=!D&&g(a),I=a;return A}var d=a("./arrayCopy"),e=a("./composeArgs"),f=a("./composeArgsRight"),g=a("./createCtorWrapper"),h=a("./reorder"),i=a("./replaceHolders"),j=1,k=2,l=4,m=8,n=16,o=32,p=64,q=256,r=Math.max;b.exports=c},{"./arrayCopy":13,"./composeArgs":45,"./composeArgsRight":46,"./createCtorWrapper":49,"./reorder":71,"./replaceHolders":72}],51:[function(a,b){function c(a,b,c,f){function g(){for(var b=-1,d=arguments.length,e=-1,j=f.length,k=Array(d+j);++e<j;)k[e]=f[e];for(;d--;)k[e++]=arguments[++b];return(this instanceof g?i:a).apply(h?c:this,k)}var h=b&e,i=d(a);return g}var d=a("./createCtorWrapper"),e=1;b.exports=c},{"./createCtorWrapper":49}],52:[function(a,b){function c(a,b,c,q,r,s,t,u){var v=b&l;if(!v&&"function"!=typeof a)throw new TypeError(o);var w=q?q.length:0;if(w||(b&=~(m|n),q=r=null),w-=r?r.length:0,b&n){var x=q,y=r;q=r=null}var z=!v&&h(a),A=[a,b,c,q,r,x,y,s,t,u];if(z&&z!==!0&&(i(A,z),b=A[1],u=A[9]),A[9]=null==u?v?0:a.length:p(u-w,0)||0,b==k)var B=e(A[0],A[2]);else B=b!=m&&b!=(k|m)||A[4].length?f.apply(void 0,A):g.apply(void 0,A);var C=z?d:j;return C(B,A)}var d=a("./baseSetData"),e=a("./createBindWrapper"),f=a("./createHybridWrapper"),g=a("./createPartialWrapper"),h=a("./getData"),i=a("./mergeData"),j=a("./setData"),k=1,l=2,m=32,n=64,o="Expected a function",p=Math.max;b.exports=c},{"./baseSetData":39,"./createBindWrapper":48,"./createHybridWrapper":50,"./createPartialWrapper":51,"./getData":57,"./mergeData":67,"./setData":73}],53:[function(a,b){function c(a,b,c,d,e,f,g){var h=-1,i=a.length,j=b.length,k=!0;if(i!=j&&!(e&&j>i))return!1;for(;k&&++h<i;){var l=a[h],m=b[h];if(k=void 0,d&&(k=e?d(m,l,h):d(l,m,h)),"undefined"==typeof k)if(e)for(var n=j;n--&&(m=b[n],!(k=l&&l===m||c(l,m,d,e,f,g))););else k=l&&l===m||c(l,m,d,e,f,g)}return!!k}b.exports=c},{}],54:[function(a,b){function c(a,b,c){switch(c){case d:case e:return+a==+b;case f:return a.name==b.name&&a.message==b.message;case g:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case h:case i:return a==b+""}return!1}var d="[object Boolean]",e="[object Date]",f="[object Error]",g="[object Number]",h="[object RegExp]",i="[object String]";b.exports=c},{}],55:[function(a,b){function c(a,b,c,e,g,h,i){var j=d(a),k=j.length,l=d(b),m=l.length;if(k!=m&&!g)return!1;for(var n,o=-1;++o<k;){var p=j[o],q=f.call(b,p);if(q){var r=a[p],s=b[p];q=void 0,e&&(q=g?e(s,r,p):e(r,s,p)),"undefined"==typeof q&&(q=r&&r===s||c(r,s,e,g,h,i))}if(!q)return!1;n||(n="constructor"==p)}if(!n){var t=a.constructor,u=b.constructor;if(t!=u&&"constructor"in a&&"constructor"in b&&!("function"==typeof t&&t instanceof t&&"function"==typeof u&&u instanceof u))return!1}return!0}var d=a("../object/keys"),e=Object.prototype,f=e.hasOwnProperty;b.exports=c},{"../object/keys":91}],56:[function(a,b){function c(a){return d[a]}var d={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};b.exports=c},{}],57:[function(a,b){var c=a("./metaMap"),d=a("../utility/noop"),e=c?function(a){return c.get(a)}:d;b.exports=e},{"../utility/noop":101,"./metaMap":68}],58:[function(a,b){function c(a){var b=a.length,c=new a.constructor(b);return b&&"string"==typeof a[0]&&e.call(a,"index")&&(c.index=a.index,c.input=a.input),c}var d=Object.prototype,e=d.hasOwnProperty;b.exports=c},{}],59:[function(a,b){function c(a,b,c){var u=a.constructor;switch(b){case j:return d(a);case e:case f:return new u(+a);case k:case l:case m:case n:case o:case p:case q:case r:case s:var v=a.buffer;return new u(c?d(v):v,a.byteOffset,a.length);case g:case i:return new u(a);case h:var w=new u(a.source,t.exec(a));w.lastIndex=a.lastIndex}return w}var d=a("./bufferClone"),e="[object Boolean]",f="[object Date]",g="[object Number]",h="[object RegExp]",i="[object String]",j="[object ArrayBuffer]",k="[object Float32Array]",l="[object Float64Array]",m="[object Int8Array]",n="[object Int16Array]",o="[object Int32Array]",p="[object Uint8Array]",q="[object Uint8ClampedArray]",r="[object Uint16Array]",s="[object Uint32Array]",t=/\w*$/;b.exports=c},{"./bufferClone":44}],60:[function(a,b){function c(a){var b=a.constructor;return"function"==typeof b&&b instanceof b||(b=Object),new b}b.exports=c},{}],61:[function(a,b){function c(a){var b=!(f.funcNames?a.name:f.funcDecomp);if(!b){var c=i.call(a);f.funcNames||(b=!g.test(c)),b||(b=h.test(c)||e(a),d(a,b))}return b}var d=a("./baseSetData"),e=a("../lang/isNative"),f=a("../support"),g=/^\s*function[ \n\r\t]+\w/,h=/\bthis\b/,i=Function.prototype.toString;b.exports=c},{"../lang/isNative":81,"../support":97,"./baseSetData":39}],62:[function(a,b){function c(a,b){return a=+a,b=null==b?d:b,a>-1&&a%1==0&&b>a}var d=Math.pow(2,53)-1;b.exports=c},{}],63:[function(a,b){function c(a,b,c){if(!f(c))return!1;var g=typeof b;if("number"==g)var h=c.length,i=e(h)&&d(b,h);else i="string"==g&&b in c;var j=c[b];return i&&(a===a?a===j:j!==j)}var d=a("./isIndex"),e=a("./isLength"),f=a("../lang/isObject");b.exports=c},{"../lang/isObject":82,"./isIndex":62,"./isLength":64}],64:[function(a,b){function c(a){return"number"==typeof a&&a>-1&&a%1==0&&d>=a}var d=Math.pow(2,53)-1;b.exports=c},{}],65:[function(a,b){function c(a){return a&&"object"==typeof a||!1}b.exports=c},{}],66:[function(a,b){function c(a){return a===a&&(0===a?1/a>0:!d(a))}var d=a("../lang/isObject");b.exports=c},{"../lang/isObject":82}],67:[function(a,b){function c(a,b){var c=a[1],p=b[1],q=c|p,r=m|l,s=h|i,t=r|s|j|k,u=c&m&&!(p&m),v=c&l&&!(p&l),w=(v?a:b)[7],x=(u?a:b)[8],y=!(c>=l&&p>s||c>s&&p>=l),z=q>=r&&t>=q&&(l>c||(v||u)&&w.length<=x);if(!y&&!z)return a;p&h&&(a[2]=b[2],q|=c&h?0:j);var A=b[3];if(A){var B=a[3];a[3]=B?e(B,A,b[4]):d(A),a[4]=B?g(a[3],n):d(b[4])}return A=b[5],A&&(B=a[5],a[5]=B?f(B,A,b[6]):d(A),a[6]=B?g(a[5],n):d(b[6])),A=b[7],A&&(a[7]=d(A)),p&m&&(a[8]=null==a[8]?b[8]:o(a[8],b[8])),null==a[9]&&(a[9]=b[9]),a[0]=b[0],a[1]=q,a}var d=a("./arrayCopy"),e=a("./composeArgs"),f=a("./composeArgsRight"),g=a("./replaceHolders"),h=1,i=2,j=4,k=16,l=128,m=256,n="__lodash_placeholder__",o=Math.min;b.exports=c},{"./arrayCopy":13,"./composeArgs":45,"./composeArgsRight":46,"./replaceHolders":72}],68:[function(a,b){(function(c){var d=a("../lang/isNative"),e=d(e=c.WeakMap)&&e,f=e&&new e;b.exports=f}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../lang/isNative":81}],69:[function(a,b){function c(a,b){a=d(a);for(var c=-1,e=b.length,f={};++c<e;){var g=b[c];g in a&&(f[g]=a[g])}return f}var d=a("./toObject");b.exports=c},{"./toObject":75}],70:[function(a,b){function c(a,b){var c={};return d(a,function(a,d,e){b(a,d,e)&&(c[d]=a)}),c}var d=a("./baseForIn");b.exports=c},{"./baseForIn":27}],71:[function(a,b){function c(a,b){for(var c=a.length,g=f(b.length,c),h=d(a);g--;){var i=b[g];a[g]=e(i,c)?h[i]:void 0}return a}var d=a("./arrayCopy"),e=a("./isIndex"),f=Math.min;b.exports=c},{"./arrayCopy":13,"./isIndex":62}],72:[function(a,b){function c(a,b){for(var c=-1,e=a.length,f=-1,g=[];++c<e;)a[c]===b&&(a[c]=d,g[++f]=c);return g}var d="__lodash_placeholder__";b.exports=c},{}],73:[function(a,b){var c=a("./baseSetData"),d=a("../date/now"),e=150,f=16,g=function(){var a=0,b=0;return function(g,h){var i=d(),j=f-(i-b);if(b=i,j>0){if(++a>=e)return g}else a=0;return c(g,h)}}();b.exports=g},{"../date/now":8,"./baseSetData":39}],74:[function(a,b){function c(a){for(var b=h(a),c=b.length,j=c&&a.length,l=j&&g(j)&&(e(a)||i.nonEnumArgs&&d(a)),m=-1,n=[];++m<c;){var o=b[m];(l&&f(o,j)||k.call(a,o))&&n.push(o)}return n}var d=a("../lang/isArguments"),e=a("../lang/isArray"),f=a("./isIndex"),g=a("./isLength"),h=a("../object/keysIn"),i=a("../support"),j=Object.prototype,k=j.hasOwnProperty;b.exports=c},{"../lang/isArguments":77,"../lang/isArray":78,"../object/keysIn":92,"../support":97,"./isIndex":62,"./isLength":64}],75:[function(a,b){function c(a){return d(a)?a:Object(a)}var d=a("../lang/isObject");b.exports=c},{"../lang/isObject":82}],76:[function(a,b){function c(a,b,c,g){return b&&"boolean"!=typeof b&&f(a,b,c)?b=!1:"function"==typeof b&&(g=c,c=b,b=!1),c="function"==typeof c&&e(c,g,1),d(a,b,c)}var d=a("../internal/baseClone"),e=a("../internal/bindCallback"),f=a("../internal/isIterateeCall");b.exports=c},{"../internal/baseClone":21,"../internal/bindCallback":43,"../internal/isIterateeCall":63}],77:[function(a,b){function c(a){var b=e(a)?a.length:void 0;return d(b)&&h.call(a)==f||!1}var d=a("../internal/isLength"),e=a("../internal/isObjectLike"),f="[object Arguments]",g=Object.prototype,h=g.toString;b.exports=c},{"../internal/isLength":64,"../internal/isObjectLike":65}],78:[function(a,b){var c=a("../internal/isLength"),d=a("./isNative"),e=a("../internal/isObjectLike"),f="[object Array]",g=Object.prototype,h=g.toString,i=d(i=Array.isArray)&&i,j=i||function(a){return e(a)&&c(a.length)&&h.call(a)==f||!1};b.exports=j},{"../internal/isLength":64,"../internal/isObjectLike":65,"./isNative":81}],79:[function(a,b){function c(a){if(null==a)return!0;var b=a.length;return g(b)&&(e(a)||i(a)||d(a)||h(a)&&f(a.splice))?!b:!j(a).length}var d=a("./isArguments"),e=a("./isArray"),f=a("./isFunction"),g=a("../internal/isLength"),h=a("../internal/isObjectLike"),i=a("./isString"),j=a("../object/keys");b.exports=c},{"../internal/isLength":64,"../internal/isObjectLike":65,"../object/keys":91,"./isArguments":77,"./isArray":78,"./isFunction":80,"./isString":84}],80:[function(a,b){(function(c){var d=a("../internal/baseIsFunction"),e=a("./isNative"),f="[object Function]",g=Object.prototype,h=g.toString,i=e(i=c.Uint8Array)&&i,j=d(/x/)||i&&!d(i)?function(a){return h.call(a)==f}:d;b.exports=j}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../internal/baseIsFunction":33,"./isNative":81}],81:[function(a,b){function c(a){return null==a?!1:j.call(a)==f?k.test(i.call(a)):e(a)&&g.test(a)||!1}var d=a("../string/escapeRegExp"),e=a("../internal/isObjectLike"),f="[object Function]",g=/^\[object .+?Constructor\]$/,h=Object.prototype,i=Function.prototype.toString,j=h.toString,k=RegExp("^"+d(j).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");b.exports=c},{"../internal/isObjectLike":65,"../string/escapeRegExp":96}],82:[function(a,b){function c(a){var b=typeof a;return"function"==b||a&&"object"==b||!1}b.exports=c},{}],83:[function(a,b){function c(a){return d(a)&&g.call(a)==e||!1}var d=a("../internal/isObjectLike"),e="[object RegExp]",f=Object.prototype,g=f.toString;b.exports=c},{"../internal/isObjectLike":65}],84:[function(a,b){function c(a){return"string"==typeof a||d(a)&&g.call(a)==e||!1}var d=a("../internal/isObjectLike"),e="[object String]",f=Object.prototype,g=f.toString;b.exports=c},{"../internal/isObjectLike":65}],85:[function(a,b){function c(a){return e(a)&&d(a.length)&&C[E.call(a)]||!1}var d=a("../internal/isLength"),e=a("../internal/isObjectLike"),f="[object Arguments]",g="[object Array]",h="[object Boolean]",i="[object Date]",j="[object Error]",k="[object Function]",l="[object Map]",m="[object Number]",n="[object Object]",o="[object RegExp]",p="[object Set]",q="[object String]",r="[object WeakMap]",s="[object ArrayBuffer]",t="[object Float32Array]",u="[object Float64Array]",v="[object Int8Array]",w="[object Int16Array]",x="[object Int32Array]",y="[object Uint8Array]",z="[object Uint8ClampedArray]",A="[object Uint16Array]",B="[object Uint32Array]",C={};C[t]=C[u]=C[v]=C[w]=C[x]=C[y]=C[z]=C[A]=C[B]=!0,C[f]=C[g]=C[s]=C[h]=C[i]=C[j]=C[k]=C[l]=C[m]=C[n]=C[o]=C[p]=C[q]=C[r]=!1;var D=Object.prototype,E=D.toString;b.exports=c},{"../internal/isLength":64,"../internal/isObjectLike":65}],86:[function(a,b){var c=a("../internal/baseAssign"),d=a("../internal/createAssigner"),e=d(c);b.exports=e},{"../internal/baseAssign":18,"../internal/createAssigner":47}],87:[function(a,b){function c(a){if(null==a)return a;var b=d(arguments);return b.push(f),e.apply(void 0,b)}var d=a("../internal/arrayCopy"),e=a("./assign"),f=a("../internal/assignDefaults");b.exports=c},{"../internal/arrayCopy":13,"../internal/assignDefaults":17,"./assign":86}],88:[function(a,b){b.exports=a("./assign")},{"./assign":86}],89:[function(a,b){function c(a){return d(a,e(a))}var d=a("../internal/baseFunctions"),e=a("./keysIn");b.exports=c},{"../internal/baseFunctions":29,"./keysIn":92}],90:[function(a,b){function c(a,b){return a?e.call(a,b):!1}var d=Object.prototype,e=d.hasOwnProperty;b.exports=c},{}],91:[function(a,b){var c=a("../internal/isLength"),d=a("../lang/isNative"),e=a("../lang/isObject"),f=a("../internal/shimKeys"),g=d(g=Object.keys)&&g,h=g?function(a){if(a)var b=a.constructor,d=a.length;return"function"==typeof b&&b.prototype===a||"function"!=typeof a&&d&&c(d)?f(a):e(a)?g(a):[]}:f;b.exports=h},{"../internal/isLength":64,"../internal/shimKeys":74,"../lang/isNative":81,"../lang/isObject":82}],92:[function(a,b){function c(a){if(null==a)return[];h(a)||(a=Object(a));var b=a.length;b=b&&g(b)&&(e(a)||i.nonEnumArgs&&d(a))&&b||0;for(var c=a.constructor,j=-1,l="function"==typeof c&&c.prototype===a,m=Array(b),n=b>0;++j<b;)m[j]=j+"";for(var o in a)n&&f(o,b)||"constructor"==o&&(l||!k.call(a,o))||m.push(o);return m}var d=a("../lang/isArguments"),e=a("../lang/isArray"),f=a("../internal/isIndex"),g=a("../internal/isLength"),h=a("../lang/isObject"),i=a("../support"),j=Object.prototype,k=j.hasOwnProperty;b.exports=c},{"../internal/isIndex":62,"../internal/isLength":64,"../lang/isArguments":77,"../lang/isArray":78,"../lang/isObject":82,"../support":97}],93:[function(a,b){function c(a,b,c){return null==a?{}:"function"==typeof b?g(a,e(b,c,3)):f(a,d(arguments,!1,!1,1))}var d=a("../internal/baseFlatten"),e=a("../internal/bindCallback"),f=a("../internal/pickByArray"),g=a("../internal/pickByCallback");b.exports=c},{"../internal/baseFlatten":25,"../internal/bindCallback":43,"../internal/pickByArray":69,"../internal/pickByCallback":70}],94:[function(a,b){function c(a,b,c){var e=null==a?void 0:a[b];return"undefined"==typeof e&&(e=c),d(e)?e.call(a):e}var d=a("../lang/isFunction");b.exports=c},{"../lang/isFunction":80}],95:[function(a,b){function c(a){return a=d(a),a&&g.test(a)?a.replace(f,e):a}var d=a("../internal/baseToString"),e=a("../internal/escapeHtmlChar"),f=/[&<>"'`]/g,g=RegExp(f.source);b.exports=c},{"../internal/baseToString":42,"../internal/escapeHtmlChar":56}],96:[function(a,b){function c(a){return a=d(a),a&&f.test(a)?a.replace(e,"\\$&"):a}var d=a("../internal/baseToString"),e=/[.*+?^${}()|[\]\/\\]/g,f=RegExp(e.source);b.exports=c},{"../internal/baseToString":42}],97:[function(a,b){(function(c){var d=a("./lang/isNative"),e=/\bthis\b/,f=Object.prototype,g=(g=c.window)&&g.document,h=f.propertyIsEnumerable,i={};!function(){i.funcDecomp=!d(c.WinRTError)&&e.test(function(){return this}),i.funcNames="string"==typeof Function.name;try{i.dom=11===g.createDocumentFragment().nodeType}catch(a){i.dom=!1}try{i.nonEnumArgs=!h.call(arguments,1)}catch(a){i.nonEnumArgs=!0}}(0,0),b.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lang/isNative":81}],98:[function(a,b){function c(a){return function(){return a}}b.exports=c},{}],99:[function(a,b){function c(a){return a}b.exports=c},{}],100:[function(a,b){function c(a){return e(d(a,!0))}var d=a("../internal/baseClone"),e=a("../internal/baseMatches");b.exports=c},{"../internal/baseClone":21,"../internal/baseMatches":36}],101:[function(a,b){function c(){}b.exports=c},{}],102:[function(a,b){function c(a){var b=++e;return d(a)+b}var d=a("../internal/baseToString"),e=0;b.exports=c},{"../internal/baseToString":42}]},{},[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = { | |
keys: require('lodash/object/keys'), | |
result: require('lodash/object/result'), | |
extend: require('lodash/object/extend'), | |
defaults: require('lodash/object/defaults'), | |
has: require('lodash/object/has'), | |
pick: require('lodash/object/pick'), | |
bind: require('lodash/function/bind'), | |
once: require('lodash/function/once'), | |
bindAll: require('lodash/function/bindAll'), | |
uniqueId: require('lodash/utility/uniqueId'), | |
matches: require('lodash/utility/matches'), | |
invoke: require('lodash/collection/invoke'), | |
each: require('lodash/collection/each'), | |
map: require('lodash/collection/map'), | |
any: require('lodash/collection/any'), | |
escape: require('lodash/string/escape'), | |
clone: require('lodash/lang/clone'), | |
isEmpty: require('lodash/lang/isEmpty'), | |
isObject: require('lodash/lang/isObject'), | |
isArray: require('lodash/lang/isArray'), | |
isString: require('lodash/lang/isString'), | |
isFunction: require('lodash/lang/isFunction'), | |
isRegExp: require('lodash/lang/isRegExp') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try using the bundle-collapser Browserify plugin and some additional Uglify commands:
If using webpack try:
Use gzip-size and pretty-bytes to get the gzipped size:
$ pretty-bytes $(gzip-size bundle.min.js)