mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-31 23:37:49 +00:00
Ensure _.keys use in createIterator is consistent per build.
Former-commit-id: a4e0aef177d4d1c26ed5ce088574b591a6666d0d
This commit is contained in:
41
build.js
41
build.js
@@ -98,8 +98,8 @@
|
||||
'every': ['createCallback', 'isArray'],
|
||||
'filter': ['createCallback', 'isArray'],
|
||||
'find': ['createCallback', 'forEach', 'isArray'],
|
||||
'findIndex': [],
|
||||
'findKey': [],
|
||||
'findIndex': ['createCallback'],
|
||||
'findKey': ['createCallback'],
|
||||
'first': [],
|
||||
'flatten': ['createCallback', 'isArray'],
|
||||
'forEach': ['createCallback', 'isArguments', 'isArray', 'isString'],
|
||||
@@ -190,10 +190,12 @@
|
||||
'arrays',
|
||||
'bottom',
|
||||
'firstArg',
|
||||
'init',
|
||||
'loop',
|
||||
'shadowedProps',
|
||||
'top',
|
||||
'useHas'
|
||||
'useHas',
|
||||
'useKeys'
|
||||
];
|
||||
|
||||
/** List of all Lo-Dash methods */
|
||||
@@ -923,16 +925,19 @@
|
||||
*
|
||||
* @private
|
||||
* @param {String} source The source to process.
|
||||
* @param {String} varName The name of the variable to remove.
|
||||
* @param {String} identifier The name of the variable or property to remove.
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeFromCreateIterator(source, varName) {
|
||||
var snippet = matchFunction(source, 'createIterator');
|
||||
function removeFromCreateIterator(source, identifier) {
|
||||
var snippet = matchFunction(source, 'createIterator');
|
||||
if (!snippet) {
|
||||
return source;
|
||||
}
|
||||
// remove data object property assignment
|
||||
var modified = snippet.replace(RegExp("^(?: *\\/\\/.*\\n)* *'" + varName + "': *" + varName + '.+\\n+', 'm'), '');
|
||||
var modified = snippet
|
||||
.replace(RegExp("^(?: *\\/\\/.*\\n)* *'" + identifier + "':.+\\n+", 'm'), '')
|
||||
.replace(/,(?=\s*})/, '');
|
||||
|
||||
source = source.replace(snippet, function() {
|
||||
return modified;
|
||||
});
|
||||
@@ -941,7 +946,7 @@
|
||||
snippet = modified.match(/Function\([\s\S]+$/)[0];
|
||||
|
||||
modified = snippet
|
||||
.replace(RegExp('\\b' + varName + '\\b,? *', 'g'), '')
|
||||
.replace(RegExp('\\b' + identifier + '\\b,? *', 'g'), '')
|
||||
.replace(/, *',/, "',")
|
||||
.replace(/,\s*\)/, ')')
|
||||
|
||||
@@ -1019,12 +1024,11 @@
|
||||
* @returns {String} Returns the modified source.
|
||||
*/
|
||||
function removeKeysOptimization(source) {
|
||||
source = removeVar(source, 'isJSC');
|
||||
source = removeSupportProp(source, 'fastKeys');
|
||||
source = removeFromCreateIterator(source, 'useKeys');
|
||||
|
||||
// remove optimized branch in `iteratorTemplate`
|
||||
source = source.replace(getIteratorTemplate(source), function(match) {
|
||||
return match.replace(/^(?: *\/\/.*\n)* *["']( *)<% *if *\(support\.fastKeys[\s\S]+?["']\1<% *} *else *{ *%>.+\n([\s\S]+?) *["']\1<% *} *%>.+/m, "'\\n' +\n$2");
|
||||
return match.replace(/^(?: *\/\/.*\n)* *["']( *)<% *if *\(useHas *&& *useKeys[\s\S]+?["']\1<% *} *else *{ *%>.+\n([\s\S]+?) *["']\1<% *} *%>.+/m, "'\\n' +\n$2");
|
||||
});
|
||||
|
||||
return source;
|
||||
@@ -1826,7 +1830,7 @@
|
||||
source = replaceVar(source, varName, 'false');
|
||||
});
|
||||
|
||||
_.each(['argsClass', 'fastBind', 'fastKeys'], function(propName) {
|
||||
_.each(['argsClass', 'fastBind'], function(propName) {
|
||||
source = replaceSupportProp(source, propName, 'false');
|
||||
});
|
||||
|
||||
@@ -2484,17 +2488,20 @@
|
||||
if (!isRemoved(source, 'keys')) {
|
||||
source = source.replace(
|
||||
matchFunction(source, 'keys').replace(/[\s\S]+?var keys *= */, ''),
|
||||
matchFunction(source, 'shimKeys').replace(/[\s\S]+?function shimKeys/, 'function').replace(/}\n$/, '};\n')
|
||||
matchFunction(source, 'shimKeys').replace(/[\s\S]+?var shimKeys *= */, '')
|
||||
);
|
||||
|
||||
source = removeFunction(source, 'shimKeys');
|
||||
}
|
||||
// replace `_.isArguments` with fallback
|
||||
if (!isRemoved(source, 'isArguments')) {
|
||||
source = source.replace(
|
||||
matchFunction(source, 'isArguments').replace(/[\s\S]+?function isArguments/, ''),
|
||||
getIsArgumentsFallback(source).match(/isArguments *= *function([\s\S]+?) *};/)[1] + ' }\n'
|
||||
);
|
||||
source = source.replace(matchFunction(source, 'isArguments').replace(/[\s\S]+?function isArguments/, ''), function() {
|
||||
var fallback = getIsArgumentsFallback(source),
|
||||
body = fallback.match(/isArguments *= *function([\s\S]+? *});/)[1],
|
||||
indent = getIndent(fallback);
|
||||
|
||||
return body.replace(RegExp('^' + indent, 'gm'), indent.slice(0, -2)) + '\n';
|
||||
});
|
||||
|
||||
source = removeIsArgumentsFallback(source);
|
||||
}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
'isString',
|
||||
'iterable',
|
||||
'length',
|
||||
'keys',
|
||||
'lodash',
|
||||
'nativeKeys',
|
||||
'object',
|
||||
'objectTypes',
|
||||
'ownIndex',
|
||||
@@ -39,10 +39,12 @@
|
||||
'arrays',
|
||||
'bottom',
|
||||
'firstArg',
|
||||
'init',
|
||||
'loop',
|
||||
'shadowedProps',
|
||||
'top',
|
||||
'useHas'
|
||||
'useHas',
|
||||
'useKeys'
|
||||
];
|
||||
|
||||
/** Used to minify variables and string values to a single character */
|
||||
|
||||
314
dist/lodash.compat.js
vendored
314
dist/lodash.compat.js
vendored
@@ -186,7 +186,6 @@
|
||||
|
||||
/** Detect various environments */
|
||||
var isIeOpera = reNative.test(context.attachEvent),
|
||||
isJSC = !/\n{2,}/.test(Function()),
|
||||
isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);
|
||||
|
||||
/** Used to lookup a built-in constructor by [[Class]] */
|
||||
@@ -303,14 +302,6 @@
|
||||
*/
|
||||
support.fastBind = nativeBind && !isV8;
|
||||
|
||||
/**
|
||||
* Detect if `Object.keys` exists and is inferred to be fast (Firefox, IE, Opera, V8).
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
*/
|
||||
support.fastKeys = nativeKeys && (isIeOpera || isV8 || !isJSC);
|
||||
|
||||
/**
|
||||
* Detect if own properties are iterated after inherited properties (all but IE < 9).
|
||||
*
|
||||
@@ -453,7 +444,9 @@
|
||||
|
||||
var __p = 'var index, iterable = ' +
|
||||
(obj.firstArg) +
|
||||
', result = iterable;\nif (!iterable) return result;\n' +
|
||||
', result = ' +
|
||||
(obj.init) +
|
||||
';\nif (!iterable) return result;\n' +
|
||||
(obj.top) +
|
||||
';\n';
|
||||
if (obj.arrays) {
|
||||
@@ -476,8 +469,8 @@
|
||||
__p += '\n var skipProto = typeof iterable == \'function\';\n ';
|
||||
}
|
||||
|
||||
if (support.fastKeys && obj.useHas) {
|
||||
__p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n ';
|
||||
if (obj.useHas && obj.useKeys) {
|
||||
__p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? keys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n ';
|
||||
if (support.enumPrototypes) {
|
||||
__p += 'if (!(skipProto && index == \'prototype\')) {\n ';
|
||||
}
|
||||
@@ -716,9 +709,11 @@
|
||||
// iterator options
|
||||
'arrays': 'isArray(iterable)',
|
||||
'bottom': '',
|
||||
'init': 'iterable',
|
||||
'loop': '',
|
||||
'top': '',
|
||||
'useHas': true
|
||||
'useHas': true,
|
||||
'useKeys': !!keys
|
||||
};
|
||||
|
||||
// merge options into a template data object
|
||||
@@ -732,14 +727,14 @@
|
||||
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
'hasOwnProperty, isArguments, isArray, isString, lodash, ' +
|
||||
'objectTypes, nativeKeys',
|
||||
'hasOwnProperty, isArguments, isArray, isString, keys, ' +
|
||||
'lodash, objectTypes',
|
||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||
);
|
||||
// return the compiled function
|
||||
return factory(
|
||||
hasOwnProperty, isArguments, isArray, isString, lodash,
|
||||
objectTypes, nativeKeys
|
||||
hasOwnProperty, isArguments, isArray, isString, keys,
|
||||
lodash, objectTypes
|
||||
);
|
||||
}
|
||||
|
||||
@@ -817,6 +812,63 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor) && (support.nodeClass || !isNode(value))) || ctor instanceof ctor) {
|
||||
// IE < 9 iterates inherited properties before own properties. If the first
|
||||
// iterated property is an object's own property then there are no inherited
|
||||
// enumerable properties.
|
||||
if (support.ownLast) {
|
||||
forIn(value, function(value, key, object) {
|
||||
result = hasOwnProperty.call(object, key);
|
||||
return false;
|
||||
});
|
||||
return result === true;
|
||||
}
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @type Function
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
var shimKeys = createIterator({
|
||||
'args': 'object',
|
||||
'init': '[]',
|
||||
'top': 'if (!(objectTypes[typeof object])) return result',
|
||||
'loop': 'result.push(index)',
|
||||
'arrays': false
|
||||
});
|
||||
|
||||
/**
|
||||
* Slices the `collection` from the `start` index up to, but not including,
|
||||
* the `end` index.
|
||||
@@ -884,92 +936,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(collection, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
if (callback(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
|
||||
|
||||
/**
|
||||
* Checks if `value` is an array.
|
||||
*
|
||||
@@ -1016,62 +982,6 @@
|
||||
return nativeKeys(object);
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor) && (support.nodeClass || !isNode(value))) || ctor instanceof ctor) {
|
||||
// IE < 9 iterates inherited properties before own properties. If the first
|
||||
// iterated property is an object's own property then there are no inherited
|
||||
// enumerable properties.
|
||||
if (support.ownLast) {
|
||||
forIn(value, function(value, key, object) {
|
||||
result = hasOwnProperty.call(object, key);
|
||||
return false;
|
||||
});
|
||||
return result === true;
|
||||
}
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
function shimKeys(object) {
|
||||
var result = [];
|
||||
forOwn(object, function(value, key) {
|
||||
result.push(key);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to convert characters to HTML entities:
|
||||
*
|
||||
@@ -1329,6 +1239,92 @@
|
||||
*/
|
||||
var defaults = createIterator(defaultsIteratorOptions);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(collection, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
if (callback(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
|
||||
|
||||
/**
|
||||
* Creates a sorted array of all enumerable properties, own and inherited,
|
||||
* of `object` that have function values.
|
||||
|
||||
80
dist/lodash.compat.min.js
vendored
80
dist/lodash.compat.min.js
vendored
@@ -4,43 +4,43 @@
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&!ve(n)&&Vt.call(n,"__wrapped__")?n:new L(n)}function B(n,t,e){var r=n.length,u=r-t>=e;if(u){var a={};for(e=t-1;++e<r;){var o=Ft(n[e]);(Vt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=Ft(e);return Vt.call(a,r)&&-1<mt(a[r],e)}return-1<mt(n,e,t)}}function F(n){return n.charCodeAt(0)}function q(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 R(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=U(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(M.prototype=n.prototype,c=new M,M.prototype=null,f=n.apply(c,f),nt(f)?f:c):n.apply(c,f)}var a=Z(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function T(){for(var n,t={f:_,b:"k(m)",c:"",e:"",g:"",h:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=It,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.g+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",ce.unindexedChars&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.e+"}}else{"):ce.nonEnumArgs&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.e+"}}else{"),ce.enumPrototypes&&(r+="var v=typeof m=='function';"),ce.fastKeys&&t.h?(r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];",ce.enumPrototypes&&(r+="if(!(v&&i=='prototype')){"),r+=t.e,ce.enumPrototypes&&(r+="}")):(r+="for(i in m){",(ce.enumPrototypes||t.h)&&(r+="if(",ce.enumPrototypes&&(r+="!(v&&i=='prototype')"),ce.enumPrototypes&&t.h&&(r+="&&"),t.h&&(r+="h.call(m,i)"),r+="){"),r+=t.e+";",(ce.enumPrototypes||t.h)&&(r+="}")),r+="}",ce.nonEnumShadows){r+="var f=m.constructor;";
|
||||
for(var u=0;7>u;u++)r+="i='"+t.f[u]+"';if(","constructor"==t.f[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.e+"}"}return(t.b||ce.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Vt,G,ve,et,a,P,ne)}function D(n){return"\\"+N[n]}function z(n){return he[n]}function K(n){return typeof n.toString!="function"&&typeof Ft=="string"(n)}function L(n){this.__wrapped__=n}function M(){}function U(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;
|
||||
e=e-t||0;for(var u=Et(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function V(n){return ye[n]}function G(n){return Qt.call(n)==C}function H(n){var t=!1;if(!n||Qt.call(n)!=E||!ce.argsClass&&G(n))return t;var e=n.constructor;return!Z(e)&&(ce.nodeClass||!K(n))||e instanceof e?ce.ownLast?(pe(n,function(n,e,r){return t=Vt.call(r,e),!1}),!0===t):(pe(n,function(n,e){t=e}),!1===t||Vt.call(n,t)):t}function J(n){var t=[];return se(n,function(n,e){t.push(e)}),t}function Q(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=nt(f)){var c=Qt.call(f);if(!I[c]||!ce.nodeClass&&K(f))return f;var l=ve(f)}if(!u||!t)return u?l?U(f):me({},f):f;switch(u=fe[c],c){case j:case k:return new u(+f);case O:case A:return new u(f);case S:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Vt.call(n,"index")&&(f.index=n.index),Vt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ct:se)(n,function(n,u){f[u]=Q(n,t,r,e,o,i)}),f}function W(n){var t=[];return pe(n,function(n,e){Z(n)&&t.push(e)
|
||||
}),t.sort()}function X(n){for(var t=-1,e=ge(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Y(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Qt.call(n),l=Qt.call(t),p==C&&(p=E),l==C&&(l=E),p!=l)return!1;switch(p){case j:case k:return+n==+t;
|
||||
case O:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case S:case A:return n==Ft(t)}if(l=p==w,!l){if(Vt.call(n,"__wrapped__")||Vt.call(t,"__wrapped__"))return Y(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=E||!ce.nodeClass&&(K(n)||K(t)))return!1;var p=!ce.argsObject&&G(n)?$t:n.constructor,s=!ce.argsObject&&G(t)?$t:t.constructor;if(p!=s&&(!Z(p)||!(p instanceof p&&Z(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Y(n[l],s,e,r,u,o)););else if(!(c=Y(n[v],s,e,r,u,o)))break;return c}return pe(t,function(t,a,i){return Vt.call(i,a)?(v++,c=Vt.call(n,a)&&Y(n[a],t,e,r,u,o)):void 0}),c&&!f&&pe(n,function(n,t,e){return Vt.call(e,t)?c=-1<--v:void 0}),c}function Z(n){return typeof n=="function"}function nt(n){return n?P[typeof n]:!1}function tt(n){return typeof n=="number"||Qt.call(n)==O}function et(n){return typeof n=="string"||Qt.call(n)==A}function rt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!nt(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(ve(r[u])?ct:se)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=ve(t))||be(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?ve(o)?o:[]:be(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=rt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function ut(n){for(var t=-1,e=ge(n),r=e.length,u=Et(r);++t<r;)u[t]=n[e[t]];return u}function at(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?te(0,u+e):e)||0,typeof u=="number"?a=-1<(et(n)?n.indexOf(t,e):mt(n,t,e)):le(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function ot(n,t,e){var r=!0;if(t=a.createCallback(t,e),ve(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else le(n,function(n,e,u){return r=!!t(n,e,u)});return r}function it(n,t,e){var r=[];if(t=a.createCallback(t,e),ve(n)){e=-1;
|
||||
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else le(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ft(n,t,e){if(t=a.createCallback(t,e),!ve(n)){var r;return le(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];if(t(o,e,n))return o}}function ct(n,t,e){if(t&&typeof e=="undefined"&&ve(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else le(n,t,e);return n}function lt(n,t,e){var r=-1,u=n?n.length:0,o=Et(typeof u=="number"?u:0);
|
||||
if(t=a.createCallback(t,e),ve(n))for(;++r<u;)o[r]=t(n[r],r,n);else le(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function pt(n,t,e){var r=-1/0,u=r;if(!t&&ve(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),le(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function st(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),ve(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else le(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)
|
||||
});return e}function vt(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=ge(n),o=f.length;else ce.unindexedChars&&et(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),ct(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function gt(n,t,e){var r;if(t=a.createCallback(t,e),ve(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else le(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function ht(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;
|
||||
for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return U(n,0,ee(te(0,r),u))}}function yt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),ve(r)?Gt.apply(i,t?r:yt(r)):i.push(r);return i}function mt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?te(0,u+e):e||0)-1;else if(e)return r=bt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;
|
||||
for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:te(0,t);return U(n,r)}function bt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):kt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function _t(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=Ft(p),s=Vt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>mt(f,p))&&((e||c)&&f.push(p),i.push(r))
|
||||
}return i}function Ct(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 wt(n,t){return ce.fastBind||Wt&&2<arguments.length?Wt.call.apply(Wt,arguments):R(n,t,U(arguments,2))}function jt(n){var t=U(arguments,1);return Jt(function(){n.apply(e,t)},1)}function kt(n){return n}function xt(n){ct(W(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Gt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new L(t)
|
||||
}})}function Ot(){return this.__wrapped__}r=r?$.defaults(n.Object(),r,$.pick(n,b)):n;var Et=r.Array,St=r.Boolean,At=r.Date,It=r.Function,Pt=r.Math,Nt=r.Number,$t=r.Object,Bt=r.RegExp,Ft=r.String,qt=Et(),Rt=$t(),Tt=r._,Dt=Bt("^"+Ft(Rt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),zt=Pt.ceil,Kt=r.clearTimeout,Lt=qt.concat,Mt=Pt.floor,Ut=Dt.test(Ut=$t.getPrototypeOf)&&Ut,Vt=Rt.hasOwnProperty,Gt=qt.push,Ht=r.setImmediate,Jt=r.setTimeout,Qt=Rt.toString,Wt=Dt.test(Wt=U.bind)&&Wt,Xt=Dt.test(Xt=Et.isArray)&&Xt,Yt=r.isFinite,Zt=r.isNaN,ne=Dt.test(ne=$t.keys)&&ne,te=Pt.max,ee=Pt.min,re=r.parseInt,ue=Pt.random,ae=Dt.test(r.attachEvent),oe=!/\n{2,}/.test(It()),ie=Wt&&!/\n|true/.test(Wt+ae),fe={};
|
||||
fe[w]=Et,fe[j]=St,fe[k]=At,fe[E]=$t,fe[O]=Nt,fe[S]=Bt,fe[A]=Ft;var ce=a.support={};(function(){var n=function(){this.x=1},t={0:1,length:1},e=[];n.prototype={valueOf:1,y:1};for(var r in new n)e.push(r);for(r in arguments);ce.argsObject=arguments.constructor==$t,ce.argsClass=G(arguments),ce.enumPrototypes=n.propertyIsEnumerable("prototype"),ce.fastBind=Wt&&!ie,ce.fastKeys=ne&&(ae||ie||!oe),ce.ownLast="x"!=e[0],ce.nonEnumArgs=0!=r,ce.nonEnumShadows=!/valueOf/.test(e),ce.spliceObjects=(qt.splice.call(t,0,1),!t[0]),ce.unindexedChars="xx"!="x"[0]+$t("x")[0];
|
||||
try{ce.nodeClass=!(Qt.call(document)==E&&!Ft({toString:0}))}catch(u){ce.nodeClass=!0}})(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:g,variable:"",imports:{_:a}};var St={a:"q,w,g",g:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",e:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},Pt={a:"e,d,x",g:"d=d&&typeof x=='undefined'?d:o.createCallback(d,x)",b:"typeof n=='number'",e:"if(d(m[i],i,e)===false)return u"},Nt={g:"if(!r[typeof m])return u;"+Pt.g,b:!1},le=T(Pt);
|
||||
L.prototype=a.prototype,ce.argsClass||(G=function(n){return n?Vt.call(n,"callee"):!1});var pe=T(Pt,Nt,{h:!1}),se=T(Pt,Nt),ve=Xt||function(n){return ce.argsObject&&n instanceof Et||Qt.call(n)==w},ge=ne?function(n){return nt(n)?ce.enumPrototypes&&typeof n=="function"||ce.nonEnumArgs&&n.length&&G(n)?J(n):ne(n):[]}:J,he={"&":"&","<":"<",">":">",'"':""","'":"'"},ye=X(he),me=T(St,{g:St.g.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),e:"u[i]=d?d(u[i],m[i]):m[i]"}),de=T(St);
|
||||
Z(/x/)&&(Z=function(n){return n instanceof It||Qt.call(n)==x});var be=Ut?function(n){if(!n||Qt.call(n)!=E||!ce.argsClass&&G(n))return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Ut(t))&&Ut(e);return e?n==e||Ut(n)==e:H(n)}:H;return ie&&u&&typeof Ht=="function"&&(jt=wt(Ht,r)),Ht=8==re("08")?re:function(n,t){return re(et(n)?n.replace(h,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=me,a.at=function(n){var t=-1,e=Lt.apply(qt,U(arguments,1)),r=e.length,u=Et(r);
|
||||
for(ce.unindexedChars&&et(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=wt,a.bindAll=function(n){for(var t=Lt.apply(qt,arguments),e=1<t.length?0:(t=W(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=wt(n[u],n)}return n},a.bindKey=function(n,t){return R(n,t,U(arguments,2))},a.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},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}
|
||||
},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=Ft(t(n,e,u)),Vt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return kt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=ge(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Y(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?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)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Kt(i),i=Jt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=de,a.defer=jt,a.delay=function(n,t){var r=U(arguments,2);return Jt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Lt.apply(qt,arguments),r=B(r,e,100),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=it,a.flatten=yt,a.forEach=ct,a.forIn=pe,a.forOwn=se,a.functions=W,a.groupBy=function(n,t,e){var r={};
|
||||
return t=a.createCallback(t,e),ct(n,function(n,e,u){e=Ft(t(n,e,u)),(Vt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return U(n,0,ee(te(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=Ft(c),l=Vt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];
|
||||
if(l||0>mt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=B(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=X,a.invoke=function(n,t){var e=U(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Et(typeof a=="number"?a:0);return ct(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=ge,a.map=lt,a.max=pt,a.memoize=function(n,t){var e={};return function(){var r=Ft(t?t.apply(this,arguments):arguments[0]);return Vt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=rt,a.min=function(n,t,e){var r=1/0,u=r;
|
||||
if(!t&&ve(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),le(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Lt.apply(qt,arguments);return pe(n,function(n,e,a){(r?!t(n,e,a):0>mt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ge(n),r=e.length,u=Et(r);++t<r;){var a=e[t];
|
||||
u[t]=[a,n[a]]}return u},a.partial=function(n){return R(n,U(arguments,1))},a.partialRight=function(n){return R(n,U(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Lt.apply(qt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),pe(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=lt,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=te(0,zt((t-n)/e));for(var u=Et(t);++r<t;)u[r]=n,n+=e;
|
||||
return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),it(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Et(typeof e=="number"?e:0);return ct(n,function(n){var e=Mt(ue()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Et(typeof u=="number"?u:0);for(t=a.createCallback(t,e),ct(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(q);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new At,o=null,u=n.apply(a,r)
|
||||
}var r,u,a,o,i=0;return function(){var f=new At,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Jt(e,c)):(Kt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Et(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?ce.unindexedChars&&et(n)?n.split(""):U(n):ut(n)},a.union=function(){return _t(Lt.apply(qt,arguments))},a.uniq=_t,a.values=ut,a.where=it,a.without=function(n){for(var t=-1,e=n?n.length:0,r=B(arguments,1,30),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Gt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?pt(lt(arguments,"length")):0,r=Et(e);++t<e;)r[t]=lt(arguments,t);return r},a.zipObject=Ct,a.collect=lt,a.drop=dt,a.each=ct,a.extend=me,a.methods=W,a.object=Ct,a.select=it,a.tail=dt,a.unique=_t,xt(a),a.clone=Q,a.cloneDeep=function(n,t,e){return Q(n,!0,t,e)},a.contains=at,a.escape=function(n){return null==n?"":Ft(n).replace(m,z)},a.every=ot,a.find=ft,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),se(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},a.has=function(n,t){return n?Vt.call(n,t):!1},a.identity=kt,a.indexOf=mt,a.isArguments=G,a.isArray=ve,a.isBoolean=function(n){return!0===n||!1===n||Qt.call(n)==j},a.isDate=function(n){return n instanceof At||Qt.call(n)==k},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;
|
||||
var e=Qt.call(n),r=n.length;return e==w||e==A||(ce.argsClass?e==C:G(n))||e==E&&typeof r=="number"&&Z(n.splice)?!r:(se(n,function(){return t=!1}),t)},a.isEqual=Y,a.isFinite=function(n){return Yt(n)&&!Zt(parseFloat(n))},a.isFunction=Z,a.isNaN=function(n){return tt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tt,a.isObject=nt,a.isPlainObject=be,a.isRegExp=function(n){return n instanceof Bt||Qt.call(n)==S},a.isString=et,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;
|
||||
for(typeof e=="number"&&(r=(0>e?te(0,r+e):ee(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=xt,a.noConflict=function(){return r._=Tt,this},a.parseInt=Ht,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Mt(ue()*((+t||0)-n+1))},a.reduce=st,a.reduceRight=vt,a.result=function(n,t){var r=n?n[t]:e;return Z(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ge(n).length},a.some=gt,a.sortedIndex=bt,a.template=function(n,t,r){var u=a.templateSettings;
|
||||
n||(n=""),r=de({},r,u);var o,i=de({},r.imports,u.imports),u=ge(i),i=ut(i),p=0,v=r.interpolate||y,h="__p+='",v=Bt((r.escape||y).source+"|"+v.source+"|"+(v===g?s:y).source+"|"+(r.evaluate||y).source+"|$","g");n.replace(v,function(t,e,r,u,a,i){return r||(r=u),h+=n.slice(p,i).replace(d,D),e&&(h+="'+__e("+e+")+'"),a&&(o=!0,h+="';"+a+";__p+='"),r&&(h+="'+((__t=("+r+"))==null?'':__t)+'"),p=i+t.length,t}),h+="';\n",v=r=r.variable,v||(r="obj",h="with("+r+"){"+h+"}"),h=(o?h.replace(f,""):h).replace(c,"$1").replace(l,"$1;"),h="function("+r+"){"+(v?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+h+"return __p}";
|
||||
try{var m=It(u,"return "+h).apply(e,i)}catch(b){throw b.source=h,b}return t?m(t):(m.source=h,m)},a.unescape=function(n){return null==n?"":Ft(n).replace(p,V)},a.uniqueId=function(n){var t=++o;return Ft(null==n?"":n)+t},a.all=ot,a.any=gt,a.detect=ft,a.foldl=st,a.foldr=vt,a.include=at,a.inject=st,se(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Gt.apply(t,arguments),n.apply(a,t)})}),a.first=ht,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return U(n,te(0,u-r))}},a.take=ht,a.head=ht,se(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new L(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return Ft(this.__wrapped__)},a.prototype.value=Ot,a.prototype.valueOf=Ot,le(["join","pop","shift"],function(n){var t=qt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),le(["push","reverse","sort","unshift"],function(n){var t=qt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),le(["concat","slice","splice"],function(n){var t=qt[n];a.prototype[n]=function(){return new L(t.apply(this.__wrapped__,arguments))}}),ce.spliceObjects||le(["pop","shift","splice"],function(n){var t=qt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new L(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;
|
||||
a.global===a&&(n=a);var o=0,i={},f=/\b__p\+='';/g,c=/\b(__p\+=)''\+/g,l=/(__e\(.*?\)|\b__t\))\+'';/g,p=/&(?:amp|lt|gt|quot|#39);/g,s=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,v=/\w*$/,g=/<%=([\s\S]+?)%>/g,h=/^0+(?=.$)/,y=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,b="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),C="[object Arguments]",w="[object Array]",j="[object Boolean]",k="[object Date]",x="[object Function]",O="[object Number]",E="[object Object]",S="[object RegExp]",A="[object String]",I={};
|
||||
I[x]=!1,I[C]=I[w]=I[j]=I[k]=I[O]=I[E]=I[S]=I[A]=!0;var P={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},N={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},$=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=$,define(function(){return $})):r&&!r.nodeType?u?(u.exports=$)._=$:r._=$:n._=$})(this);
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&!ve(n)&&Jt.call(n,"__wrapped__")?n:new V(n)}function R(n,t,e){var r=n.length,u=r-t>=e;if(u){var a={};for(e=t-1;++e<r;){var o=Tt(n[e]);(Jt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=Tt(e);return Jt.call(a,r)&&-1<bt(a[r],e)}return-1<bt(n,e,t)}}function T(n){return n.charCodeAt(0)}function D(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 z(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=J(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(G.prototype=n.prototype,c=new G,G.prototype=null,f=n.apply(c,f),et(f)?f:c):n.apply(c,f)}var a=tt(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function L(){for(var n,t={g:w,b:"k(m)",c:"",e:"m",f:"",h:"",i:!0,j:!!o},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=$t,r="var i,m="+t.d+",u="+t.e+";if(!m)return u;"+t.h+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",le.unindexedChars&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.f+"}}else{"):le.nonEnumArgs&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.f+"}}else{"),le.enumPrototypes&&(r+="var v=typeof m=='function';"),t.i&&t.j?(r+="var s=-1,t=r[typeof m]?o(m):[],n=t.length;while(++s<n){i=t[s];",le.enumPrototypes&&(r+="if(!(v&&i=='prototype')){"),r+=t.f,le.enumPrototypes&&(r+="}")):(r+="for(i in m){",(le.enumPrototypes||t.i)&&(r+="if(",le.enumPrototypes&&(r+="!(v&&i=='prototype')"),le.enumPrototypes&&t.i&&(r+="&&"),t.i&&(r+="h.call(m,i)"),r+="){"),r+=t.f+";",(le.enumPrototypes||t.i)&&(r+="}")),r+="}",le.nonEnumShadows){r+="var f=m.constructor;";
|
||||
for(var u=0;7>u;u++)r+="i='"+t.g[u]+"';if(","constructor"==t.g[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.f+"}"}return(t.b||le.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,p,r","return function("+n+"){"+r+"}")(Jt,W,ve,ut,ge,a,q)}function K(n){return"\\"+B[n]}function M(n){return he[n]}function U(n){return typeof n.toString!="function"&&typeof Tt=="string"(n)}function V(n){this.__wrapped__=n}function G(){}function H(n){var t=!1;if(!n||Yt.call(n)!=I||!le.argsClass&&j(n))return t;
|
||||
var e=n.constructor;return!tt(e)&&(le.nodeClass||!U(n))||e instanceof e?le.ownLast?(be(n,function(n,e,r){return t=h.call(r,e),!1}),!0===St):(be(n,function(n,t){St=t}),!1===St||Jt.call(n,St)):St}function J(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=It(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function Q(n){return ye[n]}function W(n){return Yt.call(n)==k}function X(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=et(f)){var c=Yt.call(f);if(!$[c]||!le.nodeClass&&U(f))return f;var l=ve(f)}if(!u||!t)return u?l?J(f):me({},f):f;switch(u=ce[c],c){case O:case E:return new u(+f);case A:case N:return new u(f);case P:return u(f.source,g.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Jt.call(n,"index")&&(f.index=n.index),Jt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?pt:_e)(n,function(n,u){f[u]=X(n,t,r,e,o,i)}),f}function Y(n){var t=[];return be(n,function(n,e){tt(n)&&t.push(e)
|
||||
}),t.sort()}function Z(n){for(var t=-1,e=ge(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function nt(n,t,e,r,u,o){var i=e===f;if(e&&!i){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Yt.call(n),l=Yt.call(t),p==k&&(p=I),l==k&&(l=I),p!=l)return!1;switch(p){case O:case E:return+n==+t;
|
||||
case A:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case P:case N:return n==Tt(t)}if(l=p==x,!l){if(Jt.call(n,"__wrapped__")||Jt.call(t,"__wrapped__"))return nt(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=I||!le.nodeClass&&(U(n)||U(t)))return!1;var p=!le.argsObject&&W(n)?Ft:n.constructor,s=!le.argsObject&&W(t)?Ft:t.constructor;if(p!=s&&(!tt(p)||!(p instanceof p&&tt(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!i)return c;
|
||||
for(;v--;)if(l=p,s=t[v],i)for(;l--&&!(c=nt(n[l],s,e,r,u,o)););else if(!(c=nt(n[v],s,e,r,u,o)))break;return c}return be(t,function(t,a,i){return Jt.call(i,a)?(v++,c=Jt.call(n,a)&&nt(n[a],t,e,r,u,o)):void 0}),c&&!i&&be(n,function(n,t,e){return Jt.call(e,t)?c=-1<--v:void 0}),c}function tt(n){return typeof n=="function"}function et(n){return n?q[typeof n]:!1}function rt(n){return typeof n=="number"||Yt.call(n)==A}function ut(n){return typeof n=="string"||Yt.call(n)==N}function at(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!et(n))return n;if(e===f)var i=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?i=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(i=r[--o]);for(;++u<o;)(ve(r[u])?pt:_e)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=ve(t))||Ce(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?ve(o)?o:[]:Ce(o)?o:{},i&&(a=i(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),i||(o=at(o,t,f,i,c,l)))}else i&&(a=i(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function ot(n){for(var t=-1,e=ge(n),r=e.length,u=It(r);++t<r;)u[t]=n[e[t]];return u}function it(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?ue(0,u+e):e)||0,typeof u=="number"?a=-1<(ut(n)?n.indexOf(t,e):bt(n,t,e)):pe(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function ft(n,t,e){var r=!0;if(t=a.createCallback(t,e),ve(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else pe(n,function(n,e,u){return r=!!t(n,e,u)});return r}function ct(n,t,e){var r=[];if(t=a.createCallback(t,e),ve(n)){e=-1;
|
||||
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else pe(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function lt(n,t,e){if(t=a.createCallback(t,e),!ve(n)){var r;return pe(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}e=-1;for(var u=n.length;++e<u;){var o=n[e];if(t(o,e,n))return o}}function pt(n,t,e){if(t&&typeof e=="undefined"&&ve(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else pe(n,t,e);return n}function st(n,t,e){var r=-1,u=n?n.length:0,o=It(typeof u=="number"?u:0);
|
||||
if(t=a.createCallback(t,e),ve(n))for(;++r<u;)o[r]=t(n[r],r,n);else pe(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function vt(n,t,e){var r=-1/0,u=r;if(!t&&ve(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&ut(n)?T:a.createCallback(t,e),pe(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function gt(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),ve(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else pe(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)
|
||||
});return e}function ht(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=ge(n),o=f.length;else le.unindexedChars&&ut(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),pt(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function yt(n,t,e){var r;if(t=a.createCallback(t,e),ve(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else pe(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function mt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;
|
||||
for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return J(n,0,ae(ue(0,r),u))}}function dt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),ve(r)?Qt.apply(i,t?r:dt(r)):i.push(r);return i}function bt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ue(0,u+e):e||0)-1;else if(e)return r=Ct(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function _t(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;
|
||||
for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:ue(0,t);return J(n,r)}function Ct(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):Ot,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function wt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=Tt(p),s=Jt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>bt(f,p))&&((e||c)&&f.push(p),i.push(r))
|
||||
}return i}function jt(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 kt(n,t){return le.fastBind||Zt&&2<arguments.length?Zt.call.apply(Zt,arguments):z(n,t,J(arguments,2))}function xt(n){var t=J(arguments,1);return Xt(function(){n.apply(e,t)},1)}function Ot(n){return n}function Et(n){pt(Y(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Qt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new V(t)
|
||||
}})}function St(n,t){var r=n?n[t]:e;return tt(r)?n[t]():r}function At(){return this.__wrapped__}r=r?F.defaults(n.Object(),r,F.pick(n,C)):n;var It=r.Array,Pt=r.Boolean,Nt=r.Date,$t=r.Function,qt=r.Math,Bt=r.Number,Ft=r.Object,Rt=r.RegExp,Tt=r.String,Dt=It(),zt=Ft(),Lt=r._,Kt=Rt("^"+Tt(zt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Mt=qt.ceil,Ut=r.clearTimeout,Vt=Dt.concat,Gt=qt.floor,Ht=Kt.test(Ht=Ft.getPrototypeOf)&&Ht,Jt=zt.hasOwnProperty,Qt=Dt.push,Wt=r.setImmediate,Xt=r.setTimeout,Yt=zt.toString,Zt=Kt.test(Zt=J.bind)&&Zt,ne=Kt.test(ne=It.isArray)&&ne,te=r.isFinite,ee=r.isNaN,re=Kt.test(re=Ft.keys)&&re,ue=qt.max,ae=qt.min,oe=r.parseInt,ie=qt.random,qt=Kt.test(r.attachEvent),fe=Zt&&!/\n|true/.test(Zt+qt),ce={};
|
||||
ce[x]=It,ce[O]=Pt,ce[E]=Nt,ce[I]=Ft,ce[A]=Bt,ce[P]=Rt,ce[N]=Tt;var le=a.support={};(function(){var n=function(){this.x=1},t={0:1,length:1},e=[];n.prototype={valueOf:1,y:1};for(var r in new n)e.push(r);for(r in arguments);le.argsObject=arguments.constructor==Ft,le.argsClass=W(arguments),le.enumPrototypes=n.propertyIsEnumerable("prototype"),le.fastBind=Zt&&!fe,le.ownLast="x"!=e[0],le.nonEnumArgs=0!=r,le.nonEnumShadows=!/valueOf/.test(e),le.spliceObjects=(Dt.splice.call(t,0,1),!t[0]),le.unindexedChars="xx"!="x"[0]+Ft("x")[0];
|
||||
try{le.nodeClass=!(Yt.call(document)==I&&!Tt({toString:0}))}catch(u){le.nodeClass=!0}})(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var Pt={a:"q,w,g",h:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",f:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},Bt={a:"e,d,x",h:"d=d&&typeof x=='undefined'?d:p.createCallback(d,x)",b:"typeof n=='number'",f:"if(d(m[i],i,e)===false)return u"},qt={h:"if(!r[typeof m])return u;"+Bt.h,b:!1},pe=L(Bt);
|
||||
V.prototype=a.prototype;var se=L({a:"q",e:"[]",h:"if(!(r[typeof q]))return u",f:"u.push(i)",b:!1});le.argsClass||(W=function(n){return n?Jt.call(n,"callee"):!1});var ve=ne||function(n){return le.argsObject&&n instanceof It||Yt.call(n)==x},ge=re?function(n){return et(n)?le.enumPrototypes&&typeof n=="function"||le.nonEnumArgs&&n.length&&W(n)?se(n):re(n):[]}:se,he={"&":"&","<":"<",">":">",'"':""","'":"'"},ye=Z(he),me=L(Pt,{h:Pt.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=p.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),f:"u[i]=d?d(u[i],m[i]):m[i]"}),de=L(Pt),be=L(Bt,qt,{i:!1}),_e=L(Bt,qt);
|
||||
tt(/x/)&&(tt=function(n){return n instanceof $t||Yt.call(n)==S});var Ce=Ht?function(n){if(!n||Yt.call(n)!=I||!le.argsClass&&W(n))return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Ht(t))&&Ht(e);return e?n==e||Ht(n)==e:H(n)}:H;return fe&&u&&typeof Wt=="function"&&(xt=kt(Wt,r)),Wt=8==oe("08")?oe:function(n,t){return oe(ut(n)?n.replace(m,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=me,a.at=function(n){var t=-1,e=Vt.apply(Dt,J(arguments,1)),r=e.length,u=It(r);
|
||||
for(le.unindexedChars&&ut(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=kt,a.bindAll=function(n){for(var t=Vt.apply(Dt,arguments),e=1<t.length?0:(t=Y(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=kt(n[u],n)}return n},a.bindKey=function(n,t){return z(n,t,J(arguments,2))},a.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},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}
|
||||
},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),pt(n,function(n,e,u){e=Tt(t(n,e,u)),Jt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return Ot;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=ge(n);return function(t){for(var e=u.length,r=!1;e--&&(r=nt(t[u[e]],n[u[e]],f)););return r}}return typeof t!="undefined"?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)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Ut(i),i=Xt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=de,a.defer=xt,a.delay=function(n,t){var r=J(arguments,2);return Xt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Vt.apply(Dt,arguments),r=R(r,e,100),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=ct,a.flatten=dt,a.forEach=pt,a.forIn=be,a.forOwn=_e,a.functions=Y,a.groupBy=function(n,t,e){var r={};
|
||||
return t=a.createCallback(t,e),pt(n,function(n,e,u){e=Tt(t(n,e,u)),(Jt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return J(n,0,ae(ue(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=Tt(c),l=Jt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];
|
||||
if(l||0>bt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=R(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=Z,a.invoke=function(n,t){var e=J(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=It(typeof a=="number"?a:0);return pt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=ge,a.map=st,a.max=vt,a.memoize=function(n,t){var e={};return function(){var r=Tt(t?t.apply(this,arguments):arguments[0]);return Jt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=at,a.min=function(n,t,e){var r=1/0,u=r;
|
||||
if(!t&&ve(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&ut(n)?T:a.createCallback(t,e),pe(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Vt.apply(Dt,arguments);return be(n,function(n,e,a){(r?!t(n,e,a):0>bt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ge(n),r=e.length,u=It(r);++t<r;){var a=e[t];
|
||||
u[t]=[a,n[a]]}return u},a.partial=function(n){return z(n,J(arguments,1))},a.partialRight=function(n){return z(n,J(arguments,1),null,f)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Vt.apply(Dt,arguments),i=et(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),be(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=st,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=ue(0,Mt((t-n)/e));for(var u=It(t);++r<t;)u[r]=n,n+=e;
|
||||
return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),ct(n,function(n,e,r){return!t(n,e,r)})},a.rest=_t,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=It(typeof e=="number"?e:0);return pt(n,function(n){var e=Gt(ie()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=It(typeof u=="number"?u:0);for(t=a.createCallback(t,e),pt(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(D);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Nt,o=null,u=n.apply(a,r)
|
||||
}var r,u,a,o,i=0;return function(){var f=new Nt,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Xt(e,c)):(Ut(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=It(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?le.unindexedChars&&ut(n)?n.split(""):J(n):ot(n)},a.union=function(){return wt(Vt.apply(Dt,arguments))},a.uniq=wt,a.values=ot,a.where=ct,a.without=function(n){for(var t=-1,e=n?n.length:0,r=R(arguments,1,30),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Qt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?vt(st(arguments,"length")):0,r=It(e);++t<e;)r[t]=st(arguments,t);return r},a.zipObject=jt,a.collect=st,a.drop=_t,a.each=pt,a.extend=me,a.methods=Y,a.object=jt,a.select=ct,a.tail=_t,a.unique=wt,Et(a),a.clone=X,a.cloneDeep=function(n,t,e){return X(n,!0,t,e)},a.contains=it,a.escape=function(n){return null==n?"":Tt(n).replace(b,M)},a.every=ft,a.find=lt,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),_e(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},a.has=function(n,t){return n?Jt.call(n,t):!1},a.identity=Ot,a.indexOf=bt,a.isArguments=W,a.isArray=ve,a.isBoolean=function(n){return!0===n||!1===n||Yt.call(n)==O},a.isDate=function(n){return n instanceof Nt||Yt.call(n)==E},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;
|
||||
var e=Yt.call(n),r=n.length;return e==x||e==N||(le.argsClass?e==k:W(n))||e==I&&typeof r=="number"&&tt(n.splice)?!r:(_e(n,function(){return t=!1}),t)},a.isEqual=nt,a.isFinite=function(n){return te(n)&&!ee(parseFloat(n))},a.isFunction=tt,a.isNaN=function(n){return rt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=rt,a.isObject=et,a.isPlainObject=Ce,a.isRegExp=function(n){return n instanceof Rt||Yt.call(n)==P},a.isString=ut,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;
|
||||
for(typeof e=="number"&&(r=(0>e?ue(0,r+e):ae(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=Et,a.noConflict=function(){return r._=Lt,this},a.parseInt=Wt,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Gt(ie()*((+t||0)-n+1))},a.reduce=gt,a.reduceRight=ht,a.result=St,a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ge(n).length},a.some=yt,a.sortedIndex=Ct,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=de({},r,u);
|
||||
var o,i=de({},r.imports,u.imports),u=ge(i),i=ot(i),f=0,s=r.interpolate||d,g="__p+='",s=Rt((r.escape||d).source+"|"+s.source+"|"+(s===y?v:d).source+"|"+(r.evaluate||d).source+"|$","g");n.replace(s,function(t,e,r,u,a,i){return r||(r=u),g+=n.slice(f,i).replace(_,K),e&&(g+="'+__e("+e+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),r&&(g+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),g+="';\n",s=r=r.variable,s||(r="obj",g="with("+r+"){"+g+"}"),g=(o?g.replace(c,""):g).replace(l,"$1").replace(p,"$1;"),g="function("+r+"){"+(s?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";
|
||||
try{var h=$t(u,"return "+g).apply(e,i)}catch(m){throw m.source=g,m}return t?h(t):(h.source=g,h)},a.unescape=function(n){return null==n?"":Tt(n).replace(s,Q)},a.uniqueId=function(n){var t=++i;return Tt(null==n?"":n)+t},a.all=ft,a.any=yt,a.detect=lt,a.foldl=gt,a.foldr=ht,a.include=it,a.inject=gt,_e(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Qt.apply(t,arguments),n.apply(a,t)})}),a.first=mt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return J(n,ue(0,u-r))}},a.take=mt,a.head=mt,_e(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new V(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return Tt(this.__wrapped__)},a.prototype.value=At,a.prototype.valueOf=At,pe(["join","pop","shift"],function(n){var t=Dt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),pe(["push","reverse","sort","unshift"],function(n){var t=Dt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),pe(["concat","slice","splice"],function(n){var t=Dt[n];a.prototype[n]=function(){return new V(t.apply(this.__wrapped__,arguments))}}),le.spliceObjects||pe(["pop","shift","splice"],function(n){var t=Dt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new V(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;
|
||||
a.global===a&&(n=a);var i=0,f={},c=/\b__p\+='';/g,l=/\b(__p\+=)''\+/g,p=/(__e\(.*?\)|\b__t\))\+'';/g,s=/&(?:amp|lt|gt|quot|#39);/g,v=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/\w*$/,y=/<%=([\s\S]+?)%>/g,m=/^0+(?=.$)/,d=/($^)/,b=/[&<>"']/g,_=/['\n\r\t\u2028\u2029\\]/g,C="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),w="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),k="[object Arguments]",x="[object Array]",O="[object Boolean]",E="[object Date]",S="[object Function]",A="[object Number]",I="[object Object]",P="[object RegExp]",N="[object String]",$={};
|
||||
$[S]=!1,$[k]=$[x]=$[O]=$[E]=$[A]=$[I]=$[P]=$[N]=!0;var q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},B={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},F=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=F,define(function(){return F})):r&&!r.nodeType?u?(u.exports=F)._=F:r._=F:n._=F})(this);
|
||||
294
dist/lodash.js
vendored
294
dist/lodash.js
vendored
@@ -180,7 +180,6 @@
|
||||
|
||||
/** Detect various environments */
|
||||
var isIeOpera = reNative.test(context.attachEvent),
|
||||
isJSC = !/\n{2,}/.test(Function()),
|
||||
isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);
|
||||
|
||||
/** Used to lookup a built-in constructor by [[Class]] */
|
||||
@@ -259,14 +258,6 @@
|
||||
*/
|
||||
support.fastBind = nativeBind && !isV8;
|
||||
|
||||
/**
|
||||
* Detect if `Object.keys` exists and is inferred to be fast (Firefox, IE, Opera, V8).
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
*/
|
||||
support.fastKeys = nativeKeys && (isIeOpera || isV8 || !isJSC);
|
||||
|
||||
/**
|
||||
* By default, the template delimiters used by Lo-Dash are similar to those in
|
||||
* embedded Ruby (ERB). Change the following template settings to use alternative
|
||||
@@ -341,7 +332,9 @@
|
||||
|
||||
var __p = 'var index, iterable = ' +
|
||||
(obj.firstArg) +
|
||||
', result = iterable;\nif (!iterable) return result;\n' +
|
||||
', result = ' +
|
||||
(obj.init) +
|
||||
';\nif (!iterable) return result;\n' +
|
||||
(obj.top) +
|
||||
';\n';
|
||||
if (obj.arrays) {
|
||||
@@ -352,8 +345,8 @@
|
||||
'\n }\n}\nelse { ';
|
||||
}
|
||||
|
||||
if (support.fastKeys && obj.useHas) {
|
||||
__p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n ' +
|
||||
if (obj.useHas && obj.useKeys) {
|
||||
__p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? keys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n ' +
|
||||
(obj.loop) +
|
||||
'\n } ';
|
||||
} else {
|
||||
@@ -563,9 +556,11 @@
|
||||
// iterator options
|
||||
'arrays': 'isArray(iterable)',
|
||||
'bottom': '',
|
||||
'init': 'iterable',
|
||||
'loop': '',
|
||||
'top': '',
|
||||
'useHas': true
|
||||
'useHas': true,
|
||||
'useKeys': !!keys
|
||||
};
|
||||
|
||||
// merge options into a template data object
|
||||
@@ -579,14 +574,14 @@
|
||||
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
'hasOwnProperty, isArguments, isArray, isString, lodash, ' +
|
||||
'objectTypes, nativeKeys',
|
||||
'hasOwnProperty, isArguments, isArray, isString, keys, ' +
|
||||
'lodash, objectTypes',
|
||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||
);
|
||||
// return the compiled function
|
||||
return factory(
|
||||
hasOwnProperty, isArguments, isArray, isString, lodash,
|
||||
objectTypes, nativeKeys
|
||||
hasOwnProperty, isArguments, isArray, isString, keys,
|
||||
lodash, objectTypes
|
||||
);
|
||||
}
|
||||
|
||||
@@ -648,6 +643,53 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass)) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor)) || ctor instanceof ctor) {
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @type Function
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
var shimKeys = createIterator({
|
||||
'args': 'object',
|
||||
'init': '[]',
|
||||
'top': 'if (!(objectTypes[typeof object])) return result',
|
||||
'loop': 'result.push(index)',
|
||||
'arrays': false
|
||||
});
|
||||
|
||||
/**
|
||||
* Slices the `collection` from the `start` index up to, but not including,
|
||||
* the `end` index.
|
||||
@@ -709,92 +751,6 @@
|
||||
return toString.call(value) == argsClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(collection, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
if (callback(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
|
||||
|
||||
/**
|
||||
* Checks if `value` is an array.
|
||||
*
|
||||
@@ -837,52 +793,6 @@
|
||||
return nativeKeys(object);
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass)) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor)) || ctor instanceof ctor) {
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
function shimKeys(object) {
|
||||
var result = [];
|
||||
forOwn(object, function(value, key) {
|
||||
result.push(key);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to convert characters to HTML entities:
|
||||
*
|
||||
@@ -1140,6 +1050,92 @@
|
||||
*/
|
||||
var defaults = createIterator(defaultsIteratorOptions);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(collection, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
if (callback(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
|
||||
|
||||
/**
|
||||
* Creates a sorted array of all enumerable properties, own and inherited,
|
||||
* of `object` that have function values.
|
||||
|
||||
72
dist/lodash.min.js
vendored
72
dist/lodash.min.js
vendored
@@ -4,39 +4,39 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&!oe(n)&&Mt.call(n,"__wrapped__")?n:new z(n)}function $(n,t,e){var r=n.length,u=r-t>=e;if(u){var a={};for(e=t-1;++e<r;){var o=$t(n[e]);(Mt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=$t(e);return Mt.call(a,r)&&-1<gt(a[r],e)}return-1<gt(n,e,t)}}function B(n){return n.charCodeAt(0)}function F(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 f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=P(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(K.prototype=n.prototype,c=new K,K.prototype=null,f=n.apply(c,f),X(f)?f:c):n.apply(c,f)}var a=W(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function R(){for(var n,t={b:"k(m)",c:"",e:"",g:"",h:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];return n=t.a,t.d=/^[^,]+/.exec(n)[0],e=It,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.g+";",t.b&&(r+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.e+"}}else{"),re.fastKeys&&t.h?r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];"+t.e+"}":(r+="for(i in m){",t.h&&(r+="if(",t.h&&(r+="h.call(m,i)"),r+="){"),r+=t.e+";",t.h&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Mt,U,oe,Z,a,S,Xt)
|
||||
}function T(n){return"\\"+A[n]}function D(n){return fe[n]}function z(n){this.__wrapped__=n}function K(){}function P(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Ct(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function M(n){return ce[n]}function U(n){return Ht.call(n)==_}function V(n){var t=!1;if(!n||Ht.call(n)!=x)return t;var e=n.constructor;return!W(e)||e instanceof e?(ue(n,function(n,e){t=e}),!1===t||Mt.call(n,t)):t}function G(n){var t=[];return ae(n,function(n,e){t.push(e)
|
||||
}),t}function H(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=X(f)){var c=Ht.call(f);if(!N[c])return f;var l=oe(f)}if(!u||!t)return u?l?P(f):le({},f):f;switch(u=ee[c],c){case w:case j:return new u(+f);case C:case I:return new u(f);case O:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Mt.call(n,"index")&&(f.index=n.index),Mt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ot:ae)(n,function(n,u){f[u]=H(n,t,r,e,o,i)
|
||||
}),f}function J(n){var t=[];return ue(n,function(n,e){W(n)&&t.push(e)}),t.sort()}function L(n){for(var t=-1,e=ie(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Q(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Ht.call(n),l=Ht.call(t),p==_&&(p=x),l==_&&(l=x),p!=l)return!1;
|
||||
switch(p){case w:case j:return+n==+t;case C:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case O:case I:return n==$t(t)}if(l=p==k,!l){if(Mt.call(n,"__wrapped__")||Mt.call(t,"__wrapped__"))return Q(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=x)return!1;var p=n.constructor,s=t.constructor;if(p!=s&&(!W(p)||!(p instanceof p&&W(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Q(n[l],s,e,r,u,o)););else if(!(c=Q(n[v],s,e,r,u,o)))break;return c}return ue(t,function(t,a,i){return Mt.call(i,a)?(v++,c=Mt.call(n,a)&&Q(n[a],t,e,r,u,o)):void 0}),c&&!f&&ue(n,function(n,t,e){return Mt.call(e,t)?c=-1<--v:void 0}),c}function W(n){return typeof n=="function"}function X(n){return n?S[typeof n]:!1}function Y(n){return typeof n=="number"||Ht.call(n)==C}function Z(n){return typeof n=="string"||Ht.call(n)==I}function nt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!X(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(oe(r[u])?ot:ae)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=oe(t))||se(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?oe(o)?o:[]:se(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=nt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function tt(n){for(var t=-1,e=ie(n),r=e.length,u=Ct(r);++t<r;)u[t]=n[e[t]];return u}function et(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?Yt(0,u+e):e)||0,typeof u=="number"?a=-1<(Z(n)?n.indexOf(t,e):gt(n,t,e)):ae(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function rt(n,t,e){var r=!0;t=a.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 ae(n,function(n,e,u){return r=!!t(n,e,u)});return r}function ut(n,t,e){var r=[];
|
||||
t=a.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else ae(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function at(n,t,e){t=a.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return ae(n,function(n,e,r){return t(n,e,r)?(u=n,!1):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function ot(n,t,e){var r=-1,u=n?n.length:0;if(typeof u=="number")for(t=t&&typeof e=="undefined"?t:a.createCallback(t,e);++r<u&&!1!==t(n[r],r,n););else ae(n,t,e);
|
||||
return n}function it(n,t,e){var r=-1,u=n?n.length:0;if(t=a.createCallback(t,e),typeof u=="number")for(var o=Ct(u);++r<u;)o[r]=t(n[r],r,n);else o=[],ae(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function ft(n,t,e){var r=-1/0,u=r;if(!t&&oe(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ot(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function ct(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=a.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 ae(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function lt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ie(n),u=i.length;return t=a.createCallback(t,r,4),ot(n,function(r,a,f){a=i?i[--u]:--u,e=o?(o=!1,n[a]):t(e,n[a],a,f)}),e}function pt(n,t,e){var r;t=a.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 ae(n,function(n,e,u){return!(r=t(n,e,u))
|
||||
});return!!r}function st(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return P(n,0,Zt(Yt(0,r),u))}}function vt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),oe(r)?Ut.apply(i,t?r:vt(r)):i.push(r);return i}function gt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?Yt(0,u+e):e||0)-1;
|
||||
else if(e)return r=yt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function ht(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Yt(0,t);return P(n,r)}function yt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):kt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function mt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;
|
||||
if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=$t(p),s=Mt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>gt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i}function bt(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 dt(n,t){return re.fastBind||Jt&&2<arguments.length?Jt.call.apply(Jt,arguments):q(n,t,P(arguments,2))}function _t(n){var t=P(arguments,1);return Gt(function(){n.apply(e,t)
|
||||
},1)}function kt(n){return n}function wt(n){ot(J(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Ut.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new z(t)}})}function jt(){return this.__wrapped__}r=r?E.defaults(n.Object(),r,E.pick(n,d)):n;var Ct=r.Array,xt=r.Boolean,Ot=r.Date,It=r.Function,Nt=r.Math,St=r.Number,At=r.Object,Et=r.RegExp,$t=r.String,Bt=Ct(),Ft=At(),qt=r._,Rt=Et("^"+$t(Ft.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Tt=Nt.ceil,Dt=r.clearTimeout,zt=Bt.concat,Kt=Nt.floor,Pt=Rt.test(Pt=At.getPrototypeOf)&&Pt,Mt=Ft.hasOwnProperty,Ut=Bt.push,Vt=r.setImmediate,Gt=r.setTimeout,Ht=Ft.toString,Jt=Rt.test(Jt=P.bind)&&Jt,Lt=Rt.test(Lt=Ct.isArray)&&Lt,Qt=r.isFinite,Wt=r.isNaN,Xt=Rt.test(Xt=At.keys)&&Xt,Yt=Nt.max,Zt=Nt.min,ne=r.parseInt,te=Nt.random,Ft=Rt.test(r.attachEvent),Rt=!/\n{2,}/.test(It()),Nt=Jt&&!/\n|true/.test(Jt+Ft),ee={};
|
||||
ee[k]=Ct,ee[w]=xt,ee[j]=Ot,ee[x]=At,ee[C]=St,ee[O]=Et,ee[I]=$t;var re=a.support={};re.fastBind=Jt&&!Nt,re.fastKeys=Xt&&(Ft||Nt||!Rt),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:g,variable:"",imports:{_:a}},xt={a:"q,w,g",g:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",e:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},St={a:"e,d,x",g:"d=d&&typeof x=='undefined'?d:o.createCallback(d,x)",b:!1,e:"if(d(m[i],i,e)===false)return u"},At={g:"if(!r[typeof m])return u;"+St.g,b:!1},z.prototype=a.prototype;
|
||||
var ue=R(St,At,{h:!1}),ae=R(St,At),oe=Lt||function(n){return n instanceof Ct||Ht.call(n)==k},ie=Xt?function(n){return X(n)?Xt(n):[]}:G,fe={"&":"&","<":"<",">":">",'"':""","'":"'"},ce=L(fe),le=R(xt,{g:xt.g.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),e:"u[i]=d?d(u[i],m[i]):m[i]"}),pe=R(xt),se=function(n){if(!n||Ht.call(n)!=x)return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Pt(t))&&Pt(e);
|
||||
return e?n==e||Pt(n)==e:V(n)};return Nt&&u&&typeof Vt=="function"&&(_t=dt(Vt,r)),Vt=8==ne("08")?ne:function(n,t){return ne(Z(n)?n.replace(h,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=le,a.at=function(n){for(var t=-1,e=zt.apply(Bt,P(arguments,1)),r=e.length,u=Ct(r);++t<r;)u[t]=n[e[t]];return u},a.bind=dt,a.bindAll=function(n){for(var t=zt.apply(Bt,arguments),e=1<t.length?0:(t=J(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=dt(n[u],n)
|
||||
}return n},a.bindKey=function(n,t){return q(n,t,P(arguments,2))},a.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},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=$t(t(n,e,u)),Mt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return kt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]
|
||||
};var u=ie(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Q(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?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)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Dt(i),i=Gt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=pe,a.defer=_t,a.delay=function(n,t){var r=P(arguments,2);
|
||||
return Gt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=zt.apply(Bt,arguments),r=$(r,e,100),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=ut,a.flatten=vt,a.forEach=ot,a.forIn=ue,a.forOwn=ae,a.functions=J,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=$t(t(n,e,u)),(Mt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++
|
||||
}else r=null==t||e?1:t||r;return P(n,0,Zt(Yt(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=$t(c),l=Mt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>gt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=$(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=L,a.invoke=function(n,t){var e=P(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Ct(typeof a=="number"?a:0);return ot(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)
|
||||
}),o},a.keys=ie,a.map=it,a.max=ft,a.memoize=function(n,t){var e={};return function(){var r=$t(t?t.apply(this,arguments):arguments[0]);return Mt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=nt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&oe(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ot(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=zt.apply(Bt,arguments);
|
||||
return ue(n,function(n,e,a){(r?!t(n,e,a):0>gt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ie(n),r=e.length,u=Ct(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return q(n,P(arguments,1))},a.partialRight=function(n){return q(n,P(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=zt.apply(Bt,arguments),i=X(n)?o.length:0;++u<i;){var f=o[u];
|
||||
f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),ue(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=it,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=Yt(0,Tt((t-n)/e));for(var u=Ct(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),ut(n,function(n,e,r){return!t(n,e,r)})},a.rest=ht,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Ct(typeof e=="number"?e:0);return ot(n,function(n){var e=Kt(te()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Ct(typeof u=="number"?u:0);
|
||||
for(t=a.createCallback(t,e),ot(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(F);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Ot,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new Ot,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Gt(e,c)):(Dt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Ct(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?P(n):tt(n)
|
||||
},a.union=function(){return mt(zt.apply(Bt,arguments))},a.uniq=mt,a.values=tt,a.where=ut,a.without=function(n){for(var t=-1,e=n?n.length:0,r=$(arguments,1,30),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Ut.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?ft(it(arguments,"length")):0,r=Ct(e);++t<e;)r[t]=it(arguments,t);return r},a.zipObject=bt,a.collect=it,a.drop=ht,a.each=ot,a.extend=le,a.methods=J,a.object=bt,a.select=ut,a.tail=ht,a.unique=mt,wt(a),a.clone=H,a.cloneDeep=function(n,t,e){return H(n,!0,t,e)
|
||||
},a.contains=et,a.escape=function(n){return null==n?"":$t(n).replace(m,D)},a.every=rt,a.find=at,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),ae(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},a.has=function(n,t){return n?Mt.call(n,t):!1},a.identity=kt,a.indexOf=gt,a.isArguments=U,a.isArray=oe,a.isBoolean=function(n){return!0===n||!1===n||Ht.call(n)==w},a.isDate=function(n){return n instanceof Ot||Ht.call(n)==j
|
||||
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Ht.call(n),r=n.length;return e==k||e==I||e==_||e==x&&typeof r=="number"&&W(n.splice)?!r:(ae(n,function(){return t=!1}),t)},a.isEqual=Q,a.isFinite=function(n){return Qt(n)&&!Wt(parseFloat(n))},a.isFunction=W,a.isNaN=function(n){return Y(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Y,a.isObject=X,a.isPlainObject=se,a.isRegExp=function(n){return n instanceof Et||Ht.call(n)==O},a.isString=Z,a.isUndefined=function(n){return typeof n=="undefined"
|
||||
},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Yt(0,r+e):Zt(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=wt,a.noConflict=function(){return r._=qt,this},a.parseInt=Vt,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Kt(te()*((+t||0)-n+1))},a.reduce=ct,a.reduceRight=lt,a.result=function(n,t){var r=n?n[t]:e;return W(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ie(n).length
|
||||
},a.some=pt,a.sortedIndex=yt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=pe({},r,u);var o,i=pe({},r.imports,u.imports),u=ie(i),i=tt(i),p=0,v=r.interpolate||y,h="__p+='",v=Et((r.escape||y).source+"|"+v.source+"|"+(v===g?s:y).source+"|"+(r.evaluate||y).source+"|$","g");n.replace(v,function(t,e,r,u,a,i){return r||(r=u),h+=n.slice(p,i).replace(b,T),e&&(h+="'+__e("+e+")+'"),a&&(o=!0,h+="';"+a+";__p+='"),r&&(h+="'+((__t=("+r+"))==null?'':__t)+'"),p=i+t.length,t}),h+="';\n",v=r=r.variable,v||(r="obj",h="with("+r+"){"+h+"}"),h=(o?h.replace(f,""):h).replace(c,"$1").replace(l,"$1;"),h="function("+r+"){"+(v?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+h+"return __p}";
|
||||
try{var m=It(u,"return "+h).apply(e,i)}catch(d){throw d.source=h,d}return t?m(t):(m.source=h,m)},a.unescape=function(n){return null==n?"":$t(n).replace(p,M)},a.uniqueId=function(n){var t=++o;return $t(null==n?"":n)+t},a.all=rt,a.any=pt,a.detect=at,a.foldl=ct,a.foldr=lt,a.include=et,a.inject=ct,ae(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Ut.apply(t,arguments),n.apply(a,t)})}),a.first=st,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return P(n,Yt(0,u-r))}},a.take=st,a.head=st,ae(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new z(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return $t(this.__wrapped__)},a.prototype.value=jt,a.prototype.valueOf=jt,ot(["join","pop","shift"],function(n){var t=Bt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),ot(["push","reverse","sort","unshift"],function(n){var t=Bt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ot(["concat","slice","splice"],function(n){var t=Bt[n];a.prototype[n]=function(){return new z(t.apply(this.__wrapped__,arguments))}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var o=0,i={},f=/\b__p\+='';/g,c=/\b(__p\+=)''\+/g,l=/(__e\(.*?\)|\b__t\))\+'';/g,p=/&(?:amp|lt|gt|quot|#39);/g,s=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,v=/\w*$/,g=/<%=([\s\S]+?)%>/g,h=/^0+(?=.$)/,y=/($^)/,m=/[&<>"']/g,b=/['\n\r\t\u2028\u2029\\]/g,d="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="[object Arguments]",k="[object Array]",w="[object Boolean]",j="[object Date]",C="[object Number]",x="[object Object]",O="[object RegExp]",I="[object String]",N={"[object Function]":!1};
|
||||
N[_]=N[k]=N[w]=N[j]=N[C]=N[x]=N[O]=N[I]=!0;var S={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},A={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},E=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=E,define(function(){return E})):r&&!r.nodeType?u?(u.exports=E)._=E:r._=E:n._=E})(this);
|
||||
;(function(n){function t(i){function c(n){if(!n||Wt.call(n)!=S)return a;var t=n.valueOf,e=typeof t=="function"&&(e=Gt(t))&&Gt(e);return e?n==e||Gt(n)==e:H(n)}function R(n){return n&&typeof n=="object"&&!fe(n)&&Ht.call(n,"__wrapped__")?n:new V(n)}function T(n,t,e){var r=n.length,u=r-t>=e;if(u){var a={};for(e=t-1;++e<r;){var o=Rt(n[e]);(Ht.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=Rt(e);return Ht.call(a,r)&&-1<bt(a[r],e)}return-1<bt(n,e,t)}}function D(n){return n.charCodeAt(0)
|
||||
}function z(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 P(n,t,e,r){function a(){var c=arguments,l=i?this:t;return o||(n=t[f]),e.length&&(c=c.length?(c=J(c),r?c.concat(e):e.concat(c)):e),this instanceof a?(G.prototype=n.prototype,l=new G,G.prototype=u,c=n.apply(l,c),tt(c)?c:l):n.apply(l,c)}var o=nt(n),i=!e,f=t;return i&&(e=t),o||(t=n),a}function K(){for(var n,t={b:"k(m)",c:"",e:"m",f:"",h:"",i:r,j:!!o},e=0;n=arguments[e];e++)for(var u in n)t[u]=n[u];
|
||||
return n=t.a,t.d=/^[^,]+/.exec(n)[0],e="var i,m="+t.d+",u="+t.e+";if(!m)return u;"+t.h+";",t.b&&(e+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.f+"}}else{"),t.i&&t.j?e+="var s=-1,t=r[typeof m]?o(m):[],n=t.length;while(++s<n){i=t[s];"+t.f+"}":(e+="for(i in m){",t.i&&(e+="if(",t.i&&(e+="h.call(m,i)"),e+="){"),e+=t.f+";",t.i&&(e+="}"),e+="}"),t.b&&(e+="}"),e+=t.c+";return u",Et("h,j,k,l,o,p,r","return function("+n+"){"+e+"}")(Ht,Q,fe,rt,ce,R,q)}function M(n){return"\\"+B[n]}function U(n){return le[n]
|
||||
}function V(n){this.__wrapped__=n}function G(){}function H(n){var t=a;if(!n||Wt.call(n)!=S)return t;var e=n.constructor;return!nt(e)||e instanceof e?(ge(n,function(n,e){t=e}),t===a||Ht.call(n,t)):t}function J(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Nt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function L(n){return pe[n]}function Q(n){return Wt.call(n)==C}function W(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=a),typeof r=="function"){if(r=typeof u=="undefined"?r:R.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=tt(f)){var c=Wt.call(f);if(!$[c])return f;var l=fe(f)}if(!u||!t)return u?l?J(f):se({},f):f;switch(u=oe[c],c){case O:case I:return new u(+f);case N:case E:return new u(f);case A:return u(f.source,m.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Ht.call(n,"index")&&(f.index=n.index),Ht.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?lt:he)(n,function(n,u){f[u]=W(n,t,r,e,o,i)}),f}function X(n){var t=[];return ge(n,function(n,e){nt(n)&&t.push(e)
|
||||
}),t.sort()}function Y(n){for(var t=-1,e=ce(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Z(n,t,e,o,i,f){var c=e===p;if(e&&!c){e=typeof o=="undefined"?e:R.createCallback(e,o,2);var l=e(n,t);if(typeof l!="undefined")return!!l}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=Wt.call(n),s=Wt.call(t),v==C&&(v=S),s==C&&(s=S),v!=s)return a;switch(v){case O:case I:return+n==+t;
|
||||
case N:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case A:case E:return n==Rt(t)}if(s=v==x,!s){if(Ht.call(n,"__wrapped__")||Ht.call(t,"__wrapped__"))return Z(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=S)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!nt(v)||!(v instanceof v&&nt(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var h=0,l=r;if(i.push(n),f.push(t),s){if(v=n.length,h=t.length,l=h==n.length,!l&&!c)return l;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(l=Z(n[s],g,e,o,i,f)););else if(!(l=Z(n[h],g,e,o,i,f)))break;
|
||||
return l}return ge(t,function(t,r,u){return Ht.call(u,r)?(h++,l=Ht.call(n,r)&&Z(n[r],t,e,o,i,f)):void 0}),l&&!c&&ge(n,function(n,t,e){return Ht.call(e,t)?l=-1<--h:void 0}),l}function nt(n){return typeof n=="function"}function tt(n){return n?q[typeof n]:a}function et(n){return typeof n=="number"||Wt.call(n)==N}function rt(n){return typeof n=="string"||Wt.call(n)==E}function ut(n,t,e){var r=arguments,u=0,a=2;if(!tt(n))return n;if(e===p)var o=r[3],i=r[4],f=r[5];else i=[],f=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=R.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
|
||||
for(;++u<a;)(fe(r[u])?lt:he)(r[u],function(t,e){var r,u,a=t,l=n[e];if(t&&((u=fe(t))||c(t))){for(a=i.length;a--;)if(r=i[a]==t){l=f[a];break}r||(l=u?fe(l)?l:[]:c(l)?l:{},o&&(a=o(l,t),typeof a!="undefined"&&(l=a)),i.push(t),f.push(l),o||(l=ut(l,t,p,o,i,f)))}else o&&(a=o(l,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(l=a);n[e]=l});return n}function at(n){for(var t=-1,e=ce(n),r=e.length,u=Nt(r);++t<r;)u[t]=n[e[t]];return u}function ot(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?ee(0,u+e):e)||0,typeof u=="number"?o=-1<(rt(n)?n.indexOf(t,e):bt(n,t,e)):he(n,function(n){return++r<e?void 0:!(o=n===t)
|
||||
}),o}function it(n,t,e){var u=r;t=R.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 he(n,function(n,e,r){return u=!!t(n,e,r)});return u}function ft(n,t,e){var r=[];t=R.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 he(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ct(n,t,e){t=R.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return he(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 lt(n,t,e){var r=-1,u=n?n.length:0;if(typeof u=="number")for(t=t&&typeof e=="undefined"?t:R.createCallback(t,e);++r<u&&t(n[r],r,n)!==a;);else he(n,t,e);return n}function pt(n,t,e){var r=-1,u=n?n.length:0;if(t=R.createCallback(t,e),typeof u=="number")for(var a=Nt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],he(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function st(n,t,e){var r=-1/0,u=r;if(!t&&fe(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)
|
||||
}}else t=!t&&rt(n)?D:R.createCallback(t,e),lt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function vt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=R.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 he(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function gt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ce(n),u=i.length;return t=R.createCallback(t,r,4),lt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)
|
||||
}),e}function ht(n,t,e){var r;t=R.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 he(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function yt(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=-1;for(t=R.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return J(n,0,re(ee(0,r),a))}}function mt(n,t,e,r){var o=-1,i=n?n.length:0,f=[];for(typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a),e!=u&&(e=R.createCallback(e,r));++o<i;)r=n[o],e&&(r=e(r,o,n)),fe(r)?Jt.apply(f,t?r:mt(r)):f.push(r);
|
||||
return f}function bt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ee(0,u+e):e||0)-1;else if(e)return r=_t(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=R.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:ee(0,t);return J(n,r)}function _t(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?R.createCallback(e,r,1):xt,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function kt(n,t,e,r){var o=-1,i=n?n.length:0,f=[],c=f;
|
||||
typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a);var l=!t&&75<=i;if(l)var p={};for(e!=u&&(c=[],e=R.createCallback(e,r));++o<i;){r=n[o];var s=e?e(r,o,n):r;if(l)var v=Rt(s),v=Ht.call(p,v)?!(c=p[v]):c=p[v]=[];(t?!o||c[c.length-1]!==s:v||0>bt(c,s))&&((e||l)&&c.push(s),f.push(r))}return f}function jt(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 wt(n,t){return ie.fastBind||Xt&&2<arguments.length?Xt.call.apply(Xt,arguments):P(n,t,J(arguments,2))}function Ct(n){var t=J(arguments,1);
|
||||
return Qt(function(){n.apply(e,t)},1)}function xt(n){return n}function Ot(n){lt(X(n),function(t){var e=R[t]=n[t];R.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Jt.apply(t,arguments),t=e.apply(R,t),n&&typeof n=="object"&&n==t?this:new V(t)}})}function It(){return this.__wrapped__}i=i?F.defaults(n.Object(),i,F.pick(n,w)):n;var Nt=i.Array,St=i.Boolean,At=i.Date,Et=i.Function,$t=i.Math,qt=i.Number,Bt=i.Object,Ft=i.RegExp,Rt=i.String,Tt=Nt(),Dt=Bt(),zt=i._,Pt=Ft("^"+Rt(Dt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Kt=$t.ceil,Mt=i.clearTimeout,Ut=Tt.concat,Vt=$t.floor,Gt=Pt.test(Gt=Bt.getPrototypeOf)&&Gt,Ht=Dt.hasOwnProperty,Jt=Tt.push,Lt=i.setImmediate,Qt=i.setTimeout,Wt=Dt.toString,Xt=Pt.test(Xt=J.bind)&&Xt,Yt=Pt.test(Yt=Nt.isArray)&&Yt,Zt=i.isFinite,ne=i.isNaN,te=Pt.test(te=Bt.keys)&&te,ee=$t.max,re=$t.min,ue=i.parseInt,ae=$t.random,$t=Pt.test(i.attachEvent),$t=Xt&&!/\n|true/.test(Xt+$t),oe={};
|
||||
oe[x]=Nt,oe[O]=St,oe[I]=At,oe[S]=Bt,oe[N]=qt,oe[A]=Ft,oe[E]=Rt;var ie=R.support={};ie.fastBind=Xt&&!$t,R.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:b,variable:"",imports:{_:R}},St={a:"q,w,g",h:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",f:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},qt={a:"e,d,x",h:"d=d&&typeof x=='undefined'?d:p.createCallback(d,x)",b:a,f:"if(d(m[i],i,e)===false)return u"},Bt={h:"if(!r[typeof m])return u;"+qt.h,b:a},V.prototype=R.prototype;
|
||||
var Dt=K({a:"q",e:"[]",h:"if(!(r[typeof q]))return u",f:"u.push(i)",b:a}),fe=Yt||function(n){return n instanceof Nt||Wt.call(n)==x},ce=te?function(n){return tt(n)?te(n):[]}:Dt,le={"&":"&","<":"<",">":">",'"':""","'":"'"},pe=Y(le),se=K(St,{h:St.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=p.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),f:"u[i]=d?d(u[i],m[i]):m[i]"}),ve=K(St),ge=K(qt,Bt,{i:a}),he=K(qt,Bt);return $t&&f&&typeof Lt=="function"&&(Ct=wt(Lt,i)),Lt=8==ue("08")?ue:function(n,t){return ue(rt(n)?n.replace(d,""):n,t||0)
|
||||
},R.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},R.assign=se,R.at=function(n){for(var t=-1,e=Ut.apply(Tt,J(arguments,1)),r=e.length,u=Nt(r);++t<r;)u[t]=n[e[t]];return u},R.bind=wt,R.bindAll=function(n){for(var t=Ut.apply(Tt,arguments),e=1<t.length?0:(t=X(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=wt(n[u],n)}return n},R.bindKey=function(n,t){return P(n,t,J(arguments,2))},R.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},R.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},R.countBy=function(n,t,e){var r={};return t=R.createCallback(t,e),lt(n,function(n,e,u){e=Rt(t(n,e,u)),Ht.call(r,e)?r[e]++:r[e]=1}),r},R.createCallback=function(n,t,e){if(n==u)return xt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=ce(n);return function(t){for(var e=o.length,r=a;e--&&(r=Z(t[o[e]],n[o[e]],p)););return r}}return typeof t!="undefined"?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)}:n},R.debounce=function(n,t,e){function r(){f=u,e||(o=n.apply(i,a))}var a,o,i,f;return function(){var u=e&&!f;return a=arguments,i=this,Mt(f),f=Qt(r,t),u&&(o=n.apply(i,a)),o}},R.defaults=ve,R.defer=Ct,R.delay=function(n,t){var r=J(arguments,2);return Qt(function(){n.apply(e,r)},t)},R.difference=function(n){for(var t=-1,e=n?n.length:0,r=Ut.apply(Tt,arguments),r=T(r,e,100),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},R.filter=ft,R.flatten=mt,R.forEach=lt,R.forIn=ge,R.forOwn=he,R.functions=X,R.groupBy=function(n,t,e){var r={};return t=R.createCallback(t,e),lt(n,function(n,e,u){e=Rt(t(n,e,u)),(Ht.call(r,e)?r[e]:r[e]=[]).push(n)}),r},R.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=R.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return J(n,0,re(ee(0,a-r),a))},R.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;
|
||||
n:for(;++u<a;){var c=n[u];if(o)var l=Rt(c),l=Ht.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>bt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=T(t[p],0,100)))(c))continue n;i.push(c)}}return i},R.invert=Y,R.invoke=function(n,t){var e=J(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Nt(typeof a=="number"?a:0);return lt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},R.keys=ce,R.map=pt,R.max=st,R.memoize=function(n,t){var e={};return function(){var r=Rt(t?t.apply(this,arguments):arguments[0]);
|
||||
return Ht.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},R.merge=ut,R.min=function(n,t,e){var r=1/0,u=r;if(!t&&fe(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&rt(n)?D:R.createCallback(t,e),lt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},R.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=R.createCallback(t,e);else var a=Ut.apply(Tt,arguments);return ge(n,function(n,e,o){(r?!t(n,e,o):0>bt(a,e,1))&&(u[e]=n)}),u},R.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)
|
||||
}},R.pairs=function(n){for(var t=-1,e=ce(n),r=e.length,u=Nt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},R.partial=function(n){return P(n,J(arguments,1))},R.partialRight=function(n){return P(n,J(arguments,1),u,p)},R.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,a=Ut.apply(Tt,arguments),o=tt(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=R.createCallback(t,e),ge(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},R.pluck=pt,R.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);
|
||||
var r=-1;t=ee(0,Kt((t-n)/e));for(var a=Nt(t);++r<t;)a[r]=n,n+=e;return a},R.reject=function(n,t,e){return t=R.createCallback(t,e),ft(n,function(n,e,r){return!t(n,e,r)})},R.rest=dt,R.shuffle=function(n){var t=-1,e=n?n.length:0,r=Nt(typeof e=="number"?e:0);return lt(n,function(n){var e=Vt(ae()*(++t+1));r[t]=r[e],r[e]=n}),r},R.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=Nt(typeof u=="number"?u:0);for(t=R.createCallback(t,e),lt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(z);u--;)a[u]=a[u].c;
|
||||
return a},R.tap=function(n,t){return t(n),n},R.throttle=function(n,t){function e(){f=new At,i=u,a=n.apply(o,r)}var r,a,o,i,f=0;return function(){var c=new At,l=t-(c-f);return r=arguments,o=this,0<l?i||(i=Qt(e,l)):(Mt(i),i=u,f=c,a=n.apply(o,r)),a}},R.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Nt(n);for(t=R.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},R.toArray=function(n){return n&&typeof n.length=="number"?J(n):at(n)},R.union=function(){return kt(Ut.apply(Tt,arguments))},R.uniq=kt,R.values=at,R.where=ft,R.without=function(n){for(var t=-1,e=n?n.length:0,r=T(arguments,1,30),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},R.wrap=function(n,t){return function(){var e=[n];return Jt.apply(e,arguments),t.apply(this,e)}},R.zip=function(n){for(var t=-1,e=n?st(pt(arguments,"length")):0,r=Nt(e);++t<e;)r[t]=pt(arguments,t);return r},R.zipObject=jt,R.collect=pt,R.drop=dt,R.each=lt,R.extend=se,R.methods=X,R.object=jt,R.select=ft,R.tail=dt,R.unique=kt,Ot(R),R.clone=W,R.cloneDeep=function(n,t,e){return W(n,r,t,e)},R.contains=ot,R.escape=function(n){return n==u?"":Rt(n).replace(k,U)},R.every=it,R.find=ct,R.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=R.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},R.findKey=function(n,t,e){var r;return t=R.createCallback(t,e),he(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0}),r},R.has=function(n,t){return n?Ht.call(n,t):a},R.identity=xt,R.indexOf=bt,R.isArguments=Q,R.isArray=fe,R.isBoolean=function(n){return n===r||n===a||Wt.call(n)==O},R.isDate=function(n){return n instanceof At||Wt.call(n)==I},R.isElement=function(n){return n?1===n.nodeType:a},R.isEmpty=function(n){var t=r;if(!n)return t;
|
||||
var e=Wt.call(n),u=n.length;return e==x||e==E||e==C||e==S&&typeof u=="number"&&nt(n.splice)?!u:(he(n,function(){return t=a}),t)},R.isEqual=Z,R.isFinite=function(n){return Zt(n)&&!ne(parseFloat(n))},R.isFunction=nt,R.isNaN=function(n){return et(n)&&n!=+n},R.isNull=function(n){return n===u},R.isNumber=et,R.isObject=tt,R.isPlainObject=c,R.isRegExp=function(n){return n instanceof Ft||Wt.call(n)==A},R.isString=rt,R.isUndefined=function(n){return typeof n=="undefined"},R.lastIndexOf=function(n,t,e){var r=n?n.length:0;
|
||||
for(typeof e=="number"&&(r=(0>e?ee(0,r+e):re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},R.mixin=Ot,R.noConflict=function(){return i._=zt,this},R.parseInt=Lt,R.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Vt(ae()*((+t||0)-n+1))},R.reduce=vt,R.reduceRight=gt,R.result=function(n,t){var r=n?n[t]:e;return nt(r)?n[t]():r},R.runInContext=t,R.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ce(n).length},R.some=ht,R.sortedIndex=_t,R.template=function(n,t,u){var a=R.templateSettings;
|
||||
n||(n=""),u=ve({},u,a);var o,i=ve({},u.imports,a.imports),a=ce(i),i=at(i),f=0,c=u.interpolate||_,l="__p+='",c=Ft((u.escape||_).source+"|"+c.source+"|"+(c===b?y:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(j,M),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(s,""):l).replace(v,"$1").replace(g,"$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=Et(a,"return "+l).apply(e,i)}catch(h){throw h.source=l,h}return t?p(t):(p.source=l,p)},R.unescape=function(n){return n==u?"":Rt(n).replace(h,L)},R.uniqueId=function(n){var t=++l;return Rt(n==u?"":n)+t},R.all=it,R.any=ht,R.detect=ct,R.foldl=vt,R.foldr=gt,R.include=ot,R.inject=vt,he(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(){var t=[this.__wrapped__];return Jt.apply(t,arguments),n.apply(R,t)})}),R.first=yt,R.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;
|
||||
for(t=R.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return J(n,ee(0,a-r))}},R.take=yt,R.head=yt,he(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return t==u||e&&typeof t!="function"?r:new V(r)})}),R.VERSION="1.0.1",R.prototype.toString=function(){return Rt(this.__wrapped__)},R.prototype.value=It,R.prototype.valueOf=It,lt(["join","pop","shift"],function(n){var t=Tt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),lt(["push","reverse","sort","unshift"],function(n){var t=Tt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),lt(["concat","slice","splice"],function(n){var t=Tt[n];R.prototype[n]=function(){return new V(t.apply(this.__wrapped__,arguments))}}),R}var e,r=!0,u=null,a=!1,i=typeof exports=="object"&&exports,f=typeof module=="object"&&module&&module.exports==i&&module,c=typeof global=="object"&&global;c.global===c&&(n=c);var l=0,p={},s=/\b__p\+='';/g,v=/\b(__p\+=)''\+/g,g=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,y=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/\w*$/,b=/<%=([\s\S]+?)%>/g,d=/^0+(?=.$)/,_=/($^)/,k=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),C="[object Arguments]",x="[object Array]",O="[object Boolean]",I="[object Date]",N="[object Number]",S="[object Object]",A="[object RegExp]",E="[object String]",$={"[object Function]":a};
|
||||
$[C]=$[x]=$[O]=$[I]=$[N]=$[S]=$[A]=$[E]=r;var q={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},B={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},F=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=F,define(function(){return F})):i&&!i.nodeType?f?(f.exports=F)._=F:i._=F:n._=F})(this);
|
||||
250
dist/lodash.underscore.js
vendored
250
dist/lodash.underscore.js
vendored
@@ -425,6 +425,58 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass)) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor)) || ctor instanceof ctor) {
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @type Function
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
var shimKeys = function (object) {
|
||||
var index, iterable = object, result = [];
|
||||
if (!iterable) return result;
|
||||
if (!(objectTypes[typeof object])) return result;
|
||||
|
||||
for (index in iterable) {
|
||||
if (hasOwnProperty.call(iterable, index)) {
|
||||
result.push(index);
|
||||
}
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
/**
|
||||
* Slices the `collection` from the `start` index up to, but not including,
|
||||
* the `end` index.
|
||||
@@ -492,82 +544,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = function (collection, callback) {
|
||||
var index, iterable = collection, result = iterable;
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
callback || (callback = identity);
|
||||
|
||||
for (index in iterable) {
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = function (collection, callback) {
|
||||
var index, iterable = collection, result = iterable;
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
callback || (callback = identity);
|
||||
|
||||
for (index in iterable) {
|
||||
if (hasOwnProperty.call(iterable, index)) {
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
/**
|
||||
* Checks if `value` is an array.
|
||||
*
|
||||
@@ -610,52 +586,6 @@
|
||||
return nativeKeys(object);
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass)) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor)) || ctor instanceof ctor) {
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
function shimKeys(object) {
|
||||
var result = [];
|
||||
forOwn(object, function(value, key) {
|
||||
result.push(key);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to convert characters to HTML entities:
|
||||
*
|
||||
@@ -807,6 +737,82 @@
|
||||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = function (collection, callback) {
|
||||
var index, iterable = collection, result = iterable;
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
callback || (callback = identity);
|
||||
|
||||
for (index in iterable) {
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = function (collection, callback) {
|
||||
var index, iterable = collection, result = iterable;
|
||||
if (!iterable) return result;
|
||||
if (!objectTypes[typeof iterable]) return result;
|
||||
callback || (callback = identity);
|
||||
|
||||
for (index in iterable) {
|
||||
if (hasOwnProperty.call(iterable, index)) {
|
||||
if (callback(iterable[index], index, collection) === indicatorObject) return result;
|
||||
}
|
||||
}
|
||||
return result
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a sorted array of all enumerable properties, own and inherited,
|
||||
* of `object` that have function values.
|
||||
|
||||
56
dist/lodash.underscore.min.js
vendored
56
dist/lodash.underscore.min.js
vendored
@@ -4,31 +4,31 @@
|
||||
* Build: `lodash underscore -o ./dist/lodash.underscore.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(n,t){var r;if(n&&st[typeof n])for(r in t||(t=W),n)if(jt.call(n,r)&&t(n[r],r,n)===Z)break}function r(n,t){var r;if(n&&st[typeof n])for(r in t||(t=W),n)if(t(n[r],r,n)===Z)break}function e(n){return n instanceof e?n:new f(n)}function u(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 o(n,t,r){function e(){var a=arguments,f=o?this:t;return u||(n=t[i]),r.length&&(a=a.length?(a=l(a),r.concat(a)):r),this instanceof e?(c.prototype=n.prototype,f=new c,c.prototype=J,a=n.apply(f,a),j(a)?a:f):n.apply(f,a)
|
||||
}var u=d(n),o=!r,i=t;return o&&(r=t),u||(t=n),e}function i(n){return"\\"+vt[n]}function a(n){return It[n]}function f(n){this.__wrapped__=n}function c(){}function l(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function p(n){return Tt[n]}function s(n){return xt.call(n)==ut}function v(n){var r=[];return t(n,function(n,t){r.push(t)}),r}function g(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 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]==J&&(n[u]=e[u])}return n}function y(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)}),t.sort()}function m(n){for(var t=-1,r=$t(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function _(n){if(!n)return H;if(Mt(n)||A(n))return!n.length;for(var t in n)if(jt.call(n,t))return K;return H}function b(n,t,u,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 K;if(n==J||t==J)return n===t;if(a=xt.call(n),i=xt.call(t),a!=i)return K;switch(a){case it:case at:return+n==+t;case ft:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case lt:case pt:return n==t+""}if(i=a==ot,!i){if(n instanceof e||t instanceof e)return b(n.__wrapped__||n,t.__wrapped__||t,u,o);if(a!=ct)return K;var a=n.constructor,f=t.constructor;if(a!=f&&(!d(a)||!(a instanceof a&&d(f)&&f instanceof f)))return K
|
||||
}for(u||(u=[]),o||(o=[]),a=u.length;a--;)if(u[a]==n)return o[a]==t;var c=H,l=0;if(u.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=b(n[l],t[l],u,o)););return c}return r(t,function(t,r,e){return jt.call(e,r)?(l++,!(c=jt.call(n,r)&&b(n[r],t,u,o))&&Z):void 0}),c&&r(n,function(n,t,r){return jt.call(r,t)?!(c=-1<--l)&&Z:void 0}),c}function d(n){return typeof n=="function"}function j(n){return n?st[typeof n]:K}function w(n){return typeof n=="number"||xt.call(n)==ft}function A(n){return typeof n=="string"||xt.call(n)==pt
|
||||
}function x(n){for(var t=-1,r=$t(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function O(n,r){var e=K;return typeof(n?n.length:0)=="number"?e=-1<T(n,r):t(n,function(n){return(e=n===r)&&Z}),e}function E(n,r,e){var u=H;r=V(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))&&Z});return u}function S(n,r,e){var u=[];r=V(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 N(n,r,e){r=V(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,Z):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function k(n,r,e){var u=-1,o=n?n.length:0;if(typeof o=="number")for(r=r&&typeof e=="undefined"?r:V(r,e);++u<o&&r(n[u],u,n)!==Z;);else t(n,r)}function B(n,r,e){var u=-1,o=n?n.length:0;if(r=V(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 F(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=V(t,r),k(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,r,e,u){if(!n)return e;var o=3>arguments.length;r=V(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=K,n):r(e,n,t,u)});return e}function q(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=$t(n),u=i.length;
|
||||
return t=V(t,e,4),k(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=K,n[a]):t(r,n[a],a,f)}),r}function D(n,r,e){var u;r=V(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))&&Z});return!!u}function M(n,t,r){return r&&_(t)?J:(r?N:S)(n,t)}function $(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=J){var o=-1;for(t=V(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[0];return l(n,0,Ft(Bt(0,e),u))}}function I(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];
|
||||
Mt(o)?wt.apply(u,t?o:I(o)):u.push(o)}return u}function T(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Bt(0,u+r):r||0)-1;else if(r)return e=C(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function z(n,t,r){if(typeof t!="number"&&t!=J){var e=0,u=-1,o=n?n.length:0;for(t=V(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==J||r?1:Bt(0,t);return l(n,e)}function C(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?V(r,e,1):W,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function P(n,t,r,e){var u=-1,o=n?n.length:0,i=[],a=i;
|
||||
for(typeof t!="boolean"&&t!=J&&(e=r,r=t,t=K),r!=J&&(a=[],r=V(r,e));++u<o;){e=n[u];var f=r?r(e,u,n):e;(t?!u||a[a.length-1]!==f:0>T(a,f))&&(r&&a.push(f),i.push(e))}return i}function U(n,t){return Dt.fastBind||Ot&&2<arguments.length?Ot.call.apply(Ot,arguments):o(n,t,l(arguments,2))}function V(n,t,r){if(n==J)return W;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=$t(n);return function(t){for(var r=u.length,e=K;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t!="undefined"?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)}:n}function W(n){return n}function G(n){k(y(n),function(t){var r=e[t]=n[t];e.prototype[t]=function(){var n=[this.__wrapped__];return wt.apply(n,arguments),n=r.apply(e,n),this.__chain__&&(n=new f(n),n.__chain__=H),n}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof module=="object"&&module&&module.exports==L&&module,X=typeof global=="object"&&global;
|
||||
X.global===X&&(n=X);var Y=0,Z={},nt=/&(?:amp|lt|gt|quot|#39);/g,tt=/($^)/,rt=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,ut="[object Arguments]",ot="[object Array]",it="[object Boolean]",at="[object Date]",ft="[object Number]",ct="[object Object]",lt="[object RegExp]",pt="[object String]",st={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},vt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},gt=[],X={},ht=n._,yt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),mt=Math.ceil,_t=n.clearTimeout,bt=gt.concat,dt=Math.floor,jt=X.hasOwnProperty,wt=gt.push,At=n.setTimeout,xt=X.toString,Ot=yt.test(Ot=l.bind)&&Ot,Et=yt.test(Et=Array.isArray)&&Et,St=n.isFinite,Nt=n.isNaN,kt=yt.test(kt=Object.keys)&&kt,Bt=Math.max,Ft=Math.min,Rt=Math.random,X=yt.test(n.attachEvent),qt=Ot&&!/\n|true/.test(Ot+X),Dt={};
|
||||
(function(){var n={0:1,length:1};Dt.argsObject=arguments.constructor==Object,Dt.fastBind=Ot&&!qt,Dt.spliceObjects=(gt.splice.call(n,0,1),!n[0])})(1),e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},f.prototype=e.prototype,s(arguments)||(s=function(n){return n?jt.call(n,"callee"):K});var Mt=Et||function(n){return Dt.argsObject&&n instanceof Array||xt.call(n)==ot},$t=kt?function(n){return j(n)?kt(n):[]}:v,It={"&":"&","<":"<",">":">",'"':""","'":"'"},Tt=m(It);
|
||||
d(/x/)&&(d=function(n){return n instanceof Function||"[object Function]"==xt.call(n)});var zt=B;e.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},e.bind=U,e.bindAll=function(n){for(var t=bt.apply(gt,arguments),r=1<t.length?0:(t=y(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=U(n[u],n)}return n},e.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},e.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},e.countBy=function(n,t,r){var e={};return t=V(t,r),k(n,function(n,r,u){r=t(n,r,u)+"",jt.call(e,r)?e[r]++:e[r]=1}),e},e.debounce=function(n,t,r){function e(){a=J,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,_t(a),a=At(e,t),f&&(o=n.apply(i,u)),o}},e.defaults=h,e.defer=function(n){var t=l(arguments,1);return At(function(){n.apply(void 0,t)},1)},e.delay=function(n,t){var r=l(arguments,2);return At(function(){n.apply(void 0,r)},t)},e.difference=function(n){for(var t=-1,r=n.length,e=bt.apply(gt,arguments),u=[];++t<r;){var o=n[t];
|
||||
0>T(e,o,r)&&u.push(o)}return u},e.filter=S,e.flatten=I,e.forEach=k,e.functions=y,e.groupBy=function(n,t,r){var e={};return t=V(t,r),k(n,function(n,r,u){r=t(n,r,u)+"",(jt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},e.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&t!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else e=t==J||r?1:t||e;return l(n,0,Ft(Bt(0,u-e),u))},e.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>T(o,i)){for(var a=r;--a;)if(0>T(t[a],i))continue n;
|
||||
o.push(i)}}return o},e.invert=m,e.invoke=function(n,t){var r=l(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return k(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},e.keys=$t,e.map=B,e.max=F,e.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return jt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},e.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=V(t,r),k(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},e.omit=function(n){var t=bt.apply(gt,arguments),e={};return r(n,function(n,r){0>T(t,r,1)&&(e[r]=n)}),e},e.once=function(n){var t,r;return function(){return t?r:(t=H,r=n.apply(this,arguments),n=J,r)}},e.pairs=function(n){for(var t=-1,r=$t(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},e.partial=function(n){return o(n,l(arguments,1))},e.pick=function(n){for(var t=0,r=bt.apply(gt,arguments),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])
|
||||
}return u},e.pluck=zt,e.range=function(n,t,r){n=+n||0,r=+r||1,t==J&&(t=n,n=0);var e=-1;t=Bt(0,mt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;return u},e.reject=function(n,t,r){return t=V(t,r),S(n,function(n,r,e){return!t(n,r,e)})},e.rest=z,e.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return k(n,function(n){var r=dt(Rt()*(++t+1));e[t]=e[r],e[r]=n}),e},e.sortBy=function(n,t,r){var e=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=V(t,r),k(n,function(n,r,u){i[++e]={a:t(n,r,u),b:e,c:n}
|
||||
}),o=i.length,i.sort(u);o--;)i[o]=i[o].c;return i},e.tap=function(n,t){return t(n),n},e.throttle=function(n,t){function r(){a=new Date,i=J,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,0<c?i||(i=At(r,c)):(_t(i),i=J,a=f,u=n.apply(o,e)),u}},e.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},e.toArray=function(n){return n&&typeof n.length=="number"?l(n):x(n)},e.union=function(){return P(bt.apply(gt,arguments))
|
||||
},e.uniq=P,e.values=x,e.where=M,e.without=function(n){for(var t=-1,r=n.length,e=[];++t<r;){var u=n[t];0>T(arguments,u,1)&&e.push(u)}return e},e.wrap=function(n,t){return function(){var r=[n];return wt.apply(r,arguments),t.apply(this,r)}},e.zip=function(n){for(var t=-1,r=n?F(zt(arguments,"length")):0,e=Array(r);++t<r;)e[t]=zt(arguments,t);return e},e.collect=B,e.drop=z,e.each=k,e.extend=g,e.methods=y,e.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},e.select=S,e.tail=z,e.unique=P,e.clone=function(n){return j(n)?Mt(n)?l(n):g({},n):n},e.contains=O,e.escape=function(n){return n==J?"":(n+"").replace(rt,a)},e.every=E,e.find=N,e.findWhere=function(n,t){return M(n,t,H)},e.has=function(n,t){return n?jt.call(n,t):K},e.identity=W,e.indexOf=T,e.isArguments=s,e.isArray=Mt,e.isBoolean=function(n){return n===H||n===K||xt.call(n)==it},e.isDate=function(n){return n instanceof Date||xt.call(n)==at},e.isElement=function(n){return n?1===n.nodeType:K
|
||||
},e.isEmpty=_,e.isEqual=b,e.isFinite=function(n){return St(n)&&!Nt(parseFloat(n))},e.isFunction=d,e.isNaN=function(n){return w(n)&&n!=+n},e.isNull=function(n){return n===J},e.isNumber=w,e.isObject=j,e.isRegExp=function(n){return n instanceof RegExp||xt.call(n)==lt},e.isString=A,e.isUndefined=function(n){return typeof n=="undefined"},e.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Bt(0,e+r):Ft(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},e.mixin=G,e.noConflict=function(){return n._=ht,this
|
||||
},e.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+dt(Rt()*((+t||0)-n+1))},e.reduce=R,e.reduceRight=q,e.result=function(n,t){var r=n?n[t]:J;return d(r)?n[t]():r},e.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:$t(n).length},e.some=D,e.sortedIndex=C,e.template=function(n,t,r){n||(n=""),r=h({},r,e.templateSettings);var u=0,o="__p+='",a=r.variable;n.replace(RegExp((r.escape||tt).source+"|"+(r.interpolate||tt).source+"|"+(r.evaluate||tt).source+"|$","g"),function(t,r,e,a,f){return o+=n.slice(u,f).replace(et,i),r&&(o+="'+_['escape']("+r+")+'"),a&&(o+="';"+a+";__p+='"),e&&(o+="'+((__t=("+e+"))==null?'':__t)+'"),u=f+t.length,t
|
||||
}),o+="';\n",a||(a="obj",o="with("+a+"||{}){"+o+"}"),o="function("+a+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";try{var f=Function("_","return "+o)(e)}catch(c){throw c.source=o,c}return t?f(t):(f.source=o,f)},e.unescape=function(n){return n==J?"":(n+"").replace(nt,p)},e.uniqueId=function(n){var t=++Y+"";return n?n+t:t},e.all=E,e.any=D,e.detect=N,e.foldl=R,e.foldr=q,e.include=O,e.inject=R,e.first=$,e.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&t!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[u-1];return l(n,Bt(0,u-e))}},e.take=$,e.head=$,e.chain=function(n){return n=new f(n),n.__chain__=H,n},e.VERSION="1.0.1",G(e),e.prototype.chain=function(){return this.__chain__=H,this},e.prototype.value=function(){return this.__wrapped__},k("pop push reverse shift sort splice unshift".split(" "),function(n){var t=gt[n];e.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!Dt.spliceObjects&&0===n.length&&delete n[0],this
|
||||
}}),k(["concat","join","slice"],function(n){var t=gt[n];e.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new f(n),n.__chain__=H),n}}),L&&!L.nodeType?Q?(Q.exports=e)._=e:L._=e:n._=e})(this);
|
||||
;(function(n){function t(n,t){var r;if(n&&st[typeof n])for(r in t||(t=W),n)if(jt.call(n,r)&&t(n[r],r,n)===Z)break}function r(n,t){var r;if(n&&st[typeof n])for(r in t||(t=W),n)if(t(n[r],r,n)===Z)break}function e(n){var t,r=[];if(!n||!st[typeof n])return r;for(t in n)jt.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new c(n)}function o(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 i(n,t,r){function e(){var a=arguments,f=o?this:t;
|
||||
return u||(n=t[i]),r.length&&(a=a.length?(a=p(a),r.concat(a)):r),this instanceof e?(l.prototype=n.prototype,f=new l,l.prototype=J,a=n.apply(f,a),j(a)?a:f):n.apply(f,a)}var u=d(n),o=!r,i=t;return o&&(r=t),u||(t=n),e}function a(n){return"\\"+vt[n]}function f(n){return It[n]}function c(n){this.__wrapped__=n}function l(){}function p(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Array(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function s(n){return Tt[n]}function v(n){return xt.call(n)==ut
|
||||
}function g(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 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]==J&&(n[u]=e[u])}return n}function y(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)}),t.sort()}function m(n){for(var t=-1,r=$t(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function _(n){if(!n)return H;if(Mt(n)||A(n))return!n.length;for(var t in n)if(jt.call(n,t))return K;
|
||||
return H}function b(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 K;if(n==J||t==J)return n===t;if(a=xt.call(n),i=xt.call(t),a!=i)return K;switch(a){case it:case at:return+n==+t;case ft:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case lt:case pt:return n==t+""}if(i=a==ot,!i){if(n instanceof u||t instanceof u)return b(n.__wrapped__||n,t.__wrapped__||t,e,o);if(a!=ct)return K;var a=n.constructor,f=t.constructor;
|
||||
if(a!=f&&(!d(a)||!(a instanceof a&&d(f)&&f instanceof f)))return K}for(e||(e=[]),o||(o=[]),a=e.length;a--;)if(e[a]==n)return o[a]==t;var c=H,l=0;if(e.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=b(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return jt.call(u,r)?(l++,!(c=jt.call(n,r)&&b(n[r],t,e,o))&&Z):void 0}),c&&r(n,function(n,t,r){return jt.call(r,t)?!(c=-1<--l)&&Z:void 0}),c}function d(n){return typeof n=="function"}function j(n){return n?st[typeof n]:K}function w(n){return typeof n=="number"||xt.call(n)==ft
|
||||
}function A(n){return typeof n=="string"||xt.call(n)==pt}function x(n){for(var t=-1,r=$t(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function O(n,r){var e=K;return typeof(n?n.length:0)=="number"?e=-1<T(n,r):t(n,function(n){return(e=n===r)&&Z}),e}function E(n,r,e){var u=H;r=V(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))&&Z});return u}function S(n,r,e){var u=[];r=V(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 N(n,r,e){r=V(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,Z):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function k(n,r,e){var u=-1,o=n?n.length:0;if(typeof o=="number")for(r=r&&typeof e=="undefined"?r:V(r,e);++u<o&&r(n[u],u,n)!==Z;);else t(n,r)}function B(n,r,e){var u=-1,o=n?n.length:0;if(r=V(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 F(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=V(t,r),k(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,r,e,u){if(!n)return e;var o=3>arguments.length;r=V(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=K,n):r(e,n,t,u)});return e}function q(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;
|
||||
if(typeof u!="number")var i=$t(n),u=i.length;return t=V(t,e,4),k(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=K,n[a]):t(r,n[a],a,f)}),r}function D(n,r,e){var u;r=V(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))&&Z});return!!u}function M(n,t,r){return r&&_(t)?J:(r?N:S)(n,t)}function $(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=J){var o=-1;for(t=V(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[0];return p(n,0,Ft(Bt(0,e),u))
|
||||
}}function I(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Mt(o)?wt.apply(u,t?o:I(o)):u.push(o)}return u}function T(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Bt(0,u+r):r||0)-1;else if(r)return e=C(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function z(n,t,r){if(typeof t!="number"&&t!=J){var e=0,u=-1,o=n?n.length:0;for(t=V(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==J||r?1:Bt(0,t);return p(n,e)}function C(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?V(r,e,1):W,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;
|
||||
return u}function P(n,t,r,e){var u=-1,o=n?n.length:0,i=[],a=i;for(typeof t!="boolean"&&t!=J&&(e=r,r=t,t=K),r!=J&&(a=[],r=V(r,e));++u<o;){e=n[u];var f=r?r(e,u,n):e;(t?!u||a[a.length-1]!==f:0>T(a,f))&&(r&&a.push(f),i.push(e))}return i}function U(n,t){return Dt.fastBind||Ot&&2<arguments.length?Ot.call.apply(Ot,arguments):i(n,t,p(arguments,2))}function V(n,t,r){if(n==J)return W;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=$t(n);return function(t){for(var r=u.length,e=K;r--&&(e=t[u[r]]===n[u[r]]););return e
|
||||
}}return typeof t!="undefined"?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)}:n}function W(n){return n}function G(n){k(y(n),function(t){var r=u[t]=n[t];u.prototype[t]=function(){var n=[this.__wrapped__];return wt.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new c(n),n.__chain__=H),n}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof module=="object"&&module&&module.exports==L&&module,X=typeof global=="object"&&global;
|
||||
X.global===X&&(n=X);var Y=0,Z={},nt=/&(?:amp|lt|gt|quot|#39);/g,tt=/($^)/,rt=/[&<>"']/g,et=/['\n\r\t\u2028\u2029\\]/g,ut="[object Arguments]",ot="[object Array]",it="[object Boolean]",at="[object Date]",ft="[object Number]",ct="[object Object]",lt="[object RegExp]",pt="[object String]",st={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},vt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},gt=[],X={},ht=n._,yt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),mt=Math.ceil,_t=n.clearTimeout,bt=gt.concat,dt=Math.floor,jt=X.hasOwnProperty,wt=gt.push,At=n.setTimeout,xt=X.toString,Ot=yt.test(Ot=p.bind)&&Ot,Et=yt.test(Et=Array.isArray)&&Et,St=n.isFinite,Nt=n.isNaN,kt=yt.test(kt=Object.keys)&&kt,Bt=Math.max,Ft=Math.min,Rt=Math.random,X=yt.test(n.attachEvent),qt=Ot&&!/\n|true/.test(Ot+X),Dt={};
|
||||
(function(){var n={0:1,length:1};Dt.argsObject=arguments.constructor==Object,Dt.fastBind=Ot&&!qt,Dt.spliceObjects=(gt.splice.call(n,0,1),!n[0])})(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},c.prototype=u.prototype,v(arguments)||(v=function(n){return n?jt.call(n,"callee"):K});var Mt=Et||function(n){return Dt.argsObject&&n instanceof Array||xt.call(n)==ot},$t=kt?function(n){return j(n)?kt(n):[]}:e,It={"&":"&","<":"<",">":">",'"':""","'":"'"},Tt=m(It);
|
||||
d(/x/)&&(d=function(n){return n instanceof Function||"[object Function]"==xt.call(n)});var zt=B;u.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},u.bind=U,u.bindAll=function(n){for(var t=bt.apply(gt,arguments),r=1<t.length?0:(t=y(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=U(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=V(t,r),k(n,function(n,r,u){r=t(n,r,u)+"",jt.call(e,r)?e[r]++:e[r]=1}),e},u.debounce=function(n,t,r){function e(){a=J,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,_t(a),a=At(e,t),f&&(o=n.apply(i,u)),o}},u.defaults=h,u.defer=function(n){var t=p(arguments,1);return At(function(){n.apply(void 0,t)},1)},u.delay=function(n,t){var r=p(arguments,2);return At(function(){n.apply(void 0,r)},t)},u.difference=function(n){for(var t=-1,r=n.length,e=bt.apply(gt,arguments),u=[];++t<r;){var o=n[t];
|
||||
0>T(e,o,r)&&u.push(o)}return u},u.filter=S,u.flatten=I,u.forEach=k,u.functions=y,u.groupBy=function(n,t,r){var e={};return t=V(t,r),k(n,function(n,r,u){r=t(n,r,u)+"",(jt.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!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else e=t==J||r?1:t||e;return p(n,0,Ft(Bt(0,u-e),u))},u.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>T(o,i)){for(var a=r;--a;)if(0>T(t[a],i))continue n;
|
||||
o.push(i)}}return o},u.invert=m,u.invoke=function(n,t){var r=p(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return k(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},u.keys=$t,u.map=B,u.max=F,u.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return jt.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=V(t,r),k(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=bt.apply(gt,arguments),e={};return r(n,function(n,r){0>T(t,r,1)&&(e[r]=n)}),e},u.once=function(n){var t,r;return function(){return t?r:(t=H,r=n.apply(this,arguments),n=J,r)}},u.pairs=function(n){for(var t=-1,r=$t(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 i(n,p(arguments,1))},u.pick=function(n){for(var t=0,r=bt.apply(gt,arguments),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])
|
||||
}return u},u.pluck=zt,u.range=function(n,t,r){n=+n||0,r=+r||1,t==J&&(t=n,n=0);var e=-1;t=Bt(0,mt((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=V(t,r),S(n,function(n,r,e){return!t(n,r,e)})},u.rest=z,u.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return k(n,function(n){var r=dt(Rt()*(++t+1));e[t]=e[r],e[r]=n}),e},u.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,i=Array(typeof u=="number"?u:0);for(t=V(t,r),k(n,function(n,r,u){i[++e]={a:t(n,r,u),b:e,c:n}
|
||||
}),u=i.length,i.sort(o);u--;)i[u]=i[u].c;return i},u.tap=function(n,t){return t(n),n},u.throttle=function(n,t){function r(){a=new Date,i=J,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,0<c?i||(i=At(r,c)):(_t(i),i=J,a=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 n&&typeof n.length=="number"?p(n):x(n)},u.union=function(){return P(bt.apply(gt,arguments))
|
||||
},u.uniq=P,u.values=x,u.where=M,u.without=function(n){for(var t=-1,r=n.length,e=[];++t<r;){var u=n[t];0>T(arguments,u,1)&&e.push(u)}return e},u.wrap=function(n,t){return function(){var r=[n];return wt.apply(r,arguments),t.apply(this,r)}},u.zip=function(n){for(var t=-1,r=n?F(zt(arguments,"length")):0,e=Array(r);++t<r;)e[t]=zt(arguments,t);return e},u.collect=B,u.drop=z,u.each=k,u.extend=g,u.methods=y,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=S,u.tail=z,u.unique=P,u.clone=function(n){return j(n)?Mt(n)?p(n):g({},n):n},u.contains=O,u.escape=function(n){return n==J?"":(n+"").replace(rt,f)},u.every=E,u.find=N,u.findWhere=function(n,t){return M(n,t,H)},u.has=function(n,t){return n?jt.call(n,t):K},u.identity=W,u.indexOf=T,u.isArguments=v,u.isArray=Mt,u.isBoolean=function(n){return n===H||n===K||xt.call(n)==it},u.isDate=function(n){return n instanceof Date||xt.call(n)==at},u.isElement=function(n){return n?1===n.nodeType:K
|
||||
},u.isEmpty=_,u.isEqual=b,u.isFinite=function(n){return St(n)&&!Nt(parseFloat(n))},u.isFunction=d,u.isNaN=function(n){return w(n)&&n!=+n},u.isNull=function(n){return n===J},u.isNumber=w,u.isObject=j,u.isRegExp=function(n){return n instanceof RegExp||xt.call(n)==lt},u.isString=A,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?Bt(0,e+r):Ft(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=G,u.noConflict=function(){return n._=ht,this
|
||||
},u.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+dt(Rt()*((+t||0)-n+1))},u.reduce=R,u.reduceRight=q,u.result=function(n,t){var r=n?n[t]:J;return d(r)?n[t]():r},u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:$t(n).length},u.some=D,u.sortedIndex=C,u.template=function(n,t,r){n||(n=""),r=h({},r,u.templateSettings);var e=0,o="__p+='",i=r.variable;n.replace(RegExp((r.escape||tt).source+"|"+(r.interpolate||tt).source+"|"+(r.evaluate||tt).source+"|$","g"),function(t,r,u,i,f){return o+=n.slice(e,f).replace(et,a),r&&(o+="'+_['escape']("+r+")+'"),i&&(o+="';"+i+";__p+='"),u&&(o+="'+((__t=("+u+"))==null?'':__t)+'"),e=f+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 f=Function("_","return "+o)(u)}catch(c){throw c.source=o,c}return t?f(t):(f.source=o,f)},u.unescape=function(n){return n==J?"":(n+"").replace(nt,s)},u.uniqueId=function(n){var t=++Y+"";return n?n+t:t},u.all=E,u.any=D,u.detect=N,u.foldl=R,u.foldr=q,u.include=O,u.inject=R,u.first=$,u.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&t!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[u-1];return p(n,Bt(0,u-e))}},u.take=$,u.head=$,u.chain=function(n){return n=new c(n),n.__chain__=H,n},u.VERSION="1.0.1",G(u),u.prototype.chain=function(){return this.__chain__=H,this},u.prototype.value=function(){return this.__wrapped__},k("pop push reverse shift sort splice unshift".split(" "),function(n){var t=gt[n];u.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!Dt.spliceObjects&&0===n.length&&delete n[0],this
|
||||
}}),k(["concat","join","slice"],function(n){var t=gt[n];u.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new c(n),n.__chain__=H),n}}),L&&!L.nodeType?Q?(Q.exports=u)._=u:L._=u:n._=u})(this);
|
||||
255
doc/README.md
255
doc/README.md
@@ -185,7 +185,6 @@
|
||||
* [`_.support.argsObject`](#_supportargsobject)
|
||||
* [`_.support.enumPrototypes`](#_supportenumprototypes)
|
||||
* [`_.support.fastBind`](#_supportfastbind)
|
||||
* [`_.support.fastKeys`](#_supportfastkeys)
|
||||
* [`_.support.nonEnumArgs`](#_supportnonenumargs)
|
||||
* [`_.support.nonEnumShadows`](#_supportnonenumshadows)
|
||||
* [`_.support.ownLast`](#_supportownlast)
|
||||
@@ -214,7 +213,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3253 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3248 "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.
|
||||
|
||||
@@ -238,7 +237,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#L3283 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3278 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -263,7 +262,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findindexcollection--callbackidentity-thisarg"></a>`_.findIndex(collection [, callback=identity, thisArg])`
|
||||
<a href="#_findindexcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3317 "View in source") [Ⓣ][1]
|
||||
<a href="#_findindexcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3312 "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.
|
||||
|
||||
@@ -289,7 +288,7 @@ _.findIndex(['apple', 'banana', 'beet'], function(food) { return /^b/.test(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#L3387 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3382 "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)*.
|
||||
|
||||
@@ -349,7 +348,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#L3449 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3444 "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)*.
|
||||
|
||||
@@ -392,7 +391,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#L3502 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3497 "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.
|
||||
|
||||
@@ -424,7 +423,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#L3576 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3571 "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)*.
|
||||
|
||||
@@ -481,7 +480,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#L3610 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3605 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -505,7 +504,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#L3702 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3697 "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).
|
||||
|
||||
@@ -562,7 +561,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#L3743 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3738 "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.
|
||||
|
||||
@@ -591,7 +590,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#L3784 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3779 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
|
||||
|
||||
@@ -629,7 +628,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#L3863 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3858 "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)*.
|
||||
|
||||
@@ -689,7 +688,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#L3927 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3922 "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)*.
|
||||
|
||||
@@ -738,7 +737,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#L3959 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3954 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -762,7 +761,7 @@ _.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#L4006 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4001 "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)*.
|
||||
|
||||
@@ -809,7 +808,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- 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#L4065 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4060 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -834,7 +833,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#L4096 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4091 "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.
|
||||
|
||||
@@ -858,7 +857,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#L4125 "View in source") [Ⓣ][1]
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4120 "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`.
|
||||
|
||||
@@ -893,7 +892,7 @@ _.zipObject(['moe', 'larry'], [30, 40]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_value"></a>`_(value)`
|
||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L243 "View in source") [Ⓣ][1]
|
||||
<a href="#_value">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L242 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a `lodash` object, that wraps the given `value`, to enable method chaining.
|
||||
|
||||
@@ -924,7 +923,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5150 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5145 "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.
|
||||
|
||||
@@ -954,7 +953,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#L5167 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5162 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -975,7 +974,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#L5184 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5179 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1006,7 +1005,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#L2244 "View in source") [Ⓣ][1]
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2239 "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.
|
||||
|
||||
@@ -1034,7 +1033,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#L2286 "View in source") [Ⓣ][1]
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2281 "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.
|
||||
|
||||
@@ -1072,7 +1071,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#L2340 "View in source") [Ⓣ][1]
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2335 "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)*.
|
||||
|
||||
@@ -1108,7 +1107,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#L2392 "View in source") [Ⓣ][1]
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2387 "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)*.
|
||||
|
||||
@@ -1154,7 +1153,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#L2453 "View in source") [Ⓣ][1]
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2448 "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)*.
|
||||
|
||||
@@ -1200,7 +1199,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#L2518 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2513 "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)*.
|
||||
|
||||
@@ -1247,7 +1246,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#L2565 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2560 "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`.
|
||||
|
||||
@@ -1279,7 +1278,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#L2615 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2610 "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)*.
|
||||
|
||||
@@ -1316,7 +1315,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#L2648 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2643 "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`.
|
||||
|
||||
@@ -1345,7 +1344,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#L2700 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2695 "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)*.
|
||||
|
||||
@@ -1390,7 +1389,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#L2757 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2752 "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)*.
|
||||
|
||||
@@ -1432,7 +1431,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#L2826 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2821 "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)*.
|
||||
|
||||
@@ -1474,7 +1473,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#L2876 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2871 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1504,7 +1503,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#L2908 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2903 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a `collection` to a value that 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)*.
|
||||
|
||||
@@ -1542,7 +1541,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#L2951 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2946 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
|
||||
|
||||
@@ -1573,7 +1572,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#L3011 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3006 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
|
||||
|
||||
@@ -1616,7 +1615,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#L3032 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3027 "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.
|
||||
|
||||
@@ -1640,7 +1639,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#L3065 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3060 "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.
|
||||
|
||||
@@ -1670,7 +1669,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#L3112 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3107 "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)*.
|
||||
|
||||
@@ -1716,7 +1715,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#L3168 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3163 "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)*.
|
||||
|
||||
@@ -1753,7 +1752,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#L3203 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3198 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -1777,7 +1776,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#L3235 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3230 "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.
|
||||
|
||||
@@ -1814,7 +1813,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#L4165 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4160 "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.
|
||||
|
||||
@@ -1842,7 +1841,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#L4198 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4193 "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.
|
||||
|
||||
@@ -1873,7 +1872,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#L4229 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4224 "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.
|
||||
|
||||
@@ -1904,7 +1903,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#L4275 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4270 "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.
|
||||
|
||||
@@ -1945,7 +1944,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#L4298 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4293 "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.
|
||||
|
||||
@@ -1972,7 +1971,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#L4357 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4352 "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`.
|
||||
|
||||
@@ -2026,7 +2025,7 @@ _.toLookup(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4423 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4418 "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 `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -2052,7 +2051,7 @@ jQuery(window).on('resize', lazyLayout);
|
||||
<!-- 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#L4465 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4460 "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.
|
||||
|
||||
@@ -2077,7 +2076,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#L4491 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4486 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2104,7 +2103,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#L4515 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4510 "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.
|
||||
|
||||
@@ -2130,7 +2129,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#L4542 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4537 "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.
|
||||
|
||||
@@ -2156,7 +2155,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#L4577 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4572 "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.
|
||||
|
||||
@@ -2183,7 +2182,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#L4608 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4603 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2220,7 +2219,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4630 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4625 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2245,7 +2244,7 @@ jQuery(window).on('scroll', throttled);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4683 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4678 "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.
|
||||
|
||||
@@ -2281,7 +2280,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#L1137 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1045 "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)*.
|
||||
|
||||
@@ -2319,7 +2318,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#L1192 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1100 "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)*.
|
||||
|
||||
@@ -2366,7 +2365,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#L1317 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1225 "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)*.
|
||||
|
||||
@@ -2412,7 +2411,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#L1341 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1249 "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.
|
||||
|
||||
@@ -2438,7 +2437,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findkeycollection--callbackidentity-thisarg"></a>`_.findKey(collection [, callback=identity, thisArg])`
|
||||
<a href="#_findkeycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L916 "View in source") [Ⓣ][1]
|
||||
<a href="#_findkeycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1270 "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.
|
||||
|
||||
@@ -2464,7 +2463,7 @@ _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 ==
|
||||
<!-- 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#L957 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1311 "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`.
|
||||
|
||||
@@ -2500,7 +2499,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#L982 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1336 "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`.
|
||||
|
||||
@@ -2528,7 +2527,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#L1358 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1353 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -2555,7 +2554,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#L1383 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1378 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -2580,7 +2579,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#L1400 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1395 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given `object`.
|
||||
|
||||
@@ -2604,7 +2603,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#L888 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L938 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -2631,7 +2630,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#L1000 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L964 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -2658,7 +2657,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#L1426 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1421 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -2682,7 +2681,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1443 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1438 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -2706,7 +2705,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1460 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1455 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -2730,7 +2729,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1485 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1480 "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".
|
||||
|
||||
@@ -2760,7 +2759,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#L1544 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1539 "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)*.
|
||||
|
||||
@@ -2805,7 +2804,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#L1728 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1723 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is, or can be coerced to, a finite number.
|
||||
|
||||
@@ -2843,7 +2842,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1745 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1740 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -2867,7 +2866,7 @@ _.isFunction(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1808 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1803 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `NaN`.
|
||||
|
||||
@@ -2902,7 +2901,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1830 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1825 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -2929,7 +2928,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1847 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1842 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -2953,7 +2952,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#L1775 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1770 "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('')`)*
|
||||
|
||||
@@ -2983,7 +2982,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1875 "View in source") [Ⓣ][1]
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1870 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `value` is an object created by the `Object` constructor.
|
||||
|
||||
@@ -3018,7 +3017,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#L1900 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1895 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -3042,7 +3041,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1917 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1912 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -3066,7 +3065,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1934 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1929 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -3090,7 +3089,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1019 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L983 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of `object`.
|
||||
|
||||
@@ -3114,7 +3113,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#L1993 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1988 "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)*.
|
||||
|
||||
@@ -3170,7 +3169,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#L2100 "View in source") [Ⓣ][1]
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2095 "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)*.
|
||||
|
||||
@@ -3201,7 +3200,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#L2134 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2129 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -3225,7 +3224,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#L2172 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2167 "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)*.
|
||||
|
||||
@@ -3256,7 +3255,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2209 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2204 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -3287,7 +3286,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#L4707 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4702 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3311,7 +3310,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#L4725 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4720 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3336,7 +3335,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4751 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4746 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3366,7 +3365,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4780 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4775 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3386,7 +3385,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue"></a>`_.parseInt(value)`
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4801 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4796 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the given `value` into an integer of the specified `radix`.
|
||||
|
||||
@@ -3412,7 +3411,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#L4824 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4819 "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.
|
||||
|
||||
@@ -3440,7 +3439,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#L4863 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4858 "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.
|
||||
|
||||
@@ -3493,7 +3492,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#L4950 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4945 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3577,7 +3576,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#L5075 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5070 "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)*.
|
||||
|
||||
@@ -3609,7 +3608,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#L5102 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5097 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3633,7 +3632,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#L5122 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5117 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3667,7 +3666,7 @@ _.uniqueId();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsimports_"></a>`_.templateSettings.imports._`
|
||||
<a href="#_templatesettingsimports_">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L438 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsimports_">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L429 "View in source") [Ⓣ][1]
|
||||
|
||||
A reference to the `lodash` function.
|
||||
|
||||
@@ -3686,7 +3685,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#L5358 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5353 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
@@ -3698,7 +3697,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_support"></a>`_.support`
|
||||
<a href="#_support">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L257 "View in source") [Ⓣ][1]
|
||||
<a href="#_support">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L256 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Object)*: An object used to flag environments features.
|
||||
|
||||
@@ -3710,7 +3709,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportargsclass"></a>`_.support.argsClass`
|
||||
<a href="#_supportargsclass">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L282 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportargsclass">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L281 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if an `arguments` object's [[Class]] is resolvable *(all but Firefox < `4`, IE < `9`)*.
|
||||
|
||||
@@ -3722,7 +3721,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportargsobject"></a>`_.support.argsObject`
|
||||
<a href="#_supportargsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L274 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportargsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L273 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if `arguments` objects are `Object` objects *(all but Opera < `10.5`)*.
|
||||
|
||||
@@ -3734,7 +3733,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportenumprototypes"></a>`_.support.enumPrototypes`
|
||||
<a href="#_supportenumprototypes">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L295 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportenumprototypes">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L294 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if `prototype` properties are enumerable by default.
|
||||
|
||||
@@ -3748,7 +3747,7 @@ Firefox < `3.6`, Opera > `9.50` - Opera < `11.60`, and Safari < `5.1` *(if the p
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportfastbind"></a>`_.support.fastBind`
|
||||
<a href="#_supportfastbind">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L303 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportfastbind">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L302 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if `Function#bind` exists and is inferred to be fast *(all but V8)*.
|
||||
|
||||
@@ -3757,22 +3756,10 @@ Firefox < `3.6`, Opera > `9.50` - Opera < `11.60`, and Safari < `5.1` *(if the p
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportfastkeys"></a>`_.support.fastKeys`
|
||||
<a href="#_supportfastkeys">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L311 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if `Object.keys` exists and is inferred to be fast *(Firefox, IE, Opera, V8)*.
|
||||
|
||||
* * *
|
||||
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportnonenumargs"></a>`_.support.nonEnumArgs`
|
||||
<a href="#_supportnonenumargs">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L328 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportnonenumargs">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L319 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if `arguments` object indexes are non-enumerable *(Firefox < `4`, IE < `9`, PhantomJS, Safari < `5.1`)*.
|
||||
|
||||
@@ -3784,7 +3771,7 @@ Firefox < `3.6`, Opera > `9.50` - Opera < `11.60`, and Safari < `5.1` *(if the p
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportnonenumshadows"></a>`_.support.nonEnumShadows`
|
||||
<a href="#_supportnonenumshadows">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L339 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportnonenumshadows">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L330 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if properties shadowing those on `Object.prototype` are non-enumerable.
|
||||
|
||||
@@ -3798,7 +3785,7 @@ In IE < `9` an objects own properties, shadowing non-enumerable ones, are made n
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportownlast"></a>`_.support.ownLast`
|
||||
<a href="#_supportownlast">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L319 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportownlast">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L310 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if own properties are iterated after inherited properties *(all but IE < `9`)*.
|
||||
|
||||
@@ -3810,7 +3797,7 @@ In IE < `9` an objects own properties, shadowing non-enumerable ones, are made n
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportspliceobjects"></a>`_.support.spliceObjects`
|
||||
<a href="#_supportspliceobjects">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L353 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportspliceobjects">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L344 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect if `Array#shift` and `Array#splice` augment array-like objects correctly.
|
||||
|
||||
@@ -3824,7 +3811,7 @@ Firefox < `10`, IE compatibility mode, and IE < `9` have buggy Array `shift()` a
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_supportunindexedchars"></a>`_.support.unindexedChars`
|
||||
<a href="#_supportunindexedchars">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L364 "View in source") [Ⓣ][1]
|
||||
<a href="#_supportunindexedchars">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L355 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Boolean)*: Detect lack of support for accessing string characters by index.
|
||||
|
||||
@@ -3838,7 +3825,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettings"></a>`_.templateSettings`
|
||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L390 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettings">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L381 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters.
|
||||
|
||||
@@ -3850,7 +3837,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
|
||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L398 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsescape">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L389 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
|
||||
|
||||
@@ -3862,7 +3849,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
|
||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L406 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsevaluate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L397 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect code to be evaluated.
|
||||
|
||||
@@ -3874,7 +3861,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
|
||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L414 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsinterpolate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L405 "View in source") [Ⓣ][1]
|
||||
|
||||
*(RegExp)*: Used to detect `data` property values to inject.
|
||||
|
||||
@@ -3886,7 +3873,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
|
||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L422 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsvariable">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L413 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: Used to reference the data object in the template text.
|
||||
|
||||
@@ -3898,7 +3885,7 @@ IE < `8` can't access characters by index and IE `8` can only access characters
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatesettingsimports"></a>`_.templateSettings.imports`
|
||||
<a href="#_templatesettingsimports">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L430 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatesettingsimports">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L421 "View in source") [Ⓣ][1]
|
||||
|
||||
*(Object)*: Used to import variables into the compiled template.
|
||||
|
||||
|
||||
314
lodash.js
314
lodash.js
@@ -185,7 +185,6 @@
|
||||
|
||||
/** Detect various environments */
|
||||
var isIeOpera = reNative.test(context.attachEvent),
|
||||
isJSC = !/\n{2,}/.test(Function()),
|
||||
isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera);
|
||||
|
||||
/** Used to lookup a built-in constructor by [[Class]] */
|
||||
@@ -302,14 +301,6 @@
|
||||
*/
|
||||
support.fastBind = nativeBind && !isV8;
|
||||
|
||||
/**
|
||||
* Detect if `Object.keys` exists and is inferred to be fast (Firefox, IE, Opera, V8).
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type Boolean
|
||||
*/
|
||||
support.fastKeys = nativeKeys && (isIeOpera || isV8 || !isJSC);
|
||||
|
||||
/**
|
||||
* Detect if own properties are iterated after inherited properties (all but IE < 9).
|
||||
*
|
||||
@@ -452,7 +443,7 @@
|
||||
// the `iterable` may be reassigned by the `top` snippet
|
||||
'var index, iterable = <%= firstArg %>, ' +
|
||||
// assign the `result` variable an initial value
|
||||
'result = iterable;\n' +
|
||||
'result = <%= init %>;\n' +
|
||||
// exit early if the first argument is falsey
|
||||
'if (!iterable) return result;\n' +
|
||||
// add code before the iteration branches
|
||||
@@ -495,9 +486,9 @@
|
||||
' <% } %>' +
|
||||
|
||||
// iterate own properties using `Object.keys` if it's fast
|
||||
' <% if (support.fastKeys && useHas) { %>\n' +
|
||||
' <% if (useHas && useKeys) { %>\n' +
|
||||
' var ownIndex = -1,\n' +
|
||||
' ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n' +
|
||||
' ownProps = objectTypes[typeof iterable] ? keys(iterable) : [],\n' +
|
||||
' length = ownProps.length;\n\n' +
|
||||
' while (++ownIndex < length) {\n' +
|
||||
' index = ownProps[ownIndex];\n' +
|
||||
@@ -727,9 +718,11 @@
|
||||
// iterator options
|
||||
'arrays': 'isArray(iterable)',
|
||||
'bottom': '',
|
||||
'init': 'iterable',
|
||||
'loop': '',
|
||||
'top': '',
|
||||
'useHas': true
|
||||
'useHas': true,
|
||||
'useKeys': !!keys
|
||||
};
|
||||
|
||||
// merge options into a template data object
|
||||
@@ -743,14 +736,14 @@
|
||||
|
||||
// create the function factory
|
||||
var factory = Function(
|
||||
'hasOwnProperty, isArguments, isArray, isString, lodash, ' +
|
||||
'objectTypes, nativeKeys',
|
||||
'hasOwnProperty, isArguments, isArray, isString, keys, ' +
|
||||
'lodash, objectTypes',
|
||||
'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}'
|
||||
);
|
||||
// return the compiled function
|
||||
return factory(
|
||||
hasOwnProperty, isArguments, isArray, isString, lodash,
|
||||
objectTypes, nativeKeys
|
||||
hasOwnProperty, isArguments, isArray, isString, keys,
|
||||
lodash, objectTypes
|
||||
);
|
||||
}
|
||||
|
||||
@@ -828,6 +821,63 @@
|
||||
// no operation performed
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor) && (support.nodeClass || !isNode(value))) || ctor instanceof ctor) {
|
||||
// IE < 9 iterates inherited properties before own properties. If the first
|
||||
// iterated property is an object's own property then there are no inherited
|
||||
// enumerable properties.
|
||||
if (support.ownLast) {
|
||||
forIn(value, function(value, key, object) {
|
||||
result = hasOwnProperty.call(object, key);
|
||||
return false;
|
||||
});
|
||||
return result === true;
|
||||
}
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @type Function
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
var shimKeys = createIterator({
|
||||
'args': 'object',
|
||||
'init': '[]',
|
||||
'top': 'if (!(objectTypes[typeof object])) return result',
|
||||
'loop': 'result.push(index)',
|
||||
'arrays': false
|
||||
});
|
||||
|
||||
/**
|
||||
* Slices the `collection` from the `start` index up to, but not including,
|
||||
* the `end` index.
|
||||
@@ -895,92 +945,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(collection, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
if (callback(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
|
||||
|
||||
/**
|
||||
* Checks if `value` is an array.
|
||||
*
|
||||
@@ -1027,62 +991,6 @@
|
||||
return nativeKeys(object);
|
||||
};
|
||||
|
||||
/**
|
||||
* A fallback implementation of `isPlainObject` that checks if a given `value`
|
||||
* is an object created by the `Object` constructor, assuming objects created
|
||||
* by the `Object` constructor have no inherited enumerable properties and that
|
||||
* there are no `Object.prototype` extensions.
|
||||
*
|
||||
* @private
|
||||
* @param {Mixed} value The value to check.
|
||||
* @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`.
|
||||
*/
|
||||
function shimIsPlainObject(value) {
|
||||
// avoid non-objects and false positives for `arguments` objects
|
||||
var result = false;
|
||||
if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) {
|
||||
return result;
|
||||
}
|
||||
// check that the constructor is `Object` (i.e. `Object instanceof Object`)
|
||||
var ctor = value.constructor;
|
||||
if ((!isFunction(ctor) && (support.nodeClass || !isNode(value))) || ctor instanceof ctor) {
|
||||
// IE < 9 iterates inherited properties before own properties. If the first
|
||||
// iterated property is an object's own property then there are no inherited
|
||||
// enumerable properties.
|
||||
if (support.ownLast) {
|
||||
forIn(value, function(value, key, object) {
|
||||
result = hasOwnProperty.call(object, key);
|
||||
return false;
|
||||
});
|
||||
return result === true;
|
||||
}
|
||||
// In most environments an object's own properties are iterated before
|
||||
// its inherited properties. If the last iterated property is an object's
|
||||
// own property then there are no inherited enumerable properties.
|
||||
forIn(value, function(value, key) {
|
||||
result = key;
|
||||
});
|
||||
return result === false || hasOwnProperty.call(value, result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fallback implementation of `Object.keys` that produces an array of the
|
||||
* given object's own enumerable property names.
|
||||
*
|
||||
* @private
|
||||
* @param {Object} object The object to inspect.
|
||||
* @returns {Array} Returns a new array of property names.
|
||||
*/
|
||||
function shimKeys(object) {
|
||||
var result = [];
|
||||
forOwn(object, function(value, key) {
|
||||
result.push(key);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to convert characters to HTML entities:
|
||||
*
|
||||
@@ -1340,6 +1248,93 @@
|
||||
*/
|
||||
var defaults = createIterator(defaultsIteratorOptions);
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Objects
|
||||
* @param {Array|Object|String} collection The collection to iterate over.
|
||||
* @param {Function|Object|String} [callback=identity] The function called per
|
||||
* iteration. If a property name or object is passed, it will be used to create
|
||||
* a "_.pluck" or "_.where" style callback, respectively.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(collection, callback, thisArg) {
|
||||
var result;
|
||||
callback = lodash.createCallback(callback, thisArg);
|
||||
forOwn(collection, function(value, key, collection) {
|
||||
if (callback(value, key, collection)) {
|
||||
result = key;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* function Dog(name) {
|
||||
* this.name = name;
|
||||
* }
|
||||
*
|
||||
* Dog.prototype.bark = function() {
|
||||
* alert('Woof, woof!');
|
||||
* };
|
||||
*
|
||||
* _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts 'name' and 'bark' (order is not guaranteed)
|
||||
*/
|
||||
var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, {
|
||||
'useHas': false
|
||||
});
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @type Function
|
||||
* @category Objects
|
||||
* @param {Object} object The object to iterate over.
|
||||
* @param {Function} [callback=identity] The function called per iteration.
|
||||
* @param {Mixed} [thisArg] The `this` binding of `callback`.
|
||||
* @returns {Object} Returns `object`.
|
||||
* @example
|
||||
*
|
||||
* _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
* alert(key);
|
||||
* });
|
||||
* // => alerts '0', '1', and 'length' (order is not guaranteed)
|
||||
*/
|
||||
var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions);
|
||||
|
||||
/**
|
||||
* Creates a sorted array of all enumerable properties, own and inherited,
|
||||
* of `object` that have function values.
|
||||
@@ -5409,6 +5404,7 @@
|
||||
// add pseudo private property to be used and removed during the build process
|
||||
lodash._each = each;
|
||||
lodash._iteratorTemplate = iteratorTemplate;
|
||||
lodash._shimKeys = shimKeys;
|
||||
|
||||
return lodash;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user