mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Clarify _.uniq doc example and rebuild files. [closes #282]
Former-commit-id: b3ab9ae81af219dfb75b3f4339555530a6301f6e
This commit is contained in:
305
dist/lodash.compat.js
vendored
305
dist/lodash.compat.js
vendored
@@ -642,80 +642,25 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function optimized to search large arrays for a given `value`,
|
||||
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
|
||||
* A basic version of `_.indexOf` without support for binary searches
|
||||
* or `fromIndex` constraints.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Boolean} Returns `true`, if `value` is found, else `false`.
|
||||
* @param {Number} [fromIndex=0] The index to search from.
|
||||
* @returns {Number} Returns the index of the matched value or `-1`.
|
||||
*/
|
||||
function createCache(array) {
|
||||
var bailout,
|
||||
index = -1,
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
objCache = {};
|
||||
function basicIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex || 0) - 1,
|
||||
length = array.length;
|
||||
|
||||
var caches = {
|
||||
'false': false,
|
||||
'function': false,
|
||||
'null': false,
|
||||
'number': {},
|
||||
'object': objCache,
|
||||
'string': {},
|
||||
'true': false,
|
||||
'undefined': false
|
||||
};
|
||||
|
||||
function cacheContains(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
return caches[value];
|
||||
}
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] ? indexOf(cache[key], value) > -1 : false)
|
||||
: !!cache[key];
|
||||
}
|
||||
|
||||
function cachePush(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
caches[value] = true;
|
||||
} else {
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
if (type == 'object') {
|
||||
bailout = (cache[key] || (cache[key] = [])).push(value) == length;
|
||||
} else {
|
||||
cache[key] = true;
|
||||
}
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
function simpleContains(value) {
|
||||
return indexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function simplePush(value) {
|
||||
array.push(value);
|
||||
}
|
||||
|
||||
if (isLarge) {
|
||||
while (++index < length) {
|
||||
cachePush(array[index]);
|
||||
}
|
||||
if (bailout) {
|
||||
isLarge = caches = objCache = null;
|
||||
}
|
||||
}
|
||||
return isLarge
|
||||
? { 'contains': cacheContains, 'push': cachePush }
|
||||
: { 'push': simplePush, 'contains' : simpleContains };
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -817,6 +762,85 @@
|
||||
return bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function optimized to search large arrays for a given `value`,
|
||||
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array=[]] The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Boolean} Returns `true`, if `value` is found, else `false`.
|
||||
*/
|
||||
function createCache(array) {
|
||||
array || (array = []);
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
'false': false,
|
||||
'function': false,
|
||||
'null': false,
|
||||
'number': {},
|
||||
'object': objCache,
|
||||
'string': {},
|
||||
'true': false,
|
||||
'undefined': false
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
array.push(value);
|
||||
}
|
||||
|
||||
function cacheContains(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
return caches[value];
|
||||
}
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] ? basicIndexOf(cache[key], value) > -1 : false)
|
||||
: !!cache[key];
|
||||
}
|
||||
|
||||
function cachePush(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
caches[value] = true;
|
||||
} else {
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
if (type == 'object') {
|
||||
bailout = (cache[key] || (cache[key] = [])).push(value) == length;
|
||||
} else {
|
||||
cache[key] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isLarge) {
|
||||
while (++index < length) {
|
||||
cachePush(array[index]);
|
||||
}
|
||||
if (bailout) {
|
||||
isLarge = caches = objCache = null;
|
||||
}
|
||||
}
|
||||
return isLarge
|
||||
? { 'contains': cacheContains, 'push': cachePush }
|
||||
: { 'contains': basicContains, 'push': basicPush };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates compiled iteration functions.
|
||||
*
|
||||
@@ -891,6 +915,17 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeHtmlChar(match) {
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `template` to escape characters for inclusion in compiled
|
||||
* string literals.
|
||||
@@ -903,17 +938,6 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeHtmlChar(match) {
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a DOM node in IE < 9.
|
||||
*
|
||||
@@ -949,6 +973,29 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that juggles arguments, allowing argument overloading
|
||||
* for `_.flatten` and `_.uniq`, before passing them to the given `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overloadWrapper(func) {
|
||||
return function(array, flag, callback, thisArg) {
|
||||
// juggle arguments
|
||||
if (typeof flag != 'boolean' && flag != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[flag] === array) ? flag : undefined;
|
||||
flag = false;
|
||||
}
|
||||
if (callback != null) {
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
}
|
||||
return func(array, flag, callback, thisArg);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` which checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
@@ -1131,7 +1178,7 @@
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Array|Object|String} Returns `collection`.
|
||||
*/
|
||||
var each = createIterator(eachIteratorOptions);
|
||||
var basicEach = createIterator(eachIteratorOptions);
|
||||
|
||||
/**
|
||||
* Used to convert characters to HTML entities:
|
||||
@@ -1316,7 +1363,7 @@
|
||||
stackB.push(result);
|
||||
|
||||
// recursively populate clone (susceptible to call stack limits)
|
||||
(isArr ? each : forOwn)(value, function(objValue, key) {
|
||||
(isArr ? basicEach : forOwn)(value, function(objValue, key) {
|
||||
result[key] = clone(objValue, deep, callback, undefined, stackA, stackB);
|
||||
});
|
||||
|
||||
@@ -2246,7 +2293,7 @@
|
||||
forIn(object, function(value, key, object) {
|
||||
if (isFunc
|
||||
? !callback(value, key, object)
|
||||
: indexOf(props, key) < 0
|
||||
: basicIndexOf(props, key) < 0
|
||||
) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -2374,7 +2421,7 @@
|
||||
accumulator = createObject(proto);
|
||||
}
|
||||
}
|
||||
(isArr ? each : forOwn)(object, function(value, index, object) {
|
||||
(isArr ? basicEach : forOwn)(object, function(value, index, object) {
|
||||
return callback(accumulator, value, index, object);
|
||||
});
|
||||
return accumulator;
|
||||
@@ -2476,13 +2523,13 @@
|
||||
result = false;
|
||||
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0;
|
||||
if (typeof length == 'number') {
|
||||
if (length && typeof length == 'number') {
|
||||
result = (isString(collection)
|
||||
? collection.indexOf(target, fromIndex)
|
||||
: indexOf(collection, target, fromIndex)
|
||||
: basicIndexOf(collection, target, fromIndex)
|
||||
) > -1;
|
||||
} else {
|
||||
each(collection, function(value) {
|
||||
basicEach(collection, function(value) {
|
||||
if (++index >= fromIndex) {
|
||||
return !(result = value === target);
|
||||
}
|
||||
@@ -2590,7 +2637,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
return (result = !!callback(value, index, collection));
|
||||
});
|
||||
}
|
||||
@@ -2652,7 +2699,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
if (callback(value, index, collection)) {
|
||||
result.push(value);
|
||||
}
|
||||
@@ -2719,7 +2766,7 @@
|
||||
}
|
||||
} else {
|
||||
var result;
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
if (callback(value, index, collection)) {
|
||||
result = value;
|
||||
return false;
|
||||
@@ -2762,7 +2809,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
each(collection, callback, thisArg);
|
||||
basicEach(collection, callback, thisArg);
|
||||
}
|
||||
return collection;
|
||||
}
|
||||
@@ -2897,7 +2944,7 @@
|
||||
result[index] = callback(collection[index], index, collection);
|
||||
}
|
||||
} else {
|
||||
each(collection, function(value, key, collection) {
|
||||
basicEach(collection, function(value, key, collection) {
|
||||
result[++index] = callback(value, key, collection);
|
||||
});
|
||||
}
|
||||
@@ -2962,7 +3009,7 @@
|
||||
? charAtCallback
|
||||
: lodash.createCallback(callback, thisArg);
|
||||
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
var current = callback(value, index, collection);
|
||||
if (current > computed) {
|
||||
computed = current;
|
||||
@@ -3031,7 +3078,7 @@
|
||||
? charAtCallback
|
||||
: lodash.createCallback(callback, thisArg);
|
||||
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
var current = callback(value, index, collection);
|
||||
if (current < computed) {
|
||||
computed = current;
|
||||
@@ -3109,7 +3156,7 @@
|
||||
accumulator = callback(accumulator, collection[index], index, collection);
|
||||
}
|
||||
} else {
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
accumulator = noaccum
|
||||
? (noaccum = false, value)
|
||||
: callback(accumulator, value, index, collection)
|
||||
@@ -3312,7 +3359,7 @@
|
||||
}
|
||||
}
|
||||
} else {
|
||||
each(collection, function(value, index, collection) {
|
||||
basicEach(collection, function(value, index, collection) {
|
||||
return !(result = callback(value, index, collection));
|
||||
});
|
||||
}
|
||||
@@ -3637,20 +3684,11 @@
|
||||
* _.flatten(stooges, 'quotes');
|
||||
* // => ['Oh, a wise guy, eh?', 'Poifect!', 'Spread out!', 'You knucklehead!']
|
||||
*/
|
||||
function flatten(array, isShallow, callback, thisArg) {
|
||||
var flatten = overloadWrapper(function flatten(array, isShallow, callback) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
// juggle arguments
|
||||
if (typeof isShallow != 'boolean' && isShallow != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[isShallow] === array) ? isShallow : undefined;
|
||||
isShallow = false;
|
||||
}
|
||||
if (callback != null) {
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (callback) {
|
||||
@@ -3664,7 +3702,7 @@
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets the index at which the first occurrence of `value` is found using
|
||||
@@ -3691,21 +3729,14 @@
|
||||
* // => 2
|
||||
*/
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
if (typeof fromIndex == 'number') {
|
||||
index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1;
|
||||
var length = array ? array.length : 0;
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
index = sortedIndex(array, value);
|
||||
var index = sortedIndex(array, value);
|
||||
return array[index] === value ? index : -1;
|
||||
}
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return array ? basicIndexOf(array, value, fromIndex) : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3801,7 +3832,7 @@
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
cache = createCache([]),
|
||||
cache = createCache(),
|
||||
caches = {},
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
@@ -4150,7 +4181,7 @@
|
||||
* Creates a duplicate-value-free version of the `array` using strict equality
|
||||
* for comparisons, i.e. `===`. If the `array` is already sorted, passing `true`
|
||||
* for `isSorted` will run a faster algorithm. If `callback` is passed, each
|
||||
* element of `array` is passed through a `callback` before uniqueness is computed.
|
||||
* element of `array` is passed through the `callback` before uniqueness is computed.
|
||||
* The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is passed for `callback`, the created "_.pluck" style
|
||||
@@ -4179,44 +4210,30 @@
|
||||
* _.uniq([1, 1, 2, 2, 3], true);
|
||||
* // => [1, 2, 3]
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
|
||||
* // => ['A', 'b', 'C']
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2.5, 3]
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
* // => [{ 'x': 1 }, { 'x': 2 }]
|
||||
*/
|
||||
function uniq(array, isSorted, callback, thisArg) {
|
||||
var uniq = overloadWrapper(function(array, isSorted, callback) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0,
|
||||
isLarge = !isSorted && length >= largeArraySize,
|
||||
result = [],
|
||||
seen = result;
|
||||
seen = isLarge ? createCache() : (callback ? [] : result);
|
||||
|
||||
// juggle arguments
|
||||
if (typeof isSorted != 'boolean' && isSorted != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[isSorted] === array) ? isSorted : undefined;
|
||||
isSorted = false;
|
||||
}
|
||||
// init value cache for large arrays
|
||||
var isLarge = !isSorted && length >= largeArraySize;
|
||||
if (callback != null) {
|
||||
seen = [];
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
}
|
||||
if (isLarge) {
|
||||
seen = createCache([]);
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index],
|
||||
computed = callback ? callback(value, index, array) : value;
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: (isLarge ? !seen.contains(computed) : indexOf(seen, computed) < 0)
|
||||
: (isLarge ? !seen.contains(computed) : basicIndexOf(seen, computed) < 0)
|
||||
) {
|
||||
if (callback || isLarge) {
|
||||
seen.push(computed);
|
||||
@@ -4225,7 +4242,7 @@
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The inverse of `_.zip`, this method splits groups of elements into arrays
|
||||
@@ -5608,7 +5625,7 @@
|
||||
lodash.prototype.valueOf = wrapperValueOf;
|
||||
|
||||
// add `Array` functions that return unwrapped values
|
||||
each(['join', 'pop', 'shift'], function(methodName) {
|
||||
basicEach(['join', 'pop', 'shift'], function(methodName) {
|
||||
var func = arrayProto[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
return func.apply(this.__wrapped__, arguments);
|
||||
@@ -5616,7 +5633,7 @@
|
||||
});
|
||||
|
||||
// add `Array` functions that return the wrapped value
|
||||
each(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
|
||||
basicEach(['push', 'reverse', 'sort', 'unshift'], function(methodName) {
|
||||
var func = arrayProto[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
func.apply(this.__wrapped__, arguments);
|
||||
@@ -5625,7 +5642,7 @@
|
||||
});
|
||||
|
||||
// add `Array` functions that return new wrapped values
|
||||
each(['concat', 'slice', 'splice'], function(methodName) {
|
||||
basicEach(['concat', 'slice', 'splice'], function(methodName) {
|
||||
var func = arrayProto[methodName];
|
||||
lodash.prototype[methodName] = function() {
|
||||
return new lodashWrapper(func.apply(this.__wrapped__, arguments));
|
||||
@@ -5635,7 +5652,7 @@
|
||||
// avoid array-like object bugs with `Array#shift` and `Array#splice`
|
||||
// in Firefox < 10 and IE < 9
|
||||
if (!support.spliceObjects) {
|
||||
each(['pop', 'shift', 'splice'], function(methodName) {
|
||||
basicEach(['pop', 'shift', 'splice'], function(methodName) {
|
||||
var func = arrayProto[methodName],
|
||||
isSplice = methodName == 'splice';
|
||||
|
||||
|
||||
84
dist/lodash.compat.min.js
vendored
84
dist/lodash.compat.min.js
vendored
@@ -4,46 +4,46 @@
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;!function(n){function t(e){function a(n){return n&&typeof n=="object"&&!Sr(n)&&er.call(n,"__wrapped__")?n:new Q(n)}function T(n){function t(n){var t=typeof n;if("boolean"==t||null==n)return s[n];var r=s[t]||(t="object",p),e="number"==t?n:l+n;return"object"==t?r[e]?-1<kt(r[e],n):!1:!!r[e]}function r(n){var t=typeof n;if("boolean"==t||null==n)s[n]=!0;else{var r=s[t]||(t="object",p),e="number"==t?n:l+n;"object"==t?a=(r[e]||(r[e]=[])).push(n)==i:r[e]=!0}}function e(t){return-1<kt(n,t)}function u(t){n.push(t)
|
||||
}var a,o=-1,i=n.length,f=i>=c,p={},s={"false":!1,"function":!1,"null":!1,number:{},object:p,string:{},"true":!1,undefined:!1};if(f){for(;++o<i;)r(n[o]);a&&(f=s=p=null)}return f?{contains:t,push:r}:{push:u,contains:e}}function L(n){return n.charCodeAt(0)}function G(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function H(n,t,r,e){function u(){var e=arguments,c=o?this:t;return a||(n=t[i]),r.length&&(e=e.length?(e=br.call(e),l?e.concat(r):r.concat(e)):r),this instanceof u?(c=K(n.prototype),e=n.apply(c,e),ot(e)?e:c):n.apply(c,e)
|
||||
}var a=at(n),o=!r,i=t;if(o){var l=e;r=t}else if(!a){if(!e)throw new Jt;t=n}return u}function J(){for(var n,t={g:x,b:"",c:"",e:"r",f:"",h:"",i:!0,j:!!Ir},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];r=t.a,t.d=/^[^,]+/.exec(r)[0],n=Dt,r="return function("+r+"){",e="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(e+="var s=r.length;m=-1;if("+t.b+"){",kr.unindexedChars&&(e+="if(q(r)){r=r.split('')}"),e+="while(++m<s){"+t.f+";}}else{"):kr.nonEnumArgs&&(e+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),kr.enumPrototypes&&(e+="var E=typeof r=='function';"),kr.enumErrorProps&&(e+="var D=r===j||r instanceof Error;");
|
||||
var u=[];if(kr.enumPrototypes&&u.push('!(E&&m=="prototype")'),kr.enumErrorProps&&u.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)e+="var A=-1,B=z[typeof r]?t(r):[],s=B.length;while(++A<s){m=B[A];",u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}";else if(e+="for(m in r){",t.i&&u.push("l.call(r, m)"),u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}",kr.nonEnumShadows){for(e+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)e+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(e+="||(!v[m]&&r[m]!==y[m])"),e+="){"+t.f+"}";
|
||||
e+="}"}return(t.b||kr.nonEnumArgs)&&(e+="}"),e+=t.c+";return C",n("i,j,l,n,o,q,t,u,y,z,w,G,H,J",r+e+"}")(I,Mt,er,nt,Sr,lt,Ir,a,Ut,q,wr,F,Vt,lr)}function K(n){return ot(n)?fr(n):{}}function M(n){return"\\"+D[n]}function U(n){return Nr[n]}function V(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function Q(n){this.__wrapped__=n}function W(){}function X(n){var t=!1;if(!n||lr.call(n)!=P||!kr.argsClass&&nt(n))return t;var r=n.constructor;return(at(r)?r instanceof r:kr.nodeClass||!V(n))?kr.ownLast?($r(n,function(n,r,e){return t=er.call(e,r),!1
|
||||
}),!0===t):($r(n,function(n,r){t=r}),!1===t||er.call(n,t)):t}function Y(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Ft(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function Z(n){return Pr[n]}function nt(n){return lr.call(n)==E}function tt(n,t,e,u,o,i){var l=n;if(typeof t!="boolean"&&null!=t&&(u=e,e=t,t=!1),typeof e=="function"){if(e=typeof u=="undefined"?e:a.createCallback(e,u,1),l=e(l),typeof l!="undefined")return l;l=n}if(u=ot(l)){var c=lr.call(l);if(!$[c]||!kr.nodeClass&&V(l))return l;
|
||||
var f=Sr(l)}if(!u||!t)return u?f?Y(l):zr({},l):l;switch(u=jr[c],c){case S:case A:return new u(+l);case N:case F:return new u(l);case z:return u(l.source,h.exec(l))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return l=f?u(l.length):{},f&&(er.call(n,"index")&&(l.index=n.index),er.call(n,"input")&&(l.input=n.input)),o.push(n),i.push(l),(f?Br:qr)(n,function(n,u){l[u]=tt(n,t,e,r,o,i)}),l}function rt(n){var t=[];return $r(n,function(n,r){at(n)&&t.push(r)}),t.sort()}function et(n){for(var t=-1,r=Ir(n),e=r.length,u={};++t<e;){var a=r[t];
|
||||
u[n[a]]=a}return u}function ut(n,t,r,e,u,o){var l=r===i;if(typeof r=="function"&&!l){r=a.createCallback(r,e,2);var c=r(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,p=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=lr.call(n),f=lr.call(t),p==E&&(p=P),f==E&&(f=P),p!=f)return!1;switch(p){case S:case A:return+n==+t;case N:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case F:return n==Ht(t)
|
||||
}if(f=p==O,!f){if(er.call(n,"__wrapped__")||er.call(t,"__wrapped__"))return ut(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(p!=P||!kr.nodeClass&&(V(n)||V(t)))return!1;var p=!kr.argsObject&&nt(n)?Lt:n.constructor,s=!kr.argsObject&&nt(t)?Lt:t.constructor;if(p!=s&&(!at(p)||!(p instanceof p&&at(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var g=0,c=!0;if(u.push(n),o.push(t),f){if(p=n.length,g=t.length,c=g==n.length,!c&&!l)return c;for(;g--;)if(f=p,s=t[g],l)for(;f--&&!(c=ut(n[f],s,r,e,u,o)););else if(!(c=ut(n[g],s,r,e,u,o)))break;
|
||||
return c}return $r(t,function(t,a,i){return er.call(i,a)?(g++,c=er.call(n,a)&&ut(n[a],t,r,e,u,o)):void 0}),c&&!l&&$r(n,function(n,t,r){return er.call(r,t)?c=-1<--g:void 0}),c}function at(n){return typeof n=="function"}function ot(n){return!(!n||!q[typeof n])}function it(n){return typeof n=="number"||lr.call(n)==N}function lt(n){return typeof n=="string"||lr.call(n)==F}function ct(n,t,r){var e=arguments,u=0,o=2;if(!ot(n))return n;if(r===i)var l=e[3],c=e[4],f=e[5];else c=[],f=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?l=a.createCallback(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(l=e[--o]);
|
||||
for(;++u<o;)(Sr(e[u])?ht:qr)(e[u],function(t,r){var e,u,a=t,o=n[r];if(t&&((u=Sr(t))||Dr(t))){for(a=c.length;a--;)if(e=c[a]==t){o=f[a];break}if(!e){var p;l&&(a=l(o,t),p=typeof a!="undefined")&&(o=a),p||(o=u?Sr(o)?o:[]:Dr(o)?o:{}),c.push(t),f.push(o),p||(o=ct(o,t,i,l,c,f))}}else l&&(a=l(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);n[r]=o});return n}function ft(n){for(var t=-1,r=Ir(n),e=r.length,u=Ft(e);++t<e;)u[t]=n[r[t]];return u}function pt(n,t,r){var e=-1,u=n?n.length:0,a=!1;return r=(0>r?hr(0,u+r):r)||0,typeof u=="number"?a=-1<(lt(n)?n.indexOf(t,r):kt(n,t,r)):Br(n,function(n){return++e<r?void 0:!(a=n===t)
|
||||
}),a}function st(n,t,r){var e=!0;if(t=a.createCallback(t,r),Sr(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else Br(n,function(n,r,u){return e=!!t(n,r,u)});return e}function gt(n,t,r){var e=[];if(t=a.createCallback(t,r),Sr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else Br(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function vt(n,t,r){if(t=a.createCallback(t,r),!Sr(n)){var e;return Br(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}r=-1;for(var u=n.length;++r<u;){var o=n[r];
|
||||
if(t(o,r,n))return o}}function ht(n,t,r){if(t&&typeof r=="undefined"&&Sr(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else Br(n,t,r);return n}function yt(n,t,r){var e=-1,u=n?n.length:0,o=Ft(typeof u=="number"?u:0);if(t=a.createCallback(t,r),Sr(n))for(;++e<u;)o[e]=t(n[e],e,n);else Br(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function mt(n,t,r){var e=-1/0,u=e;if(!t&&Sr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&<(n)?L:a.createCallback(t,r),Br(n,function(n,r,a){r=t(n,r,a),r>e&&(e=r,u=n)
|
||||
});return u}function dt(n,t,r,e){var u=3>arguments.length;if(t=a.createCallback(t,e,4),Sr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)}else Br(n,function(n,e,a){r=u?(u=!1,n):t(r,n,e,a)});return r}function bt(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var l=Ir(n),o=l.length;else kr.unindexedChars&<(n)&&(u=n.split(""));return t=a.createCallback(t,e,4),ht(n,function(n,e,a){e=l?l[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function _t(n,t,r){var e;
|
||||
if(t=a.createCallback(t,r),Sr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else Br(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function Ct(n){for(var t=-1,r=n?n.length:0,e=Zt.apply(Kt,br.call(arguments,1)),e=T(e).contains,u=[];++t<r;){var a=n[t];e(a)||u.push(a)}return u}function jt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return Y(n,0,yr(hr(0,e),u))}}function wt(n,t,e,u){var o=-1,i=n?n.length:0,l=[];
|
||||
for(typeof t!="boolean"&&null!=t&&(u=e,e=u&&u[t]===n?r:t,t=!1),null!=e&&(e=a.createCallback(e,u));++o<i;)u=n[o],e&&(u=e(u,o,n)),Sr(u)?ur.apply(l,t?u:wt(u)):l.push(u);return l}function kt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?hr(0,u+r):r||0)-1;else if(r)return e=Et(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function xt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:hr(0,t);
|
||||
return Y(n,e)}function Et(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?a.createCallback(r,e,1):Nt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function Ot(n,t,e,u){var o=-1,i=n?n.length:0,l=[],f=l;typeof t!="boolean"&&null!=t&&(u=e,e=u&&u[t]===n?r:t,t=!1);var p=!t&&i>=c;for(null!=e&&(f=[],e=a.createCallback(e,u)),p&&(f=T([]));++o<i;){u=n[o];var s=e?e(u,o,n):u;(t?o&&f[f.length-1]===s:p?f.contains(s):0<=kt(f,s))||((e||p)&&f.push(s),l.push(u))}return l}function St(n){for(var t=-1,r=n?mt(Rr(n,"length")):0,e=Ft(0>r?0:r);++t<r;)e[t]=Rr(n,t);
|
||||
return e}function At(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var a=n[r];t?u[a]=t[r]:u[a[0]]=a[1]}return u}function It(n,t){return kr.fastBind||cr&&2<arguments.length?cr.call.apply(cr,arguments):H(n,t,br.call(arguments,2))}function Bt(n){var t=br.call(arguments,1);return ir(function(){n.apply(r,t)},1)}function Nt(n){return n}function Pt(n){ht(rt(n),function(t){var r=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return ur.apply(t,arguments),t=r.apply(a,t),n&&typeof n=="object"&&n==t?this:new Q(t)
|
||||
}})}function zt(){return this.__wrapped__}e=e?R.defaults(n.Object(),e,R.pick(n,w)):n;var Ft=e.Array,$t=e.Boolean,qt=e.Date,Dt=e.Function,Rt=e.Math,Tt=e.Number,Lt=e.Object,Gt=e.RegExp,Ht=e.String,Jt=e.TypeError,Kt=Ft.prototype,Mt=e.Error.prototype,Ut=Lt.prototype,Vt=Ht.prototype,Qt=e._,Wt=Gt("^"+Ht(Ut.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Xt=Rt.ceil,Yt=e.clearTimeout,Zt=Kt.concat,nr=Rt.floor,tr=Dt.prototype.toString,rr=Wt.test(rr=Lt.getPrototypeOf)&&rr,er=Ut.hasOwnProperty,ur=Kt.push,ar=Ut.propertyIsEnumerable,or=e.setImmediate,ir=e.setTimeout,lr=Ut.toString,cr=Wt.test(cr=lr.bind)&&cr,fr=Wt.test(fr=Lt.create)&&fr,pr=Wt.test(pr=Ft.isArray)&&pr,sr=e.isFinite,gr=e.isNaN,vr=Wt.test(vr=Lt.keys)&&vr,hr=Rt.max,yr=Rt.min,mr=e.parseInt,dr=Rt.random,br=Kt.slice,_r=Wt.test(e.attachEvent),Cr=cr&&!/\n|true/.test(cr+_r),jr={};
|
||||
jr[O]=Ft,jr[S]=$t,jr[A]=qt,jr[B]=Dt,jr[P]=Lt,jr[N]=Tt,jr[z]=Gt,jr[F]=Ht;var wr={};wr[O]=wr[A]=wr[N]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},wr[S]=wr[F]={constructor:!0,toString:!0,valueOf:!0},wr[I]=wr[B]=wr[z]={constructor:!0,toString:!0},wr[P]={constructor:!0},function(){for(var n=x.length;n--;){var t,r=x[n];for(t in wr)er.call(wr,t)&&!er.call(wr[t],r)&&(wr[t][r]=!1)}}();var kr=a.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};
|
||||
for(var e in new n)r.push(e);for(e in arguments);kr.argsObject=arguments.constructor==Lt&&!(arguments instanceof Ft),kr.argsClass=nt(arguments),kr.enumErrorProps=ar.call(Mt,"message")||ar.call(Mt,"name"),kr.enumPrototypes=ar.call(n,"prototype"),kr.fastBind=cr&&!Cr,kr.ownLast="x"!=r[0],kr.nonEnumArgs=0!=e,kr.nonEnumShadows=!/valueOf/.test(r),kr.spliceObjects=(Kt.splice.call(t,0,1),!t[0]),kr.unindexedChars="xx"!="x"[0]+Lt("x")[0];try{kr.nodeClass=!(lr.call(document)==P&&!({toString:0}+""))}catch(u){kr.nodeClass=!0
|
||||
}}(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var xr={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},Er={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},Or={h:"if(!z[typeof r])return C;"+Er.h,b:!1};fr||(K=function(n){if(ot(n)){W.prototype=n;
|
||||
var t=new W;W.prototype=null}return t||{}}),Q.prototype=a.prototype,kr.argsClass||(nt=function(n){return n?er.call(n,"callee"):!1});var Sr=pr||function(n){return n?typeof n=="object"&&lr.call(n)==O:!1},Ar=J({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),Ir=vr?function(n){return ot(n)?kr.enumPrototypes&&typeof n=="function"||kr.nonEnumArgs&&n.length&&nt(n)?Ar(n):vr(n):[]}:Ar,Br=J(Er),Nr={"&":"&","<":"<",">":">",'"':""","'":"'"},Pr=et(Nr),zr=J(xr,{h:xr.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),Fr=J(xr),$r=J(Er,Or,{i:!1}),qr=J(Er,Or);
|
||||
at(/x/)&&(at=function(n){return typeof n=="function"&&lr.call(n)==B});var Dr=rr?function(n){if(!n||lr.call(n)!=P||!kr.argsClass&&nt(n))return!1;var t=n.valueOf,r=typeof t=="function"&&(r=rr(t))&&rr(r);return r?n==r||rr(n)==r:X(n)}:X,Rr=yt;Cr&&u&&typeof or=="function"&&(Bt=It(or,e));var Tr=8==mr(d+"08")?mr:function(n,t){return mr(lt(n)?n.replace(b,""):n,t||0)};return a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=zr,a.at=function(n){var t=-1,r=Zt.apply(Kt,br.call(arguments,1)),e=r.length,u=Ft(e);
|
||||
for(kr.unindexedChars&<(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},a.bind=It,a.bindAll=function(n){for(var t=1<arguments.length?Zt.apply(Kt,br.call(arguments,1)):rt(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=It(n[u],n)}return n},a.bindKey=function(n,t){return H(n,t,br.call(arguments,2),i)},a.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},a.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},a.countBy=function(n,t,r){var e={};return t=a.createCallback(t,r),ht(n,function(n,r,u){r=Ht(t(n,r,u)),er.call(e,r)?e[r]++:e[r]=1}),e},a.createCallback=function(n,t,r){if(null==n)return Nt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Ir(n);return function(t){for(var r=u.length,e=!1;r--&&(e=ut(t[u[r]],n[u[r]],i)););return e}}return typeof t=="undefined"||m&&!m.test(tr.call(n))?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)
|
||||
}:4===r?function(r,e,u,a){return n.call(t,r,e,u,a)}:function(r,e,u){return n.call(t,r,e,u)}},a.debounce=function(n,t,r){function e(){var t=c&&(!f||1<i);i=l=0,t&&(a=n.apply(o,u))}var u,a,o,i=0,l=null,c=!0;if(!0===r)var f=!0,c=!1;else ot(r)&&(f=r.leading,c="trailing"in r?r.trailing:c);return function(){return u=arguments,o=this,Yt(l),f&&2>++i&&(a=n.apply(o,u)),l=ir(e,t),a}},a.defaults=Fr,a.defer=Bt,a.delay=function(n,t){var e=br.call(arguments,2);return ir(function(){n.apply(r,e)},t)},a.difference=Ct,a.filter=gt,a.flatten=wt,a.forEach=ht,a.forIn=$r,a.forOwn=qr,a.functions=rt,a.groupBy=function(n,t,r){var e={};
|
||||
return t=a.createCallback(t,r),ht(n,function(n,r,u){r=Ht(t(n,r,u)),(er.call(e,r)?e[r]:e[r]=[]).push(n)}),e},a.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return Y(n,0,yr(hr(0,u-e),u))},a.intersection=function(n){var t=arguments,r=t.length,e=T([]),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var l=n[a];if(!e.contains(l)){var c=r;for(e.push(l);--c;)if(!(u[c]||(u[c]=T(t[c]).contains))(l))continue n;
|
||||
i.push(l)}}return i},a.invert=et,a.invoke=function(n,t){var r=br.call(arguments,2),e=-1,u=typeof t=="function",a=n?n.length:0,o=Ft(typeof a=="number"?a:0);return ht(n,function(n){o[++e]=(u?t:n[t]).apply(n,r)}),o},a.keys=Ir,a.map=yt,a.max=mt,a.memoize=function(n,t){function r(){var e=r.cache,u=l+(t?t.apply(this,arguments):arguments[0]);return er.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}return r.cache={},r},a.merge=ct,a.min=function(n,t,r){var e=1/0,u=e;if(!t&&Sr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];
|
||||
i<u&&(u=i)}}else t=!t&<(n)?L:a.createCallback(t,r),Br(n,function(n,r,a){r=t(n,r,a),r<e&&(e=r,u=n)});return u},a.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=a.createCallback(t,r);else var o=Zt.apply(Kt,br.call(arguments,1));return $r(n,function(n,r,a){(e?!t(n,r,a):0>kt(o,r))&&(u[r]=n)}),u},a.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},a.pairs=function(n){for(var t=-1,r=Ir(n),e=r.length,u=Ft(e);++t<e;){var a=r[t];u[t]=[a,n[a]]}return u
|
||||
},a.partial=function(n){return H(n,br.call(arguments,1))},a.partialRight=function(n){return H(n,br.call(arguments,1),null,i)},a.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,o=Zt.apply(Kt,br.call(arguments,1)),i=ot(n)?o.length:0;++u<i;){var l=o[u];l in n&&(e[l]=n[l])}else t=a.createCallback(t,r),$r(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},a.pluck=Rr,a.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=hr(0,Xt((t-n)/r));for(var u=Ft(t);++e<t;)u[e]=n,n+=r;
|
||||
return u},a.reject=function(n,t,r){return t=a.createCallback(t,r),gt(n,function(n,r,e){return!t(n,r,e)})},a.rest=xt,a.shuffle=function(n){var t=-1,r=n?n.length:0,e=Ft(typeof r=="number"?r:0);return ht(n,function(n){var r=nr(dr()*(++t+1));e[t]=e[r],e[r]=n}),e},a.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=Ft(typeof u=="number"?u:0);for(t=a.createCallback(t,r),ht(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(G);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t,r){function e(){c=null,f&&(i=new qt,a=n.apply(o,u))
|
||||
}var u,a,o,i=0,l=!0,c=null,f=!0;return!1===r?l=!1:ot(r)&&(l="leading"in r?r.leading:l,f="trailing"in r?r.trailing:f),function(){var r=new qt;!c&&!l&&(i=r);var f=t-(r-i);return u=arguments,o=this,0<f?c||(c=ir(e,f)):(Yt(c),c=null,i=r,a=n.apply(o,u)),a}},a.times=function(n,t,r){n=-1<(n=+n)?n:0;var e=-1,u=Ft(n);for(t=a.createCallback(t,r,1);++e<n;)u[e]=t(e);return u},a.toArray=function(n){return n&&typeof n.length=="number"?kr.unindexedChars&<(n)?n.split(""):Y(n):ft(n)},a.transform=function(n,t,r,e){var u=Sr(n);
|
||||
return t=a.createCallback(t,e,4),null==r&&(u?r=[]:(e=n&&n.constructor,r=K(e&&e.prototype))),(u?Br:qr)(n,function(n,e,u){return t(r,n,e,u)}),r},a.union=function(n){return Sr(n)||(arguments[0]=n?br.call(n):Kt),Ot(Zt.apply(Kt,arguments))},a.uniq=Ot,a.unzip=St,a.values=ft,a.where=gt,a.without=function(n){return Ct(n,br.call(arguments,1))},a.wrap=function(n,t){return function(){var r=[n];return ur.apply(r,arguments),t.apply(this,r)}},a.zip=function(n){return n?St(arguments):[]},a.zipObject=At,a.collect=yt,a.drop=xt,a.each=ht,a.extend=zr,a.methods=rt,a.object=At,a.select=gt,a.tail=xt,a.unique=Ot,Pt(a),a.chain=a,a.prototype.chain=function(){return this
|
||||
},a.clone=tt,a.cloneDeep=function(n,t,r){return tt(n,!0,t,r)},a.contains=pt,a.escape=function(n){return null==n?"":Ht(n).replace(C,U)},a.every=st,a.find=vt,a.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;for(t=a.createCallback(t,r);++e<u;)if(t(n[e],e,n))return e;return-1},a.findKey=function(n,t,r){var e;return t=a.createCallback(t,r),qr(n,function(n,r,u){return t(n,r,u)?(e=r,!1):void 0}),e},a.has=function(n,t){return n?er.call(n,t):!1},a.identity=Nt,a.indexOf=kt,a.isArguments=nt,a.isArray=Sr,a.isBoolean=function(n){return!0===n||!1===n||lr.call(n)==S
|
||||
},a.isDate=function(n){return n?typeof n=="object"&&lr.call(n)==A:!1},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var r=lr.call(n),e=n.length;return r==O||r==F||(kr.argsClass?r==E:nt(n))||r==P&&typeof e=="number"&&at(n.splice)?!e:(qr(n,function(){return t=!1}),t)},a.isEqual=ut,a.isFinite=function(n){return sr(n)&&!gr(parseFloat(n))},a.isFunction=at,a.isNaN=function(n){return it(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=it,a.isObject=ot,a.isPlainObject=Dr,a.isRegExp=function(n){return!(!n||!q[typeof n])&&lr.call(n)==z
|
||||
},a.isString=lt,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?hr(0,e+r):yr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},a.mixin=Pt,a.noConflict=function(){return e._=Qt,this},a.parseInt=Tr,a.random=function(n,t){null==n&&null==t&&(t=1),n=+n||0,null==t?(t=n,n=0):t=+t||0;var r=dr();return n%1||t%1?n+yr(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+nr(r*(t-n+1))},a.reduce=dt,a.reduceRight=bt,a.result=function(n,t){var e=n?n[t]:r;
|
||||
return at(e)?n[t]():e},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ir(n).length},a.some=_t,a.sortedIndex=Et,a.template=function(n,t,e){var u=a.templateSettings;n||(n=""),e=Fr({},e,u);var o,i=Fr({},e.imports,u.imports),u=Ir(i),i=ft(i),l=0,c=e.interpolate||_,g="__p+='",c=Gt((e.escape||_).source+"|"+c.source+"|"+(c===y?v:_).source+"|"+(e.evaluate||_).source+"|$","g");n.replace(c,function(t,r,e,u,a,i){return e||(e=u),g+=n.slice(l,i).replace(j,M),r&&(g+="'+__e("+r+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),e&&(g+="'+((__t=("+e+"))==null?'':__t)+'"),l=i+t.length,t
|
||||
}),g+="';\n",c=e=e.variable,c||(e="obj",g="with("+e+"){"+g+"}"),g=(o?g.replace(f,""):g).replace(p,"$1").replace(s,"$1;"),g="function("+e+"){"+(c?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";try{var h=Dt(u,"return "+g).apply(r,i)}catch(m){throw m.source=g,m}return t?h(t):(h.source=g,h)},a.unescape=function(n){return null==n?"":Ht(n).replace(g,Z)},a.uniqueId=function(n){var t=++o;return Ht(null==n?"":n)+t
|
||||
},a.all=st,a.any=_t,a.detect=vt,a.foldl=dt,a.foldr=bt,a.include=pt,a.inject=dt,qr(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return ur.apply(t,arguments),n.apply(a,t)})}),a.first=jt,a.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return Y(n,hr(0,u-e))}},a.take=jt,a.head=jt,qr(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return null==t||r&&typeof t!="function"?e:new Q(e)})}),a.VERSION="1.2.1",a.prototype.toString=function(){return Ht(this.__wrapped__)},a.prototype.value=zt,a.prototype.valueOf=zt,Br(["join","pop","shift"],function(n){var t=Kt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Br(["push","reverse","sort","unshift"],function(n){var t=Kt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Br(["concat","slice","splice"],function(n){var t=Kt[n];a.prototype[n]=function(){return new Q(t.apply(this.__wrapped__,arguments))
|
||||
}}),kr.spliceObjects||Br(["pop","shift","splice"],function(n){var t=Kt[n],r="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new Q(e):e}}),a}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(n=a);var o=0,i={},l=+new Date+"",c=75,f=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,g=/&(?:amp|lt|gt|quot|#39);/g,v=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/\w*$/,y=/<%=([\s\S]+?)%>/g,m=(m=/\bthis\b/)&&m.test(t)&&m,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",b=RegExp("^["+d+"]*0+(?=.$)"),_=/($^)/,C=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),x="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),E="[object Arguments]",O="[object Array]",S="[object Boolean]",A="[object Date]",I="[object Error]",B="[object Function]",N="[object Number]",P="[object Object]",z="[object RegExp]",F="[object String]",$={};
|
||||
;!function(n){function t(e){function a(n){return n&&typeof n=="object"&&!Or(n)&&rr.call(n,"__wrapped__")?n:new W(n)}function T(n,t,r){r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function L(n){return n.charCodeAt(0)}function G(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function H(n,t,r,e){function u(){var e=arguments,l=o?this:t;return a||(n=t[i]),r.length&&(e=e.length?(e=dr.call(e),c?e.concat(r):r.concat(e)):r),this instanceof u?(l=M(n.prototype),e=n.apply(l,e),ct(e)?e:l):n.apply(l,e)
|
||||
}var a=it(n),o=!r,i=t;if(o){var c=e;r=t}else if(!a){if(!e)throw new Ht;t=n}return u}function J(n){function t(t){return-1<T(n,t)}function r(t){n.push(t)}function e(n){var t=typeof n;if("boolean"==t||null==n)return s[n];var r=s[t]||(t="object",p),e="number"==t?n:c+n;return"object"==t?r[e]?-1<T(r[e],n):!1:!!r[e]}function u(n){var t=typeof n;if("boolean"==t||null==n)s[n]=!0;else{var r=s[t]||(t="object",p),e="number"==t?n:c+n;"object"==t?a=(r[e]||(r[e]=[])).push(n)==i:r[e]=!0}}n||(n=[]);var a,o=-1,i=n.length,f=i>=l,p={},s={"false":!1,"function":!1,"null":!1,number:{},object:p,string:{},"true":!1,undefined:!1};
|
||||
if(f){for(;++o<i;)u(n[o]);a&&(f=s=p=null)}return f?{contains:e,push:u}:{contains:t,push:r}}function K(){for(var n,t={g:x,b:"",c:"",e:"r",f:"",h:"",i:!0,j:!!Ar},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];r=t.a,t.d=/^[^,]+/.exec(r)[0],n=qt,r="return function("+r+"){",e="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(e+="var s=r.length;m=-1;if("+t.b+"){",wr.unindexedChars&&(e+="if(q(r)){r=r.split('')}"),e+="while(++m<s){"+t.f+";}}else{"):wr.nonEnumArgs&&(e+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),wr.enumPrototypes&&(e+="var E=typeof r=='function';"),wr.enumErrorProps&&(e+="var D=r===j||r instanceof Error;");
|
||||
var u=[];if(wr.enumPrototypes&&u.push('!(E&&m=="prototype")'),wr.enumErrorProps&&u.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)e+="var A=-1,B=z[typeof r]?t(r):[],s=B.length;while(++A<s){m=B[A];",u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}";else if(e+="for(m in r){",t.i&&u.push("l.call(r, m)"),u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}",wr.nonEnumShadows){for(e+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)e+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(e+="||(!v[m]&&r[m]!==y[m])"),e+="){"+t.f+"}";
|
||||
e+="}"}return(t.b||wr.nonEnumArgs)&&(e+="}"),e+=t.c+";return C",n("i,j,l,n,o,q,t,u,y,z,w,G,H,J",r+e+"}")(I,Kt,rr,rt,Or,ft,Ar,a,Mt,q,jr,F,Ut,ir)}function M(n){return ct(n)?lr(n):{}}function U(n){return Br[n]}function V(n){return"\\"+D[n]}function Q(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function W(n){this.__wrapped__=n}function X(){}function Y(n){return function(t,e,u,o){return typeof e!="boolean"&&null!=e&&(o=u,u=o&&o[e]===t?r:e,e=!1),null!=u&&(u=a.createCallback(u,o)),n(t,e,u,o)
|
||||
}}function Z(n){var t=!1;if(!n||ir.call(n)!=P||!wr.argsClass&&rt(n))return t;var r=n.constructor;return(it(r)?r instanceof r:wr.nodeClass||!Q(n))?wr.ownLast?(Fr(n,function(n,r,e){return t=rr.call(e,r),!1}),!0===t):(Fr(n,function(n,r){t=r}),!1===t||rr.call(n,t)):t}function nt(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=zt(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function tt(n){return Nr[n]}function rt(n){return ir.call(n)==E}function et(n,t,e,u,o,i){var c=n;if(typeof t!="boolean"&&null!=t&&(u=e,e=t,t=!1),typeof e=="function"){if(e=typeof u=="undefined"?e:a.createCallback(e,u,1),c=e(c),typeof c!="undefined")return c;
|
||||
c=n}if(u=ct(c)){var l=ir.call(c);if(!$[l]||!wr.nodeClass&&Q(c))return c;var f=Or(c)}if(!u||!t)return u?f?nt(c):Pr({},c):c;switch(u=Cr[l],l){case S:case A:return new u(+c);case N:case F:return new u(c);case z:return u(c.source,h.exec(c))}for(o||(o=[]),i||(i=[]),l=o.length;l--;)if(o[l]==n)return i[l];return c=f?u(c.length):{},f&&(rr.call(n,"index")&&(c.index=n.index),rr.call(n,"input")&&(c.input=n.input)),o.push(n),i.push(c),(f?Ir:$r)(n,function(n,u){c[u]=et(n,t,e,r,o,i)}),c}function ut(n){var t=[];
|
||||
return Fr(n,function(n,r){it(n)&&t.push(r)}),t.sort()}function at(n){for(var t=-1,r=Ar(n),e=r.length,u={};++t<e;){var a=r[t];u[n[a]]=a}return u}function ot(n,t,r,e,u,o){var c=r===i;if(typeof r=="function"&&!c){r=a.createCallback(r,e,2);var l=r(n,t);if(typeof l!="undefined")return!!l}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,p=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=ir.call(n),f=ir.call(t),p==E&&(p=P),f==E&&(f=P),p!=f)return!1;
|
||||
switch(p){case S:case A:return+n==+t;case N:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case F:return n==Gt(t)}if(f=p==O,!f){if(rr.call(n,"__wrapped__")||rr.call(t,"__wrapped__"))return ot(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(p!=P||!wr.nodeClass&&(Q(n)||Q(t)))return!1;var p=!wr.argsObject&&rt(n)?Tt:n.constructor,s=!wr.argsObject&&rt(t)?Tt:t.constructor;if(p!=s&&(!it(p)||!(p instanceof p&&it(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;
|
||||
var g=0,l=!0;if(u.push(n),o.push(t),f){if(p=n.length,g=t.length,l=g==n.length,!l&&!c)return l;for(;g--;)if(f=p,s=t[g],c)for(;f--&&!(l=ot(n[f],s,r,e,u,o)););else if(!(l=ot(n[g],s,r,e,u,o)))break;return l}return Fr(t,function(t,a,i){return rr.call(i,a)?(g++,l=rr.call(n,a)&&ot(n[a],t,r,e,u,o)):void 0}),l&&!c&&Fr(n,function(n,t,r){return rr.call(r,t)?l=-1<--g:void 0}),l}function it(n){return typeof n=="function"}function ct(n){return!(!n||!q[typeof n])}function lt(n){return typeof n=="number"||ir.call(n)==N
|
||||
}function ft(n){return typeof n=="string"||ir.call(n)==F}function pt(n,t,r){var e=arguments,u=0,o=2;if(!ct(n))return n;if(r===i)var c=e[3],l=e[4],f=e[5];else l=[],f=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?c=a.createCallback(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(c=e[--o]);for(;++u<o;)(Or(e[u])?mt:$r)(e[u],function(t,r){var e,u,a=t,o=n[r];if(t&&((u=Or(t))||qr(t))){for(a=l.length;a--;)if(e=l[a]==t){o=f[a];break}if(!e){var p;c&&(a=c(o,t),p=typeof a!="undefined")&&(o=a),p||(o=u?Or(o)?o:[]:qr(o)?o:{}),l.push(t),f.push(o),p||(o=pt(o,t,i,c,l,f))
|
||||
}}else c&&(a=c(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);n[r]=o});return n}function st(n){for(var t=-1,r=Ar(n),e=r.length,u=zt(e);++t<e;)u[t]=n[r[t]];return u}function gt(n,t,r){var e=-1,u=n?n.length:0,a=!1;return r=(0>r?vr(0,u+r):r)||0,u&&typeof u=="number"?a=-1<(ft(n)?n.indexOf(t,r):T(n,t,r)):Ir(n,function(n){return++e<r?void 0:!(a=n===t)}),a}function vt(n,t,r){var e=!0;if(t=a.createCallback(t,r),Or(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else Ir(n,function(n,r,u){return e=!!t(n,r,u)
|
||||
});return e}function ht(n,t,r){var e=[];if(t=a.createCallback(t,r),Or(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else Ir(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function yt(n,t,r){if(t=a.createCallback(t,r),!Or(n)){var e;return Ir(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}r=-1;for(var u=n.length;++r<u;){var o=n[r];if(t(o,r,n))return o}}function mt(n,t,r){if(t&&typeof r=="undefined"&&Or(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else Ir(n,t,r);
|
||||
return n}function dt(n,t,r){var e=-1,u=n?n.length:0,o=zt(typeof u=="number"?u:0);if(t=a.createCallback(t,r),Or(n))for(;++e<u;)o[e]=t(n[e],e,n);else Ir(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function bt(n,t,r){var e=-1/0,u=e;if(!t&&Or(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&ft(n)?L:a.createCallback(t,r),Ir(n,function(n,r,a){r=t(n,r,a),r>e&&(e=r,u=n)});return u}function _t(n,t,r,e){var u=3>arguments.length;if(t=a.createCallback(t,e,4),Or(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)
|
||||
}else Ir(n,function(n,e,a){r=u?(u=!1,n):t(r,n,e,a)});return r}function Ct(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var c=Ar(n),o=c.length;else wr.unindexedChars&&ft(n)&&(u=n.split(""));return t=a.createCallback(t,e,4),mt(n,function(n,e,a){e=c?c[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function jt(n,t,r){var e;if(t=a.createCallback(t,r),Or(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else Ir(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function wt(n){for(var t=-1,r=n?n.length:0,e=Yt.apply(Jt,dr.call(arguments,1)),e=J(e).contains,u=[];++t<r;){var a=n[t];
|
||||
e(a)||u.push(a)}return u}function kt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return nt(n,0,hr(vr(0,e),u))}}function xt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:vr(0,t);return nt(n,e)}function Et(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?a.createCallback(r,e,1):Bt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;
|
||||
return u}function Ot(n){for(var t=-1,r=n?bt(Dr(n,"length")):0,e=zt(0>r?0:r);++t<r;)e[t]=Dr(n,t);return e}function St(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var a=n[r];t?u[a]=t[r]:u[a[0]]=a[1]}return u}function At(n,t){return wr.fastBind||cr&&2<arguments.length?cr.call.apply(cr,arguments):H(n,t,dr.call(arguments,2))}function It(n){var t=dr.call(arguments,1);return or(function(){n.apply(r,t)},1)}function Bt(n){return n}function Nt(n){mt(ut(n),function(t){var r=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];
|
||||
return er.apply(t,arguments),t=r.apply(a,t),n&&typeof n=="object"&&n==t?this:new W(t)}})}function Pt(){return this.__wrapped__}e=e?R.defaults(n.Object(),e,R.pick(n,w)):n;var zt=e.Array,Ft=e.Boolean,$t=e.Date,qt=e.Function,Dt=e.Math,Rt=e.Number,Tt=e.Object,Lt=e.RegExp,Gt=e.String,Ht=e.TypeError,Jt=zt.prototype,Kt=e.Error.prototype,Mt=Tt.prototype,Ut=Gt.prototype,Vt=e._,Qt=Lt("^"+Gt(Mt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Wt=Dt.ceil,Xt=e.clearTimeout,Yt=Jt.concat,Zt=Dt.floor,nr=qt.prototype.toString,tr=Qt.test(tr=Tt.getPrototypeOf)&&tr,rr=Mt.hasOwnProperty,er=Jt.push,ur=Mt.propertyIsEnumerable,ar=e.setImmediate,or=e.setTimeout,ir=Mt.toString,cr=Qt.test(cr=ir.bind)&&cr,lr=Qt.test(lr=Tt.create)&&lr,fr=Qt.test(fr=zt.isArray)&&fr,pr=e.isFinite,sr=e.isNaN,gr=Qt.test(gr=Tt.keys)&&gr,vr=Dt.max,hr=Dt.min,yr=e.parseInt,mr=Dt.random,dr=Jt.slice,br=Qt.test(e.attachEvent),_r=cr&&!/\n|true/.test(cr+br),Cr={};
|
||||
Cr[O]=zt,Cr[S]=Ft,Cr[A]=$t,Cr[B]=qt,Cr[P]=Tt,Cr[N]=Rt,Cr[z]=Lt,Cr[F]=Gt;var jr={};jr[O]=jr[A]=jr[N]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},jr[S]=jr[F]={constructor:!0,toString:!0,valueOf:!0},jr[I]=jr[B]=jr[z]={constructor:!0,toString:!0},jr[P]={constructor:!0},function(){for(var n=x.length;n--;){var t,r=x[n];for(t in jr)rr.call(jr,t)&&!rr.call(jr[t],r)&&(jr[t][r]=!1)}}();var wr=a.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};
|
||||
for(var e in new n)r.push(e);for(e in arguments);wr.argsObject=arguments.constructor==Tt&&!(arguments instanceof zt),wr.argsClass=rt(arguments),wr.enumErrorProps=ur.call(Kt,"message")||ur.call(Kt,"name"),wr.enumPrototypes=ur.call(n,"prototype"),wr.fastBind=cr&&!_r,wr.ownLast="x"!=r[0],wr.nonEnumArgs=0!=e,wr.nonEnumShadows=!/valueOf/.test(r),wr.spliceObjects=(Jt.splice.call(t,0,1),!t[0]),wr.unindexedChars="xx"!="x"[0]+Tt("x")[0];try{wr.nodeClass=!(ir.call(document)==P&&!({toString:0}+""))}catch(u){wr.nodeClass=!0
|
||||
}}(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var kr={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},xr={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},Er={h:"if(!z[typeof r])return C;"+xr.h,b:!1};lr||(M=function(n){if(ct(n)){X.prototype=n;
|
||||
var t=new X;X.prototype=null}return t||{}}),W.prototype=a.prototype,wr.argsClass||(rt=function(n){return n?rr.call(n,"callee"):!1});var Or=fr||function(n){return n?typeof n=="object"&&ir.call(n)==O:!1},Sr=K({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),Ar=gr?function(n){return ct(n)?wr.enumPrototypes&&typeof n=="function"||wr.nonEnumArgs&&n.length&&rt(n)?Sr(n):gr(n):[]}:Sr,Ir=K(xr),Br={"&":"&","<":"<",">":">",'"':""","'":"'"},Nr=at(Br),Pr=K(kr,{h:kr.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),zr=K(kr),Fr=K(xr,Er,{i:!1}),$r=K(xr,Er);
|
||||
it(/x/)&&(it=function(n){return typeof n=="function"&&ir.call(n)==B});var qr=tr?function(n){if(!n||ir.call(n)!=P||!wr.argsClass&&rt(n))return!1;var t=n.valueOf,r=typeof t=="function"&&(r=tr(t))&&tr(r);return r?n==r||tr(n)==r:Z(n)}:Z,Dr=dt,Rr=Y(function Gr(n,t,r){for(var e=-1,u=n?n.length:0,a=[];++e<u;){var o=n[e];r&&(o=r(o,e,n)),Or(o)?er.apply(a,t?o:Gr(o)):a.push(o)}return a}),Tr=Y(function(n,t,r){for(var e=-1,u=n?n.length:0,a=!t&&u>=l,o=[],i=a?J():r?[]:o;++e<u;){var c=n[e],f=r?r(c,e,n):c;(t?e&&i[i.length-1]===f:a?i.contains(f):0<=T(i,f))||((r||a)&&i.push(f),o.push(c))
|
||||
}return o});_r&&u&&typeof ar=="function"&&(It=At(ar,e));var Lr=8==yr(d+"08")?yr:function(n,t){return yr(ft(n)?n.replace(b,""):n,t||0)};return a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Pr,a.at=function(n){var t=-1,r=Yt.apply(Jt,dr.call(arguments,1)),e=r.length,u=zt(e);for(wr.unindexedChars&&ft(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},a.bind=At,a.bindAll=function(n){for(var t=1<arguments.length?Yt.apply(Jt,dr.call(arguments,1)):ut(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=At(n[u],n)}return n},a.bindKey=function(n,t){return H(n,t,dr.call(arguments,2),i)},a.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},a.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},a.countBy=function(n,t,r){var e={};return t=a.createCallback(t,r),mt(n,function(n,r,u){r=Gt(t(n,r,u)),rr.call(e,r)?e[r]++:e[r]=1}),e},a.createCallback=function(n,t,r){if(null==n)return Bt;
|
||||
var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Ar(n);return function(t){for(var r=u.length,e=!1;r--&&(e=ot(t[u[r]],n[u[r]],i)););return e}}return typeof t=="undefined"||m&&!m.test(nr.call(n))?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,a){return n.call(t,r,e,u,a)}:function(r,e,u){return n.call(t,r,e,u)}},a.debounce=function(n,t,r){function e(){var t=l&&(!f||1<i);i=c=0,t&&(a=n.apply(o,u))}var u,a,o,i=0,c=null,l=!0;
|
||||
if(!0===r)var f=!0,l=!1;else ct(r)&&(f=r.leading,l="trailing"in r?r.trailing:l);return function(){return u=arguments,o=this,Xt(c),f&&2>++i&&(a=n.apply(o,u)),c=or(e,t),a}},a.defaults=zr,a.defer=It,a.delay=function(n,t){var e=dr.call(arguments,2);return or(function(){n.apply(r,e)},t)},a.difference=wt,a.filter=ht,a.flatten=Rr,a.forEach=mt,a.forIn=Fr,a.forOwn=$r,a.functions=ut,a.groupBy=function(n,t,r){var e={};return t=a.createCallback(t,r),mt(n,function(n,r,u){r=Gt(t(n,r,u)),(rr.call(e,r)?e[r]:e[r]=[]).push(n)
|
||||
}),e},a.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return nt(n,0,hr(vr(0,u-e),u))},a.intersection=function(n){var t=arguments,r=t.length,e=J(),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var c=n[a];if(!e.contains(c)){var l=r;for(e.push(c);--l;)if(!(u[l]||(u[l]=J(t[l]).contains))(c))continue n;i.push(c)}}return i},a.invert=at,a.invoke=function(n,t){var r=dr.call(arguments,2),e=-1,u=typeof t=="function",a=n?n.length:0,o=zt(typeof a=="number"?a:0);
|
||||
return mt(n,function(n){o[++e]=(u?t:n[t]).apply(n,r)}),o},a.keys=Ar,a.map=dt,a.max=bt,a.memoize=function(n,t){function r(){var e=r.cache,u=c+(t?t.apply(this,arguments):arguments[0]);return rr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}return r.cache={},r},a.merge=pt,a.min=function(n,t,r){var e=1/0,u=e;if(!t&&Or(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&ft(n)?L:a.createCallback(t,r),Ir(n,function(n,r,a){r=t(n,r,a),r<e&&(e=r,u=n)});return u},a.omit=function(n,t,r){var e=typeof t=="function",u={};
|
||||
if(e)t=a.createCallback(t,r);else var o=Yt.apply(Jt,dr.call(arguments,1));return Fr(n,function(n,r,a){(e?!t(n,r,a):0>T(o,r))&&(u[r]=n)}),u},a.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},a.pairs=function(n){for(var t=-1,r=Ar(n),e=r.length,u=zt(e);++t<e;){var a=r[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return H(n,dr.call(arguments,1))},a.partialRight=function(n){return H(n,dr.call(arguments,1),null,i)},a.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,o=Yt.apply(Jt,dr.call(arguments,1)),i=ct(n)?o.length:0;++u<i;){var c=o[u];
|
||||
c in n&&(e[c]=n[c])}else t=a.createCallback(t,r),Fr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},a.pluck=Dr,a.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=vr(0,Wt((t-n)/r));for(var u=zt(t);++e<t;)u[e]=n,n+=r;return u},a.reject=function(n,t,r){return t=a.createCallback(t,r),ht(n,function(n,r,e){return!t(n,r,e)})},a.rest=xt,a.shuffle=function(n){var t=-1,r=n?n.length:0,e=zt(typeof r=="number"?r:0);return mt(n,function(n){var r=Zt(mr()*(++t+1));e[t]=e[r],e[r]=n}),e},a.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=zt(typeof u=="number"?u:0);
|
||||
for(t=a.createCallback(t,r),mt(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(G);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t,r){function e(){l=null,f&&(i=new $t,a=n.apply(o,u))}var u,a,o,i=0,c=!0,l=null,f=!0;return!1===r?c=!1:ct(r)&&(c="leading"in r?r.leading:c,f="trailing"in r?r.trailing:f),function(){var r=new $t;!l&&!c&&(i=r);var f=t-(r-i);return u=arguments,o=this,0<f?l||(l=or(e,f)):(Xt(l),l=null,i=r,a=n.apply(o,u)),a}},a.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=zt(n);for(t=a.createCallback(t,r,1);++e<n;)u[e]=t(e);return u},a.toArray=function(n){return n&&typeof n.length=="number"?wr.unindexedChars&&ft(n)?n.split(""):nt(n):st(n)},a.transform=function(n,t,r,e){var u=Or(n);return t=a.createCallback(t,e,4),null==r&&(u?r=[]:(e=n&&n.constructor,r=M(e&&e.prototype))),(u?Ir:$r)(n,function(n,e,u){return t(r,n,e,u)}),r},a.union=function(n){return Or(n)||(arguments[0]=n?dr.call(n):Jt),Tr(Yt.apply(Jt,arguments))},a.uniq=Tr,a.unzip=Ot,a.values=st,a.where=ht,a.without=function(n){return wt(n,dr.call(arguments,1))
|
||||
},a.wrap=function(n,t){return function(){var r=[n];return er.apply(r,arguments),t.apply(this,r)}},a.zip=function(n){return n?Ot(arguments):[]},a.zipObject=St,a.collect=dt,a.drop=xt,a.each=mt,a.extend=Pr,a.methods=ut,a.object=St,a.select=ht,a.tail=xt,a.unique=Tr,Nt(a),a.chain=a,a.prototype.chain=function(){return this},a.clone=et,a.cloneDeep=function(n,t,r){return et(n,!0,t,r)},a.contains=gt,a.escape=function(n){return null==n?"":Gt(n).replace(C,U)},a.every=vt,a.find=yt,a.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;
|
||||
for(t=a.createCallback(t,r);++e<u;)if(t(n[e],e,n))return e;return-1},a.findKey=function(n,t,r){var e;return t=a.createCallback(t,r),$r(n,function(n,r,u){return t(n,r,u)?(e=r,!1):void 0}),e},a.has=function(n,t){return n?rr.call(n,t):!1},a.identity=Bt,a.indexOf=function(n,t,r){if(typeof r=="number"){var e=n?n.length:0;r=0>r?vr(0,e+r):r||0}else if(r)return r=Et(n,t),n[r]===t?r:-1;return n?T(n,t,r):-1},a.isArguments=rt,a.isArray=Or,a.isBoolean=function(n){return!0===n||!1===n||ir.call(n)==S},a.isDate=function(n){return n?typeof n=="object"&&ir.call(n)==A:!1
|
||||
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var r=ir.call(n),e=n.length;return r==O||r==F||(wr.argsClass?r==E:rt(n))||r==P&&typeof e=="number"&&it(n.splice)?!e:($r(n,function(){return t=!1}),t)},a.isEqual=ot,a.isFinite=function(n){return pr(n)&&!sr(parseFloat(n))},a.isFunction=it,a.isNaN=function(n){return lt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=lt,a.isObject=ct,a.isPlainObject=qr,a.isRegExp=function(n){return!(!n||!q[typeof n])&&ir.call(n)==z
|
||||
},a.isString=ft,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?vr(0,e+r):hr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},a.mixin=Nt,a.noConflict=function(){return e._=Vt,this},a.parseInt=Lr,a.random=function(n,t){null==n&&null==t&&(t=1),n=+n||0,null==t?(t=n,n=0):t=+t||0;var r=mr();return n%1||t%1?n+hr(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+Zt(r*(t-n+1))},a.reduce=_t,a.reduceRight=Ct,a.result=function(n,t){var e=n?n[t]:r;
|
||||
return it(e)?n[t]():e},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ar(n).length},a.some=jt,a.sortedIndex=Et,a.template=function(n,t,e){var u=a.templateSettings;n||(n=""),e=zr({},e,u);var o,i=zr({},e.imports,u.imports),u=Ar(i),i=st(i),c=0,l=e.interpolate||_,g="__p+='",l=Lt((e.escape||_).source+"|"+l.source+"|"+(l===y?v:_).source+"|"+(e.evaluate||_).source+"|$","g");n.replace(l,function(t,r,e,u,a,i){return e||(e=u),g+=n.slice(c,i).replace(j,V),r&&(g+="'+__e("+r+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),e&&(g+="'+((__t=("+e+"))==null?'':__t)+'"),c=i+t.length,t
|
||||
}),g+="';\n",l=e=e.variable,l||(e="obj",g="with("+e+"){"+g+"}"),g=(o?g.replace(f,""):g).replace(p,"$1").replace(s,"$1;"),g="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";try{var h=qt(u,"return "+g).apply(r,i)}catch(m){throw m.source=g,m}return t?h(t):(h.source=g,h)},a.unescape=function(n){return null==n?"":Gt(n).replace(g,tt)},a.uniqueId=function(n){var t=++o;return Gt(null==n?"":n)+t
|
||||
},a.all=vt,a.any=jt,a.detect=yt,a.foldl=_t,a.foldr=Ct,a.include=gt,a.inject=_t,$r(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return er.apply(t,arguments),n.apply(a,t)})}),a.first=kt,a.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return nt(n,vr(0,u-e))}},a.take=kt,a.head=kt,$r(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return null==t||r&&typeof t!="function"?e:new W(e)})}),a.VERSION="1.2.1",a.prototype.toString=function(){return Gt(this.__wrapped__)},a.prototype.value=Pt,a.prototype.valueOf=Pt,Ir(["join","pop","shift"],function(n){var t=Jt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Ir(["push","reverse","sort","unshift"],function(n){var t=Jt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ir(["concat","slice","splice"],function(n){var t=Jt[n];a.prototype[n]=function(){return new W(t.apply(this.__wrapped__,arguments))
|
||||
}}),wr.spliceObjects||Ir(["pop","shift","splice"],function(n){var t=Jt[n],r="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new W(e):e}}),a}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(n=a);var o=0,i={},c=+new Date+"",l=75,f=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,g=/&(?:amp|lt|gt|quot|#39);/g,v=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/\w*$/,y=/<%=([\s\S]+?)%>/g,m=(m=/\bthis\b/)&&m.test(t)&&m,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",b=RegExp("^["+d+"]*0+(?=.$)"),_=/($^)/,C=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),x="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),E="[object Arguments]",O="[object Array]",S="[object Boolean]",A="[object Date]",I="[object Error]",B="[object Function]",N="[object Number]",P="[object Object]",z="[object RegExp]",F="[object String]",$={};
|
||||
$[B]=!1,$[E]=$[O]=$[S]=$[A]=$[N]=$[P]=$[z]=$[F]=!0;var q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},D={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},R=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=R, define(function(){return R})):e&&!e.nodeType?u?(u.exports=R)._=R:e._=R:n._=R}(this);
|
||||
271
dist/lodash.js
vendored
271
dist/lodash.js
vendored
@@ -372,80 +372,25 @@
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a function optimized to search large arrays for a given `value`,
|
||||
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
|
||||
* A basic version of `_.indexOf` without support for binary searches
|
||||
* or `fromIndex` constraints.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Boolean} Returns `true`, if `value` is found, else `false`.
|
||||
* @param {Number} [fromIndex=0] The index to search from.
|
||||
* @returns {Number} Returns the index of the matched value or `-1`.
|
||||
*/
|
||||
function createCache(array) {
|
||||
var bailout,
|
||||
index = -1,
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
objCache = {};
|
||||
function basicIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex || 0) - 1,
|
||||
length = array.length;
|
||||
|
||||
var caches = {
|
||||
'false': false,
|
||||
'function': false,
|
||||
'null': false,
|
||||
'number': {},
|
||||
'object': objCache,
|
||||
'string': {},
|
||||
'true': false,
|
||||
'undefined': false
|
||||
};
|
||||
|
||||
function cacheContains(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
return caches[value];
|
||||
}
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] ? indexOf(cache[key], value) > -1 : false)
|
||||
: !!cache[key];
|
||||
}
|
||||
|
||||
function cachePush(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
caches[value] = true;
|
||||
} else {
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
if (type == 'object') {
|
||||
bailout = (cache[key] || (cache[key] = [])).push(value) == length;
|
||||
} else {
|
||||
cache[key] = true;
|
||||
}
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
||||
function simpleContains(value) {
|
||||
return indexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function simplePush(value) {
|
||||
array.push(value);
|
||||
}
|
||||
|
||||
if (isLarge) {
|
||||
while (++index < length) {
|
||||
cachePush(array[index]);
|
||||
}
|
||||
if (bailout) {
|
||||
isLarge = caches = objCache = null;
|
||||
}
|
||||
}
|
||||
return isLarge
|
||||
? { 'contains': cacheContains, 'push': cachePush }
|
||||
: { 'push': simplePush, 'contains' : simpleContains };
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -547,6 +492,85 @@
|
||||
return bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function optimized to search large arrays for a given `value`,
|
||||
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array=[]] The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Boolean} Returns `true`, if `value` is found, else `false`.
|
||||
*/
|
||||
function createCache(array) {
|
||||
array || (array = []);
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
'false': false,
|
||||
'function': false,
|
||||
'null': false,
|
||||
'number': {},
|
||||
'object': objCache,
|
||||
'string': {},
|
||||
'true': false,
|
||||
'undefined': false
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
array.push(value);
|
||||
}
|
||||
|
||||
function cacheContains(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
return caches[value];
|
||||
}
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] ? basicIndexOf(cache[key], value) > -1 : false)
|
||||
: !!cache[key];
|
||||
}
|
||||
|
||||
function cachePush(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
caches[value] = true;
|
||||
} else {
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
if (type == 'object') {
|
||||
bailout = (cache[key] || (cache[key] = [])).push(value) == length;
|
||||
} else {
|
||||
cache[key] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isLarge) {
|
||||
while (++index < length) {
|
||||
cachePush(array[index]);
|
||||
}
|
||||
if (bailout) {
|
||||
isLarge = caches = objCache = null;
|
||||
}
|
||||
}
|
||||
return isLarge
|
||||
? { 'contains': cacheContains, 'push': cachePush }
|
||||
: { 'contains': basicContains, 'push': basicPush };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new object with the specified `prototype`.
|
||||
*
|
||||
@@ -558,6 +582,17 @@
|
||||
return isObject(prototype) ? nativeCreate(prototype) : {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeHtmlChar(match) {
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `template` to escape characters for inclusion in compiled
|
||||
* string literals.
|
||||
@@ -570,17 +605,6 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeHtmlChar(match) {
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast path for creating `lodash` wrapper objects.
|
||||
*
|
||||
@@ -603,6 +627,29 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that juggles arguments, allowing argument overloading
|
||||
* for `_.flatten` and `_.uniq`, before passing them to the given `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overloadWrapper(func) {
|
||||
return function(array, flag, callback, thisArg) {
|
||||
// juggle arguments
|
||||
if (typeof flag != 'boolean' && flag != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[flag] === array) ? flag : undefined;
|
||||
flag = false;
|
||||
}
|
||||
if (callback != null) {
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
}
|
||||
return func(array, flag, callback, thisArg);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` which checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
@@ -1915,7 +1962,7 @@
|
||||
forIn(object, function(value, key, object) {
|
||||
if (isFunc
|
||||
? !callback(value, key, object)
|
||||
: indexOf(props, key) < 0
|
||||
: basicIndexOf(props, key) < 0
|
||||
) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -2142,10 +2189,10 @@
|
||||
result = false;
|
||||
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0;
|
||||
if (typeof length == 'number') {
|
||||
if (length && typeof length == 'number') {
|
||||
result = (isString(collection)
|
||||
? collection.indexOf(target, fromIndex)
|
||||
: indexOf(collection, target, fromIndex)
|
||||
: basicIndexOf(collection, target, fromIndex)
|
||||
) > -1;
|
||||
} else {
|
||||
forOwn(collection, function(value) {
|
||||
@@ -3313,20 +3360,11 @@
|
||||
* _.flatten(stooges, 'quotes');
|
||||
* // => ['Oh, a wise guy, eh?', 'Poifect!', 'Spread out!', 'You knucklehead!']
|
||||
*/
|
||||
function flatten(array, isShallow, callback, thisArg) {
|
||||
var flatten = overloadWrapper(function flatten(array, isShallow, callback) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
// juggle arguments
|
||||
if (typeof isShallow != 'boolean' && isShallow != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[isShallow] === array) ? isShallow : undefined;
|
||||
isShallow = false;
|
||||
}
|
||||
if (callback != null) {
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (callback) {
|
||||
@@ -3340,7 +3378,7 @@
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Gets the index at which the first occurrence of `value` is found using
|
||||
@@ -3367,21 +3405,14 @@
|
||||
* // => 2
|
||||
*/
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
if (typeof fromIndex == 'number') {
|
||||
index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1;
|
||||
var length = array ? array.length : 0;
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
index = sortedIndex(array, value);
|
||||
var index = sortedIndex(array, value);
|
||||
return array[index] === value ? index : -1;
|
||||
}
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return array ? basicIndexOf(array, value, fromIndex) : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3477,7 +3508,7 @@
|
||||
function intersection(array) {
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
cache = createCache([]),
|
||||
cache = createCache(),
|
||||
caches = {},
|
||||
index = -1,
|
||||
length = array ? array.length : 0,
|
||||
@@ -3826,7 +3857,7 @@
|
||||
* Creates a duplicate-value-free version of the `array` using strict equality
|
||||
* for comparisons, i.e. `===`. If the `array` is already sorted, passing `true`
|
||||
* for `isSorted` will run a faster algorithm. If `callback` is passed, each
|
||||
* element of `array` is passed through a `callback` before uniqueness is computed.
|
||||
* element of `array` is passed through the `callback` before uniqueness is computed.
|
||||
* The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is passed for `callback`, the created "_.pluck" style
|
||||
@@ -3855,44 +3886,30 @@
|
||||
* _.uniq([1, 1, 2, 2, 3], true);
|
||||
* // => [1, 2, 3]
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
|
||||
* // => ['A', 'b', 'C']
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2.5, 3]
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
* // => [{ 'x': 1 }, { 'x': 2 }]
|
||||
*/
|
||||
function uniq(array, isSorted, callback, thisArg) {
|
||||
var uniq = overloadWrapper(function(array, isSorted, callback) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0,
|
||||
isLarge = !isSorted && length >= largeArraySize,
|
||||
result = [],
|
||||
seen = result;
|
||||
seen = isLarge ? createCache() : (callback ? [] : result);
|
||||
|
||||
// juggle arguments
|
||||
if (typeof isSorted != 'boolean' && isSorted != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[isSorted] === array) ? isSorted : undefined;
|
||||
isSorted = false;
|
||||
}
|
||||
// init value cache for large arrays
|
||||
var isLarge = !isSorted && length >= largeArraySize;
|
||||
if (callback != null) {
|
||||
seen = [];
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
}
|
||||
if (isLarge) {
|
||||
seen = createCache([]);
|
||||
}
|
||||
while (++index < length) {
|
||||
var value = array[index],
|
||||
computed = callback ? callback(value, index, array) : value;
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: (isLarge ? !seen.contains(computed) : indexOf(seen, computed) < 0)
|
||||
: (isLarge ? !seen.contains(computed) : basicIndexOf(seen, computed) < 0)
|
||||
) {
|
||||
if (callback || isLarge) {
|
||||
seen.push(computed);
|
||||
@@ -3901,7 +3918,7 @@
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The inverse of `_.zip`, this method splits groups of elements into arrays
|
||||
|
||||
76
dist/lodash.min.js
vendored
76
dist/lodash.min.js
vendored
@@ -4,42 +4,42 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;!function(n){function t(o){function f(n){if(!n||ie.call(n)!=B)return a;var t=n.valueOf,e=typeof t=="function"&&(e=ee(t))&&ee(e);return e?n==e||ee(n)==e:Z(n)}function P(n,t,e){if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(var r=-1,u=q[typeof n]?je(n):[],o=u.length;++r<o&&(e=u[r],!(t(n[e],e,n)===a)););return n}function K(n,t,e){var r;if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(r in n)if(t(n[r],r,n)===a)break;return n}function M(n,t,e){var r,u=n,a=u;
|
||||
if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&q[typeof u])for(var c=-1,l=q[typeof u]?je(u):[],p=l.length;++c<p;)r=l[c],"undefined"==typeof a[r]&&(a[r]=u[r]);return a}function U(n,t,e){var r,u=n,a=u;if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var c=G.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(c=o[--f]);for(;++i<f;)if((u=o[i])&&q[typeof u])for(var l=-1,p=q[typeof u]?je(u):[],s=p.length;++l<s;)r=p[l],a[r]=c?c(a[r],u[r]):u[r];
|
||||
return a}function V(n){var t,e=[];if(!n||!q[typeof n])return e;for(t in n)re.call(n,t)&&e.push(t);return e}function G(n){return n&&typeof n=="object"&&!ke(n)&&re.call(n,"__wrapped__")?n:new Y(n)}function H(n){function t(n){var t=typeof n;if("boolean"==t||n==u)return y[n];var e=y[t]||(t="object",g),r="number"==t?n:p+n;return"object"==t?e[r]?-1<Ot(e[r],n):a:!!e[r]}function e(n){var t=typeof n;if("boolean"==t||n==u)y[n]=r;else{var e=y[t]||(t="object",g),a="number"==t?n:p+n;"object"==t?f=(e[a]||(e[a]=[])).push(n)==l:e[a]=r
|
||||
}}function o(t){return-1<Ot(n,t)}function i(t){n.push(t)}var f,c=-1,l=n.length,v=l>=s,g={},y={"false":a,"function":a,"null":a,number:{},object:g,string:{},"true":a,undefined:a};if(v){for(;++c<l;)e(n[c]);f&&(v=y=g=u)}return v?{contains:t,push:e}:{push:i,contains:o}}function J(n){return n.charCodeAt(0)}function L(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function Q(n,t,e,r){function u(){var r=arguments,c=o?this:t;
|
||||
return a||(n=t[i]),e.length&&(r=r.length?(r=me.call(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(c=it(n.prototype)?ce(n.prototype):{},r=n.apply(c,r),it(r)?r:c):n.apply(c,r)}var a=ot(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Ht;t=n}return u}function W(n){return"\\"+D[n]}function X(n){return we[n]}function Y(n){this.__wrapped__=n}function Z(n){var t=a;if(!n||ie.call(n)!=B)return t;var e=n.constructor;return(ot(e)?e instanceof e:1)?(K(n,function(n,e){t=e}),t===a||re.call(n,t)):t
|
||||
}function nt(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=qt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function tt(n){return Ce[n]}function et(n,t,r,o,i,f){var c=n;if(typeof t!="boolean"&&t!=u&&(o=r,r=t,t=a),typeof r=="function"){if(r=typeof o=="undefined"?r:G.createCallback(r,o,1),c=r(c),typeof c!="undefined")return c;c=n}if(o=it(c)){var l=ie.call(c);if(!T[l])return c;var p=ke(c)}if(!o||!t)return o?p?nt(c):U({},c):c;switch(o=de[l],l){case I:case N:return new o(+c);
|
||||
case $:case R:return new o(c);case F:return o(c.source,m.exec(c))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c=p?o(c.length):{},p&&(re.call(n,"index")&&(c.index=n.index),re.call(n,"input")&&(c.input=n.input)),i.push(n),f.push(c),(p?ht:P)(n,function(n,u){c[u]=et(n,t,r,e,i,f)}),c}function rt(n){var t=[];return K(n,function(n,e){ot(n)&&t.push(e)}),t.sort()}function ut(n){for(var t=-1,e=je(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function at(n,t,e,o,i,f){var c=e===l;
|
||||
if(typeof e=="function"&&!c){e=G.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=ie.call(n),s=ie.call(t),v==E&&(v=B),s==E&&(s=B),v!=s)return a;switch(v){case I:case N:return+n==+t;case $:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case F:case R:return n==Gt(t)}if(s=v==S,!s){if(re.call(n,"__wrapped__")||re.call(t,"__wrapped__"))return at(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);
|
||||
if(v!=B)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!ot(v)||!(v instanceof v&&ot(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var y=0,p=r;if(i.push(n),f.push(t),s){if(v=n.length,y=t.length,p=y==n.length,!p&&!c)return p;for(;y--;)if(s=v,g=t[y],c)for(;s--&&!(p=at(n[s],g,e,o,i,f)););else if(!(p=at(n[y],g,e,o,i,f)))break;return p}return K(t,function(t,r,u){return re.call(u,r)?(y++,p=re.call(n,r)&&at(n[r],t,e,o,i,f)):void 0}),p&&!c&&K(n,function(n,t,e){return re.call(e,t)?p=-1<--y:void 0
|
||||
}),p}function ot(n){return typeof n=="function"}function it(n){return!(!n||!q[typeof n])}function ft(n){return typeof n=="number"||ie.call(n)==$}function ct(n){return typeof n=="string"||ie.call(n)==R}function lt(n,t,e){var r=arguments,u=0,a=2;if(!it(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=G.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);for(;++u<a;)(ke(r[u])?ht:P)(r[u],function(t,e){var r,u,a=t,p=n[e];
|
||||
if(t&&((u=ke(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s;o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),s||(p=u?ke(p)?p:[]:f(p)?p:{}),i.push(t),c.push(p),s||(p=lt(p,t,l,o,i,c))}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function pt(n){for(var t=-1,e=je(n),r=e.length,u=qt(r);++t<r;)u[t]=n[e[t]];return u}function st(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?ge(0,u+e):e)||0,typeof u=="number"?o=-1<(ct(n)?n.indexOf(t,e):Ot(n,t,e)):P(n,function(n){return++r<e?void 0:!(o=n===t)
|
||||
}),o}function vt(n,t,e){var u=r;t=G.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else P(n,function(n,e,r){return u=!!t(n,e,r)});return u}function gt(n,t,e){var r=[];t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else P(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function yt(n,t,e){t=G.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return P(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0
|
||||
}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function ht(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:G.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else P(n,t);return n}function bt(n,t,e){var r=-1,u=n?n.length:0;if(t=G.createCallback(t,e),typeof u=="number")for(var a=qt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],P(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function mt(n,t,e){var r=-1/0,u=r;if(!t&&ke(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)
|
||||
}}else t=!t&&ct(n)?J:G.createCallback(t,e),ht(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function dt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=qt(r);++e<r;)u[e]=n[e][t];return u||bt(n,t)}function _t(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=G.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else P(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function kt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;
|
||||
if(typeof u!="number")var i=je(n),u=i.length;return t=G.createCallback(t,r,4),ht(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function jt(n,t,e){var r;t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else P(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function wt(n){for(var t=-1,e=n?n.length:0,r=Zt.apply(Jt,me.call(arguments,1)),r=H(r).contains,u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u}function Ct(n,t,e){if(n){var r=0,a=n.length;
|
||||
if(typeof t!="number"&&t!=u){var o=-1;for(t=G.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return nt(n,0,ye(ge(0,r),a))}}function xt(n,t,r,o){var i=-1,f=n?n.length:0,c=[];for(typeof t!="boolean"&&t!=u&&(o=r,r=o&&o[t]===n?e:t,t=a),r!=u&&(r=G.createCallback(r,o));++i<f;)o=n[i],r&&(o=r(o,i,n)),ke(o)?ue.apply(c,t?o:xt(o)):c.push(o);return c}function Ot(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ge(0,u+e):e||0)-1;else if(e)return r=St(n,t),n[r]===t?r:-1;
|
||||
for(;++r<u;)if(n[r]===t)return r;return-1}function Et(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=G.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:ge(0,t);return nt(n,r)}function St(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?G.createCallback(e,r,1):Ft,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function It(n,t,r,o){var i=-1,f=n?n.length:0,c=[],l=c;typeof t!="boolean"&&t!=u&&(o=r,r=o&&o[t]===n?e:t,t=a);var p=!t&&f>=s;for(r!=u&&(l=[],r=G.createCallback(r,o)),p&&(l=H([]));++i<f;){o=n[i];
|
||||
var v=r?r(o,i,n):o;(t?i&&l[l.length-1]===v:p?l.contains(v):0<=Ot(l,v))||((r||p)&&l.push(v),c.push(o))}return c}function Nt(n){for(var t=-1,e=n?mt(dt(n,"length")):0,r=qt(0>e?0:e);++t<e;)r[t]=dt(n,t);return r}function At(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function $t(n,t){return _e.fastBind||fe&&2<arguments.length?fe.call.apply(fe,arguments):Q(n,t,me.call(arguments,2))}function Bt(n){var t=me.call(arguments,1);return oe(function(){n.apply(e,t)
|
||||
},1)}function Ft(n){return n}function Rt(n){ht(rt(n),function(t){var e=G[t]=n[t];G.prototype[t]=function(){var n=this.__wrapped__,t=[n];return ue.apply(t,arguments),t=e.apply(G,t),n&&typeof n=="object"&&n==t?this:new Y(t)}})}function Tt(){return this.__wrapped__}o=o?z.defaults(n.Object(),o,z.pick(n,O)):n;var qt=o.Array,Dt=o.Boolean,zt=o.Date,Pt=o.Function,Kt=o.Math,Mt=o.Number,Ut=o.Object,Vt=o.RegExp,Gt=o.String,Ht=o.TypeError,Jt=qt.prototype,Lt=Ut.prototype,Qt=o._,Wt=Vt("^"+Gt(Lt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Xt=Kt.ceil,Yt=o.clearTimeout,Zt=Jt.concat,ne=Kt.floor,te=Pt.prototype.toString,ee=Wt.test(ee=Ut.getPrototypeOf)&&ee,re=Lt.hasOwnProperty,ue=Jt.push,ae=o.setImmediate,oe=o.setTimeout,ie=Lt.toString,fe=Wt.test(fe=ie.bind)&&fe,ce=Wt.test(ce=Ut.create)&&ce,le=Wt.test(le=qt.isArray)&&le,pe=o.isFinite,se=o.isNaN,ve=Wt.test(ve=Ut.keys)&&ve,ge=Kt.max,ye=Kt.min,he=o.parseInt,be=Kt.random,me=Jt.slice,Kt=Wt.test(o.attachEvent),Kt=fe&&!/\n|true/.test(fe+Kt),de={};
|
||||
de[S]=qt,de[I]=Dt,de[N]=zt,de[A]=Pt,de[B]=Ut,de[$]=Mt,de[F]=Vt,de[R]=Gt;var _e=G.support={};_e.fastBind=fe&&!Kt,G.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:G}},Y.prototype=G.prototype;var ke=le,je=ve?function(n){return it(n)?ve(n):[]}:V,we={"&":"&","<":"<",">":">",'"':""","'":"'"},Ce=ut(we);return Kt&&i&&typeof ae=="function"&&(Bt=$t(ae,o)),Dt=8==he(k+"08")?he:function(n,t){return he(ct(n)?n.replace(j,""):n,t||0)
|
||||
},G.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},G.assign=U,G.at=function(n){for(var t=-1,e=Zt.apply(Jt,me.call(arguments,1)),r=e.length,u=qt(r);++t<r;)u[t]=n[e[t]];return u},G.bind=$t,G.bindAll=function(n){for(var t=1<arguments.length?Zt.apply(Jt,me.call(arguments,1)):rt(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=$t(n[u],n)}return n},G.bindKey=function(n,t){return Q(n,t,me.call(arguments,2),l)},G.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];
|
||||
u&&r.push(u)}return r},G.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},G.countBy=function(n,t,e){var r={};return t=G.createCallback(t,e),ht(n,function(n,e,u){e=Gt(t(n,e,u)),re.call(r,e)?r[e]++:r[e]=1}),r},G.createCallback=function(n,t,e){if(n==u)return Ft;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=je(n);return function(t){for(var e=o.length,r=a;e--&&(r=at(t[o[e]],n[o[e]],l)););return r
|
||||
}}return typeof t=="undefined"||_&&!_.test(te.call(n))?n:1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}},G.debounce=function(n,t,e){function o(){var t=s&&(!v||1<l);l=p=0,t&&(f=n.apply(c,i))}var i,f,c,l=0,p=u,s=r;if(e===r)var v=r,s=a;else it(e)&&(v=e.leading,s="trailing"in e?e.trailing:s);return function(){return i=arguments,c=this,Yt(p),v&&2>++l&&(f=n.apply(c,i)),p=oe(o,t),f}},G.defaults=M,G.defer=Bt,G.delay=function(n,t){var r=me.call(arguments,2);
|
||||
return oe(function(){n.apply(e,r)},t)},G.difference=wt,G.filter=gt,G.flatten=xt,G.forEach=ht,G.forIn=K,G.forOwn=P,G.functions=rt,G.groupBy=function(n,t,e){var r={};return t=G.createCallback(t,e),ht(n,function(n,e,u){e=Gt(t(n,e,u)),(re.call(r,e)?r[e]:r[e]=[]).push(n)}),r},G.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return nt(n,0,ye(ge(0,a-r),a))},G.intersection=function(n){var t=arguments,e=t.length,r=H([]),u={},a=-1,o=n?n.length:0,i=[];
|
||||
n:for(;++a<o;){var f=n[a];if(!r.contains(f)){var c=e;for(r.push(f);--c;)if(!(u[c]||(u[c]=H(t[c]).contains))(f))continue n;i.push(f)}}return i},G.invert=ut,G.invoke=function(n,t){var e=me.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=qt(typeof a=="number"?a:0);return ht(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},G.keys=je,G.map=bt,G.max=mt,G.memoize=function(n,t){function e(){var r=e.cache,u=p+(t?t.apply(this,arguments):arguments[0]);return re.call(r,u)?r[u]:r[u]=n.apply(this,arguments)
|
||||
}return e.cache={},e},G.merge=lt,G.min=function(n,t,e){var r=1/0,u=r;if(!t&&ke(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&ct(n)?J:G.createCallback(t,e),ht(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},G.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=G.createCallback(t,e);else var a=Zt.apply(Jt,me.call(arguments,1));return K(n,function(n,e,o){(r?!t(n,e,o):0>Ot(a,e))&&(u[e]=n)}),u},G.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)
|
||||
}},G.pairs=function(n){for(var t=-1,e=je(n),r=e.length,u=qt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},G.partial=function(n){return Q(n,me.call(arguments,1))},G.partialRight=function(n){return Q(n,me.call(arguments,1),u,l)},G.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=Zt.apply(Jt,me.call(arguments,1)),o=it(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=G.createCallback(t,e),K(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},G.pluck=dt,G.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);
|
||||
var r=-1;t=ge(0,Xt((t-n)/e));for(var a=qt(t);++r<t;)a[r]=n,n+=e;return a},G.reject=function(n,t,e){return t=G.createCallback(t,e),gt(n,function(n,e,r){return!t(n,e,r)})},G.rest=Et,G.shuffle=function(n){var t=-1,e=n?n.length:0,r=qt(typeof e=="number"?e:0);return ht(n,function(n){var e=ne(be()*(++t+1));r[t]=r[e],r[e]=n}),r},G.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=qt(typeof u=="number"?u:0);for(t=G.createCallback(t,e),ht(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(L);u--;)a[u]=a[u].c;
|
||||
return a},G.tap=function(n,t){return t(n),n},G.throttle=function(n,t,e){function o(){s=u,v&&(l=new zt,f=n.apply(c,i))}var i,f,c,l=0,p=r,s=u,v=r;return e===a?p=a:it(e)&&(p="leading"in e?e.leading:p,v="trailing"in e?e.trailing:v),function(){var e=new zt;!s&&!p&&(l=e);var r=t-(e-l);return i=arguments,c=this,0<r?s||(s=oe(o,r)):(Yt(s),s=u,l=e,f=n.apply(c,i)),f}},G.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=qt(n);for(t=G.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},G.toArray=function(n){return n&&typeof n.length=="number"?nt(n):pt(n)
|
||||
},G.transform=function(n,t,e,r){var a=ke(n);return t=G.createCallback(t,r,4),e==u&&(a?e=[]:(r=n&&n.constructor,e=it(r&&r.prototype)?ce(r&&r.prototype):{})),(a?ht:P)(n,function(n,r,u){return t(e,n,r,u)}),e},G.union=function(n){return ke(n)||(arguments[0]=n?me.call(n):Jt),It(Zt.apply(Jt,arguments))},G.uniq=It,G.unzip=Nt,G.values=pt,G.where=gt,G.without=function(n){return wt(n,me.call(arguments,1))},G.wrap=function(n,t){return function(){var e=[n];return ue.apply(e,arguments),t.apply(this,e)}},G.zip=function(n){return n?Nt(arguments):[]
|
||||
},G.zipObject=At,G.collect=bt,G.drop=Et,G.each=ht,G.extend=U,G.methods=rt,G.object=At,G.select=gt,G.tail=Et,G.unique=It,Rt(G),G.chain=G,G.prototype.chain=function(){return this},G.clone=et,G.cloneDeep=function(n,t,e){return et(n,r,t,e)},G.contains=st,G.escape=function(n){return n==u?"":Gt(n).replace(C,X)},G.every=vt,G.find=yt,G.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=G.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},G.findKey=function(n,t,e){var r;return t=G.createCallback(t,e),P(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0
|
||||
}),r},G.has=function(n,t){return n?re.call(n,t):a},G.identity=Ft,G.indexOf=Ot,G.isArguments=function(n){return ie.call(n)==E},G.isArray=ke,G.isBoolean=function(n){return n===r||n===a||ie.call(n)==I},G.isDate=function(n){return n?typeof n=="object"&&ie.call(n)==N:a},G.isElement=function(n){return n?1===n.nodeType:a},G.isEmpty=function(n){var t=r;if(!n)return t;var e=ie.call(n),u=n.length;return e==S||e==R||e==E||e==B&&typeof u=="number"&&ot(n.splice)?!u:(P(n,function(){return t=a}),t)},G.isEqual=at,G.isFinite=function(n){return pe(n)&&!se(parseFloat(n))
|
||||
},G.isFunction=ot,G.isNaN=function(n){return ft(n)&&n!=+n},G.isNull=function(n){return n===u},G.isNumber=ft,G.isObject=it,G.isPlainObject=f,G.isRegExp=function(n){return n?typeof n=="object"&&ie.call(n)==F:a},G.isString=ct,G.isUndefined=function(n){return typeof n=="undefined"},G.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ge(0,r+e):ye(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},G.mixin=Rt,G.noConflict=function(){return o._=Qt,this},G.parseInt=Dt,G.random=function(n,t){n==u&&t==u&&(t=1),n=+n||0,t==u?(t=n,n=0):t=+t||0;
|
||||
var e=be();return n%1||t%1?n+ye(e*(t-n+parseFloat("1e-"+((e+"").length-1))),t):n+ne(e*(t-n+1))},G.reduce=_t,G.reduceRight=kt,G.result=function(n,t){var r=n?n[t]:e;return ot(r)?n[t]():r},G.runInContext=t,G.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:je(n).length},G.some=jt,G.sortedIndex=St,G.template=function(n,t,u){var a=G.templateSettings;n||(n=""),u=M({},u,a);var o,i=M({},u.imports,a.imports),a=je(i),i=pt(i),f=0,c=u.interpolate||w,l="__p+='",c=Vt((u.escape||w).source+"|"+c.source+"|"+(c===d?b:w).source+"|"+(u.evaluate||w).source+"|$","g");
|
||||
n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(x,W),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(v,""):l).replace(g,"$1").replace(y,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=Pt(a,"return "+l).apply(e,i)
|
||||
}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},G.unescape=function(n){return n==u?"":Gt(n).replace(h,tt)},G.uniqueId=function(n){var t=++c;return Gt(n==u?"":n)+t},G.all=vt,G.any=jt,G.detect=yt,G.foldl=_t,G.foldr=kt,G.include=st,G.inject=_t,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(){var t=[this.__wrapped__];return ue.apply(t,arguments),n.apply(G,t)})}),G.first=Ct,G.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++
|
||||
}else if(r=t,r==u||e)return n[a-1];return nt(n,ge(0,a-r))}},G.take=Ct,G.head=Ct,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return t==u||e&&typeof t!="function"?r:new Y(r)})}),G.VERSION="1.2.1",G.prototype.toString=function(){return Gt(this.__wrapped__)},G.prototype.value=Tt,G.prototype.valueOf=Tt,ht(["join","pop","shift"],function(n){var t=Jt[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ht(["push","reverse","sort","unshift"],function(n){var t=Jt[n];
|
||||
G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ht(["concat","slice","splice"],function(n){var t=Jt[n];G.prototype[n]=function(){return new Y(t.apply(this.__wrapped__,arguments))}}),G}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=75,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/\w*$/,d=/<%=([\s\S]+?)%>/g,_=(_=/\bthis\b/)&&_.test(t)&&_,k=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",j=RegExp("^["+k+"]*0+(?=.$)"),w=/($^)/,C=/[&<>"']/g,x=/['\n\r\t\u2028\u2029\\]/g,O="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),E="[object Arguments]",S="[object Array]",I="[object Boolean]",N="[object Date]",A="[object Function]",$="[object Number]",B="[object Object]",F="[object RegExp]",R="[object String]",T={};
|
||||
;!function(n){function t(o){function f(n){if(!n||oe.call(n)!=B)return a;var t=n.valueOf,e=typeof t=="function"&&(e=te(t))&&te(e);return e?n==e||te(n)==e:tt(n)}function P(n,t,e){if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(var r=-1,u=q[typeof n]?ke(n):[],o=u.length;++r<o&&(e=u[r],!(t(n[e],e,n)===a)););return n}function K(n,t,e){var r;if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(r in n)if(t(n[r],r,n)===a)break;return n}function M(n,t,e){var r,u=n,a=u;
|
||||
if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&q[typeof u])for(var c=-1,l=q[typeof u]?ke(u):[],p=l.length;++c<p;)r=l[c],"undefined"==typeof a[r]&&(a[r]=u[r]);return a}function U(n,t,e){var r,u=n,a=u;if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var c=G.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(c=o[--f]);for(;++i<f;)if((u=o[i])&&q[typeof u])for(var l=-1,p=q[typeof u]?ke(u):[],s=p.length;++l<s;)r=p[l],a[r]=c?c(a[r],u[r]):u[r];
|
||||
return a}function V(n){var t,e=[];if(!n||!q[typeof n])return e;for(t in n)ee.call(n,t)&&e.push(t);return e}function G(n){return n&&typeof n=="object"&&!_e(n)&&ee.call(n,"__wrapped__")?n:new Z(n)}function H(n,t,e){e=(e||0)-1;for(var r=n.length;++e<r;)if(n[e]===t)return e;return-1}function J(n){return n.charCodeAt(0)}function L(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function Q(n,t,e,r){function u(){var r=arguments,c=o?this:t;
|
||||
return a||(n=t[i]),e.length&&(r=r.length?(r=be.call(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(c=ct(n.prototype)?fe(n.prototype):{},r=n.apply(c,r),ct(r)?r:c):n.apply(c,r)}var a=ft(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Gt;t=n}return u}function W(n){function t(t){return-1<H(n,t)}function e(t){n.push(t)}function o(n){var t=typeof n;if("boolean"==t||n==u)return y[n];var e=y[t]||(t="object",g),r="number"==t?n:p+n;return"object"==t?e[r]?-1<H(e[r],n):a:!!e[r]}function i(n){var t=typeof n;
|
||||
if("boolean"==t||n==u)y[n]=r;else{var e=y[t]||(t="object",g),a="number"==t?n:p+n;"object"==t?f=(e[a]||(e[a]=[])).push(n)==l:e[a]=r}}n||(n=[]);var f,c=-1,l=n.length,v=l>=s,g={},y={"false":a,"function":a,"null":a,number:{},object:g,string:{},"true":a,undefined:a};if(v){for(;++c<l;)i(n[c]);f&&(v=y=g=u)}return v?{contains:o,push:i}:{contains:t,push:e}}function X(n){return je[n]}function Y(n){return"\\"+D[n]}function Z(n){this.__wrapped__=n}function nt(n){return function(t,r,o,i){return typeof r!="boolean"&&r!=u&&(i=o,o=i&&i[r]===t?e:r,r=a),o!=u&&(o=G.createCallback(o,i)),n(t,r,o,i)
|
||||
}}function tt(n){var t=a;if(!n||oe.call(n)!=B)return t;var e=n.constructor;return(ft(e)?e instanceof e:1)?(K(n,function(n,e){t=e}),t===a||ee.call(n,t)):t}function et(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Tt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function rt(n){return we[n]}function ut(n,t,r,o,i,f){var c=n;if(typeof t!="boolean"&&t!=u&&(o=r,r=t,t=a),typeof r=="function"){if(r=typeof o=="undefined"?r:G.createCallback(r,o,1),c=r(c),typeof c!="undefined")return c;
|
||||
c=n}if(o=ct(c)){var l=oe.call(c);if(!T[l])return c;var p=_e(c)}if(!o||!t)return o?p?et(c):U({},c):c;switch(o=me[l],l){case I:case N:return new o(+c);case $:case R:return new o(c);case F:return o(c.source,m.exec(c))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c=p?o(c.length):{},p&&(ee.call(n,"index")&&(c.index=n.index),ee.call(n,"input")&&(c.input=n.input)),i.push(n),f.push(c),(p?mt:P)(n,function(n,u){c[u]=ut(n,t,r,e,i,f)}),c}function at(n){var t=[];return K(n,function(n,e){ft(n)&&t.push(e)
|
||||
}),t.sort()}function ot(n){for(var t=-1,e=ke(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function it(n,t,e,o,i,f){var c=e===l;if(typeof e=="function"&&!c){e=G.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=oe.call(n),s=oe.call(t),v==E&&(v=B),s==E&&(s=B),v!=s)return a;switch(v){case I:case N:return+n==+t;
|
||||
case $:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case F:case R:return n==Vt(t)}if(s=v==S,!s){if(ee.call(n,"__wrapped__")||ee.call(t,"__wrapped__"))return it(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=B)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!ft(v)||!(v instanceof v&&ft(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var y=0,p=r;if(i.push(n),f.push(t),s){if(v=n.length,y=t.length,p=y==n.length,!p&&!c)return p;for(;y--;)if(s=v,g=t[y],c)for(;s--&&!(p=it(n[s],g,e,o,i,f)););else if(!(p=it(n[y],g,e,o,i,f)))break;
|
||||
return p}return K(t,function(t,r,u){return ee.call(u,r)?(y++,p=ee.call(n,r)&&it(n[r],t,e,o,i,f)):void 0}),p&&!c&&K(n,function(n,t,e){return ee.call(e,t)?p=-1<--y:void 0}),p}function ft(n){return typeof n=="function"}function ct(n){return!(!n||!q[typeof n])}function lt(n){return typeof n=="number"||oe.call(n)==$}function pt(n){return typeof n=="string"||oe.call(n)==R}function st(n,t,e){var r=arguments,u=0,a=2;if(!ct(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=G.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
|
||||
for(;++u<a;)(_e(r[u])?mt:P)(r[u],function(t,e){var r,u,a=t,p=n[e];if(t&&((u=_e(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s;o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),s||(p=u?_e(p)?p:[]:f(p)?p:{}),i.push(t),c.push(p),s||(p=st(p,t,l,o,i,c))}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function vt(n){for(var t=-1,e=ke(n),r=e.length,u=Tt(r);++t<r;)u[t]=n[e[t]];return u}function gt(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?ve(0,u+e):e)||0,u&&typeof u=="number"?o=-1<(pt(n)?n.indexOf(t,e):H(n,t,e)):P(n,function(n){return++r<e?void 0:!(o=n===t)
|
||||
}),o}function yt(n,t,e){var u=r;t=G.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else P(n,function(n,e,r){return u=!!t(n,e,r)});return u}function ht(n,t,e){var r=[];t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else P(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function bt(n,t,e){t=G.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return P(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0
|
||||
}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function mt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:G.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else P(n,t);return n}function dt(n,t,e){var r=-1,u=n?n.length:0;if(t=G.createCallback(t,e),typeof u=="number")for(var a=Tt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],P(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function _t(n,t,e){var r=-1/0,u=r;if(!t&&_e(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)
|
||||
}}else t=!t&&pt(n)?J:G.createCallback(t,e),mt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function kt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Tt(r);++e<r;)u[e]=n[e][t];return u||dt(n,t)}function jt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=G.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else P(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function wt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;
|
||||
if(typeof u!="number")var i=ke(n),u=i.length;return t=G.createCallback(t,r,4),mt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function Ct(n,t,e){var r;t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else P(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function xt(n){for(var t=-1,e=n?n.length:0,r=Yt.apply(Ht,be.call(arguments,1)),r=W(r).contains,u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u}function Ot(n,t,e){if(n){var r=0,a=n.length;
|
||||
if(typeof t!="number"&&t!=u){var o=-1;for(t=G.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return et(n,0,ge(ve(0,r),a))}}function Et(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=G.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:ve(0,t);return et(n,r)}function St(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?G.createCallback(e,r,1):Bt,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function It(n){for(var t=-1,e=n?_t(kt(n,"length")):0,r=Tt(0>e?0:e);++t<e;)r[t]=kt(n,t);
|
||||
return r}function Nt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function At(n,t){return de.fastBind||ie&&2<arguments.length?ie.call.apply(ie,arguments):Q(n,t,be.call(arguments,2))}function $t(n){var t=be.call(arguments,1);return ae(function(){n.apply(e,t)},1)}function Bt(n){return n}function Ft(n){mt(at(n),function(t){var e=G[t]=n[t];G.prototype[t]=function(){var n=this.__wrapped__,t=[n];return re.apply(t,arguments),t=e.apply(G,t),n&&typeof n=="object"&&n==t?this:new Z(t)
|
||||
}})}function Rt(){return this.__wrapped__}o=o?z.defaults(n.Object(),o,z.pick(n,O)):n;var Tt=o.Array,qt=o.Boolean,Dt=o.Date,zt=o.Function,Pt=o.Math,Kt=o.Number,Mt=o.Object,Ut=o.RegExp,Vt=o.String,Gt=o.TypeError,Ht=Tt.prototype,Jt=Mt.prototype,Lt=o._,Qt=Ut("^"+Vt(Jt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Wt=Pt.ceil,Xt=o.clearTimeout,Yt=Ht.concat,Zt=Pt.floor,ne=zt.prototype.toString,te=Qt.test(te=Mt.getPrototypeOf)&&te,ee=Jt.hasOwnProperty,re=Ht.push,ue=o.setImmediate,ae=o.setTimeout,oe=Jt.toString,ie=Qt.test(ie=oe.bind)&&ie,fe=Qt.test(fe=Mt.create)&&fe,ce=Qt.test(ce=Tt.isArray)&&ce,le=o.isFinite,pe=o.isNaN,se=Qt.test(se=Mt.keys)&&se,ve=Pt.max,ge=Pt.min,ye=o.parseInt,he=Pt.random,be=Ht.slice,Pt=Qt.test(o.attachEvent),Pt=ie&&!/\n|true/.test(ie+Pt),me={};
|
||||
me[S]=Tt,me[I]=qt,me[N]=Dt,me[A]=zt,me[B]=Mt,me[$]=Kt,me[F]=Ut,me[R]=Vt;var de=G.support={};de.fastBind=ie&&!Pt,G.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:G}},Z.prototype=G.prototype;var _e=ce,ke=se?function(n){return ct(n)?se(n):[]}:V,je={"&":"&","<":"<",">":">",'"':""","'":"'"},we=ot(je),qt=nt(function xe(n,t,e){for(var r=-1,u=n?n.length:0,a=[];++r<u;){var o=n[r];e&&(o=e(o,r,n)),_e(o)?re.apply(a,t?o:xe(o)):a.push(o)
|
||||
}return a}),Ce=nt(function(n,t,e){for(var r=-1,u=n?n.length:0,a=!t&&u>=s,o=[],i=a?W():e?[]:o;++r<u;){var f=n[r],c=e?e(f,r,n):f;(t?r&&i[i.length-1]===c:a?i.contains(c):0<=H(i,c))||((e||a)&&i.push(c),o.push(f))}return o});return Pt&&i&&typeof ue=="function"&&($t=At(ue,o)),ue=8==ye(k+"08")?ye:function(n,t){return ye(pt(n)?n.replace(j,""):n,t||0)},G.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},G.assign=U,G.at=function(n){for(var t=-1,e=Yt.apply(Ht,be.call(arguments,1)),r=e.length,u=Tt(r);++t<r;)u[t]=n[e[t]];
|
||||
return u},G.bind=At,G.bindAll=function(n){for(var t=1<arguments.length?Yt.apply(Ht,be.call(arguments,1)):at(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=At(n[u],n)}return n},G.bindKey=function(n,t){return Q(n,t,be.call(arguments,2),l)},G.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},G.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},G.countBy=function(n,t,e){var r={};return t=G.createCallback(t,e),mt(n,function(n,e,u){e=Vt(t(n,e,u)),ee.call(r,e)?r[e]++:r[e]=1
|
||||
}),r},G.createCallback=function(n,t,e){if(n==u)return Bt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=ke(n);return function(t){for(var e=o.length,r=a;e--&&(r=it(t[o[e]],n[o[e]],l)););return r}}return typeof t=="undefined"||_&&!_.test(ne.call(n))?n:1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}},G.debounce=function(n,t,e){function o(){var t=s&&(!v||1<l);
|
||||
l=p=0,t&&(f=n.apply(c,i))}var i,f,c,l=0,p=u,s=r;if(e===r)var v=r,s=a;else ct(e)&&(v=e.leading,s="trailing"in e?e.trailing:s);return function(){return i=arguments,c=this,Xt(p),v&&2>++l&&(f=n.apply(c,i)),p=ae(o,t),f}},G.defaults=M,G.defer=$t,G.delay=function(n,t){var r=be.call(arguments,2);return ae(function(){n.apply(e,r)},t)},G.difference=xt,G.filter=ht,G.flatten=qt,G.forEach=mt,G.forIn=K,G.forOwn=P,G.functions=at,G.groupBy=function(n,t,e){var r={};return t=G.createCallback(t,e),mt(n,function(n,e,u){e=Vt(t(n,e,u)),(ee.call(r,e)?r[e]:r[e]=[]).push(n)
|
||||
}),r},G.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return et(n,0,ge(ve(0,a-r),a))},G.intersection=function(n){var t=arguments,e=t.length,r=W(),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var f=n[a];if(!r.contains(f)){var c=e;for(r.push(f);--c;)if(!(u[c]||(u[c]=W(t[c]).contains))(f))continue n;i.push(f)}}return i},G.invert=ot,G.invoke=function(n,t){var e=be.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Tt(typeof a=="number"?a:0);
|
||||
return mt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},G.keys=ke,G.map=dt,G.max=_t,G.memoize=function(n,t){function e(){var r=e.cache,u=p+(t?t.apply(this,arguments):arguments[0]);return ee.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}return e.cache={},e},G.merge=st,G.min=function(n,t,e){var r=1/0,u=r;if(!t&&_e(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&pt(n)?J:G.createCallback(t,e),mt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},G.omit=function(n,t,e){var r=typeof t=="function",u={};
|
||||
if(r)t=G.createCallback(t,e);else var a=Yt.apply(Ht,be.call(arguments,1));return K(n,function(n,e,o){(r?!t(n,e,o):0>H(a,e))&&(u[e]=n)}),u},G.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)}},G.pairs=function(n){for(var t=-1,e=ke(n),r=e.length,u=Tt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},G.partial=function(n){return Q(n,be.call(arguments,1))},G.partialRight=function(n){return Q(n,be.call(arguments,1),u,l)},G.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=Yt.apply(Ht,be.call(arguments,1)),o=ct(n)?a.length:0;++u<o;){var i=a[u];
|
||||
i in n&&(r[i]=n[i])}else t=G.createCallback(t,e),K(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},G.pluck=kt,G.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);var r=-1;t=ve(0,Wt((t-n)/e));for(var a=Tt(t);++r<t;)a[r]=n,n+=e;return a},G.reject=function(n,t,e){return t=G.createCallback(t,e),ht(n,function(n,e,r){return!t(n,e,r)})},G.rest=Et,G.shuffle=function(n){var t=-1,e=n?n.length:0,r=Tt(typeof e=="number"?e:0);return mt(n,function(n){var e=Zt(he()*(++t+1));r[t]=r[e],r[e]=n}),r},G.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=Tt(typeof u=="number"?u:0);
|
||||
for(t=G.createCallback(t,e),mt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(L);u--;)a[u]=a[u].c;return a},G.tap=function(n,t){return t(n),n},G.throttle=function(n,t,e){function o(){s=u,v&&(l=new Dt,f=n.apply(c,i))}var i,f,c,l=0,p=r,s=u,v=r;return e===a?p=a:ct(e)&&(p="leading"in e?e.leading:p,v="trailing"in e?e.trailing:v),function(){var e=new Dt;!s&&!p&&(l=e);var r=t-(e-l);return i=arguments,c=this,0<r?s||(s=ae(o,r)):(Xt(s),s=u,l=e,f=n.apply(c,i)),f}},G.times=function(n,t,e){n=-1<(n=+n)?n:0;
|
||||
var r=-1,u=Tt(n);for(t=G.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},G.toArray=function(n){return n&&typeof n.length=="number"?et(n):vt(n)},G.transform=function(n,t,e,r){var a=_e(n);return t=G.createCallback(t,r,4),e==u&&(a?e=[]:(r=n&&n.constructor,e=ct(r&&r.prototype)?fe(r&&r.prototype):{})),(a?mt:P)(n,function(n,r,u){return t(e,n,r,u)}),e},G.union=function(n){return _e(n)||(arguments[0]=n?be.call(n):Ht),Ce(Yt.apply(Ht,arguments))},G.uniq=Ce,G.unzip=It,G.values=vt,G.where=ht,G.without=function(n){return xt(n,be.call(arguments,1))
|
||||
},G.wrap=function(n,t){return function(){var e=[n];return re.apply(e,arguments),t.apply(this,e)}},G.zip=function(n){return n?It(arguments):[]},G.zipObject=Nt,G.collect=dt,G.drop=Et,G.each=mt,G.extend=U,G.methods=at,G.object=Nt,G.select=ht,G.tail=Et,G.unique=Ce,Ft(G),G.chain=G,G.prototype.chain=function(){return this},G.clone=ut,G.cloneDeep=function(n,t,e){return ut(n,r,t,e)},G.contains=gt,G.escape=function(n){return n==u?"":Vt(n).replace(C,X)},G.every=yt,G.find=bt,G.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=G.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},G.findKey=function(n,t,e){var r;return t=G.createCallback(t,e),P(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0}),r},G.has=function(n,t){return n?ee.call(n,t):a},G.identity=Bt,G.indexOf=function(n,t,e){if(typeof e=="number"){var r=n?n.length:0;e=0>e?ve(0,r+e):e||0}else if(e)return e=St(n,t),n[e]===t?e:-1;return n?H(n,t,e):-1},G.isArguments=function(n){return oe.call(n)==E},G.isArray=_e,G.isBoolean=function(n){return n===r||n===a||oe.call(n)==I
|
||||
},G.isDate=function(n){return n?typeof n=="object"&&oe.call(n)==N:a},G.isElement=function(n){return n?1===n.nodeType:a},G.isEmpty=function(n){var t=r;if(!n)return t;var e=oe.call(n),u=n.length;return e==S||e==R||e==E||e==B&&typeof u=="number"&&ft(n.splice)?!u:(P(n,function(){return t=a}),t)},G.isEqual=it,G.isFinite=function(n){return le(n)&&!pe(parseFloat(n))},G.isFunction=ft,G.isNaN=function(n){return lt(n)&&n!=+n},G.isNull=function(n){return n===u},G.isNumber=lt,G.isObject=ct,G.isPlainObject=f,G.isRegExp=function(n){return n?typeof n=="object"&&oe.call(n)==F:a
|
||||
},G.isString=pt,G.isUndefined=function(n){return typeof n=="undefined"},G.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ve(0,r+e):ge(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},G.mixin=Ft,G.noConflict=function(){return o._=Lt,this},G.parseInt=ue,G.random=function(n,t){n==u&&t==u&&(t=1),n=+n||0,t==u?(t=n,n=0):t=+t||0;var e=he();return n%1||t%1?n+ge(e*(t-n+parseFloat("1e-"+((e+"").length-1))),t):n+Zt(e*(t-n+1))},G.reduce=jt,G.reduceRight=wt,G.result=function(n,t){var r=n?n[t]:e;
|
||||
return ft(r)?n[t]():r},G.runInContext=t,G.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ke(n).length},G.some=Ct,G.sortedIndex=St,G.template=function(n,t,u){var a=G.templateSettings;n||(n=""),u=M({},u,a);var o,i=M({},u.imports,a.imports),a=ke(i),i=vt(i),f=0,c=u.interpolate||w,l="__p+='",c=Ut((u.escape||w).source+"|"+c.source+"|"+(c===d?b:w).source+"|"+(u.evaluate||w).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(x,Y),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t
|
||||
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(v,""):l).replace(g,"$1").replace(y,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=zt(a,"return "+l).apply(e,i)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},G.unescape=function(n){return n==u?"":Vt(n).replace(h,rt)},G.uniqueId=function(n){var t=++c;return Vt(n==u?"":n)+t
|
||||
},G.all=yt,G.any=Ct,G.detect=bt,G.foldl=jt,G.foldr=wt,G.include=gt,G.inject=jt,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(){var t=[this.__wrapped__];return re.apply(t,arguments),n.apply(G,t)})}),G.first=Ot,G.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return et(n,ve(0,a-r))}},G.take=Ot,G.head=Ot,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
|
||||
return t==u||e&&typeof t!="function"?r:new Z(r)})}),G.VERSION="1.2.1",G.prototype.toString=function(){return Vt(this.__wrapped__)},G.prototype.value=Rt,G.prototype.valueOf=Rt,mt(["join","pop","shift"],function(n){var t=Ht[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),mt(["push","reverse","sort","unshift"],function(n){var t=Ht[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),mt(["concat","slice","splice"],function(n){var t=Ht[n];G.prototype[n]=function(){return new Z(t.apply(this.__wrapped__,arguments))
|
||||
}}),G}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=75,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/\w*$/,d=/<%=([\s\S]+?)%>/g,_=(_=/\bthis\b/)&&_.test(t)&&_,k=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",j=RegExp("^["+k+"]*0+(?=.$)"),w=/($^)/,C=/[&<>"']/g,x=/['\n\r\t\u2028\u2029\\]/g,O="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),E="[object Arguments]",S="[object Array]",I="[object Boolean]",N="[object Date]",A="[object Function]",$="[object Number]",B="[object Object]",F="[object RegExp]",R="[object String]",T={};
|
||||
T[A]=a,T[E]=T[S]=T[I]=T[N]=T[$]=T[B]=T[F]=T[R]=r;var q={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},D={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},z=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=z, define(function(){return z})):o&&!o.nodeType?i?(i.exports=z)._=z:o._=z:n._=z}(this);
|
||||
185
dist/lodash.underscore.js
vendored
185
dist/lodash.underscore.js
vendored
@@ -295,6 +295,28 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* A basic version of `_.indexOf` without support for binary searches
|
||||
* or `fromIndex` constraints.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @param {Number} [fromIndex=0] The index to search from.
|
||||
* @returns {Number} Returns the index of the matched value or `-1`.
|
||||
*/
|
||||
function basicIndexOf(array, value, fromIndex) {
|
||||
var index = (fromIndex || 0) - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `_.max` and `_.min` as the default `callback` when a given
|
||||
* `collection` is a string value.
|
||||
@@ -394,6 +416,85 @@
|
||||
return bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function optimized to search large arrays for a given `value`,
|
||||
* starting at `fromIndex`, using strict equality for comparisons, i.e. `===`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} [array=[]] The array to search.
|
||||
* @param {Mixed} value The value to search for.
|
||||
* @returns {Boolean} Returns `true`, if `value` is found, else `false`.
|
||||
*/
|
||||
function createCache(array) {
|
||||
array || (array = []);
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
'false': false,
|
||||
'function': false,
|
||||
'null': false,
|
||||
'number': {},
|
||||
'object': objCache,
|
||||
'string': {},
|
||||
'true': false,
|
||||
'undefined': false
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
array.push(value);
|
||||
}
|
||||
|
||||
function cacheContains(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
return caches[value];
|
||||
}
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
return type == 'object'
|
||||
? (cache[key] ? basicIndexOf(cache[key], value) > -1 : false)
|
||||
: !!cache[key];
|
||||
}
|
||||
|
||||
function cachePush(value) {
|
||||
var type = typeof value;
|
||||
if (type == 'boolean' || value == null) {
|
||||
caches[value] = true;
|
||||
} else {
|
||||
var cache = caches[type] || (type = 'object', objCache),
|
||||
key = type == 'number' ? value : keyPrefix + value;
|
||||
|
||||
if (type == 'object') {
|
||||
bailout = (cache[key] || (cache[key] = [])).push(value) == length;
|
||||
} else {
|
||||
cache[key] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isLarge) {
|
||||
while (++index < length) {
|
||||
cachePush(array[index]);
|
||||
}
|
||||
if (bailout) {
|
||||
isLarge = caches = objCache = null;
|
||||
}
|
||||
}
|
||||
return isLarge
|
||||
? { 'contains': cacheContains, 'push': cachePush }
|
||||
: { 'contains': basicContains, 'push': basicPush };
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new object with the specified `prototype`.
|
||||
*
|
||||
@@ -416,6 +517,17 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeHtmlChar(match) {
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `template` to escape characters for inclusion in compiled
|
||||
* string literals.
|
||||
@@ -428,17 +540,6 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `escape` to convert characters to HTML entities.
|
||||
*
|
||||
* @private
|
||||
* @param {String} match The matched character to escape.
|
||||
* @returns {String} Returns the escaped character.
|
||||
*/
|
||||
function escapeHtmlChar(match) {
|
||||
return htmlEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast path for creating `lodash` wrapper objects.
|
||||
*
|
||||
@@ -461,6 +562,29 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a function that juggles arguments, allowing argument overloading
|
||||
* for `_.flatten` and `_.uniq`, before passing them to the given `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to wrap.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function overloadWrapper(func) {
|
||||
return function(array, flag, callback, thisArg) {
|
||||
// juggle arguments
|
||||
if (typeof flag != 'boolean' && flag != null) {
|
||||
thisArg = callback;
|
||||
callback = !(thisArg && thisArg[flag] === array) ? flag : undefined;
|
||||
flag = false;
|
||||
}
|
||||
if (callback != null) {
|
||||
callback = createCallback(callback, thisArg);
|
||||
}
|
||||
return func(array, flag, callback, thisArg);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by `unescape` to convert HTML entities to characters.
|
||||
*
|
||||
@@ -1312,7 +1436,7 @@
|
||||
result = {};
|
||||
|
||||
forIn(object, function(value, key) {
|
||||
if (indexOf(props, key) < 0) {
|
||||
if (basicIndexOf(props, key) < 0) {
|
||||
result[key] = value;
|
||||
}
|
||||
});
|
||||
@@ -1443,8 +1567,8 @@
|
||||
function contains(collection, target) {
|
||||
var length = collection ? collection.length : 0,
|
||||
result = false;
|
||||
if (typeof length == 'number') {
|
||||
result = indexOf(collection, target) > -1;
|
||||
if (length && typeof length == 'number') {
|
||||
result = basicIndexOf(collection, target) > -1;
|
||||
} else {
|
||||
forOwn(collection, function(value) {
|
||||
return (result = value === target) && indicatorObject;
|
||||
@@ -2478,7 +2602,7 @@
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (indexOf(flattened, value) < 0) {
|
||||
if (basicIndexOf(flattened, value) < 0) {
|
||||
result.push(value);
|
||||
}
|
||||
}
|
||||
@@ -2645,21 +2769,14 @@
|
||||
* // => 2
|
||||
*/
|
||||
function indexOf(array, value, fromIndex) {
|
||||
var index = -1,
|
||||
length = array ? array.length : 0;
|
||||
|
||||
if (typeof fromIndex == 'number') {
|
||||
index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1;
|
||||
var length = array ? array.length : 0;
|
||||
fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0);
|
||||
} else if (fromIndex) {
|
||||
index = sortedIndex(array, value);
|
||||
var index = sortedIndex(array, value);
|
||||
return array[index] === value ? index : -1;
|
||||
}
|
||||
while (++index < length) {
|
||||
if (array[index] === value) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return array ? basicIndexOf(array, value, fromIndex) : -1;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2762,10 +2879,10 @@
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (indexOf(result, value) < 0) {
|
||||
if (basicIndexOf(result, value) < 0) {
|
||||
var argsIndex = argsLength;
|
||||
while (--argsIndex) {
|
||||
if (indexOf(args[argsIndex], value) < 0) {
|
||||
if (basicIndexOf(args[argsIndex], value) < 0) {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
@@ -3100,7 +3217,7 @@
|
||||
* Creates a duplicate-value-free version of the `array` using strict equality
|
||||
* for comparisons, i.e. `===`. If the `array` is already sorted, passing `true`
|
||||
* for `isSorted` will run a faster algorithm. If `callback` is passed, each
|
||||
* element of `array` is passed through a `callback` before uniqueness is computed.
|
||||
* element of `array` is passed through the `callback` before uniqueness is computed.
|
||||
* The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is passed for `callback`, the created "_.pluck" style
|
||||
@@ -3129,11 +3246,11 @@
|
||||
* _.uniq([1, 1, 2, 2, 3], true);
|
||||
* // => [1, 2, 3]
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
|
||||
* // => ['A', 'b', 'C']
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2.5, 3]
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
@@ -3160,7 +3277,7 @@
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: indexOf(seen, computed) < 0
|
||||
: basicIndexOf(seen, computed) < 0
|
||||
) {
|
||||
if (callback) {
|
||||
seen.push(computed);
|
||||
|
||||
57
dist/lodash.underscore.min.js
vendored
57
dist/lodash.underscore.min.js
vendored
@@ -4,32 +4,31 @@
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;!function(n){function t(n){return n instanceof t?n:new a(n)}function r(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function e(n,t,r,e){function o(){var e=arguments,c=a?this:t;return i||(n=t[f]),r.length&&(e=e.length?(e=kt.call(e),l?e.concat(r):r.concat(e)):r),this instanceof o?(c=u(n.prototype),e=n.apply(c,e),_(e)?e:c):n.apply(c,e)}var i=m(n),a=!r,f=t;if(a){var l=e;r=t}else if(!i){if(!e)throw new TypeError;
|
||||
t=n}return o}function u(n){return _(n)?At(n):{}}function o(n){return"\\"+ct[n]}function i(n){return Tt[n]}function a(n){this.__wrapped__=n}function f(){}function l(n){return $t[n]}function c(n){return jt.call(n)==tt}function p(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function s(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)null==n[u]&&(n[u]=e[u])}return n}function v(n){var t=[];
|
||||
return It(n,function(n,r){m(n)&&t.push(r)}),t.sort()}function g(n){for(var t=-1,r=Mt(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function h(n){if(!n)return!0;if(Dt(n)||d(n))return!n.length;for(var t in n)if(_t.call(n,t))return!1;return!0}function y(n,r,e,u){if(n===r)return 0!==n||1/n==1/r;var o=typeof n,i=typeof r;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!r||"function"!=i&&"object"!=i))return!1;if(null==n||null==r)return n===r;if(i=jt.call(n),o=jt.call(r),i!=o)return!1;switch(i){case et:case ut:return+n==+r;
|
||||
case ot:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case at:case ft:return n==r+""}if(o=i==rt,!o){if(n instanceof t||r instanceof t)return y(n.__wrapped__||n,r.__wrapped__||r,e,u);if(i!=it)return!1;var i=n.constructor,a=r.constructor;if(i!=a&&(!m(i)||!(i instanceof i&&m(a)&&a instanceof a)))return!1}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==r;var f=!0,l=0;if(e.push(n),u.push(r),o){if(l=r.length,f=l==n.length)for(;l--&&(f=y(n[l],r[l],e,u)););return f}return It(r,function(t,r,o){return _t.call(o,r)?(l++,!(f=_t.call(n,r)&&y(n[r],t,e,u))&&L):void 0
|
||||
}),f&&It(n,function(n,t,r){return _t.call(r,t)?!(f=-1<--l)&&L:void 0}),f}function m(n){return typeof n=="function"}function _(n){return!(!n||!lt[typeof n])}function b(n){return typeof n=="number"||jt.call(n)==ot}function d(n){return typeof n=="string"||jt.call(n)==ft}function j(n){for(var t=-1,r=Mt(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function w(n,t){var r=!1;return typeof(n?n.length:0)=="number"?r=-1<$(n,t):zt(n,function(n){return(r=n===t)&&L}),r}function A(n,t,r){var e=!0;t=U(t,r),r=-1;
|
||||
var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&(e=!!t(n[r],r,n)););else zt(n,function(n,r,u){return!(e=!!t(n,r,u))&&L});return e}function x(n,t,r){var e=[];t=U(t,r),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}else zt(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function O(n,t,r){t=U(t,r),r=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return zt(n,function(n,r,e){return t(n,r,e)?(u=n,L):void 0}),u}for(;++r<e;){var o=n[r];if(t(o,r,n))return o
|
||||
}}function E(n,t,r){var e=-1,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:U(t,r),typeof u=="number")for(;++e<u&&t(n[e],e,n)!==L;);else zt(n,t)}function S(n,t,r){var e=-1,u=n?n.length:0;if(t=U(t,r),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=t(n[e],e,n);else o=[],zt(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function N(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=U(t,r),E(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r>u&&(u=r);return u}function B(n,t){var r=-1,e=n?n.length:0;
|
||||
if(typeof e=="number")for(var u=Array(e);++r<e;)u[r]=n[r][t];return u||S(n,t)}function F(n,t,r,e){if(!n)return r;var u=3>arguments.length;t=U(t,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n);else zt(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)});return r}function k(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Mt(n),u=i.length;return t=U(t,e,4),E(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=!1,n[a]):t(r,n[a],a,f)}),r}function q(n,t,r){var e;
|
||||
t=U(t,r),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&!(e=t(n[r],r,n)););else zt(n,function(n,r,u){return(e=t(n,r,u))&&L});return!!e}function R(n,t,r){return r&&h(t)?null:(r?O:x)(n,t)}function D(n){for(var t=-1,r=n.length,e=yt.apply(pt,kt.call(arguments,1)),u=[];++t<r;){var o=n[t];0>$(e,o)&&u.push(o)}return u}function M(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=U(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return kt.call(n,0,Bt(Nt(0,e),u))
|
||||
}}function T(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Dt(o)?bt.apply(u,t?o:T(o)):u.push(o)}return u}function $(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Nt(0,u+r):r||0)-1;else if(r)return e=z(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function I(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=U(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:Nt(0,t);return kt.call(n,e)}function z(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?U(r,e,1):V,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;
|
||||
return u}function C(n,t,r,e){var u=-1,o=n?n.length:0,i=[],a=i;for(typeof t!="boolean"&&null!=t&&(e=r,r=t,t=!1),null!=r&&(a=[],r=U(r,e));++u<o;){e=n[u];var f=r?r(e,u,n):e;(t?!u||a[a.length-1]!==f:0>$(a,f))&&(r&&a.push(f),i.push(e))}return i}function P(n,t){return Rt.fastBind||wt&&2<arguments.length?wt.call.apply(wt,arguments):e(n,t,kt.call(arguments,2))}function U(n,t,r){if(null==n)return V;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Mt(n);return function(t){for(var r=u.length,e=!1;r--&&(e=t[u[r]]===n[u[r]]););return e
|
||||
}}return typeof t=="undefined"?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}}function V(n){return n}function W(n){E(v(n),function(r){var e=t[r]=n[r];t.prototype[r]=function(){var n=[this.__wrapped__];return bt.apply(n,arguments),n=e.apply(t,n),this.__chain__&&(n=new a(n),n.__chain__=!0),n}})}var G=typeof exports=="object"&&exports,H=typeof module=="object"&&module&&module.exports==G&&module,J=typeof global=="object"&&global;
|
||||
(J.global===J||J.window===J)&&(n=J);var K=0,L={},Q=+new Date+"",X=/&(?:amp|lt|gt|quot|#39);/g,Y=/($^)/,Z=/[&<>"']/g,nt=/['\n\r\t\u2028\u2029\\]/g,tt="[object Arguments]",rt="[object Array]",et="[object Boolean]",ut="[object Date]",ot="[object Number]",it="[object Object]",at="[object RegExp]",ft="[object String]",lt={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},ct={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},pt=Array.prototype,J=Object.prototype,st=n._,vt=RegExp("^"+(J.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),gt=Math.ceil,ht=n.clearTimeout,yt=pt.concat,mt=Math.floor,_t=J.hasOwnProperty,bt=pt.push,dt=n.setTimeout,jt=J.toString,wt=vt.test(wt=jt.bind)&&wt,At=vt.test(At=Object.create)&&At,xt=vt.test(xt=Array.isArray)&&xt,Ot=n.isFinite,Et=n.isNaN,St=vt.test(St=Object.keys)&&St,Nt=Math.max,Bt=Math.min,Ft=Math.random,kt=pt.slice,J=vt.test(n.attachEvent),qt=wt&&!/\n|true/.test(wt+J),Rt={};
|
||||
!function(){var n={0:1,length:1};Rt.fastBind=wt&&!qt,Rt.spliceObjects=(pt.splice.call(n,0,1),!n[0])}(1),t.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},At||(u=function(n){if(_(n)){f.prototype=n;var t=new f;f.prototype=null}return t||{}}),a.prototype=t.prototype,c(arguments)||(c=function(n){return n?_t.call(n,"callee"):!1});var Dt=xt||function(n){return n?typeof n=="object"&&jt.call(n)==rt:!1},xt=function(n){var t,r=[];if(!n||!lt[typeof n])return r;
|
||||
for(t in n)_t.call(n,t)&&r.push(t);return r},Mt=St?function(n){return _(n)?St(n):[]}:xt,Tt={"&":"&","<":"<",">":">",'"':""","'":"'"},$t=g(Tt),It=function(n,t){var r;if(!n||!lt[typeof n])return n;for(r in n)if(t(n[r],r,n)===L)break;return n},zt=function(n,t){var r;if(!n||!lt[typeof n])return n;for(r in n)if(_t.call(n,r)&&t(n[r],r,n)===L)break;return n};m(/x/)&&(m=function(n){return typeof n=="function"&&"[object Function]"==jt.call(n)}),t.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
|
||||
}},t.bind=P,t.bindAll=function(n){for(var t=1<arguments.length?yt.apply(pt,kt.call(arguments,1)):v(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=P(n[u],n)}return n},t.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},t.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},t.countBy=function(n,t,r){var e={};return t=U(t,r),E(n,function(n,r,u){r=t(n,r,u)+"",_t.call(e,r)?e[r]++:e[r]=1}),e
|
||||
},t.debounce=function(n,t,r){function e(){a=null,r||(o=n.apply(i,u))}var u,o,i,a=null;return function(){var f=r&&!a;return u=arguments,i=this,ht(a),a=dt(e,t),f&&(o=n.apply(i,u)),o}},t.defaults=s,t.defer=function(n){var t=kt.call(arguments,1);return dt(function(){n.apply(void 0,t)},1)},t.delay=function(n,t){var r=kt.call(arguments,2);return dt(function(){n.apply(void 0,r)},t)},t.difference=D,t.filter=x,t.flatten=T,t.forEach=E,t.functions=v,t.groupBy=function(n,t,r){var e={};return t=U(t,r),E(n,function(n,r,u){r=t(n,r,u)+"",(_t.call(e,r)?e[r]:e[r]=[]).push(n)
|
||||
}),e},t.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=U(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return kt.call(n,0,Bt(Nt(0,u-e),u))},t.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,o=[];n:for(;++e<u;){var i=n[e];if(0>$(o,i)){for(var a=r;--a;)if(0>$(t[a],i))continue n;o.push(i)}}return o},t.invert=g,t.invoke=function(n,t){var r=kt.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
|
||||
return E(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},t.keys=Mt,t.map=S,t.max=N,t.memoize=function(n,t){var r={};return function(){var e=Q+(t?t.apply(this,arguments):arguments[0]);return _t.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},t.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=U(t,r),E(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r<u&&(u=r);return u},t.omit=function(n){var t=yt.apply(pt,kt.call(arguments,1)),r={};return It(n,function(n,e){0>$(t,e)&&(r[e]=n)
|
||||
}),r},t.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},t.pairs=function(n){for(var t=-1,r=Mt(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},t.partial=function(n){return e(n,kt.call(arguments,1))},t.pick=function(n){for(var t=-1,r=yt.apply(pt,kt.call(arguments,1)),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])}return u},t.pluck=B,t.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=Nt(0,gt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;
|
||||
return u},t.reject=function(n,t,r){return t=U(t,r),x(n,function(n,r,e){return!t(n,r,e)})},t.rest=I,t.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return E(n,function(n){var r=mt(Ft()*(++t+1));e[t]=e[r],e[r]=n}),e},t.sortBy=function(n,t,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=U(t,e),E(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},t.tap=function(n,t){return t(n),n},t.throttle=function(n,t){function r(){i=new Date,a=null,u=n.apply(o,e)
|
||||
}var e,u,o,i=0,a=null;return function(){var f=new Date,l=t-(f-i);return e=arguments,o=this,0<l?a||(a=dt(r,l)):(ht(a),a=null,i=f,u=n.apply(o,e)),u}},t.times=function(n,t,r){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=t.call(r,e);return u},t.toArray=function(n){return Dt(n)?kt.call(n):n&&typeof n.length=="number"?S(n):j(n)},t.union=function(n){return Dt(n)||(arguments[0]=n?kt.call(n):pt),C(yt.apply(pt,arguments))},t.uniq=C,t.values=j,t.where=R,t.without=function(n){return D(n,kt.call(arguments,1))},t.wrap=function(n,t){return function(){var r=[n];
|
||||
return bt.apply(r,arguments),t.apply(this,r)}},t.zip=function(n){for(var t=-1,r=n?N(B(arguments,"length")):0,e=Array(0>r?0:r);++t<r;)e[t]=B(arguments,t);return e},t.collect=S,t.drop=I,t.each=E,t.extend=p,t.methods=v,t.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},t.select=x,t.tail=I,t.unique=C,t.chain=function(n){return n=new a(n),n.__chain__=!0,n},t.clone=function(n){return _(n)?Dt(n)?kt.call(n):p({},n):n},t.contains=w,t.escape=function(n){return null==n?"":(n+"").replace(Z,i)
|
||||
},t.every=A,t.find=O,t.findWhere=function(n,t){return R(n,t,!0)},t.has=function(n,t){return n?_t.call(n,t):!1},t.identity=V,t.indexOf=$,t.isArguments=c,t.isArray=Dt,t.isBoolean=function(n){return!0===n||!1===n||jt.call(n)==et},t.isDate=function(n){return n?typeof n=="object"&&jt.call(n)==ut:!1},t.isElement=function(n){return n?1===n.nodeType:!1},t.isEmpty=h,t.isEqual=y,t.isFinite=function(n){return Ot(n)&&!Et(parseFloat(n))},t.isFunction=m,t.isNaN=function(n){return b(n)&&n!=+n},t.isNull=function(n){return null===n
|
||||
},t.isNumber=b,t.isObject=_,t.isRegExp=function(n){return!(!n||!lt[typeof n])&&jt.call(n)==at},t.isString=d,t.isUndefined=function(n){return typeof n=="undefined"},t.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Nt(0,e+r):Bt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},t.mixin=W,t.noConflict=function(){return n._=st,this},t.random=function(n,t){null==n&&null==t&&(t=1),n=+n||0,null==t?(t=n,n=0):t=+t||0;var r=Ft();return n%1||t%1?n+Bt(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+mt(r*(t-n+1))
|
||||
},t.reduce=F,t.reduceRight=k,t.result=function(n,t){var r=n?n[t]:null;return m(r)?n[t]():r},t.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Mt(n).length},t.some=q,t.sortedIndex=z,t.template=function(n,r,e){n||(n=""),e=s({},e,t.templateSettings);var u=0,i="__p+='",a=e.variable;n.replace(RegExp((e.escape||Y).source+"|"+(e.interpolate||Y).source+"|"+(e.evaluate||Y).source+"|$","g"),function(t,r,e,a,f){return i+=n.slice(u,f).replace(nt,o),r&&(i+="'+_['escape']("+r+")+'"),a&&(i+="';"+a+";__p+='"),e&&(i+="'+((__t=("+e+"))==null?'':__t)+'"),u=f+t.length,t
|
||||
}),i+="';\n",a||(a="obj",i="with("+a+"||{}){"+i+"}"),i="function("+a+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+i+"return __p}";try{var f=Function("_","return "+i)(t)}catch(l){throw l.source=i,l}return r?f(r):(f.source=i,f)},t.unescape=function(n){return null==n?"":(n+"").replace(X,l)},t.uniqueId=function(n){var t=++K+"";return n?n+t:t},t.all=A,t.any=q,t.detect=O,t.foldl=F,t.foldr=k,t.include=w,t.inject=F,t.first=M,t.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=U(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return kt.call(n,Nt(0,u-e))}},t.take=M,t.head=M,t.VERSION="1.2.1",W(t),t.prototype.chain=function(){return this.__chain__=!0,this},t.prototype.value=function(){return this.__wrapped__},E("pop push reverse shift sort splice unshift".split(" "),function(n){var r=pt[n];t.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),!Rt.spliceObjects&&0===n.length&&delete n[0],this
|
||||
}}),E(["concat","join","slice"],function(n){var r=pt[n];t.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new a(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=t, define(function(){return t})):G&&!G.nodeType?H?(H.exports=t)._=t:G._=t:n._=t}(this);
|
||||
;!function(n){function t(n,t){var r;if(n&&ht[typeof n])for(r in n)if(xt.call(n,r)&&t(n[r],r,n)===tt)break}function r(n,t){var r;if(n&&ht[typeof n])for(r in n)if(t(n[r],r,n)===tt)break}function e(n){var t,r=[];if(!n||!ht[typeof n])return r;for(t in n)xt.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new p(n)}function o(n,t,r){r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function i(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function a(n,t,r){function e(){var c=arguments,l=o?this:t;return u||(n=t[i]),r.length&&(c=c.length?(c=$t.call(c),a?c.concat(r):r.concat(c)):r),this instanceof e?(l=f(n.prototype),c=n.apply(l,c),w(c)?c:l):n.apply(l,c)}var u=j(n),o=!r,i=t;if(o){var a=void 0;r=t}else if(!u)throw new TypeError;return e}function f(n){return w(n)?kt(n):{}}function c(n){return Ut[n]}function l(n){return"\\"+yt[n]}function p(n){this.__wrapped__=n}function s(){}function v(n){return Vt[n]
|
||||
}function g(n){return St.call(n)==at}function h(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function y(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==L&&(n[u]=e[u])}return n}function m(n){var t=[];return r(n,function(n,r){j(n)&&t.push(r)}),t.sort()}function _(n){for(var t=-1,r=Pt(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function b(n){if(!n)return K;if(Ct(n)||x(n))return!n.length;
|
||||
for(var t in n)if(xt.call(n,t))return Q;return K}function d(n,t,e,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return Q;if(n==L||t==L)return n===t;if(a=St.call(n),i=St.call(t),a!=i)return Q;switch(a){case ct:case lt:return+n==+t;case pt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case vt:case gt:return n==t+""}if(i=a==ft,!i){if(n instanceof u||t instanceof u)return d(n.__wrapped__||n,t.__wrapped__||t,e,o);if(a!=st)return Q;
|
||||
var a=n.constructor,f=t.constructor;if(a!=f&&(!j(a)||!(a instanceof a&&j(f)&&f instanceof f)))return Q}for(e||(e=[]),o||(o=[]),a=e.length;a--;)if(e[a]==n)return o[a]==t;var c=K,l=0;if(e.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=d(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return xt.call(u,r)?(l++,!(c=xt.call(n,r)&&d(n[r],t,e,o))&&tt):void 0}),c&&r(n,function(n,t,r){return xt.call(r,t)?!(c=-1<--l)&&tt:void 0}),c}function j(n){return typeof n=="function"}function w(n){return!(!n||!ht[typeof n])
|
||||
}function A(n){return typeof n=="number"||St.call(n)==pt}function x(n){return typeof n=="string"||St.call(n)==gt}function O(n){for(var t=-1,r=Pt(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function E(n,r){var e=n?n.length:0,u=Q;return e&&typeof e=="number"?u=-1<o(n,r):t(n,function(n){return(u=n===r)&&tt}),u}function S(n,r,e){var u=K;r=G(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&(u=!!r(n[e],e,n)););else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&tt});return u}function N(n,r,e){var u=[];
|
||||
r=G(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o;){var i=n[e];r(i,e,n)&&u.push(i)}else t(n,function(n,t,e){r(n,t,e)&&u.push(n)});return u}function k(n,r,e){r=G(r,e),e=-1;var u=n?n.length:0;if(typeof u!="number"){var o;return t(n,function(n,t,e){return r(n,t,e)?(o=n,tt):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function B(n,r,e){var u=-1,o=n?n.length:0;if(r=r&&typeof e=="undefined"?r:G(r,e),typeof o=="number")for(;++u<o&&r(n[u],u,n)!==tt;);else t(n,r)}function F(n,r,e){var u=-1,o=n?n.length:0;
|
||||
if(r=G(r,e),typeof o=="number")for(var i=Array(o);++u<o;)i[u]=r(n[u],u,n);else i=[],t(n,function(n,t,e){i[++u]=r(n,t,e)});return i}function q(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=G(t,r),B(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r>u&&(u=r);return u}function R(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++r<e;)u[r]=n[r][t];return u||F(n,t)}function D(n,r,e,u){if(!n)return e;var o=3>arguments.length;r=G(r,u,4);var i=-1,a=n.length;
|
||||
if(typeof a=="number")for(o&&(e=n[++i]);++i<a;)e=r(e,n[i],i,n);else t(n,function(n,t,u){e=o?(o=Q,n):r(e,n,t,u)});return e}function M(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Pt(n),u=i.length;return t=G(t,e,4),B(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=Q,n[a]):t(r,n[a],a,f)}),r}function T(n,r,e){var u;r=G(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&!(u=r(n[e],e,n)););else t(n,function(n,t,e){return(u=r(n,t,e))&&tt});return!!u}function $(n,t,r){return r&&b(t)?L:(r?k:N)(n,t)
|
||||
}function I(n){for(var t=-1,r=n.length,e=wt.apply(mt,$t.call(arguments,1)),u=[];++t<r;){var i=n[t];0>o(e,i)&&u.push(i)}return u}function z(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=L){var o=-1;for(t=G(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==L||r)return n[0];return $t.call(n,0,Mt(Dt(0,e),u))}}function C(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Ct(o)?Ot.apply(u,t?o:C(o)):u.push(o)}return u}function P(n,t,r){if(typeof t!="number"&&t!=L){var e=0,u=-1,o=n?n.length:0;
|
||||
for(t=G(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==L||r?1:Dt(0,t);return $t.call(n,e)}function U(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?G(r,e,1):H,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function V(n,t,r,e){var u=-1,i=n?n.length:0,a=[],f=a;for(typeof t!="boolean"&&t!=L&&(e=r,r=t,t=Q),r!=L&&(f=[],r=G(r,e));++u<i;){e=n[u];var c=r?r(e,u,n):e;(t?!u||f[f.length-1]!==c:0>o(f,c))&&(r&&f.push(c),a.push(e))}return a}function W(n,t){return zt.fastBind||Nt&&2<arguments.length?Nt.call.apply(Nt,arguments):a(n,t,$t.call(arguments,2))
|
||||
}function G(n,t,r){if(n==L)return H;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Pt(n);return function(t){for(var r=u.length,e=Q;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t=="undefined"?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}}function H(n){return n}function J(n){B(m(n),function(t){var r=u[t]=n[t];u.prototype[t]=function(){var n=[this.__wrapped__];
|
||||
return Ot.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new p(n),n.__chain__=K),n}})}var K=!0,L=null,Q=!1,X=typeof exports=="object"&&exports,Y=typeof module=="object"&&module&&module.exports==X&&module,Z=typeof global=="object"&&global;(Z.global===Z||Z.window===Z)&&(n=Z);var nt=0,tt={},rt=+new Date+"",et=/&(?:amp|lt|gt|quot|#39);/g,ut=/($^)/,ot=/[&<>"']/g,it=/['\n\r\t\u2028\u2029\\]/g,at="[object Arguments]",ft="[object Array]",ct="[object Boolean]",lt="[object Date]",pt="[object Number]",st="[object Object]",vt="[object RegExp]",gt="[object String]",ht={"boolean":Q,"function":K,object:K,number:Q,string:Q,undefined:Q},yt={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},mt=Array.prototype,Z=Object.prototype,_t=n._,bt=RegExp("^"+(Z.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),dt=Math.ceil,jt=n.clearTimeout,wt=mt.concat,At=Math.floor,xt=Z.hasOwnProperty,Ot=mt.push,Et=n.setTimeout,St=Z.toString,Nt=bt.test(Nt=St.bind)&&Nt,kt=bt.test(kt=Object.create)&&kt,Bt=bt.test(Bt=Array.isArray)&&Bt,Ft=n.isFinite,qt=n.isNaN,Rt=bt.test(Rt=Object.keys)&&Rt,Dt=Math.max,Mt=Math.min,Tt=Math.random,$t=mt.slice,Z=bt.test(n.attachEvent),It=Nt&&!/\n|true/.test(Nt+Z),zt={};
|
||||
!function(){var n={0:1,length:1};zt.fastBind=Nt&&!It,zt.spliceObjects=(mt.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},kt||(f=function(n){if(w(n)){s.prototype=n;var t=new s;s.prototype=L}return t||{}}),p.prototype=u.prototype,g(arguments)||(g=function(n){return n?xt.call(n,"callee"):Q});var Ct=Bt||function(n){return n?typeof n=="object"&&St.call(n)==ft:Q},Pt=Rt?function(n){return w(n)?Rt(n):[]}:e,Ut={"&":"&","<":"<",">":">",'"':""","'":"'"},Vt=_(Ut);
|
||||
j(/x/)&&(j=function(n){return typeof n=="function"&&"[object Function]"==St.call(n)}),u.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},u.bind=W,u.bindAll=function(n){for(var t=1<arguments.length?wt.apply(mt,$t.call(arguments,1)):m(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=W(n[u],n)}return n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},u.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},u.countBy=function(n,t,r){var e={};return t=G(t,r),B(n,function(n,r,u){r=t(n,r,u)+"",xt.call(e,r)?e[r]++:e[r]=1}),e},u.debounce=function(n,t,r){function e(){a=L,r||(o=n.apply(i,u))}var u,o,i,a=L;return function(){var f=r&&!a;return u=arguments,i=this,jt(a),a=Et(e,t),f&&(o=n.apply(i,u)),o}},u.defaults=y,u.defer=function(n){var t=$t.call(arguments,1);return Et(function(){n.apply(void 0,t)},1)},u.delay=function(n,t){var r=$t.call(arguments,2);return Et(function(){n.apply(void 0,r)},t)},u.difference=I,u.filter=N,u.flatten=C,u.forEach=B,u.functions=m,u.groupBy=function(n,t,r){var e={};
|
||||
return t=G(t,r),B(n,function(n,r,u){r=t(n,r,u)+"",(xt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},u.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&t!=L){var o=u;for(t=G(t,r);o--&&t(n[o],o,n);)e++}else e=t==L||r?1:t||e;return $t.call(n,0,Mt(Dt(0,u-e),u))},u.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,i=[];n:for(;++e<u;){var a=n[e];if(0>o(i,a)){for(var f=r;--f;)if(0>o(t[f],a))continue n;i.push(a)}}return i},u.invert=_,u.invoke=function(n,t){var r=$t.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
|
||||
return B(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},u.keys=Pt,u.map=F,u.max=q,u.memoize=function(n,t){var r={};return function(){var e=rt+(t?t.apply(this,arguments):arguments[0]);return xt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},u.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=G(t,r),B(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r<u&&(u=r);return u},u.omit=function(n){var t=wt.apply(mt,$t.call(arguments,1)),e={};return r(n,function(n,r){0>o(t,r)&&(e[r]=n)
|
||||
}),e},u.once=function(n){var t,r;return function(){return t?r:(t=K,r=n.apply(this,arguments),n=L,r)}},u.pairs=function(n){for(var t=-1,r=Pt(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){return a(n,$t.call(arguments,1))},u.pick=function(n){for(var t=-1,r=wt.apply(mt,$t.call(arguments,1)),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])}return u},u.pluck=R,u.range=function(n,t,r){n=+n||0,r=+r||1,t==L&&(t=n,n=0);var e=-1;t=Dt(0,dt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;
|
||||
return u},u.reject=function(n,t,r){return t=G(t,r),N(n,function(n,r,e){return!t(n,r,e)})},u.rest=P,u.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return B(n,function(n){var r=At(Tt()*(++t+1));e[t]=e[r],e[r]=n}),e},u.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0);for(t=G(t,r),B(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(i);u--;)o[u]=o[u].c;return o},u.tap=function(n,t){return t(n),n},u.throttle=function(n,t){function r(){i=new Date,a=L,u=n.apply(o,e)
|
||||
}var e,u,o,i=0,a=L;return function(){var f=new Date,c=t-(f-i);return e=arguments,o=this,0<c?a||(a=Et(r,c)):(jt(a),a=L,i=f,u=n.apply(o,e)),u}},u.times=function(n,t,r){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=t.call(r,e);return u},u.toArray=function(n){return Ct(n)?$t.call(n):n&&typeof n.length=="number"?F(n):O(n)},u.union=function(n){return Ct(n)||(arguments[0]=n?$t.call(n):mt),V(wt.apply(mt,arguments))},u.uniq=V,u.values=O,u.where=$,u.without=function(n){return I(n,$t.call(arguments,1))},u.wrap=function(n,t){return function(){var r=[n];
|
||||
return Ot.apply(r,arguments),t.apply(this,r)}},u.zip=function(n){for(var t=-1,r=n?q(R(arguments,"length")):0,e=Array(0>r?0:r);++t<r;)e[t]=R(arguments,t);return e},u.collect=F,u.drop=P,u.each=B,u.extend=h,u.methods=m,u.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},u.select=N,u.tail=P,u.unique=V,u.chain=function(n){return n=new p(n),n.__chain__=K,n},u.clone=function(n){return w(n)?Ct(n)?$t.call(n):h({},n):n},u.contains=E,u.escape=function(n){return n==L?"":(n+"").replace(ot,c)
|
||||
},u.every=S,u.find=k,u.findWhere=function(n,t){return $(n,t,K)},u.has=function(n,t){return n?xt.call(n,t):Q},u.identity=H,u.indexOf=function(n,t,r){if(typeof r=="number"){var e=n?n.length:0;r=0>r?Dt(0,e+r):r||0}else if(r)return r=U(n,t),n[r]===t?r:-1;return n?o(n,t,r):-1},u.isArguments=g,u.isArray=Ct,u.isBoolean=function(n){return n===K||n===Q||St.call(n)==ct},u.isDate=function(n){return n?typeof n=="object"&&St.call(n)==lt:Q},u.isElement=function(n){return n?1===n.nodeType:Q},u.isEmpty=b,u.isEqual=d,u.isFinite=function(n){return Ft(n)&&!qt(parseFloat(n))
|
||||
},u.isFunction=j,u.isNaN=function(n){return A(n)&&n!=+n},u.isNull=function(n){return n===L},u.isNumber=A,u.isObject=w,u.isRegExp=function(n){return!(!n||!ht[typeof n])&&St.call(n)==vt},u.isString=x,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Dt(0,e+r):Mt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=J,u.noConflict=function(){return n._=_t,this},u.random=function(n,t){n==L&&t==L&&(t=1),n=+n||0,t==L?(t=n,n=0):t=+t||0;
|
||||
var r=Tt();return n%1||t%1?n+Mt(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+At(r*(t-n+1))},u.reduce=D,u.reduceRight=M,u.result=function(n,t){var r=n?n[t]:L;return j(r)?n[t]():r},u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Pt(n).length},u.some=T,u.sortedIndex=U,u.template=function(n,t,r){n||(n=""),r=y({},r,u.templateSettings);var e=0,o="__p+='",i=r.variable;n.replace(RegExp((r.escape||ut).source+"|"+(r.interpolate||ut).source+"|"+(r.evaluate||ut).source+"|$","g"),function(t,r,u,i,a){return o+=n.slice(e,a).replace(it,l),r&&(o+="'+_['escape']("+r+")+'"),i&&(o+="';"+i+";__p+='"),u&&(o+="'+((__t=("+u+"))==null?'':__t)+'"),e=a+t.length,t
|
||||
}),o+="';\n",i||(i="obj",o="with("+i+"||{}){"+o+"}"),o="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";try{var a=Function("_","return "+o)(u)}catch(f){throw f.source=o,f}return t?a(t):(a.source=o,a)},u.unescape=function(n){return n==L?"":(n+"").replace(et,v)},u.uniqueId=function(n){var t=++nt+"";return n?n+t:t},u.all=S,u.any=T,u.detect=k,u.foldl=D,u.foldr=M,u.include=E,u.inject=D,u.first=z,u.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&t!=L){var o=u;for(t=G(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==L||r)return n[u-1];return $t.call(n,Dt(0,u-e))}},u.take=z,u.head=z,u.VERSION="1.2.1",J(u),u.prototype.chain=function(){return this.__chain__=K,this},u.prototype.value=function(){return this.__wrapped__},B("pop push reverse shift sort splice unshift".split(" "),function(n){var t=mt[n];u.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!zt.spliceObjects&&0===n.length&&delete n[0],this}}),B(["concat","join","slice"],function(n){var t=mt[n];
|
||||
u.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new p(n),n.__chain__=K),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=u, define(function(){return u})):X&&!X.nodeType?Y?(Y.exports=u)._=u:X._=u:n._=u}(this);
|
||||
220
doc/README.md
220
doc/README.md
@@ -217,7 +217,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3460 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3508 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
||||
|
||||
@@ -241,7 +241,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3490 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3538 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -266,7 +266,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findindexarray--callbackidentity-thisarg"></a>`_.findIndex(array [, callback=identity, thisArg])`
|
||||
<a href="#_findindexarray--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3526 "View in source") [Ⓣ][1]
|
||||
<a href="#_findindexarray--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3574 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.find`, except that it returns the index of the element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -294,7 +294,7 @@ _.findIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_firstarray--callbackn-thisarg"></a>`_.first(array [, callback|n, thisArg])`
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3596 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3644 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the first element of the `array`. If a number `n` is passed, the first `n` elements of the `array` are returned. If a `callback` function is passed, elements at the beginning of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -354,7 +354,7 @@ _.first(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_flattenarray--isshallowfalse-callbackidentity-thisarg"></a>`_.flatten(array [, isShallow=false, callback=identity, thisArg])`
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3658 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3706 "View in source") [Ⓣ][1]
|
||||
|
||||
Flattens a nested array *(the nesting can be to any depth)*. If `isShallow` is truthy, `array` will only be flattened a single level. If `callback` is passed, each element of `array` is passed through a `callback` before flattening. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -397,7 +397,7 @@ _.flatten(stooges, 'quotes');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3711 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3750 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
|
||||
|
||||
@@ -429,7 +429,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--callbackn1-thisarg"></a>`_.initial(array [, callback|n=1, thisArg])`
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3785 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3817 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last element of `array`. If a number `n` is passed, the last `n` elements are excluded from the result. If a `callback` function is passed, elements at the end of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -486,7 +486,7 @@ _.initial(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3819 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3851 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -510,7 +510,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--callbackn-thisarg"></a>`_.last(array [, callback|n, thisArg])`
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3903 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3935 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last element of the `array`. If a number `n` is passed, the last `n` elements of the `array` are returned. If a `callback` function is passed, elements at the end of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments;(value, index, array).
|
||||
|
||||
@@ -567,7 +567,7 @@ _.last(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3944 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3976 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -596,7 +596,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3985 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4017 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
|
||||
|
||||
@@ -634,7 +634,7 @@ _.range(0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--callbackn1-thisarg"></a>`_.rest(array [, callback|n=1, thisArg])`
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4064 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4096 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.initial`, this method gets all but the first value of `array`. If a number `n` is passed, the first `n` values are excluded from the result. If a `callback` function is passed, elements at the beginning of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -694,7 +694,7 @@ _.rest(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callbackidentity-thisarg"></a>`_.sortedIndex(array, value [, callback=identity, thisArg])`
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4128 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4160 "View in source") [Ⓣ][1]
|
||||
|
||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -743,7 +743,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4160 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4192 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -767,9 +767,9 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqarray--issortedfalse-callbackidentity-thisarg"></a>`_.uniq(array [, isSorted=false, callback=identity, thisArg])`
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4210 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4242 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a `callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through the `callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
If a property name is passed for `callback`, the created "_.pluck" style callback will return the property value of the given element.
|
||||
|
||||
@@ -795,11 +795,11 @@ _.uniq([1, 2, 1, 3, 1]);
|
||||
_.uniq([1, 1, 2, 2, 3], true);
|
||||
// => [1, 2, 3]
|
||||
|
||||
_.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
|
||||
// => [1, 2, 3]
|
||||
_.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
|
||||
// => ['A', 'b', 'C']
|
||||
|
||||
_.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
||||
// => [1, 2, 3]
|
||||
_.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
|
||||
// => [1, 2.5, 3]
|
||||
|
||||
// using "_.pluck" callback shorthand
|
||||
_.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
@@ -814,7 +814,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unziparray"></a>`_.unzip(array)`
|
||||
<a href="#_unziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4262 "View in source") [Ⓣ][1]
|
||||
<a href="#_unziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4280 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.zip`, this method splits groups of elements into arrays composed of elements from each group at their corresponding indexes.
|
||||
|
||||
@@ -838,7 +838,7 @@ _.unzip([['moe', 30, true], ['larry', 40, false]]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4288 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4306 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -863,7 +863,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4308 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4326 "View in source") [Ⓣ][1]
|
||||
|
||||
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
||||
|
||||
@@ -887,7 +887,7 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_zipobjectkeys--values"></a>`_.zipObject(keys [, values=[]])`
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4330 "View in source") [Ⓣ][1]
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4348 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
||||
|
||||
@@ -978,7 +978,7 @@ _.isArray(squares.value());
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5407 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5425 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
||||
|
||||
@@ -1008,7 +1008,7 @@ _([1, 2, 3, 4])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypetostring"></a>`_.prototype.toString()`
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5424 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5442 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -1029,7 +1029,7 @@ _([1, 2, 3]).toString();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5441 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5459 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1060,7 +1060,7 @@ _([1, 2, 3]).valueOf();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_atcollection--index1-index2-"></a>`_.at(collection [, index1, index2, ...])`
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2449 "View in source") [Ⓣ][1]
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2497 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements from the specified indexes, or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
|
||||
|
||||
@@ -1088,7 +1088,7 @@ _.at(['moe', 'larry', 'curly'], 0, 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_containscollection-target--fromindex0"></a>`_.contains(collection, target [, fromIndex=0])`
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2491 "View in source") [Ⓣ][1]
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2539 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -1126,7 +1126,7 @@ _.contains('curly', 'ur');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_countbycollection--callbackidentity-thisarg"></a>`_.countBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2545 "View in source") [Ⓣ][1]
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2593 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the given `callback`. The corresponding value of each key is the number of times the key was returned by the `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1162,7 +1162,7 @@ _.countBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2597 "View in source") [Ⓣ][1]
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2645 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1208,7 +1208,7 @@ _.every(stooges, { 'age': 50 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2658 "View in source") [Ⓣ][1]
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2706 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1254,7 +1254,7 @@ _.filter(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findcollection--callbackidentity-thisarg"></a>`_.find(collection [, callback=identity, thisArg])`
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2725 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2773 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning the first that the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1303,7 +1303,7 @@ _.find(food, 'organic');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_foreachcollection--callbackidentity-thisarg"></a>`_.forEach(collection [, callback=identity, thisArg])`
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2772 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2820 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -1335,7 +1335,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbycollection--callbackidentity-thisarg"></a>`_.groupBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2822 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2870 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1372,7 +1372,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2855 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2903 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function, it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||
|
||||
@@ -1401,7 +1401,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mapcollection--callbackidentity-thisarg"></a>`_.map(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2907 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2955 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of values by running each element in the `collection` through the `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1446,7 +1446,7 @@ _.map(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxcollection--callbackidentity-thisarg"></a>`_.max(collection [, callback=identity, thisArg])`
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2964 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3012 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1488,7 +1488,7 @@ _.max(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mincollection--callbackidentity-thisarg"></a>`_.min(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3033 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3081 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1530,7 +1530,7 @@ _.min(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3083 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3131 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1560,7 +1560,7 @@ _.pluck(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducecollection--callbackidentity-accumulator-thisarg"></a>`_.reduce(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3115 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3163 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a `collection` to a value which is the accumulated result of running each element in the `collection` through the `callback`, where each successive `callback` execution consumes the return value of the previous execution. If `accumulator` is not passed, the first element of the `collection` will be used as the initial `accumulator` value. The `callback` is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*.
|
||||
|
||||
@@ -1598,7 +1598,7 @@ var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducerightcollection--callbackidentity-accumulator-thisarg"></a>`_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3158 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3206 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
|
||||
|
||||
@@ -1629,7 +1629,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rejectcollection--callbackidentity-thisarg"></a>`_.reject(collection [, callback=identity, thisArg])`
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3218 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3266 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
|
||||
|
||||
@@ -1672,7 +1672,7 @@ _.reject(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3239 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3287 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -1696,7 +1696,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3272 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3320 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
||||
|
||||
@@ -1726,7 +1726,7 @@ _.size('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3319 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3367 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1772,7 +1772,7 @@ _.some(food, { 'type': 'meat' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection--callbackidentity-thisarg"></a>`_.sortBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3375 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3423 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements, sorted in ascending order by the results of running each element in the `collection` through the `callback`. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1809,7 +1809,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3410 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3458 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -1833,7 +1833,7 @@ Converts the `collection` to an array.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3442 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3490 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements that have the given `properties`. When checking `properties`, this method performs a deep comparison between values to determine if they are equivalent to each other.
|
||||
|
||||
@@ -1870,7 +1870,7 @@ _.where(stooges, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4370 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4388 "View in source") [Ⓣ][1]
|
||||
|
||||
If `n` is greater than `0`, a function is created that is restricted to executing `func`, with the `this` binding and arguments of the created function, only after it is called `n` times. If `n` is less than `1`, `func` is executed immediately, without a `this` binding or additional arguments, and its result is returned.
|
||||
|
||||
@@ -1898,7 +1898,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4403 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4421 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
|
||||
|
||||
@@ -1929,7 +1929,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4434 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4452 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods on `object` to `object`, 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 the function properties of `object` will be bound.
|
||||
|
||||
@@ -1960,7 +1960,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4480 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4498 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
|
||||
@@ -2001,7 +2001,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4503 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4521 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
|
||||
|
||||
@@ -2028,7 +2028,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity-thisarg-argcount3"></a>`_.createCallback([func=identity, thisArg, argCount=3])`
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4562 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4580 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a callback bound to an optional `thisArg`. If `func` is a property name, the created callback will return the property value for a given element. If `func` is an object, the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`.
|
||||
|
||||
@@ -2082,7 +2082,7 @@ _.toLookup(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-options"></a>`_.debounce(func, wait, options)`
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4638 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4656 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass an `options` object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -2115,7 +2115,7 @@ jQuery('#postbox').on('click', _.debounce(sendMail, 200, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4691 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4709 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2140,7 +2140,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4717 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4735 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2167,7 +2167,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4741 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4759 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
|
||||
|
||||
@@ -2193,7 +2193,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4771 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4789 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2219,7 +2219,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4806 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4824 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `_.bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2246,7 +2246,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4837 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4855 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2283,7 +2283,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait-options"></a>`_.throttle(func, wait, options)`
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4870 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4888 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. Pass an `options` object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2315,7 +2315,7 @@ jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4935 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4953 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2351,7 +2351,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_assignobject--source1-source2--callback-thisarg"></a>`_.assign(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1205 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1253 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a `callback` function is passed, it will be executed to produce the assigned values. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -2389,7 +2389,7 @@ defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue--deepfalse-callback-thisarg"></a>`_.clone(value [, deep=false, callback, thisArg])`
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1260 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1308 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2436,7 +2436,7 @@ clone.childNodes.length;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonedeepvalue--callback-thisarg"></a>`_.cloneDeep(value [, callback, thisArg])`
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1385 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1433 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a deep clone of `value`. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2482,7 +2482,7 @@ clone.node == view.node;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject--source1-source2-"></a>`_.defaults(object [, source1, source2, ...])`
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1409 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1457 "View in source") [Ⓣ][1]
|
||||
|
||||
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 will be ignored.
|
||||
|
||||
@@ -2508,7 +2508,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findkeyobject--callbackidentity-thisarg"></a>`_.findKey(object [, callback=identity, thisArg])`
|
||||
<a href="#_findkeyobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1431 "View in source") [Ⓣ][1]
|
||||
<a href="#_findkeyobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1479 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.find`, except that it returns the key of the element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -2536,7 +2536,7 @@ _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinobject--callbackidentity-thisarg"></a>`_.forIn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1472 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1520 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2572,7 +2572,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownobject--callbackidentity-thisarg"></a>`_.forOwn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1497 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1545 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over an object's own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2600,7 +2600,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1514 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1562 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -2627,7 +2627,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1539 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1587 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -2652,7 +2652,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invertobject"></a>`_.invert(object)`
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1556 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1604 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given `object`.
|
||||
|
||||
@@ -2676,7 +2676,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1068 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1116 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -2703,7 +2703,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1094 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1142 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -2730,7 +2730,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1582 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1630 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -2754,7 +2754,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1599 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1647 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -2778,7 +2778,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1616 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1664 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -2802,7 +2802,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1641 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1689 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
||||
|
||||
@@ -2832,7 +2832,7 @@ _.isEmpty('');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b--callback-thisarg"></a>`_.isEqual(a, b [, callback, thisArg])`
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1700 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1748 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If `callback` is passed, it will be executed to compare values. If `callback` returns `undefined`, comparisons will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(a, b)*.
|
||||
|
||||
@@ -2877,7 +2877,7 @@ _.isEqual(words, otherWords, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1881 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1929 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is, or can be coerced to, a finite number.
|
||||
|
||||
@@ -2915,7 +2915,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1898 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1946 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -2939,7 +2939,7 @@ _.isFunction(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1961 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2009 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `NaN`.
|
||||
|
||||
@@ -2974,7 +2974,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1983 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2031 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -3001,7 +3001,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2000 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2048 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -3025,7 +3025,7 @@ _.isNumber(8.4 * 5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1928 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1976 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
|
||||
|
||||
@@ -3055,7 +3055,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2028 "View in source") [Ⓣ][1]
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2076 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `value` is an object created by the `Object` constructor.
|
||||
|
||||
@@ -3090,7 +3090,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2053 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2101 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -3114,7 +3114,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2070 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2118 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -3138,7 +3138,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2087 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2135 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -3162,7 +3162,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1127 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1175 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of `object`.
|
||||
|
||||
@@ -3186,7 +3186,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mergeobject--source1-source2--callback-thisarg"></a>`_.merge(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2146 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2194 "View in source") [Ⓣ][1]
|
||||
|
||||
Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined`, into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a `callback` function is passed, it will be executed to produce the merged values of the destination and source properties. If `callback` returns `undefined`, merging will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -3242,7 +3242,7 @@ _.merge(food, otherFood, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_omitobject-callback-prop1-prop2--thisarg"></a>`_.omit(object, callback|[prop1, prop2, ..., thisArg])`
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2255 "View in source") [Ⓣ][1]
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2303 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a `callback` function is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3273,7 +3273,7 @@ _.omit({ 'name': 'moe', 'age': 40 }, function(value) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2289 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2337 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -3297,7 +3297,7 @@ _.pairs({ 'moe': 30, 'larry': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2327 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2375 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3328,7 +3328,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_transformcollection--callbackidentity-accumulator-thisarg"></a>`_.transform(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_transformcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2381 "View in source") [Ⓣ][1]
|
||||
<a href="#_transformcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2429 "View in source") [Ⓣ][1]
|
||||
|
||||
Transforms an `object` to an new `accumulator` object which is the result of running each of its elements through the `callback`, with each `callback` execution potentially mutating the `accumulator` object. The `callback`is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -3365,7 +3365,7 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2414 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2462 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -3396,7 +3396,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4959 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4977 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3420,7 +3420,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4977 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4995 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3445,7 +3445,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5003 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5021 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3475,7 +3475,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5032 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5050 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3495,7 +3495,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue--radix"></a>`_.parseInt(value [, radix])`
|
||||
<a href="#_parseintvalue--radix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5056 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue--radix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5074 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the given `value` into an integer of the specified `radix`. If `radix` is `undefined` or `0`, a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used.
|
||||
|
||||
@@ -3522,7 +3522,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5079 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5097 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
||||
|
||||
@@ -3550,7 +3550,7 @@ _.random(5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5123 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5141 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey, then `undefined` is returned.
|
||||
|
||||
@@ -3603,7 +3603,7 @@ Create a new `lodash` function using the given `context` object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5207 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5225 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3685,7 +3685,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5332 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5350 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -3717,7 +3717,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5359 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5377 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3741,7 +3741,7 @@ _.unescape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5379 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5397 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3794,7 +3794,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5621 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5639 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
|
||||
10
lodash.js
10
lodash.js
@@ -4200,7 +4200,7 @@
|
||||
* Creates a duplicate-value-free version of the `array` using strict equality
|
||||
* for comparisons, i.e. `===`. If the `array` is already sorted, passing `true`
|
||||
* for `isSorted` will run a faster algorithm. If `callback` is passed, each
|
||||
* element of `array` is passed through a `callback` before uniqueness is computed.
|
||||
* element of `array` is passed through the `callback` before uniqueness is computed.
|
||||
* The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array).
|
||||
*
|
||||
* If a property name is passed for `callback`, the created "_.pluck" style
|
||||
@@ -4229,11 +4229,11 @@
|
||||
* _.uniq([1, 1, 2, 2, 3], true);
|
||||
* // => [1, 2, 3]
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); });
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq(['A', 'b', 'C', 'a', 'B', 'c'], function(letter) { return letter.toLowerCase(); });
|
||||
* // => ['A', 'b', 'C']
|
||||
*
|
||||
* _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2, 3]
|
||||
* _.uniq([1, 2.5, 3, 1.5, 2, 3.5], function(num) { return this.floor(num); }, Math);
|
||||
* // => [1, 2.5, 3]
|
||||
*
|
||||
* // using "_.pluck" callback shorthand
|
||||
* _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
|
||||
Reference in New Issue
Block a user